@3t-transform/threeteeui 0.1.42 → 0.1.44

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 (163) hide show
  1. package/dist/cjs/{domsanitiser.options-277161b9.js → domsanitiser.options-975e3317.js} +12 -12
  2. package/dist/cjs/{index-76f14107.js → index-2ea393bb.js} +146 -3
  3. package/dist/cjs/loader.cjs.js +4 -19
  4. package/dist/cjs/tttx-button.cjs.entry.js +24 -24
  5. package/dist/cjs/tttx-dialog-box.cjs.entry.js +80 -0
  6. package/dist/cjs/tttx-filter.cjs.entry.js +177 -159
  7. package/dist/cjs/tttx-form.cjs.entry.js +458 -458
  8. package/dist/cjs/tttx-icon.cjs.entry.js +11 -11
  9. package/dist/cjs/tttx-keyvalue-block.cjs.entry.js +59 -59
  10. package/dist/cjs/tttx-list.cjs.entry.js +32 -32
  11. package/dist/cjs/tttx-loading-spinner.cjs.entry.js +16 -16
  12. package/dist/cjs/tttx-sorter.cjs.entry.js +102 -102
  13. package/dist/cjs/tttx-standalone-input.cjs.entry.js +79 -79
  14. package/dist/cjs/tttx-toolbar.cjs.entry.js +10 -10
  15. package/dist/cjs/tttx.cjs.js +9 -117
  16. package/dist/collection/collection-manifest.json +3 -2
  17. package/dist/collection/components/atoms/tttx-button/tttx-button.js +110 -110
  18. package/dist/collection/components/atoms/tttx-button/tttx-button.stories.js +14 -14
  19. package/dist/collection/components/atoms/tttx-icon/tttx-icon.js +62 -62
  20. package/dist/collection/components/atoms/tttx-icon/tttx-icon.stories.js +22 -22
  21. package/dist/collection/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.js +109 -109
  22. package/dist/collection/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.stories.js +38 -38
  23. package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.js +67 -67
  24. package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.stories.js +17 -17
  25. package/dist/collection/components/molecules/tttx-dialog-box/tttx-dialog-box.css +146 -0
  26. package/dist/collection/components/molecules/tttx-dialog-box/tttx-dialog-box.js +172 -0
  27. package/dist/collection/components/molecules/tttx-dialog-box/tttx-dialog-box.stories.js +380 -0
  28. package/dist/collection/components/molecules/tttx-filter/tttx-filter.js +369 -334
  29. package/dist/collection/components/molecules/tttx-filter/tttx-filter.stories.js +73 -62
  30. package/dist/collection/components/molecules/tttx-form/lib/setErrorState.js +37 -37
  31. package/dist/collection/components/molecules/tttx-form/lib/validityCheck.js +61 -61
  32. package/dist/collection/components/molecules/tttx-form/tttx-form.js +479 -479
  33. package/dist/collection/components/molecules/tttx-form/tttx-form.stories.js +272 -272
  34. package/dist/collection/components/molecules/tttx-list/tttx-list.js +105 -105
  35. package/dist/collection/components/molecules/tttx-list/tttx-list.stories.js +43 -43
  36. package/dist/collection/components/molecules/tttx-sorter/tttx-sorter.js +224 -224
  37. package/dist/collection/components/molecules/tttx-sorter/tttx-sorter.stories.js +42 -42
  38. package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.js +759 -759
  39. package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.js +172 -172
  40. package/dist/collection/components/molecules/tttx-toolbar/tttx-toolbar.js +44 -44
  41. package/dist/collection/components/molecules/tttx-toolbar/tttx-toolbar.stories.js +14 -14
  42. package/dist/collection/components/palette.stories.js +7 -7
  43. package/dist/collection/docs/gettingstarted-developer.stories.js +5 -5
  44. package/dist/collection/icons.js +2838 -2838
  45. package/dist/collection/index.js +1 -1
  46. package/dist/collection/shared/domsanitiser.options.js +14 -14
  47. package/dist/components/domsanitiser.options.js +15 -45
  48. package/dist/components/index.d.ts +10 -0
  49. package/dist/components/index.js +2 -5
  50. package/dist/components/tttx-button.js +1 -54
  51. package/dist/{tttx/tttx-button.entry.js → components/tttx-button2.js} +52 -26
  52. package/dist/components/tttx-dialog-box.d.ts +11 -0
  53. package/dist/components/tttx-dialog-box.js +110 -0
  54. package/dist/components/tttx-filter.js +210 -191
  55. package/dist/components/tttx-form.js +475 -475
  56. package/dist/components/tttx-icon2.js +28 -28
  57. package/dist/components/tttx-keyvalue-block.js +76 -76
  58. package/dist/components/tttx-list.js +53 -53
  59. package/dist/components/tttx-loading-spinner.js +33 -33
  60. package/dist/components/tttx-sorter.js +130 -130
  61. package/dist/components/tttx-standalone-input.js +130 -130
  62. package/dist/components/tttx-toolbar.js +26 -26
  63. package/dist/esm/{domsanitiser.options-cc420431.js → domsanitiser.options-3c7ded83.js} +12 -12
  64. package/dist/esm/{index-9cde46a5.js → index-018a3e54.js} +146 -4
  65. package/dist/esm/loader.js +4 -19
  66. package/dist/esm/polyfills/core-js.js +0 -0
  67. package/dist/esm/polyfills/css-shim.js +1 -1
  68. package/dist/esm/polyfills/dom.js +0 -0
  69. package/dist/esm/polyfills/es5-html-element.js +0 -0
  70. package/dist/esm/polyfills/index.js +0 -0
  71. package/dist/esm/polyfills/system.js +0 -0
  72. package/dist/esm/tttx-button.entry.js +24 -24
  73. package/dist/esm/tttx-dialog-box.entry.js +76 -0
  74. package/dist/esm/tttx-filter.entry.js +177 -159
  75. package/dist/esm/tttx-form.entry.js +458 -458
  76. package/dist/esm/tttx-icon.entry.js +11 -11
  77. package/dist/esm/tttx-keyvalue-block.entry.js +59 -59
  78. package/dist/esm/tttx-list.entry.js +32 -32
  79. package/dist/esm/tttx-loading-spinner.entry.js +16 -16
  80. package/dist/esm/tttx-sorter.entry.js +102 -102
  81. package/dist/esm/tttx-standalone-input.entry.js +79 -79
  82. package/dist/esm/tttx-toolbar.entry.js +10 -10
  83. package/dist/esm/tttx.js +6 -117
  84. package/dist/tttx/index.esm.js +0 -1
  85. package/dist/tttx/{p-e53c7f9d.entry.js → p-01863bf1.entry.js} +1 -1
  86. package/dist/tttx/{p-4e637d50.entry.js → p-0ed6f369.entry.js} +1 -1
  87. package/dist/tttx/p-2dd43e97.entry.js +1 -0
  88. package/dist/tttx/{p-aef96333.entry.js → p-2e135be9.entry.js} +1 -1
  89. package/dist/tttx/p-350ddb03.js +3 -0
  90. package/dist/tttx/{p-d2f1aa8e.entry.js → p-48b15a3d.entry.js} +1 -1
  91. package/dist/tttx/{p-561224f5.entry.js → p-5e91cf1c.entry.js} +1 -1
  92. package/dist/tttx/p-71c244bd.js +2 -0
  93. package/dist/tttx/{p-dc2a37b0.entry.js → p-7bba2014.entry.js} +1 -1
  94. package/dist/tttx/p-d075a2c0.entry.js +1 -0
  95. package/dist/tttx/{p-bd1edaed.entry.js → p-deec335c.entry.js} +1 -1
  96. package/dist/tttx/{p-9f1e9cc1.entry.js → p-e061910d.entry.js} +1 -1
  97. package/dist/tttx/{p-f885f17a.entry.js → p-f247a7bc.entry.js} +1 -1
  98. package/dist/tttx/tttx.esm.js +1 -129
  99. package/dist/types/components/atoms/tttx-button/tttx-button.d.ts +10 -10
  100. package/dist/types/components/atoms/tttx-button/tttx-button.stories.d.ts +10 -10
  101. package/dist/types/components/atoms/tttx-icon/tttx-icon.d.ts +5 -5
  102. package/dist/types/components/atoms/tttx-icon/tttx-icon.stories.d.ts +20 -20
  103. package/dist/types/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.d.ts +7 -7
  104. package/dist/types/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.stories.d.ts +9 -9
  105. package/dist/types/components/atoms/tttx-loading-spinner/tttx-loading-spinner.d.ts +6 -6
  106. package/dist/types/components/atoms/tttx-loading-spinner/tttx-loading-spinner.stories.d.ts +17 -17
  107. package/dist/types/components/molecules/tttx-dialog-box/interfaces.d.ts +25 -0
  108. package/dist/types/components/molecules/tttx-dialog-box/tttx-dialog-box.d.ts +18 -0
  109. package/dist/types/components/molecules/tttx-dialog-box/tttx-dialog-box.stories.d.ts +23 -0
  110. package/dist/types/components/molecules/tttx-filter/tttx-filter.d.ts +41 -39
  111. package/dist/types/components/molecules/tttx-filter/tttx-filter.stories.d.ts +70 -68
  112. package/dist/types/components/molecules/tttx-form/lib/setErrorState.d.ts +13 -13
  113. package/dist/types/components/molecules/tttx-form/lib/validityCheck.d.ts +17 -17
  114. package/dist/types/components/molecules/tttx-form/tttx-form.d.ts +133 -133
  115. package/dist/types/components/molecules/tttx-form/tttx-form.stories.d.ts +278 -278
  116. package/dist/types/components/molecules/tttx-list/tttx-list.d.ts +11 -11
  117. package/dist/types/components/molecules/tttx-list/tttx-list.stories.d.ts +14 -14
  118. package/dist/types/components/molecules/tttx-sorter/tttx-sorter.d.ts +19 -19
  119. package/dist/types/components/molecules/tttx-sorter/tttx-sorter.stories.d.ts +30 -30
  120. package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.d.ts +69 -69
  121. package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.d.ts +143 -143
  122. package/dist/types/components/molecules/tttx-toolbar/tttx-toolbar.d.ts +4 -4
  123. package/dist/types/components/molecules/tttx-toolbar/tttx-toolbar.stories.d.ts +13 -13
  124. package/dist/types/components/palette.stories.d.ts +6 -6
  125. package/dist/types/components.d.ts +26 -0
  126. package/dist/types/docs/gettingstarted-developer.stories.d.ts +5 -5
  127. package/dist/types/icons.d.ts +2 -2
  128. package/dist/types/index.d.ts +1 -1
  129. package/dist/types/shared/domsanitiser.options.d.ts +10 -10
  130. package/dist/types/stencil-public-runtime.d.ts +59 -3
  131. package/loader/index.d.ts +9 -0
  132. package/package.json +2 -2
  133. package/dist/cjs/app-globals-3a1e7e63.js +0 -5
  134. package/dist/cjs/css-shim-211819bc.js +0 -6
  135. package/dist/cjs/dom-9deb26c8.js +0 -75
  136. package/dist/cjs/domsanitiser.options-3f1501b5.js +0 -1697
  137. package/dist/cjs/index-39a867c5.js +0 -3298
  138. package/dist/cjs/shadow-css-bf3843d2.js +0 -389
  139. package/dist/esm/app-globals-0f993ce5.js +0 -3
  140. package/dist/esm/css-shim-9d54a2f2.js +0 -4
  141. package/dist/esm/dom-6be6f662.js +0 -73
  142. package/dist/esm/domsanitiser.options-6f2878c8.js +0 -1694
  143. package/dist/esm/index-e3e64631.js +0 -3262
  144. package/dist/esm/shadow-css-ed4599f8.js +0 -387
  145. package/dist/tttx/app-globals-0f993ce5.js +0 -3
  146. package/dist/tttx/css-shim-9d54a2f2.js +0 -4
  147. package/dist/tttx/dom-6be6f662.js +0 -73
  148. package/dist/tttx/domsanitiser.options-6f2878c8.js +0 -1694
  149. package/dist/tttx/index-e3e64631.js +0 -3262
  150. package/dist/tttx/p-3b1be372.entry.js +0 -1
  151. package/dist/tttx/p-b4290a5b.js +0 -3
  152. package/dist/tttx/p-d0ff9ad0.entry.js +0 -1
  153. package/dist/tttx/p-db059a69.js +0 -2
  154. package/dist/tttx/shadow-css-ed4599f8.js +0 -387
  155. package/dist/tttx/tttx-filter.entry.js +0 -165
  156. package/dist/tttx/tttx-form.entry.js +0 -468
  157. package/dist/tttx/tttx-icon.entry.js +0 -17
  158. package/dist/tttx/tttx-keyvalue-block.entry.js +0 -65
  159. package/dist/tttx/tttx-list.entry.js +0 -38
  160. package/dist/tttx/tttx-loading-spinner.entry.js +0 -22
  161. package/dist/tttx/tttx-sorter.entry.js +0 -108
  162. package/dist/tttx/tttx-standalone-input.entry.js +0 -85
  163. package/dist/tttx/tttx-toolbar.entry.js +0 -16
@@ -0,0 +1,380 @@
1
+ export default {
2
+ title: 'molecules/Dialog box',
3
+ component: 'tttx-dialog-box',
4
+ parameters: {
5
+ docs: {
6
+ description: {
7
+ component: 'A magical storybook story about Tttx Dialog Box.',
8
+ },
9
+ },
10
+ },
11
+ };
12
+ const TttxDialogBoxStory = ({ data }) => `
13
+ <tttx-dialog-box
14
+ id='dialogBox'
15
+ ></tttx-dialog-box>
16
+ <script>
17
+ if(!dialogBox) {
18
+ const dialogBox = document.getElementById('dialogBox');
19
+ }
20
+ dialogBox.data = ${JSON.stringify(data)};
21
+ </script>
22
+ `;
23
+ export const Default = TttxDialogBoxStory.bind({});
24
+ Default.args = {
25
+ data: {
26
+ header: {
27
+ title: 'Dialog Title',
28
+ hasIcon: false,
29
+ hasClose: true,
30
+ },
31
+ body: {
32
+ isCustomHtml: false,
33
+ contentText: 'this is the default dialog',
34
+ },
35
+ footer: {
36
+ buttons: [
37
+ { name: 'primary', type: 'primary' },
38
+ { name: 'default', type: 'default' },
39
+ { name: 'No border', type: 'borderless' },
40
+ ],
41
+ },
42
+ },
43
+ };
44
+ const TttxDialogBoxMobile = ({ data }) => `
45
+ <tttx-dialog-box
46
+ id='dialogBoxMobile'
47
+ ></tttx-dialog-box>
48
+ <script>
49
+ if(!dialogBoxMobile) {
50
+ const dialogBoxMobile = document.getElementById('dialogBoxMobile');
51
+ }
52
+ dialogBoxMobile.data = ${JSON.stringify(data)};
53
+ dialogBoxMobile.size = "mobile"
54
+ </script>
55
+ `;
56
+ export const Mobile = TttxDialogBoxMobile.bind({});
57
+ Mobile.args = {
58
+ data: {
59
+ header: {
60
+ title: 'Mobile Dialog',
61
+ hasIcon: false,
62
+ hasClose: true,
63
+ },
64
+ body: {
65
+ isCustomHtml: false,
66
+ contentText: 'this is a Mobile dialog',
67
+ },
68
+ footer: {
69
+ buttons: [
70
+ { name: 'primary', type: 'primary' },
71
+ { name: 'default', type: 'default' },
72
+ { name: 'copy', icon: 'content_copy', type: 'default' },
73
+ ],
74
+ },
75
+ },
76
+ };
77
+ const TttxDialogBoxSmall = ({ data }) => `
78
+ <tttx-dialog-box
79
+ id='dialogBoxSmall'
80
+ ></tttx-dialog-box>
81
+ <script>
82
+ if(!dialogBoxSmall) {
83
+ const dialogBoxSmall = document.getElementById('dialogBoxSmall');
84
+ }
85
+ dialogBoxSmall.data = ${JSON.stringify(data)};
86
+ dialogBoxSmall.size = "small"
87
+ </script>
88
+ `;
89
+ export const Small = TttxDialogBoxSmall.bind({});
90
+ Small.args = {
91
+ data: {
92
+ header: {
93
+ title: 'Small Dialog',
94
+ hasIcon: false,
95
+ hasClose: true,
96
+ },
97
+ body: {
98
+ isCustomHtml: false,
99
+ contentText: 'this is a small dialog',
100
+ },
101
+ footer: {
102
+ buttons: [
103
+ { name: 'primary', type: 'primary' },
104
+ { name: 'default', type: 'default' },
105
+ { name: 'No border', type: 'borderless' },
106
+ ],
107
+ },
108
+ },
109
+ };
110
+ const TttxDialogBoxLarge = ({ data }) => `
111
+ <tttx-dialog-box
112
+ id='dialogBoxLarge'
113
+ ></tttx-dialog-box>
114
+ <script>
115
+ if(!dialogBoxLarge) {
116
+ const dialogBoxLarge = document.getElementById('dialogBoxLarge');
117
+ }
118
+ dialogBoxLarge.data = ${JSON.stringify(data)};
119
+ dialogBoxLarge.size = "large"
120
+ </script>
121
+ `;
122
+ export const Large = TttxDialogBoxLarge.bind({});
123
+ Large.args = {
124
+ data: {
125
+ header: {
126
+ title: 'Large Dialog',
127
+ hasIcon: false,
128
+ hasClose: true,
129
+ },
130
+ body: {
131
+ isCustomHtml: false,
132
+ contentText: 'this is a large dialog',
133
+ },
134
+ footer: {
135
+ buttons: [
136
+ { name: 'primary', type: 'primary' },
137
+ { name: 'default', type: 'default' },
138
+ { name: 'No border', type: 'borderless' },
139
+ ],
140
+ },
141
+ },
142
+ };
143
+ const TttxDialogBoxWithoutCloseButton = ({ data }) => `
144
+ <tttx-dialog-box
145
+ id='dialogBoxNoClose'
146
+ ></tttx-dialog-box>
147
+ <script>
148
+ if(!dialogBoxNoClose) {
149
+ const dialogBoxNoClose = document.getElementById('dialogBoxNoClose');
150
+ }
151
+ dialogBoxNoClose.data = ${JSON.stringify(data)};
152
+ </script>
153
+ `;
154
+ export const closeDisabled = TttxDialogBoxWithoutCloseButton.bind({});
155
+ closeDisabled.args = {
156
+ data: {
157
+ header: {
158
+ title: 'Dialog Without Close Button',
159
+ hasIcon: false,
160
+ hasClose: false,
161
+ },
162
+ body: {
163
+ isCustomHtml: false,
164
+ contentText: 'this is a dialog box without a close buttons',
165
+ },
166
+ footer: {
167
+ buttons: [
168
+ { name: 'primary', type: 'primary' },
169
+ { name: 'default', type: 'default' },
170
+ { name: 'No border', type: 'borderless' },
171
+ ],
172
+ },
173
+ },
174
+ };
175
+ const TttxDialogBoxWithIcon = ({ data }) => `
176
+ <tttx-dialog-box
177
+ id='dialogBoxIcon'
178
+ ></tttx-dialog-box>
179
+ <script>
180
+ if(!dialogBoxIcon) {
181
+ const dialogBoxIcon = document.getElementById('dialogBoxIcon');
182
+ }
183
+ dialogBoxIcon.data = ${JSON.stringify(data)};
184
+ </script>
185
+ `;
186
+ export const Icon = TttxDialogBoxWithIcon.bind({});
187
+ Icon.args = {
188
+ data: {
189
+ header: {
190
+ title: 'Icons Dialog',
191
+ hasIcon: true,
192
+ iconName: 'egg',
193
+ iconColor: 'green',
194
+ hasClose: true,
195
+ },
196
+ body: {
197
+ isCustomHtml: false,
198
+ contentText: 'this is a dialog box with an icon in the header and on the buttonss',
199
+ },
200
+ footer: {
201
+ buttons: [
202
+ { name: 'Primary Icon', icon: 'egg', type: 'primary' },
203
+ { name: 'default Icon', icon: 'egg', type: 'default' },
204
+ { name: 'boderless Icon', icon: 'egg', type: 'borderless' },
205
+ ],
206
+ },
207
+ },
208
+ };
209
+ const TttxDialogBoxInfo = ({ data }) => `
210
+ <tttx-dialog-box
211
+ id='dialogBoxInfo'
212
+ ></tttx-dialog-box>
213
+ <script>
214
+ if(!dialogBoxInfo) {
215
+ const dialogBoxInfo = document.getElementById('dialogBoxInfo');
216
+ }
217
+ dialogBoxInfo.data = ${JSON.stringify(data)};
218
+ </script>
219
+ `;
220
+ export const Info = TttxDialogBoxInfo.bind({});
221
+ Info.args = {
222
+ data: {
223
+ type: 'info',
224
+ header: {
225
+ title: 'Info',
226
+ hasIcon: true,
227
+ iconName: 'info',
228
+ iconColor: 'blue',
229
+ hasClose: true,
230
+ },
231
+ body: {
232
+ isCustomHtml: false,
233
+ contentText: 'there is some info',
234
+ },
235
+ footer: {
236
+ buttons: [
237
+ { name: 'primary', type: 'primary' },
238
+ { name: 'default', type: 'default' },
239
+ { name: 'No border', type: 'borderless' },
240
+ ],
241
+ },
242
+ },
243
+ };
244
+ const TttxDialogBoxSuccess = ({ data }) => `
245
+ <tttx-dialog-box
246
+ id='dialogBoxSuccess'
247
+ ></tttx-dialog-box>
248
+ <script>
249
+ if(!dialogBoxSuccess) {
250
+ const dialogBoxSuccess = document.getElementById('dialogBoxSuccess');
251
+ }
252
+ dialogBoxSuccess.data = ${JSON.stringify(data)};
253
+ </script>
254
+ `;
255
+ export const Success = TttxDialogBoxSuccess.bind({});
256
+ Success.args = {
257
+ data: {
258
+ type: 'success',
259
+ header: {
260
+ title: 'Success',
261
+ hasIcon: true,
262
+ iconName: 'check_circle',
263
+ iconColor: 'green',
264
+ hasClose: true,
265
+ },
266
+ body: {
267
+ isCustomHtml: false,
268
+ contentText: 'there is no content',
269
+ },
270
+ footer: {
271
+ buttons: [
272
+ { name: 'primary', type: 'primary' },
273
+ { name: 'default', type: 'default' },
274
+ { name: 'No border', type: 'borderless' },
275
+ ],
276
+ },
277
+ },
278
+ };
279
+ const TttxDialogBoxWarning = ({ data }) => `
280
+ <tttx-dialog-box
281
+ id='dialogBoxWarning'
282
+ ></tttx-dialog-box>
283
+ <script>
284
+ if(!dialogBoxWarning) {
285
+ const dialogBoxWarning = document.getElementById('dialogBoxWarning');
286
+ }
287
+ dialogBoxWarning.data = ${JSON.stringify(data)};
288
+ </script>
289
+ `;
290
+ export const Warning = TttxDialogBoxWarning.bind({});
291
+ Warning.args = {
292
+ data: {
293
+ type: 'warning',
294
+ header: {
295
+ title: 'Warning',
296
+ hasIcon: true,
297
+ iconName: 'warning',
298
+ iconColor: 'orange',
299
+ hasClose: true,
300
+ },
301
+ body: {
302
+ isCustomHtml: false,
303
+ contentText: 'there is a warning',
304
+ },
305
+ footer: {
306
+ buttons: [
307
+ { name: 'primary', type: 'primary' },
308
+ { name: 'default', type: 'default' },
309
+ { name: 'No border', type: 'borderless' },
310
+ ],
311
+ },
312
+ },
313
+ };
314
+ const TttxDialogBoxCritical = ({ data }) => `
315
+ <tttx-dialog-box
316
+ id='dialogBoxCritical'
317
+ ></tttx-dialog-box>
318
+ <script>
319
+ if(!dialogBoxCritical) {
320
+ const dialogBoxCritical = document.getElementById('dialogBoxCritical');
321
+ }
322
+ dialogBoxCritical.data = ${JSON.stringify(data)};
323
+ </script>
324
+ `;
325
+ export const Critical = TttxDialogBoxCritical.bind({});
326
+ Critical.args = {
327
+ data: {
328
+ type: 'critical',
329
+ header: {
330
+ title: 'Critical',
331
+ hasIcon: true,
332
+ iconName: 'report',
333
+ iconColor: 'red',
334
+ hasClose: true,
335
+ },
336
+ body: {
337
+ isCustomHtml: false,
338
+ contentText: 'there is a critical error',
339
+ },
340
+ footer: {
341
+ buttons: [
342
+ { name: 'primary', type: 'primary' },
343
+ { name: 'default', type: 'default' },
344
+ { name: 'No border', type: 'borderless' },
345
+ ],
346
+ },
347
+ },
348
+ };
349
+ const TttxDialogBoxHTML = ({ data }) => `
350
+ <tttx-dialog-box
351
+ id='dialogBoxHTML'
352
+ ></tttx-dialog-box>
353
+ <script>
354
+ if(!dialogBoxHTML) {
355
+ const dialogBoxHTML = document.getElementById('dialogBoxHTML');
356
+ }
357
+ dialogBoxHTML.data = ${JSON.stringify(data)};
358
+ </script>
359
+ `;
360
+ export const CustomHTML = TttxDialogBoxHTML.bind({});
361
+ CustomHTML.args = {
362
+ data: {
363
+ header: {
364
+ title: 'html Dialog',
365
+ hasIcon: false,
366
+ hasClose: true,
367
+ },
368
+ body: {
369
+ isCustomHtml: true,
370
+ customHtml: '<div><div>This is a custom html</div><a href="https://example.com/">Click here</a></div>',
371
+ },
372
+ footer: {
373
+ buttons: [
374
+ { name: 'primary', type: 'primary' },
375
+ { name: 'default', type: 'default' },
376
+ { name: 'No border', type: 'borderless' },
377
+ ],
378
+ },
379
+ },
380
+ };