@stackshift-ui/select 6.0.3 → 6.0.4-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.
- package/dist/chunk-VCJRWWZ5.mjs +1 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/select.js +1 -1
- package/dist/select.mjs +1 -1
- package/package.json +3 -3
- package/src/select.tsx +3 -2
- package/dist/chunk-XT3L3TD2.mjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
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};
|
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})},
|
|
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});
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";import{a as e}from"./chunk-
|
|
2
|
+
"use strict";import{a as e}from"./chunk-VCJRWWZ5.mjs";export{e as Select};
|
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
|
|
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});
|
package/dist/select.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-VCJRWWZ5.mjs";export{a as Select};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackshift-ui/select",
|
|
3
3
|
"description": "",
|
|
4
|
-
"version": "6.0.
|
|
4
|
+
"version": "6.0.4-beta.1",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"classnames": "^2.5.1",
|
|
37
|
-
"@stackshift-ui/
|
|
38
|
-
"@stackshift-ui/
|
|
37
|
+
"@stackshift-ui/scripts": "6.0.2",
|
|
38
|
+
"@stackshift-ui/system": "6.0.3"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"@types/react": "16.8 - 19",
|
package/src/select.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DefaultComponent, useStackShiftUIComponents } from "@stackshift-ui/system";
|
|
2
|
-
import type { ElementType, HTMLProps, ReactNode } from "react";
|
|
3
2
|
import cn from "classnames";
|
|
3
|
+
import type { ElementType, HTMLProps, ReactNode } from "react";
|
|
4
4
|
|
|
5
5
|
type StyleVariants<T extends string> = Record<T, string>;
|
|
6
6
|
type Variant = "primary" | "outline";
|
|
@@ -42,7 +42,8 @@ export const Select: React.FC<SelectProps> = ({
|
|
|
42
42
|
}) => {
|
|
43
43
|
const { [displayName]: Component = DefaultComponent } = useStackShiftUIComponents();
|
|
44
44
|
|
|
45
|
-
const commonStyle =
|
|
45
|
+
const commonStyle =
|
|
46
|
+
"w-full rounded-global bg-white p-4 text-xs font-semibold leading-none outline-none";
|
|
46
47
|
const primary = `${commonStyle}`;
|
|
47
48
|
const outline = `${commonStyle} border border-solid border-primary-foreground`;
|
|
48
49
|
|
package/dist/chunk-XT3L3TD2.mjs
DELETED
|
@@ -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:y=!1,name:e,items:t,ariaLabel:P,noLabel:g=!1,children:R,className:u,as:b="select",...f})=>{var s;let{[r]:S=N}=T(),o="w-full rounded 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:[!g&&n("label",{htmlFor:e,className:p,children:m||e}),n(S,{onChange:d,name:e,defaultValue:i,required:y,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};
|