UNPKG

@szum-tech/design-system

Version:

Szum-Tech design system with tailwindcss support

1 lines 7.19 kB
'use strict';var chunkOZOU5VIJ_cjs=require('./chunk-OZOU5VIJ.cjs'),chunkVJOV24EO_cjs=require('./chunk-VJOV24EO.cjs'),chunkD5PAWOAZ_cjs=require('./chunk-D5PAWOAZ.cjs'),P=require('react'),react=require('@base-ui/react'),jsxRuntime=require('react/jsx-runtime'),lucideReact=require('lucide-react');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var P__namespace=/*#__PURE__*/_interopNamespace(P);var ro=react.Combobox.Root;function eo(){return P__namespace.useRef(null)}function po({...o}){return jsxRuntime.jsx(react.Combobox.Value,{"data-slot":"combobox-value",...o})}function g({className:o,children:r,...e}){return jsxRuntime.jsxs(react.Combobox.Trigger,{"data-slot":"combobox-trigger",className:chunkD5PAWOAZ_cjs.a("[&_svg:not([class*='size-'])]:size-4",o),...e,children:[r,jsxRuntime.jsx(lucideReact.ChevronDownIcon,{className:"text-muted-foreground pointer-events-none size-4"})]})}function h({className:o,...r}){return jsxRuntime.jsx(react.Combobox.Clear,{"data-slot":"combobox-clear",render:jsxRuntime.jsx(chunkOZOU5VIJ_cjs.c,{variant:"ghost",size:"icon-xs"}),className:chunkD5PAWOAZ_cjs.a(o),...r,children:jsxRuntime.jsx(lucideReact.XIcon,{className:"pointer-events-none"})})}function Go({className:o,children:r,disabled:e=false,showTrigger:i=true,showClear:b=false,...p}){return jsxRuntime.jsxs(chunkOZOU5VIJ_cjs.a,{className:chunkD5PAWOAZ_cjs.a("w-auto",o),children:[jsxRuntime.jsx(react.Combobox.Input,{render:jsxRuntime.jsx(chunkOZOU5VIJ_cjs.d,{disabled:e}),...p}),jsxRuntime.jsxs(chunkOZOU5VIJ_cjs.b,{align:"inline-end",children:[i&&jsxRuntime.jsx(chunkOZOU5VIJ_cjs.c,{size:"icon-xs",variant:"ghost",asChild:true,"data-slot":"input-group-button",className:"group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent",disabled:e,children:jsxRuntime.jsx(g,{})}),b&&jsxRuntime.jsx(h,{disabled:e})]}),r]})}function ko({className:o,side:r="bottom",sideOffset:e=6,align:i="start",alignOffset:b=0,anchor:p,...w}){return jsxRuntime.jsx(react.Combobox.Portal,{children:jsxRuntime.jsx(react.Combobox.Positioner,{side:r,sideOffset:e,align:i,alignOffset:b,anchor:p,className:"isolate z-50",children:jsxRuntime.jsx(react.Combobox.Popup,{"data-slot":"combobox-content","data-chips":!!p,className:chunkD5PAWOAZ_cjs.a("group/combobox-content bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded shadow-md ring-1 duration-100 data-[chips=true]:min-w-(--anchor-width) *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:shadow-none",o),...w})})})}function Oo({className:o,...r}){return jsxRuntime.jsx(react.Combobox.List,{"data-slot":"combobox-list",className:chunkD5PAWOAZ_cjs.a("no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto overscroll-contain p-1 data-empty:p-0",o),...r})}function Mo({className:o,children:r,...e}){return jsxRuntime.jsxs(react.Combobox.Item,{"data-slot":"combobox-item",className:chunkD5PAWOAZ_cjs.a("data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground relative flex w-full cursor-default items-center gap-2 rounded py-1 pr-8 pl-1.5 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),...e,children:[r,jsxRuntime.jsx(react.Combobox.ItemIndicator,{render:jsxRuntime.jsx("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center"}),children:jsxRuntime.jsx(lucideReact.CheckIcon,{className:"pointer-events-none"})})]})}function Ko({className:o,...r}){return jsxRuntime.jsx(react.Combobox.Group,{"data-slot":"combobox-group",className:chunkD5PAWOAZ_cjs.a(o),...r})}function $o({className:o,...r}){return jsxRuntime.jsx(react.Combobox.GroupLabel,{"data-slot":"combobox-label",className:chunkD5PAWOAZ_cjs.a("text-muted-foreground px-2 py-1.5 text-xs",o),...r})}function rt({...o}){return jsxRuntime.jsx(react.Combobox.Collection,{"data-slot":"combobox-collection",...o})}function at({className:o,...r}){return jsxRuntime.jsx(react.Combobox.Empty,{"data-slot":"combobox-empty",className:chunkD5PAWOAZ_cjs.a("text-muted-foreground hidden w-full justify-center py-2 text-center text-sm group-data-empty/combobox-content:flex",o),...r})}function lt({className:o,...r}){return jsxRuntime.jsx(react.Combobox.Separator,{"data-slot":"combobox-separator",className:chunkD5PAWOAZ_cjs.a("bg-border -mx-1 my-1 h-px",o),...r})}function ft({className:o,...r}){return jsxRuntime.jsx(react.Combobox.Chips,{"data-slot":"combobox-chips",className:chunkD5PAWOAZ_cjs.a("border-input focus-within:border-ring focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:ring-destructive/20 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40 flex min-h-8 flex-wrap items-center gap-1 rounded border bg-transparent bg-clip-padding px-2.5 py-1 text-sm transition-colors focus-within:ring-3 has-aria-invalid:ring-3 has-data-[slot=combobox-chip]:px-1",o),...r})}function wt({className:o,children:r,showRemove:e=true,...i}){return jsxRuntime.jsxs(react.Combobox.Chip,{"data-slot":"combobox-chip",className:chunkD5PAWOAZ_cjs.a("bg-muted text-foreground flex h-[calc(--spacing(5.25))] w-fit items-center justify-center gap-1 rounded px-1.5 text-xs font-medium whitespace-nowrap has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pr-0",o),...i,children:[r,e&&jsxRuntime.jsx(react.Combobox.ChipRemove,{render:jsxRuntime.jsx(chunkVJOV24EO_cjs.a,{variant:"ghost",size:"icon-xs"}),className:"-ml-1 opacity-50 hover:opacity-100","data-slot":"combobox-chip-remove",children:jsxRuntime.jsx(lucideReact.XIcon,{className:"pointer-events-none"})})]})}function Lt({className:o,...r}){return jsxRuntime.jsx(react.Combobox.Input,{"data-slot":"combobox-chip-input",className:chunkD5PAWOAZ_cjs.a("min-w-16 flex-1 outline-none",o),...r})}exports.a=ro;exports.b=eo;exports.c=po;exports.d=g;exports.e=h;exports.f=Go;exports.g=ko;exports.h=Oo;exports.i=Mo;exports.j=Ko;exports.k=$o;exports.l=rt;exports.m=at;exports.n=lt;exports.o=ft;exports.p=wt;exports.q=Lt;