@bikdotai/bik-component-library 0.0.9 → 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.
@@ -1,88 +1,88 @@
1
- import t from"styled-components";import{COLORS as e,FONTS as i}from"../constants/Theme.js";const o=t=>t+"px";t.div`
1
+ import t from"styled-components";import{COLORS as e,FONTS as i}from"../constants/Theme.js";const o=t=>t+"px",n=t.div`
2
2
  font-family: Inter;
3
3
  color: ${t=>t.color||e.text.primary};
4
4
  font-weight: ${t=>i.titleLarge.fontWeight};
5
5
  font-size: ${t=>o(i.titleLarge.fontSize)};
6
6
  line-height: ${t=>o(i.titleLarge.lineHeight)};
7
- `,t.div`
7
+ `,r=t.div`
8
8
  font-family: Inter;
9
9
  color: ${t=>t.color||e.text.primary};
10
10
  font-weight: ${t=>i.titleMedium.fontWeight};
11
11
  font-size: ${t=>o(i.titleMedium.fontSize)};
12
12
  line-height: ${t=>o(i.titleMedium.lineHeight)};
13
- `,t.div`
13
+ `,l=t.div`
14
14
  font-family: Inter;
15
15
  color: ${t=>t.color||e.text.primary};
16
16
  font-weight: ${t=>i.titleRegular.fontWeight};
17
17
  font-size: ${t=>o(i.titleRegular.fontSize)};
18
18
  line-height: ${t=>o(i.titleRegular.lineHeight)};
19
- `;const n=t.div`
19
+ `,f=t.div`
20
20
  font-family: Inter;
21
21
  color: ${t=>t.color||e.text.primary};
22
22
  font-weight: ${t=>i.titleSmall.fontWeight};
23
23
  font-size: ${t=>o(i.titleSmall.fontSize)};
24
24
  line-height: ${t=>o(i.titleSmall.lineHeight)};
25
- `;t.div`
25
+ `,g=t.div`
26
26
  font-family: Inter;
27
27
  color: ${t=>t.color||e.text.primary};
28
28
  font-weight: ${t=>i.display.fontWeight};
29
29
  font-size: ${t=>o(i.display.fontSize)};
30
30
  line-height: ${t=>o(i.display.lineHeight)};
31
- `,t.div`
31
+ `,a=t.div`
32
32
  font-family: Inter;
33
33
  color: ${t=>t.color||e.text.primary};
34
34
  font-weight: ${t=>i.bodyPrimary.fontWeight};
35
35
  font-size: ${t=>o(i.bodyLarge.fontSize)};
36
36
  line-height: ${t=>o(i.bodyLarge.lineHeight)};
37
- `;const r=t.div`
37
+ `,h=t.div`
38
38
  font-family: Inter;
39
39
  color: ${t=>t.color||e.text.primary};
40
40
  font-weight: ${t=>i.bodyPrimary.fontWeight};
41
41
  font-size: ${t=>o(i.bodyPrimary.fontSize)};
42
42
  line-height: ${t=>o(i.bodyPrimary.lineHeight)};
43
- `,l=t.div`
43
+ `,$=t.div`
44
44
  font-family: Inter;
45
45
  color: ${t=>e.content.primary};
46
46
  font-weight: ${t=>i.bodySecondary.fontWeight};
47
47
  font-size: ${t=>o(i.bodySecondary.fontSize)};
48
48
  line-height: ${t=>o(i.bodySecondary.lineHeight)};
49
- `;t(r)`
49
+ `,c=t(h)`
50
50
  text-decoration: underline;
51
51
  color: ${t=>e.content.brand};
52
52
  text-decoration-color: ${t=>e.content.brand};
53
53
  cursor: pointer;
54
- `,t(l)`
54
+ `,y=t($)`
55
55
  text-decoration: underline;
56
56
  color: ${t=>e.content.brand};
57
57
  text-decoration-color: ${t=>e.content.brand};
58
58
  cursor: pointer;
59
- `;const f=t.div`
59
+ `,d=t.div`
60
60
  font-family: Inter;
61
61
  color: ${t=>t.color||e.text.primary};
62
62
  font-weight: ${t=>i.caption.fontWeight};
63
63
  font-size: ${t=>o(i.caption.fontSize)};
64
64
  line-height: ${t=>o(i.caption.lineHeight)};
65
- `;t.div`
65
+ `,m=t.div`
66
66
  color: ${t=>t.color||e.text.primary};
67
67
  font-weight: ${t=>i.tiny.fontWeight};
68
68
  font-size: ${t=>o(i.tiny.fontSize)};
69
69
  line-height: ${t=>o(i.tiny.lineHeight)};
70
- `;const g=t.div`
70
+ `,s=t.div`
71
71
  font-family: Inter;
72
72
  color: ${t=>t.color||e.text.primary};
73
73
  font-weight: ${t=>i.buttonLarge.fontWeight};
74
74
  font-size: ${t=>o(i.buttonLarge.fontSize)};
75
75
  line-height: ${t=>o(i.buttonLarge.lineHeight)};
76
- `,a=t.div`
76
+ `,p=t.div`
77
77
  font-family: Inter;
78
78
  color: ${t=>t.color||e.text.primary};
79
79
  font-weight: ${t=>i.buttonRegular.fontWeight};
80
80
  font-size: ${t=>o(i.buttonRegular.fontSize)};
81
81
  line-height: ${t=>o(i.buttonRegular.lineHeight)};
82
- `;t.div`
82
+ `,z=t.div`
83
83
  font-family: Inter;
84
84
  color: ${t=>t.color||e.text.primary};
85
85
  font-weight: ${t=>i.subHeading.fontWeight};
86
86
  font-size: ${t=>o(i.subHeading.fontSize)};
87
87
  line-height: ${t=>o(i.subHeading.lineHeight)};
88
- `;export{f as BodyCaption,r as BodyPrimary,l as BodySecondary,g as ButtonLarge,a as ButtonRegular,n as TitleSmall};
88
+ `;export{d as BodyCaption,a as BodyLarge,h as BodyPrimary,c as BodyPrimaryLink,$ as BodySecondary,y as BodySecondaryLink,m as BodyTiny,s as ButtonLarge,p as ButtonRegular,g as Display,z as SubHeading,n as TitleLarge,r as TitleMedium,l as TitleRegular,f as TitleSmall};
@@ -5,5 +5,6 @@ export type CheckBoxProps = {
5
5
  isDisabled?: boolean;
6
6
  value?: string;
7
7
  onValueChange: (checked: boolean, value?: string) => void;
8
+ controlFromOutside?: boolean;
8
9
  };
9
10
  export declare const CheckBox: React.FC<CheckBoxProps>;
@@ -1 +1 @@
1
- import{jsx as e,jsxs as i}from"react/jsx-runtime";import{useState as s}from"react";import{CheckboxContainer as t,CheckboxIcon as l}from"./CheckBox.styled.js";import{COLORS as n}from"../../constants/Theme.js";const o=s=>i("svg",Object.assign({width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[e("rect",{x:"0",y:"0",width:"18",height:"18",rx:"4",fill:s.isDisabled?n.content.inactive:n.background.positive.vibrant}),!s.isPartial&&e("svg",Object.assign({width:"10",height:"9",x:"4",y:"4",viewBox:"0 0 10 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:e("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.68189 1.06043C10.0724 1.45096 10.0724 2.08412 9.68189 2.47464L4.02501 8.13152C3.63449 8.52205 3.00132 8.52205 2.6108 8.13152L0.489684 6.01041C0.0991601 5.61988 0.0991598 4.98672 0.489684 4.59619C0.880209 4.20567 1.51337 4.20567 1.9039 4.59619L3.31791 6.0102L8.26768 1.06043C8.6582 0.669907 9.29137 0.669907 9.68189 1.06043Z",fill:"white"})})),s.isPartial&&e("rect",{x:"5",y:"8",width:"8",height:"2",rx:"1",fill:n.surface.standard})]})),r=i=>{var n;const[r,a]=s(i.isChecked||!1),[c,d]=s(!1),[h,v]=s(!1);return e(t,Object.assign({onClick:()=>{var e;if(!i.isDisabled){const s=!r;a(s),null===(e=i.onValueChange)||void 0===e||e.call(i,s,i.value)}},onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),onMouseDown:()=>v(!0),onMouseUp:()=>v(!1)},{children:e(l,Object.assign({checked:r,hovered:c,clicked:h,isDisabled:i.isDisabled||!1},{children:r&&e(o,{isPartial:null!==(n=i.isPartiallyChecked)&&void 0!==n&&n,isDisabled:i.isDisabled||!1})}))}))};export{r as CheckBox};
1
+ import{jsx as e,jsxs as i}from"react/jsx-runtime";import{useState as s,useEffect as t}from"react";import{CheckboxContainer as l,CheckboxIcon as o}from"./CheckBox.styled.js";import{COLORS as n}from"../../constants/Theme.js";const r=s=>i("svg",Object.assign({width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[e("rect",{x:"0",y:"0",width:"18",height:"18",rx:"4",fill:s.isDisabled?n.content.inactive:n.background.positive.vibrant}),!s.isPartial&&e("svg",Object.assign({width:"10",height:"9",x:"4",y:"4",viewBox:"0 0 10 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:e("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.68189 1.06043C10.0724 1.45096 10.0724 2.08412 9.68189 2.47464L4.02501 8.13152C3.63449 8.52205 3.00132 8.52205 2.6108 8.13152L0.489684 6.01041C0.0991601 5.61988 0.0991598 4.98672 0.489684 4.59619C0.880209 4.20567 1.51337 4.20567 1.9039 4.59619L3.31791 6.0102L8.26768 1.06043C8.6582 0.669907 9.29137 0.669907 9.68189 1.06043Z",fill:"white"})})),s.isPartial&&e("rect",{x:"5",y:"8",width:"8",height:"2",rx:"1",fill:n.surface.standard})]})),a=i=>{var n;const[a,d]=s(i.isChecked||!1),[c,h]=s(!1),[u,v]=s(!1);t((()=>{i.controlFromOutside&&d(i.isChecked)}),[i.isChecked,i.controlFromOutside]);return e(l,Object.assign({onClick:()=>{var e,s;if(!i.isDisabled){if(i.controlFromOutside)return void(null===(e=i.onValueChange)||void 0===e||e.call(i,!i.isChecked,i.value));const t=!a;d(t),null===(s=i.onValueChange)||void 0===s||s.call(i,t,i.value)}},onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),onMouseDown:()=>v(!0),onMouseUp:()=>v(!1)},{children:e(o,Object.assign({checked:a,hovered:c,clicked:u,isDisabled:i.isDisabled||!1},{children:a&&e(r,{isPartial:null!==(n=i.isPartiallyChecked)&&void 0!==n&&n,isDisabled:i.isDisabled||!1})}))}))};export{a as CheckBox};
@@ -3,24 +3,25 @@ import e,{css as i}from"styled-components";import{COLORS as t}from"../../constan
3
3
  align-items: center;
4
4
  cursor: pointer;
5
5
  `,r=e.div`
6
- width: 14px;
7
- height: 14px;
8
- border-radius: 4px;
9
- border: 2px solid black;
10
- display: flex;
11
- justify-content: center;
12
- align-items: center;
13
- ${e=>e.checked&&i`
14
- border: 0px;
15
- width: 18px;
16
- height: 18px;
17
- `}
18
- ${e=>e.hovered&&i`
19
- outline: 3px solid ${t.surface.hovered};
20
- `}
6
+ width: 14px;
7
+ height: 14px;
8
+ border-radius: 4px;
9
+ border: 2px solid black;
10
+ display: flex;
11
+ justify-content: center;
12
+ align-items: center;
13
+ box-sizing: content-box;
14
+ ${e=>e.checked&&i`
15
+ border: 0px;
16
+ width: 18px;
17
+ height: 18px;
18
+ `}
19
+ ${e=>e.hovered&&i`
20
+ outline: 3px solid ${t.surface.hovered};
21
+ `}
21
22
  ${e=>e.clicked&&!e.isDisabled&&i`
22
- outline: 3px solid
23
- ${e.checked?t.stroke.positive.lightAlt:t.surface.hovered};
24
- outline-offset: 2px;
25
- `}
23
+ outline: 3px solid
24
+ ${e.checked?t.stroke.positive.lightAlt:t.surface.hovered};
25
+ outline-offset: 2px;
26
+ `}
26
27
  `;export{o as CheckboxContainer,r as CheckboxIcon};
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ import 'bootstrap/dist/css/bootstrap.min.css';
3
+ export interface ProgressBarProps {
4
+ completed: number;
5
+ isAnimated: boolean;
6
+ color?: string;
7
+ height?: number;
8
+ }
9
+ export declare const ProgressBarComponent: (props: ProgressBarProps) => JSX.Element;
10
+ export declare const ProgressCompletedBar: import("styled-components").StyledComponent<"div", any, {
11
+ color: string;
12
+ }, never>;
@@ -0,0 +1,6 @@
1
+ import{jsx as o}from"react/jsx-runtime";import{ProgressBar as t}from"react-bootstrap";import r from"styled-components";import{COLORS as e}from"../../constants/Theme.js";const c=r=>o(n,Object.assign({color:r.color?r.color:e.content.brand},{children:o(t,{animated:r.isAnimated,now:r.completed,style:{height:`${r.height?r.height:8}px`}})})),n=r.div`
2
+ flex: 50%;
3
+ .progress-bar {
4
+ background-color: ${o=>o.color};
5
+ }
6
+ `;export{c as ProgressBarComponent,n as ProgressCompletedBar};
@@ -0,0 +1 @@
1
+ export * from './ProgressBarComponent';
@@ -1,7 +1,6 @@
1
1
  import React, { FunctionComponent } from 'react';
2
2
  import { ToastPosition } from 'react-toastify';
3
3
  import { IconProps } from 'react-toastify/dist/components';
4
- import 'react-toastify/dist/ReactToastify.css';
5
4
  export type ToasterButtonProps = {
6
5
  showButton?: boolean;
7
6
  onButtonClick?: any;