@bikdotai/bik-component-library 0.0.685-beta.11 → 0.0.685-beta.12
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.
- package/dist/cjs/components/alerts/Alert.js +1 -1
- package/dist/cjs/components/alerts/Alert.styled.d.ts +3 -1
- package/dist/cjs/components/alerts/Alert.styled.js +4 -4
- package/dist/esm/components/alerts/Alert.js +1 -1
- package/dist/esm/components/alerts/Alert.styled.d.ts +3 -1
- package/dist/esm/components/alerts/Alert.styled.js +8 -8
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../assets/icons/cross.svg.js"),r=require("./Alert.styled.js"),o=require("./AlertHelper.js"),i=require("../TypographyStyle.js"),n=require("../../constants/Theme.js");exports.Alert=l=>{var s,c;return e.jsxs(r.AlertStyle,Object.assign({type:l.type,contentPosition:l.contentPosition,style:l.containerStyle},{children:[e.jsxs(r.AlertContentWrapper,{children:[l.icon&&e.jsx("div",Object.assign({style:Object.assign(Object.assign({},null==l?void 0:l.iconStyle),{display:(null===(s=null==l?void 0:l.iconStyle)||void 0===s?void 0:s.display)||"flex",alignSelf:(null===(c=null==l?void 0:l.iconStyle)||void 0===c?void 0:c.alignSelf)||"flex-start"})},{children:e.jsx(l.icon,{color:o.COLOR_CONFIG_MAP[l.type].textColor,height:16,width:16})})),e.jsx(i.BodyCaption,Object.assign({style:{color:l.textColor||o.COLOR_CONFIG_MAP[l.type].textColor,marginLeft:8,marginRight:4}},{children:l.text})),l.redirectToText&&l.redirectTo&&e.jsx(i.BodyCaption,Object.assign({style:{color:n.COLORS.text.brand,cursor:"pointer",textDecoration:"underline"},onClick:()=>{"INTERNAL"===l.redirectTo&&l.handleRedirectButtonClick?l.handleRedirectButtonClick():l.redirectTo&&window.open(l.redirectTo,"_blank")}},{children:l.redirectToText}))]}),l.showCrossButton&&e.jsx(r.CloseIconWrapper,{children:e.jsx(t.default,{width:20,height:20,color:n.COLORS.content.secondary,onClick:()=>{(null==l?void 0:l.handleCrossIconClick)&&l.handleCrossIconClick()}})})]}))};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../assets/icons/cross.svg.js"),r=require("./Alert.styled.js"),o=require("./AlertHelper.js"),i=require("../TypographyStyle.js"),n=require("../../constants/Theme.js");exports.Alert=l=>{var s,c;return e.jsxs(r.AlertStyle,Object.assign({type:l.type,contentPosition:l.contentPosition,style:l.containerStyle},{children:[e.jsxs(r.AlertContentWrapper,Object.assign({style:l.containerStyle},{children:[l.icon&&e.jsx("div",Object.assign({style:Object.assign(Object.assign({},null==l?void 0:l.iconStyle),{display:(null===(s=null==l?void 0:l.iconStyle)||void 0===s?void 0:s.display)||"flex",alignSelf:(null===(c=null==l?void 0:l.iconStyle)||void 0===c?void 0:c.alignSelf)||"flex-start"})},{children:e.jsx(l.icon,{color:o.COLOR_CONFIG_MAP[l.type].textColor,height:16,width:16})})),e.jsx(i.BodyCaption,Object.assign({style:{color:l.textColor||o.COLOR_CONFIG_MAP[l.type].textColor,marginLeft:8,marginRight:4}},{children:l.text})),l.redirectToText&&l.redirectTo&&e.jsx(i.BodyCaption,Object.assign({style:{color:n.COLORS.text.brand,cursor:"pointer",textDecoration:"underline"},onClick:()=>{"INTERNAL"===l.redirectTo&&l.handleRedirectButtonClick?l.handleRedirectButtonClick():l.redirectTo&&window.open(l.redirectTo,"_blank")}},{children:l.redirectToText}))]})),l.showCrossButton&&e.jsx(r.CloseIconWrapper,{children:e.jsx(t.default,{width:20,height:20,color:n.COLORS.content.secondary,onClick:()=>{(null==l?void 0:l.handleCrossIconClick)&&l.handleCrossIconClick()}})})]}))};
|
|
@@ -3,5 +3,7 @@ export declare const AlertStyle: import("styled-components").StyledComponent<"di
|
|
|
3
3
|
type: ALERT_TYPES;
|
|
4
4
|
contentPosition?: CONTENT_POSITION | undefined;
|
|
5
5
|
}, never>;
|
|
6
|
-
export declare const AlertContentWrapper: import("styled-components").StyledComponent<"div", any, {
|
|
6
|
+
export declare const AlertContentWrapper: import("styled-components").StyledComponent<"div", any, {
|
|
7
|
+
contentPosition?: CONTENT_POSITION | undefined;
|
|
8
|
+
}, never>;
|
|
7
9
|
export declare const CloseIconWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("styled-components"),t=require("./AlertHelper.js");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=r(e);const
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("styled-components"),t=require("./AlertHelper.js");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=r(e);const n=o.default.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
justify-content: ${e=>e.contentPosition||t.CONTENT_POSITION.CENTER};
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
background-color: ${e=>t.COLOR_CONFIG_MAP[e.type].backgroundColor};
|
|
7
7
|
border-radius: 4px;
|
|
8
8
|
border: 1px solid ${e=>t.COLOR_CONFIG_MAP[e.type].borderColor};
|
|
9
|
-
`,
|
|
9
|
+
`,l=o.default.div`
|
|
10
10
|
flex: 1;
|
|
11
11
|
display: flex;
|
|
12
|
-
justify-content:
|
|
12
|
+
justify-content: ${e=>e.contentPosition||t.CONTENT_POSITION.CENTER};
|
|
13
13
|
`,i=o.default.div`
|
|
14
14
|
margin-left: 16px;
|
|
15
15
|
display: flex;
|
|
16
16
|
align-items: center;
|
|
17
|
-
`;exports.AlertContentWrapper=
|
|
17
|
+
`;exports.AlertContentWrapper=l,exports.AlertStyle=n,exports.CloseIconWrapper=i;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as t,jsx as e}from"react/jsx-runtime";import o from"../../assets/icons/cross.svg.js";import{AlertStyle as i,AlertContentWrapper as
|
|
1
|
+
import{jsxs as t,jsx as e}from"react/jsx-runtime";import o from"../../assets/icons/cross.svg.js";import{AlertStyle as i,AlertContentWrapper as n,CloseIconWrapper as r}from"./Alert.styled.js";import{COLOR_CONFIG_MAP as l}from"./AlertHelper.js";import{BodyCaption as c}from"../TypographyStyle.js";import{COLORS as s}from"../../constants/Theme.js";const d=d=>{var a,y;return t(i,Object.assign({type:d.type,contentPosition:d.contentPosition,style:d.containerStyle},{children:[t(n,Object.assign({style:d.containerStyle},{children:[d.icon&&e("div",Object.assign({style:Object.assign(Object.assign({},null==d?void 0:d.iconStyle),{display:(null===(a=null==d?void 0:d.iconStyle)||void 0===a?void 0:a.display)||"flex",alignSelf:(null===(y=null==d?void 0:d.iconStyle)||void 0===y?void 0:y.alignSelf)||"flex-start"})},{children:e(d.icon,{color:l[d.type].textColor,height:16,width:16})})),e(c,Object.assign({style:{color:d.textColor||l[d.type].textColor,marginLeft:8,marginRight:4}},{children:d.text})),d.redirectToText&&d.redirectTo&&e(c,Object.assign({style:{color:s.text.brand,cursor:"pointer",textDecoration:"underline"},onClick:()=>{"INTERNAL"===d.redirectTo&&d.handleRedirectButtonClick?d.handleRedirectButtonClick():d.redirectTo&&window.open(d.redirectTo,"_blank")}},{children:d.redirectToText}))]})),d.showCrossButton&&e(r,{children:e(o,{width:20,height:20,color:s.content.secondary,onClick:()=>{(null==d?void 0:d.handleCrossIconClick)&&d.handleCrossIconClick()}})})]}))};export{d as Alert};
|
|
@@ -3,5 +3,7 @@ export declare const AlertStyle: import("styled-components").StyledComponent<"di
|
|
|
3
3
|
type: ALERT_TYPES;
|
|
4
4
|
contentPosition?: CONTENT_POSITION | undefined;
|
|
5
5
|
}, never>;
|
|
6
|
-
export declare const AlertContentWrapper: import("styled-components").StyledComponent<"div", any, {
|
|
6
|
+
export declare const AlertContentWrapper: import("styled-components").StyledComponent<"div", any, {
|
|
7
|
+
contentPosition?: CONTENT_POSITION | undefined;
|
|
8
|
+
}, never>;
|
|
7
9
|
export declare const CloseIconWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
1
|
+
import o from"styled-components";import{CONTENT_POSITION as e,COLOR_CONFIG_MAP as t}from"./AlertHelper.js";const i=o.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
|
-
justify-content: ${
|
|
4
|
+
justify-content: ${o=>o.contentPosition||e.CENTER};
|
|
5
5
|
padding: 8px 16px;
|
|
6
|
-
background-color: ${
|
|
6
|
+
background-color: ${o=>t[o.type].backgroundColor};
|
|
7
7
|
border-radius: 4px;
|
|
8
|
-
border: 1px solid ${
|
|
9
|
-
`,
|
|
8
|
+
border: 1px solid ${o=>t[o.type].borderColor};
|
|
9
|
+
`,r=o.div`
|
|
10
10
|
flex: 1;
|
|
11
11
|
display: flex;
|
|
12
|
-
justify-content:
|
|
13
|
-
`,n=
|
|
12
|
+
justify-content: ${o=>o.contentPosition||e.CENTER};
|
|
13
|
+
`,n=o.div`
|
|
14
14
|
margin-left: 16px;
|
|
15
15
|
display: flex;
|
|
16
16
|
align-items: center;
|
|
17
|
-
`;export{
|
|
17
|
+
`;export{r as AlertContentWrapper,i as AlertStyle,n as CloseIconWrapper};
|