@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
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("styled-components"),e=require("../constants/Theme.js");function i(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var o=i(t);const n=t=>t+"px";o.default.div`
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("styled-components"),e=require("../constants/Theme.js");function i(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var o=i(t);const n=t=>t+"px",r=o.default.div`
2
2
  font-family: Inter;
3
3
  color: ${t=>t.color||e.COLORS.text.primary};
4
4
  font-weight: ${t=>e.FONTS.titleLarge.fontWeight};
5
5
  font-size: ${t=>n(e.FONTS.titleLarge.fontSize)};
6
6
  line-height: ${t=>n(e.FONTS.titleLarge.lineHeight)};
7
- `,o.default.div`
7
+ `,l=o.default.div`
8
8
  font-family: Inter;
9
9
  color: ${t=>t.color||e.COLORS.text.primary};
10
10
  font-weight: ${t=>e.FONTS.titleMedium.fontWeight};
11
11
  font-size: ${t=>n(e.FONTS.titleMedium.fontSize)};
12
12
  line-height: ${t=>n(e.FONTS.titleMedium.lineHeight)};
13
- `,o.default.div`
13
+ `,a=o.default.div`
14
14
  font-family: Inter;
15
15
  color: ${t=>t.color||e.COLORS.text.primary};
16
16
  font-weight: ${t=>e.FONTS.titleRegular.fontWeight};
17
17
  font-size: ${t=>n(e.FONTS.titleRegular.fontSize)};
18
18
  line-height: ${t=>n(e.FONTS.titleRegular.lineHeight)};
19
- `;const r=o.default.div`
19
+ `,f=o.default.div`
20
20
  font-family: Inter;
21
21
  color: ${t=>t.color||e.COLORS.text.primary};
22
22
  font-weight: ${t=>e.FONTS.titleSmall.fontWeight};
23
23
  font-size: ${t=>n(e.FONTS.titleSmall.fontSize)};
24
24
  line-height: ${t=>n(e.FONTS.titleSmall.lineHeight)};
25
- `;o.default.div`
25
+ `,S=o.default.div`
26
26
  font-family: Inter;
27
27
  color: ${t=>t.color||e.COLORS.text.primary};
28
28
  font-weight: ${t=>e.FONTS.display.fontWeight};
29
29
  font-size: ${t=>n(e.FONTS.display.fontSize)};
30
30
  line-height: ${t=>n(e.FONTS.display.lineHeight)};
31
- `,o.default.div`
31
+ `,d=o.default.div`
32
32
  font-family: Inter;
33
33
  color: ${t=>t.color||e.COLORS.text.primary};
34
34
  font-weight: ${t=>e.FONTS.bodyPrimary.fontWeight};
35
35
  font-size: ${t=>n(e.FONTS.bodyLarge.fontSize)};
36
36
  line-height: ${t=>n(e.FONTS.bodyLarge.lineHeight)};
37
- `;const l=o.default.div`
37
+ `,g=o.default.div`
38
38
  font-family: Inter;
39
39
  color: ${t=>t.color||e.COLORS.text.primary};
40
40
  font-weight: ${t=>e.FONTS.bodyPrimary.fontWeight};
41
41
  font-size: ${t=>n(e.FONTS.bodyPrimary.fontSize)};
42
42
  line-height: ${t=>n(e.FONTS.bodyPrimary.lineHeight)};
43
- `,f=o.default.div`
43
+ `,O=o.default.div`
44
44
  font-family: Inter;
45
45
  color: ${t=>e.COLORS.content.primary};
46
46
  font-weight: ${t=>e.FONTS.bodySecondary.fontWeight};
47
47
  font-size: ${t=>n(e.FONTS.bodySecondary.fontSize)};
48
48
  line-height: ${t=>n(e.FONTS.bodySecondary.lineHeight)};
49
- `;o.default(l)`
49
+ `,h=o.default(g)`
50
50
  text-decoration: underline;
51
51
  color: ${t=>e.COLORS.content.brand};
52
52
  text-decoration-color: ${t=>e.COLORS.content.brand};
53
53
  cursor: pointer;
54
- `,o.default(f)`
54
+ `,y=o.default(O)`
55
55
  text-decoration: underline;
56
56
  color: ${t=>e.COLORS.content.brand};
57
57
  text-decoration-color: ${t=>e.COLORS.content.brand};
58
58
  cursor: pointer;
59
- `;const a=o.default.div`
59
+ `,$=o.default.div`
60
60
  font-family: Inter;
61
61
  color: ${t=>t.color||e.COLORS.text.primary};
62
62
  font-weight: ${t=>e.FONTS.caption.fontWeight};
63
63
  font-size: ${t=>n(e.FONTS.caption.fontSize)};
64
64
  line-height: ${t=>n(e.FONTS.caption.lineHeight)};
65
- `;o.default.div`
65
+ `,c=o.default.div`
66
66
  color: ${t=>t.color||e.COLORS.text.primary};
67
67
  font-weight: ${t=>e.FONTS.tiny.fontWeight};
68
68
  font-size: ${t=>n(e.FONTS.tiny.fontSize)};
69
69
  line-height: ${t=>n(e.FONTS.tiny.lineHeight)};
70
- `;const S=o.default.div`
70
+ `,u=o.default.div`
71
71
  font-family: Inter;
72
72
  color: ${t=>t.color||e.COLORS.text.primary};
73
73
  font-weight: ${t=>e.FONTS.buttonLarge.fontWeight};
74
74
  font-size: ${t=>n(e.FONTS.buttonLarge.fontSize)};
75
75
  line-height: ${t=>n(e.FONTS.buttonLarge.lineHeight)};
76
- `,O=o.default.div`
76
+ `,s=o.default.div`
77
77
  font-family: Inter;
78
78
  color: ${t=>t.color||e.COLORS.text.primary};
79
79
  font-weight: ${t=>e.FONTS.buttonRegular.fontWeight};
80
80
  font-size: ${t=>n(e.FONTS.buttonRegular.fontSize)};
81
81
  line-height: ${t=>n(e.FONTS.buttonRegular.lineHeight)};
82
- `;o.default.div`
82
+ `,T=o.default.div`
83
83
  font-family: Inter;
84
84
  color: ${t=>t.color||e.COLORS.text.primary};
85
85
  font-weight: ${t=>e.FONTS.subHeading.fontWeight};
86
86
  font-size: ${t=>n(e.FONTS.subHeading.fontSize)};
87
87
  line-height: ${t=>n(e.FONTS.subHeading.lineHeight)};
88
- `,exports.BodyCaption=a,exports.BodyPrimary=l,exports.BodySecondary=f,exports.ButtonLarge=S,exports.ButtonRegular=O,exports.TitleSmall=r;
88
+ `;exports.BodyCaption=$,exports.BodyLarge=d,exports.BodyPrimary=g,exports.BodyPrimaryLink=h,exports.BodySecondary=O,exports.BodySecondaryLink=y,exports.BodyTiny=c,exports.ButtonLarge=u,exports.ButtonRegular=s,exports.Display=S,exports.SubHeading=T,exports.TitleLarge=r,exports.TitleMedium=l,exports.TitleRegular=a,exports.TitleSmall=f;
@@ -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
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("react"),s=require("./CheckBox.styled.js"),t=require("../../constants/Theme.js");const l=i=>e.jsxs("svg",Object.assign({width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[e.jsx("rect",{x:"0",y:"0",width:"18",height:"18",rx:"4",fill:i.isDisabled?t.COLORS.content.inactive:t.COLORS.background.positive.vibrant}),!i.isPartial&&e.jsx("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.jsx("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"})})),i.isPartial&&e.jsx("rect",{x:"5",y:"8",width:"8",height:"2",rx:"1",fill:t.COLORS.surface.standard})]}));exports.CheckBox=t=>{var n;const[r,a]=i.useState(t.isChecked||!1),[o,c]=i.useState(!1),[d,h]=i.useState(!1);return e.jsx(s.CheckboxContainer,Object.assign({onClick:()=>{var e;if(!t.isDisabled){const i=!r;a(i),null===(e=t.onValueChange)||void 0===e||e.call(t,i,t.value)}},onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),onMouseDown:()=>h(!0),onMouseUp:()=>h(!1)},{children:e.jsx(s.CheckboxIcon,Object.assign({checked:r,hovered:o,clicked:d,isDisabled:t.isDisabled||!1},{children:r&&e.jsx(l,{isPartial:null!==(n=t.isPartiallyChecked)&&void 0!==n&&n,isDisabled:t.isDisabled||!1})}))}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("react"),s=require("./CheckBox.styled.js"),t=require("../../constants/Theme.js");const l=i=>e.jsxs("svg",Object.assign({width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[e.jsx("rect",{x:"0",y:"0",width:"18",height:"18",rx:"4",fill:i.isDisabled?t.COLORS.content.inactive:t.COLORS.background.positive.vibrant}),!i.isPartial&&e.jsx("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.jsx("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"})})),i.isPartial&&e.jsx("rect",{x:"5",y:"8",width:"8",height:"2",rx:"1",fill:t.COLORS.surface.standard})]}));exports.CheckBox=t=>{var n;const[o,r]=i.useState(t.isChecked||!1),[a,c]=i.useState(!1),[d,h]=i.useState(!1);i.useEffect((()=>{t.controlFromOutside&&r(t.isChecked)}),[t.isChecked,t.controlFromOutside]);return e.jsx(s.CheckboxContainer,Object.assign({onClick:()=>{var e,i;if(!t.isDisabled){if(t.controlFromOutside)return void(null===(e=t.onValueChange)||void 0===e||e.call(t,!t.isChecked,t.value));const s=!o;r(s),null===(i=t.onValueChange)||void 0===i||i.call(t,s,t.value)}},onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),onMouseDown:()=>h(!0),onMouseUp:()=>h(!1)},{children:e.jsx(s.CheckboxIcon,Object.assign({checked:o,hovered:a,clicked:d,isDisabled:t.isDisabled||!1},{children:o&&e.jsx(l,{isPartial:null!==(n=t.isPartiallyChecked)&&void 0!==n&&n,isDisabled:t.isDisabled||!1})}))}))};
@@ -1,26 +1,27 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("styled-components"),t=require("../../constants/Theme.js");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=i(e);const o=s.default.div`
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("styled-components"),t=require("../../constants/Theme.js");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=i(e);const s=o.default.div`
2
2
  display: inline-flex;
3
3
  align-items: center;
4
4
  cursor: pointer;
5
- `,r=s.default.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
- ${t=>t.checked&&e.css`
14
- border: 0px;
15
- width: 18px;
16
- height: 18px;
17
- `}
18
- ${i=>i.hovered&&e.css`
19
- outline: 3px solid ${t.COLORS.surface.hovered};
20
- `}
5
+ `,r=o.default.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
+ box-sizing: content-box;
14
+ ${t=>t.checked&&e.css`
15
+ border: 0px;
16
+ width: 18px;
17
+ height: 18px;
18
+ `}
19
+ ${i=>i.hovered&&e.css`
20
+ outline: 3px solid ${t.COLORS.surface.hovered};
21
+ `}
21
22
  ${i=>i.clicked&&!i.isDisabled&&e.css`
22
- outline: 3px solid
23
- ${i.checked?t.COLORS.stroke.positive.lightAlt:t.COLORS.surface.hovered};
24
- outline-offset: 2px;
25
- `}
26
- `;exports.CheckboxContainer=o,exports.CheckboxIcon=r;
23
+ outline: 3px solid
24
+ ${i.checked?t.COLORS.stroke.positive.lightAlt:t.COLORS.surface.hovered};
25
+ outline-offset: 2px;
26
+ `}
27
+ `;exports.CheckboxContainer=s,exports.CheckboxIcon=r;
@@ -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
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react-bootstrap"),t=require("styled-components"),o=require("../../constants/Theme.js");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const n=s(t).default.div`
2
+ flex: 50%;
3
+ .progress-bar {
4
+ background-color: ${e=>e.color};
5
+ }
6
+ `;exports.ProgressBarComponent=t=>e.jsx(n,Object.assign({color:t.color?t.color:o.COLORS.content.brand},{children:e.jsx(r.ProgressBar,{animated:t.isAnimated,now:t.completed,style:{height:`${t.height?t.height:8}px`}})})),exports.ProgressCompletedBar=n;
@@ -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;