New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@pikas-ui/checkbox

Package Overview
Dependencies
Maintainers
1
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pikas-ui/checkbox - npm Package Compare versions

Comparing version 3.3.9 to 3.3.10

6

dist/Checkbox.d.ts

@@ -9,4 +9,4 @@ import { PikasCSS, PikasColor, PikasShadow, BorderRadius, PikasFontSize } from '@pikas-ui/styles';

};
declare type CheckboxSide = keyof typeof checkboxSide;
declare type CheckboxCSS = {
type CheckboxSide = keyof typeof checkboxSide;
type CheckboxCSS = {
container?: PikasCSS;

@@ -19,3 +19,3 @@ label?: PikasCSS;

};
declare type CheckboxProps = {
type CheckboxProps = {
defaultChecked?: boolean;

@@ -22,0 +22,0 @@ onChange?: (checked: boolean) => void;

@@ -1,2 +0,2 @@

"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _jsxruntime = require('react/jsx-runtime');var _styles = require('@pikas-ui/styles');var _icons = require('@pikas-ui/icons');var _text = require('@pikas-ui/text');var _react = require('react');var _reactcheckbox = require('@radix-ui/react-checkbox');var _fontcolorcontrast = require('font-color-contrast'); var _fontcolorcontrast2 = _interopRequireDefault(_fontcolorcontrast);const H=_styles.styled.call(void 0, "div",{display:"flex",flexDirection:"column",userSelect:"none"}),Y=_styles.styled.call(void 0, _reactcheckbox.Root,{all:"unset",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",borderStyle:"solid",variants:{focus:{true:{outline:"solid",outlineColor:"$PRIMARY",outlineWidth:2}}}}),z=_styles.styled.call(void 0, _reactcheckbox.Indicator,{}),U=_styles.styled.call(void 0, "div",{display:"flex",alignItems:"center"}),X= exports.checkboxSide ={left:!0,right:!0},Z= exports.Checkbox =({id:c,label:r,textError:f,fontSize:m,className:N,defaultChecked:b=!1,checked:s,onChange:k,disabled:n=!1,required:F=!1,name:E,backgroundColorName:C="WHITE",backgroundColorNameChecked:S="PRIMARY",borderRadius:L="md",boxShadow:T="DIMINUTION_1",borderColorName:x,borderWidth:w=0,size:e=24,side:p="right",outline:M=!0,indeterminate:l=!1,css:o})=>{const i=_styles.useTheme.call(void 0, ),[d,u]=_react.useState.call(void 0, l?"indeterminate":b),[W,g]=_react.useState.call(void 0, !1),A=y=>{u(y),k&&k(y)};return _react.useEffect.call(void 0, ()=>{s!==void 0&&u(s)},[s]),_react.useEffect.call(void 0, ()=>{l&&u("indeterminate")},[l]),_jsxruntime.jsxs.call(void 0, H,{className:N,css:{fontSize:m&&`$${m}`,cursor:n?"not-allowed":void 0,opacity:n?.5:1,"& > *":{pointerEvents:n?"none":void 0},..._optionalChain([o, 'optionalAccess', _ => _.container])},children:[_jsxruntime.jsxs.call(void 0, U,{children:[r&&p==="left"?_jsxruntime.jsx.call(void 0, _text.Label,{htmlFor:c,css:{marginRight:8,fontWeight:"$NORMAL",..._optionalChain([o, 'optionalAccess', _2 => _2.label])},children:r}):null,_jsxruntime.jsx.call(void 0, Y,{defaultChecked:b,id:c,onCheckedChange:A,checked:d,disabled:n,required:F,name:E,focus:M?W:void 0,onFocus:()=>g(!0),onBlur:()=>g(!1),css:{backgroundColor:`$${C}`,br:L,boxShadow:`$${T}`,borderColor:x&&`$${x}`,borderWidth:w,width:e,height:e,'&[aria-checked="true"]':{backgroundColor:`$${S}`},..._optionalChain([o, 'optionalAccess', _3 => _3.checkboxRoot])},children:_jsxruntime.jsxs.call(void 0, z,{css:{color:i&&_fontcolorcontrast2.default.call(void 0, i.colors[S].value,.7),..._optionalChain([o, 'optionalAccess', _4 => _4.checkboxIndicator])},children:[d==="indeterminate"&&_jsxruntime.jsx.call(void 0, _icons.IconByName,{name:"bx:minus",colorHex:i&&_fontcolorcontrast2.default.call(void 0, i.colors[C].value,.7),css:{..._optionalChain([o, 'optionalAccess', _5 => _5.icon]),container:{opacity:.5,..._optionalChain([o, 'optionalAccess', _6 => _6.icon, 'optionalAccess', _7 => _7.container])}},size:e?e/1.25:void 0}),d===!0&&_jsxruntime.jsx.call(void 0, _icons.IconByName,{name:"bx:check",size:e?e/1.25:void 0,css:_optionalChain([o, 'optionalAccess', _8 => _8.icon])})]})}),r&&p==="right"?_jsxruntime.jsx.call(void 0, _text.Label,{htmlFor:c,css:{marginLeft:8,fontWeight:"$NORMAL",..._optionalChain([o, 'optionalAccess', _9 => _9.label])},children:r}):null]}),f?_jsxruntime.jsx.call(void 0, _text.TextError,{css:{marginTop:5,..._optionalChain([o, 'optionalAccess', _10 => _10.textError])},children:f}):null]})};exports.Checkbox = Z; exports.checkboxSide = X;
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _jsxruntime = require('react/jsx-runtime');var _styles = require('@pikas-ui/styles');var _icons = require('@pikas-ui/icons');var _text = require('@pikas-ui/text');var _react = require('react');var _reactcheckbox = require('@radix-ui/react-checkbox');var _fontcolorcontrast = require('font-color-contrast'); var _fontcolorcontrast2 = _interopRequireDefault(_fontcolorcontrast);const H=_styles.styled.call(void 0, "div",{display:"flex",flexDirection:"column",userSelect:"none"}),Y=_styles.styled.call(void 0, _reactcheckbox.Root,{all:"unset",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",borderStyle:"solid",variants:{focus:{true:{outline:"solid",outlineColor:"$PRIMARY",outlineWidth:2}}}}),_=_styles.styled.call(void 0, _reactcheckbox.Indicator,{}),z=_styles.styled.call(void 0, "div",{display:"flex",alignItems:"center"}),V= exports.checkboxSide ={left:!0,right:!0},Z= exports.Checkbox =({id:c,label:r,textError:f,fontSize:m,className:F,defaultChecked:b=!1,checked:s,onChange:k,disabled:n=!1,required:N=!1,name:E,backgroundColorName:C="WHITE_FIX",backgroundColorNameChecked:S="PRIMARY",borderRadius:L="md",boxShadow:T="DIMINUTION_1",borderColorName:x,borderWidth:w=0,size:e=24,side:p="right",outline:M=!0,indeterminate:l=!1,css:o})=>{const i=_styles.useTheme.call(void 0, ),[d,u]=_react.useState.call(void 0, l?"indeterminate":b),[W,g]=_react.useState.call(void 0, !1),A=y=>{u(y),k&&k(y)};return _react.useEffect.call(void 0, ()=>{s!==void 0&&u(s)},[s]),_react.useEffect.call(void 0, ()=>{l&&u("indeterminate")},[l]),_jsxruntime.jsxs.call(void 0, H,{className:F,css:{fontSize:m&&`$${m}`,cursor:n?"not-allowed":void 0,opacity:n?.5:1,"& > *":{pointerEvents:n?"none":void 0},..._optionalChain([o, 'optionalAccess', _2 => _2.container])},children:[_jsxruntime.jsxs.call(void 0, z,{children:[r&&p==="left"?_jsxruntime.jsx.call(void 0, _text.Label,{htmlFor:c,css:{marginRight:8,fontWeight:"$NORMAL",..._optionalChain([o, 'optionalAccess', _3 => _3.label])},children:r}):null,_jsxruntime.jsx.call(void 0, Y,{defaultChecked:b,id:c,onCheckedChange:A,checked:d,disabled:n,required:N,name:E,focus:M?W:void 0,onFocus:()=>g(!0),onBlur:()=>g(!1),css:{backgroundColor:`$${C}`,br:L,boxShadow:`$${T}`,borderColor:x&&`$${x}`,borderWidth:w,width:e,height:e,'&[aria-checked="true"]':{backgroundColor:`$${S}`},..._optionalChain([o, 'optionalAccess', _4 => _4.checkboxRoot])},children:_jsxruntime.jsxs.call(void 0, _,{css:{color:i&&_fontcolorcontrast2.default.call(void 0, i.colors[S].value,.7),..._optionalChain([o, 'optionalAccess', _5 => _5.checkboxIndicator])},children:[d==="indeterminate"&&_jsxruntime.jsx.call(void 0, _icons.IconByName,{name:"bx:minus",colorHex:i&&_fontcolorcontrast2.default.call(void 0, i.colors[C].value,.7),css:{..._optionalChain([o, 'optionalAccess', _6 => _6.icon]),container:{opacity:.5,..._optionalChain([o, 'optionalAccess', _7 => _7.icon, 'optionalAccess', _8 => _8.container])}},size:e?e/1.25:void 0}),d===!0&&_jsxruntime.jsx.call(void 0, _icons.IconByName,{name:"bx:check",size:e?e/1.25:void 0,css:_optionalChain([o, 'optionalAccess', _9 => _9.icon])})]})}),r&&p==="right"?_jsxruntime.jsx.call(void 0, _text.Label,{htmlFor:c,css:{marginLeft:8,fontWeight:"$NORMAL",..._optionalChain([o, 'optionalAccess', _10 => _10.label])},children:r}):null]}),f?_jsxruntime.jsx.call(void 0, _text.TextError,{css:{marginTop:5,..._optionalChain([o, 'optionalAccess', _11 => _11.textError])},children:f}):null]})};exports.Checkbox = Z; exports.checkboxSide = V;
//# sourceMappingURL=Checkbox.js.map
{
"name": "@pikas-ui/checkbox",
"version": "3.3.9",
"version": "3.3.10",
"private": false,

@@ -42,5 +42,5 @@ "keywords": [

"dependencies": {
"@pikas-ui/icons": "3.3.6",
"@pikas-ui/styles": "3.5.6",
"@pikas-ui/text": "4.2.6",
"@pikas-ui/icons": "3.3.7",
"@pikas-ui/styles": "3.5.7",
"@pikas-ui/text": "4.2.7",
"@radix-ui/react-checkbox": "1.0.1",

@@ -55,13 +55,13 @@ "font-color-contrast": "11.1.0"

"@pikas/prettier": "1.0.0",
"eslint-config-custom": "1.0.0",
"@pikas/tsconfig": "1.0.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"@types/node": "18.11.9",
"@types/react": "18.0.25",
"@types/react-dom": "18.0.8",
"@types/react-dom": "18.0.9",
"cross-env": "7.0.3",
"eslint": "8.27.0",
"tsup": "6.4.0",
"typescript": "4.8.4"
"eslint-config-custom": "1.0.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"tsup": "6.5.0",
"typescript": "4.9.3"
},

@@ -68,0 +68,0 @@ "node": "12.20.0 || 14.13.1 || >=16.0.0",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc