@nild/components 0.0.25 → 0.0.27
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cva as e}from"@nild/shared";import{DISABLED_CLS as a}from"../../_shared/style/index.js";const r=e(["nd-checkbox","group",["flex","items-center"],"cursor-pointer",a],{variants:{size:{small:"gap-1.5",medium:"gap-2",large:"gap-2.5"},disabled:{true:"disabled",false:""}}}),s=e(["relative",["flex","items-center","justify-center"]],{variants:{size:{small:"
|
|
1
|
+
import{cva as e}from"@nild/shared";import{DISABLED_CLS as a}from"../../_shared/style/index.js";const r=e(["nd-checkbox","group",["flex","items-center"],"cursor-pointer",a],{variants:{size:{small:"gap-1.5",medium:"gap-2",large:"gap-2.5"},disabled:{true:"disabled",false:""}}}),s=e(["relative",["flex","items-center","justify-center"]],{variants:{size:{small:"size-3.5 text-sm",medium:"size-4 text-md",large:"size-4.5 text-lg"}}}),t=e([["absolute","inset-0","opacity-0"],["group-enabled:cursor-pointer","group-disabled:cursor-not-allowed"]]),o=e([["flex","items-center","justify-center"],["size-full","rounded-sm","border-solid","border-1","border-primary"],"transition-[background-color,color]"],{compoundVariants:[{checked:!0,variant:"solid",className:["bg-primary text-contrast","group-enabled:group-hover:bg-primary-hover"]},{checked:!0,variant:"outlined",className:["bg-transparent text-primary","group-enabled:group-hover:bg-tertiary-hover"]},{checked:!1,className:["bg-transparent text-transparent","group-enabled:group-hover:bg-tertiary-hover"]}]}),l=e(["w-full"]),i=e(["text-sm"],{variants:{size:{small:"text-sm",medium:"text-md",large:"text-lg"}}}),n=e(["nd-checkbox-group",["flex","gap-x-4","gap-y-2"]],{variants:{direction:{horizontal:"flex-row flex-wrap",vertical:"flex-col"}}});export{r as checkboxClassNames,o as defaultIndicatorBlockClassNames,l as defaultIndicatorIconClassNames,n as groupClassNames,s as indicatorClassNames,t as indicatorInputClassNames,i as labelClassNames};
|
package/dist/radio/Indicator.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as c,jsx as a}from"react/jsx-runtime";import{cnMerge as p}from"@nild/shared";import{forwardRef as h}from"react";import{useRadioContext as N}from"./contexts/index.js";import{indicatorInputClassNames as C,indicatorClassNames as u,defaultIndicatorOuterCircleClassNames as x,defaultIndicatorInnerCircleClassNames as v}from"./style/index.js";const i=h(({className:t,children:o,...n},l)=>{const{variant:e,size:d,checked:s,setChecked:m}=N(),f=o??(r=>c("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[a("circle",{cx:"10",cy:"10",
|
|
1
|
+
import{jsxs as c,jsx as a}from"react/jsx-runtime";import{cnMerge as p}from"@nild/shared";import{forwardRef as h}from"react";import{useRadioContext as N}from"./contexts/index.js";import{indicatorInputClassNames as C,indicatorClassNames as u,defaultIndicatorOuterCircleClassNames as x,defaultIndicatorInnerCircleClassNames as v}from"./style/index.js";const i=h(({className:t,children:o,...n},l)=>{const{variant:e,size:d,checked:s,setChecked:m}=N(),f=o??(r=>c("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[a("circle",{cx:"10",cy:"10",className:x({variant:e,checked:r})}),a("circle",{cx:"10",cy:"10",className:v({variant:e,checked:r})})]}));return c("div",{...n,className:p(u({size:d}),t),ref:l,children:[f(!!s),a("input",{type:"radio",className:C(),checked:s,onChange:m})]})});i.displayName="Radio.Indicator";export{i as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cva as a}from"@nild/shared";import{DISABLED_CLS as e}from"../../_shared/style/index.js";const r=a(["nd-radio","group",["flex","items-center"],"cursor-pointer",e],{variants:{size:{small:"gap-1.5",medium:"gap-2",large:"gap-2.5"},disabled:{true:"disabled",false:""}}}),s=a(["relative",["flex","items-center","justify-center"]],{variants:{size:{small:"size-3.5",medium:"size-4",large:"size-4.5"}}}),l=a([["absolute","inset-0","opacity-0"],["group-enabled:cursor-pointer","group-disabled:cursor-not-allowed"]]),i=a(["stroke-primary","stroke-1","transition-[stroke,fill]"],{compoundVariants:[{checked:!0,variant:"solid",className:["fill-primary","group-enabled:group-hover:fill-primary-hover"]},{checked:!0,variant:"outlined",className:["fill-transparent","group-enabled:group-hover:fill-tertiary-hover"]},{checked:!1,className:["fill-transparent","group-enabled:group-hover:fill-tertiary-hover"]}]}),t=a(["transition-[fill]"],{variants:{variant:{solid:"r-4.5",outlined:"r-5.5"}},compoundVariants:[{checked:!0,variant:"solid",className:["fill-contrast"]},{checked:!0,variant:"outlined",className:["fill-primary"]},{checked:!1,className:["fill-transparent"]}]}),o=a(["text-sm"],{variants:{size:{small:"text-sm",medium:"text-md",large:"text-lg"}}}),n=a(["nd-
|
|
1
|
+
import{cva as a}from"@nild/shared";import{DISABLED_CLS as e}from"../../_shared/style/index.js";const r=a(["nd-radio","group",["flex","items-center"],"cursor-pointer",e],{variants:{size:{small:"gap-1.5",medium:"gap-2",large:"gap-2.5"},disabled:{true:"disabled",false:""}}}),s=a(["relative",["flex","items-center","justify-center"]],{variants:{size:{small:"size-3.5 text-sm",medium:"size-4 text-md",large:"size-4.5 text-lg"}}}),l=a([["absolute","inset-0","opacity-0"],["group-enabled:cursor-pointer","group-disabled:cursor-not-allowed"]]),i=a(["stroke-primary","stroke-1","r-9","transition-[stroke,fill]"],{compoundVariants:[{checked:!0,variant:"solid",className:["fill-primary","group-enabled:group-hover:fill-primary-hover"]},{checked:!0,variant:"outlined",className:["fill-transparent","group-enabled:group-hover:fill-tertiary-hover"]},{checked:!1,className:["fill-transparent","group-enabled:group-hover:fill-tertiary-hover"]}]}),t=a(["transition-[fill]"],{variants:{variant:{solid:"r-4.5",outlined:"r-5.5"}},compoundVariants:[{checked:!0,variant:"solid",className:["fill-contrast"]},{checked:!0,variant:"outlined",className:["fill-primary"]},{checked:!1,className:["fill-transparent"]}]}),o=a(["text-sm"],{variants:{size:{small:"text-sm",medium:"text-md",large:"text-lg"}}}),n=a(["nd-radio-group",["flex","gap-x-4","gap-y-2"]],{variants:{direction:{horizontal:"flex-row flex-wrap",vertical:"flex-col"}}});export{t as defaultIndicatorInnerCircleClassNames,i as defaultIndicatorOuterCircleClassNames,n as groupClassNames,s as indicatorClassNames,l as indicatorInputClassNames,o as labelClassNames,r as radioClassNames};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nild/components",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.27",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./dist/index.js",
|
|
7
7
|
"exports": {
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
"@floating-ui/dom": "1.7.1"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"react": "
|
|
33
|
-
"react-dom": "
|
|
34
|
-
"@nild/shared": "0.0.
|
|
35
|
-
"@nild/
|
|
36
|
-
"@nild/
|
|
32
|
+
"react": "^18.2.0",
|
|
33
|
+
"react-dom": "^18.2.0",
|
|
34
|
+
"@nild/shared": "0.0.12",
|
|
35
|
+
"@nild/icons": "0.0.13",
|
|
36
|
+
"@nild/hooks": "0.0.14"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
39
|
"build": "vite build --mode PROD",
|