@3t-transform/threeteeui 1.4.1 → 1.4.2

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 (209) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/{tttx-button_1_4_1.cjs.entry.js → tttx-button_1_4_2.cjs.entry.js} +2 -2
  3. package/dist/cjs/{tttx-checkbox-group-caption_1_4_1.cjs.entry.js → tttx-checkbox-group-caption_1_4_2.cjs.entry.js} +1 -1
  4. package/dist/cjs/{tttx-checkbox-group-heading_1_4_1.cjs.entry.js → tttx-checkbox-group-heading_1_4_2.cjs.entry.js} +1 -1
  5. package/dist/cjs/{tttx-checkbox-group_1_4_1.cjs.entry.js → tttx-checkbox-group_1_4_2.cjs.entry.js} +1 -1
  6. package/dist/cjs/{tttx-checkbox_1_4_1.cjs.entry.js → tttx-checkbox_1_4_2.cjs.entry.js} +2 -2
  7. package/dist/cjs/{tttx-data-pattern_1_4_1.cjs.entry.js → tttx-data-pattern_1_4_2.cjs.entry.js} +2 -2
  8. package/dist/cjs/{tttx-dialog-box_1_4_1.cjs.entry.js → tttx-dialog-box_1_4_2.cjs.entry.js} +3 -3
  9. package/dist/cjs/{tttx-dialog_1_4_1.cjs.entry.js → tttx-dialog_1_4_2.cjs.entry.js} +2 -2
  10. package/dist/cjs/{tttx-expander_1_4_1.cjs.entry.js → tttx-expander_1_4_2.cjs.entry.js} +2 -2
  11. package/dist/cjs/{tttx-filter_1_4_1_4.cjs.entry.js → tttx-filter_1_4_2_4.cjs.entry.js} +9 -9
  12. package/dist/cjs/{tttx-form_1_4_1.cjs.entry.js → tttx-form_1_4_2.cjs.entry.js} +2 -2
  13. package/dist/cjs/{tttx-icon_1_4_1.cjs.entry.js → tttx-icon_1_4_2.cjs.entry.js} +1 -1
  14. package/dist/cjs/{tttx-keyvalue-block_1_4_1.cjs.entry.js → tttx-keyvalue-block_1_4_2.cjs.entry.js} +1 -1
  15. package/dist/cjs/{tttx-loading-spinner_1_4_1.cjs.entry.js → tttx-loading-spinner_1_4_2.cjs.entry.js} +1 -1
  16. package/dist/cjs/{tttx-multiselect-box_1_4_1.cjs.entry.js → tttx-multiselect-box_1_4_2.cjs.entry.js} +6 -6
  17. package/dist/cjs/{tttx-percentage-bar_1_4_1.cjs.entry.js → tttx-percentage-bar_1_4_2.cjs.entry.js} +2 -2
  18. package/dist/cjs/{tttx-qrcode_1_4_1.cjs.entry.js → tttx-qrcode_1_4_2.cjs.entry.js} +1 -1
  19. package/dist/cjs/{tttx-select-box_1_4_1.cjs.entry.js → tttx-select-box_1_4_2.cjs.entry.js} +34 -23
  20. package/dist/cjs/tttx-standalone-input_1_4_2.cjs.entry.js +94 -0
  21. package/dist/cjs/{tttx-tabs_1_4_1.cjs.entry.js → tttx-tabs_1_4_2.cjs.entry.js} +4 -4
  22. package/dist/cjs/{tttx-tag_1_4_1.cjs.entry.js → tttx-tag_1_4_2.cjs.entry.js} +1 -1
  23. package/dist/cjs/{tttx-textarea_1_4_1.cjs.entry.js → tttx-textarea_1_4_2.cjs.entry.js} +2 -2
  24. package/dist/cjs/{tttx-tree-view_1_4_1.cjs.entry.js → tttx-tree-view_1_4_2.cjs.entry.js} +3 -3
  25. package/dist/cjs/tttx.cjs.js +1 -1
  26. package/dist/collection/components/atoms/tttx-button/tttx-button.js +2 -2
  27. package/dist/collection/components/atoms/tttx-button/tttx-button.stories.js +20 -20
  28. package/dist/collection/components/atoms/tttx-checkbox/tttx-checkbox.js +2 -2
  29. package/dist/collection/components/atoms/tttx-checkbox/tttx-checkbox.stories.js +1 -1
  30. package/dist/collection/components/atoms/tttx-icon/tttx-icon.js +1 -1
  31. package/dist/collection/components/atoms/tttx-icon/tttx-icon.stories.js +1 -1
  32. package/dist/collection/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.js +1 -1
  33. package/dist/collection/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.stories.js +6 -6
  34. package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.js +1 -1
  35. package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.stories.js +1 -1
  36. package/dist/collection/components/atoms/tttx-percentage-bar/tttx-percentage-bar.js +1 -1
  37. package/dist/collection/components/atoms/tttx-percentage-bar/tttx-percentage-bar.stories.js +5 -5
  38. package/dist/collection/components/atoms/tttx-qrcode/tttx-qrcode.js +1 -1
  39. package/dist/collection/components/atoms/tttx-qrcode/tttx-qrcode.stories.js +1 -1
  40. package/dist/collection/components/atoms/tttx-tag/tttx-tag.js +1 -1
  41. package/dist/collection/components/atoms/tttx-tag/tttx-tag.stories.js +6 -6
  42. package/dist/collection/components/molecules/tttx-checkbox-group/components/tttx-checkbox-group-caption.js +1 -1
  43. package/dist/collection/components/molecules/tttx-checkbox-group/components/tttx-checkbox-group-heading.js +1 -1
  44. package/dist/collection/components/molecules/tttx-checkbox-group/tttx-checkbox-group.js +1 -1
  45. package/dist/collection/components/molecules/tttx-checkbox-group/tttx-checkbox-group.stories.js +10 -10
  46. package/dist/collection/components/molecules/tttx-dialog/tttx-dialog.js +2 -2
  47. package/dist/collection/components/molecules/tttx-dialog/tttx-dialog.stories.js +6 -6
  48. package/dist/collection/components/molecules/tttx-dialog-box/tttx-dialog-box.js +3 -3
  49. package/dist/collection/components/molecules/tttx-dialog-box/tttx-dialog-box.stories.js +24 -24
  50. package/dist/collection/components/molecules/tttx-expander/tttx-expander.js +2 -2
  51. package/dist/collection/components/molecules/tttx-expander/tttx-expander.stories.js +9 -9
  52. package/dist/collection/components/molecules/tttx-filter/tttx-filter.js +3 -3
  53. package/dist/collection/components/molecules/tttx-filter/tttx-filter.stories.js +2 -2
  54. package/dist/collection/components/molecules/tttx-form/tttx-form.js +2 -2
  55. package/dist/collection/components/molecules/tttx-form/tttx-form.stories.js +5 -5
  56. package/dist/collection/components/molecules/tttx-list/tttx-list.js +3 -3
  57. package/dist/collection/components/molecules/tttx-list/tttx-list.stories.js +46 -46
  58. package/dist/collection/components/molecules/tttx-multiselect-box/tttx-multiselect-box.js +6 -6
  59. package/dist/collection/components/molecules/tttx-multiselect-box/tttx-multiselect-box.stories.js +33 -33
  60. package/dist/collection/components/molecules/tttx-select-box/tttx-select-box.css +28 -1
  61. package/dist/collection/components/molecules/tttx-select-box/tttx-select-box.js +85 -22
  62. package/dist/collection/components/molecules/tttx-select-box/tttx-select-box.stories.js +33 -16
  63. package/dist/collection/components/molecules/tttx-sorter/tttx-sorter.js +2 -2
  64. package/dist/collection/components/molecules/tttx-sorter/tttx-sorter.stories.js +1 -1
  65. package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.js +4 -4
  66. package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.js +1 -1
  67. package/dist/collection/components/molecules/tttx-tabs/tttx-tabs.js +3 -3
  68. package/dist/collection/components/molecules/tttx-tabs/tttx-tabs.stories.js +4 -4
  69. package/dist/collection/components/molecules/tttx-textarea/tttx-textarea.js +3 -3
  70. package/dist/collection/components/molecules/tttx-textarea/tttx-textarea.stories.js +1 -1
  71. package/dist/collection/components/molecules/tttx-toolbar/tttx-toolbar.js +1 -1
  72. package/dist/collection/components/molecules/tttx-toolbar/tttx-toolbar.stories.js +37 -37
  73. package/dist/collection/components/molecules/tttx-tree-view/tttx-tree-view.js +3 -3
  74. package/dist/collection/components/molecules/tttx-tree-view/tttx-tree-view.stories.js +8 -8
  75. package/dist/collection/components/organisms/tttx-data-pattern/tttx-data-pattern.js +2 -2
  76. package/dist/collection/components/organisms/tttx-data-pattern/tttx-data-pattern.stories.js +5 -5
  77. package/dist/components/index.d.ts +26 -26
  78. package/dist/components/index.js +26 -26
  79. package/dist/components/tttx-button.js +5 -5
  80. package/dist/components/{tttx-button_1_4_1.d.ts → tttx-button_1_4_2.d.ts} +4 -4
  81. package/dist/components/{tttx-button_1_4_1.js → tttx-button_1_4_2.js} +2 -2
  82. package/dist/components/tttx-checkbox-group-caption_1_4_2.d.ts +11 -0
  83. package/dist/components/{tttx-checkbox-group-caption_1_4_1.js → tttx-checkbox-group-caption_1_4_2.js} +5 -5
  84. package/dist/components/tttx-checkbox-group-heading_1_4_2.d.ts +11 -0
  85. package/dist/components/{tttx-checkbox-group-heading_1_4_1.js → tttx-checkbox-group-heading_1_4_2.js} +5 -5
  86. package/dist/components/tttx-checkbox-group_1_4_2.d.ts +11 -0
  87. package/dist/components/{tttx-checkbox-group_1_4_1.js → tttx-checkbox-group_1_4_2.js} +5 -5
  88. package/dist/components/{tttx-expander_1_4_1.d.ts → tttx-checkbox_1_4_2.d.ts} +4 -4
  89. package/dist/components/{tttx-checkbox_1_4_1.js → tttx-checkbox_1_4_2.js} +7 -7
  90. package/dist/components/tttx-data-pattern_1_4_2.d.ts +11 -0
  91. package/dist/components/{tttx-data-pattern_1_4_1.js → tttx-data-pattern_1_4_2.js} +13 -13
  92. package/dist/components/{tttx-dialog-box_1_4_1.d.ts → tttx-dialog-box_1_4_2.d.ts} +4 -4
  93. package/dist/components/{tttx-dialog-box_1_4_1.js → tttx-dialog-box_1_4_2.js} +9 -9
  94. package/dist/components/{tttx-filter_1_4_1.d.ts → tttx-dialog_1_4_2.d.ts} +4 -4
  95. package/dist/components/{tttx-dialog_1_4_1.js → tttx-dialog_1_4_2.js} +8 -8
  96. package/dist/components/{tttx-checkbox_1_4_1.d.ts → tttx-expander_1_4_2.d.ts} +4 -4
  97. package/dist/components/{tttx-expander_1_4_1.js → tttx-expander_1_4_2.js} +7 -7
  98. package/dist/components/tttx-filter.js +6 -6
  99. package/dist/components/{tttx-qrcode_1_4_1.d.ts → tttx-filter_1_4_2.d.ts} +4 -4
  100. package/dist/components/{tttx-filter_1_4_1.js → tttx-filter_1_4_2.js} +2 -2
  101. package/dist/components/{tttx-icon_1_4_1.d.ts → tttx-form_1_4_2.d.ts} +4 -4
  102. package/dist/components/{tttx-form_1_4_1.js → tttx-form_1_4_2.js} +9 -9
  103. package/dist/components/tttx-icon.js +3 -3
  104. package/dist/components/{tttx-list_1_4_1.d.ts → tttx-icon_1_4_2.d.ts} +4 -4
  105. package/dist/components/{tttx-icon_1_4_1.js → tttx-icon_1_4_2.js} +2 -2
  106. package/dist/components/tttx-keyvalue-block_1_4_2.d.ts +11 -0
  107. package/dist/components/{tttx-keyvalue-block_1_4_1.js → tttx-keyvalue-block_1_4_2.js} +5 -5
  108. package/dist/components/tttx-list.js +6 -6
  109. package/dist/components/{tttx-form_1_4_1.d.ts → tttx-list_1_4_2.d.ts} +4 -4
  110. package/dist/components/{tttx-list_1_4_1.js → tttx-list_1_4_2.js} +2 -2
  111. package/dist/components/tttx-loading-spinner_1_4_2.d.ts +11 -0
  112. package/dist/components/{tttx-loading-spinner_1_4_1.js → tttx-loading-spinner_1_4_2.js} +5 -5
  113. package/dist/components/tttx-multiselect-box_1_4_2.d.ts +11 -0
  114. package/dist/components/{tttx-multiselect-box_1_4_1.js → tttx-multiselect-box_1_4_2.js} +13 -13
  115. package/dist/components/tttx-percentage-bar_1_4_2.d.ts +11 -0
  116. package/dist/components/{tttx-percentage-bar_1_4_1.js → tttx-percentage-bar_1_4_2.js} +6 -6
  117. package/dist/components/{tttx-dialog_1_4_1.d.ts → tttx-qrcode_1_4_2.d.ts} +4 -4
  118. package/dist/components/{tttx-qrcode_1_4_1.js → tttx-qrcode_1_4_2.js} +5 -5
  119. package/dist/components/tttx-select-box.js +41 -27
  120. package/dist/components/tttx-select-box_1_4_2.d.ts +11 -0
  121. package/dist/components/{tttx-select-box_1_4_1.js → tttx-select-box_1_4_2.js} +2 -2
  122. package/dist/components/tttx-sorter.js +5 -5
  123. package/dist/components/tttx-sorter_1_4_2.d.ts +11 -0
  124. package/dist/components/{tttx-sorter_1_4_1.js → tttx-sorter_1_4_2.js} +2 -2
  125. package/dist/components/tttx-standalone-input.js +6 -6
  126. package/dist/components/tttx-standalone-input_1_4_2.d.ts +11 -0
  127. package/dist/components/{tttx-standalone-input_1_4_1.js → tttx-standalone-input_1_4_2.js} +2 -2
  128. package/dist/components/{tttx-tabs_1_4_1.d.ts → tttx-tabs_1_4_2.d.ts} +4 -4
  129. package/dist/components/{tttx-tabs_1_4_1.js → tttx-tabs_1_4_2.js} +9 -9
  130. package/dist/components/{tttx-tag_1_4_1.d.ts → tttx-tag_1_4_2.d.ts} +4 -4
  131. package/dist/components/{tttx-tag_1_4_1.js → tttx-tag_1_4_2.js} +5 -5
  132. package/dist/components/tttx-textarea_1_4_2.d.ts +11 -0
  133. package/dist/components/{tttx-textarea_1_4_1.js → tttx-textarea_1_4_2.js} +6 -6
  134. package/dist/components/tttx-toolbar.js +3 -3
  135. package/dist/components/{tttx-toolbar_1_4_1.d.ts → tttx-toolbar_1_4_2.d.ts} +4 -4
  136. package/dist/components/{tttx-toolbar_1_4_1.js → tttx-toolbar_1_4_2.js} +2 -2
  137. package/dist/components/tttx-tree-view_1_4_2.d.ts +11 -0
  138. package/dist/components/{tttx-tree-view_1_4_1.js → tttx-tree-view_1_4_2.js} +9 -9
  139. package/dist/esm/loader.js +1 -1
  140. package/dist/esm/{tttx-button_1_4_1.entry.js → tttx-button_1_4_2.entry.js} +2 -2
  141. package/dist/esm/{tttx-checkbox-group-caption_1_4_1.entry.js → tttx-checkbox-group-caption_1_4_2.entry.js} +1 -1
  142. package/dist/esm/{tttx-checkbox-group-heading_1_4_1.entry.js → tttx-checkbox-group-heading_1_4_2.entry.js} +1 -1
  143. package/dist/esm/{tttx-checkbox-group_1_4_1.entry.js → tttx-checkbox-group_1_4_2.entry.js} +1 -1
  144. package/dist/esm/{tttx-checkbox_1_4_1.entry.js → tttx-checkbox_1_4_2.entry.js} +2 -2
  145. package/dist/esm/{tttx-data-pattern_1_4_1.entry.js → tttx-data-pattern_1_4_2.entry.js} +2 -2
  146. package/dist/esm/{tttx-dialog-box_1_4_1.entry.js → tttx-dialog-box_1_4_2.entry.js} +3 -3
  147. package/dist/esm/{tttx-dialog_1_4_1.entry.js → tttx-dialog_1_4_2.entry.js} +2 -2
  148. package/dist/esm/{tttx-expander_1_4_1.entry.js → tttx-expander_1_4_2.entry.js} +2 -2
  149. package/dist/esm/{tttx-filter_1_4_1_4.entry.js → tttx-filter_1_4_2_4.entry.js} +6 -6
  150. package/dist/esm/{tttx-form_1_4_1.entry.js → tttx-form_1_4_2.entry.js} +2 -2
  151. package/dist/esm/{tttx-icon_1_4_1.entry.js → tttx-icon_1_4_2.entry.js} +1 -1
  152. package/dist/esm/{tttx-keyvalue-block_1_4_1.entry.js → tttx-keyvalue-block_1_4_2.entry.js} +1 -1
  153. package/dist/esm/{tttx-loading-spinner_1_4_1.entry.js → tttx-loading-spinner_1_4_2.entry.js} +1 -1
  154. package/dist/esm/{tttx-multiselect-box_1_4_1.entry.js → tttx-multiselect-box_1_4_2.entry.js} +6 -6
  155. package/dist/esm/{tttx-percentage-bar_1_4_1.entry.js → tttx-percentage-bar_1_4_2.entry.js} +2 -2
  156. package/dist/esm/{tttx-qrcode_1_4_1.entry.js → tttx-qrcode_1_4_2.entry.js} +1 -1
  157. package/dist/esm/{tttx-select-box_1_4_1.entry.js → tttx-select-box_1_4_2.entry.js} +34 -23
  158. package/dist/esm/tttx-standalone-input_1_4_2.entry.js +90 -0
  159. package/dist/esm/{tttx-tabs_1_4_1.entry.js → tttx-tabs_1_4_2.entry.js} +4 -4
  160. package/dist/esm/{tttx-tag_1_4_1.entry.js → tttx-tag_1_4_2.entry.js} +1 -1
  161. package/dist/esm/{tttx-textarea_1_4_1.entry.js → tttx-textarea_1_4_2.entry.js} +2 -2
  162. package/dist/esm/{tttx-tree-view_1_4_1.entry.js → tttx-tree-view_1_4_2.entry.js} +3 -3
  163. package/dist/esm/tttx.js +1 -1
  164. package/dist/tttx/p-0e515960.entry.js +1 -1
  165. package/dist/tttx/p-1e5ff5f8.entry.js +1 -1
  166. package/dist/tttx/p-23f45005.entry.js +1 -1
  167. package/dist/tttx/p-3676cddd.entry.js +1 -1
  168. package/dist/tttx/p-56c8c353.entry.js +1 -1
  169. package/dist/tttx/p-59c7b049.entry.js +1 -1
  170. package/dist/tttx/p-5d2706b1.entry.js +1 -1
  171. package/dist/tttx/p-63ad6fb7.entry.js +1 -1
  172. package/dist/tttx/p-6b1c7a21.entry.js +1 -1
  173. package/dist/tttx/p-6deb8699.entry.js +1 -1
  174. package/dist/tttx/p-7077c8ed.entry.js +1 -0
  175. package/dist/tttx/p-796f699a.entry.js +1 -1
  176. package/dist/tttx/p-884f37d3.entry.js +1 -1
  177. package/dist/tttx/p-8b0b95b7.entry.js +1 -1
  178. package/dist/tttx/p-9434561e.entry.js +1 -1
  179. package/dist/tttx/p-983d63ff.entry.js +1 -1
  180. package/dist/tttx/p-a01e679a.entry.js +1 -1
  181. package/dist/tttx/p-a8e76e78.entry.js +1 -1
  182. package/dist/tttx/p-c08a54f9.entry.js +1 -1
  183. package/dist/tttx/p-c170e3b8.entry.js +1 -1
  184. package/dist/tttx/p-ee358ce4.entry.js +1 -1
  185. package/dist/tttx/p-f374e293.entry.js +1 -1
  186. package/dist/tttx/p-f4db1cf2.entry.js +1 -1
  187. package/dist/tttx/tttx.esm.js +1 -1
  188. package/dist/types/components/molecules/tttx-select-box/tttx-select-box.d.ts +6 -3
  189. package/dist/types/components/molecules/tttx-select-box/tttx-select-box.stories.d.ts +17 -0
  190. package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.d.ts +2 -2
  191. package/dist/types/components/molecules/tttx-textarea/tttx-textarea.d.ts +2 -2
  192. package/dist/types/components.d.ts +310 -304
  193. package/package.json +1 -1
  194. package/dist/cjs/tttx-standalone-input_1_4_1.cjs.entry.js +0 -94
  195. package/dist/components/tttx-checkbox-group-caption_1_4_1.d.ts +0 -11
  196. package/dist/components/tttx-checkbox-group-heading_1_4_1.d.ts +0 -11
  197. package/dist/components/tttx-checkbox-group_1_4_1.d.ts +0 -11
  198. package/dist/components/tttx-data-pattern_1_4_1.d.ts +0 -11
  199. package/dist/components/tttx-keyvalue-block_1_4_1.d.ts +0 -11
  200. package/dist/components/tttx-loading-spinner_1_4_1.d.ts +0 -11
  201. package/dist/components/tttx-multiselect-box_1_4_1.d.ts +0 -11
  202. package/dist/components/tttx-percentage-bar_1_4_1.d.ts +0 -11
  203. package/dist/components/tttx-select-box_1_4_1.d.ts +0 -11
  204. package/dist/components/tttx-sorter_1_4_1.d.ts +0 -11
  205. package/dist/components/tttx-standalone-input_1_4_1.d.ts +0 -11
  206. package/dist/components/tttx-textarea_1_4_1.d.ts +0 -11
  207. package/dist/components/tttx-tree-view_1_4_1.d.ts +0 -11
  208. package/dist/esm/tttx-standalone-input_1_4_1.entry.js +0 -90
  209. package/dist/tttx/p-81aaafa0.entry.js +0 -1
@@ -78,11 +78,11 @@ export class TttxMultiselectBox {
78
78
  const sanitisedHTML = DOMPurify.sanitize(option.html, domSanitiserOptions);
79
79
  // This is tested in e2e tests
80
80
  /* istanbul ignore next */
81
- return (h("div", { class: `dropdown-option ${hideOption ? 'hidden' : ''} ${option.selected ? 'selected' : ''}`, onClick: this.onItemSelected.bind(this, option), key: option.label }, h("tttx-icon_1_4_1", { icon: checkboxIcon, color: checkboxColor, class: 'checkbox-icon' }), h("div", { innerHTML: sanitisedHTML })));
81
+ return (h("div", { class: `dropdown-option ${hideOption ? 'hidden' : ''} ${option.selected ? 'selected' : ''}`, onClick: this.onItemSelected.bind(this, option), key: option.label }, h("tttx-icon_1_4_2", { icon: checkboxIcon, color: checkboxColor, class: 'checkbox-icon' }), h("div", { innerHTML: sanitisedHTML })));
82
82
  }
83
83
  // This is tested in e2e tests
84
84
  /* istanbul ignore next */
85
- return (h("div", { class: `dropdown-option ${hideOption ? 'hidden' : ''} ${option.selected ? 'selected' : ''}`, onClick: this.onItemSelected.bind(this, option), key: option.label }, h("tttx-icon_1_4_1", { icon: checkboxIcon, color: checkboxColor, class: 'checkbox-icon' }), h("div", { class: "plaintext-option" }, option.label)));
85
+ return (h("div", { class: `dropdown-option ${hideOption ? 'hidden' : ''} ${option.selected ? 'selected' : ''}`, onClick: this.onItemSelected.bind(this, option), key: option.label }, h("tttx-icon_1_4_2", { icon: checkboxIcon, color: checkboxColor, class: 'checkbox-icon' }), h("div", { class: "plaintext-option" }, option.label)));
86
86
  }
87
87
  // This is tested in e2e tests
88
88
  /* istanbul ignore next */
@@ -114,13 +114,13 @@ export class TttxMultiselectBox {
114
114
  if (!this.unsavedSelectedItems)
115
115
  this.unsavedSelectedItems = this.safelyCloneArray(this._optionsData);
116
116
  const chevronIcon = this.open ? 'expand_less' : 'expand_more';
117
- return (h(Host, { class: this.inline ? 'inline' : 'block' }, this.label && h("div", { class: "label" }, this.label), h("div", { tabindex: "0", class: "dropdown-container" }, h("div", { class: "dropdown-selector", onClick: this.onDropdownClicked.bind(this) }, this.dropdownSelectorContent(), h("div", { class: "dropdown-selector-chevron" }, h("tttx-icon_1_4_1", { icon: chevronIcon, color: "black" }))), this.open && (h("div", { class: "dropdown-body-container" }, h("div", { class: "dropdown-body", style: Object.assign({}, this.bodyOffset) }, this.searchEnabled &&
117
+ return (h(Host, { class: this.inline ? 'inline' : 'block' }, this.label && h("div", { class: "label" }, this.label), h("div", { tabindex: "0", class: "dropdown-container" }, h("div", { class: "dropdown-selector", onClick: this.onDropdownClicked.bind(this) }, this.dropdownSelectorContent(), h("div", { class: "dropdown-selector-chevron" }, h("tttx-icon_1_4_2", { icon: chevronIcon, color: "black" }))), this.open && (h("div", { class: "dropdown-body-container" }, h("div", { class: "dropdown-body", style: Object.assign({}, this.bodyOffset) }, this.searchEnabled &&
118
118
  /* istanbul ignore next */
119
- h("div", { class: "searchbox" }, h("tttx-standalone-input_1_4_1", { type: "text", placeholder: 'Search', label: "", required: true, showerrorbubble: false, iconleft: 'search', onInput: this.handleSearchInput.bind(this), inline: true })), h("div", { class: "dropdown-options-list" }, this.unsavedSelectedItems.map((option) => {
119
+ h("div", { class: "searchbox" }, h("tttx-standalone-input_1_4_2", { type: "text", placeholder: 'Search', label: "", required: true, showerrorbubble: false, iconleft: 'search', onInput: this.handleSearchInput.bind(this), inline: true })), h("div", { class: "dropdown-options-list" }, this.unsavedSelectedItems.map((option) => {
120
120
  return this.dropdownOption(option);
121
- })), h("div", { class: 'footer' }, h("tttx-button_1_4_1", { design: "primary", onClick: this.applyChanges.bind(this) }, "Apply"), h("tttx-button_1_4_1", { onClick: this.onCancel.bind(this) }, "Cancel"))))))));
121
+ })), h("div", { class: 'footer' }, h("tttx-button_1_4_2", { design: "primary", onClick: this.applyChanges.bind(this) }, "Apply"), h("tttx-button_1_4_2", { onClick: this.onCancel.bind(this) }, "Cancel"))))))));
122
122
  }
123
- static get is() { return "tttx-multiselect-box_1_4_1"; }
123
+ static get is() { return "tttx-multiselect-box_1_4_2"; }
124
124
  static get encapsulation() { return "shadow"; }
125
125
  static get originalStyleUrls() {
126
126
  return {
@@ -13,7 +13,7 @@ const options = [
13
13
  { value: 'Bonnie', label: 'Steuber' },
14
14
  { value: 'Priscilla', label: 'Lowe' },
15
15
  { value: 'Andy', label: 'Thompson-Keebler', html: '<span style="color: red">Thompson-Keebler</span>' },
16
- { value: 'egg', label: 'egg', html: '<tttx-icon_1_4_1 icon="egg" />' },
16
+ { value: 'egg', label: 'egg', html: '<tttx-icon_1_4_2 icon="egg" />' },
17
17
  { value: 'Terence', label: 'Hyatt' },
18
18
  { value: 'Ruben', label: 'Toy' },
19
19
  { value: 'Rhiannon', label: 'Hills' },
@@ -28,7 +28,7 @@ const options = [
28
28
  { value: 'Ronaldo', label: 'Mann' },
29
29
  ];
30
30
  const TemplateMultiselectBox = args => `
31
- <tttx-multiselect-box_1_4_1
31
+ <tttx-multiselect-box_1_4_2
32
32
  id="multiselectBox"
33
33
  options-data='${JSON.stringify(args.optionsData)}'
34
34
  label='${args.label}'
@@ -36,7 +36,7 @@ const TemplateMultiselectBox = args => `
36
36
  search-enabled='${args.searchEnabled}'
37
37
  inline='${args.inline}'
38
38
  html-visible-value: true,
39
- ></tttx-multiselect-box_1_4_1>
39
+ ></tttx-multiselect-box_1_4_2>
40
40
 
41
41
  <script>
42
42
  // Handle case where storybook renders this story twice
@@ -57,20 +57,20 @@ BasicMultiselectBox.args = {
57
57
  inline: false,
58
58
  };
59
59
  const htmlOptions = [
60
- { value: '1', label: 'Client', html: '<tttx-tag_1_4_1 text="Client" color="#f2bebe"></tttx-tag_1_4_1>', selected: true },
61
- { value: '2', label: 'Job Role', html: '<tttx-tag_1_4_1 text="Job Role" color="#f9e1be"></tttx-tag_1_4_1>' },
62
- { value: '3', label: 'Foo', html: '<tttx-tag_1_4_1 text="Foo" color="#e4ebc9"></tttx-tag_1_4_1>', selected: true },
63
- { value: '4', label: 'Bar', html: '<tttx-tag_1_4_1 text="Bar" color="#f2bebe"></tttx-tag_1_4_1>', selected: true },
64
- { value: '5', label: 'Baz', html: '<tttx-tag_1_4_1 text="Baz" color="#f9e1be"></tttx-tag_1_4_1>' },
65
- { value: '6', label: 'Mill', html: '<tttx-tag_1_4_1 text="Mill" color="#e4ebc9"></tttx-tag_1_4_1>', selected: true },
66
- { value: '7', label: 'Hill', html: '<tttx-tag_1_4_1 text="Hill" color="#f2bebe"></tttx-tag_1_4_1>', selected: true },
67
- { value: '8', label: 'Fill', html: '<tttx-tag_1_4_1 text="Fill" color="#f9e1be"></tttx-tag_1_4_1>' },
68
- { value: '9', label: 'Supercalifragilisticexpialidocious', html: '<tttx-tag_1_4_1 text="Supercalifragilisticexpialidocious" color="#e4ebc9"></tttx-tag_1_4_1>', selected: true },
60
+ { value: '1', label: 'Client', html: '<tttx-tag_1_4_2 text="Client" color="#f2bebe"></tttx-tag_1_4_2>', selected: true },
61
+ { value: '2', label: 'Job Role', html: '<tttx-tag_1_4_2 text="Job Role" color="#f9e1be"></tttx-tag_1_4_2>' },
62
+ { value: '3', label: 'Foo', html: '<tttx-tag_1_4_2 text="Foo" color="#e4ebc9"></tttx-tag_1_4_2>', selected: true },
63
+ { value: '4', label: 'Bar', html: '<tttx-tag_1_4_2 text="Bar" color="#f2bebe"></tttx-tag_1_4_2>', selected: true },
64
+ { value: '5', label: 'Baz', html: '<tttx-tag_1_4_2 text="Baz" color="#f9e1be"></tttx-tag_1_4_2>' },
65
+ { value: '6', label: 'Mill', html: '<tttx-tag_1_4_2 text="Mill" color="#e4ebc9"></tttx-tag_1_4_2>', selected: true },
66
+ { value: '7', label: 'Hill', html: '<tttx-tag_1_4_2 text="Hill" color="#f2bebe"></tttx-tag_1_4_2>', selected: true },
67
+ { value: '8', label: 'Fill', html: '<tttx-tag_1_4_2 text="Fill" color="#f9e1be"></tttx-tag_1_4_2>' },
68
+ { value: '9', label: 'Supercalifragilisticexpialidocious', html: '<tttx-tag_1_4_2 text="Supercalifragilisticexpialidocious" color="#e4ebc9"></tttx-tag_1_4_2>', selected: true },
69
69
  ];
70
70
  const TemplateHtmlVisibleValueWrap = args => `
71
71
  <div style="height: 400px; width: 50px"></div>
72
72
  <div style="width: 300px">
73
- <tttx-multiselect-box_1_4_1
73
+ <tttx-multiselect-box_1_4_2
74
74
  id="multiselectBoxVisibleValueWrap"
75
75
  options-data='${JSON.stringify(args.optionsData)}'
76
76
  label='${args.label}'
@@ -78,8 +78,8 @@ const TemplateHtmlVisibleValueWrap = args => `
78
78
  search-enabled='${args.searchEnabled}'
79
79
  inline='${args.inline}'
80
80
  html-visible-value='true'
81
- visible-value='<tttx-tag_1_4_1 text="Client" color="#f2bebe"></tttx-tag_1_4_1><tttx-tag_1_4_1 text="Foo" color="#e4ebc9"></tttx-tag_1_4_1><tttx-tag_1_4_1 text="Bar" color="#f2bebe"></tttx-tag_1_4_1><tttx-tag_1_4_1 text="Mill" color="#e4ebc9"></tttx-tag_1_4_1><tttx-tag_1_4_1 text="Hill" color="#f2bebe"></tttx-tag_1_4_1><tttx-tag_1_4_1 text="Supercalifragilisticexpialidocious" color="#e4ebc9"></tttx-tag_1_4_1>'
82
- ></tttx-multiselect-box_1_4_1>
81
+ visible-value='<tttx-tag_1_4_2 text="Client" color="#f2bebe"></tttx-tag_1_4_2><tttx-tag_1_4_2 text="Foo" color="#e4ebc9"></tttx-tag_1_4_2><tttx-tag_1_4_2 text="Bar" color="#f2bebe"></tttx-tag_1_4_2><tttx-tag_1_4_2 text="Mill" color="#e4ebc9"></tttx-tag_1_4_2><tttx-tag_1_4_2 text="Hill" color="#f2bebe"></tttx-tag_1_4_2><tttx-tag_1_4_2 text="Supercalifragilisticexpialidocious" color="#e4ebc9"></tttx-tag_1_4_2>'
82
+ ></tttx-multiselect-box_1_4_2>
83
83
  </div>
84
84
 
85
85
  <script>
@@ -101,12 +101,12 @@ HtmlVisibleValueWrap.args = {
101
101
  inline: false,
102
102
  };
103
103
  const htmlOptionsShort = [
104
- { value: '1', label: 'Client', html: '<tttx-tag_1_4_1 text="Client" color="#f2bebe"></tttx-tag_1_4_1>', selected: true },
105
- { value: '2', label: 'Job Role', html: '<tttx-tag_1_4_1 text="Job Role" color="#f9e1be"></tttx-tag_1_4_1>' },
106
- { value: '3', label: 'Foo', html: '<tttx-tag_1_4_1 text="Foo" color="#e4ebc9"></tttx-tag_1_4_1>', selected: true },
104
+ { value: '1', label: 'Client', html: '<tttx-tag_1_4_2 text="Client" color="#f2bebe"></tttx-tag_1_4_2>', selected: true },
105
+ { value: '2', label: 'Job Role', html: '<tttx-tag_1_4_2 text="Job Role" color="#f9e1be"></tttx-tag_1_4_2>' },
106
+ { value: '3', label: 'Foo', html: '<tttx-tag_1_4_2 text="Foo" color="#e4ebc9"></tttx-tag_1_4_2>', selected: true },
107
107
  ];
108
108
  const TemplateHtmlVisibleValue = args => `
109
- <tttx-multiselect-box_1_4_1
109
+ <tttx-multiselect-box_1_4_2
110
110
  id="multiselectBox"
111
111
  options-data='${JSON.stringify(args.optionsData)}'
112
112
  label='${args.label}'
@@ -114,7 +114,7 @@ const TemplateHtmlVisibleValue = args => `
114
114
  search-enabled='${args.searchEnabled}'
115
115
  inline='${args.inline}'
116
116
  html-visible-value='true'
117
- ></tttx-multiselect-box_1_4_1>
117
+ ></tttx-multiselect-box_1_4_2>
118
118
 
119
119
  <script>
120
120
  // Handle case where storybook renders this story twice
@@ -135,22 +135,22 @@ HtmlVisibleValue.args = {
135
135
  inline: false,
136
136
  };
137
137
  const tagOptions = [
138
- { value: '1', label: 'Client', html: '<tttx-tag_1_4_1 text="Client" color="#f2bebe"></tttx-tag_1_4_1>', selected: true },
139
- { value: '2', label: 'Job Role', html: '<tttx-tag_1_4_1 text="Job Role" color="#f9e1be"></tttx-tag_1_4_1>' },
140
- { value: '3', label: 'Foo', html: '<tttx-tag_1_4_1 text="Foo" color="#e4ebc9"></tttx-tag_1_4_1>', selected: true },
141
- { value: '4', label: 'Bar', html: '<tttx-tag_1_4_1 text="Bar" color="#f2bebe"></tttx-tag_1_4_1>', selected: true },
142
- { value: '5', label: 'Baz', html: '<tttx-tag_1_4_1 text="Baz" color="#f9e1be"></tttx-tag_1_4_1>' },
143
- { value: '6', label: 'Mill', html: '<tttx-tag_1_4_1 text="Mill" color="#e4ebc9"></tttx-tag_1_4_1>', selected: true },
144
- { value: '7', label: 'Hill', html: '<tttx-tag_1_4_1 text="Hill" color="#f2bebe"></tttx-tag_1_4_1>', selected: true },
145
- { value: '8', label: 'Fill', html: '<tttx-tag_1_4_1 text="Fill" color="#f9e1be"></tttx-tag_1_4_1>' },
146
- { value: '9', label: 'Supercalifragilisticexpialidocious', html: '<tttx-tag_1_4_1 text="Supercalifragilisticexpialidocious" color="#e4ebc9"></tttx-tag_1_4_1>', selected: true },
138
+ { value: '1', label: 'Client', html: '<tttx-tag_1_4_2 text="Client" color="#f2bebe"></tttx-tag_1_4_2>', selected: true },
139
+ { value: '2', label: 'Job Role', html: '<tttx-tag_1_4_2 text="Job Role" color="#f9e1be"></tttx-tag_1_4_2>' },
140
+ { value: '3', label: 'Foo', html: '<tttx-tag_1_4_2 text="Foo" color="#e4ebc9"></tttx-tag_1_4_2>', selected: true },
141
+ { value: '4', label: 'Bar', html: '<tttx-tag_1_4_2 text="Bar" color="#f2bebe"></tttx-tag_1_4_2>', selected: true },
142
+ { value: '5', label: 'Baz', html: '<tttx-tag_1_4_2 text="Baz" color="#f9e1be"></tttx-tag_1_4_2>' },
143
+ { value: '6', label: 'Mill', html: '<tttx-tag_1_4_2 text="Mill" color="#e4ebc9"></tttx-tag_1_4_2>', selected: true },
144
+ { value: '7', label: 'Hill', html: '<tttx-tag_1_4_2 text="Hill" color="#f2bebe"></tttx-tag_1_4_2>', selected: true },
145
+ { value: '8', label: 'Fill', html: '<tttx-tag_1_4_2 text="Fill" color="#f9e1be"></tttx-tag_1_4_2>' },
146
+ { value: '9', label: 'Supercalifragilisticexpialidocious', html: '<tttx-tag_1_4_2 text="Supercalifragilisticexpialidocious" color="#e4ebc9"></tttx-tag_1_4_2>', selected: true },
147
147
  ];
148
148
  const TttxDialogBoxStory = ({ data }) => `
149
149
  <button onclick="openDialog()">Open</button>
150
- <tttx-dialog-box_1_4_1
150
+ <tttx-dialog-box_1_4_2
151
151
  id='dialogBox'
152
152
  allow-overflow='true'
153
- ></tttx-dialog-box_1_4_1>
153
+ ></tttx-dialog-box_1_4_2>
154
154
  <script>
155
155
  if(!dialogBox) {
156
156
  const dialogBox = document.getElementById('dialogBox');
@@ -177,7 +177,7 @@ DialogBoxWithDropdown.args = {
177
177
  isCustomHtml: true,
178
178
  customHtml: `
179
179
  <div style="padding: 5px;">
180
- <tttx-multiselect-box_1_4_1
180
+ <tttx-multiselect-box_1_4_2
181
181
  id="dropdownSelectBox"
182
182
  options-data='${JSON.stringify(tagOptions)}'
183
183
  label='Label'
@@ -186,7 +186,7 @@ DialogBoxWithDropdown.args = {
186
186
  inline='${false}'
187
187
  visible-value='${tagOptions[0].html} ${tagOptions[2].html}'
188
188
  html-visible-value='true'
189
- ></tttx-multiselect-box_1_4_1>
189
+ ></tttx-multiselect-box_1_4_2>
190
190
  </div>
191
191
  `,
192
192
  },
@@ -35,7 +35,8 @@
35
35
  border: 1px solid #1479c6;
36
36
  }
37
37
 
38
- .dropdown-selector, .dropdown-body {
38
+ .dropdown-selector,
39
+ .dropdown-body {
39
40
  display: flex;
40
41
  border-radius: 4px;
41
42
  background-color: white;
@@ -60,6 +61,32 @@
60
61
  .dropdown-selector * {
61
62
  font-weight: 400;
62
63
  }
64
+ .dropdown-selector.invalid {
65
+ border: 1px solid #dc0000;
66
+ }
67
+
68
+ .errorBubble {
69
+ position: relative;
70
+ font-size: 14px;
71
+ line-height: 16.408px;
72
+ font-weight: normal;
73
+ width: 100%;
74
+ font-family: "Roboto", sans-serif;
75
+ color: #dc0000;
76
+ display: flex;
77
+ align-content: center;
78
+ align-items: center;
79
+ justify-items: center;
80
+ margin-top: 4px;
81
+ }
82
+ .errorBubble:not(.visible) {
83
+ display: none;
84
+ }
85
+ .errorBubble > * {
86
+ font-size: 16px;
87
+ margin-right: 4px;
88
+ height: 16px;
89
+ }
63
90
 
64
91
  .description {
65
92
  color: #757575;
@@ -11,6 +11,9 @@ export class TttxSelectBox {
11
11
  this.placeholder = '';
12
12
  this.searchEnabled = undefined;
13
13
  this.selectedValue = undefined;
14
+ this.showErrorMsg = undefined;
15
+ this.showErrorBubble = false;
16
+ this.errorMsg = undefined;
14
17
  this.open = false;
15
18
  this.selectedItem = undefined;
16
19
  this.searchTerm = '';
@@ -18,8 +21,10 @@ export class TttxSelectBox {
18
21
  async componentWillLoad() {
19
22
  if (this.optionsData) {
20
23
  this.setOptionsData();
21
- const matchingItems = this._optionsData.filter((item) => { return item.value == this.selectedValue; });
22
- this.selectedItem = (matchingItems.length > 0) ? matchingItems[0] : undefined;
24
+ const matchingItems = this._optionsData.filter((item) => {
25
+ return item.value == this.selectedValue;
26
+ });
27
+ this.selectedItem = matchingItems.length > 0 ? matchingItems[0] : undefined;
23
28
  }
24
29
  }
25
30
  async setOptionsData() {
@@ -56,41 +61,37 @@ export class TttxSelectBox {
56
61
  let title;
57
62
  let subtitle;
58
63
  const chevronIcon = this.open ? 'expand_less' : 'expand_more';
59
- const icon = h("tttx-icon_1_4_1", { icon: chevronIcon, color: "black" });
60
- let chevron = h("div", { class: 'dropdown-selector-chevron' }, icon);
64
+ const icon = h("tttx-icon_1_4_2", { icon: chevronIcon, color: "black" });
65
+ let chevron = h("div", { class: "dropdown-selector-chevron" }, icon);
61
66
  if (!this.selectedItem) {
62
67
  title = h("div", { class: "placeholder" }, this.placeholder);
63
- return h(Fragment, null, title, chevron);
68
+ return (h(Fragment, null, title, chevron));
64
69
  }
65
70
  else if (this.selectedItem.html) {
66
71
  title = h("div", { title: this.selectedItem.label, class: "truncated-text", innerHTML: this.selectedItem.html });
67
- return h(Fragment, null, title, chevron);
72
+ return (h(Fragment, null, title, chevron));
68
73
  }
69
74
  else {
70
- title = h("div", { title: this.selectedItem.label, class: "truncated-text" }, this.selectedItem.label);
75
+ title = (h("div", { title: this.selectedItem.label, class: "truncated-text" }, this.selectedItem.label));
71
76
  if (this.selectedItem.description) {
72
- subtitle = h("div", { class: "description" }, h("p", null, this.selectedItem.description));
73
- chevron = h("div", { class: 'dropdown-selector-chevron-offset' }, icon);
77
+ subtitle = (h("div", { class: "description" }, h("p", null, this.selectedItem.description)));
78
+ chevron = h("div", { class: "dropdown-selector-chevron-offset" }, icon);
74
79
  }
75
- return h(Fragment, null, h("div", { class: "left-wrapper" }, title, subtitle), chevron);
80
+ return (h(Fragment, null, h("div", { class: "left-wrapper" }, title, subtitle), chevron));
76
81
  }
77
82
  }
78
83
  dropdownOption(option) {
79
- /* istanbul ignore next */
80
84
  const hideOption = this.searchEnabled && option.label.toLowerCase().indexOf(this.searchTerm.toLowerCase()) === -1;
81
85
  const selected = this.selectedItem && option.value === this.selectedItem.value;
82
86
  if (option.html) {
83
87
  const sanitisedHTML = DOMPurify.sanitize(option.html, domSanitiserOptions);
84
- /* istanbul ignore next */
85
88
  return (h("div", { class: `dropdown-option ${hideOption ? 'hidden' : ''} ${selected ? 'selected' : ''}`, onClick: this.onItemSelected.bind(this, option), key: option.label, innerHTML: sanitisedHTML }));
86
89
  }
87
90
  else if (option.description) {
88
91
  return (h("div", { class: `dropdown-option ${hideOption ? 'hidden' : ''} ${selected ? 'selected' : ''}`, onClick: this.onItemSelected.bind(this, option), key: option.label }, option.label, h("div", { class: "description-dd" }, h("p", null, option.description))));
89
92
  }
90
- /* istanbul ignore next */
91
93
  return (h("div", { class: `dropdown-option ${hideOption ? 'hidden' : ''} ${selected ? 'selected' : ''}`, onClick: this.onItemSelected.bind(this, option), key: option.label }, option.label));
92
94
  }
93
- /* istanbul ignore next */
94
95
  handleSearchInput(event) {
95
96
  const target = event.target;
96
97
  this.searchTerm = target.value;
@@ -99,27 +100,37 @@ export class TttxSelectBox {
99
100
  const dropdownSelector = this.el.shadowRoot.querySelector('.dropdown-selector');
100
101
  const bottomPosY = this.dropdownSelector.getBoundingClientRect().bottom;
101
102
  // (Max list height OR 31px * number of items) + 52px for search bar + 8px padding at bottom
102
- let dropdownMenuMaxHeight = Math.min((368), 36 * this._optionsData.length) + 8;
103
+ let dropdownMenuMaxHeight = Math.min(368, 36 * this._optionsData.length) + 8;
103
104
  if (this.searchEnabled)
104
105
  dropdownMenuMaxHeight += 52;
105
106
  const clientRectangle = dropdownSelector.getBoundingClientRect();
106
107
  if (bottomPosY + dropdownMenuMaxHeight > window.innerHeight) {
107
- this.bodyOffset = { top: `${window.innerHeight - (dropdownMenuMaxHeight + 16)}px`, position: 'fixed', width: `${dropdownSelector.offsetWidth}px`, zIndex: '10' };
108
+ this.bodyOffset = {
109
+ top: `${window.innerHeight - (dropdownMenuMaxHeight + 16)}px`,
110
+ position: 'fixed',
111
+ width: `${dropdownSelector.offsetWidth}px`,
112
+ zIndex: '10',
113
+ };
108
114
  }
109
115
  else {
110
- this.bodyOffset = { position: 'fixed', left: clientRectangle.left, top: clientRectangle.top, width: (clientRectangle.width - 2) + 'px', zIndex: '10' };
116
+ this.bodyOffset = {
117
+ position: 'fixed',
118
+ left: clientRectangle.left,
119
+ top: clientRectangle.top,
120
+ width: clientRectangle.width - 2 + 'px',
121
+ zIndex: '10',
122
+ };
111
123
  }
112
124
  }
113
125
  render() {
114
126
  if (!this.optionsData)
115
127
  return;
116
- return (h(Host, { class: this.inline ? 'inline' : 'block' }, this.label && h("div", { class: "label" }, this.label), h("div", { tabindex: "0", class: "dropdown-container" }, h("div", { class: "dropdown-selector", ref: (el) => this.dropdownSelector = el, onClick: this.onDropdownClicked.bind(this) }, this.dropdownSelectorContent()), this.open && (h("div", { class: "dropdown-body-container" }, h("div", { class: "dropdown-body", style: Object.assign({ width: `${this.dropdownSelector.offsetWidth}px` }, this.bodyOffset) }, this.searchEnabled &&
117
- /* istanbul ignore next */
118
- h("div", { class: "searchbox" }, h("tttx-standalone-input_1_4_1", { type: "text", label: "", required: true, showerrorbubble: false, iconleft: 'search', onInput: this.handleSearchInput.bind(this) })), h("div", { class: "dropdown-options-list" }, this._optionsData.map((option) => {
128
+ const invalidClass = this.showErrorMsg ? 'invalid' : '';
129
+ return (h(Host, { class: this.inline ? 'inline' : 'block' }, this.label && h("div", { class: "label" }, this.label), h("div", { tabindex: "0", class: "dropdown-container" }, h("div", { class: ['dropdown-selector', invalidClass].join(' '), ref: el => (this.dropdownSelector = el), onClick: this.onDropdownClicked.bind(this) }, this.dropdownSelectorContent()), this.open && (h("div", { class: "dropdown-body-container" }, h("div", { class: "dropdown-body", style: Object.assign({ width: `${this.dropdownSelector.offsetWidth}px` }, this.bodyOffset) }, this.searchEnabled && (h("div", { class: "searchbox" }, h("tttx-standalone-input_1_4_2", { type: "text", label: "", required: true, showerrorbubble: false, iconleft: "search", onInput: this.handleSearchInput.bind(this) }))), h("div", { class: "dropdown-options-list" }, this._optionsData.map((option) => {
119
130
  return this.dropdownOption(option);
120
- }))))))));
131
+ }))))), this.showErrorBubble && (h("span", { class: ['errorBubble', this.showErrorMsg && this.errorMsg ? 'visible' : ''].join(' ') }, h("tttx-icon_1_4_2", { icon: "warning", color: "#dc0000", size: 16 }), " ", this.errorMsg)))));
121
132
  }
122
- static get is() { return "tttx-select-box_1_4_1"; }
133
+ static get is() { return "tttx-select-box_1_4_2"; }
123
134
  static get encapsulation() { return "shadow"; }
124
135
  static get originalStyleUrls() {
125
136
  return {
@@ -241,6 +252,58 @@ export class TttxSelectBox {
241
252
  },
242
253
  "attribute": "selected-value",
243
254
  "reflect": false
255
+ },
256
+ "showErrorMsg": {
257
+ "type": "boolean",
258
+ "mutable": false,
259
+ "complexType": {
260
+ "original": "boolean",
261
+ "resolved": "boolean",
262
+ "references": {}
263
+ },
264
+ "required": false,
265
+ "optional": false,
266
+ "docs": {
267
+ "tags": [],
268
+ "text": ""
269
+ },
270
+ "attribute": "show-error-msg",
271
+ "reflect": false
272
+ },
273
+ "showErrorBubble": {
274
+ "type": "boolean",
275
+ "mutable": false,
276
+ "complexType": {
277
+ "original": "boolean",
278
+ "resolved": "boolean",
279
+ "references": {}
280
+ },
281
+ "required": false,
282
+ "optional": false,
283
+ "docs": {
284
+ "tags": [],
285
+ "text": ""
286
+ },
287
+ "attribute": "show-error-bubble",
288
+ "reflect": false,
289
+ "defaultValue": "false"
290
+ },
291
+ "errorMsg": {
292
+ "type": "string",
293
+ "mutable": false,
294
+ "complexType": {
295
+ "original": "string",
296
+ "resolved": "string",
297
+ "references": {}
298
+ },
299
+ "required": false,
300
+ "optional": false,
301
+ "docs": {
302
+ "tags": [],
303
+ "text": ""
304
+ },
305
+ "attribute": "error-msg",
306
+ "reflect": false
244
307
  }
245
308
  };
246
309
  }
@@ -1,12 +1,23 @@
1
1
  export default {
2
2
  title: 'molecules/Select Box',
3
3
  component: 'tttx-select-box',
4
+ argTypes: {
5
+ errorMsg: {
6
+ control: { type: 'text' },
7
+ },
8
+ showErrorBubble: {
9
+ control: { type: 'boolean' },
10
+ },
11
+ showErrorMsg: {
12
+ control: { type: 'boolean' },
13
+ },
14
+ },
4
15
  };
5
16
  const options = [
6
17
  { value: 'Bonnie', label: 'Steuber', description: 'Practical Course' },
7
18
  { value: 'Priscilla', label: 'Lowe', description: 'E-learn course' },
8
19
  { value: 'Andy', label: 'Thompson-Keebler', html: '<span style="color: red">Thompson-Keebler</span>' },
9
- { value: 'egg', label: 'egg', html: '<tttx-icon_1_4_1 icon="egg" />', description: 'Practical Course' },
20
+ { value: 'egg', label: 'egg', html: '<tttx-icon_1_4_2 icon="egg" />', description: 'Practical Course' },
10
21
  { value: 'Terence', label: 'Hyatt' },
11
22
  { value: 'Ruben', label: 'Toy', description: 'E-learn course' },
12
23
  { value: 'Rhiannon', label: 'Hills' },
@@ -21,14 +32,17 @@ const options = [
21
32
  { value: 'Ronaldo', label: 'Mann' },
22
33
  ];
23
34
  const TemplateHTMLSelectBox = args => `
24
- <tttx-select-box_1_4_1
35
+ <tttx-select-box_1_4_2
25
36
  id="htmlSelectBox"
26
37
  options-data='${JSON.stringify(args.optionsData)}'
27
38
  label='${args.label}'
28
39
  placeholder='${args.placeholder}'
29
40
  search-enabled='${args.searchEnabled}'
30
41
  inline='${args.inline}'
31
- ></tttx-select-box_1_4_1>
42
+ error-msg="${args.errorMsg}"
43
+ show-error-bubble="${args.showErrorBubble === false ? 'false' : 'true'}"
44
+ ${args.showErrorMsg ? 'show-error-msg' : ''}
45
+ ></tttx-select-box_1_4_2>
32
46
  <script>
33
47
  // Handle case where storybook renders this story twice
34
48
  if (!htmlSelectBox.length) {
@@ -46,13 +60,16 @@ BasicHTMLSelectBox.args = {
46
60
  inline: false,
47
61
  };
48
62
  const TemplateJSXSelectBox = args => `
49
- <tttx-select-box_1_4_1
63
+ <tttx-select-box_1_4_2
50
64
  id='objectSelectBox'
51
65
  label='${args.label}'
52
66
  placeholder='${args.placeholder}'
53
67
  search-enabled='${args.searchEnabled}'
54
68
  inline='${args.inline}'
55
- ></tttx-select-box_1_4_1>
69
+ error-msg="${args.errorMsg}"
70
+ show-error-bubble="${args.showErrorBubble === false ? 'false' : 'true'}"
71
+ ${args.showErrorMsg ? 'show-error-msg' : ''}
72
+ ></tttx-select-box_1_4_2>
56
73
  <script>
57
74
  objectSelectBox.optionsData = ${JSON.stringify(args.optionsData)}
58
75
  objectSelectBox.addEventListener('toggleOpen', (ev) => { console.log(ev) })
@@ -68,16 +85,16 @@ BasicJSXSelectBox.args = {
68
85
  inline: false,
69
86
  };
70
87
  const tagOptions = [
71
- { value: '1', label: 'Client', html: '<tttx-tag_1_4_1 text="Client" color="#f2bebe"></tttx-tag_1_4_1>' },
72
- { value: '2', label: 'Job Role', html: '<tttx-tag_1_4_1 text="Job Role" color="#f9e1be"></tttx-tag_1_4_1>' },
73
- { value: '3', label: 'Project', html: '<tttx-tag_1_4_1 text="Project" color="#e4ebc9"></tttx-tag_1_4_1>' },
88
+ { value: '1', label: 'Client', html: '<tttx-tag_1_4_2 text="Client" color="#f2bebe"></tttx-tag_1_4_2>' },
89
+ { value: '2', label: 'Job Role', html: '<tttx-tag_1_4_2 text="Job Role" color="#f9e1be"></tttx-tag_1_4_2>' },
90
+ { value: '3', label: 'Project', html: '<tttx-tag_1_4_2 text="Project" color="#e4ebc9"></tttx-tag_1_4_2>' },
74
91
  ];
75
92
  const TttxDialogBoxStory = ({ data }) => `
76
93
  <button onclick="openDialog()">Open</button>
77
- <tttx-dialog-box_1_4_1
94
+ <tttx-dialog-box_1_4_2
78
95
  id='dialogBox'
79
96
  allow-overflow='true'
80
- ></tttx-dialog-box_1_4_1>
97
+ ></tttx-dialog-box_1_4_2>
81
98
  <script>
82
99
  if(!dialogBox) {
83
100
  const dialogBox = document.getElementById('dialogBox');
@@ -103,7 +120,7 @@ DialogBoxWithDropdown.args = {
103
120
  isCustomHtml: true,
104
121
  customHtml: `
105
122
  <div style="padding: 5px; display: flex; gap: 16px; flex-direction: column">
106
- <tttx-select-box_1_4_1
123
+ <tttx-select-box_1_4_2
107
124
  id="htmlSelectBox"
108
125
  options-data='${JSON.stringify(tagOptions)}'
109
126
  label='Label'
@@ -111,17 +128,17 @@ DialogBoxWithDropdown.args = {
111
128
  search-enabled='${true}'
112
129
  inline='${false}'
113
130
  selected-value='${tagOptions[1].value}'
114
- ></tttx-select-box_1_4_1>
115
- <tttx-standalone-input_1_4_1
131
+ ></tttx-select-box_1_4_2>
132
+ <tttx-standalone-input_1_4_2
116
133
  label='Name'
117
134
  placeholder='Enter name'
118
- ></tttx-standalone-input_1_4_1>
119
- <tttx-select-box_1_4_1
135
+ ></tttx-standalone-input_1_4_2>
136
+ <tttx-select-box_1_4_2
120
137
  id="htmlSelectBox2"
121
138
  options-data='${JSON.stringify(options)}'
122
139
  label='Label 2'
123
140
  placeholder='Placeholder 2'
124
- ></tttx-select-box_1_4_1>
141
+ ></tttx-select-box_1_4_2>
125
142
  </div>
126
143
  `,
127
144
  },
@@ -98,11 +98,11 @@ export class TttxSorter {
98
98
  const selectedOption = this.selectedField;
99
99
  const dropdownSelectorClassNameModifier = this.dropdownExpand ? '--expanded' : '';
100
100
  const sorterKey = `sorter__${this.sorterKey}`;
101
- return (h(Host, { id: sorterKey }, h("div", { tabindex: 0, class: `sorter-container ${dropdownSelectorClassNameModifier}` }, h("button", { class: "arrow-toggle-button", type: "button", onClick: this.onSortToggleClick.bind(this) }, h("tttx-icon_1_4_1", { icon: arrowIcon, color: "black" })), h("div", { class: "dropdown-selector", onClick: this.onDropdownClicked.bind(this) }, h("div", { class: "dropdown-selector-button" }, h("div", { class: "dropdown-selector-text" }, selectedOption), h("div", { class: "dropdown-selector-chevron" }, h("tttx-icon_1_4_1", { icon: chevronIcon, color: "black" })))), this.dropdownExpand && (h("div", { class: "dropdown-options-list" }, parsedFieldOptionsData.sorterOptions.map(option => {
101
+ return (h(Host, { id: sorterKey }, h("div", { tabindex: 0, class: `sorter-container ${dropdownSelectorClassNameModifier}` }, h("button", { class: "arrow-toggle-button", type: "button", onClick: this.onSortToggleClick.bind(this) }, h("tttx-icon_1_4_2", { icon: arrowIcon, color: "black" })), h("div", { class: "dropdown-selector", onClick: this.onDropdownClicked.bind(this) }, h("div", { class: "dropdown-selector-button" }, h("div", { class: "dropdown-selector-text" }, selectedOption), h("div", { class: "dropdown-selector-chevron" }, h("tttx-icon_1_4_2", { icon: chevronIcon, color: "black" })))), this.dropdownExpand && (h("div", { class: "dropdown-options-list" }, parsedFieldOptionsData.sorterOptions.map(option => {
102
102
  return (h("div", { class: "dropdown-option", tabIndex: -1, onClick: this.onDropdownSelected.bind(this), key: option.optionLabel }, option.optionLabel));
103
103
  }))))));
104
104
  }
105
- static get is() { return "tttx-sorter_1_4_1"; }
105
+ static get is() { return "tttx-sorter_1_4_2"; }
106
106
  static get encapsulation() { return "shadow"; }
107
107
  static get originalStyleUrls() {
108
108
  return {
@@ -23,7 +23,7 @@ export default {
23
23
  const TemplateSorter = ({ fieldOptionsData, sorterKey, defaultOption }) => {
24
24
  return `
25
25
  <div style='width: 250px;'>
26
- <tttx-sorter_1_4_1
26
+ <tttx-sorter_1_4_2
27
27
  field-options-data='${JSON.stringify(fieldOptionsData)}'
28
28
  default-option='${defaultOption}'
29
29
  sorter-key='${sorterKey}'/>
@@ -72,9 +72,9 @@ export class TttxInput {
72
72
  this.iconleft ? 'has-left-icon' : '',
73
73
  this.iconright ? 'has-right-icon' : '',
74
74
  ].join(' ');
75
- return (h(Host, null, h("label", null, this.label, !this.required ? h("span", { class: "optional" }, "\u00A0(optional)") : '', h("div", { class: ['outer-container', this.inline ? 'inputInline' : 'inputBlock'].join(' ') }, h("input", { class: classNames, autocapitalize: this.inputautocapitalize, autofocus: this.inputautofocus, enterkeyhint: this.inputkeyhint, tabindex: this.inputindex, title: this.inputtitle, autocomplete: this.autocomplete, checked: this.checked, disabled: this.disabled, max: this.max, maxlength: this.maxlength, min: this.min, minlength: this.minlength, name: this.name, pattern: this.pattern, placeholder: this.placeholder, readonly: this.readonly, required: this.required, step: this.step, type: this.type, value: this.value, onBlur: this.handleBlur.bind(this), onFocus: this.handleFocus.bind(this), onInput: this.handleChange.bind(this), onInvalid: this.handleInvalid.bind(this) }), (this.inputicon || this.iconleft) && (h("span", { class: "left-icons" }, this.inputicon && (h("tttx-icon_1_4_1", { class: "input-icon", icon: this.inputicon, color: this.inputiconcolor, onClick: this.handleInputIconClick.bind(this) })), this.iconleft && (h("tttx-icon_1_4_1", { class: "left-icon", icon: this.iconleft, color: this.iconleftcolor, onClick: this.handleLeftIconClick.bind(this) })))), this.iconright && (h("span", { class: "right-icons" }, h("tttx-icon_1_4_1", { class: "right-icon", icon: this.iconright, color: this.iconrightcolor, onClick: this.handleRightIconClick.bind(this) })))), this.secondarylabel && h("span", { class: "secondarylabel" }, this.secondarylabel), this.showerrorbubble && (h("span", { class: ['errorBubble', this.showerrormsg && this.errormsg ? 'visible' : ''].join(' ') }, h("span", { class: "material-symbols-rounded" }, "warning"), " ", this.errormsg)))));
75
+ return (h(Host, null, h("label", null, this.label, !this.required ? h("span", { class: "optional" }, "\u00A0(optional)") : '', h("div", { class: ['outer-container', this.inline ? 'inputInline' : 'inputBlock'].join(' ') }, h("input", { class: classNames, autocapitalize: this.inputautocapitalize, autofocus: this.inputautofocus, enterkeyhint: this.inputkeyhint, tabindex: this.inputindex, title: this.inputtitle, autocomplete: this.autocomplete, checked: this.checked, disabled: this.disabled, max: this.max, maxlength: this.maxlength, min: this.min, minlength: this.minlength, name: this.name, pattern: this.pattern, placeholder: this.placeholder, readonly: this.readonly, required: this.required, step: this.step, type: this.type, value: this.value, onBlur: this.handleBlur.bind(this), onFocus: this.handleFocus.bind(this), onInput: this.handleChange.bind(this), onInvalid: this.handleInvalid.bind(this) }), (this.inputicon || this.iconleft) && (h("span", { class: "left-icons" }, this.inputicon && (h("tttx-icon_1_4_2", { class: "input-icon", icon: this.inputicon, color: this.inputiconcolor, onClick: this.handleInputIconClick.bind(this) })), this.iconleft && (h("tttx-icon_1_4_2", { class: "left-icon", icon: this.iconleft, color: this.iconleftcolor, onClick: this.handleLeftIconClick.bind(this) })))), this.iconright && (h("span", { class: "right-icons" }, h("tttx-icon_1_4_2", { class: "right-icon", icon: this.iconright, color: this.iconrightcolor, onClick: this.handleRightIconClick.bind(this) })))), this.secondarylabel && h("span", { class: "secondarylabel" }, this.secondarylabel), this.showerrorbubble && (h("span", { class: ['errorBubble', this.showerrormsg && this.errormsg ? 'visible' : ''].join(' ') }, h("span", { class: "material-symbols-rounded" }, "warning"), " ", this.errormsg)))));
76
76
  }
77
- static get is() { return "tttx-standalone-input_1_4_1"; }
77
+ static get is() { return "tttx-standalone-input_1_4_2"; }
78
78
  static get encapsulation() { return "scoped"; }
79
79
  static get originalStyleUrls() {
80
80
  return {
@@ -360,10 +360,10 @@ export class TttxInput {
360
360
  "docs": {
361
361
  "tags": [{
362
362
  "name": "example",
363
- "text": "<caption>In HTML (like `index.html`)</caption>\n<tttx-standalone-input_1_4_1 input-index=\"1\" />"
363
+ "text": "<caption>In HTML (like `index.html`)</caption>\n<tttx-standalone-input_1_4_2 input-index=\"1\" />"
364
364
  }, {
365
365
  "name": "example",
366
- "text": "<caption>In TSX files</caption>\n<tttx-standalone-input_1_4_1 inputindex={1} />"
366
+ "text": "<caption>In TSX files</caption>\n<tttx-standalone-input_1_4_2 inputindex={1} />"
367
367
  }],
368
368
  "text": "tabindex - Allows the HTML elements to be focusable"
369
369
  },
@@ -95,7 +95,7 @@ export default {
95
95
  },
96
96
  };
97
97
  const TemplateTextInput = ({ iconleft, iconleftcolor, iconright, iconrightcolor, inputicon, inputiconcolor, label, secondarylabel, errormsg, showerrorbubble, showerrormsg, inline, checked, disabled, max, maxlength, min, minlength, name, pattern, placeholder, readonly, required, step, type, value, }) => `
98
- <tttx-standalone-input_1_4_1
98
+ <tttx-standalone-input_1_4_2
99
99
  iconleft="${iconleft || ''}"
100
100
  iconleftcolor="${iconleftcolor || ''}"
101
101
  iconright="${iconright || ''}"
@@ -70,13 +70,13 @@ export class TttxTabs {
70
70
  return;
71
71
  }
72
72
  const selectedTab = this._tabs.find(tab => tab.selected);
73
- return (h(Host, null, h("div", null, h("div", { class: "tab-bar", role: "tablist", "aria-label": this.tabsName, ref: el => (this.tabList = el) }, this.navigation && (h("div", { class: "left-navigation", tabindex: "0", onClick: this.handleLeftNavigation.bind(this) }, h("tttx-icon_1_4_1", { icon: "navigate_before", color: "black" }))), h("div", { class: 'tabs-container' + (this.wide ? ' wide' : '') }, this._tabs.map(tab => {
73
+ return (h(Host, null, h("div", null, h("div", { class: "tab-bar", role: "tablist", "aria-label": this.tabsName, ref: el => (this.tabList = el) }, this.navigation && (h("div", { class: "left-navigation", tabindex: "0", onClick: this.handleLeftNavigation.bind(this) }, h("tttx-icon_1_4_2", { icon: "navigate_before", color: "black" }))), h("div", { class: 'tabs-container' + (this.wide ? ' wide' : '') }, this._tabs.map(tab => {
74
74
  return (h("a", { key: tab.id, id: tab.id, role: "tab", "aria-controls": tab.controls, tabindex: tab.tabIndex, "aria-selected": tab.selected, onClick: () => {
75
75
  this.handleTabClick(tab);
76
76
  } }, tab.tabName));
77
- })), this.navigation && (h("div", { class: "right-navigation", tabindex: "0", onClick: this.handleRightNavigation.bind(this) }, h("tttx-icon_1_4_1", { icon: "navigate_next", color: "black" })))), selectedTab && (h("article", { key: selectedTab.id, id: selectedTab.controls, role: "tabpanel", tabindex: "0", "aria-labelledby": selectedTab.id, "aria-expanded": selectedTab.selected, innerHTML: DOMPurify.sanitize(selectedTab.pageContent, domSanitiserOptions), hidden: !selectedTab.selected })))));
77
+ })), this.navigation && (h("div", { class: "right-navigation", tabindex: "0", onClick: this.handleRightNavigation.bind(this) }, h("tttx-icon_1_4_2", { icon: "navigate_next", color: "black" })))), selectedTab && (h("article", { key: selectedTab.id, id: selectedTab.controls, role: "tabpanel", tabindex: "0", "aria-labelledby": selectedTab.id, "aria-expanded": selectedTab.selected, innerHTML: DOMPurify.sanitize(selectedTab.pageContent, domSanitiserOptions), hidden: !selectedTab.selected })))));
78
78
  }
79
- static get is() { return "tttx-tabs_1_4_1"; }
79
+ static get is() { return "tttx-tabs_1_4_2"; }
80
80
  static get encapsulation() { return "scoped"; }
81
81
  static get originalStyleUrls() {
82
82
  return {