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,224 @@
1
+ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-b982604a.js';
2
+ import { d as debounceEvent, i as inheritAttributes, f as findItemLabel } from './helpers-50436c51.js';
3
+
4
+ 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)}";
5
+
6
+ let Input = class {
7
+ constructor(hostRef) {
8
+ registerInstance(this, hostRef);
9
+ this.wcsInput = createEvent(this, "wcsInput", 7);
10
+ this.wcsChange = createEvent(this, "wcsChange", 7);
11
+ this.wcsBlur = createEvent(this, "wcsBlur", 7);
12
+ this.wcsFocus = createEvent(this, "wcsFocus", 7);
13
+ this.inputId = `wcs-input-${inputIds++}`;
14
+ this.didBlurAfterEdit = false;
15
+ this.inheritedAttributes = {};
16
+ /**
17
+ * This is required for a WebKit bug which requires us to
18
+ * blur and focus an input to properly focus the input in
19
+ * an item with delegatesFocus. It will no longer be needed
20
+ * with iOS 14.
21
+ *
22
+ * @internal
23
+ */
24
+ this.fireFocusEvents = true;
25
+ this.hasFocus = false;
26
+ /**
27
+ * Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user.
28
+ * Available options: `"off"`, `"none"`, `"on"`, `"sentences"`, `"words"`, `"characters"`.
29
+ */
30
+ this.autocapitalize = 'off';
31
+ /**
32
+ * Indicates whether the value of the control can be automatically completed by the browser.
33
+ */
34
+ this.autocomplete = 'off';
35
+ /**
36
+ * Whether auto correction should be enabled when the user is entering/editing the text value.
37
+ */
38
+ this.autocorrect = 'off';
39
+ /**
40
+ * This Boolean attribute lets you specify that a form control should have input focus when the page loads.
41
+ */
42
+ this.autofocus = false;
43
+ /**
44
+ * If `true`, a clear icon will appear in the input when there is a value. Clicking it clears the input.
45
+ */
46
+ this.clearInput = false;
47
+ /**
48
+ * 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`.
49
+ */
50
+ this.debounce = 0;
51
+ /**
52
+ * If `true`, the user cannot interact with the input.
53
+ */
54
+ this.disabled = false;
55
+ /**
56
+ * The name of the control, which is submitted with the form data.
57
+ */
58
+ this.name = this.inputId;
59
+ /**
60
+ * If `true`, the user cannot modify the value.
61
+ */
62
+ this.readonly = false;
63
+ /**
64
+ * If `true`, the user must fill in a value before submitting a form.
65
+ */
66
+ this.required = false;
67
+ /**
68
+ * If `true`, the element will have its spelling and grammar checked.
69
+ */
70
+ this.spellcheck = false;
71
+ /**
72
+ * 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.
73
+ */
74
+ this.state = 'initial';
75
+ /**
76
+ * The type of control to display. The default type is text.
77
+ */
78
+ this.type = 'text';
79
+ /**
80
+ * The value of the input.
81
+ */
82
+ this.value = '';
83
+ this.onInput = (ev) => {
84
+ const input = ev.target;
85
+ if (input) {
86
+ this.value = input.value || '';
87
+ }
88
+ this.wcsInput.emit(ev);
89
+ };
90
+ this.onBlur = (ev) => {
91
+ this.hasFocus = false;
92
+ this.focusChanged();
93
+ if (this.fireFocusEvents) {
94
+ this.wcsBlur.emit(ev);
95
+ }
96
+ };
97
+ this.onFocus = (ev) => {
98
+ this.hasFocus = true;
99
+ this.focusChanged();
100
+ if (this.fireFocusEvents) {
101
+ this.wcsFocus.emit(ev);
102
+ }
103
+ };
104
+ this.onKeydown = (ev) => {
105
+ if (this.shouldClearOnEdit()) {
106
+ // Did the input value change after it was blurred and edited?
107
+ // Do not clear if user is hitting Enter to submit form
108
+ if (this.didBlurAfterEdit && this.hasValue() && ev.key !== 'Enter') {
109
+ // Clear the input
110
+ this.clearTextInput();
111
+ }
112
+ // Reset the flag
113
+ this.didBlurAfterEdit = false;
114
+ }
115
+ };
116
+ this.clearTextInput = (ev) => {
117
+ if (this.clearInput && !this.readonly && !this.disabled && ev) {
118
+ ev.preventDefault();
119
+ ev.stopPropagation();
120
+ // Attempt to focus input again after pressing clear button
121
+ this.setFocus();
122
+ }
123
+ this.value = '';
124
+ /**
125
+ * This is needed for clearOnEdit
126
+ * Otherwise the value will not be cleared
127
+ * if user is inside the input
128
+ */
129
+ if (this.nativeInput) {
130
+ this.nativeInput.value = '';
131
+ }
132
+ };
133
+ }
134
+ debounceChanged() {
135
+ this.wcsChange = debounceEvent(this.wcsChange, this.debounce);
136
+ }
137
+ /**
138
+ * Update the native input element when the value changes
139
+ */
140
+ valueChanged() {
141
+ var _a;
142
+ this.wcsChange.emit({ value: (_a = this.value) === null || _a === void 0 ? void 0 : _a.toString() });
143
+ }
144
+ componentWillLoad() {
145
+ this.inheritedAttributes = inheritAttributes(this.el, ['aria-label', 'tabindex', 'title']);
146
+ }
147
+ connectedCallback() {
148
+ this.debounceChanged();
149
+ {
150
+ document.dispatchEvent(new CustomEvent('wcsInputDidLoad', {
151
+ detail: this.el
152
+ }));
153
+ }
154
+ }
155
+ disconnectedCallback() {
156
+ {
157
+ document.dispatchEvent(new CustomEvent('wcsInputDidUnload', {
158
+ detail: this.el
159
+ }));
160
+ }
161
+ }
162
+ /**
163
+ * Sets focus on the native `input` in `wcs-input`. Use this method instead of the global
164
+ * `input.focus()`.
165
+ */
166
+ async setFocus() {
167
+ if (this.nativeInput) {
168
+ this.nativeInput.focus();
169
+ }
170
+ }
171
+ /**
172
+ * Sets blur on the native `input` in `wcs-input`. Use this method instead of the global
173
+ * `input.blur()`.
174
+ * @internal
175
+ */
176
+ async setBlur() {
177
+ if (this.nativeInput) {
178
+ this.nativeInput.blur();
179
+ }
180
+ }
181
+ /**
182
+ * Returns the native `<input>` element used under the hood.
183
+ */
184
+ getInputElement() {
185
+ return Promise.resolve(this.nativeInput);
186
+ }
187
+ shouldClearOnEdit() {
188
+ const { type, clearOnEdit } = this;
189
+ return (clearOnEdit === undefined)
190
+ ? type === 'password'
191
+ : clearOnEdit;
192
+ }
193
+ getValue() {
194
+ return typeof this.value === 'number' ? this.value.toString() :
195
+ (this.value || '').toString();
196
+ }
197
+ focusChanged() {
198
+ // If clearOnEdit is enabled and the input blurred but has a value, set a flag
199
+ if (!this.hasFocus && this.shouldClearOnEdit() && this.hasValue()) {
200
+ this.didBlurAfterEdit = true;
201
+ }
202
+ }
203
+ hasValue() {
204
+ return this.getValue().length > 0;
205
+ }
206
+ render() {
207
+ const value = this.getValue();
208
+ const labelId = this.inputId + '-lbl';
209
+ const label = findItemLabel(this.el);
210
+ if (label) {
211
+ label.id = labelId;
212
+ }
213
+ return (h(Host, { "aria-disabled": this.disabled ? 'true' : null }, this.icon ? (h("wcs-mat-icon", { icon: this.icon, size: "m" })) : null, 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))));
214
+ }
215
+ get el() { return getElement(this); }
216
+ static get watchers() { return {
217
+ "debounce": ["debounceChanged"],
218
+ "value": ["valueChanged"]
219
+ }; }
220
+ };
221
+ let inputIds = 0;
222
+ Input.style = inputCss;
223
+
224
+ export { Input as wcs_input };
@@ -0,0 +1,16 @@
1
+ import { r as registerInstance, h, H as Host } from './index-b982604a.js';
2
+
3
+ const labelCss = ":host{font-weight:500;margin-bottom:8px}:host([required])::after{font-weight:500;color:var(--wcs-red);content:\"*\"}";
4
+
5
+ let Label = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ this.required = false;
9
+ }
10
+ render() {
11
+ return (h(Host, { slot: "label" }, h("label", null, h("slot", null))));
12
+ }
13
+ };
14
+ Label.style = labelCss;
15
+
16
+ export { Label as wcs_label };
@@ -0,0 +1,15 @@
1
+ import { r as registerInstance, h, H as Host } from './index-b982604a.js';
2
+
3
+ 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)}";
4
+
5
+ let ListItemProperties = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ }
9
+ render() {
10
+ return (h(Host, { slot: "properties" }, h("slot", { name: "property" })));
11
+ }
12
+ };
13
+ ListItemProperties.style = listItemPropertiesCss;
14
+
15
+ export { ListItemProperties as wcs_list_item_properties };
@@ -0,0 +1,15 @@
1
+ import { r as registerInstance, h, H as Host } from './index-b982604a.js';
2
+
3
+ const listItemPropertyCss = ":host{font-weight:500 !important;color:var(--wcs-gray-light)}";
4
+
5
+ let ListItemProperty = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ }
9
+ render() {
10
+ return (h(Host, { slot: "property" }, h("slot", null)));
11
+ }
12
+ };
13
+ ListItemProperty.style = listItemPropertyCss;
14
+
15
+ export { ListItemProperty as wcs_list_item_property };
@@ -0,0 +1,19 @@
1
+ import { r as registerInstance, h, H as Host } from './index-b982604a.js';
2
+
3
+ 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}";
4
+
5
+ let ListItem = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ /**
9
+ * True if the item is active. Adds a background color that highlights it.
10
+ */
11
+ this.activated = false;
12
+ }
13
+ render() {
14
+ return (h(Host, null, h("slot", { name: "icon" }), h("div", { class: "content" }, h("div", { class: "header" }, h("div", null, h("slot", { name: "title" }), h("slot", { name: "properties" })), h("slot", { name: "actions" })), h("slot", { name: "description" }))));
15
+ }
16
+ };
17
+ ListItem.style = listItemCss;
18
+
19
+ export { ListItem as wcs_list_item };
@@ -0,0 +1,69 @@
1
+ import { r as registerInstance, h, H as Host } from './index-b982604a.js';
2
+
3
+ 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}";
4
+
5
+ let MatIcon = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ /**
9
+ * Size of the icon
10
+ */
11
+ this.size = 'm';
12
+ /**
13
+ * Family of the icon
14
+ */
15
+ this.family = 'filled';
16
+ }
17
+ componentWillLoad() {
18
+ this.onFamilyChange();
19
+ }
20
+ componentDidLoad() {
21
+ this.appendMaterialStylesheet();
22
+ }
23
+ appendMaterialStylesheet() {
24
+ // Add material font to page DOM since font-face doesn't work within Shadow DOM.
25
+ let element = document.querySelector(`link[href="${this.familyFile}"]`);
26
+ // Only append the element if it's not yet present
27
+ if (!element) {
28
+ element = document.createElement('link');
29
+ element.setAttribute('rel', 'stylesheet');
30
+ element.setAttribute('href', this.familyFile);
31
+ document.head.appendChild(element);
32
+ }
33
+ }
34
+ onFamilyChange() {
35
+ this.familyFile = 'https://fonts.googleapis.com/icon?family=';
36
+ switch (this.family) {
37
+ case 'filled':
38
+ this.familyFile += 'Material+Icons';
39
+ this.familyClass = 'material-icons';
40
+ break;
41
+ case 'outlined':
42
+ this.familyFile += 'Material+Icons+Outlined';
43
+ this.familyClass = 'material-icons-outlined';
44
+ break;
45
+ case 'twotone':
46
+ this.familyFile += 'Material+Icons+Two+Tone';
47
+ this.familyClass = 'material-icons-two-tone';
48
+ break;
49
+ case 'rounded':
50
+ this.familyFile += 'Material+Icons+Round';
51
+ this.familyClass = 'material-icons-round';
52
+ break;
53
+ case 'sharp':
54
+ this.familyFile += 'Material+Icons+Sharp';
55
+ this.familyClass = 'material-icons-sharp';
56
+ break;
57
+ }
58
+ this.appendMaterialStylesheet();
59
+ }
60
+ render() {
61
+ return (h(Host, null, h("link", { rel: "stylesheet", type: "text/css", href: this.familyFile }), h("i", { class: this.familyClass + ' size-' + this.size }, this.icon)));
62
+ }
63
+ static get watchers() { return {
64
+ "family": ["onFamilyChange"]
65
+ }; }
66
+ };
67
+ MatIcon.style = matIconCss;
68
+
69
+ export { MatIcon as wcs_mat_icon };
@@ -0,0 +1,41 @@
1
+ import { r as registerInstance, c as createEvent, h, H as Host } from './index-b982604a.js';
2
+
3
+ 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}";
4
+
5
+ let Modal = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ this.wcsDialogClosed = createEvent(this, "wcsDialogClosed", 7);
9
+ /**
10
+ * Specifies whether the component should display a backdrop on the entire page
11
+ */
12
+ this.backdrop = true;
13
+ /**
14
+ * Displays the modal
15
+ */
16
+ this.show = false;
17
+ /**
18
+ * Specifies whether the component should display a close button.
19
+ * if false, it won't close the modal when the escape key is pressed.
20
+ */
21
+ this.showCloseButton = false;
22
+ }
23
+ render() {
24
+ return (h(Host, null, h("div", { class: "wcs-modal-backdrop" }), h("div", { class: "wcs-modal-container" }, h("div", { class: "wcs-modal-header" }, h("h5", null, h("slot", { name: "header" })), this.showCloseButton && (h("wcs-button", { shape: "round", mode: "stroked", class: "wcs-dark", onClick: ($event) => this.onCloseButtonClick($event) }, h("i", { class: "material-icons" }, "close")))), h("div", { class: "wcs-modal-content" }, h("slot", null)), h("div", { class: "wcs-modal-actions" }, h("slot", { name: "actions" })))));
25
+ }
26
+ onKeyDown(event) {
27
+ if (this.showCloseButton && event.key === 'Escape') {
28
+ this.close();
29
+ }
30
+ }
31
+ onCloseButtonClick(_) {
32
+ this.close();
33
+ }
34
+ close() {
35
+ this.show = false;
36
+ this.wcsDialogClosed.emit();
37
+ }
38
+ };
39
+ Modal.style = modalCss;
40
+
41
+ export { Modal as wcs_modal };
@@ -0,0 +1,19 @@
1
+ import { r as registerInstance, h } from './index-b982604a.js';
2
+
3
+ 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)}}";
4
+
5
+ let NavItem = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ /**
9
+ * This attribute specify the text of the item.
10
+ */
11
+ this.text = '';
12
+ }
13
+ render() {
14
+ return (h("a", { href: this.href, class: "wcs-nav-item-container" }, h("slot", null), h("span", { class: "wcs-nav-item-text" }, this.text)));
15
+ }
16
+ };
17
+ NavItem.style = navItemCss;
18
+
19
+ export { NavItem as wcs_nav_item };
@@ -0,0 +1,15 @@
1
+ import { r as registerInstance, h } from './index-b982604a.js';
2
+
3
+ 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}}";
4
+
5
+ let Nav = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ }
9
+ render() {
10
+ return (h("nav", { class: "wcs-nav-container" }, h("slot", null), h("slot", { name: "bottom" })));
11
+ }
12
+ };
13
+ Nav.style = navCss;
14
+
15
+ export { Nav as wcs_nav };
@@ -0,0 +1,43 @@
1
+ import { r as registerInstance, h } from './index-b982604a.js';
2
+
3
+ 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}";
4
+
5
+ let ProgressBar = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ /**
9
+ * Whether the component display the small version
10
+ */
11
+ this.small = false;
12
+ /**
13
+ * Whether it displays a label indicating the percentage of progress above the bar.
14
+ */
15
+ this.showLabel = false;
16
+ /**
17
+ * The actual value of the progress.
18
+ * Ranging from 0 to 100.
19
+ */
20
+ this.value = 0;
21
+ }
22
+ render() {
23
+ const style = {
24
+ width: this.value + '%'
25
+ };
26
+ return (h("div", { class: this.rootClasses() }, h("div", { class: "progress-bar", style: style }, this.showLabel &&
27
+ h("span", { class: "progress-label" }, this.value, h("sup", null, "%")))));
28
+ }
29
+ rootClasses() {
30
+ let classes = 'progress';
31
+ if (this.small)
32
+ classes += ' small';
33
+ if (this.showLabel)
34
+ classes += ' has-label';
35
+ // FIXME: Temporary fix so the label doesn't appear before the bar.
36
+ if (this.value === 0)
37
+ classes += ' value-zero';
38
+ return classes;
39
+ }
40
+ };
41
+ ProgressBar.style = progressBarCss;
42
+
43
+ export { ProgressBar as wcs_progress_bar };
@@ -0,0 +1,26 @@
1
+ import { r as registerInstance, h } from './index-b982604a.js';
2
+
3
+ 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}";
4
+
5
+ let ProgressRadial = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ this.size = 120;
9
+ this.showLabel = false;
10
+ this.value = 0;
11
+ }
12
+ render() {
13
+ const { size, halfSize } = { size: this.size, halfSize: this.size / 2 };
14
+ return (h("div", { class: "progress-circle", "data-component": "radial-progress" }, h("svg", { class: "progress-circle-figure", "data-role": "figure", width: this.size, height: this.size, viewBox: `0 0 ${size} ${size}`, style: this.getSvgStyle() }, h("circle", { class: "progress-circle-meter", cx: halfSize, cy: halfSize, r: "54", "stroke-width": "12" }), h("circle", { class: "progress-circle-value", cx: halfSize, cy: halfSize, r: "54", "stroke-width": "12" })), this.showLabel &&
15
+ h("div", { class: "progress-circle-label", "data-role": "label" }, h("span", null, h("span", { "data-role": "labelvalue" }, this.value), h("sup", null, "%"))), h("input", { "data-role": "control", class: "sr-only", type: "range", value: this.value })));
16
+ }
17
+ getSvgStyle() {
18
+ return {
19
+ 'stroke-dasharray': '339.292',
20
+ 'stroke-dashoffset': `${339.292 - (this.value / 100) * 339.292}`
21
+ };
22
+ }
23
+ };
24
+ ProgressRadial.style = progressRadialCss;
25
+
26
+ export { ProgressRadial as wcs_progress_radial };
@@ -0,0 +1,61 @@
1
+ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-b982604a.js';
2
+
3
+ const radioGroupCss = ":host{display:flex}:host([mode=radio]){flex-direction:column}:host([mode=radio]) ::slotted([slot=option]:first-child){margin-top:0}:host([mode=radio]) ::slotted([slot=option]:last-child){margin-bottom:0}:host([mode=radio]) ::slotted([slot=options]){margin-top:calc(var(--wcs-base-margin) / 2);margin-bottom:calc(var(--wcs-base-margin) / 2)}:host([mode=option]){display:inline-flex;flex-direction:row;padding:calc(var(--wcs-base-margin) / 2);background-color:#4d4f53;border-radius:0.6875rem}";
4
+
5
+ let RadioGroup = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ this.wcsChange = createEvent(this, "wcsChange", 7);
9
+ this.mode = 'radio';
10
+ }
11
+ onValueChangeHandler(newValue) {
12
+ this.updateOptionsState(newValue, true);
13
+ }
14
+ componentDidLoad() {
15
+ if (this.value) {
16
+ this.updateOptionsState(this.value, true);
17
+ }
18
+ if (this.mode === 'option') {
19
+ for (const option of this.options) {
20
+ option.mode = 'option';
21
+ }
22
+ }
23
+ }
24
+ get options() {
25
+ const opts = this.el.querySelectorAll('wcs-radio');
26
+ const slot = this.el.querySelector('slot');
27
+ return opts.length !== 0
28
+ ? opts
29
+ : slot !== null
30
+ ? slot.assignedElements()
31
+ : [];
32
+ }
33
+ selectedOptionChanged(event) {
34
+ this.updateOptionsState(event.detail.value, false);
35
+ this.wcsChange.emit({
36
+ value: event.detail.value
37
+ });
38
+ }
39
+ updateOptionsState(value, markAsChecked) {
40
+ for (const option of this.options) {
41
+ if (option.value !== value) {
42
+ option.removeAttribute('checked');
43
+ }
44
+ else {
45
+ if (markAsChecked) {
46
+ option.setAttribute('checked', '');
47
+ }
48
+ }
49
+ }
50
+ }
51
+ render() {
52
+ return (h(Host, null, h("slot", { name: "option" })));
53
+ }
54
+ get el() { return getElement(this); }
55
+ static get watchers() { return {
56
+ "value": ["onValueChangeHandler"]
57
+ }; }
58
+ };
59
+ RadioGroup.style = radioGroupCss;
60
+
61
+ export { RadioGroup as wcs_radio_group };