@stackshift-ui/checkbox 6.0.5 → 6.0.7

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,17 @@
1
+ import type { ElementType, HTMLProps } from "react";
2
+ export type StyleVariants<T extends string> = Record<T, string>;
3
+ type Variant = "primary";
4
+ export interface CheckboxProps extends Omit<HTMLProps<HTMLInputElement>, "as"> {
5
+ required?: boolean;
6
+ name?: string;
7
+ ariaLabel?: string;
8
+ label?: string;
9
+ labelClass?: string;
10
+ item?: string;
11
+ variant?: Variant;
12
+ onChange?: () => void;
13
+ className?: string;
14
+ as?: ElementType;
15
+ }
16
+ export declare const Checkbox: React.FC<CheckboxProps>;
17
+ export {};
@@ -0,0 +1 @@
1
+ "use strict";var k=Object.create;var o=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var L=Object.getOwnPropertyNames;var S=Object.getPrototypeOf,N=Object.prototype.hasOwnProperty;var V=(e,a)=>{for(var t in a)o(e,t,{get:a[t],enumerable:!0})},b=(e,a,t,s)=>{if(a&&typeof a=="object"||typeof a=="function")for(let n of L(a))!N.call(e,n)&&n!==t&&o(e,n,{get:()=>a[n],enumerable:!(s=v(a,n))||s.enumerable});return e};var P=(e,a,t)=>(t=e!=null?k(S(e)):{},b(a||!e||!e.__esModule?o(t,"default",{value:e,enumerable:!0}):t,e)),E=e=>b(o({},"__esModule",{value:!0}),e);var H={};V(H,{Checkbox:()=>d});module.exports=E(H);var l=require("@stackshift-ui/system"),m=P(require("classnames")),i=require("react/jsx-runtime"),p="Checkbox",d=({required:e=!1,name:a,ariaLabel:t,label:s,labelClass:n,item:r,variant:g="primary",onChange:f,className:x,as:h="label",...c})=>{var C;let{[p]:u=l.DefaultComponent}=(0,l.useStackShiftUIComponents)(),y="",T=(C={primary:y}[g])!=null?C:y;return(0,i.jsxs)(u,{as:h,htmlFor:r,className:(0,m.default)("flex gap-2 items-center",n),...c,"data-testid":p,children:[(0,i.jsx)("input",{"aria-label":t||a,className:(0,m.default)(T,x),name:a,type:"checkbox",value:r,required:e,onChange:f,id:r,...c}),s||r]})};d.displayName=p;0&&(module.exports={Checkbox});
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-3O2SYB7X.mjs";export{a as Checkbox};
@@ -0,0 +1 @@
1
+ import{DefaultComponent as f,useStackShiftUIComponents as x}from"@stackshift-ui/system";import o from"classnames";import{jsx as u,jsxs as T}from"react/jsx-runtime";var a="Checkbox",h=({required:l=!1,name:t,ariaLabel:i,label:m,labelClass:p,item:e,variant:c="primary",onChange:y,className:C,as:b="label",...n})=>{var r;let{[a]:d=f}=x(),s="",g=(r={primary:s}[c])!=null?r:s;return T(d,{as:b,htmlFor:e,className:o("flex gap-2 items-center",p),...n,"data-testid":a,children:[u("input",{"aria-label":i||t,className:o(g,C),name:t,type:"checkbox",value:e,required:l,onChange:y,id:e,...n}),m||e]})};h.displayName=a;export{h as a};
@@ -0,0 +1 @@
1
+ export * from "./checkbox";
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ "use strict";var k=Object.create;var o=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var L=Object.getOwnPropertyNames;var S=Object.getPrototypeOf,N=Object.prototype.hasOwnProperty;var V=(e,a)=>{for(var t in a)o(e,t,{get:a[t],enumerable:!0})},b=(e,a,t,s)=>{if(a&&typeof a=="object"||typeof a=="function")for(let n of L(a))!N.call(e,n)&&n!==t&&o(e,n,{get:()=>a[n],enumerable:!(s=v(a,n))||s.enumerable});return e};var P=(e,a,t)=>(t=e!=null?k(S(e)):{},b(a||!e||!e.__esModule?o(t,"default",{value:e,enumerable:!0}):t,e)),E=e=>b(o({},"__esModule",{value:!0}),e);var H={};V(H,{Checkbox:()=>d});module.exports=E(H);var l=require("@stackshift-ui/system"),m=P(require("classnames")),i=require("react/jsx-runtime"),p="Checkbox",d=({required:e=!1,name:a,ariaLabel:t,label:s,labelClass:n,item:r,variant:f="primary",onChange:g,className:x,as:u="label",...c})=>{var C;let{[p]:h=l.DefaultComponent}=(0,l.useStackShiftUIComponents)(),y="",T=(C={primary:y}[f])!=null?C:y;return(0,i.jsxs)(h,{as:u,htmlFor:r,className:(0,m.default)("flex gap-2 items-center",n),...c,"data-testid":p,children:[(0,i.jsx)("input",{"aria-label":t||a,className:(0,m.default)(T,x),name:a,type:"checkbox",value:r,required:e,onChange:g,id:r,...c}),s||r]})};d.displayName=p;0&&(module.exports={Checkbox});
package/dist/index.mjs ADDED
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ "use strict";import{a as e}from"./chunk-3O2SYB7X.mjs";export{e as Checkbox};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stackshift-ui/checkbox",
3
3
  "description": "",
4
- "version": "6.0.5",
4
+ "version": "6.0.7",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "main": "./dist/index.js",
@@ -29,20 +29,20 @@
29
29
  "typescript": "^5.6.2",
30
30
  "vite-tsconfig-paths": "^5.0.1",
31
31
  "vitest": "^2.1.1",
32
- "@stackshift-ui/typescript-config": "6.0.4",
33
- "@stackshift-ui/eslint-config": "6.0.4"
32
+ "@stackshift-ui/eslint-config": "6.0.6",
33
+ "@stackshift-ui/typescript-config": "6.0.6"
34
34
  },
35
35
  "dependencies": {
36
36
  "classnames": "^2.5.1",
37
- "@stackshift-ui/system": "6.0.5",
38
- "@stackshift-ui/scripts": "6.0.4"
37
+ "@stackshift-ui/scripts": "6.0.6",
38
+ "@stackshift-ui/system": "6.0.7"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "@types/react": "16.8 - 19",
42
42
  "next": "10 - 14",
43
43
  "react": "16.8 - 19",
44
44
  "react-dom": "16.8 - 19",
45
- "@stackshift-ui/system": ">=6.0.5"
45
+ "@stackshift-ui/system": ">=6.0.7"
46
46
  },
47
47
  "peerDependenciesMeta": {
48
48
  "next": {