@stackshift-ui/checkbox-group 7.0.0-beta.1 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stackshift-ui/checkbox-group",
3
3
  "description": "",
4
- "version": "7.0.0-beta.1",
4
+ "version": "7.0.0-beta.4",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "main": "./dist/index.js",
@@ -36,11 +36,11 @@
36
36
  },
37
37
  "dependencies": {
38
38
  "classnames": "^2.5.1",
39
- "@stackshift-ui/system": "6.1.0-beta.1",
40
- "@stackshift-ui/scripts": "6.1.0-beta.0"
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": ">=6.1.0-beta.1",
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",
@@ -37,6 +37,7 @@ export const CheckboxGroup = forwardRef<HTMLDivElement, CheckboxGroupProps>((pro
37
37
  const commonClass = "ml-2";
38
38
  const primary = `${commonClass} block`;
39
39
  const inline = `${commonClass} flex gap-4`;
40
+ const combinedLabelClass = `mb-2 ${labelClass}`;
40
41
 
41
42
  const variants: StyleVariants<Variant> = {
42
43
  primary,
@@ -47,7 +48,7 @@ export const CheckboxGroup = forwardRef<HTMLDivElement, CheckboxGroupProps>((pro
47
48
 
48
49
  return (
49
50
  <Fragment>
50
- {!noLabel && <p className={labelClass}>{label || name}</p>}
51
+ {!noLabel && <p className={combinedLabelClass}>{label || name}</p>}
51
52
  <Component ref={ref} as={as} className={cn(variantClass, className)} {...rest}>
52
53
  {children}
53
54
  </Component>
@@ -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 {};
@@ -1 +0,0 @@
1
- "use strict";var L=Object.create;var o=Object.defineProperty;var V=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var G=Object.getPrototypeOf,H=Object.prototype.hasOwnProperty;var M=(e,a)=>{for(var n in a)o(e,n,{get:a[n],enumerable:!0})},y=(e,a,n,r)=>{if(a&&typeof a=="object"||typeof a=="function")for(let t of E(a))!H.call(e,t)&&t!==n&&o(e,t,{get:()=>a[t],enumerable:!(r=V(a,t))||r.enumerable});return e};var P=(e,a,n)=>(n=e!=null?L(G(e)):{},y(a||!e||!e.__esModule?o(n,"default",{value:e,enumerable:!0}):n,e)),R=e=>y(o({},"__esModule",{value:!0}),e);var S={};M(S,{CheckboxGroup:()=>f});module.exports=R(S);var l=require("@stackshift-ui/system"),b=P(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:r,label:t,noLabel:d=!1,labelClass:g,children:x,className:N,as:T,...h}=e,{[C]:k=l.DefaultComponent}=(0,l.useStackShiftUIComponents)(),p="ml-2",m=`${p} block`,u=`${p} flex gap-4`,v=(c={primary:m,inline:u}[n])!=null?c:m;return(0,s.jsxs)(i.Fragment,{children:[!d&&(0,s.jsx)("p",{className:g,children:t||r}),(0,s.jsx)(k,{ref:a,as:T,className:(0,b.default)(v,N),...h,children:x})]})});f.displayName=C;0&&(module.exports={CheckboxGroup});
@@ -1 +0,0 @@
1
- import{a}from"./chunk-XEYIWPWZ.mjs";import"./chunk-3EYN2AKU.mjs";export{a as CheckboxGroup};
@@ -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};
@@ -1 +0,0 @@
1
- import{DefaultComponent as N,useStackShiftUIComponents as T}from"@stackshift-ui/system";import h from"classnames";import{forwardRef as k,Fragment as u}from"react";import{jsx as t,jsxs as L}from"react/jsx-runtime";var s="CheckboxGroup",v=k((r,o)=>{var n;let{variant:l="primary",name:i,label:p,noLabel:m=!1,labelClass:c,children:y,className:b,as:C,...f}=r,{[s]:d=N}=T(),e="ml-2",a=`${e} block`,g=`${e} flex gap-4`,x=(n={primary:a,inline:g}[l])!=null?n:a;return L(u,{children:[!m&&t("p",{className:c,children:p||i}),t(d,{ref:o,as:C,className:h(x,b),...f,children:y})]})});v.displayName=s;export{v as a};
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 L=Object.create;var o=Object.defineProperty;var V=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var G=Object.getPrototypeOf,H=Object.prototype.hasOwnProperty;var M=(e,a)=>{for(var t in a)o(e,t,{get:a[t],enumerable:!0})},y=(e,a,t,r)=>{if(a&&typeof a=="object"||typeof a=="function")for(let n of E(a))!H.call(e,n)&&n!==t&&o(e,n,{get:()=>a[n],enumerable:!(r=V(a,n))||r.enumerable});return e};var P=(e,a,t)=>(t=e!=null?L(G(e)):{},y(a||!e||!e.__esModule?o(t,"default",{value:e,enumerable:!0}):t,e)),R=e=>y(o({},"__esModule",{value:!0}),e);var S={};M(S,{CheckboxGroup:()=>C});module.exports=R(S);var l=require("@stackshift-ui/system"),b=P(require("classnames")),i=require("react"),s=require("react/jsx-runtime"),f="CheckboxGroup",C=(0,i.forwardRef)((e,a)=>{var c;let{variant:t="primary",name:r,label:n,noLabel:d=!1,labelClass:g,children:x,className:N,as:T,...h}=e,{[f]:k=l.DefaultComponent}=(0,l.useStackShiftUIComponents)(),p="ml-2",m=`${p} block`,u=`${p} flex gap-4`,v=(c={primary:m,inline:u}[t])!=null?c:m;return(0,s.jsxs)(i.Fragment,{children:[!d&&(0,s.jsx)("p",{className:g,children:n||r}),(0,s.jsx)(k,{ref:a,as:T,className:(0,b.default)(v,N),...h,children:x})]})});C.displayName=f;0&&(module.exports={CheckboxGroup});
package/dist/index.mjs DELETED
@@ -1,2 +0,0 @@
1
- "use client";
2
- "use strict";import{a as e}from"./chunk-XEYIWPWZ.mjs";import"./chunk-3EYN2AKU.mjs";export{e as CheckboxGroup};
@@ -1,2 +0,0 @@
1
- import '@testing-library/jest-dom';
2
- export {};