@stackshift-ui/select 7.0.0-beta.0 → 7.0.0-beta.1

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.
@@ -0,0 +1 @@
1
+ import*as e from"@radix-ui/react-select";import{Check as x,ChevronDown as f,ChevronUp as I}from"lucide-react";import*as n from"react";import{cn as l,DefaultComponent as c,useStackShiftUIComponents as s}from"@stackshift-ui/system";import{jsx as i,jsxs as p}from"react/jsx-runtime";var d="Select",u="SelectTrigger",S="SelectValue",R="SelectContent",y="SelectItem",P="SelectGroup",v="SelectLabel",g="SelectSeparator",C="SelectScrollUpButton",h="SelectScrollDownButton",B=n.forwardRef(({...o},a)=>{let{[d]:t=c}=s();return i(t,{as:e.Root,ref:a,...o})});B.displayName=d;var E=n.forwardRef(({className:o,...a},t)=>{let{[P]:r=c}=s();return i(r,{as:e.Group,ref:t,className:l("p-1",o),...a})});E.displayName=P;var W=n.forwardRef(({className:o,...a},t)=>{let{[S]:r=c}=s();return i(r,{as:e.Value,ref:t,className:l("text-sm outline-none",o),...a})});W.displayName=S;var D=n.forwardRef(({className:o,children:a,...t},r)=>{let{[u]:m=c}=s();return p(m,{as:e.Trigger,ref:r,className:l("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",o),...t,children:[a,i(e.Icon,{asChild:!0,children:i(f,{className:"h-4 w-4 opacity-50"})})]})});D.displayName=u;var w=n.forwardRef(({className:o,...a},t)=>{let{[C]:r=c}=s();return i(r,{as:e.ScrollUpButton,ref:t,className:l("flex cursor-default items-center justify-center py-1",o),...a,children:i(I,{className:"h-4 w-4"})})});w.displayName=C;var N=n.forwardRef(({className:o,...a},t)=>{let{[h]:r=c}=s();return i(r,{as:e.ScrollDownButton,ref:t,className:l("flex cursor-default items-center justify-center py-1",o),...a,children:i(f,{className:"h-4 w-4"})})});N.displayName=h;var T=n.forwardRef(({className:o,children:a,position:t="popper",...r},m)=>{let{[R]:b=c}=s();return i(e.Portal,{children:p(b,{as:e.Content,ref:m,className:l("relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-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 origin-[--radix-select-content-transform-origin]",t==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",o),position:t,...r,children:[i(w,{}),i(e.Viewport,{className:l("p-1",t==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:a}),i(N,{})]})})});T.displayName=R;var U=n.forwardRef(({className:o,...a},t)=>{let{[v]:r=c}=s();return i(r,{as:e.Label,ref:t,className:l("py-1.5 pl-8 pr-2 text-sm font-semibold",o),...a})});U.displayName=v;var V=n.forwardRef(({className:o,children:a,...t},r)=>{let{[y]:m=c}=s();return p(m,{as:e.Item,ref:r,className:l("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",o),...t,children:[i("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:i(e.ItemIndicator,{children:i(x,{className:"h-4 w-4"})})}),i(e.ItemText,{children:a})]})});V.displayName=y;var G=n.forwardRef(({className:o,...a},t)=>{let{[g]:r=c}=s();return i(r,{as:e.Separator,ref:t,className:l("-mx-1 my-1 h-px bg-muted",o),...a})});G.displayName=g;export{B as a,E as b,W as c,D as d,w as e,N as f,T as g,U as h,V as i,G as j};
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";var L=Object.create;var l=Object.defineProperty;var P=Object.getOwnPropertyDescriptor;var R=Object.getOwnPropertyNames;var k=Object.getPrototypeOf,E=Object.prototype.hasOwnProperty;var H=(e,t)=>{for(var a in t)l(e,a,{get:t[a],enumerable:!0})},y=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of R(t))!E.call(e,r)&&r!==a&&l(e,r,{get:()=>t[r],enumerable:!(o=P(t,r))||o.enumerable});return e};var M=(e,t,a)=>(a=e!=null?L(k(e)):{},y(t||!e||!e.__esModule?l(a,"default",{value:e,enumerable:!0}):a,e)),q=e=>y(l({},"__esModule",{value:!0}),e);var w={};H(w,{Select:()=>f});module.exports=q(w);var s=require("@stackshift-ui/system"),b=M(require("classnames")),n=require("react/jsx-runtime"),p="Select",f=({defaultValue:e,variant:t="primary",label:a,labelClass:o,onChange:r,required:S=!1,name:i,items:c,ariaLabel:F,noLabel:C=!1,children:$,className:h,as:N="select",...T})=>{var u;let{[p]:V=s.DefaultComponent}=(0,s.useStackShiftUIComponents)(),d="w-full rounded-global bg-white p-4 text-xs font-semibold leading-none outline-none",g=`${d}`,v=`${d} border border-solid border-primary-foreground`,x=(u={primary:g,outline:v}[t])!=null?u:g;return(0,n.jsxs)(n.Fragment,{children:[!C&&(0,n.jsx)("label",{htmlFor:i,className:o,children:a||i}),(0,n.jsx)(V,{onChange:r,name:i,defaultValue:e,required:S,as:N,className:(0,b.default)(x,h),...T,"data-testid":p,children:c&&c.length>0&&c.map(m=>(0,n.jsx)("option",{value:m,children:m},m))})]})};f.displayName=p;0&&(module.exports={Select});
2
+ "use strict";var V=Object.create;var m=Object.defineProperty;var G=Object.getOwnPropertyDescriptor;var L=Object.getOwnPropertyNames;var k=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty;var z=(e,o)=>{for(var a in o)m(e,a,{get:o[a],enumerable:!0})},d=(e,o,a,n)=>{if(o&&typeof o=="object"||typeof o=="function")for(let l of L(o))!j.call(e,l)&&l!==a&&m(e,l,{get:()=>o[l],enumerable:!(n=G(o,l))||n.enumerable});return e};var u=(e,o,a)=>(a=e!=null?V(k(e)):{},d(o||!e||!e.__esModule?m(a,"default",{value:e,enumerable:!0}):a,e)),q=e=>d(m({},"__esModule",{value:!0}),e);var A={};z(A,{Select:()=>x,SelectContent:()=>E,SelectGroup:()=>b,SelectItem:()=>D,SelectLabel:()=>W,SelectScrollDownButton:()=>f,SelectScrollUpButton:()=>p,SelectSeparator:()=>T,SelectTrigger:()=>B,SelectValue:()=>I});module.exports=q(A);var r=u(require("@radix-ui/react-select")),s=require("lucide-react"),c=u(require("react")),t=require("@stackshift-ui/system"),i=require("react/jsx-runtime"),S="Select",R="SelectTrigger",y="SelectValue",P="SelectContent",v="SelectItem",g="SelectGroup",C="SelectLabel",h="SelectSeparator",w="SelectScrollUpButton",N="SelectScrollDownButton",x=c.forwardRef(({...e},o)=>{let{[S]:a=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,i.jsx)(a,{as:r.Root,ref:o,...e})});x.displayName=S;var b=c.forwardRef(({className:e,...o},a)=>{let{[g]:n=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,i.jsx)(n,{as:r.Group,ref:a,className:(0,t.cn)("p-1",e),...o})});b.displayName=g;var I=c.forwardRef(({className:e,...o},a)=>{let{[y]:n=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,i.jsx)(n,{as:r.Value,ref:a,className:(0,t.cn)("text-sm outline-none",e),...o})});I.displayName=y;var B=c.forwardRef(({className:e,children:o,...a},n)=>{let{[R]:l=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,i.jsxs)(l,{as:r.Trigger,ref:n,className:(0,t.cn)("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...a,children:[o,(0,i.jsx)(r.Icon,{asChild:!0,children:(0,i.jsx)(s.ChevronDown,{className:"h-4 w-4 opacity-50"})})]})});B.displayName=R;var p=c.forwardRef(({className:e,...o},a)=>{let{[w]:n=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,i.jsx)(n,{as:r.ScrollUpButton,ref:a,className:(0,t.cn)("flex cursor-default items-center justify-center py-1",e),...o,children:(0,i.jsx)(s.ChevronUp,{className:"h-4 w-4"})})});p.displayName=w;var f=c.forwardRef(({className:e,...o},a)=>{let{[N]:n=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,i.jsx)(n,{as:r.ScrollDownButton,ref:a,className:(0,t.cn)("flex cursor-default items-center justify-center py-1",e),...o,children:(0,i.jsx)(s.ChevronDown,{className:"h-4 w-4"})})});f.displayName=N;var E=c.forwardRef(({className:e,children:o,position:a="popper",...n},l)=>{let{[P]:U=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,i.jsx)(r.Portal,{children:(0,i.jsxs)(U,{as:r.Content,ref:l,className:(0,t.cn)("relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-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 origin-[--radix-select-content-transform-origin]",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:a,...n,children:[(0,i.jsx)(p,{}),(0,i.jsx)(r.Viewport,{className:(0,t.cn)("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:o}),(0,i.jsx)(f,{})]})})});E.displayName=P;var W=c.forwardRef(({className:e,...o},a)=>{let{[C]:n=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,i.jsx)(n,{as:r.Label,ref:a,className:(0,t.cn)("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...o})});W.displayName=C;var D=c.forwardRef(({className:e,children:o,...a},n)=>{let{[v]:l=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,i.jsxs)(l,{as:r.Item,ref:n,className:(0,t.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",e),...a,children:[(0,i.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,i.jsx)(r.ItemIndicator,{children:(0,i.jsx)(s.Check,{className:"h-4 w-4"})})}),(0,i.jsx)(r.ItemText,{children:o})]})});D.displayName=v;var T=c.forwardRef(({className:e,...o},a)=>{let{[h]:n=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,i.jsx)(n,{as:r.Separator,ref:a,className:(0,t.cn)("-mx-1 my-1 h-px bg-muted",e),...o})});T.displayName=h;0&&(module.exports={Select,SelectContent,SelectGroup,SelectItem,SelectLabel,SelectScrollDownButton,SelectScrollUpButton,SelectSeparator,SelectTrigger,SelectValue});
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";import{a as e}from"./chunk-VCJRWWZ5.mjs";export{e as Select};
2
+ "use strict";import{a as e,b as o,c as r,d as t,e as c,f,g as i,h as l,i as m,j as n}from"./chunk-PPOLDV3F.mjs";export{e as Select,i as SelectContent,o as SelectGroup,m as SelectItem,l as SelectLabel,f as SelectScrollDownButton,c as SelectScrollUpButton,n as SelectSeparator,t as SelectTrigger,r as SelectValue};
package/dist/select.d.ts CHANGED
@@ -1,20 +1,15 @@
1
- import type { ElementType, HTMLProps, ReactNode } from "react";
2
- type Variant = "primary" | "outline";
3
- export interface SelectProps extends Omit<HTMLProps<HTMLSelectElement>, "as"> {
4
- defaultValue?: string;
5
- variant?: Variant;
6
- label?: string;
7
- labelClass?: string;
8
- onChange?: () => void;
9
- required?: boolean;
10
- name: string;
11
- items: string[];
12
- ariaLabel: string;
13
- noLabel?: boolean;
14
- [key: string]: any;
15
- children?: ReactNode;
16
- className?: string;
17
- as?: ElementType;
1
+ import * as SelectPrimitive from "@radix-ui/react-select";
2
+ import * as React from "react";
3
+ interface SelectProps extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.Root> {
18
4
  }
19
- export declare const Select: React.FC<SelectProps>;
20
- export {};
5
+ declare const Select: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<never>>;
6
+ declare const SelectGroup: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
7
+ declare const SelectValue: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
8
+ declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
9
+ declare const SelectScrollUpButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
10
+ declare const SelectScrollDownButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
11
+ declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
12
+ declare const SelectLabel: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
13
+ declare const SelectItem: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
14
+ declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
15
+ export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, };
package/dist/select.js CHANGED
@@ -1 +1 @@
1
- "use strict";var x=Object.create;var l=Object.defineProperty;var P=Object.getOwnPropertyDescriptor;var R=Object.getOwnPropertyNames;var k=Object.getPrototypeOf,E=Object.prototype.hasOwnProperty;var H=(e,t)=>{for(var a in t)l(e,a,{get:t[a],enumerable:!0})},u=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of R(t))!E.call(e,r)&&r!==a&&l(e,r,{get:()=>t[r],enumerable:!(o=P(t,r))||o.enumerable});return e};var M=(e,t,a)=>(a=e!=null?x(k(e)):{},u(t||!e||!e.__esModule?l(a,"default",{value:e,enumerable:!0}):a,e)),q=e=>u(l({},"__esModule",{value:!0}),e);var w={};H(w,{Select:()=>f});module.exports=q(w);var s=require("@stackshift-ui/system"),b=M(require("classnames")),n=require("react/jsx-runtime"),p="Select",f=({defaultValue:e,variant:t="primary",label:a,labelClass:o,onChange:r,required:S=!1,name:i,items:c,ariaLabel:F,noLabel:C=!1,children:$,className:h,as:N="select",...T})=>{var y;let{[p]:V=s.DefaultComponent}=(0,s.useStackShiftUIComponents)(),d="w-full rounded-global bg-white p-4 text-xs font-semibold leading-none outline-none",g=`${d}`,v=`${d} border border-solid border-primary-foreground`,L=(y={primary:g,outline:v}[t])!=null?y:g;return(0,n.jsxs)(n.Fragment,{children:[!C&&(0,n.jsx)("label",{htmlFor:i,className:o,children:a||i}),(0,n.jsx)(V,{onChange:r,name:i,defaultValue:e,required:S,as:N,className:(0,b.default)(L,h),...T,"data-testid":p,children:c&&c.length>0&&c.map(m=>(0,n.jsx)("option",{value:m,children:m},m))})]})};f.displayName=p;0&&(module.exports={Select});
1
+ "use strict";var V=Object.create;var m=Object.defineProperty;var G=Object.getOwnPropertyDescriptor;var L=Object.getOwnPropertyNames;var k=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty;var z=(e,o)=>{for(var a in o)m(e,a,{get:o[a],enumerable:!0})},d=(e,o,a,n)=>{if(o&&typeof o=="object"||typeof o=="function")for(let l of L(o))!j.call(e,l)&&l!==a&&m(e,l,{get:()=>o[l],enumerable:!(n=G(o,l))||n.enumerable});return e};var u=(e,o,a)=>(a=e!=null?V(k(e)):{},d(o||!e||!e.__esModule?m(a,"default",{value:e,enumerable:!0}):a,e)),q=e=>d(m({},"__esModule",{value:!0}),e);var A={};z(A,{Select:()=>b,SelectContent:()=>E,SelectGroup:()=>x,SelectItem:()=>D,SelectLabel:()=>W,SelectScrollDownButton:()=>f,SelectScrollUpButton:()=>p,SelectSeparator:()=>T,SelectTrigger:()=>B,SelectValue:()=>I});module.exports=q(A);var i=u(require("@radix-ui/react-select")),s=require("lucide-react"),c=u(require("react")),t=require("@stackshift-ui/system"),r=require("react/jsx-runtime"),S="Select",R="SelectTrigger",y="SelectValue",P="SelectContent",v="SelectItem",g="SelectGroup",C="SelectLabel",h="SelectSeparator",w="SelectScrollUpButton",N="SelectScrollDownButton",b=c.forwardRef(({...e},o)=>{let{[S]:a=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,r.jsx)(a,{as:i.Root,ref:o,...e})});b.displayName=S;var x=c.forwardRef(({className:e,...o},a)=>{let{[g]:n=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,r.jsx)(n,{as:i.Group,ref:a,className:(0,t.cn)("p-1",e),...o})});x.displayName=g;var I=c.forwardRef(({className:e,...o},a)=>{let{[y]:n=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,r.jsx)(n,{as:i.Value,ref:a,className:(0,t.cn)("text-sm outline-none",e),...o})});I.displayName=y;var B=c.forwardRef(({className:e,children:o,...a},n)=>{let{[R]:l=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,r.jsxs)(l,{as:i.Trigger,ref:n,className:(0,t.cn)("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...a,children:[o,(0,r.jsx)(i.Icon,{asChild:!0,children:(0,r.jsx)(s.ChevronDown,{className:"h-4 w-4 opacity-50"})})]})});B.displayName=R;var p=c.forwardRef(({className:e,...o},a)=>{let{[w]:n=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,r.jsx)(n,{as:i.ScrollUpButton,ref:a,className:(0,t.cn)("flex cursor-default items-center justify-center py-1",e),...o,children:(0,r.jsx)(s.ChevronUp,{className:"h-4 w-4"})})});p.displayName=w;var f=c.forwardRef(({className:e,...o},a)=>{let{[N]:n=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,r.jsx)(n,{as:i.ScrollDownButton,ref:a,className:(0,t.cn)("flex cursor-default items-center justify-center py-1",e),...o,children:(0,r.jsx)(s.ChevronDown,{className:"h-4 w-4"})})});f.displayName=N;var E=c.forwardRef(({className:e,children:o,position:a="popper",...n},l)=>{let{[P]:U=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,r.jsx)(i.Portal,{children:(0,r.jsxs)(U,{as:i.Content,ref:l,className:(0,t.cn)("relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-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 origin-[--radix-select-content-transform-origin]",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:a,...n,children:[(0,r.jsx)(p,{}),(0,r.jsx)(i.Viewport,{className:(0,t.cn)("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:o}),(0,r.jsx)(f,{})]})})});E.displayName=P;var W=c.forwardRef(({className:e,...o},a)=>{let{[C]:n=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,r.jsx)(n,{as:i.Label,ref:a,className:(0,t.cn)("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...o})});W.displayName=C;var D=c.forwardRef(({className:e,children:o,...a},n)=>{let{[v]:l=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,r.jsxs)(l,{as:i.Item,ref:n,className:(0,t.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",e),...a,children:[(0,r.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,r.jsx)(i.ItemIndicator,{children:(0,r.jsx)(s.Check,{className:"h-4 w-4"})})}),(0,r.jsx)(i.ItemText,{children:o})]})});D.displayName=v;var T=c.forwardRef(({className:e,...o},a)=>{let{[h]:n=t.DefaultComponent}=(0,t.useStackShiftUIComponents)();return(0,r.jsx)(n,{as:i.Separator,ref:a,className:(0,t.cn)("-mx-1 my-1 h-px bg-muted",e),...o})});T.displayName=h;0&&(module.exports={Select,SelectContent,SelectGroup,SelectItem,SelectLabel,SelectScrollDownButton,SelectScrollUpButton,SelectSeparator,SelectTrigger,SelectValue});
package/dist/select.mjs CHANGED
@@ -1 +1 @@
1
- import{a}from"./chunk-VCJRWWZ5.mjs";export{a as Select};
1
+ import{a,b,c,d,e,f,g,h,i,j}from"./chunk-PPOLDV3F.mjs";export{a as Select,g as SelectContent,b as SelectGroup,i as SelectItem,h as SelectLabel,f as SelectScrollDownButton,e as SelectScrollUpButton,j as SelectSeparator,d as SelectTrigger,c as SelectValue};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stackshift-ui/select",
3
3
  "description": "",
4
- "version": "7.0.0-beta.0",
4
+ "version": "7.0.0-beta.1",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "main": "./dist/index.js",
@@ -36,11 +36,11 @@
36
36
  "@radix-ui/react-select": "^2.2.5",
37
37
  "classnames": "^2.5.1",
38
38
  "lucide-react": "^0.468.0",
39
- "@stackshift-ui/system": "6.1.0-beta.0",
40
- "@stackshift-ui/scripts": "6.1.0-beta.0"
39
+ "@stackshift-ui/scripts": "6.1.0-beta.0",
40
+ "@stackshift-ui/system": "6.1.0-beta.1"
41
41
  },
42
42
  "peerDependencies": {
43
- "@stackshift-ui/system": ">=6.1.0-beta.0",
43
+ "@stackshift-ui/system": ">=6.1.0-beta.1",
44
44
  "@types/react": "16.8 - 19",
45
45
  "next": "10 - 14",
46
46
  "react": "16.8 - 19",
@@ -1 +0,0 @@
1
- import{DefaultComponent as N,useStackShiftUIComponents as T}from"@stackshift-ui/system";import V from"classnames";import{Fragment as L,jsx as n,jsxs as x}from"react/jsx-runtime";var r="Select",v=({defaultValue:i,variant:c="primary",label:m,labelClass:p,onChange:d,required:g=!1,name:e,items:t,ariaLabel:P,noLabel:y=!1,children:R,className:u,as:b="select",...f})=>{var s;let{[r]:S=N}=T(),o="w-full rounded-global bg-white p-4 text-xs font-semibold leading-none outline-none",l=`${o}`,C=`${o} border border-solid border-primary-foreground`,h=(s={primary:l,outline:C}[c])!=null?s:l;return x(L,{children:[!y&&n("label",{htmlFor:e,className:p,children:m||e}),n(S,{onChange:d,name:e,defaultValue:i,required:g,as:b,className:V(h,u),...f,"data-testid":r,children:t&&t.length>0&&t.map(a=>n("option",{value:a,children:a},a))})]})};v.displayName=r;export{v as a};