@stackshift-ui/checkbox-group 7.0.0-beta.3 → 7.0.0-beta.4
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/package.json +6 -6
- package/dist/checkbox-group.d.ts +0 -15
- package/dist/checkbox-group.js +0 -1
- package/dist/checkbox-group.mjs +0 -1
- package/dist/chunk-3EYN2AKU.mjs +0 -1
- package/dist/chunk-4O7QC542.mjs +0 -1
- package/dist/chunk-6DZX6EAA.mjs +0 -37
- package/dist/chunk-V62CKPYQ.mjs +0 -39
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -2
- package/dist/index.mjs +0 -2
- package/dist/setupTests.d.ts +0 -2
- package/dist/setupTests.js +0 -47
- package/dist/setupTests.mjs +0 -47
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackshift-ui/checkbox-group",
|
|
3
3
|
"description": "",
|
|
4
|
-
"version": "7.0.0-beta.
|
|
4
|
+
"version": "7.0.0-beta.4",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -31,16 +31,16 @@
|
|
|
31
31
|
"typescript": "^5.6.2",
|
|
32
32
|
"vite-tsconfig-paths": "^5.0.1",
|
|
33
33
|
"vitest": "^2.1.1",
|
|
34
|
-
"@stackshift-ui/
|
|
35
|
-
"@stackshift-ui/
|
|
34
|
+
"@stackshift-ui/eslint-config": "6.0.10",
|
|
35
|
+
"@stackshift-ui/typescript-config": "6.0.10"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"classnames": "^2.5.1",
|
|
39
|
-
"@stackshift-ui/scripts": "
|
|
40
|
-
"@stackshift-ui/system": "
|
|
39
|
+
"@stackshift-ui/scripts": "7.0.0-beta.3",
|
|
40
|
+
"@stackshift-ui/system": "7.0.0-beta.4"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"@stackshift-ui/system": ">=
|
|
43
|
+
"@stackshift-ui/system": ">=7.0.0-beta.4",
|
|
44
44
|
"@types/react": "16.8 - 19",
|
|
45
45
|
"next": "10 - 14",
|
|
46
46
|
"react": "16.8 - 19",
|
package/dist/checkbox-group.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { type ElementType, type HTMLProps, type ReactNode } from "react";
|
|
2
|
-
type Variant = "primary" | "inline";
|
|
3
|
-
export interface CheckboxGroupProps extends Omit<HTMLProps<HTMLElement>, "as"> {
|
|
4
|
-
variant?: Variant;
|
|
5
|
-
name?: string;
|
|
6
|
-
label?: string;
|
|
7
|
-
noLabel?: boolean;
|
|
8
|
-
labelClass?: string;
|
|
9
|
-
[key: string]: any;
|
|
10
|
-
children?: ReactNode;
|
|
11
|
-
className?: string;
|
|
12
|
-
as?: ElementType;
|
|
13
|
-
}
|
|
14
|
-
export declare const CheckboxGroup: import("react").ForwardRefExoticComponent<Omit<CheckboxGroupProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
15
|
-
export {};
|
package/dist/checkbox-group.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var V=Object.create;var r=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var G=Object.getOwnPropertyNames;var H=Object.getPrototypeOf,M=Object.prototype.hasOwnProperty;var P=(e,a)=>{for(var n in a)r(e,n,{get:a[n],enumerable:!0})},y=(e,a,n,o)=>{if(a&&typeof a=="object"||typeof a=="function")for(let t of G(a))!M.call(e,t)&&t!==n&&r(e,t,{get:()=>a[t],enumerable:!(o=E(a,t))||o.enumerable});return e};var R=(e,a,n)=>(n=e!=null?V(H(e)):{},y(a||!e||!e.__esModule?r(n,"default",{value:e,enumerable:!0}):n,e)),S=e=>y(r({},"__esModule",{value:!0}),e);var $={};P($,{CheckboxGroup:()=>d});module.exports=S($);var l=require("@stackshift-ui/system"),b=R(require("classnames")),i=require("react"),s=require("react/jsx-runtime"),C="CheckboxGroup",d=(0,i.forwardRef)((e,a)=>{var c;let{variant:n="primary",name:o,label:t,noLabel:f=!1,labelClass:g,children:x,className:N,as:T,...h}=e,{[C]:k=l.DefaultComponent}=(0,l.useStackShiftUIComponents)(),m="ml-2",p=`${m} block`,L=`${m} flex gap-4`,u=`mb-2 ${g}`,v=(c={primary:p,inline:L}[n])!=null?c:p;return(0,s.jsxs)(i.Fragment,{children:[!f&&(0,s.jsx)("p",{className:u,children:t||o}),(0,s.jsx)(k,{ref:a,as:T,className:(0,b.default)(v,N),...h,children:x})]})});d.displayName=C;0&&(module.exports={CheckboxGroup});
|
package/dist/checkbox-group.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-4O7QC542.mjs";import"./chunk-3EYN2AKU.mjs";export{a as CheckboxGroup};
|
package/dist/chunk-3EYN2AKU.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var g=Object.create;var f=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var m=(a=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(a,{get:(b,c)=>(typeof require!="undefined"?require:b)[c]}):a)(function(a){if(typeof require!="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var n=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports);var l=(a,b,c,e)=>{if(b&&typeof b=="object"||typeof b=="function")for(let d of i(b))!k.call(a,d)&&d!==c&&f(a,d,{get:()=>b[d],enumerable:!(e=h(b,d))||e.enumerable});return a};var o=(a,b,c)=>(c=a!=null?g(j(a)):{},l(b||!a||!a.__esModule?f(c,"default",{value:a,enumerable:!0}):c,a));export{m as a,n as b,o as c};
|
package/dist/chunk-4O7QC542.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{DefaultComponent as T,useStackShiftUIComponents as h}from"@stackshift-ui/system";import k from"classnames";import{forwardRef as L,Fragment as u}from"react";import{jsx as t,jsxs as V}from"react/jsx-runtime";var s="CheckboxGroup",v=L((o,r)=>{var n;let{variant:l="primary",name:i,label:m,noLabel:p=!1,labelClass:c,children:y,className:b,as:C,...d}=o,{[s]:f=T}=h(),e="ml-2",a=`${e} block`,g=`${e} flex gap-4`,x=`mb-2 ${c}`,N=(n={primary:a,inline:g}[l])!=null?n:a;return V(u,{children:[!p&&t("p",{className:x,children:m||i}),t(f,{ref:r,as:C,className:k(N,b),...d,children:y})]})});v.displayName=s;export{v as a};
|
package/dist/chunk-6DZX6EAA.mjs
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
8
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
9
|
-
}) : x)(function(x) {
|
|
10
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
11
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
12
|
-
});
|
|
13
|
-
var __commonJS = (cb, mod) => function __require2() {
|
|
14
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
15
|
-
};
|
|
16
|
-
var __copyProps = (to, from, except, desc) => {
|
|
17
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
18
|
-
for (let key of __getOwnPropNames(from))
|
|
19
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
20
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
21
|
-
}
|
|
22
|
-
return to;
|
|
23
|
-
};
|
|
24
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
25
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
26
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
27
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
28
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
29
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
30
|
-
mod
|
|
31
|
-
));
|
|
32
|
-
|
|
33
|
-
export {
|
|
34
|
-
__require,
|
|
35
|
-
__commonJS,
|
|
36
|
-
__toESM
|
|
37
|
-
};
|
package/dist/chunk-V62CKPYQ.mjs
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
// src/checkbox-group.tsx
|
|
2
|
-
import { DefaultComponent, useStackShiftUIComponents } from "@stackshift-ui/system";
|
|
3
|
-
import cn from "classnames";
|
|
4
|
-
import { forwardRef, Fragment } from "react";
|
|
5
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
var displayName = "CheckboxGroup";
|
|
7
|
-
var CheckboxGroup = forwardRef((props, ref) => {
|
|
8
|
-
var _a;
|
|
9
|
-
const {
|
|
10
|
-
variant = "primary",
|
|
11
|
-
name,
|
|
12
|
-
label,
|
|
13
|
-
noLabel = false,
|
|
14
|
-
labelClass,
|
|
15
|
-
children,
|
|
16
|
-
className,
|
|
17
|
-
as,
|
|
18
|
-
...rest
|
|
19
|
-
} = props;
|
|
20
|
-
const { [displayName]: Component = DefaultComponent } = useStackShiftUIComponents();
|
|
21
|
-
const commonClass = "ml-2";
|
|
22
|
-
const primary = `${commonClass} block`;
|
|
23
|
-
const inline = `${commonClass} flex gap-4`;
|
|
24
|
-
const combinedLabelClass = `mb-2 ${labelClass}`;
|
|
25
|
-
const variants = {
|
|
26
|
-
primary,
|
|
27
|
-
inline
|
|
28
|
-
};
|
|
29
|
-
const variantClass = (_a = variants[variant]) != null ? _a : primary;
|
|
30
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
31
|
-
!noLabel && /* @__PURE__ */ jsx("p", { className: combinedLabelClass, children: label || name }),
|
|
32
|
-
/* @__PURE__ */ jsx(Component, { ref, as, className: cn(variantClass, className), ...rest, children })
|
|
33
|
-
] });
|
|
34
|
-
});
|
|
35
|
-
CheckboxGroup.displayName = displayName;
|
|
36
|
-
|
|
37
|
-
export {
|
|
38
|
-
CheckboxGroup
|
|
39
|
-
};
|
package/dist/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./checkbox-group";
|
package/dist/index.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use strict";var V=Object.create;var r=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var G=Object.getOwnPropertyNames;var H=Object.getPrototypeOf,M=Object.prototype.hasOwnProperty;var P=(e,a)=>{for(var n in a)r(e,n,{get:a[n],enumerable:!0})},y=(e,a,n,o)=>{if(a&&typeof a=="object"||typeof a=="function")for(let t of G(a))!M.call(e,t)&&t!==n&&r(e,t,{get:()=>a[t],enumerable:!(o=E(a,t))||o.enumerable});return e};var R=(e,a,n)=>(n=e!=null?V(H(e)):{},y(a||!e||!e.__esModule?r(n,"default",{value:e,enumerable:!0}):n,e)),S=e=>y(r({},"__esModule",{value:!0}),e);var $={};P($,{CheckboxGroup:()=>f});module.exports=S($);var l=require("@stackshift-ui/system"),b=R(require("classnames")),i=require("react"),s=require("react/jsx-runtime"),C="CheckboxGroup",f=(0,i.forwardRef)((e,a)=>{var c;let{variant:n="primary",name:o,label:t,noLabel:d=!1,labelClass:g,children:x,className:N,as:T,...h}=e,{[C]:k=l.DefaultComponent}=(0,l.useStackShiftUIComponents)(),m="ml-2",p=`${m} block`,u=`${m} flex gap-4`,L=`mb-2 ${g}`,v=(c={primary:p,inline:u}[n])!=null?c:p;return(0,s.jsxs)(i.Fragment,{children:[!d&&(0,s.jsx)("p",{className:L,children:t||o}),(0,s.jsx)(k,{ref:a,as:T,className:(0,b.default)(v,N),...h,children:x})]})});f.displayName=C;0&&(module.exports={CheckboxGroup});
|
package/dist/index.mjs
DELETED
package/dist/setupTests.d.ts
DELETED