@bikdotai/bik-component-library 0.0.530-beta.118 → 0.0.530-beta0.356
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/TypographyStyle.d.ts +0 -17
- package/dist/cjs/components/TypographyStyle.js +14 -77
- package/dist/cjs/components/button/Button.js +1 -1
- package/dist/cjs/components/button/model.d.ts +1 -1
- package/dist/cjs/components/button/themes.d.ts +2 -2
- package/dist/cjs/components/button/themes.js +1 -1
- package/dist/cjs/components/icon-button/IconButton.styled.js +1 -1
- package/dist/cjs/components/icon-button/model.d.ts +1 -1
- package/dist/cjs/components/icon-button/theme.js +1 -1
- package/dist/cjs/components/progress-bar/ProgressBarComponent.js +1 -1
- package/dist/cjs/components/tag/Tag.js +1 -1
- package/dist/cjs/components/tag/Tag.styled.js +1 -1
- package/dist/cjs/components/tag/model.d.ts +1 -11
- package/dist/cjs/components/tag/model.js +1 -1
- package/dist/cjs/components/tag/themes.d.ts +1 -1
- package/dist/cjs/components/tag/themes.js +1 -1
- package/dist/cjs/components/template-context-mapper/modalElements/Body.js +2 -2
- package/dist/cjs/components/template-context-mapper/modalElements/DesktopPreview.js +1 -1
- package/dist/cjs/components/template-context-mapper/modalElements/VariableConnectorsPanel.js +3 -3
- package/dist/cjs/components/template-preview/SmsTemplatePreview.js +1 -1
- package/dist/cjs/components/template-preview/TemplatePreview.js +1 -1
- package/dist/cjs/hooks/useOutside.js +1 -1
- package/dist/cjs/index.d.ts +0 -1
- package/dist/cjs/index.js +1 -1
- package/dist/esm/components/TypographyStyle.d.ts +0 -17
- package/dist/esm/components/TypographyStyle.js +83 -146
- package/dist/esm/components/button/Button.js +1 -1
- package/dist/esm/components/button/model.d.ts +1 -1
- package/dist/esm/components/button/themes.d.ts +2 -2
- package/dist/esm/components/button/themes.js +1 -1
- package/dist/esm/components/icon-button/IconButton.styled.js +1 -1
- package/dist/esm/components/icon-button/model.d.ts +1 -1
- package/dist/esm/components/icon-button/theme.js +1 -1
- package/dist/esm/components/progress-bar/ProgressBarComponent.js +1 -1
- package/dist/esm/components/tag/Tag.js +1 -1
- package/dist/esm/components/tag/Tag.styled.js +1 -1
- package/dist/esm/components/tag/model.d.ts +1 -11
- package/dist/esm/components/tag/model.js +1 -1
- package/dist/esm/components/tag/themes.d.ts +1 -1
- package/dist/esm/components/tag/themes.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/Body.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/DesktopPreview.js +6 -6
- package/dist/esm/components/template-context-mapper/modalElements/VariableConnectorsPanel.js +2 -2
- package/dist/esm/components/template-preview/SmsTemplatePreview.js +1 -1
- package/dist/esm/components/template-preview/TemplatePreview.js +1 -1
- package/dist/esm/hooks/useOutside.js +1 -1
- package/dist/esm/index.d.ts +0 -1
- package/dist/esm/index.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/assets/icons/graph.svg.js +0 -1
- package/dist/cjs/assets/icons/sparkle.svg.js +0 -1
- package/dist/cjs/assets/icons/sync.svg.js +0 -1
- package/dist/cjs/components/ai-modals/ActivateBikAI.d.ts +0 -7
- package/dist/cjs/components/ai-modals/ActivateBikAI.js +0 -1
- package/dist/cjs/components/ai-modals/AiCreditsExhausted.d.ts +0 -8
- package/dist/cjs/components/ai-modals/AiCreditsExhausted.js +0 -1
- package/dist/cjs/components/ai-modals/AiCreditsLow.d.ts +0 -7
- package/dist/cjs/components/ai-modals/AiCreditsLow.js +0 -1
- package/dist/cjs/components/ai-modals/AiSyncProgress.d.ts +0 -8
- package/dist/cjs/components/ai-modals/AiSyncProgress.js +0 -1
- package/dist/cjs/components/ai-modals/index.d.ts +0 -4
- package/dist/esm/assets/icons/graph.svg.js +0 -1
- package/dist/esm/assets/icons/sparkle.svg.js +0 -1
- package/dist/esm/assets/icons/sync.svg.js +0 -1
- package/dist/esm/components/ai-modals/ActivateBikAI.d.ts +0 -7
- package/dist/esm/components/ai-modals/ActivateBikAI.js +0 -1
- package/dist/esm/components/ai-modals/AiCreditsExhausted.d.ts +0 -8
- package/dist/esm/components/ai-modals/AiCreditsExhausted.js +0 -1
- package/dist/esm/components/ai-modals/AiCreditsLow.d.ts +0 -7
- package/dist/esm/components/ai-modals/AiCreditsLow.js +0 -1
- package/dist/esm/components/ai-modals/AiSyncProgress.d.ts +0 -8
- package/dist/esm/components/ai-modals/AiSyncProgress.js +0 -1
- package/dist/esm/components/ai-modals/index.d.ts +0 -4
|
@@ -34,11 +34,6 @@ export declare const BodySecondary: import("styled-components").StyledComponent<
|
|
|
34
34
|
numberOfLines?: number | undefined;
|
|
35
35
|
color?: string | undefined;
|
|
36
36
|
}, never>;
|
|
37
|
-
export declare const ButtonRegularAI: import("styled-components").StyledComponent<"div", any, {
|
|
38
|
-
numberOfLines?: number | undefined;
|
|
39
|
-
color?: string | undefined;
|
|
40
|
-
disabled?: boolean | undefined;
|
|
41
|
-
}, never>;
|
|
42
37
|
export declare const BodyPrimaryLink: import("styled-components").StyledComponent<"div", any, {
|
|
43
38
|
numberOfLines?: number | undefined;
|
|
44
39
|
color?: string | undefined;
|
|
@@ -51,26 +46,14 @@ export declare const BodyCaption: import("styled-components").StyledComponent<"d
|
|
|
51
46
|
numberOfLines?: number | undefined;
|
|
52
47
|
color?: string | undefined;
|
|
53
48
|
}, never>;
|
|
54
|
-
export declare const AiBodyCaption: import("styled-components").StyledComponent<"div", any, {
|
|
55
|
-
numberOfLines?: number | undefined;
|
|
56
|
-
color?: string | undefined;
|
|
57
|
-
}, never>;
|
|
58
49
|
export declare const BodyTiny: import("styled-components").StyledComponent<"div", any, {
|
|
59
50
|
numberOfLines?: number | undefined;
|
|
60
51
|
color?: string | undefined;
|
|
61
52
|
}, never>;
|
|
62
|
-
export declare const AiBodyTiny: import("styled-components").StyledComponent<"div", any, {
|
|
63
|
-
numberOfLines?: number | undefined;
|
|
64
|
-
color?: string | undefined;
|
|
65
|
-
}, never>;
|
|
66
53
|
export declare const ButtonLarge: import("styled-components").StyledComponent<"div", any, {
|
|
67
54
|
numberOfLines?: number | undefined;
|
|
68
55
|
color?: string | undefined;
|
|
69
56
|
}, never>;
|
|
70
|
-
export declare const ButtonLargeAI: import("styled-components").StyledComponent<"div", any, {
|
|
71
|
-
numberOfLines?: number | undefined;
|
|
72
|
-
color?: string | undefined;
|
|
73
|
-
}, never>;
|
|
74
57
|
export declare const ButtonRegular: import("styled-components").StyledComponent<"div", any, {
|
|
75
58
|
numberOfLines?: number | undefined;
|
|
76
59
|
color?: string | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
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 n=e=>e+"px",
|
|
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 n=e=>e+"px",l=o.default.div`
|
|
2
2
|
font-family: Inter;
|
|
3
3
|
color: ${e=>e.color||t.COLORS.text.primary};
|
|
4
4
|
font-weight: ${t.FONTS.titleLarge.fontWeight};
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
overflow: hidden;
|
|
9
9
|
display: -webkit-box;
|
|
10
10
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
11
|
-
`,
|
|
11
|
+
`,r=o.default.div`
|
|
12
12
|
font-family: Inter;
|
|
13
13
|
color: ${e=>e.color||t.COLORS.text.primary};
|
|
14
14
|
font-weight: ${t.FONTS.titleMedium.fontWeight};
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
overflow: hidden;
|
|
59
59
|
display: -webkit-box;
|
|
60
60
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
61
|
-
`,
|
|
61
|
+
`,O=o.default.div`
|
|
62
62
|
font-family: Inter;
|
|
63
63
|
color: ${e=>e.color||t.COLORS.text.primary};
|
|
64
64
|
font-weight: ${t.FONTS.bodyPrimary.fontWeight};
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
overflow: hidden;
|
|
69
69
|
display: -webkit-box;
|
|
70
70
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
71
|
-
`,
|
|
71
|
+
`,h=o.default.div`
|
|
72
72
|
font-family: Inter;
|
|
73
73
|
color: ${e=>e.color||t.COLORS.text.primary};
|
|
74
74
|
font-weight: ${t.FONTS.bodyPrimary.fontWeight};
|
|
@@ -78,17 +78,7 @@
|
|
|
78
78
|
overflow: hidden;
|
|
79
79
|
display: -webkit-box;
|
|
80
80
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
81
|
-
`,
|
|
82
|
-
font-family: Inter;
|
|
83
|
-
color: ${e=>e.color||t.COLORS.text.primary};
|
|
84
|
-
font-weight: ${t.FONTS.bodySecondary.fontWeight};
|
|
85
|
-
font-size: ${n(t.FONTS.bodySecondary.fontSize)};
|
|
86
|
-
line-height: ${n(t.FONTS.bodySecondary.lineHeight)};
|
|
87
|
-
-webkit-box-orient: vertical;
|
|
88
|
-
overflow: hidden;
|
|
89
|
-
display: -webkit-box;
|
|
90
|
-
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
91
|
-
`,h=o.default.div`
|
|
81
|
+
`,c=o.default.div`
|
|
92
82
|
font-family: Inter;
|
|
93
83
|
color: ${e=>e.color||t.COLORS.text.primary};
|
|
94
84
|
font-weight: ${t.FONTS.bodySecondary.fontWeight};
|
|
@@ -98,18 +88,12 @@
|
|
|
98
88
|
overflow: hidden;
|
|
99
89
|
display: -webkit-box;
|
|
100
90
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
101
|
-
|
|
102
|
-
background: linear-gradient(93deg, #ff166a 0.37%, #fb5f08 100%);
|
|
103
|
-
-webkit-background-clip: text;
|
|
104
|
-
-webkit-text-fill-color: transparent;
|
|
105
|
-
background-clip: text;
|
|
106
|
-
text-fill-color: transparent;
|
|
107
|
-
`,p=o.default(g)`
|
|
91
|
+
`,S=o.default(h)`
|
|
108
92
|
text-decoration: underline;
|
|
109
93
|
color: ${t.COLORS.content.brand};
|
|
110
94
|
text-decoration-color: ${t.COLORS.content.brand};
|
|
111
95
|
cursor: pointer;
|
|
112
|
-
`,
|
|
96
|
+
`,g=o.default(c)`
|
|
113
97
|
text-decoration: underline;
|
|
114
98
|
color: ${t.COLORS.content.brand};
|
|
115
99
|
text-decoration-color: ${t.COLORS.content.brand};
|
|
@@ -124,23 +108,7 @@
|
|
|
124
108
|
overflow: hidden;
|
|
125
109
|
display: -webkit-box;
|
|
126
110
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
127
|
-
`,
|
|
128
|
-
font-family: Inter;
|
|
129
|
-
color: ${e=>e.color||t.COLORS.text.primary};
|
|
130
|
-
font-weight: ${t.FONTS.caption.fontWeight};
|
|
131
|
-
font-size: ${n(t.FONTS.caption.fontSize)};
|
|
132
|
-
line-height: ${n(t.FONTS.caption.lineHeight)};
|
|
133
|
-
-webkit-box-orient: vertical;
|
|
134
|
-
overflow: hidden;
|
|
135
|
-
display: -webkit-box;
|
|
136
|
-
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
137
|
-
z-index: 1;
|
|
138
|
-
background: linear-gradient(93deg, #ff166a 0.37%, #fb5f08 100%);
|
|
139
|
-
-webkit-background-clip: text;
|
|
140
|
-
-webkit-text-fill-color: transparent;
|
|
141
|
-
background-clip: text;
|
|
142
|
-
text-fill-color: transparent;
|
|
143
|
-
`,w=o.default.div`
|
|
111
|
+
`,p=o.default.div`
|
|
144
112
|
color: ${e=>e.color||t.COLORS.text.primary};
|
|
145
113
|
font-weight: ${t.FONTS.tiny.fontWeight};
|
|
146
114
|
font-size: ${n(t.FONTS.tiny.fontSize)};
|
|
@@ -149,32 +117,7 @@
|
|
|
149
117
|
overflow: hidden;
|
|
150
118
|
display: -webkit-box;
|
|
151
119
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
152
|
-
`,
|
|
153
|
-
color: ${e=>e.color||t.COLORS.text.primary};
|
|
154
|
-
font-weight: ${t.FONTS.tiny.fontWeight};
|
|
155
|
-
font-size: ${n(t.FONTS.tiny.fontSize)};
|
|
156
|
-
line-height: ${n(t.FONTS.tiny.lineHeight)};
|
|
157
|
-
-webkit-box-orient: vertical;
|
|
158
|
-
overflow: hidden;
|
|
159
|
-
display: -webkit-box;
|
|
160
|
-
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
161
|
-
z-index: 1;
|
|
162
|
-
background: linear-gradient(93deg, #ff166a 0.37%, #fb5f08 100%);
|
|
163
|
-
-webkit-background-clip: text;
|
|
164
|
-
-webkit-text-fill-color: transparent;
|
|
165
|
-
background-clip: text;
|
|
166
|
-
text-fill-color: transparent;
|
|
167
|
-
`,$=o.default.div`
|
|
168
|
-
font-family: Inter;
|
|
169
|
-
color: ${e=>e.color||t.COLORS.text.primary};
|
|
170
|
-
font-weight: ${t.FONTS.buttonLarge.fontWeight};
|
|
171
|
-
font-size: ${n(t.FONTS.buttonLarge.fontSize)};
|
|
172
|
-
line-height: ${n(t.FONTS.buttonLarge.lineHeight)};
|
|
173
|
-
-webkit-box-orient: vertical;
|
|
174
|
-
overflow: hidden;
|
|
175
|
-
display: -webkit-box;
|
|
176
|
-
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
177
|
-
`,u=o.default.div`
|
|
120
|
+
`,s=o.default.div`
|
|
178
121
|
font-family: Inter;
|
|
179
122
|
color: ${e=>e.color||t.COLORS.text.primary};
|
|
180
123
|
font-weight: ${t.FONTS.buttonLarge.fontWeight};
|
|
@@ -184,13 +127,7 @@
|
|
|
184
127
|
overflow: hidden;
|
|
185
128
|
display: -webkit-box;
|
|
186
129
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
187
|
-
|
|
188
|
-
z-index: 1;
|
|
189
|
-
-webkit-background-clip: text;
|
|
190
|
-
-webkit-text-fill-color: transparent;
|
|
191
|
-
background-clip: text;
|
|
192
|
-
text-fill-color: transparent;
|
|
193
|
-
`,m=o.default.div`
|
|
130
|
+
`,$=o.default.div`
|
|
194
131
|
font-family: Inter;
|
|
195
132
|
color: ${e=>e.color||t.COLORS.text.primary};
|
|
196
133
|
font-weight: ${t.FONTS.buttonRegular.fontWeight};
|
|
@@ -200,7 +137,7 @@
|
|
|
200
137
|
overflow: hidden;
|
|
201
138
|
display: -webkit-box;
|
|
202
139
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
203
|
-
`,
|
|
140
|
+
`,m=o.default.div`
|
|
204
141
|
font-family: Inter;
|
|
205
142
|
color: ${e=>e.color||t.COLORS.text.primary};
|
|
206
143
|
font-weight: ${t.FONTS.subHeading.fontWeight};
|
|
@@ -210,7 +147,7 @@
|
|
|
210
147
|
overflow: hidden;
|
|
211
148
|
display: -webkit-box;
|
|
212
149
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
213
|
-
`,
|
|
150
|
+
`,w=o.default.div`
|
|
214
151
|
font-family: Inter;
|
|
215
152
|
color: ${e=>e.color||t.COLORS.text.primary};
|
|
216
153
|
font-weight: ${t.FONTS.bodyRegular.fontWeight};
|
|
@@ -220,7 +157,7 @@
|
|
|
220
157
|
overflow: hidden;
|
|
221
158
|
display: -webkit-box;
|
|
222
159
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
223
|
-
`,
|
|
160
|
+
`,u=o.default.div`
|
|
224
161
|
font-family: Inter;
|
|
225
162
|
color: ${t.COLORS.text.primary};
|
|
226
163
|
font-weight: ${t.FONTS.caption.fontWeight};
|
|
@@ -230,4 +167,4 @@
|
|
|
230
167
|
overflow: hidden;
|
|
231
168
|
display: -webkit-box;
|
|
232
169
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
233
|
-
`;exports.
|
|
170
|
+
`;exports.BodyCaption=y,exports.BodyLarge=O,exports.BodyPrimary=h,exports.BodyPrimaryLink=S,exports.BodyRegular=w,exports.BodySecondary=c,exports.BodySecondaryLink=g,exports.BodyTiny=p,exports.ButtonLarge=s,exports.ButtonRegular=$,exports.Caption=u,exports.Display=b,exports.SmallRegular=a,exports.SubHeading=m,exports.TitleLarge=l,exports.TitleMedium=r,exports.TitleRegular=f,exports.TitleSmall=d;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),i=require("react"),n=require("../spinner/Spinner.js"),s=require("./Button.styled.js"),a=require("./themes.js");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=r(i);const c=i.forwardRef(((i,r)=>{var{version:c,id:d,buttonType:l="primary",size:u="small",buttonText:m,disabled:j,IconComponent:b,LeadingIcon:h,TrailingIcon:p,isLoading:v,inverse:g,onClick:x,matchParentWidth:f,subtitle:y,darkMode:N,activated:C,error:O}=i,B=e.__rest(i,["version","id","buttonType","size","buttonText","disabled","IconComponent","LeadingIcon","TrailingIcon","isLoading","inverse","onClick","matchParentWidth","subtitle","darkMode","activated","error"]);const T=a.GetButtonTextComponent(u,l),k="chip"===u?16:20,I={height:k,width:k,color:a.getButtonIconColor(u,l,g,j,v,N),style:{display:"block"},className:"icon"};return t.jsx(s.Button,Object.assign({"data-test":B["data-test"],version:c,onClick:v?()=>{}:x,ref:r,id:d,disabled:j,size:u,buttonType:l,isLoading:v,inverse:g,matchParentWidth:f,darkMode:N,activated:C,error:O},B,{children:t.jsxs("div",Object.assign({className:"button-container"},{children:[l.startsWith("dash")&&t.jsx(s.ButtonCustomDashedBorder,{}),t.jsx("div",Object.assign({className:"overlay-container"},{children:v&&t.jsx(n.Spinner,{className:"spinner",size:"small",color:a.SpinnerColorMap(l,g)})})),b&&t.jsx("div",Object.assign({className:"icon-component"},{children:o.default.createElement(b,I)})),h&&t.jsx("div",Object.assign({className:"icon-leading"},{children:o.default.createElement(h,I)})),m?t.jsxs(T,Object.assign({className:"text"},{children:[m,t.jsx("div",Object.assign({className:"text-subtitle"},{children:y}))]})):t.jsx(t.Fragment,{}),p&&t.jsx("div",Object.assign({className:"icon-trailing"},{children:o.default.createElement(p,I)}))]}))}))}));c.displayName="Button",exports.Button=c;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export type Size = 'chip' | 'small' | 'medium' | 'large';
|
|
3
|
-
export type Type = 'primary' | 'secondary' | 'tertiary' | 'tertiaryGray' | 'destructive' | 'dashBold' | 'dashRegular' | 'text'
|
|
3
|
+
export type Type = 'primary' | 'secondary' | 'tertiary' | 'tertiaryGray' | 'destructive' | 'dashBold' | 'dashRegular' | 'text';
|
|
4
4
|
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
5
5
|
'data-test'?: string;
|
|
6
6
|
/**
|
|
@@ -3,14 +3,14 @@ export declare const getBackgroundColor: (type: Type, size: Size, inverse?: bool
|
|
|
3
3
|
export declare const getColor: (type: Type, size: Size, inverse?: boolean, darkMode?: boolean) => string;
|
|
4
4
|
export declare const getDisabledTextColor: (inverse?: boolean) => string;
|
|
5
5
|
export declare const getPadding: (type: Type, size: Size) => "0px" | "4px 8px" | "6px 4px" | "6px 12px" | "10px 4px" | "10px 12px" | "14px 4px" | "14px 12px" | undefined;
|
|
6
|
-
export declare const GetButtonTextComponent: (size: Size, type: Type
|
|
6
|
+
export declare const GetButtonTextComponent: (size: Size, type: Type) => import("styled-components").StyledComponent<"div", any, {
|
|
7
7
|
numberOfLines?: number | undefined;
|
|
8
8
|
color?: string | undefined;
|
|
9
9
|
}, never>;
|
|
10
10
|
export declare const getBorderColor: (type: Type, inverse?: boolean, error?: boolean) => string;
|
|
11
11
|
export declare const getBorder: (version: '1.0' | '2.0', type: Type, size: Size, inverse?: boolean, error?: boolean) => string;
|
|
12
12
|
export declare const getLinearGradientValue: (size: Size) => string;
|
|
13
|
-
export declare const getHoverButtonBackground: (type: Type, inverse?: boolean) =>
|
|
13
|
+
export declare const getHoverButtonBackground: (type: Type, inverse?: boolean) => "" | "background-color:transparent;" | "background-color: #000000;\n\t\t\t\topacity: 0.03;";
|
|
14
14
|
export declare const getHoverButtonTextDecorationStyle: (type: Type, disabled?: boolean) => string;
|
|
15
15
|
export declare const generateInverseHoverBackground: (type: Type, disabled?: boolean) => string;
|
|
16
16
|
export declare const generateDisabledStyling: (type: Type, size: Size, inverse?: boolean) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../constants/Theme.js"),r=require("../TypographyStyle.js");const n=(r,n,e)=>e?t.COLORS.stroke.negative.vibrant:n?t.COLORS.surface.standard:"secondary"==r?t.COLORS.stroke.brand:t.COLORS.content.placeholder,e=t=>"medium"===t?"5px,\n\t\ttransparent 5px,\n\t\ttransparent 10px":"6px,\n\t\ttransparent 6px,\n\t\ttransparent 12px";exports.GetButtonTextComponent=(t,n
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../constants/Theme.js"),r=require("../TypographyStyle.js");const n=(r,n,e)=>e?t.COLORS.stroke.negative.vibrant:n?t.COLORS.surface.standard:"secondary"==r?t.COLORS.stroke.brand:t.COLORS.content.placeholder,e=t=>"medium"===t?"5px,\n\t\ttransparent 5px,\n\t\ttransparent 10px":"6px,\n\t\ttransparent 6px,\n\t\ttransparent 12px";exports.GetButtonTextComponent=(t,n)=>"dashRegular"===n?r.BodySecondary:"chip"===t?r.BodyCaption:"small"===t?r.ButtonRegular:r.ButtonLarge,exports.SpinnerColorMap=(r,n)=>n?"primary"===r?t.COLORS.content.primary:t.COLORS.content.primaryInverse:"destructive"===r?t.COLORS.content.negative:t.COLORS.content.brand,exports.generateDisabledStyling=(r,n,e)=>"chip"===n?"background-color: transparent;":"primary"===r||"destructive"===r?e?"background-color: rgba(255,255,255,0.3);":`background-color: ${t.COLORS.background.inactive};`:"secondary"===r?e?"border: 1px solid rgba(255, 255, 255, 0.5);":`border: 1px solid ${t.COLORS.stroke.primary};`:"",exports.generateInverseHoverBackground=(r,n)=>n?"":"primary"===r?`background-color: ${t.COLORS.stroke.warning.lightAlt};`:"background-color: rgba(255, 255, 255, 0.1)",exports.getBackgroundColor=(r,n,e,o)=>{if("chip"===n)return"text"===r?"transparent":o?t.COLORS.surface.hovered:t.COLORS.surface.subdued;switch(r){case"primary":return e?t.COLORS.background.warning.vibrant:t.COLORS.background.inverseLight;case"destructive":return t.COLORS.background.negative.vibrant;default:return"transparent"}},exports.getBorder=(r,e,o,a,i)=>"text"==e?"border: none;":"chip"===o?`border: ${"2.0"===r?.5:1}px solid ${t.COLORS.stroke.primary};`:a?"secondary"===e?`border: ${"2.0"===r?.5:1}px solid ${n(e,a,i)};`:"border: none;":"secondary"===e?`border: ${"2.0"===r?.5:1}px solid ${n(e,!1,i)};`:"border: none;",exports.getBorderColor=n,exports.getButtonIconColor=(r,n,e,o,a,i)=>"chip"===r?o?t.COLORS.content.inactive:i?t.COLORS.content.primary:t.COLORS.content.secondary:a?"transparent":"primary"===n||"destructive"===n?e?o?"rgba(255, 255, 255, 0.5)":t.COLORS.content.primary:o?t.COLORS.content.inactive:t.COLORS.content.primaryInverse:"secondary"===n||"tertiary"===n?e?o?"rgba(255, 255, 255, 0.5)":t.COLORS.content.primaryInverse:o?t.COLORS.content.inactive:t.COLORS.content.brand:"tertiaryGray"===n||n.startsWith("dash")?o?t.COLORS.content.inactive:t.COLORS.content.secondary:void 0,exports.getClickEffect=(r,n,e)=>"text"===r?`background-color: ${t.COLORS.background.brandLight};\n\t\t\ttext-decoration-line: underline;\n\t\t\ttext-decoration-color: ${t.COLORS.content.brand};`:"chip"===n?`border: 1px solid ${t.COLORS.stroke.brandLightAlt};\n\t\tbackground-color: ${t.COLORS.background.brandLight};`:"primary"===r||"destructive"===r?e?`background-color: ${t.COLORS.background.warning.vibrant} !important;\n\t\t\tbox-shadow: inset 0px 4px 12px rgba(0, 0, 0, 0.35);\n\t\t\t`:"box-shadow: inset 0px 4px 12px rgba(0, 0, 0, 0.35);":"secondary"===r||"tertiary"===r||"tertiaryGray"===r||r.startsWith("dash")?e?`background-color: ${t.COLORS.background.inverseLight} !important;`:`background-color: ${t.COLORS.background.brandLight};`:void 0,exports.getColor=(r,n,e,o)=>{if("chip"===n)return"text"===r?e?t.COLORS.content.inactive:t.COLORS.content.brand:o?t.COLORS.content.primary:t.COLORS.content.secondary;switch(r){case"primary":return e?t.COLORS.content.primary:t.COLORS.content.primaryInverse;case"tertiaryGray":case"dashBold":case"dashRegular":return t.COLORS.content.secondary;case"destructive":return t.COLORS.content.primaryInverse;default:return e?t.COLORS.content.primaryInverse:t.COLORS.stroke.brand}},exports.getDashedBorderStyling=function(t,r){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n(t,!1);return`\n\t.line-top {\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\ttop: 0;\n\t\theight: 1px;\n\t\twidth: 100%;\n\t\tbackground: repeating-linear-gradient(\n\t\t\tto right,\n\t\t\t${o},\n\t\t\t${o}\n\t\t\t\t${e(r)}\n\t\t);\n\t}\n\t.line-right {\n\t\tposition: absolute;\n\t\tright: 0;\n\t\ttop: 0;\n\t\twidth: 1px;\n\t\theight: 100%;\n\t\tbackground: repeating-linear-gradient(\n\t\t\tto bottom,\n\t\t\t${o},\n\t\t\t${o}\n\t\t\t\t${e(r)}\n\t\t);\n\t}\n\t.line-bottom {\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\tbottom: 0;\n\t\theight: 1px;\n\t\twidth: 100%;\n\t\tbackground: repeating-linear-gradient(\n\t\t\tto right,\n\t\t\t${o},\n\t\t\t${o}\n\t\t\t\t${e(r)}\n\t\t);\n\t}\n\t.line-left {\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\ttop: 0;\n\t\twidth: 1px;\n\t\theight: 100%;\n\t\tbackground: repeating-linear-gradient(\n\t\t\tto bottom,\n\t\t\t${o},\n\t\t\t${o}\n\t\t\t\t${e(r)}\n\t\t);\n\t}\n\t`},exports.getDisabledTextColor=r=>r?"rgba(255, 255, 255, 0.5)":t.COLORS.content.inactive,exports.getHoverButtonBackground=(t,r)=>"text"===t?"background-color:transparent;":r||"primary"===t?"":"background-color: #000000;\n\t\t\t\topacity: 0.03;",exports.getHoverButtonTextDecorationStyle=(r,n)=>n?"":`text-decoration-line: underline;\n\t\t\ttext-decoration-color: ${t.COLORS.content.brand};`,exports.getLinearGradientValue=e,exports.getLoadingBackground=(r,n,e)=>"chip"===n?`background-color: ${t.COLORS.background.base};`:"primary"===r?`background-color: ${e?t.COLORS.background.warning.vibrant:t.COLORS.background.brandLight};`:"destructive"===r?`background-color: ${t.COLORS.background.negative.light};`:"background-color: transparent;",exports.getLoadingBorder=(r,n,e)=>"chip"===n?"border: none;":"secondary"===r?e?`border: 1px solid ${t.COLORS.content.secondary};`:`border: 1px solid ${t.COLORS.stroke.brandLightAlt};`:"",exports.getPadding=(t,r)=>{if("text"===t)return"0px";if("chip"===r)return"4px 8px";if("small"===r)switch(t){case"tertiary":case"tertiaryGray":return"6px 4px";default:return"6px 12px"}else if("medium"===r)switch(t){case"tertiary":case"tertiaryGray":return"10px 4px";default:return"10px 12px"}else if("large"===r)switch(t){case"tertiary":case"tertiaryGray":return"14px 4px";default:return"14px 12px"}};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("styled-components"),e=require("../../constants/Theme.js"),n=require("./theme.js");function r(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}const o=r(t).default.button`
|
|
2
|
-
${t=>`\n\tall: unset;\n\tcursor: pointer;\n\tpadding: 6px;\n\tborder-radius: 4px;\n\tflex-wrap: wrap;\n\t${t.bordered
|
|
2
|
+
${t=>`\n\tall: unset;\n\tcursor: pointer;\n\tpadding: 6px;\n\tborder-radius: 4px;\n\tflex-wrap: wrap;\n\t${t.bordered?`border: 1px solid ${e.COLORS.stroke.primary};`:""}\n\t${t.isSelected?`\n\t\t\tbackground-color: ${n.generateBackgroundColor(t.iconButtonType)};\n\t\t\t\t`:"\n\t\t\t\t:hover {\n\t\t\t\t\tbackground-color: rgba(0, 0, 0, 0.03);\n\t\t\t\t}\n\t\t\t"}\n\t${t.disabled&&"\n\t\t\tcursor: not-allowed !important;\n\t\t\tbackground-color: rgba(0, 0, 0, 0.03);\n\t\t"}\n\n\t`}
|
|
3
3
|
`;exports.IconButton=o;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export type IconButtonType = 'default' | 'negative' | 'positive' | 'warning'
|
|
2
|
+
export type IconButtonType = 'default' | 'negative' | 'positive' | 'warning';
|
|
3
3
|
export interface IconButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
4
4
|
/**
|
|
5
5
|
* Icon to render
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../constants/Theme.js");exports.generateBackgroundColor=t=>"default"===t?e.COLORS.background.brandLight:"negative"===t?e.COLORS.background.negative.light:"positive"===t?e.COLORS.background.positive.light:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../constants/Theme.js");exports.generateBackgroundColor=t=>"default"===t?e.COLORS.background.brandLight:"negative"===t?e.COLORS.background.negative.light:"positive"===t?e.COLORS.background.positive.light:e.COLORS.background.warning.light,exports.getIconColor=(t,n,r)=>{if(n)return e.COLORS.content.inactive;switch(t){case"default":return r?e.COLORS.content.brand:e.COLORS.content.primary;case"negative":return e.COLORS.content.negative;case"positive":return e.COLORS.content.positive;case"warning":return r?e.COLORS.content.warning:e.COLORS.content.primary;default:return e.COLORS.content.primary}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var c=require("@emotion/styled/base"),e=require("react/jsx-runtime"),b=require("react-bootstrap"),t=require("../../constants/Theme.js");function o(c){return c&&"object"==typeof c&&"default"in c?c:{default:c}}const s=o(c).default("div","production"===process.env.NODE_ENV?{target:"e17nsuvt0"}:{target:"e17nsuvt0",label:"ProgressCompletedBar"})("flex:50%;.progress-bar{background:",(c=>c.color),";}"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlByb2dyZXNzQmFyQ29tcG9uZW50LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFPK0MiLCJmaWxlIjoiUHJvZ3Jlc3NCYXJDb21wb25lbnQudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsganN4IGFzIF9qc3ggfSBmcm9tIFwicmVhY3QvanN4LXJ1bnRpbWVcIjtcclxuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xyXG5pbXBvcnQgeyBQcm9ncmVzc0JhciB9IGZyb20gJ3JlYWN0LWJvb3RzdHJhcCc7XHJcbmltcG9ydCB7IENPTE9SUyB9IGZyb20gXCIuLi8uLi9jb25zdGFudHMvVGhlbWVcIjtcclxuZXhwb3J0IGNvbnN0IFByb2dyZXNzQmFyQ29tcG9uZW50ID0gKHByb3BzKSA9PiB7XHJcbiAgICByZXR1cm4gKF9qc3goUHJvZ3Jlc3NDb21wbGV0ZWRCYXIsIE9iamVjdC5hc3NpZ24oeyBjb2xvcjogcHJvcHMuY29sb3IgPyBwcm9wcy5jb2xvciA6IENPTE9SUy5jb250ZW50LmJyYW5kIH0sIHsgY2hpbGRyZW46IF9qc3goUHJvZ3Jlc3NCYXIsIHsgYW5pbWF0ZWQ6IHByb3BzLmlzQW5pbWF0ZWQsIG5vdzogcHJvcHMuY29tcGxldGVkLCBzdHlsZTogeyBoZWlnaHQ6IGAke3Byb3BzLmhlaWdodCA/
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var c=require("@emotion/styled/base"),e=require("react/jsx-runtime"),b=require("react-bootstrap"),t=require("../../constants/Theme.js");function o(c){return c&&"object"==typeof c&&"default"in c?c:{default:c}}const s=o(c).default("div","production"===process.env.NODE_ENV?{target:"e17nsuvt0"}:{target:"e17nsuvt0",label:"ProgressCompletedBar"})("flex:50%;.progress-bar{background-color:",(c=>c.color),";}"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlByb2dyZXNzQmFyQ29tcG9uZW50LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFPK0MiLCJmaWxlIjoiUHJvZ3Jlc3NCYXJDb21wb25lbnQudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsganN4IGFzIF9qc3ggfSBmcm9tIFwicmVhY3QvanN4LXJ1bnRpbWVcIjtcclxuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xyXG5pbXBvcnQgeyBQcm9ncmVzc0JhciB9IGZyb20gJ3JlYWN0LWJvb3RzdHJhcCc7XHJcbmltcG9ydCB7IENPTE9SUyB9IGZyb20gXCIuLi8uLi9jb25zdGFudHMvVGhlbWVcIjtcclxuZXhwb3J0IGNvbnN0IFByb2dyZXNzQmFyQ29tcG9uZW50ID0gKHByb3BzKSA9PiB7XHJcbiAgICByZXR1cm4gKF9qc3goUHJvZ3Jlc3NDb21wbGV0ZWRCYXIsIE9iamVjdC5hc3NpZ24oeyBjb2xvcjogcHJvcHMuY29sb3IgPyBwcm9wcy5jb2xvciA6IENPTE9SUy5jb250ZW50LmJyYW5kIH0sIHsgY2hpbGRyZW46IF9qc3goUHJvZ3Jlc3NCYXIsIHsgYW5pbWF0ZWQ6IHByb3BzLmlzQW5pbWF0ZWQsIG5vdzogcHJvcHMuY29tcGxldGVkLCBzdHlsZTogeyBoZWlnaHQ6IGAke3Byb3BzLmhlaWdodCA/IHByb3BzLmhlaWdodCA6IDh9cHhgIH0gfSkgfSkpKTtcclxufTtcclxuZXhwb3J0IGNvbnN0IFByb2dyZXNzQ29tcGxldGVkQmFyID0gc3R5bGVkLmRpdiBgXG5cdGZsZXg6IDUwJTtcblx0LnByb2dyZXNzLWJhciB7XG5cdFx0YmFja2dyb3VuZC1jb2xvcjogJHsocHJvcHMpID0+IHByb3BzLmNvbG9yfTtcblx0fVxuYDtcclxuLy8jIHNvdXJjZU1hcHBpbmdVUkw9UHJvZ3Jlc3NCYXJDb21wb25lbnQuanMubWFwIl19 */"));exports.ProgressBarComponent=c=>e.jsx(s,Object.assign({color:c.color?c.color:t.COLORS.content.brand},{children:e.jsx(b.ProgressBar,{animated:c.isAnimated,now:c.completed,style:{height:`${c.height?c.height:8}px`}})})),exports.ProgressCompletedBar=s;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("../../assets/icons/bik_ai_stars_icon.svg.js"),a=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("../../assets/icons/bik_ai_stars_icon.svg.js"),a=require("react"),r=require("../TypographyStyle.js"),n=require("./model.js"),t=require("./Tag.styled.js"),s=require("./themes.js");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=c(a);const o=a=>{let{tagText:c,LeadingIcon:o,TrailingIcon:d,onLeadingIconClicked:g,leadingIconId:u,trailingIconId:j,onTrailingIconClicked:p,theme:b="light",type:y="neutral",variant:h="regular",version:m,cursor:v}=a;var T;let x=c,O=b,f=y;n.ValidTagTypeMap[h][y]||(f="neutral"),"circle"===h&&(O="dark","number"==typeof x&&x>99&&(x="99+"));const I={height:16,width:16,color:s.getTagIconColor(b,f),style:{display:"block"}},k=()=>"ai"!==y||o?o:i.default;return e.jsx(t.Tag,Object.assign({cursor:v,theme:O,type:y,variant:h,version:m},{children:e.jsxs("div",Object.assign({className:"container"},{children:[k()&&e.jsx("button",Object.assign({className:"icon-leading",onClick:g,id:`${u}-wrapper`||"leading-icon-wrapper"},{children:l.default.createElement(null!==(T=k())&&void 0!==T?T:"",Object.assign(Object.assign({},I),{id:u||"leading-icon"}))})),e.jsx(r.BodyCaption,Object.assign({className:"text"},{children:x})),d&&e.jsx("button",Object.assign({className:"icon-trailing",onClick:p,id:`${j}-wrapper`||"trailing-icon-wrapper"},{children:l.default.createElement(d,Object.assign(Object.assign({},I),{id:j||"trailing-icon"}))}))]}))}))};o.displayName="Tag",exports.Tag=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var c=require("@emotion/styled/base"),e=require("./themes.js");function l(c){return c&&"object"==typeof c&&"default"in c?c:{default:c}}const t=l(c).default("div","production"===process.env.NODE_ENV?{target:"e930jd90"}:{target:"e930jd90",label:"Tag"})("cursor:",(c=>{var e;return null!==(e=c.cursor)&&void 0!==e?e:"default"}),";",(c=>"regular"===c.variant?"display: block;\n\t\t min-height: 26px;\n\t\t":"min-height: 20px;")," .container{display:flex;align-items:center;gap:6px;padding:",(c=>e.getPadding(c.variant)),";background:",(c=>e.getBackgroundColor(c.theme,c.type)),";border-radius:",(c=>"regular"===c.variant?"4px":"12px"),";",(c=>"light"===c.theme&&`border: ${"2.0"===c.version?.5:1}px solid ${e.generateBorder(c.type
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var c=require("@emotion/styled/base"),e=require("./themes.js");function l(c){return c&&"object"==typeof c&&"default"in c?c:{default:c}}const t=l(c).default("div","production"===process.env.NODE_ENV?{target:"e930jd90"}:{target:"e930jd90",label:"Tag"})("cursor:",(c=>{var e;return null!==(e=c.cursor)&&void 0!==e?e:"default"}),";",(c=>"regular"===c.variant?"display: block;\n\t\t min-height: 26px;\n\t\t":"min-height: 20px;")," .container{display:flex;align-items:center;gap:6px;padding:",(c=>e.getPadding(c.variant)),";background:",(c=>e.getBackgroundColor(c.theme,c.type)),";border-radius:",(c=>"regular"===c.variant?"4px":"12px"),";",(c=>"light"===c.theme&&`border: ${"2.0"===c.version?.5:1}px solid ${e.generateBorder(c.type)};`)," .text{color:",(c=>e.getTextColor(c.theme,c.type)),";}.icon-trailing{all:unset;display:flex;}.icon-leading{all:unset;display:flex;}}"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlRhZy5zdHlsZWQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUU4QiIsImZpbGUiOiJUYWcuc3R5bGVkLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcclxuaW1wb3J0IHsgZ2VuZXJhdGVCb3JkZXIsIGdldEJhY2tncm91bmRDb2xvciwgZ2V0UGFkZGluZywgZ2V0VGV4dENvbG9yLCB9IGZyb20gJy4vdGhlbWVzJztcclxuZXhwb3J0IGNvbnN0IFRhZyA9IHN0eWxlZC5kaXYgYFxuXHRjdXJzb3I6ICR7KHByb3BzKSA9PiB7IHZhciBfYTsgcmV0dXJuIChfYSA9IHByb3BzLmN1cnNvcikgIT09IG51bGwgJiYgX2EgIT09IHZvaWQgMCA/IF9hIDogJ2RlZmF1bHQnOyB9fTtcblx0JHsocHJvcHMpID0+IHByb3BzLnZhcmlhbnQgPT09ICdyZWd1bGFyJ1xyXG4gICAgPyBgZGlzcGxheTogYmxvY2s7XG5cdFx0ICAgICBtaW4taGVpZ2h0OiAyNnB4O1xuXHRcdGBcclxuICAgIDogYG1pbi1oZWlnaHQ6IDIwcHg7YH1cblx0LmNvbnRhaW5lciB7XG5cdFx0ZGlzcGxheTogZmxleDtcblx0XHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRcdGdhcDogNnB4O1xuXHRcdHBhZGRpbmc6ICR7KHByb3BzKSA9PiBnZXRQYWRkaW5nKHByb3BzLnZhcmlhbnQpfTtcblxuXHRcdGJhY2tncm91bmQ6ICR7KHByb3BzKSA9PiBnZXRCYWNrZ3JvdW5kQ29sb3IocHJvcHMudGhlbWUsIHByb3BzLnR5cGUpfTtcblxuXHRcdGJvcmRlci1yYWRpdXM6ICR7KHByb3BzKSA9PiAocHJvcHMudmFyaWFudCA9PT0gJ3JlZ3VsYXInID8gJzRweCcgOiAnMTJweCcpfTtcblxuXHRcdCR7KHByb3BzKSA9PiBwcm9wcy50aGVtZSA9PT0gJ2xpZ2h0JyAmJlxyXG4gICAgYGJvcmRlcjogJHtwcm9wcy52ZXJzaW9uID09PSAnMi4wJyA/IDAuNSA6IDF9cHggc29saWQgJHtnZW5lcmF0ZUJvcmRlcihwcm9wcy50eXBlKX07YH1cblxuXHRcdC50ZXh0IHtcblx0XHRcdGNvbG9yOiAkeyhwcm9wcykgPT4gZ2V0VGV4dENvbG9yKHByb3BzLnRoZW1lLCBwcm9wcy50eXBlKX07XG5cdFx0fVxuXG5cdFx0Lmljb24tdHJhaWxpbmcge1xuXHRcdFx0YWxsOiB1bnNldDtcblx0XHRcdGRpc3BsYXk6IGZsZXg7XG5cdFx0fVxuXG5cdFx0Lmljb24tbGVhZGluZyB7XG5cdFx0XHRhbGw6IHVuc2V0O1xuXHRcdFx0ZGlzcGxheTogZmxleDtcblx0XHR9XG5cdH1cbmA7XHJcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPVRhZy5zdHlsZWQuanMubWFwIl19 */"));exports.Tag=t;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { MouseEventHandler } from 'react';
|
|
3
3
|
export type TagTheme = 'light' | 'dark';
|
|
4
|
-
export type TagVariant = 'regular' | 'circle'
|
|
4
|
+
export type TagVariant = 'regular' | 'circle';
|
|
5
5
|
export type TagType = 'negative' | 'warning' | 'positive' | 'neutral' | 'white' | 'purple' | 'blue' | 'grey' | 'ai';
|
|
6
6
|
export declare const ValidTagTypeMap: {
|
|
7
7
|
regular: {
|
|
@@ -23,16 +23,6 @@ export declare const ValidTagTypeMap: {
|
|
|
23
23
|
grey: boolean;
|
|
24
24
|
ai: boolean;
|
|
25
25
|
};
|
|
26
|
-
compressed: {
|
|
27
|
-
negative: boolean;
|
|
28
|
-
warning: boolean;
|
|
29
|
-
positive: boolean;
|
|
30
|
-
neutral: boolean;
|
|
31
|
-
white: boolean;
|
|
32
|
-
purple: boolean;
|
|
33
|
-
blue: boolean;
|
|
34
|
-
ai: boolean;
|
|
35
|
-
};
|
|
36
26
|
};
|
|
37
27
|
export interface TagProps extends React.BaseHTMLAttributes<HTMLDivElement> {
|
|
38
28
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.ValidTagTypeMap={regular:{negative:!0,warning:!0,positive:!0,neutral:!0,white:!0,purple:!0,blue:!0,ai:!0},circle:{negative:!0,warning:!0,positive:!0,neutral:!0,blue:!0,grey:!0,ai:!0}
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.ValidTagTypeMap={regular:{negative:!0,warning:!0,positive:!0,neutral:!0,white:!0,purple:!0,blue:!0,ai:!0},circle:{negative:!0,warning:!0,positive:!0,neutral:!0,blue:!0,grey:!0,ai:!0}};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TagTheme, TagType, TagVariant } from './model';
|
|
2
2
|
export declare const getTagIconColor: (theme: TagTheme, type: TagType) => string;
|
|
3
3
|
export declare const getTextColor: (theme: TagTheme, type: TagType) => string;
|
|
4
|
-
export declare const generateBorder: (type: TagType
|
|
4
|
+
export declare const generateBorder: (type: TagType) => string;
|
|
5
5
|
export declare const getBackgroundColor: (theme: TagTheme | 'circle', type: TagType) => string;
|
|
6
6
|
export declare const getPadding: (variant: TagVariant) => "4px 8px" | "2px 6px";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("../../constants/Theme.js");const e={blue:{iconColor:{light:r.COLORS.content.blue,dark:r.COLORS.content.primaryInverse},textColor:{light:r.COLORS.content.blue,dark:r.COLORS.content.primaryInverse},border:r.COLORS.stroke.blue.lightAlt,backgroundColor:{light:r.COLORS.background.blue.light,dark:r.COLORS.content.blue,circle:r.COLORS.content.blue}},purple:{iconColor:{light:r.COLORS.background.inverseLight,dark:r.COLORS.content.primaryInverse},textColor:{light:r.COLORS.background.inverseLight,dark:r.COLORS.content.primaryInverse},border:r.COLORS.stroke.brandLightAlt,backgroundColor:{light:r.COLORS.background.brandLight,dark:r.COLORS.background.inverse,circle:r.COLORS.background.inverse}},negative:{iconColor:{light:r.COLORS.content.negative,dark:r.COLORS.content.primaryInverse},textColor:{light:r.COLORS.content.negative,dark:r.COLORS.content.primaryInverse},border:r.COLORS.stroke.negative.lightAlt,backgroundColor:{light:r.COLORS.background.negative.light,dark:r.COLORS.background.negative.vibrant,circle:r.COLORS.background.negative.vibrant}},positive:{iconColor:{light:r.COLORS.content.positive,dark:r.COLORS.content.primaryInverse},textColor:{light:r.COLORS.content.positive,dark:r.COLORS.content.primaryInverse},border:r.COLORS.stroke.positive.lightAlt,backgroundColor:{light:r.COLORS.background.positive.light,dark:r.COLORS.background.positive.vibrant,circle:r.COLORS.background.positive.vibrant}},warning:{iconColor:{light:r.COLORS.content.warning,dark:r.COLORS.content.primary},textColor:{light:r.COLORS.content.warning,dark:r.COLORS.content.primary},border:r.COLORS.stroke.warning.lightAlt,backgroundColor:{light:r.COLORS.background.warning.light,dark:r.COLORS.background.warning.vibrant,circle:r.COLORS.background.warning.vibrant}},neutral:{iconColor:{light:r.COLORS.content.secondary,dark:r.COLORS.content.primaryInverse},textColor:{light:r.COLORS.content.secondary,dark:r.COLORS.content.primaryInverse},border:r.COLORS.stroke.primary,backgroundColor:{light:r.COLORS.surface.subdued,dark:r.COLORS.background.inverse,circle:r.COLORS.background.inverseLight}},white:{iconColor:{light:r.COLORS.content.secondary,dark:r.COLORS.content.primaryInverse},textColor:{light:r.COLORS.content.secondary,dark:r.COLORS.content.primaryInverse},border:r.COLORS.stroke.primary,backgroundColor:{light:r.COLORS.surface.standard,dark:r.COLORS.background.inverse,circle:r.COLORS.background.inverseLight}},grey:{iconColor:{light:r.COLORS.content.secondary,dark:r.COLORS.content.primaryInverse},textColor:{light:r.COLORS.content.secondary,dark:r.COLORS.content.primaryInverse},border:r.COLORS.stroke.primary,backgroundColor:{light:r.COLORS.surface.subdued,dark:r.COLORS.content.secondary,circle:r.COLORS.content.secondary}},ai:{iconColor:{light:r.COLORS.content.primaryInverse,dark:r.COLORS.content.primaryInverse},textColor:{light:r.COLORS.content.primaryInverse,dark:r.COLORS.content.primaryInverse},border:"none",backgroundColor:{light:r.COLORS.surface.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("../../constants/Theme.js");const e={blue:{iconColor:{light:r.COLORS.content.blue,dark:r.COLORS.content.primaryInverse},textColor:{light:r.COLORS.content.blue,dark:r.COLORS.content.primaryInverse},border:r.COLORS.stroke.blue.lightAlt,backgroundColor:{light:r.COLORS.background.blue.light,dark:r.COLORS.content.blue,circle:r.COLORS.content.blue}},purple:{iconColor:{light:r.COLORS.background.inverseLight,dark:r.COLORS.content.primaryInverse},textColor:{light:r.COLORS.background.inverseLight,dark:r.COLORS.content.primaryInverse},border:r.COLORS.stroke.brandLightAlt,backgroundColor:{light:r.COLORS.background.brandLight,dark:r.COLORS.background.inverse,circle:r.COLORS.background.inverse}},negative:{iconColor:{light:r.COLORS.content.negative,dark:r.COLORS.content.primaryInverse},textColor:{light:r.COLORS.content.negative,dark:r.COLORS.content.primaryInverse},border:r.COLORS.stroke.negative.lightAlt,backgroundColor:{light:r.COLORS.background.negative.light,dark:r.COLORS.background.negative.vibrant,circle:r.COLORS.background.negative.vibrant}},positive:{iconColor:{light:r.COLORS.content.positive,dark:r.COLORS.content.primaryInverse},textColor:{light:r.COLORS.content.positive,dark:r.COLORS.content.primaryInverse},border:r.COLORS.stroke.positive.lightAlt,backgroundColor:{light:r.COLORS.background.positive.light,dark:r.COLORS.background.positive.vibrant,circle:r.COLORS.background.positive.vibrant}},warning:{iconColor:{light:r.COLORS.content.warning,dark:r.COLORS.content.primary},textColor:{light:r.COLORS.content.warning,dark:r.COLORS.content.primary},border:r.COLORS.stroke.warning.lightAlt,backgroundColor:{light:r.COLORS.background.warning.light,dark:r.COLORS.background.warning.vibrant,circle:r.COLORS.background.warning.vibrant}},neutral:{iconColor:{light:r.COLORS.content.secondary,dark:r.COLORS.content.primaryInverse},textColor:{light:r.COLORS.content.secondary,dark:r.COLORS.content.primaryInverse},border:r.COLORS.stroke.primary,backgroundColor:{light:r.COLORS.surface.subdued,dark:r.COLORS.background.inverse,circle:r.COLORS.background.inverseLight}},white:{iconColor:{light:r.COLORS.content.secondary,dark:r.COLORS.content.primaryInverse},textColor:{light:r.COLORS.content.secondary,dark:r.COLORS.content.primaryInverse},border:r.COLORS.stroke.primary,backgroundColor:{light:r.COLORS.surface.standard,dark:r.COLORS.background.inverse,circle:r.COLORS.background.inverseLight}},grey:{iconColor:{light:r.COLORS.content.secondary,dark:r.COLORS.content.primaryInverse},textColor:{light:r.COLORS.content.secondary,dark:r.COLORS.content.primaryInverse},border:r.COLORS.stroke.primary,backgroundColor:{light:r.COLORS.surface.subdued,dark:r.COLORS.content.secondary,circle:r.COLORS.content.secondary}},ai:{iconColor:{light:r.COLORS.content.primaryInverse,dark:r.COLORS.content.primaryInverse},textColor:{light:r.COLORS.content.primaryInverse,dark:r.COLORS.content.primaryInverse},border:"none",backgroundColor:{light:r.COLORS.surface.ai,dark:r.COLORS.surface.ai,circle:r.COLORS.surface.ai}}};exports.generateBorder=r=>e[r].border,exports.getBackgroundColor=(r,t)=>e[t].backgroundColor[r],exports.getPadding=r=>"regular"===r?"4px 8px":"2px 6px",exports.getTagIconColor=(r,t)=>e[t].iconColor[r],exports.getTextColor=(r,t)=>e[t].textColor[r];
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
border-left: ${s.COLORS.stroke.primary} 1px solid;
|
|
12
12
|
border-top: ${e=>e.isWhatsappCarousel?`${s.COLORS.stroke.primary} 1px solid`:void 0};
|
|
13
13
|
${e=>!e.showVariableMapping&&"width: 340px; height: 500px"};
|
|
14
|
-
`,
|
|
14
|
+
`,g=P.default.div`
|
|
15
15
|
padding: ${e=>e.isWhatsappCarousel?void 0:e.showOnlyContent?"16px 14px":"16px 32px"};
|
|
16
16
|
flex: 1;
|
|
17
17
|
height: ${e=>e.isWhatsappCarousel||e.hideDeviceContainerInPreview?"500px":"475px"};
|
|
@@ -19,4 +19,4 @@
|
|
|
19
19
|
background-image: ${e=>e.hideDeviceContainerInPreview&&e.channel===o.CHANNEL_TYPE.WHATSAPP?`url(${d.BACKGROUND_PREVIEW_IMAGE});`:"none"};
|
|
20
20
|
display: ${e=>e.hideDeviceContainerInPreview&&e.channel===o.CHANNEL_TYPE.WHATSAPP?"flex":"initial"};
|
|
21
21
|
align-items: flex-start;
|
|
22
|
-
`;exports.default=i=>{const{showVariableMapping:d,showOnlyContent:v,whatsappSpecificPickerMeta:P,showVariableModal:
|
|
22
|
+
`;exports.default=i=>{const{showVariableMapping:d,showOnlyContent:v,whatsappSpecificPickerMeta:P,showVariableModal:x,variableList:E,discountCode:b,setDiscountCode:A,variableListForImage:j,showSampleValues:N,fileName:T,setFileName:y}=i,L=t.useRef(),S=t.useRef(),{device:_,display_content:M,channel:W,template:H,setTemplate:O,isWhatsappCarousel:V,isProductCarouselType:I,hideDeviceContainerInPreview:q}=r.useTemplateModalContext();const k=e=>{let t=0;for(;e;)t+=e.offsetTop,e=e.offsetParent;return t};return console.log("template",M,W,H,O,V,I,q),e.jsxs(w,{children:[e.jsx(g,Object.assign({showOnlyContent:v,showVariableMapping:d,isWhatsappCarousel:V,hideDeviceContainerInPreview:q,channel:W},{children:"mobile"===_?e.jsx(m.default,{ref:S,display_content:null!=M?M:"",channel:W,template:H,showSampleValues:N}):W===o.CHANNEL_TYPE.WHATSAPP&&V?e.jsx(a.CarouselPreview,{ref:L,channel:W,template:H,showSampleValues:N,isPreview:!1,showArrows:!0}):W!==o.CHANNEL_TYPE.MESSAGE?e.jsx(c.default,{ref:L,channel:W,display_content:null!=M?M:"",showSampleValues:N}):e.jsx(e.Fragment,{})})),(I||d)&&e.jsx(f,Object.assign({channel:W,isWhatsappCarousel:V,showVariableMapping:!0},{children:W!==o.CHANNEL_TYPE.WHATSAPP?e.jsx(C.default,{onFocus:W===o.CHANNEL_TYPE.EMAIL?function(e){var t,i,a;const l=null===document||void 0===document?void 0:document.getElementById("mobile"===_?"template_html_mobile":"template_html_desktop"),n=p.getVariableNameForEmailByIndex(e+1),r=W===o.CHANNEL_TYPE.EMAIL?null===(t=null==l?void 0:l.contentWindow)||void 0===t?void 0:t.document.getElementById(n):document.getElementById(n),d=k(r),c=null==r?void 0:r.offsetLeft;"desktop"===_?d&&L.current&&(null===(i=null==l?void 0:l.contentWindow)||void 0===i||i.scrollTo(null!=c?c:0,d),u.highlightFor(n,s.COLORS.background.warning.light,2,W,_)):d&&S.current&&(null===(a=null==l?void 0:l.contentWindow)||void 0===a||a.scrollTo(null!=c?c:0,d),u.highlightFor(n,s.COLORS.background.warning.light,2,W,_))}:void 0,showVariableModal:x,variableList:E,discountCode:b,setDiscountCode:A}):W===o.CHANNEL_TYPE.WHATSAPP&&V?e.jsx(l.default,{whatsappSpecificPickerMeta:P,template:H,showVariableModal:x,variableList:E,variableListForImage:j,discountCode:b,setDiscountCode:A}):e.jsx(h.default,{whatsappSpecificPickerMeta:P,template:H,onTemplateChange:e=>{null==O||O(e)},showVariableModal:x,variableList:E,variableListForImage:j,discountCode:b,setDiscountCode:A,fileName:T,setFileName:y})})),W===o.CHANNEL_TYPE.WHATSAPP&&!d&&!I&&e.jsx(f,{children:e.jsx(n.BodySecondary,Object.assign({color:s.COLORS.content.secondary,style:{fontStyle:"italic"}},{children:"Click on ‘Select template’ below to use it"}))})]})};
|
|
@@ -17,4 +17,4 @@
|
|
|
17
17
|
height: 6px;
|
|
18
18
|
background: #d9d9d9;
|
|
19
19
|
border-radius: 3px;
|
|
20
|
-
`,h=d.default.forwardRef(((r,t)=>{let{display_content:s,showSampleValues:l}=r;return e.jsxs(n,Object.assign({ref:t},{children:[e.jsxs(u,{children:[e.jsx(m,{}),e.jsx(m,{}),e.jsx(m,{})]}),e.jsx("div",{children:s?e.jsx(a.TemplatePreview,{showSampleValues:l,channel:p.CHANNEL_TYPE.EMAIL,hideHeader:!0,emailSpecificMeta:{emailDisplayContent:s,hideViewButtonForEmail:!0,emailHtmlContainerId:"template_html_desktop",containerStyle:{height:441},templateContainerStyles:{height:"100%"}}}):e.jsx("div",Object.assign({style:{padding:20}},{children:e.jsx(i.Spinner,{size:"small"})}))})]}))}));h.displayName="DesktopPreview",exports.default=h;
|
|
20
|
+
`,h=d.default.forwardRef(((r,t)=>{let{display_content:s,showSampleValues:l}=r;return console.log("display_content inside preview",s),e.jsxs(n,Object.assign({ref:t},{children:[e.jsxs(u,{children:[e.jsx(m,{}),e.jsx(m,{}),e.jsx(m,{})]}),e.jsx("div",{children:s?e.jsx(a.TemplatePreview,{showSampleValues:l,channel:p.CHANNEL_TYPE.EMAIL,hideHeader:!0,emailSpecificMeta:{emailDisplayContent:s,hideViewButtonForEmail:!0,emailHtmlContainerId:"template_html_desktop",containerStyle:{height:441},templateContainerStyles:{height:"100%"}}}):e.jsx("div",Object.assign({style:{padding:20}},{children:e.jsx(i.Spinner,{size:"small"})}))})]}))}));h.displayName="DesktopPreview",exports.default=h;
|
package/dist/cjs/components/template-context-mapper/modalElements/VariableConnectorsPanel.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),a=require("../../../assets/icons/info.svg.js"),t=require("react"),i=require("styled-components"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),a=require("../../../assets/icons/info.svg.js"),t=require("react"),i=require("styled-components"),s=require("../../add-variableV2/AddVariableV2SideModal.js");require("../../../_virtual/_tslib.js");var r=require("../../../assets/icons/plus.svg.js");require("../../add-variableV2/AddVariableV2.styled.js"),require("../../button/Button.js"),require("../../icon-button/IconButton.js");var l=require("../../input/Input.js"),o=require("../../tooltips/Tooltip.js"),n=require("../../../constants/Theme.js");require("../../modals/modal.styled.js"),require("../../switch/Switch.js");var d=require("../../TypographyStyle.js"),c=require("../../checkBox/CheckBox.js"),u=require("../context/templateModalContext.js"),h=require("./VariableConnector.js");function g(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var x=g(i);const b=x.default.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
height: 100%;
|
|
5
|
-
`,
|
|
5
|
+
`,p=x.default.button`
|
|
6
6
|
padding: 2px 8px;
|
|
7
7
|
cursor: pointer;
|
|
8
8
|
color: white;
|
|
@@ -25,4 +25,4 @@
|
|
|
25
25
|
align-items: center;
|
|
26
26
|
gap: 5px;
|
|
27
27
|
}
|
|
28
|
-
`;exports.AddVariableStyled=
|
|
28
|
+
`;exports.AddVariableStyled=p,exports.Container=b,exports.default=i=>{let{onFocus:g,showVariableModal:x,variableList:j,discountCode:f,setDiscountCode:v}=i;const{originalVariableList:y,disableEditVariable:m}=u.useTemplateModalContext(),[V,O]=t.useState(!1),[q,S]=t.useState(!1),[C,w]=t.useState(!1),[k,T]=t.useState(""),[L,B]=t.useState(!1),E=t.useRef(),A=t.useRef();return t.useEffect((()=>{v&&v(f+k)}),[k]),t.useEffect((()=>{y.forEach((e=>{"checkout.checkoutUrl"===e.updatedValue.replace("{{","").replace("}}","")&&(console.log("is it changing here",e),O(!0),f&&B&&B(!0))}))}),[y]),console.log("variableList",j,y),e.jsxs(b,{children:[e.jsxs("div",Object.assign({style:{padding:8}},{children:[e.jsxs("div",Object.assign({style:{display:"flex",gap:8,alignItems:"center",marginBottom:4}},{children:[e.jsx(d.TitleRegular,Object.assign({style:{color:n.COLORS.content.primary}},{children:"Edit variables and links"})),e.jsx(o.Tooltip,Object.assign({body:"Variables are placeholder texts which can either be filled by data, eg: customer name or can have any custom text within them"},{children:e.jsx("div",Object.assign({style:{display:"flex"}},{children:e.jsx(a.default,{width:20,height:20,color:n.COLORS.content.placeholder})}))}))]})),e.jsx(d.BodySecondary,Object.assign({style:{color:n.COLORS.content.secondary}},{children:"You can view variables and links on the left underlined in purple colour."}))]})),null==y?void 0:y.map(((a,t)=>!a.isEditableVariable||m?e.jsxs("div",Object.assign({style:{margin:"16px 8px"}},{children:[e.jsxs(d.BodySecondary,Object.assign({style:{color:n.COLORS.content.primary}},{children:["Locked variable ",t+1]})),e.jsx(l.Input,{state:"disabled",placeholder:a.variableName,onChangeText:()=>{}})]}),t):e.jsx("div",Object.assign({style:{marginTop:16}},{children:e.jsx(h.default,{index:t,variable:a,onFocus:()=>null==g?void 0:g(t),showVariableModal:x,variableList:j,setShowDiscountCheckBox:O})}),t))),(V||f)&&e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"row",marginLeft:10,marginTop:8}},{children:[e.jsx(c.CheckBox,{isChecked:L,onValueChange:()=>{L&&v&&v(""),B(!L)}}),e.jsx(d.TitleSmall,Object.assign({style:{marginLeft:8}},{children:"Add discount code"}))]})),L&&e.jsxs("div",Object.assign({ref:E,style:{margin:10}},{children:[e.jsx(l.Input,{placeholder:"Enter your discount code",onChangeText:e=>{v&&v(e)},value:f,onFocus:()=>{S(!0)},onBlur:e=>{var a;"addVar"===(null===(a=e.relatedTarget)||void 0===a?void 0:a.id)?(E.current&&E.current.focus(),S(!0)):(S(!1),w(!1))},noErrorHint:!0,validate:e=>[!0,""]}),q&&e.jsx(p,Object.assign({ref:A,id:"addVar",onClick:e=>{e.stopPropagation(),w(!0)}},{children:e.jsxs("div",Object.assign({className:"add"},{children:[e.jsx(r.default,{width:20,height:20,color:"white"}),e.jsx("div",Object.assign({className:"variable"},{children:"Add variable"}))]}))}))]})),C&&e.jsx(s.AddVariableV2SideModal,{zIndex:2e3,data:null!=j?j:[],showVariable:C,setShowVariable:w,variableValue:k,setVariableValue:e=>{console.log("changed",e),T(e)},placeholder:"Add a variable",customTrigger:e=>{console.log("it is not custom trigger",e),T(e.actualValue),S(!1)}})]})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../assets/icons/arrow_left.svg.js"),r=require("../../assets/icons/more_vertical.svg.js"),s=require("../../assets/icons/search.svg.js"),l=require("../../constants/Theme.js"),n=require("../template-context-mapper/context/templateModalContext.js"),i=require("../TypographyStyle.js"),a=require("./helpers/SmsTemplateHelper.js"),o=require("./SMS/SMSBubble.js"),d=require("./SmsTemplatePreview.styled.js");exports.default=c=>{let{template:u,variableStore:j,hideHeader:h,display_content:x,onlyTemplateContent:p,size:g}=c;var v;const S=null==u?void 0:u.content,{hideDeviceContainerInPreview:m}=n.useTemplateModalContext();return console.log("templateContent",u),m?e.jsx(d.SMSBubbleContainer,Object.assign({size:g},{children:e.jsx(o.default,{size:null!=g?g:"large",content:null!=x?x:a.renderVariableUIForPreview(S,null!=j?j:[])})})):e.jsxs(e.Fragment,{children:[!h&&!p&&e.jsx(d.SMSCardHeader,{children:e.jsx(i.TitleRegular,Object.assign({style:{maxWidth:"100%"}},{children:u.name}))}),!p&&e.jsx(d.SMSHeader,{children:e.jsxs(e.Fragment,{children:[e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"row",gap:8}},{children:[e.jsx(t.default,{width:16,height:16,color:l.COLORS.content.secondary}),e.jsx(i.Caption,{children:null===(v=null==u?void 0:u.headers)||void 0===v?void 0:v[0]})]})),e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"row",gap:8}},{children:[e.jsx(s.default,{width:16,height:16,color:l.COLORS.content.secondary}),e.jsx(r.default,{width:16,height:16,color:l.COLORS.content.secondary})]}))]})}),e.jsx(d.SMSBubbleContainer,Object.assign({size:g},{children:e.jsx(o.default,{size:null!=g?g:"large",content:null!=x?x:a.renderVariableUIForPreview(S,null!=j?j:[])})}))]})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),l=require("../template-context-mapper/context/templateModalContext.js"),t=require("../../utils/StringUtils.js"),a=require("../../constants/Theme.js"),i=require("../TypographyStyle.js"),n=require("./EmailTemplateThumbnailPreview.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),l=require("../template-context-mapper/context/templateModalContext.js"),t=require("../../utils/StringUtils.js"),a=require("../../constants/Theme.js"),i=require("../TypographyStyle.js"),n=require("./EmailTemplateThumbnailPreview.js"),s=require("./models/Channels.js"),r=require("./SmsTemplatePreview.js"),o=require("./WhatsAppTemplatePreview.js");const d={WhatsAppWrapper:{backgroundColor:a.COLORS.surface.standard,borderRadius:4,border:`1px solid ${a.COLORS.background.inactive}`,marginTop:16}};exports.TemplatePreview=p=>{let{template:u,channel:m,whatsAppSpecificMeta:c,templateCreationsInfo:v,hideHeader:h,size:C,onlyTemplateContent:j,emailSpecificMeta:g,smsSpecificMeta:S,showSampleValues:y,carouselCardIndex:b,isWhatsappCarousel:x,isPreview:T}=p;var w,O;const{setSelectedCarouselIndex:P}=l.useTemplateModalContext();return console.log("why the fuck",null==S?void 0:S.smsDisplayContent),m===s.CHANNEL_TYPE.SMS?e.jsx("div",Object.assign({style:Object.assign({marginTop:v?16:0,border:v?`1px solid ${a.COLORS.stroke.primary}`:"none",borderRadius:4},null==S?void 0:S.templateContainerStyles)},{children:e.jsx(r.default,{template:u,hideHeader:h,onlyTemplateContent:j,size:null!=C?C:"large",variableStore:null==S?void 0:S.smsVariableStore,display_content:null==S?void 0:S.smsDisplayContent})})):m===s.CHANNEL_TYPE.EMAIL?e.jsx("div",Object.assign({style:Object.assign({marginTop:v?16:0},null==g?void 0:g.templateContainerStyles)},{children:e.jsx(n.default,{template:u,handleViewTemplate:()=>{var e;null===(e=null==g?void 0:g.handleViewTemplate)||void 0===e||e.call(g)},hideHeader:h,hideViewButton:null==g?void 0:g.hideViewButtonForEmail,containerStyle:null==g?void 0:g.containerStyle,emailDisplayContent:null==g?void 0:g.emailDisplayContent,emailHtmlContainerId:null==g?void 0:g.emailHtmlContainerId})})):m===s.CHANNEL_TYPE.WHATSAPP?e.jsxs("div",Object.assign({style:Object.assign(Object.assign({},null==c?void 0:c.templateContainerStyles),v?d.WhatsAppWrapper:{}),onClick:()=>{var e,l;if(P&&x){if(-1===b&&!(null===(l=null===(e=null==u?void 0:u.mapping)||void 0===e?void 0:e.body)||void 0===l?void 0:l.length))return;P(null!=b?b:-1)}}},{children:[v?e.jsx("div",Object.assign({style:{padding:16}},{children:e.jsx(i.TitleRegular,{children:t.default.convertToTitleCase(null!==(w=null==u?void 0:u.label)&&void 0!==w?w:"")})})):e.jsx(e.Fragment,{}),e.jsx(o.default,{showSampleValues:y,showHeader:null==c?void 0:c.showWhatsAppHeader,extras:null==c?void 0:c.whatsAppExtras,template:u,size:v?"small":null!=C?C:"large",containerStyle:Object.assign(Object.assign({borderWidth:v?0:1,borderTopWidth:1},null!==(O=null==c?void 0:c.containerStyle)&&void 0!==O?O:{}),{height:"100%"}),zeroStateComponent:null==c?void 0:c.zeroStateComponent,usePlaceHolderName:null==c?void 0:c.usePlaceHolderName,carouselCardIndex:b,isWhatsappCarousel:x,isPreview:T})]})):e.jsx(e.Fragment,{})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");exports.useOutside=function(t,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");exports.useOutside=function(t,r){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];e.useEffect((()=>{function e(e){let u=!0;null==n||n.forEach((t=>{t&&t.current&&t.current.contains(e.target)&&(u=!1)})),u&&t.current&&!t.current.contains(e.target)&&r()}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[t])};
|
package/dist/cjs/index.d.ts
CHANGED