wcs-core 2.5.4 → 2.6.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 (221) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/README.md +1 -1
  3. package/dist/cjs/component-fc28ed16.js +1074 -0
  4. package/dist/cjs/helpers-d9aaa8c4.js +81 -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/select-arrow-76ccf86d.js +36 -0
  9. package/dist/cjs/wcs-action-bar.cjs.entry.js +24 -0
  10. package/dist/cjs/wcs-app.cjs.entry.js +2 -2
  11. package/dist/cjs/wcs-badge.cjs.entry.js +27 -0
  12. package/dist/cjs/wcs-button.cjs.entry.js +86 -0
  13. package/dist/cjs/wcs-card-body.cjs.entry.js +19 -0
  14. package/dist/cjs/wcs-card.cjs.entry.js +20 -0
  15. package/dist/cjs/wcs-checkbox.cjs.entry.js +43 -0
  16. package/dist/cjs/wcs-com-nav-category.cjs.entry.js +63 -0
  17. package/dist/cjs/wcs-com-nav-submenu.cjs.entry.js +69 -0
  18. package/dist/cjs/wcs-com-nav.cjs.entry.js +19 -0
  19. package/dist/cjs/wcs-divider.cjs.entry.js +19 -0
  20. package/dist/cjs/wcs-dropdown-item.cjs.entry.js +23 -0
  21. package/dist/cjs/wcs-dropdown.cjs.entry.js +57 -0
  22. package/dist/cjs/wcs-editable-field.cjs.entry.js +225 -0
  23. package/dist/cjs/wcs-error_2.cjs.entry.js +137 -0
  24. package/dist/cjs/wcs-field-content.cjs.entry.js +16 -0
  25. package/dist/cjs/wcs-field-label.cjs.entry.js +16 -0
  26. package/dist/cjs/wcs-field.cjs.entry.js +19 -0
  27. package/dist/cjs/wcs-footer.cjs.entry.js +19 -0
  28. package/dist/cjs/wcs-galactic-menu.cjs.entry.js +1785 -0
  29. package/dist/cjs/wcs-galactic.cjs.entry.js +41 -0
  30. package/dist/cjs/wcs-grid-column.cjs.entry.js +73 -0
  31. package/dist/cjs/wcs-grid-custom-cell.cjs.entry.js +16 -0
  32. package/dist/cjs/wcs-grid-pagination.cjs.entry.js +4 -4
  33. package/dist/cjs/wcs-grid.cjs.entry.js +309 -0
  34. package/dist/cjs/wcs-header.cjs.entry.js +25 -0
  35. package/dist/cjs/wcs-hint.cjs.entry.js +20 -0
  36. package/dist/cjs/wcs-horizontal-stepper.cjs.entry.js +114 -0
  37. package/dist/cjs/wcs-icon.cjs.entry.js +2 -2
  38. package/dist/cjs/wcs-input.cjs.entry.js +228 -0
  39. package/dist/cjs/wcs-label.cjs.entry.js +20 -0
  40. package/dist/cjs/wcs-list-item-properties.cjs.entry.js +19 -0
  41. package/dist/cjs/wcs-list-item-property.cjs.entry.js +19 -0
  42. package/dist/cjs/wcs-list-item.cjs.entry.js +23 -0
  43. package/dist/cjs/wcs-mat-icon.cjs.entry.js +73 -0
  44. package/dist/cjs/wcs-modal.cjs.entry.js +45 -0
  45. package/dist/cjs/wcs-nav-item.cjs.entry.js +23 -0
  46. package/dist/cjs/wcs-nav.cjs.entry.js +19 -0
  47. package/dist/cjs/wcs-progress-bar.cjs.entry.js +47 -0
  48. package/dist/cjs/wcs-progress-radial.cjs.entry.js +30 -0
  49. package/dist/cjs/wcs-radio-group.cjs.entry.js +65 -0
  50. package/dist/cjs/wcs-radio.cjs.entry.js +49 -0
  51. package/dist/cjs/wcs-select_2.cjs.entry.js +4916 -0
  52. package/dist/cjs/wcs-spinner.cjs.entry.js +21 -0
  53. package/dist/cjs/wcs-switch.cjs.entry.js +34 -0
  54. package/dist/cjs/wcs-tab.cjs.entry.js +20 -0
  55. package/dist/cjs/wcs-tabs.cjs.entry.js +159 -0
  56. package/dist/cjs/wcs-textarea.cjs.entry.js +224 -0
  57. package/dist/cjs/wcs-tooltip.cjs.entry.js +129 -0
  58. package/dist/cjs/wcs.cjs.js +3 -3
  59. package/dist/collection/collection-manifest.json +3 -2
  60. package/dist/collection/components/button/button.css +79 -75
  61. package/dist/collection/components/button/button.js +23 -11
  62. package/dist/collection/components/com-nav/com-nav.css +1 -2
  63. package/dist/collection/components/com-nav-category/com-nav-category.css +5 -6
  64. package/dist/collection/components/com-nav-category/com-nav-category.js +31 -1
  65. package/dist/collection/components/com-nav-submenu/com-nav-submenu.css +1 -2
  66. package/dist/collection/components/com-nav-submenu/com-nav-submenu.js +21 -1
  67. package/dist/collection/components/footer/footer.css +1 -1
  68. package/dist/collection/components/grid/grid.js +47 -8
  69. package/dist/collection/components/grid-column/grid-column.css +5 -0
  70. package/dist/collection/components/grid-column/grid-column.js +62 -2
  71. package/dist/collection/components/grid-custom-cell/grid-custom-cell.js +45 -0
  72. package/dist/collection/components/grid-pagination/grid-pagination.js +4 -4
  73. package/dist/collection/components/header/header.css +1 -1
  74. package/dist/collection/components/input/input.js +2 -2
  75. package/dist/collection/components/select/select.css +81 -77
  76. package/dist/collection/components/select/select.js +2 -2
  77. package/dist/collection/components/select-option/select-option.css +79 -75
  78. package/dist/collection/components/select-option/select-option.js +6 -7
  79. package/dist/collection/components/tab/tab.js +4 -4
  80. package/dist/collection/components/tabs/tabs.js +1 -1
  81. package/dist/collection/components/textarea/textarea.js +2 -2
  82. package/dist/collection/components/tooltip/tooltip.js +2 -2
  83. package/dist/esm/component-6b4d470f.js +1072 -0
  84. package/dist/esm/helpers-50436c51.js +73 -0
  85. package/dist/esm/{index-c619b1fa.js → index-b982604a.js} +165 -88
  86. package/dist/esm/loader.js +3 -3
  87. package/dist/{cjs/wcs-action-bar_47.cjs.entry.js → esm/lodash-d6d9d079.js} +12610 -22791
  88. package/dist/esm/select-arrow-73ac4016.js +34 -0
  89. package/dist/esm/wcs-action-bar.entry.js +20 -0
  90. package/dist/esm/wcs-app.entry.js +2 -2
  91. package/dist/esm/wcs-badge.entry.js +23 -0
  92. package/dist/esm/wcs-button.entry.js +82 -0
  93. package/dist/esm/wcs-card-body.entry.js +15 -0
  94. package/dist/esm/wcs-card.entry.js +16 -0
  95. package/dist/esm/wcs-checkbox.entry.js +39 -0
  96. package/dist/esm/wcs-com-nav-category.entry.js +59 -0
  97. package/dist/esm/wcs-com-nav-submenu.entry.js +65 -0
  98. package/dist/esm/wcs-com-nav.entry.js +15 -0
  99. package/dist/esm/wcs-divider.entry.js +15 -0
  100. package/dist/esm/wcs-dropdown-item.entry.js +19 -0
  101. package/dist/esm/wcs-dropdown.entry.js +53 -0
  102. package/dist/esm/wcs-editable-field.entry.js +221 -0
  103. package/dist/esm/wcs-error_2.entry.js +132 -0
  104. package/dist/esm/wcs-field-content.entry.js +12 -0
  105. package/dist/esm/wcs-field-label.entry.js +12 -0
  106. package/dist/esm/wcs-field.entry.js +15 -0
  107. package/dist/esm/wcs-footer.entry.js +15 -0
  108. package/dist/esm/wcs-galactic-menu.entry.js +1781 -0
  109. package/dist/esm/wcs-galactic.entry.js +37 -0
  110. package/dist/esm/wcs-grid-column.entry.js +69 -0
  111. package/dist/esm/wcs-grid-custom-cell.entry.js +12 -0
  112. package/dist/esm/wcs-grid-pagination.entry.js +4 -4
  113. package/dist/esm/wcs-grid.entry.js +305 -0
  114. package/dist/esm/wcs-header.entry.js +21 -0
  115. package/dist/esm/wcs-hint.entry.js +16 -0
  116. package/dist/esm/wcs-horizontal-stepper.entry.js +110 -0
  117. package/dist/esm/wcs-icon.entry.js +2 -2
  118. package/dist/esm/wcs-input.entry.js +224 -0
  119. package/dist/esm/wcs-label.entry.js +16 -0
  120. package/dist/esm/wcs-list-item-properties.entry.js +15 -0
  121. package/dist/esm/wcs-list-item-property.entry.js +15 -0
  122. package/dist/esm/wcs-list-item.entry.js +19 -0
  123. package/dist/esm/wcs-mat-icon.entry.js +69 -0
  124. package/dist/esm/wcs-modal.entry.js +41 -0
  125. package/dist/esm/wcs-nav-item.entry.js +19 -0
  126. package/dist/esm/wcs-nav.entry.js +15 -0
  127. package/dist/esm/wcs-progress-bar.entry.js +43 -0
  128. package/dist/esm/wcs-progress-radial.entry.js +26 -0
  129. package/dist/esm/wcs-radio-group.entry.js +61 -0
  130. package/dist/esm/wcs-radio.entry.js +45 -0
  131. package/dist/esm/wcs-select_2.entry.js +4911 -0
  132. package/dist/esm/wcs-spinner.entry.js +17 -0
  133. package/dist/esm/wcs-switch.entry.js +30 -0
  134. package/dist/esm/wcs-tab.entry.js +16 -0
  135. package/dist/esm/wcs-tabs.entry.js +155 -0
  136. package/dist/esm/wcs-textarea.entry.js +220 -0
  137. package/dist/esm/wcs-tooltip.entry.js +125 -0
  138. package/dist/esm/wcs.js +3 -3
  139. package/dist/types/components/button/button.d.ts +7 -3
  140. package/dist/types/components/com-nav-category/com-nav-category.d.ts +7 -0
  141. package/dist/types/components/com-nav-submenu/com-nav-submenu.d.ts +7 -0
  142. package/dist/types/components/grid/grid.d.ts +7 -0
  143. package/dist/types/components/grid-column/grid-column.d.ts +4 -0
  144. package/dist/types/components/grid-custom-cell/grid-custom-cell.d.ts +12 -0
  145. package/dist/types/components/select-option/select-option.d.ts +2 -0
  146. package/dist/types/components.d.ts +43 -0
  147. package/dist/types/stencil-public-runtime.d.ts +183 -182
  148. package/dist/wcs/p-03b2e238.entry.js +1 -0
  149. package/dist/wcs/p-0fbe574e.entry.js +1 -0
  150. package/dist/wcs/p-15008e35.entry.js +1 -0
  151. package/dist/wcs/p-16dfbae8.js +127 -0
  152. package/dist/wcs/p-17c6db7f.entry.js +1 -0
  153. package/dist/wcs/p-1dce7e63.entry.js +1 -0
  154. package/dist/wcs/p-1f5aed36.entry.js +1 -0
  155. package/dist/wcs/p-214236db.entry.js +1 -0
  156. package/dist/wcs/p-26b5c0a3.entry.js +1 -0
  157. package/dist/wcs/p-2e6265dc.entry.js +1 -0
  158. package/dist/wcs/p-356a8e3b.entry.js +1 -0
  159. package/dist/wcs/p-3d10b02a.entry.js +15 -0
  160. package/dist/wcs/p-4338f140.entry.js +1 -0
  161. package/dist/wcs/p-474d6601.entry.js +1 -0
  162. package/dist/wcs/p-55fdc284.entry.js +1 -0
  163. package/dist/wcs/p-5b35b232.entry.js +1 -0
  164. package/dist/wcs/p-600a9cc0.entry.js +1 -0
  165. package/dist/wcs/p-60b51967.entry.js +1 -0
  166. package/dist/wcs/p-62f7ab6d.entry.js +1 -0
  167. package/dist/wcs/p-64523291.entry.js +1 -0
  168. package/dist/wcs/p-65c5ccc5.entry.js +1 -0
  169. package/dist/wcs/p-688fea65.entry.js +1 -0
  170. package/dist/wcs/p-716d5921.entry.js +1 -0
  171. package/dist/wcs/p-7219c04b.js +1 -0
  172. package/dist/wcs/p-8137f075.entry.js +1 -0
  173. package/dist/wcs/p-83f1ad32.js +1 -0
  174. package/dist/wcs/p-8864a491.entry.js +1 -0
  175. package/dist/wcs/p-8f0f9868.entry.js +1 -0
  176. package/dist/wcs/p-91a2de07.entry.js +1 -0
  177. package/dist/wcs/p-94a31f64.entry.js +1 -0
  178. package/dist/wcs/p-979dfd78.entry.js +1 -0
  179. package/dist/wcs/p-9ba52bc4.entry.js +1 -0
  180. package/dist/wcs/p-a1ee1551.entry.js +1 -0
  181. package/dist/wcs/p-a5a1b27c.entry.js +1 -0
  182. package/dist/wcs/p-adef7aaf.js +1 -0
  183. package/dist/wcs/p-af1a5e52.entry.js +1 -0
  184. package/dist/wcs/p-b7184d59.entry.js +1 -0
  185. package/dist/wcs/p-bef44630.entry.js +1 -0
  186. package/dist/wcs/p-d59b4495.entry.js +1 -0
  187. package/dist/wcs/p-db68379f.entry.js +1 -0
  188. package/dist/wcs/p-dbbc3f58.entry.js +1 -0
  189. package/dist/wcs/p-dc817204.entry.js +1 -0
  190. package/dist/wcs/p-dd300dea.entry.js +1 -0
  191. package/dist/wcs/p-e0163de8.entry.js +1 -0
  192. package/dist/wcs/p-e4236d32.entry.js +1 -0
  193. package/dist/wcs/p-e43358e4.entry.js +1 -0
  194. package/dist/wcs/p-e486647c.entry.js +1 -0
  195. package/dist/wcs/p-e9ce507c.entry.js +1 -0
  196. package/dist/wcs/p-ed6e8541.entry.js +1 -0
  197. package/dist/wcs/p-f46e6c3c.js +1 -0
  198. package/dist/wcs/p-f9944bde.entry.js +1 -0
  199. package/dist/wcs/p-fa173947.entry.js +1 -0
  200. package/dist/wcs/p-fb1577b5.entry.js +1 -0
  201. package/dist/wcs/p-febe9ccc.entry.js +1 -0
  202. package/dist/wcs/wcs.esm.js +1 -1
  203. package/loader/index.d.ts +0 -1
  204. package/package.json +22 -20
  205. package/dist/wcs/p-16dca526.entry.js +0 -1
  206. package/dist/wcs/p-4f228fcb.entry.js +0 -134
  207. package/dist/wcs/p-66520e5a.entry.js +0 -1
  208. package/dist/wcs/p-d31287c6.entry.js +0 -1
  209. package/dist/wcs/p-f73f235b.js +0 -1
  210. package/schematics/.gitignore +0 -18
  211. package/schematics/.npmignore +0 -4
  212. package/schematics/collection.json +0 -9
  213. package/schematics/src/ng-add/files/fonts/avenir-black.woff +0 -0
  214. package/schematics/src/ng-add/files/fonts/avenir-book.woff +0 -0
  215. package/schematics/src/ng-add/files/fonts/avenir-lighter.woff +0 -0
  216. package/schematics/src/ng-add/files/fonts/avenir-medium.woff +0 -0
  217. package/schematics/src/ng-add/files/sncf-logo.png +0 -0
  218. package/schematics/src/ng-add/index.d.ts +0 -3
  219. package/schematics/src/ng-add/index.js +0 -119
  220. package/schematics/src/ng-add/index.js.map +0 -1
  221. package/schematics/src/ng-add/schema.json +0 -5
@@ -0,0 +1,228 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-3cb9d725.js');
6
+ const helpers = require('./helpers-d9aaa8c4.js');
7
+
8
+ const inputCss = ":host{--wcs-input-icon-color:var(--wcs-text-medium);--wcs-internal-input-border-radius-left:var(--wcs-input-border-radius-left, var(--wcs-border-radius));--wcs-internal-input-border-radius-right:var(--wcs-input-border-radius-right, var(--wcs-border-radius));display:flex;width:100%;border-radius:var(--wcs-internal-input-border-radius-left) var(--wcs-internal-input-border-radius-right) var(--wcs-internal-input-border-radius-right) var(--wcs-internal-input-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 input{overflow:hidden;box-sizing:border-box;min-height:24px;width:100%;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 input:focus{box-shadow:none;outline:0}:host wcs-mat-icon{position:relative;margin-top:8px;margin-left:8px;margin-right:-8px}: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 Input = class {
11
+ constructor(hostRef) {
12
+ index.registerInstance(this, hostRef);
13
+ this.wcsInput = index.createEvent(this, "wcsInput", 7);
14
+ this.wcsChange = index.createEvent(this, "wcsChange", 7);
15
+ this.wcsBlur = index.createEvent(this, "wcsBlur", 7);
16
+ this.wcsFocus = index.createEvent(this, "wcsFocus", 7);
17
+ this.inputId = `wcs-input-${inputIds++}`;
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
+ * Available options: `"off"`, `"none"`, `"on"`, `"sentences"`, `"words"`, `"characters"`.
33
+ */
34
+ this.autocapitalize = 'off';
35
+ /**
36
+ * Indicates whether the value of the control can be automatically completed by the browser.
37
+ */
38
+ this.autocomplete = 'off';
39
+ /**
40
+ * Whether auto correction should be enabled when the user is entering/editing the text value.
41
+ */
42
+ this.autocorrect = 'off';
43
+ /**
44
+ * This Boolean attribute lets you specify that a form control should have input focus when the page loads.
45
+ */
46
+ this.autofocus = false;
47
+ /**
48
+ * If `true`, a clear icon will appear in the input when there is a value. Clicking it clears the input.
49
+ */
50
+ this.clearInput = false;
51
+ /**
52
+ * 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`.
53
+ */
54
+ this.debounce = 0;
55
+ /**
56
+ * If `true`, the user cannot interact with the input.
57
+ */
58
+ this.disabled = false;
59
+ /**
60
+ * The name of the control, which is submitted with the form data.
61
+ */
62
+ this.name = this.inputId;
63
+ /**
64
+ * If `true`, the user cannot modify the value.
65
+ */
66
+ this.readonly = false;
67
+ /**
68
+ * If `true`, the user must fill in a value before submitting a form.
69
+ */
70
+ this.required = false;
71
+ /**
72
+ * If `true`, the element will have its spelling and grammar checked.
73
+ */
74
+ this.spellcheck = false;
75
+ /**
76
+ * Specifies the state of the input. By default the input is in an normal state but you can to set it to 'error' state if the data given by the user is not valid.
77
+ */
78
+ this.state = 'initial';
79
+ /**
80
+ * The type of control to display. The default type is text.
81
+ */
82
+ this.type = 'text';
83
+ /**
84
+ * The value of the input.
85
+ */
86
+ this.value = '';
87
+ this.onInput = (ev) => {
88
+ const input = ev.target;
89
+ if (input) {
90
+ this.value = input.value || '';
91
+ }
92
+ this.wcsInput.emit(ev);
93
+ };
94
+ this.onBlur = (ev) => {
95
+ this.hasFocus = false;
96
+ this.focusChanged();
97
+ if (this.fireFocusEvents) {
98
+ this.wcsBlur.emit(ev);
99
+ }
100
+ };
101
+ this.onFocus = (ev) => {
102
+ this.hasFocus = true;
103
+ this.focusChanged();
104
+ if (this.fireFocusEvents) {
105
+ this.wcsFocus.emit(ev);
106
+ }
107
+ };
108
+ this.onKeydown = (ev) => {
109
+ if (this.shouldClearOnEdit()) {
110
+ // Did the input value change after it was blurred and edited?
111
+ // Do not clear if user is hitting Enter to submit form
112
+ if (this.didBlurAfterEdit && this.hasValue() && ev.key !== 'Enter') {
113
+ // Clear the input
114
+ this.clearTextInput();
115
+ }
116
+ // Reset the flag
117
+ this.didBlurAfterEdit = false;
118
+ }
119
+ };
120
+ this.clearTextInput = (ev) => {
121
+ if (this.clearInput && !this.readonly && !this.disabled && ev) {
122
+ ev.preventDefault();
123
+ ev.stopPropagation();
124
+ // Attempt to focus input again after pressing clear button
125
+ this.setFocus();
126
+ }
127
+ this.value = '';
128
+ /**
129
+ * This is needed for clearOnEdit
130
+ * Otherwise the value will not be cleared
131
+ * if user is inside the input
132
+ */
133
+ if (this.nativeInput) {
134
+ this.nativeInput.value = '';
135
+ }
136
+ };
137
+ }
138
+ debounceChanged() {
139
+ this.wcsChange = helpers.debounceEvent(this.wcsChange, this.debounce);
140
+ }
141
+ /**
142
+ * Update the native input element when the value changes
143
+ */
144
+ valueChanged() {
145
+ var _a;
146
+ this.wcsChange.emit({ value: (_a = this.value) === null || _a === void 0 ? void 0 : _a.toString() });
147
+ }
148
+ componentWillLoad() {
149
+ this.inheritedAttributes = helpers.inheritAttributes(this.el, ['aria-label', 'tabindex', 'title']);
150
+ }
151
+ connectedCallback() {
152
+ this.debounceChanged();
153
+ {
154
+ document.dispatchEvent(new CustomEvent('wcsInputDidLoad', {
155
+ detail: this.el
156
+ }));
157
+ }
158
+ }
159
+ disconnectedCallback() {
160
+ {
161
+ document.dispatchEvent(new CustomEvent('wcsInputDidUnload', {
162
+ detail: this.el
163
+ }));
164
+ }
165
+ }
166
+ /**
167
+ * Sets focus on the native `input` in `wcs-input`. Use this method instead of the global
168
+ * `input.focus()`.
169
+ */
170
+ async setFocus() {
171
+ if (this.nativeInput) {
172
+ this.nativeInput.focus();
173
+ }
174
+ }
175
+ /**
176
+ * Sets blur on the native `input` in `wcs-input`. Use this method instead of the global
177
+ * `input.blur()`.
178
+ * @internal
179
+ */
180
+ async setBlur() {
181
+ if (this.nativeInput) {
182
+ this.nativeInput.blur();
183
+ }
184
+ }
185
+ /**
186
+ * Returns the native `<input>` element used under the hood.
187
+ */
188
+ getInputElement() {
189
+ return Promise.resolve(this.nativeInput);
190
+ }
191
+ shouldClearOnEdit() {
192
+ const { type, clearOnEdit } = this;
193
+ return (clearOnEdit === undefined)
194
+ ? type === 'password'
195
+ : clearOnEdit;
196
+ }
197
+ getValue() {
198
+ return typeof this.value === 'number' ? this.value.toString() :
199
+ (this.value || '').toString();
200
+ }
201
+ focusChanged() {
202
+ // If clearOnEdit is enabled and the input blurred but has a value, set a flag
203
+ if (!this.hasFocus && this.shouldClearOnEdit() && this.hasValue()) {
204
+ this.didBlurAfterEdit = true;
205
+ }
206
+ }
207
+ hasValue() {
208
+ return this.getValue().length > 0;
209
+ }
210
+ render() {
211
+ const value = this.getValue();
212
+ const labelId = this.inputId + '-lbl';
213
+ const label = helpers.findItemLabel(this.el);
214
+ if (label) {
215
+ label.id = labelId;
216
+ }
217
+ 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("input", Object.assign({ class: "native-input", ref: input => this.nativeInput = input, "aria-labelledby": label ? labelId : null, disabled: this.disabled, accept: this.accept, autoCapitalize: this.autocapitalize, autoComplete: this.autocomplete, autoCorrect: this.autocorrect, autoFocus: this.autofocus, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, min: this.min, max: this.max, minLength: this.minlength, maxLength: this.maxlength, multiple: this.multiple, name: this.name, pattern: this.pattern, placeholder: this.placeholder || '', readOnly: this.readonly, required: this.required, spellcheck: this.spellcheck, step: this.step, size: this.size, type: this.type, value: value, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.onKeydown }, this.inheritedAttributes))));
218
+ }
219
+ get el() { return index.getElement(this); }
220
+ static get watchers() { return {
221
+ "debounce": ["debounceChanged"],
222
+ "value": ["valueChanged"]
223
+ }; }
224
+ };
225
+ let inputIds = 0;
226
+ Input.style = inputCss;
227
+
228
+ exports.wcs_input = Input;
@@ -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
+ const labelCss = ":host{font-weight:500;margin-bottom:8px}:host([required])::after{font-weight:500;color:var(--wcs-red);content:\"*\"}";
8
+
9
+ let Label = class {
10
+ constructor(hostRef) {
11
+ index.registerInstance(this, hostRef);
12
+ this.required = false;
13
+ }
14
+ render() {
15
+ return (index.h(index.Host, { slot: "label" }, index.h("label", null, index.h("slot", null))));
16
+ }
17
+ };
18
+ Label.style = labelCss;
19
+
20
+ exports.wcs_label = Label;
@@ -0,0 +1,19 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-3cb9d725.js');
6
+
7
+ const listItemPropertiesCss = ":host{margin-bottom:2px;display:block}::slotted(*:first-of-type){padding-right:1.25rem !important;padding-left:0 !important}::slotted(*:last-of-type){padding-right:0 !important;padding-left:1.25rem !important;border-right:none !important}::slotted(*){padding-right:1.25rem;padding-left:1.25rem;border-right:solid 2px var(--wcs-text-disabled)}";
8
+
9
+ let ListItemProperties = class {
10
+ constructor(hostRef) {
11
+ index.registerInstance(this, hostRef);
12
+ }
13
+ render() {
14
+ return (index.h(index.Host, { slot: "properties" }, index.h("slot", { name: "property" })));
15
+ }
16
+ };
17
+ ListItemProperties.style = listItemPropertiesCss;
18
+
19
+ exports.wcs_list_item_properties = ListItemProperties;
@@ -0,0 +1,19 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-3cb9d725.js');
6
+
7
+ const listItemPropertyCss = ":host{font-weight:500 !important;color:var(--wcs-gray-light)}";
8
+
9
+ let ListItemProperty = class {
10
+ constructor(hostRef) {
11
+ index.registerInstance(this, hostRef);
12
+ }
13
+ render() {
14
+ return (index.h(index.Host, { slot: "property" }, index.h("slot", null)));
15
+ }
16
+ };
17
+ ListItemProperty.style = listItemPropertyCss;
18
+
19
+ exports.wcs_list_item_property = ListItemProperty;
@@ -0,0 +1,23 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-3cb9d725.js');
6
+
7
+ const listItemCss = ":host{padding:var(--wcs-padding);border:solid 1px var(--wcs-text-light);display:flex;margin-bottom:-1px;background-color:var(--wcs-white)}:host(:hover){background-color:var(--wcs-light);transition:0.175s}:host([activated]){background-color:var(--wcs-light)}::slotted([slot=title]){color:var(--wcs-gray);font-weight:700;line-height:1.2;font-family:inherit;margin-bottom:0.5rem}::slotted([slot=icon]){color:var(--wcs-gray-light);margin-right:16px}::slotted([slot=actions]){margin-left:8px}.content{display:flex;flex-direction:column;flex-grow:1}.header{display:flex;justify-content:space-between}";
8
+
9
+ let ListItem = class {
10
+ constructor(hostRef) {
11
+ index.registerInstance(this, hostRef);
12
+ /**
13
+ * True if the item is active. Adds a background color that highlights it.
14
+ */
15
+ this.activated = false;
16
+ }
17
+ render() {
18
+ return (index.h(index.Host, null, index.h("slot", { name: "icon" }), index.h("div", { class: "content" }, index.h("div", { class: "header" }, index.h("div", null, index.h("slot", { name: "title" }), index.h("slot", { name: "properties" })), index.h("slot", { name: "actions" })), index.h("slot", { name: "description" }))));
19
+ }
20
+ };
21
+ ListItem.style = listItemCss;
22
+
23
+ exports.wcs_list_item = ListItem;
@@ -0,0 +1,73 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-3cb9d725.js');
6
+
7
+ const matIconCss = ":host{display:flex}:host .size-s{font-size:18px}:host .size-m{font-size:24px}:host .size-l{font-size:36px}:host .size-xl{font-size:48px}";
8
+
9
+ let MatIcon = class {
10
+ constructor(hostRef) {
11
+ index.registerInstance(this, hostRef);
12
+ /**
13
+ * Size of the icon
14
+ */
15
+ this.size = 'm';
16
+ /**
17
+ * Family of the icon
18
+ */
19
+ this.family = 'filled';
20
+ }
21
+ componentWillLoad() {
22
+ this.onFamilyChange();
23
+ }
24
+ componentDidLoad() {
25
+ this.appendMaterialStylesheet();
26
+ }
27
+ appendMaterialStylesheet() {
28
+ // Add material font to page DOM since font-face doesn't work within Shadow DOM.
29
+ let element = document.querySelector(`link[href="${this.familyFile}"]`);
30
+ // Only append the element if it's not yet present
31
+ if (!element) {
32
+ element = document.createElement('link');
33
+ element.setAttribute('rel', 'stylesheet');
34
+ element.setAttribute('href', this.familyFile);
35
+ document.head.appendChild(element);
36
+ }
37
+ }
38
+ onFamilyChange() {
39
+ this.familyFile = 'https://fonts.googleapis.com/icon?family=';
40
+ switch (this.family) {
41
+ case 'filled':
42
+ this.familyFile += 'Material+Icons';
43
+ this.familyClass = 'material-icons';
44
+ break;
45
+ case 'outlined':
46
+ this.familyFile += 'Material+Icons+Outlined';
47
+ this.familyClass = 'material-icons-outlined';
48
+ break;
49
+ case 'twotone':
50
+ this.familyFile += 'Material+Icons+Two+Tone';
51
+ this.familyClass = 'material-icons-two-tone';
52
+ break;
53
+ case 'rounded':
54
+ this.familyFile += 'Material+Icons+Round';
55
+ this.familyClass = 'material-icons-round';
56
+ break;
57
+ case 'sharp':
58
+ this.familyFile += 'Material+Icons+Sharp';
59
+ this.familyClass = 'material-icons-sharp';
60
+ break;
61
+ }
62
+ this.appendMaterialStylesheet();
63
+ }
64
+ render() {
65
+ return (index.h(index.Host, null, index.h("link", { rel: "stylesheet", type: "text/css", href: this.familyFile }), index.h("i", { class: this.familyClass + ' size-' + this.size }, this.icon)));
66
+ }
67
+ static get watchers() { return {
68
+ "family": ["onFamilyChange"]
69
+ }; }
70
+ };
71
+ MatIcon.style = matIconCss;
72
+
73
+ exports.wcs_mat_icon = MatIcon;
@@ -0,0 +1,45 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-3cb9d725.js');
6
+
7
+ const modalCss = "wcs-modal{--saas-fix-modal:rgba(var(--wcs-black), 0.5);z-index:999;position:fixed;top:0;bottom:0;left:0;right:0;display:none}wcs-modal[show]{display:block;width:100%;height:100%;opacity:1;display:block}wcs-modal[backdrop] .wcs-modal-backdrop{display:block;position:fixed;top:0;left:0;bottom:0;right:0;opacity:0.4;background-color:var(--wcs-black)}.wcs-modal-backdrop{display:none}.wcs-modal-container{position:fixed;top:50%;left:50%;min-width:400px;max-width:480px;transform:translate(-50%, -50%);pointer-events:auto;background-color:#fff;background-clip:padding-box;border:0 solid rgba(0, 0, 0, 0.2);border-radius:0.4375rem;outline:0;z-index:20000;display:block;padding:1.375rem 1.875rem 1.875rem 1.875rem}.wcs-modal-header{margin-bottom:8px;display:flex;align-items:center;justify-content:space-between}.wcs-modal-header h5{font-size:24px;font-weight:400;margin:0}.wcs-modal-content{font-weight:400;font-size:16px}.wcs-modal-actions{margin-top:20px;float:right}";
8
+
9
+ let Modal = class {
10
+ constructor(hostRef) {
11
+ index.registerInstance(this, hostRef);
12
+ this.wcsDialogClosed = index.createEvent(this, "wcsDialogClosed", 7);
13
+ /**
14
+ * Specifies whether the component should display a backdrop on the entire page
15
+ */
16
+ this.backdrop = true;
17
+ /**
18
+ * Displays the modal
19
+ */
20
+ this.show = false;
21
+ /**
22
+ * Specifies whether the component should display a close button.
23
+ * if false, it won't close the modal when the escape key is pressed.
24
+ */
25
+ this.showCloseButton = false;
26
+ }
27
+ render() {
28
+ return (index.h(index.Host, null, index.h("div", { class: "wcs-modal-backdrop" }), index.h("div", { class: "wcs-modal-container" }, index.h("div", { class: "wcs-modal-header" }, index.h("h5", null, index.h("slot", { name: "header" })), this.showCloseButton && (index.h("wcs-button", { shape: "round", mode: "stroked", class: "wcs-dark", onClick: ($event) => this.onCloseButtonClick($event) }, index.h("i", { class: "material-icons" }, "close")))), index.h("div", { class: "wcs-modal-content" }, index.h("slot", null)), index.h("div", { class: "wcs-modal-actions" }, index.h("slot", { name: "actions" })))));
29
+ }
30
+ onKeyDown(event) {
31
+ if (this.showCloseButton && event.key === 'Escape') {
32
+ this.close();
33
+ }
34
+ }
35
+ onCloseButtonClick(_) {
36
+ this.close();
37
+ }
38
+ close() {
39
+ this.show = false;
40
+ this.wcsDialogClosed.emit();
41
+ }
42
+ };
43
+ Modal.style = modalCss;
44
+
45
+ exports.wcs_modal = Modal;
@@ -0,0 +1,23 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-3cb9d725.js');
6
+
7
+ const navItemCss = "wcs-nav-item{display:block;cursor:pointer}wcs-nav-item a{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;text-align:center;background-color:transparent;border:none;text-decoration:none;transition:color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;height:5rem;font-size:0.75rem;color:var(--wcs-contrast)}wcs-nav-item a:not(.active){border-bottom:1px solid rgba(255, 255, 255, 0.2)}@media (max-width: 1199px){wcs-nav-item a{display:flex;flex:1;height:3.25rem;font-size:0.625rem;color:var(--wcs-text-medium)}}wcs-nav-item i{margin-bottom:0.5rem;display:inline-block}@media (max-width: 1199px){wcs-nav-item i{margin-bottom:0.25rem;display:inline-block}}@media (min-width: 1200px){wcs-nav-item[slot=bottom] a{border-top:1px solid rgba(255, 255, 255, 0.2);border-bottom:none}}.wcs-nav-item-text{font-weight:500}.active,wcs-nav-item:hover,wcs-nav-item:focus-within{background-blend-mode:multiply;background-color:rgba(0, 0, 0, 0.15);}@media (max-width: 1199px){.active,wcs-nav-item:hover,wcs-nav-item:focus-within{background-color:unset}.active a,wcs-nav-item:hover a,wcs-nav-item:focus-within a{color:var(--wcs-primary)}}";
8
+
9
+ let NavItem = class {
10
+ constructor(hostRef) {
11
+ index.registerInstance(this, hostRef);
12
+ /**
13
+ * This attribute specify the text of the item.
14
+ */
15
+ this.text = '';
16
+ }
17
+ render() {
18
+ return (index.h("a", { href: this.href, class: "wcs-nav-item-container" }, index.h("slot", null), index.h("span", { class: "wcs-nav-item-text" }, this.text)));
19
+ }
20
+ };
21
+ NavItem.style = navItemCss;
22
+
23
+ exports.wcs_nav_item = NavItem;
@@ -0,0 +1,19 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-3cb9d725.js');
6
+
7
+ const navCss = "nav{background-image:linear-gradient(0deg, var(--wcs-primary), var(--wcs-primary));display:flex;z-index:1055;flex-direction:column;width:6.25rem;height:100%}@media (max-width: 1199px){nav{flex-direction:row;background-image:linear-gradient(0deg, var(--wcs-light), var(--wcs-light));border-top:1px solid #d8d8d8;bottom:0;width:100%;height:3.25rem}}@media (max-width: 1199px){::slotted(wcs-nav-item){flex:1}}@media (min-width: 1200px){slot[name=bottom],wcs-nav-item:not([slot=bottom])+wcs-nav-item[slot=bottom]{display:block;margin-top:auto}}";
8
+
9
+ let Nav = class {
10
+ constructor(hostRef) {
11
+ index.registerInstance(this, hostRef);
12
+ }
13
+ render() {
14
+ return (index.h("nav", { class: "wcs-nav-container" }, index.h("slot", null), index.h("slot", { name: "bottom" })));
15
+ }
16
+ };
17
+ Nav.style = navCss;
18
+
19
+ exports.wcs_nav = Nav;
@@ -0,0 +1,47 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-3cb9d725.js');
6
+
7
+ const progressBarCss = ":host{--wcs-internal-progress-bar-border-radius:var(--wcs-progress-bar-border-radius,0.3125rem);--wcs-internal-progress-bar-border-radius-small:var(--wcs-progress-bar-border-radius-small,0.15625rem);--wcs-internal-progress-bar-animation-duration:var(--wcs-progress-bar-animation-duration,0.375s)}.progress{display:flex;height:0.625rem;font-size:0.75rem;color:#4d4f53;background-color:#fff;background-image:linear-gradient(90deg, #e1ded9 50%, transparent 50%);background-size:0.25rem 0.625rem;border-radius:var(--wcs-internal-progress-bar-border-radius)}.progress.has-label{margin-top:2.375rem}.progress.small{height:0.3125rem;overflow:hidden;background-color:#fff;background-image:none;background-size:auto;border-radius:var(--wcs-internal-progress-bar-border-radius-small)}.progress.value-zero>.progress-bar>.progress-label{right:unset}.progress-bar{position:relative;display:flex;flex-direction:column;justify-content:center;color:#4d4f53;text-align:center;background-color:var(--wcs-primary);border-radius:var(--wcs-internal-progress-bar-border-radius);transition:width var(--wcs-internal-progress-bar-animation-duration) ease-out}.progress-label{position:absolute;right:0;bottom:calc(100% + 0.5rem);font-size:1.5rem;font-weight:500}.progress-label sup{font-size:0.875rem;top:-0.5em;position:relative;line-height:0;vertical-align:baseline}";
8
+
9
+ let ProgressBar = class {
10
+ constructor(hostRef) {
11
+ index.registerInstance(this, hostRef);
12
+ /**
13
+ * Whether the component display the small version
14
+ */
15
+ this.small = false;
16
+ /**
17
+ * Whether it displays a label indicating the percentage of progress above the bar.
18
+ */
19
+ this.showLabel = false;
20
+ /**
21
+ * The actual value of the progress.
22
+ * Ranging from 0 to 100.
23
+ */
24
+ this.value = 0;
25
+ }
26
+ render() {
27
+ const style = {
28
+ width: this.value + '%'
29
+ };
30
+ return (index.h("div", { class: this.rootClasses() }, index.h("div", { class: "progress-bar", style: style }, this.showLabel &&
31
+ index.h("span", { class: "progress-label" }, this.value, index.h("sup", null, "%")))));
32
+ }
33
+ rootClasses() {
34
+ let classes = 'progress';
35
+ if (this.small)
36
+ classes += ' small';
37
+ if (this.showLabel)
38
+ classes += ' has-label';
39
+ // FIXME: Temporary fix so the label doesn't appear before the bar.
40
+ if (this.value === 0)
41
+ classes += ' value-zero';
42
+ return classes;
43
+ }
44
+ };
45
+ ProgressBar.style = progressBarCss;
46
+
47
+ exports.wcs_progress_bar = ProgressBar;
@@ -0,0 +1,30 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-3cb9d725.js');
6
+
7
+ const progressRadialCss = ".progress-circle{position:relative;display:inline-block;width:7.5rem;height:7.5rem;background-image:url(\"data:image/svg+xml;charset=UTF-8,%3c?xml version='1.0' encoding='utf-8'?%3e%3csvg version='1.1' id='Calque_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 120 120' style='enable-background:new 0 0 120 120;' xml:space='preserve'%3e%3cstyle type='text/css'%3e .st0%7bfill:%23D7D7D7;%7d %3c/style%3e%3cg%3e%3crect x='59' class='st0' width='2' height='12'/%3e%3c/g%3e%3cg%3e%3crect x='55.2' y='0.1' transform='matrix(0.9976 -6.975647e-02 6.975647e-02 0.9976 -0.2907 3.9376)' class='st0' width='2' height='12'/%3e%3c/g%3e%3cg%3e%3crect x='51.5' y='0.5' transform='matrix(0.9903 -0.1392 0.1392 0.9903 -0.3974 7.368)' class='st0' width='2' height='12'/%3e%3c/g%3e%3cg%3e%3crect x='47.8' y='1.2' transform='matrix(0.9781 -0.2079 0.2079 0.9781 -0.427 10.2973)' class='st0' width='2' height='12'/%3e%3c/g%3e%3cg%3e%3crect x='44.1' y='2.1' transform='matrix(0.9613 -0.2756 0.2756 0.9613 -0.4827 12.749)' class='st0' width='2' height='12'/%3e%3c/g%3e%3cg%3e%3crect x='40.5' y='3.3' transform='matrix(0.9397 -0.342 0.342 0.9397 -0.6613 14.7626)' class='st0' width='2' height='12'/%3e%3c/g%3e%3cg%3e%3crect x='37' y='4.7' transform='matrix(0.9135 -0.4067 0.4067 0.9135 -1.0509 16.3931)' class='st0' width='2' height='12'/%3e%3c/g%3e%3cg%3e%3crect x='33.6' y='6.3' transform='matrix(0.8829 -0.4695 0.4695 0.8829 -1.7286 17.7087)' class='st0' width='2' height='12'/%3e%3c/g%3e%3cg%3e%3crect x='30.4' y='8.2' transform='matrix(0.848 -0.5299 0.5299 0.848 -2.7588 18.7897)' class='st0' width='2' height='12'/%3e%3c/g%3e%3cg%3e%3crect x='27.3' y='10.3' transform='matrix(0.809 -0.5878 0.5878 0.809 -4.1915 19.7261)' class='st0' width='2' height='12'/%3e%3c/g%3e%3cg%3e%3crect x='24.3' y='12.6' transform='matrix(0.766 -0.6428 0.6428 0.766 -6.0608 20.6152)' class='st0' width='2' height='12'/%3e%3c/g%3e%3cg%3e%3crect x='21.5' y='15.2' transform='matrix(0.7193 -0.6947 0.6947 0.7193 -8.3843 21.5593)' class='st0' width='2' height='12'/%3e%3c/g%3e%3cg%3e%3crect x='18.9' y='17.9' transform='matrix(0.6691 -0.7431 0.7431 0.6691 -11.1622 22.6633)' class='st0' width='2' height='12'/%3e%3c/g%3e%3cg%3e%3crect x='16.4' y='20.8' transform='matrix(0.6157 -0.788 0.788 0.6157 -14.3769 24.0315)' class='st0' width='2' height='12'/%3e%3c/g%3e%3cg%3e%3crect x='14.2' y='23.8' transform='matrix(0.5592 -0.829 0.829 0.5592 -17.9939 25.7655)' class='st0' width='2' height='12'/%3e%3c/g%3e%3cg%3e%3crect x='12.2' y='27' transform='matrix(0.5 -0.866 0.866 0.5 -21.9615 27.9615)' class='st0' width='2' height='12'/%3e%3c/g%3e%3cg%3e%3crect x='10.5' y='30.3' transform='matrix(0.4384 -0.8988 0.8988 0.4384 -26.2122 30.7076)' class='st0' width='2' height='12'/%3e%3c/g%3e%3cg%3e%3crect x='8.9' y='33.8' transform='matrix(0.3746 -0.9272 0.9272 0.3746 -30.6638 34.0815)' class='st0' width='2' height='12'/%3e%3c/g%3e%3cg%3e%3crect x='7.6' y='37.3' transform='matrix(0.309 -0.9511 0.9511 0.309 -35.2211 38.1485)' class='st0' width='2' height='12'/%3e%3c/g%3e%3cg%3e%3crect x='6.6' y='40.9' transform='matrix(0.2419 -0.9703 0.9703 0.2419 -39.7776 42.9595)' class='st0' width='2' height='12'/%3e%3c/g%3e%3cg%3e%3crect x='5.8' y='44.6' transform='matrix(0.1736 -0.9848 0.9848 0.1736 -44.2179 48.5492)' class='st0' width='2' height='12'/%3e%3c/g%3e%3cg%3e%3crect x='5.3' y='48.4' transform='matrix(0.1045 -0.9945 0.9945 0.1045 -48.42 54.9351)' class='st0' width='2' height='12'/%3e%3c/g%3e%3cg%3e%3crect x='5' y='52.1' transform='matrix(3.489950e-02 -0.9994 0.9994 3.489950e-02 -52.2577 62.1164)' class='st0' width='2' height='12'/%3e%3c/g%3e%3cg%3e%3crect x='0' y='60.9' transform='matrix(0.9994 -3.489950e-02 3.489950e-02 0.9994 -2.1561 0.2482)' class='st0' width='12' height='2'/%3e%3c/g%3e%3cg%3e%3crect x='0.3' y='64.6' transform='matrix(0.9945 -0.1045 0.1045 0.9945 -6.8272 1.0177)' class='st0' width='12' height='2'/%3e%3c/g%3e%3cg%3e%3crect x='0.8' y='68.4' transform='matrix(0.9848 -0.1736 0.1736 0.9848 -11.9436 2.2383)' class='st0' width='12' height='2'/%3e%3c/g%3e%3cg%3e%3crect x='1.6' y='72.1' transform='matrix(0.9703 -0.2419 0.2419 0.9703 -17.4499 4.0099)' class='st0' width='12' height='2'/%3e%3c/g%3e%3cg%3e%3crect x='2.6' y='75.7' transform='matrix(0.9511 -0.309 0.309 0.9511 -23.2745 6.4241)' class='st0' width='12' height='2'/%3e%3c/g%3e%3cg%3e%3crect x='3.9' y='79.2' transform='matrix(0.9272 -0.3746 0.3746 0.9272 -29.331 9.5626)' class='st0' width='12' height='2'/%3e%3c/g%3e%3cg%3e%3crect x='5.5' y='82.7' transform='matrix(0.8988 -0.4384 0.4384 0.8988 -35.5191 13.4941)' class='st0' width='12' height='2'/%3e%3c/g%3e%3cg%3e%3crect x='7.2' y='86' transform='matrix(0.866 -0.5 0.5 0.866 -41.7269 18.2731)' class='st0' width='12' height='2'/%3e%3c/g%3e%3cg%3e%3crect x='9.2' y='89.2' transform='matrix(0.829 -0.5592 0.5592 0.829 -47.8331 23.9378)' class='st0' width='12' height='2'/%3e%3c/g%3e%3cg%3e%3crect x='11.4' y='92.2' transform='matrix(0.788 -0.6157 0.6157 0.788 -53.7091 30.5088)' class='st0' width='12' height='2'/%3e%3c/g%3e%3cg%3e%3crect x='13.9' y='95.1' transform='matrix(0.7431 -0.6691 0.6691 0.7431 -59.2218 37.988)' class='st0' width='12' height='2'/%3e%3c/g%3e%3cg%3e%3crect x='16.5' y='97.8' transform='matrix(0.6947 -0.7193 0.7193 0.6947 -64.236 46.3581)' class='st0' width='12' height='2'/%3e%3c/g%3e%3cg%3e%3crect x='19.3' y='100.4' transform='matrix(0.6428 -0.766 0.766 0.6428 -68.6175 55.5822)' class='st0' width='12' height='2'/%3e%3c/g%3e%3cg%3e%3crect x='22.3' y='102.7' transform='matrix(0.5878 -0.809 0.809 0.5878 -72.2355 65.6038)' class='st0' width='12' height='2'/%3e%3c/g%3e%3cg%3e%3crect x='25.4' y='104.8' transform='matrix(0.5299 -0.848 0.848 0.5299 -74.9657 76.3475)' class='st0' width='12' height='2'/%3e%3c/g%3e%3cg%3e%3crect x='28.6' y='106.7' transform='matrix(0.4695 -0.8829 0.8829 0.4695 -76.693 87.7197)' class='st0' width='12' height='2'/%3e%3c/g%3e%3cg%3e%3crect x='32' y='108.3' transform='matrix(0.4067 -0.9135 0.9135 0.4067 -77.3138 99.6102)' class='st0' width='12' height='2'/%3e%3c/g%3e%3cg%3e%3crect x='35.5' y='109.7' transform='matrix(0.342 -0.9397 0.9397 0.342 -76.7383 111.8932)' class='st0' width='12' height='2'/%3e%3c/g%3e%3cg%3e%3crect x='39.1' y='110.9' transform='matrix(0.2756 -0.9613 0.9613 0.2756 -74.893 124.43)' class='st0' width='12' height='2'/%3e%3c/g%3e%3cg%3e%3crect x='42.8' y='111.8' transform='matrix(0.2079 -0.9781 0.9781 0.2079 -71.7222 137.0703)' class='st0' width='12' height='2'/%3e%3c/g%3e%3cg%3e%3crect x='46.5' y='112.5' transform='matrix(0.1392 -0.9903 0.9903 0.1392 -67.1899 149.6558)' class='st0' width='12' height='2'/%3e%3c/g%3e%3cg%3e%3crect x='50.2' y='112.9' transform='matrix(6.975647e-02 -0.9976 0.9976 6.975647e-02 -61.2806 162.0216)' class='st0' width='12' height='2'/%3e%3c/g%3e%3cg%3e%3crect x='59' y='108' class='st0' width='2' height='12'/%3e%3c/g%3e%3cg%3e%3crect x='62.8' y='107.9' transform='matrix(0.9976 -6.975647e-02 6.975647e-02 0.9976 -7.7877 4.7255)' class='st0' width='2' height='12'/%3e%3c/g%3e%3cg%3e%3crect x='66.5' y='107.5' transform='matrix(0.9903 -0.1392 0.1392 0.9903 -15.1355 10.5006)' class='st0' width='2' height='12'/%3e%3c/g%3e%3cg%3e%3crect x='70.2' y='106.8' transform='matrix(0.9781 -0.2079 0.2079 0.9781 -21.9001 17.2744)' class='st0' width='2' height='12'/%3e%3c/g%3e%3cg%3e%3crect x='73.9' y='105.9' transform='matrix(0.9613 -0.2756 0.2756 0.9613 -27.9452 24.9761)' class='st0' width='2' height='12'/%3e%3c/g%3e%3cg%3e%3crect x='77.5' y='104.7' transform='matrix(0.9397 -0.342 0.342 0.9397 -33.1442 33.5167)' class='st0' width='2' height='12'/%3e%3c/g%3e%3cg%3e%3crect x='81' y='103.3' transform='matrix(0.9135 -0.4067 0.4067 0.9135 -37.383 42.7899)' class='st0' width='2' height='12'/%3e%3c/g%3e%3cg%3e%3crect x='84.4' y='101.7' transform='matrix(0.8829 -0.4695 0.4695 0.8829 -40.5617 52.6742)' class='st0' width='2' height='12'/%3e%3c/g%3e%3cg%3e%3crect x='87.6' y='99.8' transform='matrix(0.848 -0.5299 0.5299 0.848 -42.5973 63.0348)' class='st0' width='2' height='12'/%3e%3c/g%3e%3cg%3e%3crect x='90.7' y='97.7' transform='matrix(0.809 -0.5878 0.5878 0.809 -43.4248 73.7261)' class='st0' width='2' height='12'/%3e%3c/g%3e%3cg%3e%3crect x='93.7' y='95.4' transform='matrix(0.766 -0.6428 0.6428 0.766 -42.999 84.594)' class='st0' width='2' height='12'/%3e%3c/g%3e%3cg%3e%3crect x='96.5' y='92.8' transform='matrix(0.7193 -0.6947 0.6947 0.7193 -41.2954 95.4789)' class='st0' width='2' height='12'/%3e%3c/g%3e%3cg%3e%3crect x='99.1' y='90.1' transform='matrix(0.6691 -0.7431 0.7431 0.6691 -38.3109 106.2184)' class='st0' width='2' height='12'/%3e%3c/g%3e%3cg%3e%3crect x='101.6' y='87.2' transform='matrix(0.6157 -0.788 0.788 0.6157 -34.0637 116.6505)' class='st0' width='2' height='12'/%3e%3c/g%3e%3cg%3e%3crect x='103.8' y='84.2' transform='matrix(0.5592 -0.829 0.829 0.5592 -28.5937 126.6159)' class='st0' width='2' height='12'/%3e%3c/g%3e%3cg%3e%3crect x='105.8' y='81' transform='matrix(0.5 -0.866 0.866 0.5 -21.9615 135.9615)' class='st0' width='2' height='12'/%3e%3c/g%3e%3cg%3e%3crect x='107.5' y='77.7' transform='matrix(0.4384 -0.8988 0.8988 0.4384 -14.2476 144.5431)' class='st0' width='2' height='12'/%3e%3c/g%3e%3cg%3e%3crect x='109.1' y='74.2' transform='matrix(0.3746 -0.9272 0.9272 0.3746 -5.5511 152.2277)' class='st0' width='2' height='12'/%3e%3c/g%3e%3cg%3e%3crect x='110.4' y='70.7' transform='matrix(0.309 -0.9511 0.9511 0.309 4.0122 158.8962)' class='st0' width='2' height='12'/%3e%3c/g%3e%3cg%3e%3crect x='111.4' y='67.1' transform='matrix(0.2419 -0.9703 0.9703 0.2419 14.3114 164.4454)' class='st0' width='2' height='12'/%3e%3c/g%3e%3cg%3e%3crect x='112.2' y='63.4' transform='matrix(0.1736 -0.9848 0.9848 0.1736 25.2032 168.79)' class='st0' width='2' height='12'/%3e%3c/g%3e%3cg%3e%3crect x='112.7' y='59.6' transform='matrix(0.1045 -0.9945 0.9945 0.1045 36.5339 171.8641)' class='st0' width='2' height='12'/%3e%3c/g%3e%3cg%3e%3crect x='113' y='55.9' transform='matrix(3.489950e-02 -0.9994 0.9994 3.489950e-02 48.1428 173.6225)' class='st0' width='2' height='12'/%3e%3c/g%3e%3cg%3e%3crect x='108' y='57.1' transform='matrix(0.9994 -3.489950e-02 3.489950e-02 0.9994 -1.9588 4.0128)' class='st0' width='12' height='2'/%3e%3c/g%3e%3cg%3e%3crect x='107.7' y='53.4' transform='matrix(0.9945 -0.1045 0.1045 0.9945 -5.0588 12.1831)' class='st0' width='12' height='2'/%3e%3c/g%3e%3cg%3e%3crect x='107.2' y='49.6' transform='matrix(0.9848 -0.1736 0.1736 0.9848 -7.0711 20.4225)' class='st0' width='12' height='2'/%3e%3c/g%3e%3cg%3e%3crect x='106.4' y='45.9' transform='matrix(0.9703 -0.2419 0.2419 0.9703 -8.0163 28.5853)' class='st0' width='12' height='2'/%3e%3c/g%3e%3cg%3e%3crect x='105.4' y='42.3' transform='matrix(0.9511 -0.309 0.309 0.9511 -7.9343 36.5311)' class='st0' width='12' height='2'/%3e%3c/g%3e%3cg%3e%3crect x='104.1' y='38.8' transform='matrix(0.9272 -0.3746 0.3746 0.9272 -6.8838 44.1282)' class='st0' width='12' height='2'/%3e%3c/g%3e%3cg%3e%3crect x='102.5' y='35.3' transform='matrix(0.8988 -0.4384 0.4384 0.8988 -4.9408 51.2552)' class='st0' width='12' height='2'/%3e%3c/g%3e%3cg%3e%3crect x='100.8' y='32' transform='matrix(0.866 -0.5 0.5 0.866 -2.1962 57.8038)' class='st0' width='12' height='2'/%3e%3c/g%3e%3cg%3e%3crect x='98.8' y='28.8' transform='matrix(0.829 -0.5592 0.5592 0.829 1.2454 63.6808)' class='st0' width='12' height='2'/%3e%3c/g%3e%3cg%3e%3crect x='96.6' y='25.8' transform='matrix(0.788 -0.6157 0.6157 0.788 5.2685 68.8093)' class='st0' width='12' height='2'/%3e%3c/g%3e%3cg%3e%3crect x='94.1' y='22.9' transform='matrix(0.7431 -0.6691 0.6691 0.7431 9.7488 73.1303)' class='st0' width='12' height='2'/%3e%3c/g%3e%3cg%3e%3crect x='91.5' y='20.2' transform='matrix(0.6947 -0.7193 0.7193 0.6947 14.5562 76.6036)' class='st0' width='12' height='2'/%3e%3c/g%3e%3cg%3e%3crect x='88.7' y='17.6' transform='matrix(0.6428 -0.766 0.766 0.6428 19.5576 79.2086)' class='st0' width='12' height='2'/%3e%3c/g%3e%3cg%3e%3crect x='85.7' y='15.3' transform='matrix(0.5878 -0.809 0.809 0.5878 24.6192 80.944)' class='st0' width='12' height='2'/%3e%3c/g%3e%3cg%3e%3crect x='82.6' y='13.2' transform='matrix(0.5299 -0.848 0.848 0.5299 29.6096 81.828)' class='st0' width='12' height='2'/%3e%3c/g%3e%3cg%3e%3crect x='79.4' y='11.3' transform='matrix(0.4695 -0.8829 0.8829 0.4695 34.4027 81.8974)' class='st0' width='12' height='2'/%3e%3c/g%3e%3cg%3e%3crect x='76' y='9.7' transform='matrix(0.4067 -0.9135 0.9135 0.4067 38.8799 81.2069)' class='st0' width='12' height='2'/%3e%3c/g%3e%3cg%3e%3crect x='72.5' y='8.3' transform='matrix(0.342 -0.9397 0.9397 0.342 42.9327 79.8275)' class='st0' width='12' height='2'/%3e%3c/g%3e%3cg%3e%3crect x='68.9' y='7.1' transform='matrix(0.2756 -0.9613 0.9613 0.2756 46.4651 77.845)' class='st0' width='12' height='2'/%3e%3c/g%3e%3cg%3e%3crect x='65.2' y='6.2' transform='matrix(0.2079 -0.9781 0.9781 0.2079 49.3951 75.358)' class='st0' width='12' height='2'/%3e%3c/g%3e%3cg%3e%3crect x='61.5' y='5.5' transform='matrix(0.1392 -0.9903 0.9903 0.1392 51.657 72.4756)' class='st0' width='12' height='2'/%3e%3c/g%3e%3cg%3e%3crect x='57.8' y='5.1' transform='matrix(6.975647e-02 -0.9976 0.9976 6.975647e-02 53.2021 69.3153)' class='st0' width='12' height='2'/%3e%3c/g%3e%3c/svg%3e\")}.progress-circle-figure{transform:rotate(-90deg);transition:stroke-dashoffset 0.375s ease-out}.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;clip-path:inset(50%);border:0}.progress-circle-label{position:absolute;top:0;left:0;display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-size:1.5rem;font-weight:500}.progress-circle-label sup{font-size:0.875rem;top:-0.5em;position:relative;line-height:0;vertical-align:baseline}.progress-circle-meter{stroke:var(--wcs-white)}.progress-circle-value{stroke:var(--wcs-primary);stroke-linecap:round}.progress-circle-value,.progress-circle-meter{fill:none}";
8
+
9
+ let ProgressRadial = class {
10
+ constructor(hostRef) {
11
+ index.registerInstance(this, hostRef);
12
+ this.size = 120;
13
+ this.showLabel = false;
14
+ this.value = 0;
15
+ }
16
+ render() {
17
+ const { size, halfSize } = { size: this.size, halfSize: this.size / 2 };
18
+ return (index.h("div", { class: "progress-circle", "data-component": "radial-progress" }, index.h("svg", { class: "progress-circle-figure", "data-role": "figure", width: this.size, height: this.size, viewBox: `0 0 ${size} ${size}`, style: this.getSvgStyle() }, index.h("circle", { class: "progress-circle-meter", cx: halfSize, cy: halfSize, r: "54", "stroke-width": "12" }), index.h("circle", { class: "progress-circle-value", cx: halfSize, cy: halfSize, r: "54", "stroke-width": "12" })), this.showLabel &&
19
+ index.h("div", { class: "progress-circle-label", "data-role": "label" }, index.h("span", null, index.h("span", { "data-role": "labelvalue" }, this.value), index.h("sup", null, "%"))), index.h("input", { "data-role": "control", class: "sr-only", type: "range", value: this.value })));
20
+ }
21
+ getSvgStyle() {
22
+ return {
23
+ 'stroke-dasharray': '339.292',
24
+ 'stroke-dashoffset': `${339.292 - (this.value / 100) * 339.292}`
25
+ };
26
+ }
27
+ };
28
+ ProgressRadial.style = progressRadialCss;
29
+
30
+ exports.wcs_progress_radial = ProgressRadial;