@gbmtech/aurora-ui 0.1.25 → 0.1.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/select.cjs +1 -1
- package/dist/cjs/components/select.cjs.map +1 -1
- package/dist/esm/components/select.js +1 -1
- package/dist/esm/components/select.js.map +1 -1
- package/dist/types/components/select.d.ts +13 -9
- package/dist/types/components/select.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
'use client'
|
|
2
|
-
"use strict";let __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_require__={};__webpack_require__.d=(e,t)=>{for(var a in t)__webpack_require__.o(t,a)&&!__webpack_require__.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{SelectContent:()=>SelectContent,SelectGroup:()=>SelectGroup,SelectValue:()=>SelectValue,Select:()=>Select,SelectSeparator:()=>SelectSeparator,SelectLabel:()=>SelectLabel,SelectTrigger:()=>SelectTrigger,SelectItem:()=>SelectItem});let jsx_runtime_namespaceObject=require("react/jsx-runtime"),
|
|
2
|
+
"use strict";let __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_require__={};__webpack_require__.d=(e,t)=>{for(var a in t)__webpack_require__.o(t,a)&&!__webpack_require__.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{SelectContent:()=>SelectContent,SelectGroup:()=>SelectGroup,SelectValue:()=>SelectValue,Select:()=>Select,SelectSeparator:()=>SelectSeparator,SelectLabel:()=>SelectLabel,SelectTrigger:()=>SelectTrigger,SelectItem:()=>SelectItem});let jsx_runtime_namespaceObject=require("react/jsx-runtime"),react_namespaceObject=require("@phosphor-icons/react"),react_select_namespaceObject=require("@radix-ui/react-select"),utils_cjs_namespaceObject=require("../lib/utils.cjs"),external_button_cjs_namespaceObject=require("./button.cjs");function Select({...e}){return(0,jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.Root,{"data-slot":"select",...e})}function SelectGroup({...e}){return(0,jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.Group,{"data-slot":"select-group",...e})}function SelectValue({...e}){return(0,jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.Value,{"data-slot":"select-value",...e})}function SelectTrigger({children:e,className:t,size:a="md",...c}){return(0,jsx_runtime_namespaceObject.jsxs)(react_select_namespaceObject.Trigger,{className:(0,external_button_cjs_namespaceObject.buttonVariants)({className:["w-fit justify-between px-3 font-normal focus:border-gbm-sky focus:ring-3 focus:ring-gbm-sky/50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 *:data-[slot=select-value]:truncate [&_svg:not([class*='text-'])]:text-gray-600",t],size:a,variant:"outline"}),"data-size":a,"data-slot":"select-trigger",...c,children:[e,(0,jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.Icon,{asChild:!0,className:"size-4 shrink-0 opacity-50",children:(0,jsx_runtime_namespaceObject.jsx)(react_namespaceObject.CaretDown,{})})]})}function SelectScrollUpButton({className:e,...t}){return(0,jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.ScrollUpButton,{className:(0,utils_cjs_namespaceObject.cn)("flex items-center justify-center py-1 text-gray-600",e),"data-slot":"select-scroll-up-button",...t,children:(0,jsx_runtime_namespaceObject.jsx)(react_namespaceObject.CaretUp,{size:16})})}function SelectScrollDownButton({className:e,...t}){return(0,jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.ScrollDownButton,{className:(0,utils_cjs_namespaceObject.cn)("flex items-center justify-center py-1 text-gray-600",e),"data-slot":"select-scroll-down-button",...t,children:(0,jsx_runtime_namespaceObject.jsx)(react_namespaceObject.CaretDown,{size:16})})}function SelectContent({children:e,className:t,position:a="popper",...c}){return(0,jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.Portal,{children:(0,jsx_runtime_namespaceObject.jsxs)(react_select_namespaceObject.Content,{className:(0,utils_cjs_namespaceObject.cn)("data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 relative z-50 max-h-96 min-w-32 overflow-hidden rounded-lg border bg-background text-gbm-dark shadow-lg data-[state=closed]:animate-out data-[state=open]:animate-in","popper"===a&&"data-[side=left]:-translate-x-1 data-[side=top]:-translate-y-1 data-[side=right]:translate-x-1 data-[side=bottom]:translate-y-1",t),"data-slot":"select-content",position:a,...c,children:[(0,jsx_runtime_namespaceObject.jsx)(SelectScrollUpButton,{}),(0,jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.Viewport,{className:(0,utils_cjs_namespaceObject.cn)("p-1","popper"===a&&"h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)"),children:e}),(0,jsx_runtime_namespaceObject.jsx)(SelectScrollDownButton,{})]})})}function SelectLabel({className:e,...t}){return(0,jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.Label,{className:(0,utils_cjs_namespaceObject.cn)("flex items-center gap-x-2 px-2 py-1.5 font-semibold text-sm",e),"data-slot":"select-label",...t})}function SelectItem({children:e,className:t,...a}){return(0,jsx_runtime_namespaceObject.jsxs)(react_select_namespaceObject.Item,{className:(0,utils_cjs_namespaceObject.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden focus:bg-gray-100 focus:text-gbm-black aria-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:[&_svg:not([class*='text-'])]:text-destructive/80 [&_svg]:shrink-0 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",t),"data-slot":"select-item",...a,children:[(0,jsx_runtime_namespaceObject.jsx)("span",{className:"absolute right-2 flex items-center justify-center",children:(0,jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.ItemIndicator,{children:(0,jsx_runtime_namespaceObject.jsx)(react_namespaceObject.Check,{className:"size-4"})})}),(0,jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.ItemText,{children:e})]})}function SelectSeparator({className:e,...t}){return(0,jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.Separator,{className:(0,utils_cjs_namespaceObject.cn)("mx-2 my-1 h-px bg-stroke",e),"data-slot":"select-separator",...t})}for(var __webpack_i__ in exports.Select=__webpack_exports__.Select,exports.SelectContent=__webpack_exports__.SelectContent,exports.SelectGroup=__webpack_exports__.SelectGroup,exports.SelectItem=__webpack_exports__.SelectItem,exports.SelectLabel=__webpack_exports__.SelectLabel,exports.SelectSeparator=__webpack_exports__.SelectSeparator,exports.SelectTrigger=__webpack_exports__.SelectTrigger,exports.SelectValue=__webpack_exports__.SelectValue,__webpack_exports__)-1===["Select","SelectContent","SelectGroup","SelectItem","SelectLabel","SelectSeparator","SelectTrigger","SelectValue"].indexOf(__webpack_i__)&&(exports[__webpack_i__]=__webpack_exports__[__webpack_i__]);Object.defineProperty(exports,"__esModule",{value:!0});
|
|
3
3
|
//# sourceMappingURL=select.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components\\select.cjs","sources":["webpack://@gbmtech/aurora-ui/./src/components/select.tsx"],"sourcesContent":["\r\n\r\nimport { CaretDown, Check } from '@phosphor-icons/react/dist/ssr'\r\nimport * as ScrollArea from '@radix-ui/react-scroll-area'\r\nimport * as SelectPrimitive from '@radix-ui/react-select'\r\nimport * as React from 'react'\r\n\r\nimport { cn } from '../lib/utils'\r\n\r\nconst Select = SelectPrimitive.Root\r\nSelect.displayName = 'Select'\r\n\r\nconst SelectGroup = SelectPrimitive.Group\r\nSelectGroup.displayName = 'SelectGroup'\r\n\r\nconst SelectValue = React.forwardRef<\r\n React.ElementRef<typeof SelectPrimitive.Value>,\r\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Value>\r\n>(({ placeholder, ...props }, ref) => {\r\n return (\r\n <SelectPrimitive.Value\r\n ref={ref}\r\n placeholder={placeholder ?? 'Selecione'}\r\n {...props}\r\n />\r\n )\r\n})\r\nSelectValue.displayName = 'SelectValue'\r\n\r\nconst SelectTrigger = React.forwardRef<\r\n React.ElementRef<typeof SelectPrimitive.Trigger>,\r\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>\r\n>(({ className, children, ...props }, ref) => (\r\n <SelectPrimitive.Trigger\r\n ref={ref}\r\n className={cn(\r\n 'group flex h-12 w-full items-center justify-between rounded-md border border-gray-200 bg-background px-4 py-2 text-sm ring-offset-background transition-colors focus:outline-none focus:ring-2 focus:ring-gbm-sky focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[placeholder]:text-gbm-dark/50 [&:not([data-disabled])]:hover:bg-gray-50 [&>span]:line-clamp-1',\r\n className\r\n )}\r\n {...props}\r\n >\r\n {children}\r\n <SelectPrimitive.Icon asChild>\r\n <CaretDown\r\n weight=\"bold\"\r\n className=\"ml-4 h-4 w-4 text-gbm-dark group-data-[state=open]:rotate-180\"\r\n />\r\n </SelectPrimitive.Icon>\r\n </SelectPrimitive.Trigger>\r\n))\r\nSelectTrigger.displayName = 'SelectTrigger'\r\n\r\nconst SelectContent = React.forwardRef<\r\n React.ElementRef<typeof SelectPrimitive.Content>,\r\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>\r\n>(({ className, children, position = 'popper', ...props }, ref) => (\r\n <SelectPrimitive.Portal>\r\n <SelectPrimitive.Content\r\n ref={ref}\r\n className={cn(\r\n '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 relative z-50 max-h-96 min-w-[8rem] rounded border border-gray-200 bg-white text-gbm-dark data-[state=closed]:animate-out data-[state=open]:animate-in',\r\n position === 'popper' &&\r\n 'data-[side=left]:-translate-x-1 data-[side=top]:-translate-y-1 data-[side=right]:translate-x-1 data-[side=bottom]:translate-y-1',\r\n className\r\n )}\r\n position={position}\r\n {...props}\r\n >\r\n <ScrollArea.Root className=\"h-full w-full\" type=\"auto\">\r\n <SelectPrimitive.Viewport>\r\n <ScrollArea.Viewport\r\n className={cn(\r\n 'p-1',\r\n position === 'popper' &&\r\n 'max-h-[200px] w-full min-w-[var(--radix-select-trigger-width)]'\r\n )}\r\n >\r\n {children}\r\n </ScrollArea.Viewport>\r\n </SelectPrimitive.Viewport>\r\n\r\n <ScrollArea.Scrollbar\r\n className=\"w-1 px-0.5 py-1\"\r\n orientation=\"vertical\"\r\n >\r\n <ScrollArea.Thumb className=\"rounded bg-gray-200\" />\r\n </ScrollArea.Scrollbar>\r\n </ScrollArea.Root>\r\n </SelectPrimitive.Content>\r\n </SelectPrimitive.Portal>\r\n))\r\nSelectContent.displayName = 'SelectContent'\r\n\r\nconst SelectLabel = React.forwardRef<\r\n React.ElementRef<typeof SelectPrimitive.Label>,\r\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>\r\n>(({ className, ...props }, ref) => (\r\n <SelectPrimitive.Label\r\n ref={ref}\r\n className={cn('py-1.5 pr-2 pl-8 font-semibold text-sm', className)}\r\n {...props}\r\n />\r\n))\r\nSelectLabel.displayName = 'SelectLabel'\r\n\r\nconst SelectItem = React.forwardRef<\r\n React.ElementRef<typeof SelectPrimitive.Item>,\r\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>\r\n>(({ className, children, ...props }, ref) => (\r\n <SelectPrimitive.Item\r\n ref={ref}\r\n className={cn(\r\n 'relative flex w-full cursor-default select-none items-center rounded-sm p-3 text-sm outline-none focus:bg-gray-100 data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\r\n className\r\n )}\r\n {...props}\r\n >\r\n <span className=\"absolute right-2 flex h-3.5 w-3.5 items-center justify-center\">\r\n <SelectPrimitive.ItemIndicator>\r\n <Check size={16} />\r\n </SelectPrimitive.ItemIndicator>\r\n </span>\r\n\r\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\r\n </SelectPrimitive.Item>\r\n))\r\nSelectItem.displayName = 'SelectItem'\r\n\r\nconst SelectSeparator = React.forwardRef<\r\n React.ElementRef<typeof SelectPrimitive.Separator>,\r\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>\r\n>(({ className, ...props }, ref) => (\r\n <SelectPrimitive.Separator\r\n ref={ref}\r\n className={cn('-mx-1 my-1 h-px bg-muted', className)}\r\n {...props}\r\n />\r\n))\r\nSelectSeparator.displayName = 'SelectSeparator'\r\n\r\nexport {\r\n Select,\r\n SelectGroup,\r\n SelectValue,\r\n SelectTrigger,\r\n SelectContent,\r\n SelectLabel,\r\n SelectItem,\r\n SelectSeparator,\r\n}\r\n"],"names":["Select","SelectPrimitive","SelectGroup","SelectValue","React","placeholder","props","ref","SelectTrigger","className","children","cn","CaretDown","SelectContent","position","ScrollArea","SelectLabel","SelectItem","Check","SelectSeparator"],"mappings":";21CASMA,OAASC,6BAAAA,IAAoB,CACnCD,OAAO,WAAW,CAAG,SAErB,IAAME,YAAcD,6BAAAA,KAAqB,CACzCC,YAAY,WAAW,CAAG,cAE1B,IAAMC,YAAcC,+BAAAA,UAAgB,CAGlC,CAAC,CAAEC,YAAAA,CAAW,CAAE,GAAGC,EAAO,CAAEC,IAE1B,oCAACN,6BAAAA,KAAqB,EACpB,IAAKM,EACL,YAAaF,GAAe,YAC3B,GAAGC,CAAK,GAIfH,CAAAA,YAAY,WAAW,CAAG,cAE1B,IAAMK,cAAgBJ,+BAAAA,UAAgB,CAGpC,CAAC,CAAEK,UAAAA,CAAS,CAAEC,SAAAA,CAAQ,CAAE,GAAGJ,EAAO,CAAEC,IACpC,qCAACN,6BAAAA,OAAuB,EACtB,IAAKM,EACL,UAAWI,GAAAA,0BAAAA,EAAAA,EACT,4XACAF,GAED,GAAGH,CAAK,C,UAERI,EACD,oCAACT,6BAAAA,IAAoB,EAAC,QAAO,G,SAC3B,oCAACW,oBAAAA,SAASA,CAAAA,CACR,OAAO,OACP,UAAU,+D,QAKlBJ,CAAAA,cAAc,WAAW,CAAG,gBAE5B,IAAMK,cAAgBT,+BAAAA,UAAgB,CAGpC,CAAC,CAAEK,UAAAA,CAAS,CAAEC,SAAAA,CAAQ,CAAEI,SAAAA,EAAW,QAAQ,CAAE,GAAGR,EAAO,CAAEC,IACzD,oCAACN,6BAAAA,MAAsB,E,SACrB,oCAACA,6BAAAA,OAAuB,EACtB,IAAKM,EACL,UAAWI,GAAAA,0BAAAA,EAAAA,EACT,6aACAG,WAAAA,GACE,kIACFL,GAEF,SAAUK,EACT,G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W,CAAG,kB"}
|
|
1
|
+
{"version":3,"file":"components\\select.cjs","sources":["webpack://@gbmtech/aurora-ui/./src/components/select.tsx"],"sourcesContent":["\r\n\r\nimport { CaretDown, CaretUp, Check } from '@phosphor-icons/react'\r\nimport * as SelectPrimitive from '@radix-ui/react-select'\r\nimport { ComponentProps, JSX } from 'react'\r\n\r\nimport { VariantProps, cn } from '@/lib/utils'\r\nimport { buttonVariants } from './button'\r\n\r\n/* -----------------------------------------------------------------------------\r\n * Component: Select\r\n * -------------------------------------------------------------------------- */\r\n\r\nfunction Select({\r\n ...props\r\n}: ComponentProps<typeof SelectPrimitive.Root>): JSX.Element {\r\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />\r\n}\r\n\r\n/* -----------------------------------------------------------------------------\r\n * Component: SelectGroup\r\n * -------------------------------------------------------------------------- */\r\n\r\nfunction SelectGroup({\r\n ...props\r\n}: ComponentProps<typeof SelectPrimitive.Group>): JSX.Element {\r\n return <SelectPrimitive.Group data-slot=\"select-group\" {...props} />\r\n}\r\n\r\n/* -----------------------------------------------------------------------------\r\n * Component: SelectValue\r\n * -------------------------------------------------------------------------- */\r\n\r\nfunction SelectValue({\r\n ...props\r\n}: ComponentProps<typeof SelectPrimitive.Value>): JSX.Element {\r\n return <SelectPrimitive.Value data-slot=\"select-value\" {...props} />\r\n}\r\n\r\n/* -----------------------------------------------------------------------------\r\n * Component: SelectTrigger\r\n * -------------------------------------------------------------------------- */\r\n\r\nfunction SelectTrigger({\r\n children,\r\n className,\r\n size = 'md',\r\n ...props\r\n}: ComponentProps<typeof SelectPrimitive.Trigger> & {\r\n size?: VariantProps<typeof buttonVariants>['size']\r\n}): JSX.Element {\r\n return (\r\n <SelectPrimitive.Trigger\r\n className={buttonVariants({\r\n className: [\r\n \"w-fit justify-between px-3 font-normal focus:border-gbm-sky focus:ring-3 focus:ring-gbm-sky/50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 *:data-[slot=select-value]:truncate [&_svg:not([class*='text-'])]:text-gray-600\",\r\n className,\r\n ],\r\n size,\r\n variant: 'outline',\r\n })}\r\n data-size={size}\r\n data-slot=\"select-trigger\"\r\n {...props}\r\n >\r\n {children}\r\n <SelectPrimitive.Icon asChild className=\"size-4 shrink-0 opacity-50\">\r\n <CaretDown />\r\n </SelectPrimitive.Icon>\r\n </SelectPrimitive.Trigger>\r\n )\r\n}\r\n\r\n/* -----------------------------------------------------------------------------\r\n * Component: SelectScrollUpButton\r\n * -------------------------------------------------------------------------- */\r\n\r\nfunction SelectScrollUpButton({\r\n className,\r\n ...props\r\n}: ComponentProps<typeof SelectPrimitive.ScrollUpButton>): JSX.Element {\r\n return (\r\n <SelectPrimitive.ScrollUpButton\r\n className={cn(\r\n 'flex items-center justify-center py-1 text-gray-600',\r\n className\r\n )}\r\n data-slot=\"select-scroll-up-button\"\r\n {...props}\r\n >\r\n <CaretUp size={16} />\r\n </SelectPrimitive.ScrollUpButton>\r\n )\r\n}\r\n\r\n/* -----------------------------------------------------------------------------\r\n * Component: SelectScrollDownButton\r\n * -------------------------------------------------------------------------- */\r\n\r\nfunction SelectScrollDownButton({\r\n className,\r\n ...props\r\n}: ComponentProps<typeof SelectPrimitive.ScrollDownButton>): JSX.Element {\r\n return (\r\n <SelectPrimitive.ScrollDownButton\r\n className={cn(\r\n 'flex items-center justify-center py-1 text-gray-600',\r\n className\r\n )}\r\n data-slot=\"select-scroll-down-button\"\r\n {...props}\r\n >\r\n <CaretDown size={16} />\r\n </SelectPrimitive.ScrollDownButton>\r\n )\r\n}\r\n\r\n/* -----------------------------------------------------------------------------\r\n * Component: SelectContent\r\n * -------------------------------------------------------------------------- */\r\n\r\nfunction SelectContent({\r\n children,\r\n className,\r\n position = 'popper',\r\n ...props\r\n}: ComponentProps<typeof SelectPrimitive.Content>): JSX.Element {\r\n return (\r\n <SelectPrimitive.Portal>\r\n <SelectPrimitive.Content\r\n className={cn(\r\n 'data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 relative z-50 max-h-96 min-w-32 overflow-hidden rounded-lg border bg-background text-gbm-dark shadow-lg data-[state=closed]:animate-out data-[state=open]:animate-in',\r\n position === 'popper' &&\r\n 'data-[side=left]:-translate-x-1 data-[side=top]:-translate-y-1 data-[side=right]:translate-x-1 data-[side=bottom]:translate-y-1',\r\n className\r\n )}\r\n data-slot=\"select-content\"\r\n position={position}\r\n {...props}\r\n >\r\n <SelectScrollUpButton />\r\n <SelectPrimitive.Viewport\r\n className={cn(\r\n 'p-1',\r\n position === 'popper' &&\r\n 'h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)'\r\n )}\r\n >\r\n {children}\r\n </SelectPrimitive.Viewport>\r\n <SelectScrollDownButton />\r\n </SelectPrimitive.Content>\r\n </SelectPrimitive.Portal>\r\n )\r\n}\r\n\r\n/* -----------------------------------------------------------------------------\r\n * Component: SelectLabel\r\n * -------------------------------------------------------------------------- */\r\n\r\nfunction SelectLabel({\r\n className,\r\n ...props\r\n}: ComponentProps<typeof SelectPrimitive.Label>): JSX.Element {\r\n return (\r\n <SelectPrimitive.Label\r\n className={cn(\r\n 'flex items-center gap-x-2 px-2 py-1.5 font-semibold text-sm',\r\n className\r\n )}\r\n data-slot=\"select-label\"\r\n {...props}\r\n />\r\n )\r\n}\r\n\r\n/* -----------------------------------------------------------------------------\r\n * Component: SelectItem\r\n * -------------------------------------------------------------------------- */\r\n\r\nfunction SelectItem({\r\n children,\r\n className,\r\n ...props\r\n}: ComponentProps<typeof SelectPrimitive.Item>): JSX.Element {\r\n return (\r\n <SelectPrimitive.Item\r\n className={cn(\r\n \"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden focus:bg-gray-100 focus:text-gbm-black aria-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:[&_svg:not([class*='text-'])]:text-destructive/80 [&_svg]:shrink-0 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2\",\r\n className\r\n )}\r\n data-slot=\"select-item\"\r\n {...props}\r\n >\r\n <span className=\"absolute right-2 flex items-center justify-center\">\r\n <SelectPrimitive.ItemIndicator>\r\n <Check className=\"size-4\" />\r\n </SelectPrimitive.ItemIndicator>\r\n </span>\r\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\r\n </SelectPrimitive.Item>\r\n )\r\n}\r\n\r\n/* -----------------------------------------------------------------------------\r\n * Component: SelectSeparator\r\n * -------------------------------------------------------------------------- */\r\n\r\nfunction SelectSeparator({\r\n className,\r\n ...props\r\n}: ComponentProps<typeof SelectPrimitive.Separator>): JSX.Element {\r\n return (\r\n <SelectPrimitive.Separator\r\n className={cn('mx-2 my-1 h-px bg-stroke', className)}\r\n data-slot=\"select-separator\"\r\n {...props}\r\n />\r\n )\r\n}\r\n\r\n/* -----------------------------------------------------------------------------\r\n * Exports\r\n * -------------------------------------------------------------------------- */\r\n\r\nexport {\r\n Select,\r\n SelectGroup,\r\n SelectValue,\r\n SelectTrigger,\r\n SelectContent,\r\n SelectLabel,\r\n SelectItem,\r\n SelectSeparator,\r\n}\r\n"],"names":["Select","props","SelectPrimitive","SelectGroup","SelectValue","SelectTrigger","children","className","size","buttonVariants","CaretDown","SelectScrollUpButton","cn","CaretUp","SelectScrollDownButton","SelectContent","position","SelectLabel","SelectItem","Check","SelectSeparator"],"mappings":";uxCAaA,SAASA,OAAO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or-icons/react";import*as a from"@radix-ui/react-select";import*as s from"../lib/utils.js";import*as o from"./button.js";function l({...e}){return(0,t.jsx)(a.Root,{"data-slot":"select",...e})}function r({...e}){return(0,t.jsx)(a.Group,{"data-slot":"select-group",...e})}function n({...e}){return(0,t.jsx)(a.Value,{"data-slot":"select-value",...e})}function i({children:s,className:l,size:r="md",...n}){return(0,t.jsxs)(a.Trigger,{className:(0,o.buttonVariants)({className:["w-fit justify-between px-3 font-normal focus:border-gbm-sky focus:ring-3 focus:ring-gbm-sky/50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 *:data-[slot=select-value]:truncate [&_svg:not([class*='text-'])]:text-gray-600",l],size:r,variant:"outline"}),"data-size":r,"data-slot":"select-trigger",...n,children:[s,(0,t.jsx)(a.Icon,{asChild:!0,className:"size-4 shrink-0 opacity-50",children:(0,t.jsx)(e.CaretDown,{})})]})}function c({className:o,...l}){return(0,t.jsx)(a.ScrollUpButton,{className:(0,s.cn)("flex items-center justify-center py-1 text-gray-600",o),"data-slot":"select-scroll-up-button",...l,children:(0,t.jsx)(e.CaretUp,{size:16})})}function d({className:o,...l}){return(0,t.jsx)(a.ScrollDownButton,{className:(0,s.cn)("flex items-center justify-center py-1 text-gray-600",o),"data-slot":"select-scroll-down-button",...l,children:(0,t.jsx)(e.CaretDown,{size:16})})}function u({children:e,className:o,position:l="popper",...r}){return(0,t.jsx)(a.Portal,{children:(0,t.jsxs)(a.Content,{className:(0,s.cn)("data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 relative z-50 max-h-96 min-w-32 overflow-hidden rounded-lg border bg-background text-gbm-dark shadow-lg data-[state=closed]:animate-out data-[state=open]:animate-in","popper"===l&&"data-[side=left]:-translate-x-1 data-[side=top]:-translate-y-1 data-[side=right]:translate-x-1 data-[side=bottom]:translate-y-1",o),"data-slot":"select-content",position:l,...r,children:[(0,t.jsx)(c,{}),(0,t.jsx)(a.Viewport,{className:(0,s.cn)("p-1","popper"===l&&"h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)"),children:e}),(0,t.jsx)(d,{})]})})}function m({className:e,...o}){return(0,t.jsx)(a.Label,{className:(0,s.cn)("flex items-center gap-x-2 px-2 py-1.5 font-semibold text-sm",e),"data-slot":"select-label",...o})}function p({children:o,className:l,...r}){return(0,t.jsxs)(a.Item,{className:(0,s.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden focus:bg-gray-100 focus:text-gbm-black aria-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:[&_svg:not([class*='text-'])]:text-destructive/80 [&_svg]:shrink-0 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",l),"data-slot":"select-item",...r,children:[(0,t.jsx)("span",{className:"absolute right-2 flex items-center justify-center",children:(0,t.jsx)(a.ItemIndicator,{children:(0,t.jsx)(e.Check,{className:"size-4"})})}),(0,t.jsx)(a.ItemText,{children:o})]})}function x({className:e,...o}){return(0,t.jsx)(a.Separator,{className:(0,s.cn)("mx-2 my-1 h-px bg-stroke",e),"data-slot":"select-separator",...o})}export{l as Select,u as SelectContent,r as SelectGroup,p as SelectItem,m as SelectLabel,x as SelectSeparator,i as SelectTrigger,n as SelectValue};
|
|
3
3
|
//# sourceMappingURL=select.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components\\select.js","sources":["webpack://@gbmtech/aurora-ui/./src/components/select.tsx"],"sourcesContent":["\r\n\r\nimport { CaretDown, Check } from '@phosphor-icons/react/dist/ssr'\r\nimport * as ScrollArea from '@radix-ui/react-scroll-area'\r\nimport * as SelectPrimitive from '@radix-ui/react-select'\r\nimport * as React from 'react'\r\n\r\nimport { cn } from '../lib/utils'\r\n\r\nconst Select = SelectPrimitive.Root\r\nSelect.displayName = 'Select'\r\n\r\nconst SelectGroup = SelectPrimitive.Group\r\nSelectGroup.displayName = 'SelectGroup'\r\n\r\nconst SelectValue = React.forwardRef<\r\n React.ElementRef<typeof SelectPrimitive.Value>,\r\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Value>\r\n>(({ placeholder, ...props }, ref) => {\r\n return (\r\n <SelectPrimitive.Value\r\n ref={ref}\r\n placeholder={placeholder ?? 'Selecione'}\r\n {...props}\r\n />\r\n )\r\n})\r\nSelectValue.displayName = 'SelectValue'\r\n\r\nconst SelectTrigger = React.forwardRef<\r\n React.ElementRef<typeof SelectPrimitive.Trigger>,\r\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>\r\n>(({ className, children, ...props }, ref) => (\r\n <SelectPrimitive.Trigger\r\n ref={ref}\r\n className={cn(\r\n 'group flex h-12 w-full items-center justify-between rounded-md border border-gray-200 bg-background px-4 py-2 text-sm ring-offset-background transition-colors focus:outline-none focus:ring-2 focus:ring-gbm-sky focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[placeholder]:text-gbm-dark/50 [&:not([data-disabled])]:hover:bg-gray-50 [&>span]:line-clamp-1',\r\n className\r\n )}\r\n {...props}\r\n >\r\n {children}\r\n <SelectPrimitive.Icon asChild>\r\n <CaretDown\r\n weight=\"bold\"\r\n className=\"ml-4 h-4 w-4 text-gbm-dark group-data-[state=open]:rotate-180\"\r\n />\r\n </SelectPrimitive.Icon>\r\n </SelectPrimitive.Trigger>\r\n))\r\nSelectTrigger.displayName = 'SelectTrigger'\r\n\r\nconst SelectContent = React.forwardRef<\r\n React.ElementRef<typeof SelectPrimitive.Content>,\r\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>\r\n>(({ className, children, position = 'popper', ...props }, ref) => (\r\n <SelectPrimitive.Portal>\r\n <SelectPrimitive.Content\r\n ref={ref}\r\n className={cn(\r\n '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 relative z-50 max-h-96 min-w-[8rem] rounded border border-gray-200 bg-white text-gbm-dark data-[state=closed]:animate-out data-[state=open]:animate-in',\r\n position === 'popper' &&\r\n 'data-[side=left]:-translate-x-1 data-[side=top]:-translate-y-1 data-[side=right]:translate-x-1 data-[side=bottom]:translate-y-1',\r\n className\r\n )}\r\n position={position}\r\n {...props}\r\n >\r\n <ScrollArea.Root className=\"h-full w-full\" type=\"auto\">\r\n <SelectPrimitive.Viewport>\r\n <ScrollArea.Viewport\r\n className={cn(\r\n 'p-1',\r\n position === 'popper' &&\r\n 'max-h-[200px] w-full min-w-[var(--radix-select-trigger-width)]'\r\n )}\r\n >\r\n {children}\r\n </ScrollArea.Viewport>\r\n </SelectPrimitive.Viewport>\r\n\r\n <ScrollArea.Scrollbar\r\n className=\"w-1 px-0.5 py-1\"\r\n orientation=\"vertical\"\r\n >\r\n <ScrollArea.Thumb className=\"rounded bg-gray-200\" />\r\n </ScrollArea.Scrollbar>\r\n </ScrollArea.Root>\r\n </SelectPrimitive.Content>\r\n </SelectPrimitive.Portal>\r\n))\r\nSelectContent.displayName = 'SelectContent'\r\n\r\nconst SelectLabel = React.forwardRef<\r\n React.ElementRef<typeof SelectPrimitive.Label>,\r\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>\r\n>(({ className, ...props }, ref) => (\r\n <SelectPrimitive.Label\r\n ref={ref}\r\n className={cn('py-1.5 pr-2 pl-8 font-semibold text-sm', className)}\r\n {...props}\r\n />\r\n))\r\nSelectLabel.displayName = 'SelectLabel'\r\n\r\nconst SelectItem = React.forwardRef<\r\n React.ElementRef<typeof SelectPrimitive.Item>,\r\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>\r\n>(({ className, children, ...props }, ref) => (\r\n <SelectPrimitive.Item\r\n ref={ref}\r\n className={cn(\r\n 'relative flex w-full cursor-default select-none items-center rounded-sm p-3 text-sm outline-none focus:bg-gray-100 data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\r\n className\r\n )}\r\n {...props}\r\n >\r\n <span className=\"absolute right-2 flex h-3.5 w-3.5 items-center justify-center\">\r\n <SelectPrimitive.ItemIndicator>\r\n <Check size={16} />\r\n </SelectPrimitive.ItemIndicator>\r\n </span>\r\n\r\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\r\n </SelectPrimitive.Item>\r\n))\r\nSelectItem.displayName = 'SelectItem'\r\n\r\nconst SelectSeparator = React.forwardRef<\r\n React.ElementRef<typeof SelectPrimitive.Separator>,\r\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>\r\n>(({ className, ...props }, ref) => (\r\n <SelectPrimitive.Separator\r\n ref={ref}\r\n className={cn('-mx-1 my-1 h-px bg-muted', className)}\r\n {...props}\r\n />\r\n))\r\nSelectSeparator.displayName = 'SelectSeparator'\r\n\r\nexport {\r\n Select,\r\n SelectGroup,\r\n SelectValue,\r\n SelectTrigger,\r\n SelectContent,\r\n SelectLabel,\r\n SelectItem,\r\n SelectSeparator,\r\n}\r\n"],"names":["Select","SelectPrimitive","SelectGroup","SelectValue","React","placeholder","props","ref","SelectTrigger","className","children","cn","CaretDown","SelectContent","position","ScrollArea","SelectLabel","SelectItem","Check","SelectSeparator"],"mappings":";sOASA,IAAMA,EAASC,EAAAA,IAAoB,CACnCD,EAAO,WAAW,CAAG,SAErB,IAAME,EAAcD,EAAAA,K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G,gBAE5B,IAAMG,EAAcZ,EAAAA,UAAgB,CAGlC,CAAC,CAAEK,UAAAA,CAAS,CAAE,GAAGH,EAAO,CAAEC,IAC1B,UAACN,EAAAA,KAAqB,EACpB,IAAKM,EACL,UAAWI,GAAAA,EAAAA,EAAAA,EAAG,yCAA0CF,GACvD,GAAGH,CAAK,GAGbU,CAAAA,EAAY,WAAW,CAAG,cAE1B,IAAMC,EAAab,EAAAA,UAAgB,CAGjC,CAAC,CAAEK,UAAAA,CAAS,CAAEC,SAAAA,CAAQ,CAAE,GAAGJ,EAAO,CAAEC,IACpC,WAACN,EAAAA,IAAoB,EACnB,IAAKM,EACL,UAAWI,GAAAA,EAAAA,EAAAA,EACT,oLACAF,GAED,GAAGH,CAAK,C,UAET,UAAC,QAAK,UAAU,gE,SACd,UAACL,EAAAA,aAA6B,E,SAC5B,UAACiB,EAAAA,KAAKA,CAAAA,CAAC,KAAM,E,OAIjB,UAACjB,EAAAA,QAAwB,E,SAAES,C,MAG/BO,CAAAA,EAAW,WAAW,CAAG,aAEzB,IAAME,EAAkBf,EAAAA,UAAgB,CAGtC,CAAC,CAAEK,UAAAA,CAAS,CAAE,GAAGH,EAAO,CAAEC,IAC1B,UAACN,EAAAA,SAAyB,EACxB,IAAKM,EACL,UAAWI,GAAAA,EAAAA,EAAAA,EAAG,2BAA4BF,GACzC,GAAGH,CAAK,GAGba,CAAAA,EAAgB,WAAW,CAAG,yB"}
|
|
1
|
+
{"version":3,"file":"components\\select.js","sources":["webpack://@gbmtech/aurora-ui/./src/components/select.tsx"],"sourcesContent":["\r\n\r\nimport { CaretDown, CaretUp, Check } from '@phosphor-icons/react'\r\nimport * as SelectPrimitive from '@radix-ui/react-select'\r\nimport { ComponentProps, JSX } from 'react'\r\n\r\nimport { VariantProps, cn } from '@/lib/utils'\r\nimport { buttonVariants } from './button'\r\n\r\n/* -----------------------------------------------------------------------------\r\n * Component: Select\r\n * -------------------------------------------------------------------------- */\r\n\r\nfunction Select({\r\n ...props\r\n}: ComponentProps<typeof SelectPrimitive.Root>): JSX.Element {\r\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />\r\n}\r\n\r\n/* -----------------------------------------------------------------------------\r\n * Component: SelectGroup\r\n * -------------------------------------------------------------------------- */\r\n\r\nfunction SelectGroup({\r\n ...props\r\n}: ComponentProps<typeof SelectPrimitive.Group>): JSX.Element {\r\n return <SelectPrimitive.Group data-slot=\"select-group\" {...props} />\r\n}\r\n\r\n/* -----------------------------------------------------------------------------\r\n * Component: SelectValue\r\n * -------------------------------------------------------------------------- */\r\n\r\nfunction SelectValue({\r\n ...props\r\n}: ComponentProps<typeof SelectPrimitive.Value>): JSX.Element {\r\n return <SelectPrimitive.Value data-slot=\"select-value\" {...props} />\r\n}\r\n\r\n/* -----------------------------------------------------------------------------\r\n * Component: SelectTrigger\r\n * -------------------------------------------------------------------------- */\r\n\r\nfunction SelectTrigger({\r\n children,\r\n className,\r\n size = 'md',\r\n ...props\r\n}: ComponentProps<typeof SelectPrimitive.Trigger> & {\r\n size?: VariantProps<typeof buttonVariants>['size']\r\n}): JSX.Element {\r\n return (\r\n <SelectPrimitive.Trigger\r\n className={buttonVariants({\r\n className: [\r\n \"w-fit justify-between px-3 font-normal focus:border-gbm-sky focus:ring-3 focus:ring-gbm-sky/50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 *:data-[slot=select-value]:truncate [&_svg:not([class*='text-'])]:text-gray-600\",\r\n className,\r\n ],\r\n size,\r\n variant: 'outline',\r\n })}\r\n data-size={size}\r\n data-slot=\"select-trigger\"\r\n {...props}\r\n >\r\n {children}\r\n <SelectPrimitive.Icon asChild className=\"size-4 shrink-0 opacity-50\">\r\n <CaretDown />\r\n </SelectPrimitive.Icon>\r\n </SelectPrimitive.Trigger>\r\n )\r\n}\r\n\r\n/* -----------------------------------------------------------------------------\r\n * Component: SelectScrollUpButton\r\n * -------------------------------------------------------------------------- */\r\n\r\nfunction SelectScrollUpButton({\r\n className,\r\n ...props\r\n}: ComponentProps<typeof SelectPrimitive.ScrollUpButton>): JSX.Element {\r\n return (\r\n <SelectPrimitive.ScrollUpButton\r\n className={cn(\r\n 'flex items-center justify-center py-1 text-gray-600',\r\n className\r\n )}\r\n data-slot=\"select-scroll-up-button\"\r\n {...props}\r\n >\r\n <CaretUp size={16} />\r\n </SelectPrimitive.ScrollUpButton>\r\n )\r\n}\r\n\r\n/* -----------------------------------------------------------------------------\r\n * Component: SelectScrollDownButton\r\n * -------------------------------------------------------------------------- */\r\n\r\nfunction SelectScrollDownButton({\r\n className,\r\n ...props\r\n}: ComponentProps<typeof SelectPrimitive.ScrollDownButton>): JSX.Element {\r\n return (\r\n <SelectPrimitive.ScrollDownButton\r\n className={cn(\r\n 'flex items-center justify-center py-1 text-gray-600',\r\n className\r\n )}\r\n data-slot=\"select-scroll-down-button\"\r\n {...props}\r\n >\r\n <CaretDown size={16} />\r\n </SelectPrimitive.ScrollDownButton>\r\n )\r\n}\r\n\r\n/* -----------------------------------------------------------------------------\r\n * Component: SelectContent\r\n * -------------------------------------------------------------------------- */\r\n\r\nfunction SelectContent({\r\n children,\r\n className,\r\n position = 'popper',\r\n ...props\r\n}: ComponentProps<typeof SelectPrimitive.Content>): JSX.Element {\r\n return (\r\n <SelectPrimitive.Portal>\r\n <SelectPrimitive.Content\r\n className={cn(\r\n 'data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 relative z-50 max-h-96 min-w-32 overflow-hidden rounded-lg border bg-background text-gbm-dark shadow-lg data-[state=closed]:animate-out data-[state=open]:animate-in',\r\n position === 'popper' &&\r\n 'data-[side=left]:-translate-x-1 data-[side=top]:-translate-y-1 data-[side=right]:translate-x-1 data-[side=bottom]:translate-y-1',\r\n className\r\n )}\r\n data-slot=\"select-content\"\r\n position={position}\r\n {...props}\r\n >\r\n <SelectScrollUpButton />\r\n <SelectPrimitive.Viewport\r\n className={cn(\r\n 'p-1',\r\n position === 'popper' &&\r\n 'h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)'\r\n )}\r\n >\r\n {children}\r\n </SelectPrimitive.Viewport>\r\n <SelectScrollDownButton />\r\n </SelectPrimitive.Content>\r\n </SelectPrimitive.Portal>\r\n )\r\n}\r\n\r\n/* -----------------------------------------------------------------------------\r\n * Component: SelectLabel\r\n * -------------------------------------------------------------------------- */\r\n\r\nfunction SelectLabel({\r\n className,\r\n ...props\r\n}: ComponentProps<typeof SelectPrimitive.Label>): JSX.Element {\r\n return (\r\n <SelectPrimitive.Label\r\n className={cn(\r\n 'flex items-center gap-x-2 px-2 py-1.5 font-semibold text-sm',\r\n className\r\n )}\r\n data-slot=\"select-label\"\r\n {...props}\r\n />\r\n )\r\n}\r\n\r\n/* -----------------------------------------------------------------------------\r\n * Component: SelectItem\r\n * -------------------------------------------------------------------------- */\r\n\r\nfunction SelectItem({\r\n children,\r\n className,\r\n ...props\r\n}: ComponentProps<typeof SelectPrimitive.Item>): JSX.Element {\r\n return (\r\n <SelectPrimitive.Item\r\n className={cn(\r\n \"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden focus:bg-gray-100 focus:text-gbm-black aria-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:[&_svg:not([class*='text-'])]:text-destructive/80 [&_svg]:shrink-0 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2\",\r\n className\r\n )}\r\n data-slot=\"select-item\"\r\n {...props}\r\n >\r\n <span className=\"absolute right-2 flex items-center justify-center\">\r\n <SelectPrimitive.ItemIndicator>\r\n <Check className=\"size-4\" />\r\n </SelectPrimitive.ItemIndicator>\r\n </span>\r\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\r\n </SelectPrimitive.Item>\r\n )\r\n}\r\n\r\n/* -----------------------------------------------------------------------------\r\n * Component: SelectSeparator\r\n * -------------------------------------------------------------------------- */\r\n\r\nfunction SelectSeparator({\r\n className,\r\n ...props\r\n}: ComponentProps<typeof SelectPrimitive.Separator>): JSX.Element {\r\n return (\r\n <SelectPrimitive.Separator\r\n className={cn('mx-2 my-1 h-px bg-stroke', className)}\r\n data-slot=\"select-separator\"\r\n {...props}\r\n />\r\n )\r\n}\r\n\r\n/* -----------------------------------------------------------------------------\r\n * Exports\r\n * -------------------------------------------------------------------------- */\r\n\r\nexport {\r\n Select,\r\n SelectGroup,\r\n SelectValue,\r\n SelectTrigger,\r\n SelectContent,\r\n SelectLabel,\r\n SelectItem,\r\n SelectSeparator,\r\n}\r\n"],"names":["Select","props","SelectPrimitive","SelectGroup","SelectValue","SelectTrigger","children","className","size","buttonVariants","CaretDown","SelectScrollUpButton","cn","CaretUp","SelectScrollDownButton","SelectContent","position","SelectLabel","SelectItem","Check","SelectSeparator"],"mappings":";qLAaA,SAASA,EAAO,CACd,GAAGC,EACyC,EAC5C,MAAO,UAACC,EAAAA,IAAoB,EAAC,YAAU,SAAU,GAAGD,CAAK,EAC3D,CAMA,SAASE,EAAY,CACnB,GAAGF,EAC0C,EAC7C,MAAO,UAACC,EAAAA,KAAqB,EAAC,YAAU,eAAgB,GAAGD,CAAK,EAClE,CAMA,SAASG,EAAY,CACnB,GAAGH,EAC0C,EAC7C,MAAO,UAACC,EAAAA,KAAqB,EAAC,YAAU,eAAgB,GAAGD,CAAK,EAClE,CAMA,SAASI,EAAc,CACrBC,SAAAA,CAAQ,CACRC,UA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AMA,SAASG,EAAY,CACnBV,UAAAA,CAAS,CACT,GAAGN,EAC0C,EAC7C,MACE,UAACC,EAAAA,KAAqB,EACpB,UAAWU,GAAAA,EAAAA,EAAAA,EACT,8DACAL,GAEF,YAAU,eACT,GAAGN,CAAK,EAGf,CAMA,SAASiB,EAAW,CAClBZ,SAAAA,CAAQ,CACRC,UAAAA,CAAS,CACT,GAAGN,EACyC,EAC5C,MACE,WAACC,EAAAA,IAAoB,EACnB,UAAWU,GAAAA,EAAAA,EAAAA,EACT,2aACAL,GAEF,YAAU,cACT,GAAGN,CAAK,C,UAET,UAAC,QAAK,UAAU,oD,SACd,UAACC,EAAAA,aAA6B,E,SAC5B,UAACiB,EAAAA,KAAKA,CAAAA,CAAC,UAAU,Q,OAGrB,UAACjB,EAAAA,QAAwB,E,SAAEI,C,KAGjC,CAMA,SAASc,EAAgB,CACvBb,UAAAA,CAAS,CACT,GAAGN,EAC8C,EACjD,MACE,UAACC,EAAAA,SAAyB,EACxB,UAAWU,GAAAA,EAAAA,EAAAA,EAAG,2BAA4BL,GAC1C,YAAU,mBACT,GAAGN,CAAK,EAGf,Q"}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
declare
|
|
6
|
-
declare
|
|
7
|
-
declare
|
|
8
|
-
declare
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
import { ComponentProps, JSX } from 'react';
|
|
3
|
+
import { VariantProps } from '../lib/utils';
|
|
4
|
+
import { buttonVariants } from './button';
|
|
5
|
+
declare function Select({ ...props }: ComponentProps<typeof SelectPrimitive.Root>): JSX.Element;
|
|
6
|
+
declare function SelectGroup({ ...props }: ComponentProps<typeof SelectPrimitive.Group>): JSX.Element;
|
|
7
|
+
declare function SelectValue({ ...props }: ComponentProps<typeof SelectPrimitive.Value>): JSX.Element;
|
|
8
|
+
declare function SelectTrigger({ children, className, size, ...props }: ComponentProps<typeof SelectPrimitive.Trigger> & {
|
|
9
|
+
size?: VariantProps<typeof buttonVariants>['size'];
|
|
10
|
+
}): JSX.Element;
|
|
11
|
+
declare function SelectContent({ children, className, position, ...props }: ComponentProps<typeof SelectPrimitive.Content>): JSX.Element;
|
|
12
|
+
declare function SelectLabel({ className, ...props }: ComponentProps<typeof SelectPrimitive.Label>): JSX.Element;
|
|
13
|
+
declare function SelectItem({ children, className, ...props }: ComponentProps<typeof SelectPrimitive.Item>): JSX.Element;
|
|
14
|
+
declare function SelectSeparator({ className, ...props }: ComponentProps<typeof SelectPrimitive.Separator>): JSX.Element;
|
|
11
15
|
export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, };
|
|
12
16
|
//# sourceMappingURL=select.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../src/components/select.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../src/components/select.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAA;AACzD,OAAO,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAE3C,OAAO,EAAE,YAAY,EAAM,MAAM,aAAa,CAAA;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAMzC,iBAAS,MAAM,CAAC,EACd,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,OAAO,CAE3D;AAMD,iBAAS,WAAW,CAAC,EACnB,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,OAAO,CAE5D;AAMD,iBAAS,WAAW,CAAC,EACnB,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,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