@bikdotai/bik-component-library 0.0.547-beta.pp-6 → 0.0.547-beta.pp-8

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,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export declare const Menus: ({
2
3
  displayName: string;
3
4
  key: number;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("react"),s=require("./RadioButton.styled.js"),t=require("../TypographyStyle.js"),l=require("../../constants/Theme.js");const a=i=>{const s=i.isDisabled?l.COLORS.content.inactive:i.isActive?l.COLORS.background.positive.vibrant:l.COLORS.content.primary;return e.jsxs("svg",Object.assign({width:i.isSmall?"16":"20",height:i.isSmall?"16":"20",viewBox:i.isSmall?"0 0 16 16":"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[e.jsx("circle",{cx:i.isSmall?"8":"10",cy:i.isSmall?"8":"10",r:i.isSmall?6:9,stroke:s,strokeWidth:i.isSmall?1.5:2}),i.isActive&&e.jsx("circle",{cx:i.isSmall?"8":"10",cy:i.isSmall?"8":"10",r:i.isSmall?3:5,fill:i.isDisabled?l.COLORS.content.inactive:l.COLORS.background.positive.vibrant})]}))};exports.RadioButton=n=>{const[o,r]=i.useState(n.isActive||!1),[c,d]=i.useState(!1),[O,S]=i.useState(!1);i.useEffect((()=>{r(n.isActive)}),[n.isActive]);return e.jsxs(s.RadioButtonContainer,Object.assign({onClick:()=>{var e;if(!n.skipSelectingOff&&!n.isDisabled){const i=!o;r(i),null===(e=n.onValueChange)||void 0===e||e.call(n,i,n.value)}},onMouseEnter:()=>d(!n.skipHoverState),onMouseLeave:()=>d(!1),onMouseDown:()=>S(!n.skipHoverState),onMouseUp:()=>S(!1)},{children:[e.jsx(s.RadioButtonIcon,Object.assign({checked:o,hovered:c,clicked:O,isDisabled:n.isDisabled||!1,size:n.size},{children:e.jsx(a,{isSmall:"SMALL"===n.size,isActive:o,isDisabled:n.isDisabled||!1})})),n.label?"SMALL"===n.size?e.jsx(t.BodyCaption,Object.assign({color:n.isDisabled?l.COLORS.text.disabled:l.COLORS.text.primary,style:{fontWeight:n.boldOnChecked&&o?"600":"normal"}},{children:n.label})):"MEDIUM"===n.labelSize?e.jsx(t.BodySecondary,Object.assign({color:n.isDisabled?l.COLORS.text.disabled:l.COLORS.text.primary,style:{fontWeight:n.boldOnChecked&&o?"600":"normal"}},{children:n.label})):e.jsx(t.BodyPrimary,Object.assign({color:n.isDisabled?l.COLORS.text.disabled:l.COLORS.text.primary,style:{fontWeight:n.boldOnChecked&&o?"600":"normal"}},{children:n.label})):e.jsx(e.Fragment,{})]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("react"),s=require("./RadioButton.styled.js"),t=require("../TypographyStyle.js"),l=require("../../constants/Theme.js");const a=i=>{const s=i.isDisabled?l.COLORS.content.inactive:i.isActive?l.COLORS.background.positive.vibrant:l.COLORS.content.primary;return e.jsxs("svg",Object.assign({width:i.isSmall?"16":"20",height:i.isSmall?"16":"20",viewBox:i.isSmall?"0 0 16 16":"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[e.jsx("circle",{cx:i.isSmall?"8":"10",cy:i.isSmall?"8":"10",r:i.isSmall?6:9,stroke:s,strokeWidth:i.isSmall?1.5:2}),i.isActive&&e.jsx("circle",{cx:i.isSmall?"8":"10",cy:i.isSmall?"8":"10",r:i.isSmall?3:5,fill:i.isDisabled?l.COLORS.content.inactive:l.COLORS.background.positive.vibrant})]}))};exports.RadioButton=r=>{const[n,c]=i.useState(r.isActive||!1),[o,d]=i.useState(!1),[O,b]=i.useState(!1);i.useEffect((()=>{c(r.isActive)}),[r.isActive]);return e.jsxs(s.RadioButtonContainer,Object.assign({onClick:()=>{var e;if(!r.skipSelectingOff&&!r.isDisabled){const i=!n;c(i),null===(e=r.onValueChange)||void 0===e||e.call(r,i,r.value)}},onMouseEnter:()=>d(!r.skipHoverState),onMouseLeave:()=>d(!1),onMouseDown:()=>b(!r.skipHoverState),onMouseUp:()=>b(!1)},{children:[e.jsx(s.RadioButtonIcon,Object.assign({checked:n,hovered:o,clicked:O,isDisabled:r.isDisabled||!1,size:r.size},{children:e.jsx(a,{isSmall:"SMALL"===r.size,isActive:n,isDisabled:r.isDisabled||!1})})),r.label?"DEFAULT"===r.labelSize?r.boldOnChecked?e.jsx(t.TitleSmall,Object.assign({color:r.isDisabled?l.COLORS.text.disabled:l.COLORS.text.primary},{children:r.label})):e.jsx(t.BodySecondary,Object.assign({color:r.isDisabled?l.COLORS.text.disabled:l.COLORS.text.primary},{children:r.label})):r.boldOnChecked?e.jsx(t.TitleRegular,Object.assign({color:r.isDisabled?l.COLORS.text.disabled:l.COLORS.text.primary},{children:r.label})):e.jsx(t.BodyPrimary,Object.assign({color:r.isDisabled?l.COLORS.text.disabled:l.COLORS.text.primary},{children:r.label})):e.jsx(e.Fragment,{})]}))};
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export declare const Menus: ({
2
3
  displayName: string;
3
4
  key: number;
@@ -1 +1 @@
1
- import{jsxs as e,jsx as i,Fragment as s}from"react/jsx-runtime";import{useState as l,useEffect as t}from"react";import{RadioButtonContainer as a,RadioButtonIcon as o}from"./RadioButton.styled.js";import{BodyCaption as n,BodySecondary as r,BodyPrimary as c}from"../TypographyStyle.js";import{COLORS as d}from"../../constants/Theme.js";const b=s=>{const l=s.isDisabled?d.content.inactive:s.isActive?d.background.positive.vibrant:d.content.primary;return e("svg",Object.assign({width:s.isSmall?"16":"20",height:s.isSmall?"16":"20",viewBox:s.isSmall?"0 0 16 16":"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[i("circle",{cx:s.isSmall?"8":"10",cy:s.isSmall?"8":"10",r:s.isSmall?6:9,stroke:l,strokeWidth:s.isSmall?1.5:2}),s.isActive&&i("circle",{cx:s.isSmall?"8":"10",cy:s.isSmall?"8":"10",r:s.isSmall?3:5,fill:s.isDisabled?d.content.inactive:d.background.positive.vibrant})]}))},m=m=>{const[h,v]=l(m.isActive||!1),[p,g]=l(!1),[S,f]=l(!1);t((()=>{v(m.isActive)}),[m.isActive]);return e(a,Object.assign({onClick:()=>{var e;if(!m.skipSelectingOff&&!m.isDisabled){const i=!h;v(i),null===(e=m.onValueChange)||void 0===e||e.call(m,i,m.value)}},onMouseEnter:()=>g(!m.skipHoverState),onMouseLeave:()=>g(!1),onMouseDown:()=>f(!m.skipHoverState),onMouseUp:()=>f(!1)},{children:[i(o,Object.assign({checked:h,hovered:p,clicked:S,isDisabled:m.isDisabled||!1,size:m.size},{children:i(b,{isSmall:"SMALL"===m.size,isActive:h,isDisabled:m.isDisabled||!1})})),m.label?"SMALL"===m.size?i(n,Object.assign({color:m.isDisabled?d.text.disabled:d.text.primary,style:{fontWeight:m.boldOnChecked&&h?"600":"normal"}},{children:m.label})):"MEDIUM"===m.labelSize?i(r,Object.assign({color:m.isDisabled?d.text.disabled:d.text.primary,style:{fontWeight:m.boldOnChecked&&h?"600":"normal"}},{children:m.label})):i(c,Object.assign({color:m.isDisabled?d.text.disabled:d.text.primary,style:{fontWeight:m.boldOnChecked&&h?"600":"normal"}},{children:m.label})):i(s,{})]}))};export{m as RadioButton};
1
+ import{jsxs as i,jsx as e,Fragment as s}from"react/jsx-runtime";import{useState as l,useEffect as t}from"react";import{RadioButtonContainer as a,RadioButtonIcon as o}from"./RadioButton.styled.js";import{TitleSmall as r,BodySecondary as c,TitleRegular as n,BodyPrimary as d}from"../TypographyStyle.js";import{COLORS as b}from"../../constants/Theme.js";const m=s=>{const l=s.isDisabled?b.content.inactive:s.isActive?b.background.positive.vibrant:b.content.primary;return i("svg",Object.assign({width:s.isSmall?"16":"20",height:s.isSmall?"16":"20",viewBox:s.isSmall?"0 0 16 16":"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[e("circle",{cx:s.isSmall?"8":"10",cy:s.isSmall?"8":"10",r:s.isSmall?6:9,stroke:l,strokeWidth:s.isSmall?1.5:2}),s.isActive&&e("circle",{cx:s.isSmall?"8":"10",cy:s.isSmall?"8":"10",r:s.isSmall?3:5,fill:s.isDisabled?b.content.inactive:b.background.positive.vibrant})]}))},v=v=>{const[p,h]=l(v.isActive||!1),[S,g]=l(!1),[x,u]=l(!1);t((()=>{h(v.isActive)}),[v.isActive]);return i(a,Object.assign({onClick:()=>{var i;if(!v.skipSelectingOff&&!v.isDisabled){const e=!p;h(e),null===(i=v.onValueChange)||void 0===i||i.call(v,e,v.value)}},onMouseEnter:()=>g(!v.skipHoverState),onMouseLeave:()=>g(!1),onMouseDown:()=>u(!v.skipHoverState),onMouseUp:()=>u(!1)},{children:[e(o,Object.assign({checked:p,hovered:S,clicked:x,isDisabled:v.isDisabled||!1,size:v.size},{children:e(m,{isSmall:"SMALL"===v.size,isActive:p,isDisabled:v.isDisabled||!1})})),v.label?"DEFAULT"===v.labelSize?v.boldOnChecked?e(r,Object.assign({color:v.isDisabled?b.text.disabled:b.text.primary},{children:v.label})):e(c,Object.assign({color:v.isDisabled?b.text.disabled:b.text.primary},{children:v.label})):v.boldOnChecked?e(n,Object.assign({color:v.isDisabled?b.text.disabled:b.text.primary},{children:v.label})):e(d,Object.assign({color:v.isDisabled?b.text.disabled:b.text.primary},{children:v.label})):e(s,{})]}))};export{v as RadioButton};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bikdotai/bik-component-library",
3
- "version": "0.0.547-beta.pp-6",
3
+ "version": "0.0.547-beta.pp-8",
4
4
  "description": "Bik Component Library",
5
5
  "repository": {
6
6
  "type": "git",