@3t-transform/threeteeui 0.1.44 → 0.1.45

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 (143) hide show
  1. package/dist/cjs/_commonjsHelpers-537d719a.js +20 -0
  2. package/dist/cjs/{domsanitiser.options-975e3317.js → domsanitiser.options-b2d88e35.js} +16 -30
  3. package/dist/cjs/{index-2ea393bb.js → index-1a35850c.js} +4 -0
  4. package/dist/cjs/loader.cjs.js +2 -2
  5. package/dist/cjs/tttx-button.cjs.entry.js +24 -24
  6. package/dist/cjs/tttx-dialog-box.cjs.entry.js +71 -70
  7. package/dist/cjs/tttx-filter.cjs.entry.js +177 -177
  8. package/dist/cjs/tttx-form.cjs.entry.js +459 -458
  9. package/dist/cjs/tttx-icon.cjs.entry.js +11 -11
  10. package/dist/cjs/tttx-keyvalue-block.cjs.entry.js +59 -59
  11. package/dist/cjs/tttx-list.cjs.entry.js +33 -32
  12. package/dist/cjs/tttx-loading-spinner.cjs.entry.js +16 -16
  13. package/dist/cjs/tttx-qrcode.cjs.entry.js +37 -0
  14. package/dist/cjs/tttx-sorter.cjs.entry.js +102 -102
  15. package/dist/cjs/tttx-standalone-input.cjs.entry.js +79 -79
  16. package/dist/cjs/tttx-toolbar.cjs.entry.js +10 -10
  17. package/dist/cjs/tttx.cjs.js +2 -2
  18. package/dist/collection/collection-manifest.json +1 -0
  19. package/dist/collection/components/atoms/tttx-button/tttx-button.js +110 -110
  20. package/dist/collection/components/atoms/tttx-button/tttx-button.stories.js +14 -14
  21. package/dist/collection/components/atoms/tttx-icon/tttx-icon.js +62 -62
  22. package/dist/collection/components/atoms/tttx-icon/tttx-icon.stories.js +22 -22
  23. package/dist/collection/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.js +109 -109
  24. package/dist/collection/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.stories.js +38 -38
  25. package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.js +67 -67
  26. package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.stories.js +17 -17
  27. package/dist/collection/components/atoms/tttx-qrcode/tttx-qrcode.css +0 -0
  28. package/dist/collection/components/atoms/tttx-qrcode/tttx-qrcode.js +74 -0
  29. package/dist/collection/components/atoms/tttx-qrcode/tttx-qrcode.stories.js +22 -0
  30. package/dist/collection/components/molecules/tttx-dialog-box/tttx-dialog-box.js +172 -172
  31. package/dist/collection/components/molecules/tttx-dialog-box/tttx-dialog-box.stories.js +267 -267
  32. package/dist/collection/components/molecules/tttx-filter/tttx-filter.js +369 -369
  33. package/dist/collection/components/molecules/tttx-filter/tttx-filter.stories.js +72 -72
  34. package/dist/collection/components/molecules/tttx-form/lib/setErrorState.js +37 -37
  35. package/dist/collection/components/molecules/tttx-form/lib/validityCheck.js +61 -61
  36. package/dist/collection/components/molecules/tttx-form/tttx-form.js +479 -479
  37. package/dist/collection/components/molecules/tttx-form/tttx-form.stories.js +272 -272
  38. package/dist/collection/components/molecules/tttx-list/tttx-list.js +105 -105
  39. package/dist/collection/components/molecules/tttx-list/tttx-list.stories.js +43 -43
  40. package/dist/collection/components/molecules/tttx-sorter/tttx-sorter.js +224 -224
  41. package/dist/collection/components/molecules/tttx-sorter/tttx-sorter.stories.js +42 -42
  42. package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.js +759 -759
  43. package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.js +172 -172
  44. package/dist/collection/components/molecules/tttx-toolbar/tttx-toolbar.js +44 -44
  45. package/dist/collection/components/molecules/tttx-toolbar/tttx-toolbar.stories.js +14 -14
  46. package/dist/collection/components/palette.stories.js +7 -7
  47. package/dist/collection/docs/gettingstarted-developer.stories.js +5 -5
  48. package/dist/collection/icons.js +2838 -2838
  49. package/dist/collection/index.js +1 -1
  50. package/dist/collection/shared/domsanitiser.options.js +14 -14
  51. package/dist/components/_commonjsHelpers.js +17 -0
  52. package/dist/components/domsanitiser.options.js +13 -27
  53. package/dist/components/index.d.ts +1 -0
  54. package/dist/components/index.js +1 -0
  55. package/dist/components/tttx-button2.js +48 -48
  56. package/dist/components/tttx-dialog-box.js +97 -97
  57. package/dist/components/tttx-filter.js +210 -210
  58. package/dist/components/tttx-form.js +475 -475
  59. package/dist/components/tttx-icon2.js +28 -28
  60. package/dist/components/tttx-keyvalue-block.js +76 -76
  61. package/dist/components/tttx-list.js +53 -53
  62. package/dist/components/tttx-loading-spinner.js +33 -33
  63. package/dist/components/tttx-qrcode.d.ts +11 -0
  64. package/dist/components/tttx-qrcode.js +53 -0
  65. package/dist/components/tttx-sorter.js +130 -130
  66. package/dist/components/tttx-standalone-input.js +130 -130
  67. package/dist/components/tttx-toolbar.js +26 -26
  68. package/dist/esm/_commonjsHelpers-9943807e.js +17 -0
  69. package/dist/esm/{domsanitiser.options-3c7ded83.js → domsanitiser.options-81611f82.js} +13 -27
  70. package/dist/esm/{index-018a3e54.js → index-a848bfb4.js} +4 -0
  71. package/dist/esm/loader.js +3 -3
  72. package/dist/esm/polyfills/core-js.js +0 -0
  73. package/dist/esm/polyfills/dom.js +0 -0
  74. package/dist/esm/polyfills/es5-html-element.js +0 -0
  75. package/dist/esm/polyfills/index.js +0 -0
  76. package/dist/esm/polyfills/system.js +0 -0
  77. package/dist/esm/tttx-button.entry.js +24 -24
  78. package/dist/esm/tttx-dialog-box.entry.js +71 -70
  79. package/dist/esm/tttx-filter.entry.js +177 -177
  80. package/dist/esm/tttx-form.entry.js +459 -458
  81. package/dist/esm/tttx-icon.entry.js +11 -11
  82. package/dist/esm/tttx-keyvalue-block.entry.js +59 -59
  83. package/dist/esm/tttx-list.entry.js +33 -32
  84. package/dist/esm/tttx-loading-spinner.entry.js +16 -16
  85. package/dist/esm/tttx-qrcode.entry.js +33 -0
  86. package/dist/esm/tttx-sorter.entry.js +102 -102
  87. package/dist/esm/tttx-standalone-input.entry.js +79 -79
  88. package/dist/esm/tttx-toolbar.entry.js +10 -10
  89. package/dist/esm/tttx.js +3 -3
  90. package/dist/tttx/p-0b25ac9c.js +3 -0
  91. package/dist/tttx/p-112455b1.js +1 -0
  92. package/dist/tttx/{p-e061910d.entry.js → p-120a0732.entry.js} +1 -1
  93. package/dist/tttx/p-2d130f82.entry.js +1 -0
  94. package/dist/tttx/{p-deec335c.entry.js → p-42349ae5.entry.js} +1 -1
  95. package/dist/tttx/{p-f247a7bc.entry.js → p-623b9147.entry.js} +1 -1
  96. package/dist/tttx/{p-48b15a3d.entry.js → p-7428fc97.entry.js} +1 -1
  97. package/dist/tttx/{p-01863bf1.entry.js → p-77fb8e0f.entry.js} +1 -1
  98. package/dist/tttx/p-83563ce9.entry.js +1 -0
  99. package/dist/tttx/p-a092cd71.entry.js +1 -0
  100. package/dist/tttx/{p-71c244bd.js → p-ab4652a8.js} +2 -2
  101. package/dist/tttx/p-af7ff3b3.entry.js +1 -0
  102. package/dist/tttx/{p-5e91cf1c.entry.js → p-d0ca435d.entry.js} +1 -1
  103. package/dist/tttx/{p-2e135be9.entry.js → p-d2b0ec0a.entry.js} +1 -1
  104. package/dist/tttx/{p-2dd43e97.entry.js → p-e1efb888.entry.js} +1 -1
  105. package/dist/tttx/tttx.esm.js +1 -1
  106. package/dist/types/components/atoms/tttx-button/tttx-button.d.ts +10 -10
  107. package/dist/types/components/atoms/tttx-button/tttx-button.stories.d.ts +10 -10
  108. package/dist/types/components/atoms/tttx-icon/tttx-icon.d.ts +5 -5
  109. package/dist/types/components/atoms/tttx-icon/tttx-icon.stories.d.ts +20 -20
  110. package/dist/types/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.d.ts +7 -7
  111. package/dist/types/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.stories.d.ts +9 -9
  112. package/dist/types/components/atoms/tttx-loading-spinner/tttx-loading-spinner.d.ts +6 -6
  113. package/dist/types/components/atoms/tttx-loading-spinner/tttx-loading-spinner.stories.d.ts +17 -17
  114. package/dist/types/components/atoms/tttx-qrcode/tttx-qrcode.d.ts +6 -0
  115. package/dist/types/components/atoms/tttx-qrcode/tttx-qrcode.stories.d.ts +23 -0
  116. package/dist/types/components/molecules/tttx-dialog-box/tttx-dialog-box.d.ts +18 -18
  117. package/dist/types/components/molecules/tttx-dialog-box/tttx-dialog-box.stories.d.ts +23 -23
  118. package/dist/types/components/molecules/tttx-filter/tttx-filter.d.ts +41 -41
  119. package/dist/types/components/molecules/tttx-form/lib/setErrorState.d.ts +13 -13
  120. package/dist/types/components/molecules/tttx-form/lib/validityCheck.d.ts +17 -17
  121. package/dist/types/components/molecules/tttx-form/tttx-form.d.ts +133 -133
  122. package/dist/types/components/molecules/tttx-list/tttx-list.d.ts +11 -11
  123. package/dist/types/components/molecules/tttx-sorter/tttx-sorter.d.ts +19 -19
  124. package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.d.ts +69 -69
  125. package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.d.ts +143 -143
  126. package/dist/types/components/molecules/tttx-toolbar/tttx-toolbar.d.ts +4 -4
  127. package/dist/types/components/molecules/tttx-toolbar/tttx-toolbar.stories.d.ts +13 -13
  128. package/dist/types/components/palette.stories.d.ts +6 -6
  129. package/dist/types/components.d.ts +17 -0
  130. package/dist/types/docs/gettingstarted-developer.stories.d.ts +5 -5
  131. package/dist/types/icons.d.ts +2 -2
  132. package/dist/types/index.d.ts +1 -1
  133. package/dist/types/shared/domsanitiser.options.d.ts +10 -10
  134. package/package.json +7 -5
  135. package/readme.md +19 -7
  136. package/dist/tttx/p-0ed6f369.entry.js +0 -1
  137. package/dist/tttx/p-350ddb03.js +0 -3
  138. package/dist/tttx/p-7bba2014.entry.js +0 -1
  139. package/dist/tttx/p-d075a2c0.entry.js +0 -1
  140. package/dist/types/components/molecules/tttx-filter/tttx-filter.stories.d.ts +0 -70
  141. package/dist/types/components/molecules/tttx-form/tttx-form.stories.d.ts +0 -278
  142. package/dist/types/components/molecules/tttx-list/tttx-list.stories.d.ts +0 -14
  143. package/dist/types/components/molecules/tttx-sorter/tttx-sorter.stories.d.ts +0 -30
@@ -0,0 +1,20 @@
1
+ 'use strict';
2
+
3
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
4
+
5
+ function createCommonjsModule(fn, basedir, module) {
6
+ return module = {
7
+ path: basedir,
8
+ exports: {},
9
+ require: function (path, base) {
10
+ return commonjsRequire();
11
+ }
12
+ }, fn(module, module.exports), module.exports;
13
+ }
14
+
15
+ function commonjsRequire () {
16
+ throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
17
+ }
18
+
19
+ exports.commonjsGlobal = commonjsGlobal;
20
+ exports.createCommonjsModule = createCommonjsModule;
@@ -1,27 +1,13 @@
1
1
  'use strict';
2
2
 
3
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
4
-
5
- function createCommonjsModule(fn, basedir, module) {
6
- return module = {
7
- path: basedir,
8
- exports: {},
9
- require: function (path, base) {
10
- return commonjsRequire();
11
- }
12
- }, fn(module, module.exports), module.exports;
13
- }
14
-
15
- function commonjsRequire () {
16
- throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
17
- }
18
-
19
- var purify = createCommonjsModule(function (module, exports) {
3
+ const _commonjsHelpers = require('./_commonjsHelpers-537d719a.js');
4
+
5
+ var purify = _commonjsHelpers.createCommonjsModule(function (module, exports) {
20
6
  /*! @license DOMPurify 3.0.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.3/LICENSE */
21
7
 
22
8
  (function (global, factory) {
23
9
  module.exports = factory() ;
24
- })(commonjsGlobal, (function () {
10
+ })(_commonjsHelpers.commonjsGlobal, (function () {
25
11
  const {
26
12
  entries,
27
13
  setPrototypeOf,
@@ -1649,18 +1635,18 @@ var purify = createCommonjsModule(function (module, exports) {
1649
1635
  //# sourceMappingURL=purify.js.map
1650
1636
  });
1651
1637
 
1652
- function tagRegXp(tagName) {
1653
- return RegExp(/^tttx-/).exec(tagName);
1654
- }
1655
- function attributeNameCheck() {
1656
- return true;
1657
- }
1658
- const domSanitiserOptions = {
1659
- CUSTOM_ELEMENT_HANDLING: {
1660
- tagNameCheck: tagRegXp,
1661
- attributeNameCheck: attributeNameCheck,
1662
- allowCustomizedBuiltInElements: false, // customized built-ins are not allowed
1663
- }
1638
+ function tagRegXp(tagName) {
1639
+ return RegExp(/^tttx-/).exec(tagName);
1640
+ }
1641
+ function attributeNameCheck() {
1642
+ return true;
1643
+ }
1644
+ const domSanitiserOptions = {
1645
+ CUSTOM_ELEMENT_HANDLING: {
1646
+ tagNameCheck: tagRegXp,
1647
+ attributeNameCheck: attributeNameCheck,
1648
+ allowCustomizedBuiltInElements: false, // customized built-ins are not allowed
1649
+ }
1664
1650
  };
1665
1651
 
1666
1652
  exports.domSanitiserOptions = domSanitiserOptions;
@@ -204,6 +204,10 @@ const parsePropertyValue = (propValue, propType) => {
204
204
  // but we'll cheat here and say that the string "false" is the boolean false
205
205
  return propValue === 'false' ? false : propValue === '' || !!propValue;
206
206
  }
207
+ if (propType & 2 /* MEMBER_FLAGS.Number */) {
208
+ // force it to be a number
209
+ return parseFloat(propValue);
210
+ }
207
211
  if (propType & 1 /* MEMBER_FLAGS.String */) {
208
212
  // could have been passed as a number or boolean
209
213
  // but we still want it as a string
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-2ea393bb.js');
5
+ const index = require('./index-1a35850c.js');
6
6
 
7
7
  /*
8
8
  Stencil Client Patch Esm v2.22.3 | MIT Licensed | https://stenciljs.com
@@ -14,7 +14,7 @@ const patchEsm = () => {
14
14
  const defineCustomElements = (win, options) => {
15
15
  if (typeof window === 'undefined') return Promise.resolve();
16
16
  return patchEsm().then(() => {
17
- return index.bootstrapLazy([["tttx-dialog-box.cjs",[[1,"tttx-dialog-box",{"data":[1025],"size":[1],"elementSize":[32]},[[9,"resize","handleResize"]]]]],["tttx-filter.cjs",[[1,"tttx-filter",{"filterKey":[1,"filter-key"],"filterOptions":[1,"filter-options"],"showSelectAll":[4,"show-select-all"],"showSearchField":[4,"show-search-field"],"showOptionIcons":[4,"show-option-icons"],"filterButtonStyle":[1,"filter-button-style"],"filterHeader":[1,"filter-header"],"defaultFilterOptions":[1,"default-filter-options"],"showPopover":[32],"displayedFilterSettings":[32],"selectedFilters":[32],"filterSearchTerm":[32],"allSelected":[32]}]]],["tttx-list.cjs",[[1,"tttx-list",{"data":[1025],"name":[1]}]]],["tttx-sorter.cjs",[[1,"tttx-sorter",{"sorterKey":[1,"sorter-key"],"defaultSortDirection":[1,"default-sort-direction"],"fieldOptionsData":[1,"field-options-data"],"defaultOption":[1,"default-option"],"selectedField":[32],"sortDirection":[32],"dropdownExpand":[32],"dropdownOptions":[32]}]]],["tttx-standalone-input.cjs",[[2,"tttx-standalone-input",{"label":[1],"secondarylabel":[1],"showerrormsg":[4],"showerrorbubble":[4],"errormsg":[1],"iconleft":[1],"iconleftcolor":[1],"iconright":[1],"iconrightcolor":[1],"inputicon":[1],"inputiconcolor":[1],"inline":[4],"inputautocapitalize":[1],"inputautofocus":[4],"inputkeyhint":[1],"inputindex":[8],"inputtitle":[1],"autocomplete":[1],"checked":[4],"disabled":[4],"max":[8],"maxlength":[8],"min":[8],"minlength":[8],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[8],"required":[4],"step":[8],"type":[1],"value":[1032]}]]],["tttx-form.cjs",[[1,"tttx-form",{"formschema":[1032],"data":[1032],"submit":[64]}]]],["tttx-keyvalue-block.cjs",[[1,"tttx-keyvalue-block",{"keyvalues":[8],"horizontal":[4]}]]],["tttx-loading-spinner.cjs",[[1,"tttx-loading-spinner",{"loadingMessage":[1028,"loading-message"],"size":[1025]}]]],["tttx-toolbar.cjs",[[1,"tttx-toolbar",{"border":[4]}]]],["tttx-icon.cjs",[[1,"tttx-icon",{"icon":[1],"color":[1]}]]],["tttx-button.cjs",[[1,"tttx-button",{"notext":[4],"icon":[1],"iconposition":[1],"design":[1]}]]]], options);
17
+ return index.bootstrapLazy([["tttx-dialog-box.cjs",[[1,"tttx-dialog-box",{"data":[1025],"size":[1],"elementSize":[32]},[[9,"resize","handleResize"]]]]],["tttx-filter.cjs",[[1,"tttx-filter",{"filterKey":[1,"filter-key"],"filterOptions":[1,"filter-options"],"showSelectAll":[4,"show-select-all"],"showSearchField":[4,"show-search-field"],"showOptionIcons":[4,"show-option-icons"],"filterButtonStyle":[1,"filter-button-style"],"filterHeader":[1,"filter-header"],"defaultFilterOptions":[1,"default-filter-options"],"showPopover":[32],"displayedFilterSettings":[32],"selectedFilters":[32],"filterSearchTerm":[32],"allSelected":[32]}]]],["tttx-list.cjs",[[1,"tttx-list",{"data":[1025],"name":[1]}]]],["tttx-sorter.cjs",[[1,"tttx-sorter",{"sorterKey":[1,"sorter-key"],"defaultSortDirection":[1,"default-sort-direction"],"fieldOptionsData":[1,"field-options-data"],"defaultOption":[1,"default-option"],"selectedField":[32],"sortDirection":[32],"dropdownExpand":[32],"dropdownOptions":[32]}]]],["tttx-standalone-input.cjs",[[2,"tttx-standalone-input",{"label":[1],"secondarylabel":[1],"showerrormsg":[4],"showerrorbubble":[4],"errormsg":[1],"iconleft":[1],"iconleftcolor":[1],"iconright":[1],"iconrightcolor":[1],"inputicon":[1],"inputiconcolor":[1],"inline":[4],"inputautocapitalize":[1],"inputautofocus":[4],"inputkeyhint":[1],"inputindex":[8],"inputtitle":[1],"autocomplete":[1],"checked":[4],"disabled":[4],"max":[8],"maxlength":[8],"min":[8],"minlength":[8],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[8],"required":[4],"step":[8],"type":[1],"value":[1032]}]]],["tttx-form.cjs",[[1,"tttx-form",{"formschema":[1032],"data":[1032],"submit":[64]}]]],["tttx-keyvalue-block.cjs",[[1,"tttx-keyvalue-block",{"keyvalues":[8],"horizontal":[4]}]]],["tttx-loading-spinner.cjs",[[1,"tttx-loading-spinner",{"loadingMessage":[1028,"loading-message"],"size":[1025]}]]],["tttx-qrcode.cjs",[[0,"tttx-qrcode",{"link":[1025],"size":[1026]}]]],["tttx-toolbar.cjs",[[1,"tttx-toolbar",{"border":[4]}]]],["tttx-icon.cjs",[[1,"tttx-icon",{"icon":[1],"color":[1]}]]],["tttx-button.cjs",[[1,"tttx-button",{"notext":[4],"icon":[1],"iconposition":[1],"design":[1]}]]]], options);
18
18
  });
19
19
  };
20
20
 
@@ -2,33 +2,33 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-2ea393bb.js');
5
+ const index = require('./index-1a35850c.js');
6
6
 
7
7
  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}";
8
8
 
9
- const TttxButton = class {
10
- constructor(hostRef) {
11
- index.registerInstance(this, hostRef);
12
- this._iconcolor = 'black';
13
- this.notext = undefined;
14
- this.icon = undefined;
15
- this.iconposition = 'left';
16
- this.design = 'default';
17
- }
18
- componentWillLoad() {
19
- this._design = this.design;
20
- const designs = ['primary', 'default', 'disabled', 'danger', 'borderless'];
21
- if (!designs.includes(this.design)) {
22
- this._design = 'default';
23
- }
24
- if (this._design === 'primary' || this._design === 'danger') {
25
- this._iconcolor = 'white';
26
- }
27
- }
28
- render() {
29
- return (index.h(index.Host, null, index.h("button", { class: `button ${this._design} ${this.icon ? 'withicon' : ''} ${this.icon && this.iconposition ? 'icon' + this.iconposition : ''} ${this.notext ? 'notext' : ''}` }, this.icon && this.iconposition === 'left' && (index.h("div", { class: "icon-left" }, index.h("tttx-icon", { icon: this.icon, color: this._iconcolor }))), !this.notext && index.h("div", { class: "button-content" }, index.h("slot", null)), this.icon && this.iconposition === 'right' && (index.h("div", { class: "icon-right" }, index.h("tttx-icon", { icon: this.icon, color: this._iconcolor }))))));
30
- }
31
- };
9
+ const TttxButton = class {
10
+ constructor(hostRef) {
11
+ index.registerInstance(this, hostRef);
12
+ this._iconcolor = 'black';
13
+ this.notext = undefined;
14
+ this.icon = undefined;
15
+ this.iconposition = 'left';
16
+ this.design = 'default';
17
+ }
18
+ componentWillLoad() {
19
+ this._design = this.design;
20
+ const designs = ['primary', 'default', 'disabled', 'danger', 'borderless'];
21
+ if (!designs.includes(this.design)) {
22
+ this._design = 'default';
23
+ }
24
+ if (this._design === 'primary' || this._design === 'danger') {
25
+ this._iconcolor = 'white';
26
+ }
27
+ }
28
+ render() {
29
+ return (index.h(index.Host, null, index.h("button", { class: `button ${this._design} ${this.icon ? 'withicon' : ''} ${this.icon && this.iconposition ? 'icon' + this.iconposition : ''} ${this.notext ? 'notext' : ''}` }, this.icon && this.iconposition === 'left' && (index.h("div", { class: "icon-left" }, index.h("tttx-icon", { icon: this.icon, color: this._iconcolor }))), !this.notext && index.h("div", { class: "button-content" }, index.h("slot", null)), this.icon && this.iconposition === 'right' && (index.h("div", { class: "icon-right" }, index.h("tttx-icon", { icon: this.icon, color: this._iconcolor }))))));
30
+ }
31
+ };
32
32
  TttxButton.style = tttxButtonCss;
33
33
 
34
34
  exports.tttx_button = TttxButton;
@@ -2,79 +2,80 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-2ea393bb.js');
6
- const domsanitiser_options = require('./domsanitiser.options-975e3317.js');
5
+ const index = require('./index-1a35850c.js');
6
+ const domsanitiser_options = require('./domsanitiser.options-b2d88e35.js');
7
+ require('./_commonjsHelpers-537d719a.js');
7
8
 
8
9
  const tttxDialogBoxCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}.material-symbols-rounded{font-family:\"Material Symbols Rounded\", sans-serif;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;color:#9e9e9e}h3{margin-block-start:0em;margin-block-end:0em}.dialog-box{background-color:#ffffff;display:flex;flex-direction:column;border:1px solid #d5d5d5;border-radius:4px;box-shadow:0px 1px 5px #1111114d}.dialog-box.small{width:400px;min-height:200px;max-height:500px}.dialog-box.regular{width:600px;min-height:200px;max-height:500px}.dialog-box.large{width:900px;min-height:200px;max-height:500px}.dialog-box.mobile{max-width:424px;max-height:510px}.dialog-box-clickable{cursor:pointer}.dialog-box-padding{padding:8px 16px}.dialog-box-align-right{margin-left:auto;display:flex}.dialog-box-header-box{border-bottom:1px solid #d5d5d5;display:flex;flex-direction:row;height:36px}.dialog-box-header{display:flex;align-items:center;width:100%}.dialog-box-title{font-size:18;font-weight:600;font-family:\"Roboto\", serif}.dialog-box-icon{padding-right:8px;width:24px;height:24px}.dialog-box-icon-close{margin-left:auto;padding-top:3px;width:24px;height:24px}.dialog-box-content{font-size:16;font-weight:400;font-family:\"Roboto\", serif}.dialog-box-body-box{padding:16px}.dialog-box-footer-box{display:flex;flex-direction:row;margin-top:auto;border-top:1px solid #d5d5d5;height:36px}.dialog-box-footer{display:flex;align-items:center;width:100%}.dialog-box-spacing-button{margin-right:8px}.dialog-box-header-box.info{border-bottom:1px solid #1479c6}.dialog-box-header-box.success{border-bottom:1px solid #a2bb31}.dialog-box-header-box.warning{border-bottom:1px solid #f59500}.dialog-box-header-box.critical{border-bottom:1px solid #dc0000}";
9
10
 
10
- const TttxDialogBox = class {
11
- constructor(hostRef) {
12
- index.registerInstance(this, hostRef);
13
- this.closeButtonClick = index.createEvent(this, "closeButtonClick", 6);
14
- this.buttonClick = index.createEvent(this, "buttonClick", 7);
15
- this.data = undefined;
16
- this.size = 'regular';
17
- this.elementSize = undefined;
18
- }
19
- handleResize() {
20
- if (window.innerWidth < 698) {
21
- this.elementSize = 'mobile';
22
- }
23
- else {
24
- this.elementSize = this.size;
25
- }
26
- }
27
- onCloseClickHandler() {
28
- this.closeButtonClick.emit({ close: true });
29
- }
30
- onButtonClickHandler(index) {
31
- this.buttonClick.emit({ buttonNumber: index, buttonClicked: true });
32
- }
33
- renderHeader(header) {
34
- const title = header.title;
35
- const iconName = header.iconName;
36
- const iconColor = header.iconColor;
37
- const iconEnabled = header.hasIcon ? true : false;
38
- const closeEnabled = header.hasClose ? true : false;
39
- return (index.h("div", { class: "dialog-box-header" }, iconEnabled && index.h("tttx-icon", { class: "dialog-box-icon", icon: iconName, color: iconColor }), index.h("h3", { class: "dialog-box-title" }, title), closeEnabled && (index.h("div", { class: "dialog-box-align-right close-button", onClick: () => this.onCloseClickHandler() }, index.h("tttx-icon", { class: "dialog-box-icon-close dialog-box-clickable", icon: "close", color: "black" })))));
40
- }
41
- renderContent(content) {
42
- if (content.isCustomHtml) {
43
- const cleanHTML = domsanitiser_options.purify.sanitize(content.customHtml, domsanitiser_options.domSanitiserOptions);
44
- return (index.h("div", { class: "dialog-box-body" }, index.h("div", { innerHTML: cleanHTML })));
45
- }
46
- else {
47
- return (index.h("div", { class: "dialog-box-body" }, index.h("span", { class: "dialog-box-content" }, content.contentText)));
48
- }
49
- }
50
- renderFooter(footer) {
51
- const button = footer.buttons;
52
- const button1Enabled = button.length > 0;
53
- const button2Enabled = button.length > 1;
54
- const button3Enabled = button.length == 3;
55
- const isMobile = this.elementSize === 'mobile';
56
- return (index.h("div", { class: "dialog-box-footer" }, index.h("div", { class: "dialog-box-align-right" }, button3Enabled && (index.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 && (index.h("tttx-button", { class: "dialog-box-spacing-button", onClick: () => this.onButtonClickHandler(2), design: button[1].type, icon: button[1].icon }, button[1].name)), button1Enabled && (index.h("tttx-button", { onClick: () => this.onButtonClickHandler(1), design: button[0].type, icon: button[0].icon }, button[0].name)))));
57
- }
58
- componentWillLoad() {
59
- if (window.innerWidth < 698) {
60
- this.elementSize = 'mobile';
61
- }
62
- else {
63
- this.elementSize = this.size;
64
- }
65
- }
66
- render() {
67
- if (!this.data)
68
- return;
69
- if (typeof this.data === 'string') {
70
- this._data = JSON.parse(this.data);
71
- }
72
- else {
73
- this._data = this.data;
74
- }
75
- return (index.h("div", { class: `dialog-box ${this.elementSize}` }, index.h("div", { class: `dialog-box-padding dialog-box-header-box ${this._data.type || ''}` }, this.renderHeader(this._data.header)), index.h("div", { class: "dialog-box-padding dialog-box-body-box" }, this.renderContent(this._data.body)), index.h("div", { class: "dialog-box-padding dialog-box-footer-box" }, this.renderFooter(this._data.footer))));
76
- }
77
- };
11
+ const TttxDialogBox = class {
12
+ constructor(hostRef) {
13
+ index.registerInstance(this, hostRef);
14
+ this.closeButtonClick = index.createEvent(this, "closeButtonClick", 6);
15
+ this.buttonClick = index.createEvent(this, "buttonClick", 7);
16
+ this.data = undefined;
17
+ this.size = 'regular';
18
+ this.elementSize = undefined;
19
+ }
20
+ handleResize() {
21
+ if (window.innerWidth < 698) {
22
+ this.elementSize = 'mobile';
23
+ }
24
+ else {
25
+ this.elementSize = this.size;
26
+ }
27
+ }
28
+ onCloseClickHandler() {
29
+ this.closeButtonClick.emit({ close: true });
30
+ }
31
+ onButtonClickHandler(index) {
32
+ this.buttonClick.emit({ buttonNumber: index, buttonClicked: true });
33
+ }
34
+ renderHeader(header) {
35
+ const title = header.title;
36
+ const iconName = header.iconName;
37
+ const iconColor = header.iconColor;
38
+ const iconEnabled = header.hasIcon ? true : false;
39
+ const closeEnabled = header.hasClose ? true : false;
40
+ return (index.h("div", { class: "dialog-box-header" }, iconEnabled && index.h("tttx-icon", { class: "dialog-box-icon", icon: iconName, color: iconColor }), index.h("h3", { class: "dialog-box-title" }, title), closeEnabled && (index.h("div", { class: "dialog-box-align-right close-button", onClick: () => this.onCloseClickHandler() }, index.h("tttx-icon", { class: "dialog-box-icon-close dialog-box-clickable", icon: "close", color: "black" })))));
41
+ }
42
+ renderContent(content) {
43
+ if (content.isCustomHtml) {
44
+ const cleanHTML = domsanitiser_options.purify.sanitize(content.customHtml, domsanitiser_options.domSanitiserOptions);
45
+ return (index.h("div", { class: "dialog-box-body" }, index.h("div", { innerHTML: cleanHTML })));
46
+ }
47
+ else {
48
+ return (index.h("div", { class: "dialog-box-body" }, index.h("span", { class: "dialog-box-content" }, content.contentText)));
49
+ }
50
+ }
51
+ renderFooter(footer) {
52
+ const button = footer.buttons;
53
+ const button1Enabled = button.length > 0;
54
+ const button2Enabled = button.length > 1;
55
+ const button3Enabled = button.length == 3;
56
+ const isMobile = this.elementSize === 'mobile';
57
+ return (index.h("div", { class: "dialog-box-footer" }, index.h("div", { class: "dialog-box-align-right" }, button3Enabled && (index.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 && (index.h("tttx-button", { class: "dialog-box-spacing-button", onClick: () => this.onButtonClickHandler(2), design: button[1].type, icon: button[1].icon }, button[1].name)), button1Enabled && (index.h("tttx-button", { onClick: () => this.onButtonClickHandler(1), design: button[0].type, icon: button[0].icon }, button[0].name)))));
58
+ }
59
+ componentWillLoad() {
60
+ if (window.innerWidth < 698) {
61
+ this.elementSize = 'mobile';
62
+ }
63
+ else {
64
+ this.elementSize = this.size;
65
+ }
66
+ }
67
+ render() {
68
+ if (!this.data)
69
+ return;
70
+ if (typeof this.data === 'string') {
71
+ this._data = JSON.parse(this.data);
72
+ }
73
+ else {
74
+ this._data = this.data;
75
+ }
76
+ return (index.h("div", { class: `dialog-box ${this.elementSize}` }, index.h("div", { class: `dialog-box-padding dialog-box-header-box ${this._data.type || ''}` }, this.renderHeader(this._data.header)), index.h("div", { class: "dialog-box-padding dialog-box-body-box" }, this.renderContent(this._data.body)), index.h("div", { class: "dialog-box-padding dialog-box-footer-box" }, this.renderFooter(this._data.footer))));
77
+ }
78
+ };
78
79
  TttxDialogBox.style = tttxDialogBoxCss;
79
80
 
80
81
  exports.tttx_dialog_box = TttxDialogBox;