wcs-core 2.5.4 → 2.9.0

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 (297) hide show
  1. package/CHANGELOG.md +132 -5
  2. package/README.md +19 -1
  3. package/dist/cjs/component-fc28ed16.js +1074 -0
  4. package/dist/cjs/helpers-6abce594.js +86 -0
  5. package/dist/cjs/{index-e05c3e1f.js → index-3cb9d725.js} +165 -87
  6. package/dist/cjs/loader.cjs.js +3 -3
  7. package/dist/{esm/wcs-action-bar_47.entry.js → cjs/lodash-776d6f03.js} +12499 -22628
  8. package/dist/cjs/popper-5777994b.js +1732 -0
  9. package/dist/cjs/select-arrow-76ccf86d.js +36 -0
  10. package/dist/cjs/wcs-action-bar.cjs.entry.js +24 -0
  11. package/dist/cjs/wcs-app.cjs.entry.js +2 -2
  12. package/dist/cjs/wcs-badge.cjs.entry.js +27 -0
  13. package/dist/cjs/wcs-button.cjs.entry.js +86 -0
  14. package/dist/cjs/wcs-card-body.cjs.entry.js +19 -0
  15. package/dist/cjs/wcs-card.cjs.entry.js +20 -0
  16. package/dist/cjs/wcs-checkbox.cjs.entry.js +47 -0
  17. package/dist/cjs/wcs-com-nav-category.cjs.entry.js +63 -0
  18. package/dist/cjs/wcs-com-nav-submenu.cjs.entry.js +69 -0
  19. package/dist/cjs/wcs-com-nav.cjs.entry.js +19 -0
  20. package/dist/cjs/wcs-divider.cjs.entry.js +19 -0
  21. package/dist/cjs/wcs-dropdown-divider.cjs.entry.js +19 -0
  22. package/dist/cjs/wcs-dropdown-header.cjs.entry.js +19 -0
  23. package/dist/cjs/wcs-dropdown-item.cjs.entry.js +23 -0
  24. package/dist/cjs/wcs-dropdown.cjs.entry.js +90 -0
  25. package/dist/cjs/wcs-editable-field.cjs.entry.js +225 -0
  26. package/dist/cjs/wcs-error_2.cjs.entry.js +137 -0
  27. package/dist/cjs/wcs-field-content.cjs.entry.js +16 -0
  28. package/dist/cjs/wcs-field-label.cjs.entry.js +16 -0
  29. package/dist/cjs/wcs-field.cjs.entry.js +19 -0
  30. package/dist/cjs/wcs-footer.cjs.entry.js +19 -0
  31. package/dist/cjs/wcs-galactic-menu.cjs.entry.js +58 -0
  32. package/dist/cjs/wcs-galactic.cjs.entry.js +41 -0
  33. package/dist/cjs/wcs-grid-column.cjs.entry.js +77 -0
  34. package/dist/cjs/wcs-grid-custom-cell.cjs.entry.js +16 -0
  35. package/dist/cjs/wcs-grid-pagination.cjs.entry.js +4 -4
  36. package/dist/cjs/wcs-grid.cjs.entry.js +332 -0
  37. package/dist/cjs/wcs-header.cjs.entry.js +25 -0
  38. package/dist/cjs/wcs-hint.cjs.entry.js +20 -0
  39. package/dist/cjs/wcs-horizontal-stepper.cjs.entry.js +114 -0
  40. package/dist/cjs/wcs-icon.cjs.entry.js +2 -2
  41. package/dist/cjs/wcs-input.cjs.entry.js +228 -0
  42. package/dist/cjs/wcs-label.cjs.entry.js +20 -0
  43. package/dist/cjs/wcs-list-item-properties.cjs.entry.js +19 -0
  44. package/dist/cjs/wcs-list-item-property.cjs.entry.js +19 -0
  45. package/dist/cjs/wcs-list-item.cjs.entry.js +23 -0
  46. package/dist/cjs/wcs-mat-icon.cjs.entry.js +73 -0
  47. package/dist/cjs/wcs-modal.cjs.entry.js +50 -0
  48. package/dist/cjs/wcs-nav-item.cjs.entry.js +23 -0
  49. package/dist/cjs/wcs-nav.cjs.entry.js +19 -0
  50. package/dist/cjs/wcs-progress-bar.cjs.entry.js +47 -0
  51. package/dist/cjs/wcs-progress-radial.cjs.entry.js +30 -0
  52. package/dist/cjs/wcs-radio-group.cjs.entry.js +65 -0
  53. package/dist/cjs/wcs-radio.cjs.entry.js +49 -0
  54. package/dist/cjs/wcs-select_2.cjs.entry.js +4916 -0
  55. package/dist/cjs/wcs-spinner.cjs.entry.js +21 -0
  56. package/dist/cjs/wcs-switch.cjs.entry.js +42 -0
  57. package/dist/cjs/wcs-tab.cjs.entry.js +20 -0
  58. package/dist/cjs/wcs-tabs.cjs.entry.js +159 -0
  59. package/dist/cjs/wcs-textarea.cjs.entry.js +224 -0
  60. package/dist/cjs/wcs-tooltip.cjs.entry.js +1635 -0
  61. package/dist/cjs/wcs.cjs.js +3 -3
  62. package/dist/collection/collection-manifest.json +5 -2
  63. package/dist/collection/components/badge/badge-interface.js +1 -0
  64. package/dist/collection/components/badge/badge.js +14 -4
  65. package/dist/collection/components/button/button.css +79 -75
  66. package/dist/collection/components/button/button.js +23 -11
  67. package/dist/collection/components/card/card-interface.js +1 -0
  68. package/dist/collection/components/card/card.js +7 -2
  69. package/dist/collection/components/checkbox/checkbox.css +18 -7
  70. package/dist/collection/components/checkbox/checkbox.js +24 -2
  71. package/dist/collection/components/com-nav/com-nav.css +1 -2
  72. package/dist/collection/components/com-nav-category/com-nav-category.css +5 -6
  73. package/dist/collection/components/com-nav-category/com-nav-category.js +31 -1
  74. package/dist/collection/components/com-nav-submenu/com-nav-submenu.css +1 -2
  75. package/dist/collection/components/com-nav-submenu/com-nav-submenu.js +21 -1
  76. package/dist/collection/components/dropdown/dropdown-interface.js +1 -0
  77. package/dist/collection/components/dropdown/dropdown.css +46 -38
  78. package/dist/collection/components/dropdown/dropdown.js +90 -29
  79. package/dist/collection/components/dropdown-divider/dropdown-divider.css +7 -0
  80. package/dist/collection/components/dropdown-divider/dropdown-divider.js +14 -0
  81. package/dist/collection/components/dropdown-header/dropdown-header.css +8 -0
  82. package/dist/collection/components/dropdown-header/dropdown-header.js +15 -0
  83. package/dist/collection/components/editable-field/editable-field.js +7 -2
  84. package/dist/collection/components/footer/footer.css +1 -1
  85. package/dist/collection/components/form-field/form-field.css +1 -2
  86. package/dist/collection/components/form-field/form-field.js +0 -17
  87. package/dist/collection/components/grid/grid.js +75 -13
  88. package/dist/collection/components/grid-column/grid-column.css +5 -0
  89. package/dist/collection/components/grid-column/grid-column.js +70 -4
  90. package/dist/collection/components/grid-custom-cell/grid-custom-cell.js +45 -0
  91. package/dist/collection/components/grid-pagination/grid-pagination.js +4 -4
  92. package/dist/collection/components/header/header.css +1 -1
  93. package/dist/collection/components/horizontal-stepper/horizontal-stepper.js +7 -2
  94. package/dist/collection/components/input/input.css +48 -0
  95. package/dist/collection/components/input/input.js +40 -4
  96. package/dist/collection/components/mat-icon/mat-icon.css +1 -1
  97. package/dist/collection/components/mat-icon/mat-icon.js +7 -2
  98. package/dist/collection/components/modal/modal-interface.js +1 -0
  99. package/dist/collection/components/modal/modal.css +26 -7
  100. package/dist/collection/components/modal/modal.js +35 -7
  101. package/dist/collection/components/nav-item/nav-item.js +1 -1
  102. package/dist/collection/components/progress-bar/progress-bar.js +4 -4
  103. package/dist/collection/components/radio/radio.component.js +9 -4
  104. package/dist/collection/components/radio/radio.css +44 -19
  105. package/dist/collection/components/radio-group/radio-group.css +5 -1
  106. package/dist/collection/components/radio-group/radio-group.js +10 -5
  107. package/dist/collection/components/select/select.css +81 -77
  108. package/dist/collection/components/select/select.js +2 -2
  109. package/dist/collection/components/select-option/select-option.css +79 -75
  110. package/dist/collection/components/select-option/select-option.js +6 -7
  111. package/dist/collection/components/spinner/spinner-interface.js +1 -0
  112. package/dist/collection/components/spinner/spinner.js +8 -3
  113. package/dist/collection/components/switch/switch.css +53 -16
  114. package/dist/collection/components/switch/switch.js +55 -6
  115. package/dist/collection/components/tab/tab.js +5 -5
  116. package/dist/collection/components/tabs/tabs.js +2 -2
  117. package/dist/collection/components/textarea/textarea.css +4 -0
  118. package/dist/collection/components/textarea/textarea.js +2 -2
  119. package/dist/collection/components/tooltip/tooltip.css +3 -0
  120. package/dist/collection/components/tooltip/tooltip.js +310 -92
  121. package/dist/collection/utils/helpers.js +4 -0
  122. package/dist/esm/component-6b4d470f.js +1072 -0
  123. package/dist/esm/helpers-e2993152.js +77 -0
  124. package/dist/esm/{index-c619b1fa.js → index-b982604a.js} +165 -88
  125. package/dist/esm/loader.js +3 -3
  126. package/dist/{cjs/wcs-action-bar_47.cjs.entry.js → esm/lodash-d6d9d079.js} +12610 -22791
  127. package/dist/esm/popper-5f42e560.js +1729 -0
  128. package/dist/esm/select-arrow-73ac4016.js +34 -0
  129. package/dist/esm/wcs-action-bar.entry.js +20 -0
  130. package/dist/esm/wcs-app.entry.js +2 -2
  131. package/dist/esm/wcs-badge.entry.js +23 -0
  132. package/dist/esm/wcs-button.entry.js +82 -0
  133. package/dist/esm/wcs-card-body.entry.js +15 -0
  134. package/dist/esm/wcs-card.entry.js +16 -0
  135. package/dist/esm/wcs-checkbox.entry.js +43 -0
  136. package/dist/esm/wcs-com-nav-category.entry.js +59 -0
  137. package/dist/esm/wcs-com-nav-submenu.entry.js +65 -0
  138. package/dist/esm/wcs-com-nav.entry.js +15 -0
  139. package/dist/esm/wcs-divider.entry.js +15 -0
  140. package/dist/esm/wcs-dropdown-divider.entry.js +15 -0
  141. package/dist/esm/wcs-dropdown-header.entry.js +15 -0
  142. package/dist/esm/wcs-dropdown-item.entry.js +19 -0
  143. package/dist/esm/wcs-dropdown.entry.js +86 -0
  144. package/dist/esm/wcs-editable-field.entry.js +221 -0
  145. package/dist/esm/wcs-error_2.entry.js +132 -0
  146. package/dist/esm/wcs-field-content.entry.js +12 -0
  147. package/dist/esm/wcs-field-label.entry.js +12 -0
  148. package/dist/esm/wcs-field.entry.js +15 -0
  149. package/dist/esm/wcs-footer.entry.js +15 -0
  150. package/dist/esm/wcs-galactic-menu.entry.js +54 -0
  151. package/dist/esm/wcs-galactic.entry.js +37 -0
  152. package/dist/esm/wcs-grid-column.entry.js +73 -0
  153. package/dist/esm/wcs-grid-custom-cell.entry.js +12 -0
  154. package/dist/esm/wcs-grid-pagination.entry.js +4 -4
  155. package/dist/esm/wcs-grid.entry.js +328 -0
  156. package/dist/esm/wcs-header.entry.js +21 -0
  157. package/dist/esm/wcs-hint.entry.js +16 -0
  158. package/dist/esm/wcs-horizontal-stepper.entry.js +110 -0
  159. package/dist/esm/wcs-icon.entry.js +2 -2
  160. package/dist/esm/wcs-input.entry.js +224 -0
  161. package/dist/esm/wcs-label.entry.js +16 -0
  162. package/dist/esm/wcs-list-item-properties.entry.js +15 -0
  163. package/dist/esm/wcs-list-item-property.entry.js +15 -0
  164. package/dist/esm/wcs-list-item.entry.js +19 -0
  165. package/dist/esm/wcs-mat-icon.entry.js +69 -0
  166. package/dist/esm/wcs-modal.entry.js +46 -0
  167. package/dist/esm/wcs-nav-item.entry.js +19 -0
  168. package/dist/esm/wcs-nav.entry.js +15 -0
  169. package/dist/esm/wcs-progress-bar.entry.js +43 -0
  170. package/dist/esm/wcs-progress-radial.entry.js +26 -0
  171. package/dist/esm/wcs-radio-group.entry.js +61 -0
  172. package/dist/esm/wcs-radio.entry.js +45 -0
  173. package/dist/esm/wcs-select_2.entry.js +4911 -0
  174. package/dist/esm/wcs-spinner.entry.js +17 -0
  175. package/dist/esm/wcs-switch.entry.js +38 -0
  176. package/dist/esm/wcs-tab.entry.js +16 -0
  177. package/dist/esm/wcs-tabs.entry.js +155 -0
  178. package/dist/esm/wcs-textarea.entry.js +220 -0
  179. package/dist/esm/wcs-tooltip.entry.js +1631 -0
  180. package/dist/esm/wcs.js +3 -3
  181. package/dist/types/components/badge/badge-interface.d.ts +2 -0
  182. package/dist/types/components/badge/badge.d.ts +3 -2
  183. package/dist/types/components/button/button.d.ts +7 -3
  184. package/dist/types/components/card/card-interface.d.ts +1 -0
  185. package/dist/types/components/card/card.d.ts +2 -1
  186. package/dist/types/components/checkbox/checkbox.d.ts +4 -0
  187. package/dist/types/components/com-nav-category/com-nav-category.d.ts +7 -0
  188. package/dist/types/components/com-nav-submenu/com-nav-submenu.d.ts +7 -0
  189. package/dist/types/components/dropdown/dropdown-interface.d.ts +1 -0
  190. package/dist/types/components/dropdown/dropdown.d.ts +13 -16
  191. package/dist/types/components/dropdown-divider/dropdown-divider.d.ts +3 -0
  192. package/dist/types/components/dropdown-header/dropdown-header.d.ts +3 -0
  193. package/dist/types/components/editable-field/editable-field-interface.d.ts +1 -0
  194. package/dist/types/components/editable-field/editable-field.d.ts +2 -2
  195. package/dist/types/components/form-field/form-field.d.ts +0 -4
  196. package/dist/types/components/grid/grid.d.ts +18 -0
  197. package/dist/types/components/grid-column/grid-column.d.ts +6 -1
  198. package/dist/types/components/grid-custom-cell/grid-custom-cell.d.ts +12 -0
  199. package/dist/types/components/horizontal-stepper/horizontal-stepper-interface.d.ts +1 -0
  200. package/dist/types/components/horizontal-stepper/horizontal-stepper.d.ts +2 -2
  201. package/dist/types/components/input/input.d.ts +8 -0
  202. package/dist/types/components/mat-icon/mat-icon-interface.d.ts +1 -0
  203. package/dist/types/components/mat-icon/mat-icon.d.ts +2 -2
  204. package/dist/types/components/modal/modal-interface.d.ts +1 -0
  205. package/dist/types/components/modal/modal.d.ts +7 -1
  206. package/dist/types/components/radio/radio.component.d.ts +2 -1
  207. package/dist/types/components/radio-group/radio-group-interface.d.ts +1 -0
  208. package/dist/types/components/radio-group/radio-group.d.ts +2 -2
  209. package/dist/types/components/select-option/select-option.d.ts +2 -0
  210. package/dist/types/components/spinner/spinner-interface.d.ts +1 -0
  211. package/dist/types/components/spinner/spinner.d.ts +2 -1
  212. package/dist/types/components/switch/switch-interface.d.ts +1 -0
  213. package/dist/types/components/switch/switch.d.ts +10 -2
  214. package/dist/types/components/tooltip/tooltip.d.ts +70 -6
  215. package/dist/types/components.d.ts +253 -41
  216. package/dist/types/interfaces.d.ts +22 -0
  217. package/dist/types/stencil-public-runtime.d.ts +189 -186
  218. package/dist/types/utils/helpers.d.ts +1 -0
  219. package/dist/wcs/p-03b2e238.entry.js +1 -0
  220. package/dist/wcs/p-08a7e84d.entry.js +1 -0
  221. package/dist/wcs/p-16dfbae8.js +127 -0
  222. package/dist/wcs/p-1dce7e63.entry.js +1 -0
  223. package/dist/wcs/p-1f5aed36.entry.js +1 -0
  224. package/dist/wcs/p-214236db.entry.js +1 -0
  225. package/dist/wcs/p-22813c8e.entry.js +1 -0
  226. package/dist/wcs/p-26b5c0a3.entry.js +1 -0
  227. package/dist/wcs/p-2e6265dc.entry.js +1 -0
  228. package/dist/wcs/p-384068f7.entry.js +1 -0
  229. package/dist/wcs/p-41037455.entry.js +1 -0
  230. package/dist/wcs/p-474d6601.entry.js +1 -0
  231. package/dist/wcs/p-4e9e226d.entry.js +1 -0
  232. package/dist/wcs/p-55fdc284.entry.js +1 -0
  233. package/dist/wcs/p-5b35b232.entry.js +1 -0
  234. package/dist/wcs/p-600a9cc0.entry.js +1 -0
  235. package/dist/wcs/p-60b51967.entry.js +1 -0
  236. package/dist/wcs/p-65c5ccc5.entry.js +1 -0
  237. package/dist/wcs/p-688fea65.entry.js +1 -0
  238. package/dist/wcs/p-716d5921.entry.js +1 -0
  239. package/dist/wcs/p-7206e492.entry.js +1 -0
  240. package/dist/wcs/p-7219c04b.js +1 -0
  241. package/dist/wcs/p-7c26f650.entry.js +1 -0
  242. package/dist/wcs/p-8137f075.entry.js +1 -0
  243. package/dist/wcs/p-8864a491.entry.js +1 -0
  244. package/dist/wcs/p-8c8740e3.entry.js +1 -0
  245. package/dist/wcs/p-91a2de07.entry.js +1 -0
  246. package/dist/wcs/p-94a31f64.entry.js +1 -0
  247. package/dist/wcs/p-9619f77a.entry.js +1 -0
  248. package/dist/wcs/p-979dfd78.entry.js +1 -0
  249. package/dist/wcs/p-9ba52bc4.entry.js +1 -0
  250. package/dist/wcs/p-a1ee1551.entry.js +1 -0
  251. package/dist/wcs/p-a92d369e.entry.js +1 -0
  252. package/dist/wcs/p-a978c1e3.entry.js +1 -0
  253. package/dist/wcs/p-adef7aaf.js +1 -0
  254. package/dist/wcs/p-b5ffbea8.entry.js +1 -0
  255. package/dist/wcs/p-b7184d59.entry.js +1 -0
  256. package/dist/wcs/p-bbf1ef42.entry.js +1 -0
  257. package/dist/wcs/p-c7d6d3e1.entry.js +15 -0
  258. package/dist/wcs/p-cf4d7a83.js +1 -0
  259. package/dist/wcs/p-d3c9a644.js +1 -0
  260. package/dist/wcs/p-db68379f.entry.js +1 -0
  261. package/dist/wcs/p-dbbc3f58.entry.js +1 -0
  262. package/dist/wcs/p-dc817204.entry.js +1 -0
  263. package/dist/wcs/p-e0163de8.entry.js +1 -0
  264. package/dist/wcs/p-e4236d32.entry.js +1 -0
  265. package/dist/wcs/p-e43358e4.entry.js +1 -0
  266. package/dist/wcs/p-e9ce507c.entry.js +1 -0
  267. package/dist/wcs/p-ecbe5165.entry.js +6 -0
  268. package/dist/wcs/p-f430a227.entry.js +1 -0
  269. package/dist/wcs/p-f46e6c3c.js +1 -0
  270. package/dist/wcs/p-f96bb0bf.entry.js +1 -0
  271. package/dist/wcs/p-f9944bde.entry.js +1 -0
  272. package/dist/wcs/p-fa173947.entry.js +1 -0
  273. package/dist/wcs/p-fb1577b5.entry.js +1 -0
  274. package/dist/wcs/p-febe9ccc.entry.js +1 -0
  275. package/dist/wcs/p-ff6d0dfd.entry.js +1 -0
  276. package/dist/wcs/wcs.css +1 -1
  277. package/dist/wcs/wcs.esm.js +1 -1
  278. package/loader/index.d.ts +0 -1
  279. package/package.json +25 -22
  280. package/dist/types/interface.d.ts +0 -3
  281. package/dist/wcs/p-16dca526.entry.js +0 -1
  282. package/dist/wcs/p-4f228fcb.entry.js +0 -134
  283. package/dist/wcs/p-66520e5a.entry.js +0 -1
  284. package/dist/wcs/p-d31287c6.entry.js +0 -1
  285. package/dist/wcs/p-f73f235b.js +0 -1
  286. package/schematics/.gitignore +0 -18
  287. package/schematics/.npmignore +0 -4
  288. package/schematics/collection.json +0 -9
  289. package/schematics/src/ng-add/files/fonts/avenir-black.woff +0 -0
  290. package/schematics/src/ng-add/files/fonts/avenir-book.woff +0 -0
  291. package/schematics/src/ng-add/files/fonts/avenir-lighter.woff +0 -0
  292. package/schematics/src/ng-add/files/fonts/avenir-medium.woff +0 -0
  293. package/schematics/src/ng-add/files/sncf-logo.png +0 -0
  294. package/schematics/src/ng-add/index.d.ts +0 -3
  295. package/schematics/src/ng-add/index.js +0 -119
  296. package/schematics/src/ng-add/index.js.map +0 -1
  297. package/schematics/src/ng-add/schema.json +0 -5
@@ -0,0 +1,21 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-3cb9d725.js');
6
+
7
+ const spinnerCss = "@keyframes wcs-spinner-border{to{transform:rotate(360deg)}}@keyframes wcs-spinner-grow{0%{transform:scale(0)}50%{opacity:1}}:host{display:inline-block;width:2rem;height:2rem;vertical-align:text-bottom;border-radius:50%}:host([mode=border]){border:0.25em solid var(--wcs-base);border-right-color:transparent;animation:wcs-spinner-border 0.75s linear infinite}:host([mode=growing]){background-color:var(--wcs-base);opacity:0;animation:wcs-spinner-grow 0.75s linear infinite}";
8
+
9
+ let Spinner = class {
10
+ constructor(hostRef) {
11
+ index.registerInstance(this, hostRef);
12
+ /**
13
+ * Indicates the spinner display mode.
14
+ * Accepted values: `border` or `growing`
15
+ */
16
+ this.mode = 'border';
17
+ }
18
+ };
19
+ Spinner.style = spinnerCss;
20
+
21
+ exports.wcs_spinner = Spinner;
@@ -0,0 +1,42 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-3cb9d725.js');
6
+
7
+ const switchCss = ":host{--wcs-switch-background-color-initial:var(--wcs-text-light);--wcs-switch-background-color-final:var(--wcs-primary);--wcs-switch-bullet-color-initial:var(--wcs-switch-background-color-final);--wcs-switch-bullet-color-final:var(--wcs-switch-background-color-initial);--wcs-switch-text-color:var(--wcs-text-medium);display:flex}:host([disabled]){--wcs-switch-text-color:var(--wcs-text-disabled)}.wcs-container{position:relative;display:flex;margin-bottom:0}:host([label-alignment=top]) .wcs-container{align-items:start}:host([label-alignment=center]) .wcs-container{align-items:center}:host([label-alignment=bottom]) .wcs-container{align-items:flex-end}.wcs-container input{position:absolute;opacity:0;height:0;width:0}.text{color:var(--wcs-switch-text-color);margin-left:6px;font-weight:500;line-height:1.375}.wcs-container:not([aria-disabled]) input:checked~.text{--wcs-switch-text-color:var(--wcs-primary)}.wcs-checkmark::before{position:absolute;transition:all 0.15s ease-out}.wcs-checkmark::before{bottom:0.3125rem;left:0.3125rem;width:0.875rem;height:0.875rem;content:\"\";border-radius:50%;background-color:var(--wcs-switch-bullet-color-initial)}:host([disabled]:not([checked])) .wcs-checkmark::before{background-color:var(--wcs-text-disabled)}:host([disabled]:not([checked])) .wcs-checkmark{background-color:var(--wcs-light)}:host([disabled][checked]) .wcs-checkmark::before{background-color:var(--wcs-white)}:host([disabled][checked]) .wcs-checkmark{background-color:var(--wcs-text-disabled)}.wcs-checkmark{top:0;right:0;bottom:0;left:0;width:3rem;height:1.5rem;border-radius:0.75rem;background-color:var(--wcs-switch-background-color-initial)}.wcs-container:not([aria-disabled]){cursor:pointer}.wcs-container:hover:not([aria-disabled]){--wcs-switch-text-color:var(--wcs-primary)}input:not([disabled]):checked+.wcs-checkmark::before,.wcs-container:hover input:not([disabled])+.wcs-checkmark::before,.wcs-container:focus input:not([disabled])+.wcs-checkmark::before{background-color:var(--wcs-switch-bullet-color-final)}input:checked+.wcs-checkmark::before{transform:translateX(24px)}input:not([disabled]):checked+.wcs-checkmark,.wcs-container:hover input:not([disabled])+.wcs-checkmark,.wcs-container:focus input:not([disabled])+.wcs-checkmark{background-color:var(--wcs-switch-background-color-final)}";
8
+
9
+ let Switch = class {
10
+ constructor(hostRef) {
11
+ index.registerInstance(this, hostRef);
12
+ this.wcsChange = index.createEvent(this, "wcsChange", 7);
13
+ this.switchId = `wcs-switch-${switchIds++}`;
14
+ this.name = this.switchId;
15
+ /**
16
+ * If `true`, the switch is selected.
17
+ */
18
+ this.checked = false;
19
+ /**
20
+ * Specifie the alignment of the switch with the label content
21
+ */
22
+ this.labelAlignment = 'center';
23
+ /**
24
+ * Specify wether the switch is disabled or not.
25
+ */
26
+ this.disabled = false;
27
+ }
28
+ toggleChange(_event) {
29
+ this.checked = !this.checked;
30
+ this.wcsChange.emit({
31
+ checked: this.checked
32
+ });
33
+ }
34
+ render() {
35
+ return (index.h(index.Host, null, index.h("label", { htmlFor: this.name, class: "wcs-container", "aria-disabled": this.disabled }, index.h("input", { onChange: (evt) => this.toggleChange(evt), checked: this.checked, class: "wcs-switch", type: "checkbox", name: this.name, disabled: this.disabled, id: this.name }), index.h("span", { class: "wcs-checkmark" }), index.h("span", { class: "text" }, index.h("slot", null)))));
36
+ }
37
+ get el() { return index.getElement(this); }
38
+ };
39
+ let switchIds = 0;
40
+ Switch.style = switchCss;
41
+
42
+ exports.wcs_switch = Switch;
@@ -0,0 +1,20 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-3cb9d725.js');
6
+
7
+ let Tab = class {
8
+ constructor(hostRef) {
9
+ index.registerInstance(this, hostRef);
10
+ this.tabLoaded = index.createEvent(this, "tabLoaded", 7);
11
+ }
12
+ componentDidLoad() {
13
+ this.tabLoaded.emit();
14
+ }
15
+ render() {
16
+ return (index.h(index.Host, { slot: "wcs-tab" }, index.h("slot", null)));
17
+ }
18
+ };
19
+
20
+ exports.wcs_tab = Tab;
@@ -0,0 +1,159 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-3cb9d725.js');
6
+
7
+ const tabsCss = ":host{--wcs-tabs-padding-bottom:16px}:host([align=start]) .wcs-tabs-headers{justify-content:start}:host([align=end]) .wcs-tabs-headers{justify-content:end}:host([align=center]) .wcs-tabs-headers{justify-content:center}.wcs-tabs-headers{padding-top:4px;overflow-x:auto;display:flex;position:relative}:host([gutter]) .wcs-tabs-headers{border-bottom:var(--wcs-tabs-headers-border-bottom)}.wcs-tab-header{padding:8px 24px 16px 0;display:flex;flex-shrink:0;align-items:center;justify-content:center;cursor:pointer;outline:none}.wcs-tab-header span{text-align:center;color:var(--wcs-text-disabled);font-size:1rem;font-weight:400}.wcs-tab-header:focus span,.wcs-tab-header:hover span{color:var(--wcs-primary)}.active span{font-weight:500;color:var(--wcs-primary);position:relative}.active span::after{position:absolute;bottom:calc(var(--wcs-tabs-padding-bottom) * -1);left:0;width:100%;height:0.3125rem;content:\"\";background-color:#0088ce;border-radius:3px}";
8
+
9
+ let Tabs = class {
10
+ constructor(hostRef) {
11
+ index.registerInstance(this, hostRef);
12
+ this.tabChange = index.createEvent(this, "tabChange", 7);
13
+ /**
14
+ * Tab headers alignment.
15
+ */
16
+ this.align = 'start';
17
+ /**
18
+ * Current selected tab index.
19
+ * Starts at 0.
20
+ */
21
+ this.selectedIndex = 0;
22
+ /**
23
+ * Whether to skip rendering the tabpanel with the content of the selected tab. Use this prop if you plan to
24
+ * separately render the tab content.
25
+ */
26
+ this.headersOnly = false;
27
+ this.headers = [];
28
+ this.currentActiveTabIndex = 0;
29
+ }
30
+ selectedIndexChanged(newValue) {
31
+ this.currentActiveTabIndex = newValue;
32
+ }
33
+ selectedTabkeyChanged(newValue) {
34
+ this.updateCurrentActiveIndexByTabKey(newValue);
35
+ }
36
+ emitActiveTabChange() {
37
+ this.tabChange.emit({
38
+ tabName: this.headers[this.currentActiveTabIndex],
39
+ tabIndex: this.currentActiveTabIndex,
40
+ selectedKey: this.tabs[this.currentActiveTabIndex].itemKey
41
+ });
42
+ }
43
+ updateCurrentActiveIndexByTabKey(newValue) {
44
+ for (let i = 0; i < this.tabs.length; i++) {
45
+ const tab = this.tabs[i];
46
+ if (tab.itemKey === newValue) {
47
+ this.currentActiveTabIndex = i;
48
+ }
49
+ }
50
+ }
51
+ onTabLoaded() {
52
+ this.refreshHeaders();
53
+ }
54
+ componentDidLoad() {
55
+ this.putTabsInCorrectDivIfTheyAreNot();
56
+ this.refreshHeaders();
57
+ if (this.selectedIndex) {
58
+ this.currentActiveTabIndex = this.selectedIndex;
59
+ }
60
+ if (this.selectedKey) {
61
+ this.updateCurrentActiveIndexByTabKey(this.selectedKey);
62
+ }
63
+ }
64
+ // XXX: Firefox < 63
65
+ putTabsInCorrectDivIfTheyAreNot() {
66
+ const tabDiv = this.el.shadowRoot.querySelector('.wcs-tabs');
67
+ if (tabDiv.querySelector('slot') === null) {
68
+ Array.from(this.el.querySelectorAll('wcs-tab'))
69
+ .filter(node => node.parentNode !== tabDiv)
70
+ .forEach(tab => {
71
+ if (tab.parentElement.isEqualNode(this.el)) {
72
+ this.el.removeChild(tab);
73
+ tabDiv.appendChild(tab);
74
+ }
75
+ });
76
+ }
77
+ }
78
+ handleKeyDown(ev, tabIndex) {
79
+ const target = ev.target;
80
+ switch (ev.key) {
81
+ case ' ':
82
+ case 'Enter': {
83
+ this.currentActiveTabIndex = tabIndex;
84
+ this.emitActiveTabChange();
85
+ ev.preventDefault();
86
+ break;
87
+ }
88
+ case 'ArrowLeft': {
89
+ if (target.previousElementSibling
90
+ && target.previousElementSibling.classList.contains('wcs-tab-header')) {
91
+ target.previousElementSibling.focus();
92
+ ev.preventDefault();
93
+ }
94
+ break;
95
+ }
96
+ case 'ArrowRight': {
97
+ if (target.nextElementSibling
98
+ && target.nextElementSibling.classList.contains('wcs-tab-header')) {
99
+ target.nextElementSibling.focus();
100
+ ev.preventDefault();
101
+ }
102
+ break;
103
+ }
104
+ }
105
+ }
106
+ refreshHeaders() {
107
+ this.headers = [];
108
+ this.tabs
109
+ .forEach(x => {
110
+ this.headers.push(x.getAttribute('header'));
111
+ });
112
+ }
113
+ get tabs() {
114
+ const tabsEl = this.el.shadowRoot.querySelector('.wcs-tabs');
115
+ // FIXME: problem with this selector being too greedy in ff < 63
116
+ const tabs = this.el.shadowRoot.querySelectorAll('.wcs-tabs > wcs-tab');
117
+ return tabs.length !== 0
118
+ ? tabs
119
+ : tabsEl.querySelector('slot')
120
+ ? tabsEl.querySelector('slot').assignedElements()
121
+ : [];
122
+ }
123
+ selectTabAndEmitChangeEvent(index) {
124
+ this.currentActiveTabIndex = index;
125
+ this.emitActiveTabChange();
126
+ }
127
+ componentWillUpdate() {
128
+ if (!this.headersOnly) {
129
+ this.updateTabVisibility();
130
+ }
131
+ else {
132
+ this.hideAllTabsContent();
133
+ }
134
+ }
135
+ updateTabVisibility() {
136
+ this.tabs.forEach((el, idx) => {
137
+ if (idx !== this.currentActiveTabIndex) {
138
+ el.setAttribute('style', 'display: none;');
139
+ }
140
+ else {
141
+ el.setAttribute('style', 'display: block;');
142
+ }
143
+ });
144
+ }
145
+ hideAllTabsContent() {
146
+ this.tabs.forEach((el) => el.setAttribute('style', 'display: none;'));
147
+ }
148
+ render() {
149
+ return (index.h(index.Host, null, index.h("div", { class: "wcs-tabs-headers" }, this.headers.map((header, idx) => index.h("div", { class: 'wcs-tab-header ' + (this.currentActiveTabIndex === idx ? 'active' : ''), onClick: () => this.selectTabAndEmitChangeEvent(idx), onKeyDown: evt => this.handleKeyDown(evt, idx), tabIndex: idx }, index.h("span", null, header)))), index.h("div", { class: "wcs-tabs" }, index.h("slot", { name: "wcs-tab" }))));
150
+ }
151
+ get el() { return index.getElement(this); }
152
+ static get watchers() { return {
153
+ "selectedIndex": ["selectedIndexChanged"],
154
+ "selectedKey": ["selectedTabkeyChanged"]
155
+ }; }
156
+ };
157
+ Tabs.style = tabsCss;
158
+
159
+ exports.wcs_tabs = Tabs;
@@ -0,0 +1,224 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-3cb9d725.js');
6
+ const helpers = require('./helpers-6abce594.js');
7
+
8
+ const textareaCss = ":host{--wcs-textarea-icon-color:var(--wcs-text-medium);--wcs-internal-textarea-border-radius-left:var(--wcs-textarea-border-radius-left, var(--wcs-border-radius));--wcs-internal-textarea-border-radius-right:var(--wcs-textarea-border-radius-right, var(--wcs-border-radius));display:flex;flex-direction:row;width:100%;border-radius:var(--wcs-internal-textarea-border-radius-left) var(--wcs-internal-textarea-border-radius-right) var(--wcs-internal-textarea-border-radius-right) var(--wcs-internal-textarea-border-radius-left);background-color:var(--wcs-light);border:1px solid var(--wcs-light);background-clip:padding-box}:host ::placeholder{font-weight:400;font-style:italic}:host textarea{overflow:auto;flex:1;width:100%;box-sizing:border-box;min-height:24px;background-color:transparent;font-family:var(--wcs-font-sans-serif);color:var(--wcs-primary);font-weight:var(--wcs-font-weight-form-value) !important;border:none;padding:calc(var(--wcs-padding) / 2) var(--wcs-padding);font-size:1rem;line-height:1.5}:host textarea:focus{box-shadow:none;outline:0}:host wcs-mat-icon{position:relative;margin-top:7px;margin-left:8px;margin-right:-8px}:host([disabled]) textarea{color:var(--wcs-text-disabled)}:host([state=error]){border-color:var(--wcs-red) !important}:host(:focus-within){border:solid 1px var(--wcs-primary)}:host(:focus-within) wcs-mat-icon{color:var(--wcs-primary)}";
9
+
10
+ let Textarea = class {
11
+ constructor(hostRef) {
12
+ index.registerInstance(this, hostRef);
13
+ this.wcsChange = index.createEvent(this, "wcsChange", 7);
14
+ this.wcsInput = index.createEvent(this, "wcsInput", 7);
15
+ this.wcsBlur = index.createEvent(this, "wcsBlur", 7);
16
+ this.wcsFocus = index.createEvent(this, "wcsFocus", 7);
17
+ this.inputId = `wcs-textarea-${textareaIds++}`;
18
+ this.didBlurAfterEdit = false;
19
+ this.inheritedAttributes = {};
20
+ /**
21
+ * This is required for a WebKit bug which requires us to
22
+ * blur and focus an input to properly focus the input in
23
+ * an item with delegatesFocus. It will no longer be needed
24
+ * with iOS 14.
25
+ *
26
+ * @internal
27
+ */
28
+ this.fireFocusEvents = true;
29
+ this.hasFocus = false;
30
+ /**
31
+ * Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user.
32
+ */
33
+ this.autocapitalize = 'none';
34
+ /**
35
+ * This Boolean attribute lets you specify that a form control should have input focus when the page loads.
36
+ */
37
+ this.autofocus = false;
38
+ /**
39
+ * If `true`, the value will be cleared after focus upon edit. Defaults to `true` when `type` is `"password"`, `false` for all other types.
40
+ */
41
+ this.clearOnEdit = false;
42
+ /**
43
+ * Set the amount of time, in milliseconds, to wait to trigger the `wcsChange` event after each keystroke. This also impacts form bindings such as `ngModel` or `v-model`.
44
+ */
45
+ this.debounce = 0;
46
+ /**
47
+ * If `true`, the user cannot interact with the textarea.
48
+ */
49
+ this.disabled = false;
50
+ /**
51
+ * The name of the control, which is submitted with the form data.
52
+ */
53
+ this.name = this.inputId;
54
+ /**
55
+ * If `true`, the user cannot modify the value.
56
+ */
57
+ this.readonly = false;
58
+ /**
59
+ * If `true`, the user must fill in a value before submitting a form.
60
+ */
61
+ this.required = false;
62
+ /**
63
+ * If `true`, the element will have its spelling and grammar checked.
64
+ */
65
+ this.spellcheck = false;
66
+ /**
67
+ * Specifies the state of the input. By default the input is in an initial state but you can set it to 'error' state if the data given by the user is not valid.
68
+ */
69
+ this.state = 'initial';
70
+ /**
71
+ * If `true`, the element height will increase based on the value.
72
+ */
73
+ this.autoGrow = false;
74
+ /**
75
+ * The value of the textarea.
76
+ */
77
+ this.value = '';
78
+ this.onInput = (ev) => {
79
+ if (this.nativeInput) {
80
+ this.value = this.nativeInput.value;
81
+ }
82
+ this.wcsInput.emit(ev);
83
+ };
84
+ this.onFocus = (ev) => {
85
+ this.hasFocus = true;
86
+ this.focusChange();
87
+ if (this.fireFocusEvents) {
88
+ this.wcsFocus.emit(ev);
89
+ }
90
+ };
91
+ this.onBlur = (ev) => {
92
+ this.hasFocus = false;
93
+ this.focusChange();
94
+ if (this.fireFocusEvents) {
95
+ this.wcsBlur.emit(ev);
96
+ }
97
+ };
98
+ this.onKeyDown = () => {
99
+ this.checkClearOnEdit();
100
+ };
101
+ }
102
+ debounceChanged() {
103
+ this.wcsChange = helpers.debounceEvent(this.wcsChange, this.debounce);
104
+ }
105
+ /**
106
+ * Update the native input element when the value changes
107
+ */
108
+ valueChanged() {
109
+ const nativeInput = this.nativeInput;
110
+ const value = this.getValue();
111
+ if (nativeInput && nativeInput.value !== value) {
112
+ nativeInput.value = value;
113
+ }
114
+ this.runAutoGrow();
115
+ this.wcsChange.emit({ value });
116
+ }
117
+ connectedCallback() {
118
+ this.debounceChanged();
119
+ {
120
+ document.dispatchEvent(new CustomEvent('wcsInputDidLoad', {
121
+ detail: this.el
122
+ }));
123
+ }
124
+ }
125
+ disconnectedCallback() {
126
+ {
127
+ document.dispatchEvent(new CustomEvent('wcsInputDidUnload', {
128
+ detail: this.el
129
+ }));
130
+ }
131
+ }
132
+ componentWillLoad() {
133
+ this.inheritedAttributes = helpers.inheritAttributes(this.el, ['title']);
134
+ }
135
+ componentDidLoad() {
136
+ helpers.raf(() => this.runAutoGrow());
137
+ }
138
+ runAutoGrow() {
139
+ const nativeInput = this.nativeInput;
140
+ if (nativeInput && this.autoGrow) {
141
+ index.readTask(() => {
142
+ nativeInput.style.height = 'auto';
143
+ nativeInput.style.height = nativeInput.scrollHeight + 'px';
144
+ });
145
+ }
146
+ }
147
+ /**
148
+ * This method make the textarea automatically adopt the size of the content without a scroll bar
149
+ */
150
+ async fitContent() {
151
+ helpers.raf(() => this.runAutoGrow());
152
+ }
153
+ /**
154
+ * Sets focus on the native `textarea` in `wcs-textarea`. Use this method instead of the global
155
+ * `textarea.focus()`.
156
+ */
157
+ async setFocus() {
158
+ if (this.nativeInput) {
159
+ this.nativeInput.focus();
160
+ }
161
+ }
162
+ /**
163
+ * Sets blur on the native `textarea` in `wcs-textarea`. Use this method instead of the global
164
+ * `textarea.blur()`.
165
+ * @internal
166
+ */
167
+ async setBlur() {
168
+ if (this.nativeInput) {
169
+ this.nativeInput.blur();
170
+ }
171
+ }
172
+ /**
173
+ * Returns the native `<textarea>` element used under the hood.
174
+ */
175
+ getInputElement() {
176
+ // tslint:disable-next-line:no-non-null-assertion
177
+ return Promise.resolve(this.nativeInput);
178
+ }
179
+ /**
180
+ * Check if we need to clear the text input if clearOnEdit is enabled
181
+ */
182
+ checkClearOnEdit() {
183
+ if (!this.clearOnEdit) {
184
+ return;
185
+ }
186
+ // Did the input value change after it was blurred and edited?
187
+ if (this.didBlurAfterEdit && this.hasValue()) {
188
+ // Clear the input
189
+ this.value = '';
190
+ }
191
+ // Reset the flag
192
+ this.didBlurAfterEdit = false;
193
+ }
194
+ focusChange() {
195
+ // If clearOnEdit is enabled and the input blurred but has a value, set a flag
196
+ if (this.clearOnEdit && !this.hasFocus && this.hasValue()) {
197
+ this.didBlurAfterEdit = true;
198
+ }
199
+ }
200
+ hasValue() {
201
+ return this.getValue() !== '';
202
+ }
203
+ getValue() {
204
+ return this.value || '';
205
+ }
206
+ render() {
207
+ const value = this.getValue();
208
+ const labelId = this.inputId + '-lbl';
209
+ const label = helpers.findItemLabel(this.el);
210
+ if (label) {
211
+ label.id = labelId;
212
+ }
213
+ return (index.h(index.Host, { "aria-disabled": this.disabled ? 'true' : null }, this.icon ? (index.h("wcs-mat-icon", { icon: this.icon, size: "m" })) : null, index.h("textarea", Object.assign({ class: "native-textarea", "aria-labelledby": label ? labelId : null, ref: el => this.nativeInput = el, autoCapitalize: this.autocapitalize, autoFocus: this.autofocus, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, disabled: this.disabled, maxLength: this.maxlength, minLength: this.minlength, name: this.name, placeholder: this.placeholder || '', readOnly: this.readonly, required: this.required, spellcheck: this.spellcheck, cols: this.cols, rows: this.rows, wrap: this.wrap, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.onKeyDown }, this.inheritedAttributes), value)));
214
+ }
215
+ get el() { return index.getElement(this); }
216
+ static get watchers() { return {
217
+ "debounce": ["debounceChanged"],
218
+ "value": ["valueChanged"]
219
+ }; }
220
+ };
221
+ let textareaIds = 0;
222
+ Textarea.style = textareaCss;
223
+
224
+ exports.wcs_textarea = Textarea;