@bikdotai/bik-component-library 0.0.512-beta.ai-1 → 0.0.512

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.
Files changed (113) hide show
  1. package/dist/cjs/assets/icons/broken_media_image.svg.js +1 -0
  2. package/dist/cjs/components/QueryBuilder/Triggers/EVENTS/components/EventsTrigger.d.ts +1 -1
  3. package/dist/cjs/components/QueryBuilder/Triggers/EVENTS/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
  4. package/dist/cjs/components/QueryBuilder/Triggers/IG/components/IGTrigger.d.ts +1 -1
  5. package/dist/cjs/components/QueryBuilder/Triggers/IG/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
  6. package/dist/cjs/components/QueryBuilder/Triggers/components/BaseTriggerQueryBuilderNode.d.ts +2 -2
  7. package/dist/cjs/components/TypographyStyle.d.ts +0 -17
  8. package/dist/cjs/components/TypographyStyle.js +14 -77
  9. package/dist/cjs/components/bik-layout/MockMenus.d.ts +0 -1
  10. package/dist/cjs/components/button/Button.js +1 -1
  11. package/dist/cjs/components/button/model.d.ts +1 -1
  12. package/dist/cjs/components/button/themes.d.ts +2 -2
  13. package/dist/cjs/components/button/themes.js +1 -1
  14. package/dist/cjs/components/helpers/FileUploaderHelper.d.ts +1 -1
  15. package/dist/cjs/components/helpers/FileUploaderHelper.js +1 -1
  16. package/dist/cjs/components/icon-button/IconButton.styled.js +1 -1
  17. package/dist/cjs/components/icon-button/model.d.ts +1 -1
  18. package/dist/cjs/components/icon-button/theme.js +1 -1
  19. package/dist/cjs/components/image-cropper/BikImageCropper.d.ts +1 -1
  20. package/dist/cjs/components/image-cropper/BikImageCropper.js +1 -1
  21. package/dist/cjs/components/input-with-vars/InputWithVariables.d.ts +1 -0
  22. package/dist/cjs/components/input-with-vars/InputWithVariables.js +1 -1
  23. package/dist/cjs/components/modals/styledModal.d.ts +1 -0
  24. package/dist/cjs/components/modals/styledModal.js +1 -1
  25. package/dist/cjs/components/spinner/Spinner.d.ts +6 -0
  26. package/dist/cjs/components/spinner/Spinner.js +18 -1
  27. package/dist/cjs/components/tag/Tag.js +1 -1
  28. package/dist/cjs/components/tag/Tag.styled.js +1 -1
  29. package/dist/cjs/components/tag/model.d.ts +1 -11
  30. package/dist/cjs/components/tag/model.js +1 -1
  31. package/dist/cjs/components/tag/themes.d.ts +1 -1
  32. package/dist/cjs/components/tag/themes.js +1 -1
  33. package/dist/cjs/components/template-context-mapper/TemplateContextMapper.d.ts +6 -1
  34. package/dist/cjs/components/template-context-mapper/TemplateContextMapper.js +1 -1
  35. package/dist/cjs/components/template-context-mapper/context/templateModalContext.d.ts +10 -0
  36. package/dist/cjs/components/template-context-mapper/modalElements/Body.js +9 -6
  37. package/dist/cjs/components/template-context-mapper/modalElements/DesktopPreview.js +1 -1
  38. package/dist/cjs/components/template-context-mapper/modalElements/EditMediaModal.d.ts +4 -0
  39. package/dist/cjs/components/template-context-mapper/modalElements/EditMediaModal.js +1 -1
  40. package/dist/cjs/components/template-context-mapper/modalElements/EditMediaV2.d.ts +0 -1
  41. package/dist/cjs/components/template-context-mapper/modalElements/EditMediaV2.js +6 -5
  42. package/dist/cjs/components/template-context-mapper/modalElements/EditMediaV2.style.js +6 -5
  43. package/dist/cjs/components/template-context-mapper/modalElements/EditWhatsAppTemplateV2.js +2 -2
  44. package/dist/cjs/components/template-context-mapper/modalElements/MobilePreview.js +9 -4
  45. package/dist/cjs/components/template-context-mapper/modalElements/VariableConnector.js +1 -1
  46. package/dist/cjs/components/template-context-mapper/modalElements/useEditWhtasappTemplateMedia.d.ts +29 -0
  47. package/dist/cjs/components/template-context-mapper/modalElements/useEditWhtasappTemplateMedia.js +1 -0
  48. package/dist/cjs/components/template-context-mapper/utils/constants.d.ts +1 -0
  49. package/dist/cjs/components/template-context-mapper/utils/constants.js +1 -0
  50. package/dist/cjs/components/template-context-mapper/utils/validateIsUrl.d.ts +1 -0
  51. package/dist/cjs/components/template-context-mapper/utils/validateIsUrl.js +1 -1
  52. package/dist/cjs/components/template-preview/SmsTemplatePreview.js +1 -1
  53. package/dist/cjs/components/template-preview/WhatsApp/WhatsAppLikePreviewV2.js +5 -5
  54. package/dist/cjs/index.js +1 -1
  55. package/dist/esm/assets/icons/broken_media_image.svg.js +1 -0
  56. package/dist/esm/components/QueryBuilder/Triggers/EVENTS/components/EventsTrigger.d.ts +1 -1
  57. package/dist/esm/components/QueryBuilder/Triggers/EVENTS/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
  58. package/dist/esm/components/QueryBuilder/Triggers/IG/components/IGTrigger.d.ts +1 -1
  59. package/dist/esm/components/QueryBuilder/Triggers/IG/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
  60. package/dist/esm/components/QueryBuilder/Triggers/components/BaseTriggerQueryBuilderNode.d.ts +2 -2
  61. package/dist/esm/components/TypographyStyle.d.ts +0 -17
  62. package/dist/esm/components/TypographyStyle.js +83 -146
  63. package/dist/esm/components/bik-layout/MockMenus.d.ts +0 -1
  64. package/dist/esm/components/button/Button.js +1 -1
  65. package/dist/esm/components/button/model.d.ts +1 -1
  66. package/dist/esm/components/button/themes.d.ts +2 -2
  67. package/dist/esm/components/button/themes.js +1 -1
  68. package/dist/esm/components/helpers/FileUploaderHelper.d.ts +1 -1
  69. package/dist/esm/components/helpers/FileUploaderHelper.js +1 -1
  70. package/dist/esm/components/icon-button/IconButton.styled.js +1 -1
  71. package/dist/esm/components/icon-button/model.d.ts +1 -1
  72. package/dist/esm/components/icon-button/theme.js +1 -1
  73. package/dist/esm/components/image-cropper/BikImageCropper.d.ts +1 -1
  74. package/dist/esm/components/image-cropper/BikImageCropper.js +1 -1
  75. package/dist/esm/components/input-with-vars/InputWithVariables.d.ts +1 -0
  76. package/dist/esm/components/input-with-vars/InputWithVariables.js +1 -1
  77. package/dist/esm/components/modals/styledModal.d.ts +1 -0
  78. package/dist/esm/components/modals/styledModal.js +1 -1
  79. package/dist/esm/components/spinner/Spinner.d.ts +6 -0
  80. package/dist/esm/components/spinner/Spinner.js +18 -1
  81. package/dist/esm/components/tag/Tag.js +1 -1
  82. package/dist/esm/components/tag/Tag.styled.js +1 -1
  83. package/dist/esm/components/tag/model.d.ts +1 -11
  84. package/dist/esm/components/tag/model.js +1 -1
  85. package/dist/esm/components/tag/themes.d.ts +1 -1
  86. package/dist/esm/components/tag/themes.js +1 -1
  87. package/dist/esm/components/template-context-mapper/TemplateContextMapper.d.ts +6 -1
  88. package/dist/esm/components/template-context-mapper/TemplateContextMapper.js +1 -1
  89. package/dist/esm/components/template-context-mapper/context/templateModalContext.d.ts +10 -0
  90. package/dist/esm/components/template-context-mapper/modalElements/Body.js +12 -9
  91. package/dist/esm/components/template-context-mapper/modalElements/DesktopPreview.js +1 -1
  92. package/dist/esm/components/template-context-mapper/modalElements/EditMediaModal.d.ts +4 -0
  93. package/dist/esm/components/template-context-mapper/modalElements/EditMediaModal.js +1 -1
  94. package/dist/esm/components/template-context-mapper/modalElements/EditMediaV2.d.ts +0 -1
  95. package/dist/esm/components/template-context-mapper/modalElements/EditMediaV2.js +6 -5
  96. package/dist/esm/components/template-context-mapper/modalElements/EditMediaV2.style.js +4 -3
  97. package/dist/esm/components/template-context-mapper/modalElements/EditWhatsAppTemplateV2.js +2 -2
  98. package/dist/esm/components/template-context-mapper/modalElements/MobilePreview.js +9 -4
  99. package/dist/esm/components/template-context-mapper/modalElements/VariableConnector.js +3 -3
  100. package/dist/esm/components/template-context-mapper/modalElements/useEditWhtasappTemplateMedia.d.ts +29 -0
  101. package/dist/esm/components/template-context-mapper/modalElements/useEditWhtasappTemplateMedia.js +1 -0
  102. package/dist/esm/components/template-context-mapper/utils/constants.d.ts +1 -0
  103. package/dist/esm/components/template-context-mapper/utils/constants.js +1 -0
  104. package/dist/esm/components/template-context-mapper/utils/validateIsUrl.d.ts +1 -0
  105. package/dist/esm/components/template-context-mapper/utils/validateIsUrl.js +1 -1
  106. package/dist/esm/components/template-preview/SmsTemplatePreview.js +1 -1
  107. package/dist/esm/components/template-preview/WhatsApp/WhatsAppLikePreviewV2.js +5 -5
  108. package/dist/esm/index.js +1 -1
  109. package/package.json +1 -1
  110. package/dist/cjs/components/template-context-mapper/modalElements/EditWhatsAppTemplateMediaV2.d.ts +0 -11
  111. package/dist/cjs/components/template-context-mapper/modalElements/EditWhatsAppTemplateMediaV2.js +0 -1
  112. package/dist/esm/components/template-context-mapper/modalElements/EditWhatsAppTemplateMediaV2.d.ts +0 -11
  113. package/dist/esm/components/template-context-mapper/modalElements/EditWhatsAppTemplateMediaV2.js +0 -1
@@ -1,233 +1,170 @@
1
- import e from"styled-components";import{COLORS as t,FONTS as i}from"../constants/Theme.js";const o=e=>e+"px",n=e.div`
1
+ import e from"styled-components";import{COLORS as i,FONTS as t}from"../constants/Theme.js";const o=e=>e+"px",n=e.div`
2
2
  font-family: Inter;
3
- color: ${e=>e.color||t.text.primary};
4
- font-weight: ${i.titleLarge.fontWeight};
5
- font-size: ${o(i.titleLarge.fontSize)};
6
- line-height: ${o(i.titleLarge.lineHeight)};
7
- -webkit-box-orient: vertical;
8
- overflow: hidden;
9
- display: -webkit-box;
10
- -webkit-line-clamp: ${e=>e.numberOfLines};
11
- `,r=e.div`
12
- font-family: Inter;
13
- color: ${e=>e.color||t.text.primary};
14
- font-weight: ${i.titleMedium.fontWeight};
15
- font-size: ${o(i.titleMedium.fontSize)};
16
- line-height: ${o(i.titleMedium.lineHeight)};
3
+ color: ${e=>e.color||i.text.primary};
4
+ font-weight: ${t.titleLarge.fontWeight};
5
+ font-size: ${o(t.titleLarge.fontSize)};
6
+ line-height: ${o(t.titleLarge.lineHeight)};
17
7
  -webkit-box-orient: vertical;
18
8
  overflow: hidden;
19
9
  display: -webkit-box;
20
10
  -webkit-line-clamp: ${e=>e.numberOfLines};
21
11
  `,l=e.div`
22
12
  font-family: Inter;
23
- color: ${e=>e.color||t.text.primary};
24
- font-weight: ${i.title4.fontWeight};
25
- font-size: ${o(i.title4.fontSize)};
26
- line-height: ${o(i.title4.lineHeight)};
13
+ color: ${e=>e.color||i.text.primary};
14
+ font-weight: ${t.titleMedium.fontWeight};
15
+ font-size: ${o(t.titleMedium.fontSize)};
16
+ line-height: ${o(t.titleMedium.lineHeight)};
27
17
  -webkit-box-orient: vertical;
28
18
  overflow: hidden;
29
19
  display: -webkit-box;
30
20
  -webkit-line-clamp: ${e=>e.numberOfLines};
31
- `,a=e.div`
21
+ `,r=e.div`
32
22
  font-family: Inter;
33
- color: ${e=>e.color||t.text.primary};
34
- font-weight: ${i.titleRegular.fontWeight};
35
- font-size: ${o(i.titleRegular.fontSize)};
36
- line-height: ${o(i.titleRegular.lineHeight)};
23
+ color: ${e=>e.color||i.text.primary};
24
+ font-weight: ${t.title4.fontWeight};
25
+ font-size: ${o(t.title4.fontSize)};
26
+ line-height: ${o(t.title4.lineHeight)};
37
27
  -webkit-box-orient: vertical;
38
28
  overflow: hidden;
39
29
  display: -webkit-box;
40
30
  -webkit-line-clamp: ${e=>e.numberOfLines};
41
31
  `,f=e.div`
42
32
  font-family: Inter;
43
- color: ${e=>e.color||t.text.primary};
44
- font-weight: ${i.titleSmall.fontWeight};
45
- font-size: ${o(i.titleSmall.fontSize)};
46
- line-height: ${o(i.titleSmall.lineHeight)};
33
+ color: ${e=>e.color||i.text.primary};
34
+ font-weight: ${t.titleRegular.fontWeight};
35
+ font-size: ${o(t.titleRegular.fontSize)};
36
+ line-height: ${o(t.titleRegular.lineHeight)};
47
37
  -webkit-box-orient: vertical;
48
38
  overflow: hidden;
49
39
  display: -webkit-box;
50
40
  -webkit-line-clamp: ${e=>e.numberOfLines};
51
- `,b=e.div`
41
+ `,a=e.div`
52
42
  font-family: Inter;
53
- color: ${e=>e.color||t.text.primary};
54
- font-weight: ${i.display.fontWeight};
55
- font-size: ${o(i.display.fontSize)};
56
- line-height: ${o(i.display.lineHeight)};
43
+ color: ${e=>e.color||i.text.primary};
44
+ font-weight: ${t.titleSmall.fontWeight};
45
+ font-size: ${o(t.titleSmall.fontSize)};
46
+ line-height: ${o(t.titleSmall.lineHeight)};
57
47
  -webkit-box-orient: vertical;
58
48
  overflow: hidden;
59
49
  display: -webkit-box;
60
50
  -webkit-line-clamp: ${e=>e.numberOfLines};
61
- `,d=e.div`
51
+ `,b=e.div`
62
52
  font-family: Inter;
63
- color: ${e=>e.color||t.text.primary};
64
- font-weight: ${i.bodyPrimary.fontWeight};
65
- font-size: ${o(i.bodyLarge.fontSize)};
66
- line-height: ${o(i.bodyLarge.lineHeight)};
53
+ color: ${e=>e.color||i.text.primary};
54
+ font-weight: ${t.display.fontWeight};
55
+ font-size: ${o(t.display.fontSize)};
56
+ line-height: ${o(t.display.lineHeight)};
67
57
  -webkit-box-orient: vertical;
68
58
  overflow: hidden;
69
59
  display: -webkit-box;
70
60
  -webkit-line-clamp: ${e=>e.numberOfLines};
71
- `,c=e.div`
61
+ `,d=e.div`
72
62
  font-family: Inter;
73
- color: ${e=>e.color||t.text.primary};
74
- font-weight: ${i.bodyPrimary.fontWeight};
75
- font-size: ${o(i.bodyPrimary.fontSize)};
76
- line-height: ${o(i.bodyPrimary.lineHeight)};
63
+ color: ${e=>e.color||i.text.primary};
64
+ font-weight: ${t.bodyPrimary.fontWeight};
65
+ font-size: ${o(t.bodyLarge.fontSize)};
66
+ line-height: ${o(t.bodyLarge.lineHeight)};
77
67
  -webkit-box-orient: vertical;
78
68
  overflow: hidden;
79
69
  display: -webkit-box;
80
70
  -webkit-line-clamp: ${e=>e.numberOfLines};
81
- `,g=e.div`
71
+ `,h=e.div`
82
72
  font-family: Inter;
83
- color: ${e=>e.color||t.text.primary};
84
- font-weight: ${i.bodySecondary.fontWeight};
85
- font-size: ${o(i.bodySecondary.fontSize)};
86
- line-height: ${o(i.bodySecondary.lineHeight)};
73
+ color: ${e=>e.color||i.text.primary};
74
+ font-weight: ${t.bodyPrimary.fontWeight};
75
+ font-size: ${o(t.bodyPrimary.fontSize)};
76
+ line-height: ${o(t.bodyPrimary.lineHeight)};
87
77
  -webkit-box-orient: vertical;
88
78
  overflow: hidden;
89
79
  display: -webkit-box;
90
80
  -webkit-line-clamp: ${e=>e.numberOfLines};
91
- `,h=e.div`
81
+ `,c=e.div`
92
82
  font-family: Inter;
93
- color: ${e=>e.color||t.text.primary};
94
- font-weight: ${i.bodySecondary.fontWeight};
95
- font-size: ${o(i.bodySecondary.fontSize)};
96
- line-height: ${o(i.bodySecondary.lineHeight)};
83
+ color: ${e=>e.color||i.text.primary};
84
+ font-weight: ${t.bodySecondary.fontWeight};
85
+ font-size: ${o(t.bodySecondary.fontSize)};
86
+ line-height: ${o(t.bodySecondary.lineHeight)};
97
87
  -webkit-box-orient: vertical;
98
88
  overflow: hidden;
99
89
  display: -webkit-box;
100
90
  -webkit-line-clamp: ${e=>e.numberOfLines};
101
- z-index: 1;
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
- `,w=e(c)`
91
+ `,g=e(h)`
108
92
  text-decoration: underline;
109
- color: ${t.content.brand};
110
- text-decoration-color: ${t.content.brand};
93
+ color: ${i.content.brand};
94
+ text-decoration-color: ${i.content.brand};
111
95
  cursor: pointer;
112
- `,$=e(g)`
96
+ `,$=e(c)`
113
97
  text-decoration: underline;
114
- color: ${t.content.brand};
115
- text-decoration-color: ${t.content.brand};
98
+ color: ${i.content.brand};
99
+ text-decoration-color: ${i.content.brand};
116
100
  cursor: pointer;
117
- `,p=e.div`
101
+ `,w=e.div`
118
102
  font-family: Inter;
119
- color: ${e=>e.color||t.text.primary};
120
- font-weight: ${i.caption.fontWeight};
121
- font-size: ${o(i.caption.fontSize)};
122
- line-height: ${o(i.caption.lineHeight)};
103
+ color: ${e=>e.color||i.text.primary};
104
+ font-weight: ${t.caption.fontWeight};
105
+ font-size: ${o(t.caption.fontSize)};
106
+ line-height: ${o(t.caption.lineHeight)};
123
107
  -webkit-box-orient: vertical;
124
108
  overflow: hidden;
125
109
  display: -webkit-box;
126
110
  -webkit-line-clamp: ${e=>e.numberOfLines};
127
111
  `,m=e.div`
128
- font-family: Inter;
129
- color: ${e=>e.color||t.text.primary};
130
- font-weight: ${i.caption.fontWeight};
131
- font-size: ${o(i.caption.fontSize)};
132
- line-height: ${o(i.caption.lineHeight)};
112
+ color: ${e=>e.color||i.text.primary};
113
+ font-weight: ${t.tiny.fontWeight};
114
+ font-size: ${o(t.tiny.fontSize)};
115
+ line-height: ${o(t.tiny.lineHeight)};
133
116
  -webkit-box-orient: vertical;
134
117
  overflow: hidden;
135
118
  display: -webkit-box;
136
119
  -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
120
  `,y=e.div`
144
- color: ${e=>e.color||t.text.primary};
145
- font-weight: ${i.tiny.fontWeight};
146
- font-size: ${o(i.tiny.fontSize)};
147
- line-height: ${o(i.tiny.lineHeight)};
148
- -webkit-box-orient: vertical;
149
- overflow: hidden;
150
- display: -webkit-box;
151
- -webkit-line-clamp: ${e=>e.numberOfLines};
152
- `,x=e.div`
153
- color: ${e=>e.color||t.text.primary};
154
- font-weight: ${i.tiny.fontWeight};
155
- font-size: ${o(i.tiny.fontSize)};
156
- line-height: ${o(i.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
- `,s=e.div`
168
121
  font-family: Inter;
169
- color: ${e=>e.color||t.text.primary};
170
- font-weight: ${i.buttonLarge.fontWeight};
171
- font-size: ${o(i.buttonLarge.fontSize)};
172
- line-height: ${o(i.buttonLarge.lineHeight)};
122
+ color: ${e=>e.color||i.text.primary};
123
+ font-weight: ${t.buttonLarge.fontWeight};
124
+ font-size: ${o(t.buttonLarge.fontSize)};
125
+ line-height: ${o(t.buttonLarge.lineHeight)};
173
126
  -webkit-box-orient: vertical;
174
127
  overflow: hidden;
175
128
  display: -webkit-box;
176
129
  -webkit-line-clamp: ${e=>e.numberOfLines};
177
- `,k=e.div`
178
- font-family: Inter;
179
- color: ${e=>e.color||t.text.primary};
180
- font-weight: ${i.buttonLarge.fontWeight};
181
- font-size: ${o(i.buttonLarge.fontSize)};
182
- line-height: ${o(i.buttonLarge.lineHeight)};
183
- -webkit-box-orient: vertical;
184
- overflow: hidden;
185
- display: -webkit-box;
186
- -webkit-line-clamp: ${e=>e.numberOfLines};
187
- background: linear-gradient(93deg, #ff166a 0.37%, #fb5f08 100%);
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
- `,u=e.div`
130
+ `,p=e.div`
194
131
  font-family: Inter;
195
- color: ${e=>e.color||t.text.primary};
196
- font-weight: ${i.buttonRegular.fontWeight};
197
- font-size: ${o(i.buttonRegular.fontSize)};
198
- line-height: ${o(i.buttonRegular.lineHeight)};
132
+ color: ${e=>e.color||i.text.primary};
133
+ font-weight: ${t.buttonRegular.fontWeight};
134
+ font-size: ${o(t.buttonRegular.fontSize)};
135
+ line-height: ${o(t.buttonRegular.lineHeight)};
199
136
  -webkit-box-orient: vertical;
200
137
  overflow: hidden;
201
138
  display: -webkit-box;
202
139
  -webkit-line-clamp: ${e=>e.numberOfLines};
203
- `,v=e.div`
140
+ `,s=e.div`
204
141
  font-family: Inter;
205
- color: ${e=>e.color||t.text.primary};
206
- font-weight: ${i.subHeading.fontWeight};
207
- font-size: ${o(i.subHeading.fontSize)};
208
- line-height: ${o(i.subHeading.lineHeight)};
142
+ color: ${e=>e.color||i.text.primary};
143
+ font-weight: ${t.subHeading.fontWeight};
144
+ font-size: ${o(t.subHeading.fontSize)};
145
+ line-height: ${o(t.subHeading.lineHeight)};
209
146
  -webkit-box-orient: vertical;
210
147
  overflow: hidden;
211
148
  display: -webkit-box;
212
149
  -webkit-line-clamp: ${e=>e.numberOfLines};
213
- `,z=e.div`
150
+ `,x=e.div`
214
151
  font-family: Inter;
215
- color: ${e=>e.color||t.text.primary};
216
- font-weight: ${i.bodyRegular.fontWeight};
217
- font-size: ${o(i.bodyRegular.fontSize)};
218
- line-height: ${o(i.bodyRegular.lineHeight)};
152
+ color: ${e=>e.color||i.text.primary};
153
+ font-weight: ${t.bodyRegular.fontWeight};
154
+ font-size: ${o(t.bodyRegular.fontSize)};
155
+ line-height: ${o(t.bodyRegular.lineHeight)};
219
156
  -webkit-box-orient: vertical;
220
157
  overflow: hidden;
221
158
  display: -webkit-box;
222
159
  -webkit-line-clamp: ${e=>e.numberOfLines};
223
- `,L=e.div`
160
+ `,k=e.div`
224
161
  font-family: Inter;
225
- color: ${t.text.primary};
226
- font-weight: ${i.caption.fontWeight};
227
- font-size: ${o(i.caption.fontSize)};
228
- line-height: ${o(i.caption.lineHeight)};
162
+ color: ${i.text.primary};
163
+ font-weight: ${t.caption.fontWeight};
164
+ font-size: ${o(t.caption.fontSize)};
165
+ line-height: ${o(t.caption.lineHeight)};
229
166
  -webkit-box-orient: vertical;
230
167
  overflow: hidden;
231
168
  display: -webkit-box;
232
169
  -webkit-line-clamp: ${e=>e.numberOfLines};
233
- `;export{m as AiBodyCaption,x as AiBodyTiny,p as BodyCaption,d as BodyLarge,c as BodyPrimary,w as BodyPrimaryLink,z as BodyRegular,g as BodySecondary,$ as BodySecondaryLink,y as BodyTiny,s as ButtonLarge,k as ButtonLargeAI,u as ButtonRegular,h as ButtonRegularAI,L as Caption,b as Display,l as SmallRegular,v as SubHeading,n as TitleLarge,r as TitleMedium,a as TitleRegular,f as TitleSmall};
170
+ `;export{w as BodyCaption,d as BodyLarge,h as BodyPrimary,g as BodyPrimaryLink,x as BodyRegular,c as BodySecondary,$ as BodySecondaryLink,m as BodyTiny,y as ButtonLarge,p as ButtonRegular,k as Caption,b as Display,r as SmallRegular,s as SubHeading,n as TitleLarge,l as TitleMedium,f as TitleRegular,a as TitleSmall};
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const Menus: ({
3
2
  displayName: string;
4
3
  key: number;
@@ -1 +1 @@
1
- import{__rest as e}from"../../_virtual/_tslib.js";import{jsx as t,jsxs as i,Fragment as n}from"react/jsx-runtime";import s,{forwardRef as a}from"react";import{Spinner as r}from"../spinner/Spinner.js";import{Button as o,ButtonCustomDashedBorder as c}from"./Button.styled.js";import{getButtonIconColor as d,SpinnerColorMap as l,GetButtonTextComponent as m}from"./themes.js";const b=a(((a,b)=>{var{version:h,id:p,buttonType:g="primary",size:v="small",buttonText:u,disabled:j,IconComponent:y,LeadingIcon:N,TrailingIcon:x,isLoading:I,inverse:O,onClick:f,matchParentWidth:k,subtitle:T,darkMode:z,activated:C,error:L}=a,W=e(a,["version","id","buttonType","size","buttonText","disabled","IconComponent","LeadingIcon","TrailingIcon","isLoading","inverse","onClick","matchParentWidth","subtitle","darkMode","activated","error"]);const B=m(v,g,j),E="chip"===v?16:20,M={height:E,width:E,color:d(v,g,O,j,I,z),style:{display:"block"},className:"icon"};return t(o,Object.assign({"data-test":W["data-test"],version:h,onClick:I?()=>{}:f,ref:b,id:p,disabled:j,size:v,buttonType:g,isLoading:I,inverse:O,matchParentWidth:k,darkMode:z,activated:C,error:L},W,{children:i("div",Object.assign({className:"button-container"},{children:[g.startsWith("dash")&&t(c,{}),t("div",Object.assign({className:"overlay-container"},{children:I&&t(r,{className:"spinner",size:"small",color:l(g,O)})})),y&&t("div",Object.assign({className:"icon-component"},{children:s.createElement(y,M)})),N&&t("div",Object.assign({className:"icon-leading",style:{zIndex:1}},{children:s.createElement(N,M)})),u?i(B,Object.assign({className:"text"},{children:[u,t("div",Object.assign({className:"text-subtitle"},{children:T}))]})):t(n,{}),x&&t("div",Object.assign({className:"icon-trailing",style:{zIndex:1}},{children:s.createElement(x,M)}))]}))}))}));b.displayName="Button";export{b as Button};
1
+ import{__rest as e}from"../../_virtual/_tslib.js";import{jsx as t,jsxs as i,Fragment as n}from"react/jsx-runtime";import a,{forwardRef as s}from"react";import{Spinner as r}from"../spinner/Spinner.js";import{Button as o,ButtonCustomDashedBorder as c}from"./Button.styled.js";import{getButtonIconColor as d,SpinnerColorMap as l,GetButtonTextComponent as m}from"./themes.js";const b=s(((s,b)=>{var{version:h,id:p,buttonType:g="primary",size:v="small",buttonText:u,disabled:j,IconComponent:N,LeadingIcon:y,TrailingIcon:O,isLoading:f,inverse:k,onClick:T,matchParentWidth:x,subtitle:I,darkMode:C,activated:L,error:z}=s,W=e(s,["version","id","buttonType","size","buttonText","disabled","IconComponent","LeadingIcon","TrailingIcon","isLoading","inverse","onClick","matchParentWidth","subtitle","darkMode","activated","error"]);const B=m(v,g),E="chip"===v?16:20,M={height:E,width:E,color:d(v,g,k,j,f,C),style:{display:"block"},className:"icon"};return t(o,Object.assign({"data-test":W["data-test"],version:h,onClick:f?()=>{}:T,ref:b,id:p,disabled:j,size:v,buttonType:g,isLoading:f,inverse:k,matchParentWidth:x,darkMode:C,activated:L,error:z},W,{children:i("div",Object.assign({className:"button-container"},{children:[g.startsWith("dash")&&t(c,{}),t("div",Object.assign({className:"overlay-container"},{children:f&&t(r,{className:"spinner",size:"small",color:l(g,k)})})),N&&t("div",Object.assign({className:"icon-component"},{children:a.createElement(N,M)})),y&&t("div",Object.assign({className:"icon-leading"},{children:a.createElement(y,M)})),u?i(B,Object.assign({className:"text"},{children:[u,t("div",Object.assign({className:"text-subtitle"},{children:I}))]})):t(n,{}),O&&t("div",Object.assign({className:"icon-trailing"},{children:a.createElement(O,M)}))]}))}))}));b.displayName="Button";export{b as Button};
@@ -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' | 'ai';
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, disabled?: boolean) => import("styled-components").StyledComponent<"div", any, {
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) => string;
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
- import{COLORS as t}from"../../constants/Theme.js";import{ButtonRegularAI as r,ButtonLargeAI as n,BodySecondary as e,BodyCaption as a,ButtonRegular as o,ButtonLarge as i}from"../TypographyStyle.js";const c=(r,n,e,a)=>{if("chip"===n)return"text"===r?"transparent":a?t.surface.hovered:t.surface.subdued;switch(r){case"primary":return e?t.background.warning.vibrant:t.background.inverseLight;case"destructive":return t.background.negative.vibrant;default:return"transparent"}},d=(r,n,e,a)=>{if("chip"===n)return"text"===r?e?t.content.inactive:t.content.brand:a?t.content.primary:t.content.secondary;switch(r){case"primary":return e?t.content.primary:t.content.primaryInverse;case"tertiaryGray":case"dashBold":case"dashRegular":return t.content.secondary;case"destructive":return t.content.primaryInverse;case"ai":return t.content.ai;default:return e?t.content.primaryInverse:t.stroke.brand}},s=r=>r?"rgba(255, 255, 255, 0.5)":t.content.inactive,p=(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"}},b=(t,c,d)=>d||"ai"!==c?"dashRegular"===c?e:"chip"===t?a:"small"===t?o:i:"small"===t?r:n,g=(r,n,e)=>e?t.stroke.negative.vibrant:n?t.surface.standard:"secondary"==r?t.stroke.brand:t.content.placeholder,u=(r,n,e,a,o)=>"text"==n?"border: none;":"chip"===e?`border: ${"2.0"===r?.5:1}px solid ${t.stroke.primary};`:a?"secondary"===n?`border: ${"2.0"===r?.5:1}px solid ${g(n,a,o)};`:"border: none;":"secondary"===n?`border: ${"2.0"===r?.5:1}px solid ${g(n,!1,o)};`:"border: none;",l=t=>"medium"===t?"5px,\n\t\ttransparent 5px,\n\t\ttransparent 10px":"6px,\n\t\ttransparent 6px,\n\t\ttransparent 12px",h=(r,n)=>"ai"===r?`background: ${t.surface.aiLight};`:"text"===r?"background-color:transparent;":n||"primary"===r?"":"background-color: #000000;\n\t\t\t\topacity: 0.03;",y=(r,n)=>n?"":`text-decoration-line: underline;\n\t\t\ttext-decoration-color: ${t.content.brand};`,x=(r,n)=>n?"":"primary"===r?`background-color: ${t.stroke.warning.lightAlt};`:"background-color: rgba(255, 255, 255, 0.1)",k=(r,n,e)=>"chip"===n?"background-color: transparent;":"primary"===r||"destructive"===r?e?"background-color: rgba(255,255,255,0.3);":`background-color: ${t.background.inactive};`:"secondary"===r?e?"border: 1px solid rgba(255, 255, 255, 0.5);":`border: 1px solid ${t.stroke.primary};`:"",m=function(t,r){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:g(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${n},\n\t\t\t${n}\n\t\t\t\t${l(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${n},\n\t\t\t${n}\n\t\t\t\t${l(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${n},\n\t\t\t${n}\n\t\t\t\t${l(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${n},\n\t\t\t${n}\n\t\t\t\t${l(r)}\n\t\t);\n\t}\n\t`},v=(r,n,e)=>"text"===r?`background-color: ${t.background.brandLight};\n\t\t\ttext-decoration-line: underline;\n\t\t\ttext-decoration-color: ${t.content.brand};`:"chip"===n?`border: 1px solid ${t.stroke.brandLightAlt};\n\t\tbackground-color: ${t.background.brandLight};`:"primary"===r||"destructive"===r?e?`background-color: ${t.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.background.inverseLight} !important;`:`background-color: ${t.background.brandLight};`:void 0,$=(r,n,e)=>"chip"===n?`background-color: ${t.background.base};`:"primary"===r?`background-color: ${e?t.background.warning.vibrant:t.background.brandLight};`:"destructive"===r?`background-color: ${t.background.negative.light};`:"background-color: transparent;",f=(r,n,e)=>"chip"===n?"border: none;":"secondary"===r?e?`border: 1px solid ${t.content.secondary};`:`border: 1px solid ${t.stroke.brandLightAlt};`:"",w=(r,n)=>n?"primary"===r?t.content.primary:t.content.primaryInverse:"destructive"===r?t.content.negative:t.content.brand,L=(r,n,e,a,o,i)=>"chip"===r?a?t.content.inactive:i?t.content.primary:t.content.secondary:o?"transparent":"primary"===n||"destructive"===n?e?a?"rgba(255, 255, 255, 0.5)":t.content.primary:a?t.content.inactive:t.content.primaryInverse:"secondary"===n||"tertiary"===n?e?a?"rgba(255, 255, 255, 0.5)":t.content.primaryInverse:a?t.content.inactive:t.content.brand:"tertiaryGray"===n||n.startsWith("dash")?a?t.content.inactive:t.content.secondary:void 0;export{b as GetButtonTextComponent,w as SpinnerColorMap,k as generateDisabledStyling,x as generateInverseHoverBackground,c as getBackgroundColor,u as getBorder,g as getBorderColor,L as getButtonIconColor,v as getClickEffect,d as getColor,m as getDashedBorderStyling,s as getDisabledTextColor,h as getHoverButtonBackground,y as getHoverButtonTextDecorationStyle,l as getLinearGradientValue,$ as getLoadingBackground,f as getLoadingBorder,p as getPadding};
1
+ import{COLORS as t}from"../../constants/Theme.js";import{BodySecondary as r,BodyCaption as n,ButtonRegular as e,ButtonLarge as a}from"../TypographyStyle.js";const o=(r,n,e,a)=>{if("chip"===n)return"text"===r?"transparent":a?t.surface.hovered:t.surface.subdued;switch(r){case"primary":return e?t.background.warning.vibrant:t.background.inverseLight;case"destructive":return t.background.negative.vibrant;default:return"transparent"}},i=(r,n,e,a)=>{if("chip"===n)return"text"===r?e?t.content.inactive:t.content.brand:a?t.content.primary:t.content.secondary;switch(r){case"primary":return e?t.content.primary:t.content.primaryInverse;case"tertiaryGray":case"dashBold":case"dashRegular":return t.content.secondary;case"destructive":return t.content.primaryInverse;default:return e?t.content.primaryInverse:t.stroke.brand}},c=r=>r?"rgba(255, 255, 255, 0.5)":t.content.inactive,d=(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"}},s=(t,o)=>"dashRegular"===o?r:"chip"===t?n:"small"===t?e:a,p=(r,n,e)=>e?t.stroke.negative.vibrant:n?t.surface.standard:"secondary"==r?t.stroke.brand:t.content.placeholder,b=(r,n,e,a,o)=>"text"==n?"border: none;":"chip"===e?`border: ${"2.0"===r?.5:1}px solid ${t.stroke.primary};`:a?"secondary"===n?`border: ${"2.0"===r?.5:1}px solid ${p(n,a,o)};`:"border: none;":"secondary"===n?`border: ${"2.0"===r?.5:1}px solid ${p(n,!1,o)};`:"border: none;",g=t=>"medium"===t?"5px,\n\t\ttransparent 5px,\n\t\ttransparent 10px":"6px,\n\t\ttransparent 6px,\n\t\ttransparent 12px",u=(t,r)=>"text"===t?"background-color:transparent;":r||"primary"===t?"":"background-color: #000000;\n\t\t\t\topacity: 0.03;",l=(r,n)=>n?"":`text-decoration-line: underline;\n\t\t\ttext-decoration-color: ${t.content.brand};`,h=(r,n)=>n?"":"primary"===r?`background-color: ${t.stroke.warning.lightAlt};`:"background-color: rgba(255, 255, 255, 0.1)",y=(r,n,e)=>"chip"===n?"background-color: transparent;":"primary"===r||"destructive"===r?e?"background-color: rgba(255,255,255,0.3);":`background-color: ${t.background.inactive};`:"secondary"===r?e?"border: 1px solid rgba(255, 255, 255, 0.5);":`border: 1px solid ${t.stroke.primary};`:"",x=function(t,r){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:p(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${n},\n\t\t\t${n}\n\t\t\t\t${g(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${n},\n\t\t\t${n}\n\t\t\t\t${g(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${n},\n\t\t\t${n}\n\t\t\t\t${g(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${n},\n\t\t\t${n}\n\t\t\t\t${g(r)}\n\t\t);\n\t}\n\t`},k=(r,n,e)=>"text"===r?`background-color: ${t.background.brandLight};\n\t\t\ttext-decoration-line: underline;\n\t\t\ttext-decoration-color: ${t.content.brand};`:"chip"===n?`border: 1px solid ${t.stroke.brandLightAlt};\n\t\tbackground-color: ${t.background.brandLight};`:"primary"===r||"destructive"===r?e?`background-color: ${t.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.background.inverseLight} !important;`:`background-color: ${t.background.brandLight};`:void 0,m=(r,n,e)=>"chip"===n?`background-color: ${t.background.base};`:"primary"===r?`background-color: ${e?t.background.warning.vibrant:t.background.brandLight};`:"destructive"===r?`background-color: ${t.background.negative.light};`:"background-color: transparent;",v=(r,n,e)=>"chip"===n?"border: none;":"secondary"===r?e?`border: 1px solid ${t.content.secondary};`:`border: 1px solid ${t.stroke.brandLightAlt};`:"",$=(r,n)=>n?"primary"===r?t.content.primary:t.content.primaryInverse:"destructive"===r?t.content.negative:t.content.brand,f=(r,n,e,a,o,i)=>"chip"===r?a?t.content.inactive:i?t.content.primary:t.content.secondary:o?"transparent":"primary"===n||"destructive"===n?e?a?"rgba(255, 255, 255, 0.5)":t.content.primary:a?t.content.inactive:t.content.primaryInverse:"secondary"===n||"tertiary"===n?e?a?"rgba(255, 255, 255, 0.5)":t.content.primaryInverse:a?t.content.inactive:t.content.brand:"tertiaryGray"===n||n.startsWith("dash")?a?t.content.inactive:t.content.secondary:void 0;export{s as GetButtonTextComponent,$ as SpinnerColorMap,y as generateDisabledStyling,h as generateInverseHoverBackground,o as getBackgroundColor,b as getBorder,p as getBorderColor,f as getButtonIconColor,k as getClickEffect,i as getColor,x as getDashedBorderStyling,c as getDisabledTextColor,u as getHoverButtonBackground,l as getHoverButtonTextDecorationStyle,g as getLinearGradientValue,m as getLoadingBackground,v as getLoadingBorder,d as getPadding};
@@ -1,4 +1,4 @@
1
- export declare const FILE_TYPE_NOT_SUPPORT = "File type no supported";
1
+ export declare const FILE_TYPE_NOT_SUPPORT = "File type not supported";
2
2
  export declare const FILE_SIZE_REACHED: (size: number) => string;
3
3
  export declare const getFileFormatErrorMessage: (format: string) => string;
4
4
  export declare const SIZE_LIMIT_MAP: {
@@ -1 +1 @@
1
- import{bytesToMB as e}from"../../utils/bytesToMB.js";const i="File type no supported",t=e=>`Max file size of ${e}MB is allowed`,p=e=>`Only ${e.toUpperCase()} format allowed`,l={image:5,video:16,application:100},o=["mp4","png","jpeg","jpg","pdf"];class s{validate(s){const{file:r,linkData:a}=s;let n=0,f="",d="";if(r)n=r.size,f=r.type.split("/")[0],d=r.type.split("/")[1];else{if(!a)return i;n=a.size,f=a.type.split("/")[0],d=a.type.split("/")[1]}if(!l[f])return i;if(e(n)>l[f])return t(l[f]);if(!o.includes(d.toLocaleLowerCase())){if("video"===f)return p("mp4");if("image"===f)return p("png, jpeg, jpg");if("application"===f)return p("pdf")}}}export{t as FILE_SIZE_REACHED,i as FILE_TYPE_NOT_SUPPORT,s as FileUploaderHelper,l as SIZE_LIMIT_MAP,o as SUPPORTED_FILE_FORMAT,p as getFileFormatErrorMessage};
1
+ import{bytesToMB as e}from"../../utils/bytesToMB.js";const i="File type not supported",t=e=>`Max file size of ${e}MB is allowed`,p=e=>`Only ${e.toUpperCase()} format allowed`,l={image:5,video:16,application:100},o=["mp4","png","jpeg","jpg","pdf"];class s{validate(s){const{file:r,linkData:a}=s;let n=0,f="",d="";if(r)n=r.size,f=r.type.split("/")[0],d=r.type.split("/")[1];else{if(!a)return i;n=a.size,f=a.type.split("/")[0],d=a.type.split("/")[1]}if(!l[f])return i;if(e(n)>l[f])return t(l[f]);if(!o.includes(d.toLocaleLowerCase())){if("video"===f)return p("mp4");if("image"===f)return p("png, jpeg, jpg");if("application"===f)return p("pdf")}}}export{t as FILE_SIZE_REACHED,i as FILE_TYPE_NOT_SUPPORT,s as FileUploaderHelper,l as SIZE_LIMIT_MAP,o as SUPPORTED_FILE_FORMAT,p as getFileFormatErrorMessage};
@@ -1,3 +1,3 @@
1
1
  import t from"styled-components";import{COLORS as n}from"../../constants/Theme.js";import{generateBackgroundColor as o}from"./theme.js";const r=t.button`
2
- ${t=>`\n\tall: unset;\n\tcursor: pointer;\n\tpadding: 6px;\n\tborder-radius: 4px;\n\tflex-wrap: wrap;\n\t${t.bordered&&"ai"!==t.iconButtonType?`border: 1px solid ${n.stroke.primary};`:""}\n\t${t.isSelected?`\n\t\t\tbackground: ${o(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`}
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 ${n.stroke.primary};`:""}\n\t${t.isSelected?`\n\t\t\tbackground-color: ${o(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
  `;export{r as IconButton};
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- export type IconButtonType = 'default' | 'negative' | 'positive' | 'warning' | 'ai';
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
- import{COLORS as t}from"../../constants/Theme.js";const n=(n,e,r)=>{if(e)return t.content.inactive;switch(n){case"default":return r?t.content.brand:t.content.primary;case"negative":return t.content.negative;case"positive":return t.content.positive;case"warning":return r?t.content.warning:t.content.primary;default:return t.content.primary}},e=n=>"default"===n?t.background.brandLight:"negative"===n?t.background.negative.light:"positive"===n?t.background.positive.light:"ai"===n?t.surface.aiLight:t.background.warning.light;export{e as generateBackgroundColor,n as getIconColor};
1
+ import{COLORS as t}from"../../constants/Theme.js";const n=(n,e,r)=>{if(e)return t.content.inactive;switch(n){case"default":return r?t.content.brand:t.content.primary;case"negative":return t.content.negative;case"positive":return t.content.positive;case"warning":return r?t.content.warning:t.content.primary;default:return t.content.primary}},e=n=>"default"===n?t.background.brandLight:"negative"===n?t.background.negative.light:"positive"===n?t.background.positive.light:t.background.warning.light;export{e as generateBackgroundColor,n as getIconColor};
@@ -2,7 +2,7 @@ import 'react-image-crop/dist/ReactCrop.css';
2
2
  export interface BikImageCropperProps {
3
3
  aspectRatio?: number;
4
4
  src: string;
5
- onCropComplete: (base64String: string, didChange: boolean) => void;
5
+ onCropComplete: (base64String: string, didChange: boolean) => void | Promise<void>;
6
6
  onCancel: () => void;
7
7
  }
8
8
  export declare const BikImageCropper: (props: BikImageCropperProps) => import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- import{__awaiter as t}from"../../_virtual/_tslib.js";import{jsx as e}from"react/jsx-runtime";import{useState as i}from"react";import o from"react-image-crop";import{StyledModal as r}from"../modals/styledModal.js";const n=n=>{const[a,c]=i(!1),[l,d]=i(void 0),[h,s]=i({width:0,height:0}),g=(e,i,o,r)=>t(void 0,void 0,void 0,(function*(){const t=document.createElement("canvas");t.width=i.width,t.height=i.height;const n=t.getContext("2d");if(!n)throw new Error("Failed to get 2D context of canvas.");n.drawImage(e,i.x*o,i.y*r,i.width*o,i.height*r,0,0,i.width,i.height);try{return t.toDataURL("image/png")}catch(t){throw new Error("Failed to create blob for cropped image.")}}));return e(r,Object.assign({open:!0,onClose:n.onCancel,centralContainerStyles:{width:700,maxHeight:700},headingTitle:"Crop Image",primaryButton:{buttonText:"Save",onClick:()=>{var e;e=l,t(void 0,void 0,void 0,(function*(){var t,i;if(n.src&&(null==e?void 0:e.width)&&(null==e?void 0:e.height)){const i=new Image;i.src=n.src;const o=i.naturalWidth/h.width,r=i.naturalHeight/h.height,c=yield g(i,e,o,r);null===(t=null==n?void 0:n.onCropComplete)||void 0===t||t.call(n,c,a)}else null===(i=null==n?void 0:n.onCropComplete)||void 0===i||i.call(n,n.src,a)}))}}},{children:e("div",Object.assign({style:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"}},{children:e("div",{children:e(o,Object.assign({crop:l,onChange:t=>{d(t)},circularCrop:!1,onDragStart:()=>{c(!0)},aspect:n.aspectRatio},{children:e("img",{style:{maxWidth:700,maxHeight:550,objectFit:"contain"},src:n.src,alt:"image cropper",onLoad:t=>{const e=t.target,i=e.width;s({width:i,height:e.height})}})}))})}))}))};export{n as BikImageCropper,n as default};
1
+ import{__awaiter as t}from"../../_virtual/_tslib.js";import{jsx as e}from"react/jsx-runtime";import{useState as i}from"react";import o from"react-image-crop";import{StyledModal as r}from"../modals/styledModal.js";const n=n=>{const[a,d]=i(!1),[l,c]=i(void 0),[h,s]=i({width:0,height:0}),[g,m]=i(!1),p=(e,i,o,r)=>t(void 0,void 0,void 0,(function*(){const t=document.createElement("canvas");t.width=i.width,t.height=i.height;const n=t.getContext("2d");if(!n)throw new Error("Failed to get 2D context of canvas.");n.drawImage(e,i.x*o,i.y*r,i.width*o,i.height*r,0,0,i.width,i.height);try{return t.toDataURL("image/png")}catch(t){throw new Error("Failed to create blob for cropped image.")}}));return e(r,Object.assign({open:!0,onClose:n.onCancel,centralContainerStyles:{width:700,maxHeight:700},headingTitle:"Crop Image",primaryButton:{buttonText:"Save",isLoading:g,onClick:()=>{var e;e=l,t(void 0,void 0,void 0,(function*(){var t,i;if(m(!0),n.src&&(null==e?void 0:e.width)&&(null==e?void 0:e.height)){const i=new Image;i.src=n.src;const o=i.naturalWidth/h.width,r=i.naturalHeight/h.height,d=yield p(i,e,o,r);yield null===(t=null==n?void 0:n.onCropComplete)||void 0===t?void 0:t.call(n,d,a)}else yield null===(i=null==n?void 0:n.onCropComplete)||void 0===i?void 0:i.call(n,n.src,a);m(!1)}))}}},{children:e("div",Object.assign({style:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"}},{children:e("div",{children:e(o,Object.assign({crop:l,onChange:t=>{c(t)},circularCrop:!1,onDragStart:()=>{d(!0)},aspect:n.aspectRatio},{children:e("img",{style:{maxWidth:700,maxHeight:550,objectFit:"contain"},src:n.src,alt:"image cropper",onLoad:t=>{const e=t.target,i=e.width;s({width:i,height:e.height})}})}))})}))}))};export{n as BikImageCropper,n as default};
@@ -22,5 +22,6 @@ export interface InputWithVariablesProps {
22
22
  labelElement?: React.ReactNode;
23
23
  isRequired?: boolean;
24
24
  hintText?: string;
25
+ onEnterPress?: (input: string) => void;
25
26
  }
26
27
  export declare const InputWithVariables: React.FC<InputWithVariablesProps>;
@@ -1,4 +1,4 @@
1
- import{jsxs as e,Fragment as a,jsx as l}from"react/jsx-runtime";import r from"../../assets/icons/PlusIcon.js";import{useRef as i,useState as t,useEffect as d}from"react";import o from"styled-components";import{v4 as n}from"uuid";import{COLORS as s}from"../../constants/Theme.js";import{AddVariableV2SideModal as c}from"../add-variableV2/AddVariableV2SideModal.js";import{AddVariableV2 as u}from"../add-variableV2/AddVariableV2.js";import{AddVariableStyled as v}from"../add-variableV2/AddVariableBox.styled.js";import{Input as p}from"../input/Input.js";import{BodyCaption as h}from"../TypographyStyle.js";const m=o=>{let{type:s,allowMix:m,onChange:g,prevVariable:V,variablesList:T,onBlur:y,onlyVariables:f,placeHolder:x,showAddButton:j=!0,showHelp:C,showSideVariablePanel:S,errorMessage:w,showSideModal:k,maxCharLimit:A,noMaxCharCheck:N,labelText:B,labelElement:L,isRequired:M=!1,hintText:O}=o;const q=i(!0),E=i(null),[I,F]=t(!1),[R]=t(n()),[Z,$]=t(),[z,H]=t(V),[P,D]=t(!1),[W,G]=t(!1),[J,K]=t(0);return d((()=>{if(Z&&Z.actualValue)if(m){if(H((e=>{return{actualValue:(a=e.actualValue,l=Z.actualValue,r=J,a.slice(0,r)+l+a.slice(r)),variableType:"string"};var a,l,r})),E.current){K(E.current.selectionStart);const e=J+Z.actualValue.length+2;E.current.setSelectionRange(e,e),K(e)}}else H((e=>({actualValue:Z.actualValue,variableType:Z.variableType,needsFetching:Z.needsFetching})))}),[Z]),d((()=>{q.current?q.current=!1:g(z)}),[z]),e(a,{children:[e(b,Object.assign({isVar:/^{{.*}}$/.test(z.actualValue)},{children:[l(p,{isRequired:M,hintText:O,type:null!=s?s:"text",id:R,ref:E,skipFocus:!0,isActive:I,value:z.actualValue,validate:e=>[!0,""],errorMessage:w,noMaxCharCheck:N,maxCharLimit:A,labelText:B,labelElement:L,placeholder:x||"Add a value",onClick:e=>{E.current&&K(E.current.selectionStart)},onChangeText:(e,a)=>{if(E.current&&K(E.current.selectionStart),f){const e=(null==a?void 0:a.keyCode)||(null==a?void 0:a.charCode);8!==e&&46!==e||H({actualValue:"",variableType:"string"})}else H(m?{actualValue:e,variableType:"string"}:{actualValue:e.replace(/{{.*}}/,""),variableType:"string"})},onReferenceInit:()=>{},onFocus:e=>{F(!0),G(!0),document.getElementById("varList")&&!P&&D(!0)},onBlur:e=>{var a,l,r,i,t,d,o;null==y||y(e,z),"addVar"===(null===(a=e.relatedTarget)||void 0===a?void 0:a.id)||"varList"===(null===(l=e.relatedTarget)||void 0===l?void 0:l.id)||(null===(i=null===(r=e.relatedTarget)||void 0===r?void 0:r.className)||void 0===i?void 0:i.includes("exlualr0"))||(null===(d=null===(t=e.relatedTarget)||void 0===t?void 0:t.className)||void 0===d?void 0:d.includes("sc-dZoequ "))?(E.current&&E.current.focus(),F(!0)):"search-bar"===(null===(o=e.relatedTarget)||void 0===o?void 0:o.id)?F(!0):(F(!1),D(!1),G(!1))}}),e("div",Object.assign({style:{display:"flex",flexDirection:"row",justifyContent:"space-between"}},{children:[z.actualValue&&C&&l("div",Object.assign({style:{marginTop:4}},{children:l(h,{children:`This value is of type ${z.variableType}`})})),j&&W&&l("div",Object.assign({style:{marginTop:w||O?"-24px":"0px"}},{children:l(v,Object.assign({id:"addVar",onClick:()=>{D(!P)}},{children:e("div",Object.assign({className:"add"},{children:[l(r,{color:"white"}),l("div",Object.assign({className:"variable"},{children:"Add variable"}))]}))}))}))]})),!S&&P&&l(u,{data:T,showVariable:!0,setShowVariable:()=>{D(!1)},variableValue:Z,setVariableValue:$,placeholder:"",pickerSize:"large",enableVariable:!0,selectWithTypes:!0,onSearchBlur:e=>{var a,l,r,i,t,d;"varList"===(null===(a=e.relatedTarget)||void 0===a?void 0:a.id)||(null===(r=null===(l=e.relatedTarget)||void 0===l?void 0:l.className)||void 0===r?void 0:r.includes("exlualr0"))||(null===(t=null===(i=e.relatedTarget)||void 0===i?void 0:i.className)||void 0===t?void 0:t.includes("sc-dZoequ "))?E.current.focus():"Enter here"===(null===(d=e.relatedTarget)||void 0===d?void 0:d.placeholder)?e.relatedTarget.id!==R&&(D(!1),G(!1),F(!1)):(D(!1),G(!1),F(!1))}})]})),S&&P&&l(c,{zIndex:2e3,data:null!=T?T:[],showVariable:P,setShowVariable:()=>{D(!1)},placeholder:"Add a variable",customTrigger:e=>{$({actualValue:e.actualValue,variableType:"string"}),H(e)},onSearchBlur:e=>{var a,l,r,i,t,d;"varList"===(null===(a=e.relatedTarget)||void 0===a?void 0:a.id)||(null===(r=null===(l=e.relatedTarget)||void 0===l?void 0:l.className)||void 0===r?void 0:r.includes("exlualr0"))||(null===(t=null===(i=e.relatedTarget)||void 0===i?void 0:i.className)||void 0===t?void 0:t.includes("sc-dZoequ "))?E.current.focus():"Enter here"===(null===(d=e.relatedTarget)||void 0===d?void 0:d.placeholder)?e.relatedTarget.id!==R&&(D(!1),G(!1),F(!1)):(D(!1),G(!1),F(!1))}})]})},b=o.div`
1
+ import{jsxs as e,Fragment as a,jsx as l}from"react/jsx-runtime";import r from"../../assets/icons/PlusIcon.js";import{useRef as i,useState as t,useEffect as d}from"react";import o from"styled-components";import{v4 as n}from"uuid";import{COLORS as s}from"../../constants/Theme.js";import{AddVariableV2SideModal as u}from"../add-variableV2/AddVariableV2SideModal.js";import{AddVariableV2 as c}from"../add-variableV2/AddVariableV2.js";import{AddVariableStyled as v}from"../add-variableV2/AddVariableBox.styled.js";import{Input as p}from"../input/Input.js";import{BodyCaption as h}from"../TypographyStyle.js";const m=o=>{let{type:s,allowMix:m,onChange:g,prevVariable:V,variablesList:T,onBlur:y,onlyVariables:f,placeHolder:x,showAddButton:j=!0,showHelp:w,showSideVariablePanel:C,errorMessage:S,showSideModal:k,maxCharLimit:A,noMaxCharCheck:N,labelText:B,labelElement:E,isRequired:L=!1,hintText:M,onEnterPress:O}=o;const q=i(!0),I=i(null),[F,R]=t(!1),[P]=t(n()),[Z,$]=t(),[z,D]=t(V),[H,K]=t(!1),[W,G]=t(!1),[J,Q]=t(0);return d((()=>{if(Z&&Z.actualValue)if(m){if(D((e=>{return{actualValue:(a=e.actualValue,l=Z.actualValue,r=J,a.slice(0,r)+l+a.slice(r)),variableType:"string"};var a,l,r})),I.current){Q(I.current.selectionStart);const e=J+Z.actualValue.length+2;I.current.setSelectionRange(e,e),Q(e)}}else D((e=>({actualValue:Z.actualValue,variableType:Z.variableType,needsFetching:Z.needsFetching})))}),[Z]),d((()=>{q.current?q.current=!1:g(z)}),[z]),e(a,{children:[e(b,Object.assign({isVar:/^{{.*}}$/.test(z.actualValue),onKeyDown:e=>{"Enter"===e.key&&(null==O||O(z.actualValue))}},{children:[l(p,{isRequired:L,hintText:M,type:null!=s?s:"text",id:P,ref:I,skipFocus:!0,isActive:F,value:z.actualValue,validate:e=>[!0,""],errorMessage:S,noMaxCharCheck:N,maxCharLimit:A,labelText:B,labelElement:E,placeholder:x||"Add a value",onClick:e=>{I.current&&Q(I.current.selectionStart)},onChangeText:(e,a)=>{if(I.current&&Q(I.current.selectionStart),f){const e=(null==a?void 0:a.keyCode)||(null==a?void 0:a.charCode);8!==e&&46!==e||D({actualValue:"",variableType:"string"})}else D(m?{actualValue:e,variableType:"string"}:{actualValue:e.replace(/{{.*}}/,""),variableType:"string"})},onReferenceInit:()=>{},onFocus:e=>{R(!0),G(!0),document.getElementById("varList")&&!H&&K(!0)},onBlur:e=>{var a,l,r,i,t,d,o;null==y||y(e,z),"addVar"===(null===(a=e.relatedTarget)||void 0===a?void 0:a.id)||"varList"===(null===(l=e.relatedTarget)||void 0===l?void 0:l.id)||(null===(i=null===(r=e.relatedTarget)||void 0===r?void 0:r.className)||void 0===i?void 0:i.includes("exlualr0"))||(null===(d=null===(t=e.relatedTarget)||void 0===t?void 0:t.className)||void 0===d?void 0:d.includes("sc-dZoequ "))?(I.current&&I.current.focus(),R(!0)):"search-bar"===(null===(o=e.relatedTarget)||void 0===o?void 0:o.id)?R(!0):(R(!1),K(!1),G(!1))}}),e("div",Object.assign({style:{display:"flex",flexDirection:"row",justifyContent:"space-between"}},{children:[z.actualValue&&w&&l("div",Object.assign({style:{marginTop:4}},{children:l(h,{children:`This value is of type ${z.variableType}`})})),j&&W&&l("div",Object.assign({style:{marginTop:S||M?"-24px":"0px"}},{children:l(v,Object.assign({id:"addVar",onClick:()=>{K(!H)}},{children:e("div",Object.assign({className:"add"},{children:[l(r,{color:"white"}),l("div",Object.assign({className:"variable"},{children:"Add variable"}))]}))}))}))]})),!C&&H&&l(c,{data:T,showVariable:!0,setShowVariable:()=>{K(!1)},variableValue:Z,setVariableValue:$,placeholder:"",pickerSize:"large",enableVariable:!0,selectWithTypes:!0,onSearchBlur:e=>{var a,l,r,i,t,d;"varList"===(null===(a=e.relatedTarget)||void 0===a?void 0:a.id)||(null===(r=null===(l=e.relatedTarget)||void 0===l?void 0:l.className)||void 0===r?void 0:r.includes("exlualr0"))||(null===(t=null===(i=e.relatedTarget)||void 0===i?void 0:i.className)||void 0===t?void 0:t.includes("sc-dZoequ "))?I.current.focus():"Enter here"===(null===(d=e.relatedTarget)||void 0===d?void 0:d.placeholder)?e.relatedTarget.id!==P&&(K(!1),G(!1),R(!1)):(K(!1),G(!1),R(!1))}})]})),C&&H&&l(u,{zIndex:2e3,data:null!=T?T:[],showVariable:H,setShowVariable:()=>{K(!1)},placeholder:"Add a variable",customTrigger:e=>{$({actualValue:e.actualValue,variableType:"string"}),D(e)},onSearchBlur:e=>{var a,l,r,i,t,d;"varList"===(null===(a=e.relatedTarget)||void 0===a?void 0:a.id)||(null===(r=null===(l=e.relatedTarget)||void 0===l?void 0:l.className)||void 0===r?void 0:r.includes("exlualr0"))||(null===(t=null===(i=e.relatedTarget)||void 0===i?void 0:i.className)||void 0===t?void 0:t.includes("sc-dZoequ "))?I.current.focus():"Enter here"===(null===(d=e.relatedTarget)||void 0===d?void 0:d.placeholder)?e.relatedTarget.id!==P&&(K(!1),G(!1),R(!1)):(K(!1),G(!1),R(!1))}})]})},b=o.div`
2
2
  position: relative;
3
3
  margin-bottom: 16px;
4
4
  input {
@@ -22,4 +22,5 @@ export declare const StyledModal: React.FC<{
22
22
  onBackPress?: () => void;
23
23
  footerContainerStyle?: React.CSSProperties;
24
24
  id?: string;
25
+ modalHeaderStyles?: React.CSSProperties;
25
26
  }>;