@jamsrui/checkbox 0.0.8 → 0.0.10
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/checkbox-config.d.mts +11 -11
- package/dist/checkbox-config.mjs +1 -1
- package/dist/checkbox.d.mts +22 -13
- package/dist/checkbox.mjs +1 -1
- package/dist/chunk-3G33TKQ4.mjs +1 -0
- package/dist/chunk-5E6RGSS7.mjs +1 -0
- package/dist/chunk-7HSMKJZT.mjs +1 -0
- package/dist/chunk-D3WPBLWY.mjs +1 -0
- package/dist/chunk-E2NBJUXC.mjs +1 -0
- package/dist/chunk-FRNI2QCP.mjs +1 -0
- package/dist/chunk-HM5E5R22.mjs +1 -0
- package/dist/chunk-IYBWXFEX.mjs +1 -0
- package/dist/chunk-K6B3YVFR.mjs +1 -0
- package/dist/chunk-KDGIZLWZ.mjs +1 -0
- package/dist/chunk-MSMN3ONF.mjs +1 -0
- package/dist/chunk-NLSTQYND.mjs +1 -0
- package/dist/chunk-Q4LWW3NN.mjs +0 -0
- package/dist/chunk-RITKX3B2.mjs +1 -0
- package/dist/chunk-SDIPXW2A.mjs +1 -0
- package/dist/chunk-SFX35YBW.mjs +1 -0
- package/dist/chunk-UTQSFGB2.mjs +1 -0
- package/dist/index.d.mts +11 -11
- package/dist/index.mjs +1 -1
- package/dist/primitive/checkbox-config.d.mts +27 -0
- package/dist/primitive/checkbox-config.mjs +1 -0
- package/dist/primitive/checkbox-content.mjs +1 -0
- package/dist/{checkbox-context.d.mts → primitive/checkbox-context.d.mts} +3 -5
- package/dist/primitive/checkbox-context.mjs +1 -0
- package/dist/primitive/checkbox-description.mjs +1 -0
- package/dist/primitive/checkbox-error-message.mjs +1 -0
- package/dist/primitive/checkbox-icon.d.mts +5 -0
- package/dist/primitive/checkbox-icon.mjs +1 -0
- package/dist/primitive/checkbox-input.mjs +1 -0
- package/dist/{checkbox-label.d.mts → primitive/checkbox-label.d.mts} +1 -1
- package/dist/primitive/checkbox-label.mjs +1 -0
- package/dist/primitive/checkbox-root.d.mts +10 -0
- package/dist/primitive/checkbox-root.mjs +1 -0
- package/dist/primitive/checkbox-trigger.mjs +1 -0
- package/dist/primitive/checkbox-wrapper.mjs +1 -0
- package/dist/primitive/checkbox.d.mts +21 -0
- package/dist/primitive/checkbox.mjs +1 -0
- package/dist/primitive/index.d.mts +18 -0
- package/dist/primitive/index.mjs +1 -0
- package/dist/{styles.d.mts → primitive/styles.d.mts} +37 -29
- package/dist/primitive/styles.mjs +1 -0
- package/dist/{checkbox-jaXFm_b0.d.mts → primitive/use-checkbox.d.mts} +10 -21
- package/dist/primitive/use-checkbox.mjs +1 -0
- package/package.json +16 -11
- package/dist/checkbox-content.mjs +0 -1
- package/dist/checkbox-context.mjs +0 -1
- package/dist/checkbox-description.mjs +0 -1
- package/dist/checkbox-errror-message.mjs +0 -1
- package/dist/checkbox-helper-text.d.mts +0 -10
- package/dist/checkbox-helper-text.mjs +0 -1
- package/dist/checkbox-input.mjs +0 -1
- package/dist/checkbox-label.mjs +0 -1
- package/dist/checkbox-trigger.mjs +0 -1
- package/dist/checkbox-wrapper.mjs +0 -1
- package/dist/styles.mjs +0 -1
- package/dist/use-checkbox.d.mts +0 -14
- package/dist/use-checkbox.mjs +0 -1
- /package/dist/{checkbox-content.d.mts → primitive/checkbox-content.d.mts} +0 -0
- /package/dist/{checkbox-description.d.mts → primitive/checkbox-description.d.mts} +0 -0
- /package/dist/{checkbox-errror-message.d.mts → primitive/checkbox-error-message.d.mts} +0 -0
- /package/dist/{checkbox-input.d.mts → primitive/checkbox-input.d.mts} +0 -0
- /package/dist/{checkbox-trigger.d.mts → primitive/checkbox-trigger.d.mts} +0 -0
- /package/dist/{checkbox-wrapper.d.mts → primitive/checkbox-wrapper.d.mts} +0 -0
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Checkbox } from './checkbox.mjs';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
3
|
import { GlobalConfigProps } from '@jamsrui/core';
|
|
4
|
+
import './primitive/use-checkbox.mjs';
|
|
4
5
|
import 'react';
|
|
5
6
|
import '@jamsrui/utils';
|
|
6
|
-
import './checkbox-content.mjs';
|
|
7
|
-
import './checkbox-description.mjs';
|
|
8
|
-
import './checkbox-
|
|
9
|
-
import './checkbox-input.mjs';
|
|
10
|
-
import './checkbox-label.mjs';
|
|
11
|
-
import './checkbox-
|
|
12
|
-
import './checkbox-
|
|
13
|
-
import './
|
|
14
|
-
import '
|
|
15
|
-
import './checkbox-errror-message.mjs';
|
|
7
|
+
import './primitive/checkbox-content.mjs';
|
|
8
|
+
import './primitive/checkbox-description.mjs';
|
|
9
|
+
import './primitive/checkbox-error-message.mjs';
|
|
10
|
+
import './primitive/checkbox-input.mjs';
|
|
11
|
+
import './primitive/checkbox-label.mjs';
|
|
12
|
+
import './primitive/checkbox-root.mjs';
|
|
13
|
+
import './primitive/checkbox-trigger.mjs';
|
|
14
|
+
import './primitive/checkbox-wrapper.mjs';
|
|
15
|
+
import './primitive/styles.mjs';
|
|
16
16
|
|
|
17
17
|
declare const useCheckboxConfig: () => CheckboxConfig.Props;
|
|
18
18
|
declare const CheckboxConfig: (props: Omit<Partial<CheckboxConfig.Props>, "children"> & {
|
package/dist/checkbox-config.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a,b}from"./chunk-IYBWXFEX.mjs";export{a as CheckboxConfig,b as useCheckboxConfig};
|
package/dist/checkbox.d.mts
CHANGED
|
@@ -1,14 +1,23 @@
|
|
|
1
|
-
import 'react/jsx-runtime';
|
|
2
|
-
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { useCheckbox } from './primitive/use-checkbox.mjs';
|
|
3
|
+
import { SlotsToReactNode } from '@jamsrui/utils';
|
|
4
|
+
import { CheckboxSlots } from './primitive/styles.mjs';
|
|
3
5
|
import 'react';
|
|
4
|
-
import '
|
|
5
|
-
import './checkbox-
|
|
6
|
-
import './checkbox-
|
|
7
|
-
import './checkbox-
|
|
8
|
-
import './checkbox-
|
|
9
|
-
import './checkbox-
|
|
10
|
-
import './checkbox-trigger.mjs';
|
|
11
|
-
import './checkbox-wrapper.mjs';
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
6
|
+
import './primitive/checkbox-content.mjs';
|
|
7
|
+
import './primitive/checkbox-description.mjs';
|
|
8
|
+
import './primitive/checkbox-error-message.mjs';
|
|
9
|
+
import './primitive/checkbox-input.mjs';
|
|
10
|
+
import './primitive/checkbox-label.mjs';
|
|
11
|
+
import './primitive/checkbox-root.mjs';
|
|
12
|
+
import './primitive/checkbox-trigger.mjs';
|
|
13
|
+
import './primitive/checkbox-wrapper.mjs';
|
|
14
|
+
|
|
15
|
+
declare const Checkbox: (props: Checkbox.Props) => react_jsx_runtime.JSX.Element;
|
|
16
|
+
declare namespace Checkbox {
|
|
17
|
+
interface Props extends useCheckbox.Props {
|
|
18
|
+
label?: React.ReactNode;
|
|
19
|
+
slots?: SlotsToReactNode<CheckboxSlots>;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export { Checkbox };
|
package/dist/checkbox.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a}from"./chunk-FRNI2QCP.mjs";import"./chunk-Q4LWW3NN.mjs";import"./chunk-MSMN3ONF.mjs";import"./chunk-E2NBJUXC.mjs";import"./chunk-D3WPBLWY.mjs";import"./chunk-K6B3YVFR.mjs";import"./chunk-SFX35YBW.mjs";import"./chunk-SDIPXW2A.mjs";import"./chunk-5E6RGSS7.mjs";import"./chunk-7HSMKJZT.mjs";import"./chunk-RITKX3B2.mjs";import"./chunk-IYBWXFEX.mjs";import"./chunk-NLSTQYND.mjs";import"./chunk-HM5E5R22.mjs";import"./chunk-UTQSFGB2.mjs";import"./chunk-3G33TKQ4.mjs";import"./chunk-KDGIZLWZ.mjs";export{a as Checkbox};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as e}from"./chunk-KDGIZLWZ.mjs";import{useRenderElement as s}from"@jamsrui/hooks";var m=r=>{let{getErrorMessageProps:o}=e();return s("span",{props:[o(r)]})};export{m as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as c}from"./chunk-7HSMKJZT.mjs";import{b as r}from"./chunk-NLSTQYND.mjs";import{a as t}from"./chunk-KDGIZLWZ.mjs";import{mergeConfigProps as s}from"@jamsrui/utils";import{jsx as C}from"react/jsx-runtime";var f=o=>{let e=r(),x=s(e,e,o),n=c(x);return C(t,{value:n,children:o.children})};export{f as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as h}from"./chunk-RITKX3B2.mjs";import{useCallback as r,useId as H,useMemo as W}from"react";import{useControlledState as A,useFocusVisible as U,useHover as j,useMergeRefs as K,usePress as O}from"@jamsrui/hooks";import{cn as c,dataAttr as p,dataAttrDev as a,mapPropsVariants as $,mergeProps as q}from"@jamsrui/utils";var X=D=>{let[T,w]=$(D,h.variantKeys),o=h(w),{isChecked:E,onCheckedChange:m,defaultChecked:d,classNames:s,isDisabled:t=!1,children:k,isIntermediate:n,...b}=T,[i=!1,C]=A({defaultProp:d,prop:E,onChange:m}),l=H(),{isFocusVisible:g,ref:S}=U({isDisabled:t}),{isPressed:P,ref:L}=O({isDisabled:t}),{isHovered:x,ref:F}=j({isDisabled:t}),u=K([S,L,F]),f=r(e=>{C(e.target.checked)},[C]),N=r(e=>({...e,className:o.root({className:c(s?.root)}),"data-slot":a("root"),"data-component":a("checkbox"),"data-checked":p(i||n),"data-focus-visible":p(g),"data-pressed":p(P),"data-hovered":p(x),"data-disabled":p(t),"aria-disabled":p(t)}),[s?.root,i,t,g,x,n,P,o]),y=r(e=>({...q(b,e,{onChange:f}),disabled:t,"aria-disabled":p(t),id:l,ref:u,type:"checkbox","data-slot":a("input"),className:o.input({className:c(s?.input,b.className,e.className)})}),[b,f,t,l,u,o,s?.input]),I=r(e=>({...e,"data-slot":a("wrapper"),className:o.wrapper({className:c(s?.wrapper,e.className)})}),[s?.wrapper,o]),v=r(e=>({...e,htmlFor:l,"data-slot":a("label"),className:o.label({className:c(s?.label,e.className)})}),[s?.label,l,o]),M=r(e=>({...e,"data-slot":a("trigger"),className:o.trigger({className:c(s?.trigger,e.className)})}),[s?.trigger,o]),G=r(e=>({...e,"data-slot":a("description"),className:o.description({className:c(s?.description,e.className)})}),[s?.description,o]),R=r(e=>({...e,"data-slot":a("content"),className:o.content({className:c(s?.content,e.className)})}),[s?.content,o]),V=r(e=>({...e,"data-slot":a("errorMessage"),className:o.errorMessage({className:c(s?.errorMessage,e.className)})}),[s?.errorMessage,o]);return W(()=>({getRootProps:N,getWrapperProps:I,getLabelProps:v,getInputProps:y,getTriggerProps:M,getDescriptionProps:G,getContentProps:R,onCheckedChange:m,getErrorMessageProps:V,defaultChecked:d,isChecked:i,children:k,isIntermediate:n}),[k,d,R,G,V,y,v,N,M,I,i,n,m])};export{X as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as e}from"./chunk-KDGIZLWZ.mjs";import{useRenderElement as t}from"@jamsrui/hooks";var l=r=>{let{getLabelProps:o}=e();return t("label",{props:[o(r)]})};export{l as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as e}from"./chunk-KDGIZLWZ.mjs";import{useRenderElement as o}from"@jamsrui/hooks";var m=t=>{let{getInputProps:r}=e();return o("input",{props:[r(t)]})};export{m as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as i}from"./chunk-MSMN3ONF.mjs";import{a as k}from"./chunk-E2NBJUXC.mjs";import{a}from"./chunk-D3WPBLWY.mjs";import{a as m}from"./chunk-K6B3YVFR.mjs";import{a as g}from"./chunk-SFX35YBW.mjs";import{a as S}from"./chunk-SDIPXW2A.mjs";import{a as b}from"./chunk-7HSMKJZT.mjs";import{b as C}from"./chunk-IYBWXFEX.mjs";import{a as n}from"./chunk-HM5E5R22.mjs";import{a as p}from"./chunk-UTQSFGB2.mjs";import{a as h}from"./chunk-3G33TKQ4.mjs";import{a as x}from"./chunk-KDGIZLWZ.mjs";import{Slot as t}from"@jamsrui/slot";import{mergeConfigProps as T}from"@jamsrui/utils";import{jsx as o,jsxs as r}from"react/jsx-runtime";var I=f=>{let l=C(),u=T(l,l,f),{label:c,children:s,slots:e,...d}=u,P=b(d),R=!!c||!!s;return o(x,{value:P,children:o(t,{slot:e?.root,children:r(m,{children:[o(t,{slot:e?.wrapper,children:r(S,{children:[o(t,{slot:e?.trigger,children:r(g,{children:[o(i,{}),o(t,{slot:e?.input,children:o(k,{})})]})}),R?o(t,{slot:e?.content,children:r(n,{children:[!!c&&o(t,{slot:e?.label,children:o(a,{children:c})}),!!s&&o(t,{slot:e?.description,children:o(p,{children:s})})]})}):null]})}),o(h,{})]})})})};export{I as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as e}from"./chunk-KDGIZLWZ.mjs";import{useRenderElement as r}from"@jamsrui/hooks";var m=t=>{let{getContentProps:o}=e();return r("div",{props:[o(t)]})};export{m as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createConfigContext as o}from"@jamsrui/utils";var[r,C]=o({displayName:"CheckboxConfig"});export{r as a,C as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as e}from"./chunk-KDGIZLWZ.mjs";import{useRenderElement as r}from"@jamsrui/hooks";var m=o=>{let{getRootProps:t}=e();return r("div",{props:[t(o)]})};export{m as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createContext as t,use as o}from"react";var x=t(null),r=()=>{let e=o(x);if(!e)throw new Error("useCheckboxContext must be used within a CheckboxContext");return e};export{x as a,r as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as o}from"./chunk-KDGIZLWZ.mjs";import{motion as n}from"motion/react";import{jsx as t}from"react/jsx-runtime";var a={pressed:{pathLength:.5},checked:{pathLength:1,opacity:1,transition:{duration:.2}},unchecked:{pathLength:0,opacity:0,transition:{duration:.2}}},c=()=>{let{isChecked:i,isIntermediate:e}=o();return t("div",{className:"pointer-events-none absolute left-1/2 top-1/2 z-10 -translate-x-1/2 -translate-y-1/2 text-primary-foreground","data-slot":"icon",children:t(n.svg,{animate:i||e?"checked":"unchecked",className:"size-3.5",fill:"none",initial:!1,stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:t(n.path,{d:e?"M5 12h14":"M4.5 12.75l6 6 9-13.5",strokeLinecap:"round",strokeLinejoin:"round",variants:a})})})};export{c as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createConfigContext as o}from"@jamsrui/utils";var[r,C]=o({displayName:"CheckboxConfig"});export{r as a,C as b};
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{groupDataFocusVisibleClasses as e,radiusVariant as r,tv as o}from"@jamsrui/utils";var i=o({slots:{root:["group flex flex-col gap-2","ui-disabled:opacity-60","ui-disabled:cursor-not-allowed"],wrapper:"flex gap-2",label:["shrink-0 text-sm font-normal leading-none text-foreground uig-interactive:cursor-pointer uig-disabled:cursor-not-allowed","select-none"],trigger:[...e,"border-default uig-hover:border-default-hover","relative size-5 appearance-none border uig-checked:border-primary uig-checked:bg-primary uig-interactive:cursor-pointer","uig-disabled:cursor-not-allowed uig-pressed:scale-90 transition-all duration-300"],input:"absolute opacity-[0.0001] cursor-pointer disabled:cursor-not-allowed inset-0 z-1",description:"text-xs text-foreground-secondary",content:"flex flex-col justify-center gap-1",errorMessage:""},variants:{size:{sm:{trigger:"size-4"},md:{trigger:"size-4.5"},lg:{trigger:"size-5.5"}},radius:r("trigger")},defaultVariants:{radius:"md",size:"md"}});export{i as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as e}from"./chunk-KDGIZLWZ.mjs";import{useRenderElement as p}from"@jamsrui/hooks";var m=r=>{let{getWrapperProps:o}=e();return p("div",{props:[o(r)]})};export{m as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as e}from"./chunk-KDGIZLWZ.mjs";import{useRenderElement as t}from"@jamsrui/hooks";var i=r=>{let{getTriggerProps:o}=e();return t("div",{props:[o(r)]})};export{i as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as e}from"./chunk-KDGIZLWZ.mjs";import{useRenderElement as t}from"@jamsrui/hooks";var i=r=>{let{getDescriptionProps:o}=e();return t("div",{props:[o(r)]})};export{i as a};
|
package/dist/index.d.mts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { Checkbox } from './checkbox.mjs';
|
|
2
2
|
export { CheckboxConfig, useCheckboxConfig } from './checkbox-config.mjs';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
|
+
import './primitive/use-checkbox.mjs';
|
|
4
5
|
import 'react';
|
|
5
6
|
import '@jamsrui/utils';
|
|
6
|
-
import './checkbox-content.mjs';
|
|
7
|
-
import './checkbox-description.mjs';
|
|
8
|
-
import './checkbox-
|
|
9
|
-
import './checkbox-input.mjs';
|
|
10
|
-
import './checkbox-label.mjs';
|
|
11
|
-
import './checkbox-
|
|
12
|
-
import './checkbox-
|
|
13
|
-
import './
|
|
14
|
-
import '
|
|
15
|
-
import './checkbox-errror-message.mjs';
|
|
7
|
+
import './primitive/checkbox-content.mjs';
|
|
8
|
+
import './primitive/checkbox-description.mjs';
|
|
9
|
+
import './primitive/checkbox-error-message.mjs';
|
|
10
|
+
import './primitive/checkbox-input.mjs';
|
|
11
|
+
import './primitive/checkbox-label.mjs';
|
|
12
|
+
import './primitive/checkbox-root.mjs';
|
|
13
|
+
import './primitive/checkbox-trigger.mjs';
|
|
14
|
+
import './primitive/checkbox-wrapper.mjs';
|
|
15
|
+
import './primitive/styles.mjs';
|
|
16
16
|
import '@jamsrui/core';
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{
|
|
1
|
+
"use client";import{a as x}from"./chunk-FRNI2QCP.mjs";import"./chunk-Q4LWW3NN.mjs";import"./chunk-MSMN3ONF.mjs";import"./chunk-E2NBJUXC.mjs";import"./chunk-D3WPBLWY.mjs";import"./chunk-K6B3YVFR.mjs";import"./chunk-SFX35YBW.mjs";import"./chunk-SDIPXW2A.mjs";import"./chunk-5E6RGSS7.mjs";import"./chunk-7HSMKJZT.mjs";import"./chunk-RITKX3B2.mjs";import{a as o,b as e}from"./chunk-IYBWXFEX.mjs";import"./chunk-NLSTQYND.mjs";import"./chunk-HM5E5R22.mjs";import"./chunk-UTQSFGB2.mjs";import"./chunk-3G33TKQ4.mjs";import"./chunk-KDGIZLWZ.mjs";export{x as Checkbox,o as CheckboxConfig,e as useCheckboxConfig};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { GlobalConfigProps } from '@jamsrui/core';
|
|
3
|
+
import { Checkbox } from './checkbox.mjs';
|
|
4
|
+
import './use-checkbox.mjs';
|
|
5
|
+
import 'react';
|
|
6
|
+
import '@jamsrui/utils';
|
|
7
|
+
import './checkbox-content.mjs';
|
|
8
|
+
import './checkbox-description.mjs';
|
|
9
|
+
import './checkbox-error-message.mjs';
|
|
10
|
+
import './checkbox-input.mjs';
|
|
11
|
+
import './checkbox-label.mjs';
|
|
12
|
+
import './checkbox-root.mjs';
|
|
13
|
+
import './checkbox-trigger.mjs';
|
|
14
|
+
import './checkbox-wrapper.mjs';
|
|
15
|
+
import './styles.mjs';
|
|
16
|
+
|
|
17
|
+
declare const useCheckboxConfig: () => CheckboxConfig.Props;
|
|
18
|
+
declare const CheckboxConfig: (props: Omit<Partial<CheckboxConfig.Props>, "children"> & {
|
|
19
|
+
merge?: boolean;
|
|
20
|
+
children: React.ReactNode;
|
|
21
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
22
|
+
declare namespace CheckboxConfig {
|
|
23
|
+
interface Props extends Checkbox.Props, GlobalConfigProps<Checkbox.Props> {
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { CheckboxConfig, useCheckboxConfig };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b}from"../chunk-NLSTQYND.mjs";export{a as CheckboxConfig,b as useCheckboxConfig};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"../chunk-HM5E5R22.mjs";import"../chunk-KDGIZLWZ.mjs";export{a as CheckboxContent};
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import 'react/jsx-runtime';
|
|
2
|
+
import { useCheckbox } from './use-checkbox.mjs';
|
|
4
3
|
import '@jamsrui/utils';
|
|
5
4
|
import './checkbox-content.mjs';
|
|
6
5
|
import './checkbox-description.mjs';
|
|
7
|
-
import './checkbox-
|
|
6
|
+
import './checkbox-error-message.mjs';
|
|
8
7
|
import './checkbox-input.mjs';
|
|
9
8
|
import './checkbox-label.mjs';
|
|
9
|
+
import './checkbox-root.mjs';
|
|
10
10
|
import './checkbox-trigger.mjs';
|
|
11
11
|
import './checkbox-wrapper.mjs';
|
|
12
12
|
import './styles.mjs';
|
|
13
|
-
import 'tailwind-variants';
|
|
14
|
-
import './checkbox-errror-message.mjs';
|
|
15
13
|
|
|
16
14
|
declare const useCheckboxContext: () => CheckboxContext.Props;
|
|
17
15
|
declare const CheckboxContext: react.Context<CheckboxContext.Props | null>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b}from"../chunk-KDGIZLWZ.mjs";export{a as CheckboxContext,b as useCheckboxContext};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"../chunk-UTQSFGB2.mjs";import"../chunk-KDGIZLWZ.mjs";export{a as CheckboxDescription};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"../chunk-3G33TKQ4.mjs";import"../chunk-KDGIZLWZ.mjs";export{a as CheckboxErrorMessage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"../chunk-MSMN3ONF.mjs";import"../chunk-KDGIZLWZ.mjs";export{a as CheckboxIcon};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"../chunk-E2NBJUXC.mjs";import"../chunk-KDGIZLWZ.mjs";export{a as CheckboxInput};
|
|
@@ -3,7 +3,7 @@ import { UIProps } from '@jamsrui/utils';
|
|
|
3
3
|
|
|
4
4
|
declare const CheckboxLabel: (props: CheckboxLabel.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
5
5
|
declare namespace CheckboxLabel {
|
|
6
|
-
interface Props extends UIProps<"
|
|
6
|
+
interface Props extends UIProps<"label"> {
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"../chunk-D3WPBLWY.mjs";import"../chunk-KDGIZLWZ.mjs";export{a as CheckboxLabel};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { UIProps } from '@jamsrui/utils';
|
|
3
|
+
|
|
4
|
+
declare const CheckboxRoot: (prop: CheckboxRoot.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
5
|
+
declare namespace CheckboxRoot {
|
|
6
|
+
interface Props extends UIProps<"input"> {
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export { CheckboxRoot };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"../chunk-K6B3YVFR.mjs";import"../chunk-KDGIZLWZ.mjs";export{a as CheckboxRoot};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"../chunk-SFX35YBW.mjs";import"../chunk-KDGIZLWZ.mjs";export{a as CheckboxTrigger};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"../chunk-SDIPXW2A.mjs";import"../chunk-KDGIZLWZ.mjs";export{a as CheckboxWrapper};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { useCheckbox } from './use-checkbox.mjs';
|
|
3
|
+
import 'react';
|
|
4
|
+
import '@jamsrui/utils';
|
|
5
|
+
import './checkbox-content.mjs';
|
|
6
|
+
import './checkbox-description.mjs';
|
|
7
|
+
import './checkbox-error-message.mjs';
|
|
8
|
+
import './checkbox-input.mjs';
|
|
9
|
+
import './checkbox-label.mjs';
|
|
10
|
+
import './checkbox-root.mjs';
|
|
11
|
+
import './checkbox-trigger.mjs';
|
|
12
|
+
import './checkbox-wrapper.mjs';
|
|
13
|
+
import './styles.mjs';
|
|
14
|
+
|
|
15
|
+
declare const Checkbox: (props: Checkbox.Props) => react_jsx_runtime.JSX.Element;
|
|
16
|
+
declare namespace Checkbox {
|
|
17
|
+
interface Props extends useCheckbox.Props {
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export { Checkbox };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"../chunk-5E6RGSS7.mjs";import"../chunk-7HSMKJZT.mjs";import"../chunk-RITKX3B2.mjs";import"../chunk-NLSTQYND.mjs";import"../chunk-KDGIZLWZ.mjs";export{a as Checkbox};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export { Checkbox } from './checkbox.mjs';
|
|
2
|
+
export { CheckboxConfig, useCheckboxConfig } from './checkbox-config.mjs';
|
|
3
|
+
export { CheckboxContent } from './checkbox-content.mjs';
|
|
4
|
+
export { CheckboxContext, useCheckboxContext } from './checkbox-context.mjs';
|
|
5
|
+
export { CheckboxDescription } from './checkbox-description.mjs';
|
|
6
|
+
export { CheckboxErrorMessage } from './checkbox-error-message.mjs';
|
|
7
|
+
export { CheckboxIcon } from './checkbox-icon.mjs';
|
|
8
|
+
export { CheckboxInput } from './checkbox-input.mjs';
|
|
9
|
+
export { CheckboxLabel } from './checkbox-label.mjs';
|
|
10
|
+
export { CheckboxRoot } from './checkbox-root.mjs';
|
|
11
|
+
export { CheckboxTrigger } from './checkbox-trigger.mjs';
|
|
12
|
+
export { CheckboxWrapper } from './checkbox-wrapper.mjs';
|
|
13
|
+
export { useCheckbox } from './use-checkbox.mjs';
|
|
14
|
+
import 'react/jsx-runtime';
|
|
15
|
+
import '@jamsrui/core';
|
|
16
|
+
import 'react';
|
|
17
|
+
import '@jamsrui/utils';
|
|
18
|
+
import './styles.mjs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import"../chunk-Q4LWW3NN.mjs";import{a as j}from"../chunk-MSMN3ONF.mjs";import{a as k}from"../chunk-E2NBJUXC.mjs";import{a as l}from"../chunk-D3WPBLWY.mjs";import{a as m}from"../chunk-K6B3YVFR.mjs";import{a as n}from"../chunk-SFX35YBW.mjs";import{a as o}from"../chunk-SDIPXW2A.mjs";import{a as f}from"../chunk-5E6RGSS7.mjs";import{a as e}from"../chunk-7HSMKJZT.mjs";import"../chunk-RITKX3B2.mjs";import{a,b}from"../chunk-NLSTQYND.mjs";import{a as g}from"../chunk-HM5E5R22.mjs";import{a as h}from"../chunk-UTQSFGB2.mjs";import{a as i}from"../chunk-3G33TKQ4.mjs";import{a as c,b as d}from"../chunk-KDGIZLWZ.mjs";export{f as Checkbox,a as CheckboxConfig,g as CheckboxContent,c as CheckboxContext,h as CheckboxDescription,i as CheckboxErrorMessage,j as CheckboxIcon,k as CheckboxInput,l as CheckboxLabel,m as CheckboxRoot,n as CheckboxTrigger,o as CheckboxWrapper,e as useCheckbox,b as useCheckboxConfig,d as useCheckboxContext};
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _jamsrui_utils from '@jamsrui/utils';
|
|
2
2
|
import { VariantProps } from '@jamsrui/utils';
|
|
3
3
|
|
|
4
|
-
declare const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
declare const checkboxVariants: _jamsrui_utils.TVReturnType<{
|
|
5
|
+
size: {
|
|
6
|
+
sm: {
|
|
7
|
+
trigger: string;
|
|
8
|
+
};
|
|
9
|
+
md: {
|
|
10
|
+
trigger: string;
|
|
11
|
+
};
|
|
12
|
+
lg: {
|
|
13
|
+
trigger: string;
|
|
11
14
|
};
|
|
12
15
|
};
|
|
13
16
|
radius: {
|
|
@@ -23,19 +26,22 @@ declare const checkboxVariants: tailwind_variants.TVReturnType<{
|
|
|
23
26
|
}, {
|
|
24
27
|
root: string[];
|
|
25
28
|
wrapper: string;
|
|
26
|
-
label: string;
|
|
27
|
-
helperText: string;
|
|
28
|
-
input: string[];
|
|
29
|
+
label: string[];
|
|
29
30
|
trigger: string[];
|
|
31
|
+
input: string;
|
|
30
32
|
description: string;
|
|
31
33
|
content: string;
|
|
32
34
|
errorMessage: string;
|
|
33
35
|
}, undefined, {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
size: {
|
|
37
|
+
sm: {
|
|
38
|
+
trigger: string;
|
|
39
|
+
};
|
|
40
|
+
md: {
|
|
41
|
+
trigger: string;
|
|
42
|
+
};
|
|
43
|
+
lg: {
|
|
44
|
+
trigger: string;
|
|
39
45
|
};
|
|
40
46
|
};
|
|
41
47
|
radius: {
|
|
@@ -51,19 +57,22 @@ declare const checkboxVariants: tailwind_variants.TVReturnType<{
|
|
|
51
57
|
}, {
|
|
52
58
|
root: string[];
|
|
53
59
|
wrapper: string;
|
|
54
|
-
label: string;
|
|
55
|
-
helperText: string;
|
|
56
|
-
input: string[];
|
|
60
|
+
label: string[];
|
|
57
61
|
trigger: string[];
|
|
62
|
+
input: string;
|
|
58
63
|
description: string;
|
|
59
64
|
content: string;
|
|
60
65
|
errorMessage: string;
|
|
61
|
-
},
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
66
|
+
}, _jamsrui_utils.TVReturnType<{
|
|
67
|
+
size: {
|
|
68
|
+
sm: {
|
|
69
|
+
trigger: string;
|
|
70
|
+
};
|
|
71
|
+
md: {
|
|
72
|
+
trigger: string;
|
|
73
|
+
};
|
|
74
|
+
lg: {
|
|
75
|
+
trigger: string;
|
|
67
76
|
};
|
|
68
77
|
};
|
|
69
78
|
radius: {
|
|
@@ -79,10 +88,9 @@ declare const checkboxVariants: tailwind_variants.TVReturnType<{
|
|
|
79
88
|
}, {
|
|
80
89
|
root: string[];
|
|
81
90
|
wrapper: string;
|
|
82
|
-
label: string;
|
|
83
|
-
helperText: string;
|
|
84
|
-
input: string[];
|
|
91
|
+
label: string[];
|
|
85
92
|
trigger: string[];
|
|
93
|
+
input: string;
|
|
86
94
|
description: string;
|
|
87
95
|
content: string;
|
|
88
96
|
errorMessage: string;
|
|
@@ -90,4 +98,4 @@ declare const checkboxVariants: tailwind_variants.TVReturnType<{
|
|
|
90
98
|
type CheckboxVariantProps = VariantProps<typeof checkboxVariants>;
|
|
91
99
|
type CheckboxSlots = keyof ReturnType<typeof checkboxVariants>;
|
|
92
100
|
|
|
93
|
-
export { type CheckboxSlots, type CheckboxVariantProps, checkboxVariants
|
|
101
|
+
export { type CheckboxSlots, type CheckboxVariantProps, checkboxVariants };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"../chunk-RITKX3B2.mjs";export{a as checkboxVariants};
|
|
@@ -1,50 +1,39 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as react from 'react';
|
|
3
2
|
import { PropGetter, UIProps, SlotsToClassNames } from '@jamsrui/utils';
|
|
4
3
|
import { CheckboxContent } from './checkbox-content.mjs';
|
|
5
4
|
import { CheckboxDescription } from './checkbox-description.mjs';
|
|
6
|
-
import {
|
|
5
|
+
import { CheckboxErrorMessage } from './checkbox-error-message.mjs';
|
|
7
6
|
import { CheckboxInput } from './checkbox-input.mjs';
|
|
8
7
|
import { CheckboxLabel } from './checkbox-label.mjs';
|
|
8
|
+
import { CheckboxRoot } from './checkbox-root.mjs';
|
|
9
9
|
import { CheckboxTrigger } from './checkbox-trigger.mjs';
|
|
10
10
|
import { CheckboxWrapper } from './checkbox-wrapper.mjs';
|
|
11
11
|
import { CheckboxVariantProps, CheckboxSlots } from './styles.mjs';
|
|
12
|
-
import { CheckboxErrorMessage } from './checkbox-errror-message.mjs';
|
|
13
12
|
|
|
14
13
|
declare const useCheckbox: (props: useCheckbox.Props) => {
|
|
15
|
-
getRootProps: PropGetter<
|
|
14
|
+
getRootProps: PropGetter<CheckboxRoot.Props>;
|
|
16
15
|
getWrapperProps: PropGetter<CheckboxWrapper.Props>;
|
|
17
16
|
getLabelProps: PropGetter<CheckboxLabel.Props>;
|
|
18
17
|
getInputProps: PropGetter<CheckboxInput.Props>;
|
|
19
18
|
getTriggerProps: PropGetter<CheckboxTrigger.Props>;
|
|
20
19
|
getDescriptionProps: PropGetter<CheckboxDescription.Props>;
|
|
21
|
-
getHelperTextProps: PropGetter<CheckboxHelperText.Props>;
|
|
22
20
|
getContentProps: PropGetter<CheckboxContent.Props>;
|
|
23
21
|
onCheckedChange: ((checked: boolean) => void) | undefined;
|
|
24
|
-
defaultChecked: boolean | undefined;
|
|
25
|
-
label: react.ReactNode;
|
|
26
|
-
description: react.ReactNode;
|
|
27
|
-
helperText: string | undefined;
|
|
28
22
|
getErrorMessageProps: PropGetter<CheckboxErrorMessage.Props>;
|
|
23
|
+
defaultChecked: boolean | undefined;
|
|
24
|
+
isChecked: boolean;
|
|
25
|
+
children: react.ReactNode;
|
|
26
|
+
isIntermediate: boolean | undefined;
|
|
29
27
|
};
|
|
30
28
|
declare namespace useCheckbox {
|
|
31
|
-
interface Props extends UIProps<"
|
|
32
|
-
label?: React.ReactNode;
|
|
33
|
-
description?: React.ReactNode;
|
|
29
|
+
interface Props extends UIProps<"input">, CheckboxVariantProps {
|
|
34
30
|
defaultChecked?: boolean;
|
|
35
31
|
isChecked?: boolean;
|
|
36
32
|
onCheckedChange?: (checked: boolean) => void;
|
|
37
|
-
helperText?: string;
|
|
38
33
|
classNames?: SlotsToClassNames<CheckboxSlots>;
|
|
39
|
-
isReadonly?: boolean;
|
|
40
34
|
isDisabled?: boolean;
|
|
35
|
+
isIntermediate?: boolean;
|
|
41
36
|
}
|
|
42
37
|
}
|
|
43
38
|
|
|
44
|
-
|
|
45
|
-
declare namespace Checkbox {
|
|
46
|
-
interface Props extends useCheckbox.Props {
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export { Checkbox as C, useCheckbox as u };
|
|
39
|
+
export { useCheckbox };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"../chunk-7HSMKJZT.mjs";import"../chunk-RITKX3B2.mjs";export{a as useCheckbox};
|
package/package.json
CHANGED
|
@@ -1,21 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jamsrui/checkbox",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"peerDependencies": {
|
|
5
|
-
"react": ">=19"
|
|
6
|
-
},
|
|
7
|
-
"dependencies": {
|
|
8
|
-
"@jamsrui/hooks": "^0.0.8",
|
|
9
|
-
"@jamsrui/utils": "^0.0.8",
|
|
10
|
-
"@jamsrui/core": "^0.0.7"
|
|
11
|
-
},
|
|
3
|
+
"version": "0.0.10",
|
|
12
4
|
"exports": {
|
|
13
5
|
".": {
|
|
14
6
|
"types": "./dist/index.d.ts",
|
|
15
|
-
"import": "./dist/index.mjs"
|
|
16
|
-
|
|
7
|
+
"import": "./dist/index.mjs"
|
|
8
|
+
},
|
|
9
|
+
"./primitive": {
|
|
10
|
+
"types": "./dist/primitive/index.d.ts",
|
|
11
|
+
"import": "./dist/primitive/index.mjs"
|
|
17
12
|
}
|
|
18
13
|
},
|
|
14
|
+
"peerDependencies": {
|
|
15
|
+
"motion": ">=12",
|
|
16
|
+
"react": ">=19"
|
|
17
|
+
},
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@jamsrui/core": "^0.0.9",
|
|
20
|
+
"@jamsrui/hooks": "^0.0.10",
|
|
21
|
+
"@jamsrui/slot": "^0.0.10",
|
|
22
|
+
"@jamsrui/utils": "^0.0.10"
|
|
23
|
+
},
|
|
19
24
|
"description": "A modern and beautiful Next.js UI components library.",
|
|
20
25
|
"keywords": [
|
|
21
26
|
"react",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{useRenderElement as o}from"@jamsrui/hooks";import{useCheckboxContext as r}from"./checkbox-context";const m=e=>{const{getContentProps:t}=r();return o("div",{props:[t(e)]})};export{m as CheckboxContent};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createContext as t,use as o}from"react";const x=t(null),r=()=>{const e=o(x);if(!e)throw new Error("useCheckboxContext must be used within a CheckboxContext");return e};export{x as CheckboxContext,r as useCheckboxContext};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{useRenderElement as o}from"@jamsrui/hooks";import{useCheckboxContext as t}from"./checkbox-context";const i=e=>{const{getDescriptionProps:r}=t();return o("div",{props:[r(e)]})};export{i as CheckboxDescription};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{useRenderElement as o}from"@jamsrui/hooks";import{useCheckboxContext as s}from"./checkbox-context";const m=e=>{const{getErrorMessageProps:r}=s();return o("span",{props:[r(e)]})};export{m as CheckboxErrorMessage};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { UIProps } from '@jamsrui/utils';
|
|
3
|
-
|
|
4
|
-
declare const CheckboxHelperText: (props: CheckboxHelperText.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
5
|
-
declare namespace CheckboxHelperText {
|
|
6
|
-
interface Props extends UIProps<"div"> {
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export { CheckboxHelperText };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{useRenderElement as t}from"@jamsrui/hooks";import{useCheckboxContext as o}from"./checkbox-context";const x=e=>{const{getHelperTextProps:r}=o();return t("div",{props:[r(e)]})};export{x as CheckboxHelperText};
|
package/dist/checkbox-input.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{useRenderElement as r}from"@jamsrui/hooks";import{useCheckboxContext as o}from"./checkbox-context";const m=e=>{const{getInputProps:t}=o();return r("input",{props:[t(e)]})};export{m as CheckboxInput};
|
package/dist/checkbox-label.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{useRenderElement as o}from"@jamsrui/hooks";import{useCheckboxContext as t}from"./checkbox-context";const m=e=>{const{getLabelProps:r}=t();return o("div",{props:[r(e)]})};export{m as CheckboxLabel};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{useRenderElement as o}from"@jamsrui/hooks";import{useCheckboxContext as t}from"./checkbox-context";const i=e=>{const{getTriggerProps:r}=t();return o("div",{props:[r(e)]})};export{i as CheckboxTrigger};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{useRenderElement as o}from"@jamsrui/hooks";import{useCheckboxContext as p}from"./checkbox-context";const m=e=>{const{getWrapperProps:r}=p();return o("div",{props:[r(e)]})};export{m as CheckboxWrapper};
|
package/dist/styles.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{focusVisibleClasses as e,radiusVariant as r,tv as t}from"@jamsrui/utils";const a="",i=t({slots:{root:["group flex flex-col gap-2","ui-disabled:opacity-60","ui-disabled:cursor-not-allowed"],wrapper:"flex gap-2",label:"shrink-0 text-sm font-normal leading-none text-foreground uig-interactive:cursor-pointer uig-disabled:cursor-not-allowed",helperText:"text-xs text-foreground-600",input:[...e,"border-default-200 uig-hover:border-default-400","relative size-5 appearance-none border-2 uig-checked:border-primary uig-checked:bg-primary uig-interactive:cursor-pointer","uig-disabled:cursor-not-allowed"],trigger:["relative flex size-max items-center","disabled:cursor-not-allowed"],description:"text-xs text-foreground-500",content:"flex flex-col justify-center gap-1",errorMessage:""},variants:{isInvalid:{true:{label:"text-danger",helperText:"text-danger",checkbox:"border-danger"}},radius:r("checkbox")},defaultVariants:{radius:"md"}});export{i as checkboxVariants,a as test};
|
package/dist/use-checkbox.d.mts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import 'react';
|
|
2
|
-
import '@jamsrui/utils';
|
|
3
|
-
export { u as useCheckbox } from './checkbox-jaXFm_b0.mjs';
|
|
4
|
-
import './checkbox-content.mjs';
|
|
5
|
-
import './checkbox-description.mjs';
|
|
6
|
-
import './checkbox-helper-text.mjs';
|
|
7
|
-
import './checkbox-input.mjs';
|
|
8
|
-
import './checkbox-label.mjs';
|
|
9
|
-
import './checkbox-trigger.mjs';
|
|
10
|
-
import './checkbox-wrapper.mjs';
|
|
11
|
-
import './styles.mjs';
|
|
12
|
-
import './checkbox-errror-message.mjs';
|
|
13
|
-
import 'react/jsx-runtime';
|
|
14
|
-
import 'tailwind-variants';
|
package/dist/use-checkbox.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{useCallback as r,useMemo as M}from"react";import{useControlledState as D}from"@jamsrui/hooks";import{cn as a,dataAttrDev as s,mapPropsVariants as R}from"@jamsrui/utils";import{checkboxVariants as f}from"./styles";const j=u=>{const[y,T]=R(u,f.variantKeys),o=f(T),{isChecked:G,onCheckedChange:c,defaultChecked:p,label:n,description:i,helperText:m,isReadonly:I,classNames:t,isDisabled:v,...l}=y,[w=!1,S]=D({defaultProp:p,prop:G,onChange:c}),h=r(()=>({...l,"data-slot":s("root"),"data-component":s("checkbox"),className:o.root({className:a(t?.root,l.className)})}),[t?.root,l,o]),b=r(e=>({...e,"data-slot":s("wrapper"),className:o.wrapper({className:a(t?.wrapper,e.className)})}),[t?.wrapper,o]),x=r(e=>({...e,"data-slot":s("label"),className:o.label({className:a(t?.label,e.className)})}),[t?.label,o]),k=r(e=>({...e,"data-slot":s("input"),className:o.input({className:a(t?.input,e.className)})}),[t?.input,o]),C=r(e=>({...e,"data-slot":s("trigger"),className:o.trigger({className:a(t?.trigger,e.className)})}),[t?.trigger,o]),d=r(e=>({...e,"data-slot":s("description"),className:o.description({className:a(t?.description,e.className)})}),[t?.description,o]),P=r(e=>({...e,"data-slot":s("helperText"),className:o.helperText({className:a(t?.helperText,e.className)})}),[t?.helperText,o]),g=r(e=>({...e,"data-slot":s("content"),className:o.content({className:a(t?.content,e.className)})}),[t?.content,o]),N=r(e=>({...e,"data-slot":s("errorMessage"),className:o.errorMessage({className:a(t?.errorMessage,e.className)})}),[t?.errorMessage,o]);return M(()=>({getRootProps:h,getWrapperProps:b,getLabelProps:x,getInputProps:k,getTriggerProps:C,getDescriptionProps:d,getHelperTextProps:P,getContentProps:g,onCheckedChange:c,defaultChecked:p,label:n,description:i,helperText:m,getErrorMessageProps:N}),[p,i,g,d,N,P,k,x,h,C,b,m,n,c])};export{j as useCheckbox};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|