@3t-transform/threeteeui 0.1.43 → 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 (57) hide show
  1. package/dist/cjs/{index-457ca775.js → index-2ea393bb.js} +58 -1
  2. package/dist/cjs/loader.cjs.js +2 -2
  3. package/dist/cjs/tttx-button.cjs.entry.js +1 -1
  4. package/dist/cjs/tttx-dialog-box.cjs.entry.js +80 -0
  5. package/dist/cjs/tttx-filter.cjs.entry.js +1 -1
  6. package/dist/cjs/tttx-form.cjs.entry.js +1 -1
  7. package/dist/cjs/tttx-icon.cjs.entry.js +1 -1
  8. package/dist/cjs/tttx-keyvalue-block.cjs.entry.js +1 -1
  9. package/dist/cjs/tttx-list.cjs.entry.js +1 -1
  10. package/dist/cjs/tttx-loading-spinner.cjs.entry.js +1 -1
  11. package/dist/cjs/tttx-sorter.cjs.entry.js +1 -1
  12. package/dist/cjs/tttx-standalone-input.cjs.entry.js +1 -1
  13. package/dist/cjs/tttx-toolbar.cjs.entry.js +1 -1
  14. package/dist/cjs/tttx.cjs.js +2 -2
  15. package/dist/collection/collection-manifest.json +1 -0
  16. package/dist/collection/components/molecules/tttx-dialog-box/tttx-dialog-box.css +146 -0
  17. package/dist/collection/components/molecules/tttx-dialog-box/tttx-dialog-box.js +172 -0
  18. package/dist/collection/components/molecules/tttx-dialog-box/tttx-dialog-box.stories.js +380 -0
  19. package/dist/components/index.d.ts +1 -0
  20. package/dist/components/index.js +1 -0
  21. package/dist/components/tttx-button.js +1 -54
  22. package/dist/components/tttx-button2.js +56 -0
  23. package/dist/components/tttx-dialog-box.d.ts +11 -0
  24. package/dist/components/tttx-dialog-box.js +110 -0
  25. package/dist/esm/{index-d784fb3e.js → index-018a3e54.js} +58 -1
  26. package/dist/esm/loader.js +3 -3
  27. package/dist/esm/tttx-button.entry.js +1 -1
  28. package/dist/esm/tttx-dialog-box.entry.js +76 -0
  29. package/dist/esm/tttx-filter.entry.js +1 -1
  30. package/dist/esm/tttx-form.entry.js +1 -1
  31. package/dist/esm/tttx-icon.entry.js +1 -1
  32. package/dist/esm/tttx-keyvalue-block.entry.js +1 -1
  33. package/dist/esm/tttx-list.entry.js +1 -1
  34. package/dist/esm/tttx-loading-spinner.entry.js +1 -1
  35. package/dist/esm/tttx-sorter.entry.js +1 -1
  36. package/dist/esm/tttx-standalone-input.entry.js +1 -1
  37. package/dist/esm/tttx-toolbar.entry.js +1 -1
  38. package/dist/esm/tttx.js +3 -3
  39. package/dist/tttx/{p-ab6ce9f6.entry.js → p-01863bf1.entry.js} +1 -1
  40. package/dist/tttx/{p-f702df4f.entry.js → p-0ed6f369.entry.js} +1 -1
  41. package/dist/tttx/{p-ec253eea.entry.js → p-2dd43e97.entry.js} +1 -1
  42. package/dist/tttx/{p-798a098a.entry.js → p-2e135be9.entry.js} +1 -1
  43. package/dist/tttx/{p-cac26a1b.entry.js → p-48b15a3d.entry.js} +1 -1
  44. package/dist/tttx/{p-563605b2.entry.js → p-5e91cf1c.entry.js} +1 -1
  45. package/dist/tttx/p-71c244bd.js +2 -0
  46. package/dist/tttx/{p-1db3704e.entry.js → p-7bba2014.entry.js} +1 -1
  47. package/dist/tttx/p-d075a2c0.entry.js +1 -0
  48. package/dist/tttx/{p-aaf02902.entry.js → p-deec335c.entry.js} +1 -1
  49. package/dist/tttx/{p-b720c4ad.entry.js → p-e061910d.entry.js} +1 -1
  50. package/dist/tttx/{p-92cade7f.entry.js → p-f247a7bc.entry.js} +1 -1
  51. package/dist/tttx/tttx.esm.js +1 -1
  52. package/dist/types/components/molecules/tttx-dialog-box/interfaces.d.ts +25 -0
  53. package/dist/types/components/molecules/tttx-dialog-box/tttx-dialog-box.d.ts +18 -0
  54. package/dist/types/components/molecules/tttx-dialog-box/tttx-dialog-box.stories.d.ts +23 -0
  55. package/dist/types/components.d.ts +24 -0
  56. package/package.json +1 -1
  57. package/dist/tttx/p-0ebffdfc.js +0 -2
@@ -0,0 +1,172 @@
1
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
+ import { h } from '@stencil/core';
3
+ import * as DOMPurify from 'dompurify';
4
+ import domSanitiserOptions from '../../../shared/domsanitiser.options';
5
+ export class TttxDialogBox {
6
+ constructor() {
7
+ this.data = undefined;
8
+ this.size = 'regular';
9
+ this.elementSize = undefined;
10
+ }
11
+ handleResize() {
12
+ if (window.innerWidth < 698) {
13
+ this.elementSize = 'mobile';
14
+ }
15
+ else {
16
+ this.elementSize = this.size;
17
+ }
18
+ }
19
+ onCloseClickHandler() {
20
+ this.closeButtonClick.emit({ close: true });
21
+ }
22
+ onButtonClickHandler(index) {
23
+ this.buttonClick.emit({ buttonNumber: index, buttonClicked: true });
24
+ }
25
+ renderHeader(header) {
26
+ const title = header.title;
27
+ const iconName = header.iconName;
28
+ const iconColor = header.iconColor;
29
+ const iconEnabled = header.hasIcon ? true : false;
30
+ const closeEnabled = header.hasClose ? true : false;
31
+ return (h("div", { class: "dialog-box-header" }, iconEnabled && h("tttx-icon", { class: "dialog-box-icon", icon: iconName, color: iconColor }), h("h3", { class: "dialog-box-title" }, title), closeEnabled && (h("div", { class: "dialog-box-align-right close-button", onClick: () => this.onCloseClickHandler() }, h("tttx-icon", { class: "dialog-box-icon-close dialog-box-clickable", icon: "close", color: "black" })))));
32
+ }
33
+ renderContent(content) {
34
+ if (content.isCustomHtml) {
35
+ const cleanHTML = DOMPurify.sanitize(content.customHtml, domSanitiserOptions);
36
+ return (h("div", { class: "dialog-box-body" }, h("div", { innerHTML: cleanHTML })));
37
+ }
38
+ else {
39
+ return (h("div", { class: "dialog-box-body" }, h("span", { class: "dialog-box-content" }, content.contentText)));
40
+ }
41
+ }
42
+ renderFooter(footer) {
43
+ const button = footer.buttons;
44
+ const button1Enabled = button.length > 0;
45
+ const button2Enabled = button.length > 1;
46
+ const button3Enabled = button.length == 3;
47
+ const isMobile = this.elementSize === 'mobile';
48
+ return (h("div", { class: "dialog-box-footer" }, h("div", { class: "dialog-box-align-right" }, button3Enabled && (h("tttx-button", { class: "dialog-box-spacing-button", onClick: () => this.onButtonClickHandler(3), design: button[2].type, notext: isMobile, icon: button[2].icon }, !isMobile && button[2].name)), button2Enabled && (h("tttx-button", { class: "dialog-box-spacing-button", onClick: () => this.onButtonClickHandler(2), design: button[1].type, icon: button[1].icon }, button[1].name)), button1Enabled && (h("tttx-button", { onClick: () => this.onButtonClickHandler(1), design: button[0].type, icon: button[0].icon }, button[0].name)))));
49
+ }
50
+ componentWillLoad() {
51
+ if (window.innerWidth < 698) {
52
+ this.elementSize = 'mobile';
53
+ }
54
+ else {
55
+ this.elementSize = this.size;
56
+ }
57
+ }
58
+ render() {
59
+ if (!this.data)
60
+ return;
61
+ if (typeof this.data === 'string') {
62
+ this._data = JSON.parse(this.data);
63
+ }
64
+ else {
65
+ this._data = this.data;
66
+ }
67
+ return (h("div", { class: `dialog-box ${this.elementSize}` }, h("div", { class: `dialog-box-padding dialog-box-header-box ${this._data.type || ''}` }, this.renderHeader(this._data.header)), h("div", { class: "dialog-box-padding dialog-box-body-box" }, this.renderContent(this._data.body)), h("div", { class: "dialog-box-padding dialog-box-footer-box" }, this.renderFooter(this._data.footer))));
68
+ }
69
+ static get is() { return "tttx-dialog-box"; }
70
+ static get encapsulation() { return "shadow"; }
71
+ static get originalStyleUrls() {
72
+ return {
73
+ "$": ["tttx-dialog-box.scss"]
74
+ };
75
+ }
76
+ static get styleUrls() {
77
+ return {
78
+ "$": ["tttx-dialog-box.css"]
79
+ };
80
+ }
81
+ static get properties() {
82
+ return {
83
+ "data": {
84
+ "type": "string",
85
+ "mutable": true,
86
+ "complexType": {
87
+ "original": "string | DialogItems",
88
+ "resolved": "DialogItems | string",
89
+ "references": {
90
+ "DialogItems": {
91
+ "location": "import",
92
+ "path": "./interfaces"
93
+ }
94
+ }
95
+ },
96
+ "required": false,
97
+ "optional": false,
98
+ "docs": {
99
+ "tags": [],
100
+ "text": ""
101
+ },
102
+ "attribute": "data",
103
+ "reflect": false
104
+ },
105
+ "size": {
106
+ "type": "string",
107
+ "mutable": false,
108
+ "complexType": {
109
+ "original": "'regular' | 'mobile' | 'large' | 'small'",
110
+ "resolved": "\"large\" | \"mobile\" | \"regular\" | \"small\"",
111
+ "references": {}
112
+ },
113
+ "required": false,
114
+ "optional": false,
115
+ "docs": {
116
+ "tags": [],
117
+ "text": ""
118
+ },
119
+ "attribute": "size",
120
+ "reflect": false,
121
+ "defaultValue": "'regular'"
122
+ }
123
+ };
124
+ }
125
+ static get states() {
126
+ return {
127
+ "elementSize": {}
128
+ };
129
+ }
130
+ static get events() {
131
+ return [{
132
+ "method": "closeButtonClick",
133
+ "name": "closeButtonClick",
134
+ "bubbles": true,
135
+ "cancelable": false,
136
+ "composed": true,
137
+ "docs": {
138
+ "tags": [],
139
+ "text": ""
140
+ },
141
+ "complexType": {
142
+ "original": "any",
143
+ "resolved": "any",
144
+ "references": {}
145
+ }
146
+ }, {
147
+ "method": "buttonClick",
148
+ "name": "buttonClick",
149
+ "bubbles": true,
150
+ "cancelable": true,
151
+ "composed": true,
152
+ "docs": {
153
+ "tags": [],
154
+ "text": ""
155
+ },
156
+ "complexType": {
157
+ "original": "any",
158
+ "resolved": "any",
159
+ "references": {}
160
+ }
161
+ }];
162
+ }
163
+ static get listeners() {
164
+ return [{
165
+ "name": "resize",
166
+ "method": "handleResize",
167
+ "target": "window",
168
+ "capture": false,
169
+ "passive": true
170
+ }];
171
+ }
172
+ }
@@ -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
+ };
@@ -1,5 +1,6 @@
1
1
  /* tttx custom elements */
2
2
  export { TttxButton as TttxButton } from '../types/components/atoms/tttx-button/tttx-button';
3
+ export { TttxDialogBox as TttxDialogBox } from '../types/components/molecules/tttx-dialog-box/tttx-dialog-box';
3
4
  export { TttxFilter as TttxFilter } from '../types/components/molecules/tttx-filter/tttx-filter';
4
5
  export { TttxForm as TttxForm } from '../types/components/molecules/tttx-form/tttx-form';
5
6
  export { TttxIcon as TttxIcon } from '../types/components/atoms/tttx-icon/tttx-icon';
@@ -1,5 +1,6 @@
1
1
  export { setAssetPath, setNonce, setPlatformOptions } from '@stencil/core/internal/client';
2
2
  export { TttxButton, defineCustomElement as defineCustomElementTttxButton } from './tttx-button.js';
3
+ export { TttxDialogBox, defineCustomElement as defineCustomElementTttxDialogBox } from './tttx-dialog-box.js';
3
4
  export { TttxFilter, defineCustomElement as defineCustomElementTttxFilter } from './tttx-filter.js';
4
5
  export { TttxForm, defineCustomElement as defineCustomElementTttxForm } from './tttx-form.js';
5
6
  export { TttxIcon, defineCustomElement as defineCustomElementTttxIcon } from './tttx-icon.js';
@@ -1,57 +1,4 @@
1
- import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
- import { d as defineCustomElement$2 } from './tttx-icon2.js';
3
-
4
- const tttxButtonCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}button{cursor:pointer}.button{font-family:Roboto, serif;box-sizing:border-box;height:36px;min-width:36px;padding:0;margin:0;background:transparent;color:#212121;border:1px solid #c8c8c8;border-radius:4px;text-transform:uppercase;display:flex;justify-content:left;align-items:center;font-size:14px;font-weight:400}.button-content{display:block;padding:0 16px}.icon-left,.icon-right{margin-top:4px}.iconleft{padding-left:8px}.iconleft .button-content{padding-left:4px}.iconright{padding-right:8px}.iconright .button-content{padding-right:4px}.notext{padding:0 6px}.button:hover{background:rgba(17, 17, 17, 0.1);border:1px solid #D5D5D5}.button:active{background:rgba(17, 17, 17, 0.2);border:1px solid #D5D5D5}.primary{background:#1479c6;border:1px solid #1479c6;color:white}.primary:hover{background:#146EB3;border:1px solid #146EB3}.primary:active{background:#1464A2;border:1px solid #1464A2}.borderless{background:transparent;border:none;color:#212121}.borderless:hover{background:rgba(17, 17, 17, 0.1);border:none}.borderless:active{background:rgba(17, 17, 17, 0.2);border:none}.danger{background:#DC0000;border:1px solid #DC0000;color:white}.danger:hover{background:#C60000;border:1px solid #C60000}.danger:active{background:#B00000;border:1px solid #B00000}.disabled{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}.disabled:hover{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}.disabled:active{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}:host{display:inline-block}tttx-icon{cursor:inherit}.spacingleft{margin-left:8px}";
5
-
6
- const TttxButton$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
7
- constructor() {
8
- super();
9
- this.__registerHost();
10
- this.__attachShadow();
11
- this._iconcolor = 'black';
12
- this.notext = undefined;
13
- this.icon = undefined;
14
- this.iconposition = 'left';
15
- this.design = 'default';
16
- }
17
- componentWillLoad() {
18
- this._design = this.design;
19
- const designs = ['primary', 'default', 'disabled', 'danger', 'borderless'];
20
- if (!designs.includes(this.design)) {
21
- this._design = 'default';
22
- }
23
- if (this._design === 'primary' || this._design === 'danger') {
24
- this._iconcolor = 'white';
25
- }
26
- }
27
- render() {
28
- return (h(Host, null, h("button", { class: `button ${this._design} ${this.icon ? 'withicon' : ''} ${this.icon && this.iconposition ? 'icon' + this.iconposition : ''} ${this.notext ? 'notext' : ''}` }, this.icon && this.iconposition === 'left' && (h("div", { class: "icon-left" }, h("tttx-icon", { icon: this.icon, color: this._iconcolor }))), !this.notext && h("div", { class: "button-content" }, h("slot", null)), this.icon && this.iconposition === 'right' && (h("div", { class: "icon-right" }, h("tttx-icon", { icon: this.icon, color: this._iconcolor }))))));
29
- }
30
- static get style() { return tttxButtonCss; }
31
- }, [1, "tttx-button", {
32
- "notext": [4],
33
- "icon": [1],
34
- "iconposition": [1],
35
- "design": [1]
36
- }]);
37
- function defineCustomElement$1() {
38
- if (typeof customElements === "undefined") {
39
- return;
40
- }
41
- const components = ["tttx-button", "tttx-icon"];
42
- components.forEach(tagName => { switch (tagName) {
43
- case "tttx-button":
44
- if (!customElements.get(tagName)) {
45
- customElements.define(tagName, TttxButton$1);
46
- }
47
- break;
48
- case "tttx-icon":
49
- if (!customElements.get(tagName)) {
50
- defineCustomElement$2();
51
- }
52
- break;
53
- } });
54
- }
1
+ import { T as TttxButton$1, d as defineCustomElement$1 } from './tttx-button2.js';
55
2
 
56
3
  const TttxButton = TttxButton$1;
57
4
  const defineCustomElement = defineCustomElement$1;
@@ -0,0 +1,56 @@
1
+ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
+ import { d as defineCustomElement$1 } from './tttx-icon2.js';
3
+
4
+ const tttxButtonCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}button{cursor:pointer}.button{font-family:Roboto, serif;box-sizing:border-box;height:36px;min-width:36px;padding:0;margin:0;background:transparent;color:#212121;border:1px solid #c8c8c8;border-radius:4px;text-transform:uppercase;display:flex;justify-content:left;align-items:center;font-size:14px;font-weight:400}.button-content{display:block;padding:0 16px}.icon-left,.icon-right{margin-top:4px}.iconleft{padding-left:8px}.iconleft .button-content{padding-left:4px}.iconright{padding-right:8px}.iconright .button-content{padding-right:4px}.notext{padding:0 6px}.button:hover{background:rgba(17, 17, 17, 0.1);border:1px solid #D5D5D5}.button:active{background:rgba(17, 17, 17, 0.2);border:1px solid #D5D5D5}.primary{background:#1479c6;border:1px solid #1479c6;color:white}.primary:hover{background:#146EB3;border:1px solid #146EB3}.primary:active{background:#1464A2;border:1px solid #1464A2}.borderless{background:transparent;border:none;color:#212121}.borderless:hover{background:rgba(17, 17, 17, 0.1);border:none}.borderless:active{background:rgba(17, 17, 17, 0.2);border:none}.danger{background:#DC0000;border:1px solid #DC0000;color:white}.danger:hover{background:#C60000;border:1px solid #C60000}.danger:active{background:#B00000;border:1px solid #B00000}.disabled{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}.disabled:hover{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}.disabled:active{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}:host{display:inline-block}tttx-icon{cursor:inherit}.spacingleft{margin-left:8px}";
5
+
6
+ const TttxButton = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
7
+ constructor() {
8
+ super();
9
+ this.__registerHost();
10
+ this.__attachShadow();
11
+ this._iconcolor = 'black';
12
+ this.notext = undefined;
13
+ this.icon = undefined;
14
+ this.iconposition = 'left';
15
+ this.design = 'default';
16
+ }
17
+ componentWillLoad() {
18
+ this._design = this.design;
19
+ const designs = ['primary', 'default', 'disabled', 'danger', 'borderless'];
20
+ if (!designs.includes(this.design)) {
21
+ this._design = 'default';
22
+ }
23
+ if (this._design === 'primary' || this._design === 'danger') {
24
+ this._iconcolor = 'white';
25
+ }
26
+ }
27
+ render() {
28
+ return (h(Host, null, h("button", { class: `button ${this._design} ${this.icon ? 'withicon' : ''} ${this.icon && this.iconposition ? 'icon' + this.iconposition : ''} ${this.notext ? 'notext' : ''}` }, this.icon && this.iconposition === 'left' && (h("div", { class: "icon-left" }, h("tttx-icon", { icon: this.icon, color: this._iconcolor }))), !this.notext && h("div", { class: "button-content" }, h("slot", null)), this.icon && this.iconposition === 'right' && (h("div", { class: "icon-right" }, h("tttx-icon", { icon: this.icon, color: this._iconcolor }))))));
29
+ }
30
+ static get style() { return tttxButtonCss; }
31
+ }, [1, "tttx-button", {
32
+ "notext": [4],
33
+ "icon": [1],
34
+ "iconposition": [1],
35
+ "design": [1]
36
+ }]);
37
+ function defineCustomElement() {
38
+ if (typeof customElements === "undefined") {
39
+ return;
40
+ }
41
+ const components = ["tttx-button", "tttx-icon"];
42
+ components.forEach(tagName => { switch (tagName) {
43
+ case "tttx-button":
44
+ if (!customElements.get(tagName)) {
45
+ customElements.define(tagName, TttxButton);
46
+ }
47
+ break;
48
+ case "tttx-icon":
49
+ if (!customElements.get(tagName)) {
50
+ defineCustomElement$1();
51
+ }
52
+ break;
53
+ } });
54
+ }
55
+
56
+ export { TttxButton as T, defineCustomElement as d };