@usecapsule/core-components 3.0.0 → 3.0.1-dev.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (229) hide show
  1. package/css/capsule-core.css +83 -14
  2. package/css/capsule-core.css.map +1 -1
  3. package/dist/capsule/capsule.esm.js +1 -1
  4. package/dist/capsule/capsule.esm.js.map +1 -1
  5. package/dist/capsule/index.esm.js +1 -1
  6. package/dist/capsule/index.esm.js.map +1 -1
  7. package/dist/capsule/{p-0d0a0037.entry.js → p-127ac658.entry.js} +2 -2
  8. package/dist/capsule/{p-0d0a0037.entry.js.map → p-127ac658.entry.js.map} +1 -1
  9. package/dist/capsule/p-39584a7b.entry.js +2 -0
  10. package/dist/capsule/p-39584a7b.entry.js.map +1 -0
  11. package/dist/capsule/p-69756614.entry.js +10 -0
  12. package/dist/capsule/{p-d28b96ba.entry.js.map → p-69756614.entry.js.map} +1 -1
  13. package/dist/capsule/p-73398222.entry.js +2 -0
  14. package/dist/capsule/{p-fcead80b.entry.js.map → p-73398222.entry.js.map} +1 -1
  15. package/dist/capsule/p-8de15b15.entry.js +29 -0
  16. package/dist/capsule/p-8de15b15.entry.js.map +1 -0
  17. package/dist/capsule/p-97c33636.js +3 -0
  18. package/dist/capsule/p-97c33636.js.map +1 -0
  19. package/dist/capsule/p-f2393be6.js +2 -0
  20. package/dist/capsule/p-f2393be6.js.map +1 -0
  21. package/dist/capsule/p-f72482c3.entry.js +2 -0
  22. package/dist/capsule/{p-ad14a817.entry.js.map → p-f72482c3.entry.js.map} +1 -1
  23. package/dist/capsule/{p-fa078837.entry.js → p-fd26ce6e.entry.js} +2 -2
  24. package/dist/capsule/{p-fa078837.entry.js.map → p-fd26ce6e.entry.js.map} +1 -1
  25. package/dist/cjs/capsule.cjs.js +10 -10
  26. package/dist/cjs/capsule.cjs.js.map +1 -1
  27. package/dist/cjs/{constants-0869a780.js → constants-9b1b01bb.js} +3 -3
  28. package/dist/cjs/{constants-0869a780.js.map → constants-9b1b01bb.js.map} +1 -1
  29. package/dist/cjs/{cpsl-alert_29.cjs.entry.js → cpsl-alert_33.cjs.entry.js} +608 -95
  30. package/dist/cjs/cpsl-alert_33.cjs.entry.js.map +1 -0
  31. package/dist/cjs/cpsl-animation.cjs.entry.js +2 -2
  32. package/dist/cjs/cpsl-col.cjs.entry.js +2 -2
  33. package/dist/cjs/cpsl-grid.cjs.entry.js +3 -3
  34. package/dist/cjs/cpsl-info-box.cjs.entry.js +3 -3
  35. package/dist/cjs/cpsl-info-box.cjs.entry.js.map +1 -1
  36. package/dist/cjs/cpsl-modal-v2.cjs.entry.js +55 -0
  37. package/dist/cjs/cpsl-modal-v2.cjs.entry.js.map +1 -0
  38. package/dist/cjs/cpsl-row.cjs.entry.js +2 -2
  39. package/dist/cjs/index-5293d431.js +1414 -0
  40. package/dist/cjs/index-5293d431.js.map +1 -0
  41. package/dist/cjs/index.cjs.js +16 -4
  42. package/dist/cjs/index.cjs.js.map +1 -1
  43. package/dist/cjs/loader.cjs.js +2 -2
  44. package/dist/collection/assets/icons/brush.svg +3 -0
  45. package/dist/collection/assets/icons/chevron-up.svg +2 -2
  46. package/dist/collection/assets/icons/close.svg +3 -4
  47. package/dist/collection/assets/icons/cube.svg +3 -0
  48. package/dist/collection/assets/icons/file.svg +3 -0
  49. package/dist/collection/assets/icons/image.svg +3 -0
  50. package/dist/collection/assets/icons/index.js +10 -1
  51. package/dist/collection/assets/icons/index.js.map +1 -1
  52. package/dist/collection/assets/icons/lightning-01.svg +3 -0
  53. package/dist/collection/assets/icons/lightning.svg +2 -2
  54. package/dist/collection/assets/icons/menu.svg +3 -0
  55. package/dist/collection/assets/icons/refresh.svg +3 -0
  56. package/dist/collection/assets/icons/stars.svg +4 -0
  57. package/dist/collection/assets/icons/x.svg +3 -0
  58. package/dist/collection/collection-manifest.json +7 -2
  59. package/dist/collection/components/cpsl-alert/cpsl-alert.js +2 -2
  60. package/dist/collection/components/cpsl-alert/cpsl-alert.js.map +1 -1
  61. package/dist/collection/components/cpsl-animation/cpsl-animation.js +1 -1
  62. package/dist/collection/components/cpsl-app-bar/cpsl-app-bar.js +20 -4
  63. package/dist/collection/components/cpsl-app-bar/cpsl-app-bar.js.map +1 -1
  64. package/dist/collection/components/cpsl-avatar/cpsl-avatar.js +1 -1
  65. package/dist/collection/components/cpsl-button/cpsl-button.css +113 -17
  66. package/dist/collection/components/cpsl-button/cpsl-button.js +63 -7
  67. package/dist/collection/components/cpsl-button/cpsl-button.js.map +1 -1
  68. package/dist/collection/components/cpsl-button-group/cpsl-button-group.css +1 -0
  69. package/dist/collection/components/cpsl-button-group/cpsl-button-group.js +1 -1
  70. package/dist/collection/components/cpsl-card/cpsl-card.css +1 -1
  71. package/dist/collection/components/cpsl-card/cpsl-card.js +1 -1
  72. package/dist/collection/components/cpsl-card/cpsl-card.js.map +1 -1
  73. package/dist/collection/components/cpsl-checkbox/cpsl-checkbox.css +2 -2
  74. package/dist/collection/components/cpsl-checkbox/cpsl-checkbox.js +1 -1
  75. package/dist/collection/components/cpsl-code-input/cpsl-code-input.css +1 -1
  76. package/dist/collection/components/cpsl-code-input/cpsl-code-input.js +2 -2
  77. package/dist/collection/components/cpsl-code-input/cpsl-code-input.js.map +1 -1
  78. package/dist/collection/components/cpsl-col/cpsl-col.js +1 -1
  79. package/dist/collection/components/cpsl-divider/cpsl-divider.css +1 -1
  80. package/dist/collection/components/cpsl-divider/cpsl-divider.js +1 -1
  81. package/dist/collection/components/cpsl-drawer/cpsl-drawer.js +84 -11
  82. package/dist/collection/components/cpsl-drawer/cpsl-drawer.js.map +1 -1
  83. package/dist/collection/components/cpsl-dropdown/cpsl-dropdown.js +1 -1
  84. package/dist/collection/components/cpsl-dropdown/cpsl-dropdown.js.map +1 -1
  85. package/dist/collection/components/cpsl-file-upload/cpsl-file-upload.css +210 -0
  86. package/dist/collection/components/cpsl-file-upload/cpsl-file-upload.js +406 -0
  87. package/dist/collection/components/cpsl-file-upload/cpsl-file-upload.js.map +1 -0
  88. package/dist/collection/components/cpsl-file-upload/test/cpsl-file-upload.e2e.js +29 -0
  89. package/dist/collection/components/cpsl-file-upload/test/cpsl-file-upload.e2e.js.map +1 -0
  90. package/dist/collection/components/cpsl-file-upload/test/cpsl-file-upload.spec.js +37 -0
  91. package/dist/collection/components/cpsl-file-upload/test/cpsl-file-upload.spec.js.map +1 -0
  92. package/dist/collection/components/cpsl-grid/cpsl-grid.js +2 -2
  93. package/dist/collection/components/cpsl-icon/cpsl-icon.js +2 -2
  94. package/dist/collection/components/cpsl-info-box/cpsl-info-box.css +1 -1
  95. package/dist/collection/components/cpsl-info-box/cpsl-info-box.js +1 -1
  96. package/dist/collection/components/cpsl-input/cpsl-input.css +7 -6
  97. package/dist/collection/components/cpsl-input/cpsl-input.js +3 -8
  98. package/dist/collection/components/cpsl-input/cpsl-input.js.map +1 -1
  99. package/dist/collection/components/cpsl-modal/cpsl-modal.css +4 -4
  100. package/dist/collection/components/cpsl-modal/cpsl-modal.js +1 -0
  101. package/dist/collection/components/cpsl-modal/cpsl-modal.js.map +1 -1
  102. package/dist/collection/components/cpsl-modal-v2/cpsl-modal-v2.css +91 -0
  103. package/dist/collection/components/cpsl-modal-v2/cpsl-modal-v2.js +224 -0
  104. package/dist/collection/components/cpsl-modal-v2/cpsl-modal-v2.js.map +1 -0
  105. package/dist/collection/components/cpsl-modal-v2/test/cpsl-modal-v2.e2e.js +29 -0
  106. package/dist/collection/components/cpsl-modal-v2/test/cpsl-modal-v2.e2e.js.map +1 -0
  107. package/dist/collection/components/cpsl-modal-v2/test/cpsl-modal-v2.spec.js +37 -0
  108. package/dist/collection/components/cpsl-modal-v2/test/cpsl-modal-v2.spec.js.map +1 -0
  109. package/dist/collection/components/cpsl-nav-button-group/cpsl-nav-button-group.js +1 -1
  110. package/dist/collection/components/cpsl-overlay/cpsl-overlay.css +1 -1
  111. package/dist/collection/components/cpsl-overlay/cpsl-overlay.js +1 -1
  112. package/dist/collection/components/cpsl-pagination/cpsl-pagination.js +1 -1
  113. package/dist/collection/components/cpsl-pill/cpsl-pill.css +1 -1
  114. package/dist/collection/components/cpsl-pill/cpsl-pill.js +1 -1
  115. package/dist/collection/components/cpsl-popover/cpsl-popover.css +98 -0
  116. package/dist/collection/components/cpsl-popover/cpsl-popover.js +470 -0
  117. package/dist/collection/components/cpsl-popover/cpsl-popover.js.map +1 -0
  118. package/dist/collection/components/cpsl-popover/test/cpsl-popover.e2e.js +29 -0
  119. package/dist/collection/components/cpsl-popover/test/cpsl-popover.e2e.js.map +1 -0
  120. package/dist/collection/components/cpsl-popover/test/cpsl-popover.spec.js +37 -0
  121. package/dist/collection/components/cpsl-popover/test/cpsl-popover.spec.js.map +1 -0
  122. package/dist/collection/components/cpsl-progress-indicator/cpsl-progress-indicator.css +3 -3
  123. package/dist/collection/components/cpsl-qr-code/cpsl-qr-code.css +1 -1
  124. package/dist/collection/components/cpsl-qr-code/cpsl-qr-code.js +1 -1
  125. package/dist/collection/components/cpsl-radio/cpsl-radio.css +2 -2
  126. package/dist/collection/components/cpsl-radio/cpsl-radio.js +1 -1
  127. package/dist/collection/components/cpsl-row/cpsl-row.js +1 -1
  128. package/dist/collection/components/cpsl-select/cpsl-select.css +227 -0
  129. package/dist/collection/components/cpsl-select/cpsl-select.js +393 -0
  130. package/dist/collection/components/cpsl-select/cpsl-select.js.map +1 -0
  131. package/dist/collection/components/cpsl-select/test/cpsl-select.e2e.js +29 -0
  132. package/dist/collection/components/cpsl-select/test/cpsl-select.e2e.js.map +1 -0
  133. package/dist/collection/components/cpsl-select/test/cpsl-select.spec.js +37 -0
  134. package/dist/collection/components/cpsl-select/test/cpsl-select.spec.js.map +1 -0
  135. package/dist/collection/components/cpsl-select-item/cpsl-select-item.css +104 -0
  136. package/dist/collection/components/cpsl-select-item/cpsl-select-item.js +85 -0
  137. package/dist/collection/components/cpsl-select-item/cpsl-select-item.js.map +1 -0
  138. package/dist/collection/components/cpsl-select-item/test/cpsl-select-item.e2e.js +29 -0
  139. package/dist/collection/components/cpsl-select-item/test/cpsl-select-item.e2e.js.map +1 -0
  140. package/dist/collection/components/cpsl-select-item/test/cpsl-select-item.spec.js +37 -0
  141. package/dist/collection/components/cpsl-select-item/test/cpsl-select-item.spec.js.map +1 -0
  142. package/dist/collection/components/cpsl-slide-button/cpsl-slide-button.css +3 -3
  143. package/dist/collection/components/cpsl-slide-button/cpsl-slide-button.js +3 -3
  144. package/dist/collection/components/cpsl-spinner/cpsl-spinner.js +2 -2
  145. package/dist/collection/components/cpsl-switch/cpsl-switch.css +4 -4
  146. package/dist/collection/components/cpsl-switch/cpsl-switch.js +1 -1
  147. package/dist/collection/components/cpsl-tab/cpsl-tab.js +1 -1
  148. package/dist/collection/components/cpsl-table/cpsl-table.css +25 -64
  149. package/dist/collection/components/cpsl-table/cpsl-table.js +1 -63
  150. package/dist/collection/components/cpsl-table/cpsl-table.js.map +1 -1
  151. package/dist/collection/components/cpsl-tabs/cpsl-tabs.css +2 -2
  152. package/dist/collection/components/cpsl-tabs/cpsl-tabs.js +1 -1
  153. package/dist/collection/components/cpsl-text/cpsl-text.css +4 -0
  154. package/dist/collection/components/cpsl-text/cpsl-text.js +5 -4
  155. package/dist/collection/components/cpsl-text/cpsl-text.js.map +1 -1
  156. package/dist/collection/components/cpsl-tile-button/cpsl-tile-button.css +1 -1
  157. package/dist/collection/components/cpsl-tile-button/cpsl-tile-button.js +2 -2
  158. package/dist/collection/constants.js +2 -2
  159. package/dist/collection/constants.js.map +1 -1
  160. package/dist/collection/index.js.map +1 -1
  161. package/dist/collection/interface.js.map +1 -1
  162. package/dist/collection/utils/theme/generateBorderRadii.js +4 -0
  163. package/dist/collection/utils/theme/generateBorderRadii.js.map +1 -1
  164. package/dist/collection/utils/theme/generatePalette.js +11 -3
  165. package/dist/collection/utils/theme/generatePalette.js.map +1 -1
  166. package/dist/esm/capsule.js +11 -11
  167. package/dist/esm/capsule.js.map +1 -1
  168. package/dist/esm/{constants-6acf4ea8.js → constants-fce138fa.js} +3 -3
  169. package/dist/esm/{constants-6acf4ea8.js.map → constants-fce138fa.js.map} +1 -1
  170. package/dist/esm/{cpsl-alert_29.entry.js → cpsl-alert_33.entry.js} +605 -96
  171. package/dist/esm/cpsl-alert_33.entry.js.map +1 -0
  172. package/dist/esm/cpsl-animation.entry.js +2 -2
  173. package/dist/esm/cpsl-col.entry.js +2 -2
  174. package/dist/esm/cpsl-grid.entry.js +3 -3
  175. package/dist/esm/cpsl-info-box.entry.js +3 -3
  176. package/dist/esm/cpsl-info-box.entry.js.map +1 -1
  177. package/dist/esm/cpsl-modal-v2.entry.js +51 -0
  178. package/dist/esm/cpsl-modal-v2.entry.js.map +1 -0
  179. package/dist/esm/cpsl-row.entry.js +2 -2
  180. package/dist/esm/index-97ed6ec1.js +1383 -0
  181. package/dist/esm/index-97ed6ec1.js.map +1 -0
  182. package/dist/esm/index.js +16 -4
  183. package/dist/esm/index.js.map +1 -1
  184. package/dist/esm/loader.js +3 -3
  185. package/dist/loader/cdn.js +1 -3
  186. package/dist/loader/index.cjs.js +1 -3
  187. package/dist/loader/index.es2017.js +1 -3
  188. package/dist/loader/index.js +1 -3
  189. package/dist/types/assets/icons/index.d.ts +9 -0
  190. package/dist/types/components/cpsl-app-bar/cpsl-app-bar.d.ts +1 -0
  191. package/dist/types/components/cpsl-button/cpsl-button.d.ts +4 -1
  192. package/dist/types/components/cpsl-drawer/cpsl-drawer.d.ts +10 -1
  193. package/dist/types/components/cpsl-file-upload/cpsl-file-upload.d.ts +34 -0
  194. package/dist/types/components/cpsl-input/cpsl-input.d.ts +1 -1
  195. package/dist/types/components/cpsl-modal-v2/cpsl-modal-v2.d.ts +17 -0
  196. package/dist/types/components/cpsl-popover/cpsl-popover.d.ts +33 -0
  197. package/dist/types/components/cpsl-select/cpsl-select.d.ts +35 -0
  198. package/dist/types/components/cpsl-select-item/cpsl-select-item.d.ts +8 -0
  199. package/dist/types/components/cpsl-table/cpsl-table.d.ts +0 -3
  200. package/dist/types/components/cpsl-text/cpsl-text.d.ts +1 -1
  201. package/dist/types/components.d.ts +580 -28
  202. package/dist/types/constants.d.ts +2 -2
  203. package/dist/types/index.d.ts +1 -1
  204. package/dist/types/interface.d.ts +44 -0
  205. package/dist/types/stencil-public-runtime.d.ts +3 -8
  206. package/package.json +2 -3
  207. package/dist/capsule/p-4d8e4d86.entry.js +0 -29
  208. package/dist/capsule/p-4d8e4d86.entry.js.map +0 -1
  209. package/dist/capsule/p-86e48e61.js +0 -3
  210. package/dist/capsule/p-86e48e61.js.map +0 -1
  211. package/dist/capsule/p-ad14a817.entry.js +0 -2
  212. package/dist/capsule/p-b6b38e73.js +0 -2
  213. package/dist/capsule/p-b6b38e73.js.map +0 -1
  214. package/dist/capsule/p-d28b96ba.entry.js +0 -10
  215. package/dist/capsule/p-fcead80b.entry.js +0 -2
  216. package/dist/cjs/cpsl-alert_29.cjs.entry.js.map +0 -1
  217. package/dist/cjs/index-5733071e.js +0 -2020
  218. package/dist/cjs/index-5733071e.js.map +0 -1
  219. package/dist/collection/components/cpsl-table/table-interface.js +0 -2
  220. package/dist/collection/components/cpsl-table/table-interface.js.map +0 -1
  221. package/dist/esm/cpsl-alert_29.entry.js.map +0 -1
  222. package/dist/esm/index-8fe9f35e.js +0 -1990
  223. package/dist/esm/index-8fe9f35e.js.map +0 -1
  224. package/dist/esm/polyfills/core-js.js +0 -11
  225. package/dist/esm/polyfills/dom.js +0 -79
  226. package/dist/esm/polyfills/es5-html-element.js +0 -1
  227. package/dist/esm/polyfills/index.js +0 -34
  228. package/dist/esm/polyfills/system.js +0 -6
  229. package/dist/types/components/cpsl-table/table-interface.d.ts +0 -19
@@ -10,14 +10,12 @@ import { CodeChangeEventDetail } from "./components/cpsl-code-input/code-change-
10
10
  import { DropdownInputEventDetail } from "./components/cpsl-dropdown/dropdown-interface";
11
11
  import { InputChangeEventDetail, InputInputEventDetail } from "./components/cpsl-input/input-interface";
12
12
  import { TabClickEventDetail } from "./components/cpsl-tab/tab-interface";
13
- import { ColDef, RowDef } from "./components/cpsl-table/table-interface";
14
13
  import { TabsChangedEventDetail } from "./components/cpsl-tabs/tabs-interface";
15
14
  export { AutocompleteTypes, IconType, TextFieldTypes } from "./interface";
16
15
  export { CodeChangeEventDetail } from "./components/cpsl-code-input/code-change-interface";
17
16
  export { DropdownInputEventDetail } from "./components/cpsl-dropdown/dropdown-interface";
18
17
  export { InputChangeEventDetail, InputInputEventDetail } from "./components/cpsl-input/input-interface";
19
18
  export { TabClickEventDetail } from "./components/cpsl-tab/tab-interface";
20
- export { ColDef, RowDef } from "./components/cpsl-table/table-interface";
21
19
  export { TabsChangedEventDetail } from "./components/cpsl-tabs/tabs-interface";
22
20
  export namespace Components {
23
21
  interface CpslAlert {
@@ -49,6 +47,10 @@ export namespace Components {
49
47
  * The position of the drawer. Default is `fixed`.
50
48
  */
51
49
  "position"?: 'fixed' | 'static';
50
+ /**
51
+ * Override z-index.
52
+ */
53
+ "zIndexOverride"?: number;
52
54
  }
53
55
  interface CpslAvatar {
54
56
  /**
@@ -65,6 +67,10 @@ export namespace Components {
65
67
  "variant"?: 'round' | 'square';
66
68
  }
67
69
  interface CpslButton {
70
+ /**
71
+ * The tag for the button. Options are: `"button"`, `"a". Default is: `"button"`.
72
+ */
73
+ "as"?: 'button' | 'a';
68
74
  /**
69
75
  * If the button is disabled. Default is: false.
70
76
  */
@@ -73,14 +79,22 @@ export namespace Components {
73
79
  * Whether the button takes the full width of it's container. Default is: false.
74
80
  */
75
81
  "fullWidth"?: boolean;
82
+ /**
83
+ * href to use when using a link.
84
+ */
85
+ "href"?: string;
76
86
  /**
77
87
  * The size of the button. Options are: `"small"`, `"medium". Default is: `"medium"`.
78
88
  */
79
89
  "size"?: 'small' | 'medium';
80
90
  /**
81
- * The variant of the button. Options are: `"primary"`, `"secondary", `"icon". Default is: `"primary"`.
91
+ * target to use when using a link.
92
+ */
93
+ "target"?: string;
94
+ /**
95
+ * The variant of the button. Options are: `"primary"`, `"secondary", `"icon", `"text"`. Default is: `"primary"`.
82
96
  */
83
- "variant"?: 'primary' | 'secondary' | 'icon';
97
+ "variant"?: 'primary' | 'secondary' | 'ghost' | 'destructive';
84
98
  }
85
99
  interface CpslButtonGroup {
86
100
  /**
@@ -223,6 +237,14 @@ export namespace Components {
223
237
  * Side from which the drawer will enter from.
224
238
  */
225
239
  "anchor": 'top' | 'bottom' | 'left' | 'right';
240
+ /**
241
+ * Starting anchor position.
242
+ */
243
+ "anchorPosition"?: number;
244
+ /**
245
+ * Hides the overlay for temporary drawers.
246
+ */
247
+ "noOverlay"?: boolean;
226
248
  /**
227
249
  * Whether the drawer is open or not.
228
250
  */
@@ -230,7 +252,7 @@ export namespace Components {
230
252
  /**
231
253
  * Size (height or width) of the drawer.
232
254
  */
233
- "size": number;
255
+ "size": number | 'auto';
234
256
  /**
235
257
  * Duration in seconds of the open/close animation. Default is 0.15.
236
258
  */
@@ -243,6 +265,10 @@ export namespace Components {
243
265
  * The variant of the drawer. `temporary` drawers will cover content and contain a backdrop. `permanent` drawers will sit beside content, i.e. desktop navigation. Default is `temporary`.
244
266
  */
245
267
  "variant"?: 'temporary' | 'permanent';
268
+ /**
269
+ * Override z-index.
270
+ */
271
+ "zIndexOverride"?: number;
246
272
  }
247
273
  interface CpslDropdown {
248
274
  /**
@@ -262,6 +288,44 @@ export namespace Components {
262
288
  */
263
289
  "width": string;
264
290
  }
291
+ interface CpslFileUpload {
292
+ /**
293
+ * Error text to show below the input. If this is provided the input will enter an error state.
294
+ */
295
+ "errorText"?: string;
296
+ /**
297
+ * Filename for the external source of the selected file.
298
+ */
299
+ "externalFilename"?: string;
300
+ /**
301
+ * External source for the selected file.
302
+ */
303
+ "externalSrc"?: string;
304
+ /**
305
+ * Valid file types.
306
+ */
307
+ "fileTypes"?: string[];
308
+ /**
309
+ * Helper text to show below the input. If `"errorText"` is provided that will take precedence.
310
+ */
311
+ "helperText"?: string;
312
+ /**
313
+ * The label for the input.
314
+ */
315
+ "label"?: string;
316
+ /**
317
+ * If `true`, the user must fill in a value before submitting a form.
318
+ */
319
+ "required": boolean;
320
+ /**
321
+ * If `true`, the label will display an "optional" tag.
322
+ */
323
+ "showOptionalLabel": boolean;
324
+ /**
325
+ * Function to trigger file upload to server. Returns: boolean indicating success or failure.
326
+ */
327
+ "uploadFile"?: (file: File) => Promise<boolean>;
328
+ }
265
329
  interface CpslGrid {
266
330
  /**
267
331
  * If `true`, the grid will have a fixed width based on the screen size.
@@ -424,6 +488,32 @@ export namespace Components {
424
488
  */
425
489
  "zIndexOverride"?: number;
426
490
  }
491
+ interface CpslModalV2 {
492
+ /**
493
+ * Whether or not to show the modal with a box shadow.
494
+ */
495
+ "elevated": boolean;
496
+ /**
497
+ * Duration in seconds of the modal entering. Default is .15.
498
+ */
499
+ "enterTransitionDuration"?: number;
500
+ /**
501
+ * Duration in seconds of the modal exiting. Default is .15.
502
+ */
503
+ "exitTransitionDuration"?: number;
504
+ /**
505
+ * Whether or not to show the overlay.
506
+ */
507
+ "noOverlay": boolean;
508
+ /**
509
+ * Whether or not to show the modal.
510
+ */
511
+ "open": boolean;
512
+ /**
513
+ * Override z-index.
514
+ */
515
+ "zIndexOverride"?: number;
516
+ }
427
517
  interface CpslNavButtonGroup {
428
518
  /**
429
519
  * The id of the selected button.
@@ -468,6 +558,48 @@ export namespace Components {
468
558
  */
469
559
  "text": string;
470
560
  }
561
+ interface CpslPopover {
562
+ /**
563
+ * Vertical anchor origin. Options are: `"left"`, `"center"`, `"right"`. Default is: `"left"`.
564
+ */
565
+ "anchorOriginHorizontal"?: 'left' | 'center' | 'right';
566
+ /**
567
+ * Vertical anchor origin. Options are: `"top"`, `"center"`, `"bottom"`. Default is: `"bottom"`.
568
+ */
569
+ "anchorOriginVertical"?: 'top' | 'center' | 'bottom';
570
+ /**
571
+ * If `true` the container will use the width of the content, else it will be set to the width of the trigger. Default is `true`
572
+ */
573
+ "autoWidth"?: boolean;
574
+ /**
575
+ * Call to close the popover manually.
576
+ */
577
+ "closePopover": () => Promise<void>;
578
+ /**
579
+ * Used internally to prevent select from blurring unintentionally.
580
+ */
581
+ "preventBlur": boolean;
582
+ /**
583
+ * Vertical transformation origin. Options are: `"left"`, `"center"`, `"right"`. Default is: `"left"`.
584
+ */
585
+ "transformOriginHorizontal"?: 'left' | 'center' | 'right';
586
+ /**
587
+ * Vertical transformation origin. Options are: `"top"`, `"center"`, `"bottom"`. Default is: `"bottom"`.
588
+ */
589
+ "transformOriginVertical"?: 'top' | 'center' | 'bottom';
590
+ /**
591
+ * ID for the element that triggers the popover to open.
592
+ */
593
+ "trigger": string;
594
+ /**
595
+ * Which trigger causes the popover to open. Options are: `"click"`, `"hover"`. Default is: `"click"`.
596
+ */
597
+ "triggerAction": 'click' | 'hover';
598
+ /**
599
+ * Padding from edge of window for the popover container.
600
+ */
601
+ "windowPadding"?: number;
602
+ }
471
603
  interface CpslProgressIndicator {
472
604
  /**
473
605
  * Current zero based step.
@@ -500,6 +632,66 @@ export namespace Components {
500
632
  }
501
633
  interface CpslRow {
502
634
  }
635
+ interface CpslSelect {
636
+ /**
637
+ * If `true`, the user cannot interact with the input.
638
+ */
639
+ "disabled": boolean;
640
+ /**
641
+ * Set the max height of the dropdown.
642
+ */
643
+ "dropdownMaxHeight"?: number;
644
+ /**
645
+ * Error text to show below the input. If this is provided the input will enter an error state.
646
+ */
647
+ "errorText"?: string;
648
+ /**
649
+ * Format value for display when selected.
650
+ */
651
+ "formatValue"?: (value: string) => string;
652
+ /**
653
+ * Helper text to show below the input. If `"errorText"` is provided that will take precedence.
654
+ */
655
+ "helperText"?: string;
656
+ /**
657
+ * ID of the element, must be unique for the popover trigger.
658
+ */
659
+ "id": string;
660
+ /**
661
+ * The label for the input.
662
+ */
663
+ "label"?: string;
664
+ /**
665
+ * Placeholder to display if `selectedValue` is empty.
666
+ */
667
+ "placeholder"?: string;
668
+ /**
669
+ * If `true`, the user must fill in a value before submitting a form.
670
+ */
671
+ "required": boolean;
672
+ /**
673
+ * Value of the selected item.
674
+ */
675
+ "selectedValue"?: string;
676
+ /**
677
+ * Will show the formatted selected item (passed in the `selected-item` slot) in the select rather than the item value.
678
+ */
679
+ "showFormattedSelectedItem"?: boolean;
680
+ /**
681
+ * If `true`, the label will display an "optional" tag.
682
+ */
683
+ "showOptionalLabel": boolean;
684
+ }
685
+ interface CpslSelectItem {
686
+ /**
687
+ * Whether the item is selected or not.
688
+ */
689
+ "selected"?: boolean;
690
+ /**
691
+ * Value of the item.
692
+ */
693
+ "value": string;
694
+ }
503
695
  interface CpslSlideButton {
504
696
  /**
505
697
  * Whether or not the component is disabled. If true, the component will display the `startText`.
@@ -549,14 +741,6 @@ export namespace Components {
549
741
  "tab": string;
550
742
  }
551
743
  interface CpslTable {
552
- /**
553
- * Columns for the table.
554
- */
555
- "columns": ColDef[];
556
- /**
557
- * Data rows for the table.
558
- */
559
- "rows": RowDef[];
560
744
  }
561
745
  interface CpslTabs {
562
746
  /**
@@ -570,9 +754,9 @@ export namespace Components {
570
754
  }
571
755
  interface CpslText {
572
756
  /**
573
- * The color of text. Options are: `"primary"`, `"secondary", `"subtle", `"inverted", `"error". Default is: `"primary"`.
757
+ * The color of text. Options are: `"primary"`, `"secondary", `"tertiary", `"subtle", `"inverted", `"error". Default is: `"primary"`.
574
758
  */
575
- "color"?: 'primary' | 'secondary' | 'subtle' | 'inverted' | 'error';
759
+ "color"?: 'primary' | 'secondary' | 'tertiary' | 'subtle' | 'inverted' | 'error';
576
760
  /**
577
761
  * The variant of text. Options are: `"body2XS"`, `"bodyXS", `"bodyS", `"bodyM", `"bodyL", `"bodyXL", `"headingXS", `"headingS", `"headingM", `"headingL", `"headingXL", `"heading2XL". Default is: `"bodyM"`.
578
762
  */
@@ -605,6 +789,10 @@ export interface CpslDropdownCustomEvent<T> extends CustomEvent<T> {
605
789
  detail: T;
606
790
  target: HTMLCpslDropdownElement;
607
791
  }
792
+ export interface CpslFileUploadCustomEvent<T> extends CustomEvent<T> {
793
+ detail: T;
794
+ target: HTMLCpslFileUploadElement;
795
+ }
608
796
  export interface CpslInputCustomEvent<T> extends CustomEvent<T> {
609
797
  detail: T;
610
798
  target: HTMLCpslInputElement;
@@ -613,14 +801,30 @@ export interface CpslModalCustomEvent<T> extends CustomEvent<T> {
613
801
  detail: T;
614
802
  target: HTMLCpslModalElement;
615
803
  }
804
+ export interface CpslModalV2CustomEvent<T> extends CustomEvent<T> {
805
+ detail: T;
806
+ target: HTMLCpslModalV2Element;
807
+ }
616
808
  export interface CpslPaginationCustomEvent<T> extends CustomEvent<T> {
617
809
  detail: T;
618
810
  target: HTMLCpslPaginationElement;
619
811
  }
812
+ export interface CpslPopoverCustomEvent<T> extends CustomEvent<T> {
813
+ detail: T;
814
+ target: HTMLCpslPopoverElement;
815
+ }
620
816
  export interface CpslRadioCustomEvent<T> extends CustomEvent<T> {
621
817
  detail: T;
622
818
  target: HTMLCpslRadioElement;
623
819
  }
820
+ export interface CpslSelectCustomEvent<T> extends CustomEvent<T> {
821
+ detail: T;
822
+ target: HTMLCpslSelectElement;
823
+ }
824
+ export interface CpslSelectItemCustomEvent<T> extends CustomEvent<T> {
825
+ detail: T;
826
+ target: HTMLCpslSelectItemElement;
827
+ }
624
828
  export interface CpslSlideButtonCustomEvent<T> extends CustomEvent<T> {
625
829
  detail: T;
626
830
  target: HTMLCpslSlideButtonElement;
@@ -749,6 +953,27 @@ declare global {
749
953
  prototype: HTMLCpslDropdownElement;
750
954
  new (): HTMLCpslDropdownElement;
751
955
  };
956
+ interface HTMLCpslFileUploadElementEventMap {
957
+ "cpslOnDrop": DragEvent;
958
+ "cpslOnDragEnter": DragEvent;
959
+ "cpslOnDragLeave": DragEvent;
960
+ "cpslFileChange": File;
961
+ "cpslFileRemoved": void;
962
+ }
963
+ interface HTMLCpslFileUploadElement extends Components.CpslFileUpload, HTMLStencilElement {
964
+ addEventListener<K extends keyof HTMLCpslFileUploadElementEventMap>(type: K, listener: (this: HTMLCpslFileUploadElement, ev: CpslFileUploadCustomEvent<HTMLCpslFileUploadElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
965
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
966
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
967
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
968
+ removeEventListener<K extends keyof HTMLCpslFileUploadElementEventMap>(type: K, listener: (this: HTMLCpslFileUploadElement, ev: CpslFileUploadCustomEvent<HTMLCpslFileUploadElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
969
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
970
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
971
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
972
+ }
973
+ var HTMLCpslFileUploadElement: {
974
+ prototype: HTMLCpslFileUploadElement;
975
+ new (): HTMLCpslFileUploadElement;
976
+ };
752
977
  interface HTMLCpslGridElement extends Components.CpslGrid, HTMLStencilElement {
753
978
  }
754
979
  var HTMLCpslGridElement: {
@@ -809,6 +1034,26 @@ declare global {
809
1034
  prototype: HTMLCpslModalElement;
810
1035
  new (): HTMLCpslModalElement;
811
1036
  };
1037
+ interface HTMLCpslModalV2ElementEventMap {
1038
+ "cpslModalEntering": null;
1039
+ "cpslModalEntered": null;
1040
+ "cpslModalExiting": null;
1041
+ "cpslModalExited": null;
1042
+ }
1043
+ interface HTMLCpslModalV2Element extends Components.CpslModalV2, HTMLStencilElement {
1044
+ addEventListener<K extends keyof HTMLCpslModalV2ElementEventMap>(type: K, listener: (this: HTMLCpslModalV2Element, ev: CpslModalV2CustomEvent<HTMLCpslModalV2ElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
1045
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1046
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1047
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
1048
+ removeEventListener<K extends keyof HTMLCpslModalV2ElementEventMap>(type: K, listener: (this: HTMLCpslModalV2Element, ev: CpslModalV2CustomEvent<HTMLCpslModalV2ElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
1049
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
1050
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
1051
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
1052
+ }
1053
+ var HTMLCpslModalV2Element: {
1054
+ prototype: HTMLCpslModalV2Element;
1055
+ new (): HTMLCpslModalV2Element;
1056
+ };
812
1057
  interface HTMLCpslNavButtonGroupElement extends Components.CpslNavButtonGroup, HTMLStencilElement {
813
1058
  }
814
1059
  var HTMLCpslNavButtonGroupElement: {
@@ -844,6 +1089,24 @@ declare global {
844
1089
  prototype: HTMLCpslPillElement;
845
1090
  new (): HTMLCpslPillElement;
846
1091
  };
1092
+ interface HTMLCpslPopoverElementEventMap {
1093
+ "cpslOpen": void;
1094
+ "cpslClose": void;
1095
+ }
1096
+ interface HTMLCpslPopoverElement extends Components.CpslPopover, HTMLStencilElement {
1097
+ addEventListener<K extends keyof HTMLCpslPopoverElementEventMap>(type: K, listener: (this: HTMLCpslPopoverElement, ev: CpslPopoverCustomEvent<HTMLCpslPopoverElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
1098
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1099
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1100
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
1101
+ removeEventListener<K extends keyof HTMLCpslPopoverElementEventMap>(type: K, listener: (this: HTMLCpslPopoverElement, ev: CpslPopoverCustomEvent<HTMLCpslPopoverElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
1102
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
1103
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
1104
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
1105
+ }
1106
+ var HTMLCpslPopoverElement: {
1107
+ prototype: HTMLCpslPopoverElement;
1108
+ new (): HTMLCpslPopoverElement;
1109
+ };
847
1110
  interface HTMLCpslProgressIndicatorElement extends Components.CpslProgressIndicator, HTMLStencilElement {
848
1111
  }
849
1112
  var HTMLCpslProgressIndicatorElement: {
@@ -879,6 +1142,42 @@ declare global {
879
1142
  prototype: HTMLCpslRowElement;
880
1143
  new (): HTMLCpslRowElement;
881
1144
  };
1145
+ interface HTMLCpslSelectElementEventMap {
1146
+ "cpslBlur": FocusEvent;
1147
+ "cpslFocus": FocusEvent;
1148
+ "cpslSelectValueChange": string;
1149
+ }
1150
+ interface HTMLCpslSelectElement extends Components.CpslSelect, HTMLStencilElement {
1151
+ addEventListener<K extends keyof HTMLCpslSelectElementEventMap>(type: K, listener: (this: HTMLCpslSelectElement, ev: CpslSelectCustomEvent<HTMLCpslSelectElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
1152
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1153
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1154
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
1155
+ removeEventListener<K extends keyof HTMLCpslSelectElementEventMap>(type: K, listener: (this: HTMLCpslSelectElement, ev: CpslSelectCustomEvent<HTMLCpslSelectElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
1156
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
1157
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
1158
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
1159
+ }
1160
+ var HTMLCpslSelectElement: {
1161
+ prototype: HTMLCpslSelectElement;
1162
+ new (): HTMLCpslSelectElement;
1163
+ };
1164
+ interface HTMLCpslSelectItemElementEventMap {
1165
+ "cpslSelectItemClick": string;
1166
+ }
1167
+ interface HTMLCpslSelectItemElement extends Components.CpslSelectItem, HTMLStencilElement {
1168
+ addEventListener<K extends keyof HTMLCpslSelectItemElementEventMap>(type: K, listener: (this: HTMLCpslSelectItemElement, ev: CpslSelectItemCustomEvent<HTMLCpslSelectItemElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
1169
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1170
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1171
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
1172
+ removeEventListener<K extends keyof HTMLCpslSelectItemElementEventMap>(type: K, listener: (this: HTMLCpslSelectItemElement, ev: CpslSelectItemCustomEvent<HTMLCpslSelectItemElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
1173
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
1174
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
1175
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
1176
+ }
1177
+ var HTMLCpslSelectItemElement: {
1178
+ prototype: HTMLCpslSelectItemElement;
1179
+ new (): HTMLCpslSelectItemElement;
1180
+ };
882
1181
  interface HTMLCpslSlideButtonElementEventMap {
883
1182
  "cpslComplete": boolean;
884
1183
  }
@@ -986,19 +1285,24 @@ declare global {
986
1285
  "cpsl-divider": HTMLCpslDividerElement;
987
1286
  "cpsl-drawer": HTMLCpslDrawerElement;
988
1287
  "cpsl-dropdown": HTMLCpslDropdownElement;
1288
+ "cpsl-file-upload": HTMLCpslFileUploadElement;
989
1289
  "cpsl-grid": HTMLCpslGridElement;
990
1290
  "cpsl-icon": HTMLCpslIconElement;
991
1291
  "cpsl-info-box": HTMLCpslInfoBoxElement;
992
1292
  "cpsl-input": HTMLCpslInputElement;
993
1293
  "cpsl-modal": HTMLCpslModalElement;
1294
+ "cpsl-modal-v2": HTMLCpslModalV2Element;
994
1295
  "cpsl-nav-button-group": HTMLCpslNavButtonGroupElement;
995
1296
  "cpsl-overlay": HTMLCpslOverlayElement;
996
1297
  "cpsl-pagination": HTMLCpslPaginationElement;
997
1298
  "cpsl-pill": HTMLCpslPillElement;
1299
+ "cpsl-popover": HTMLCpslPopoverElement;
998
1300
  "cpsl-progress-indicator": HTMLCpslProgressIndicatorElement;
999
1301
  "cpsl-qr-code": HTMLCpslQrCodeElement;
1000
1302
  "cpsl-radio": HTMLCpslRadioElement;
1001
1303
  "cpsl-row": HTMLCpslRowElement;
1304
+ "cpsl-select": HTMLCpslSelectElement;
1305
+ "cpsl-select-item": HTMLCpslSelectItemElement;
1002
1306
  "cpsl-slide-button": HTMLCpslSlideButtonElement;
1003
1307
  "cpsl-spinner": HTMLCpslSpinnerElement;
1004
1308
  "cpsl-switch": HTMLCpslSwitchElement;
@@ -1035,6 +1339,10 @@ declare namespace LocalJSX {
1035
1339
  * The position of the drawer. Default is `fixed`.
1036
1340
  */
1037
1341
  "position"?: 'fixed' | 'static';
1342
+ /**
1343
+ * Override z-index.
1344
+ */
1345
+ "zIndexOverride"?: number;
1038
1346
  }
1039
1347
  interface CpslAvatar {
1040
1348
  /**
@@ -1051,6 +1359,10 @@ declare namespace LocalJSX {
1051
1359
  "variant"?: 'round' | 'square';
1052
1360
  }
1053
1361
  interface CpslButton {
1362
+ /**
1363
+ * The tag for the button. Options are: `"button"`, `"a". Default is: `"button"`.
1364
+ */
1365
+ "as"?: 'button' | 'a';
1054
1366
  /**
1055
1367
  * If the button is disabled. Default is: false.
1056
1368
  */
@@ -1059,14 +1371,22 @@ declare namespace LocalJSX {
1059
1371
  * Whether the button takes the full width of it's container. Default is: false.
1060
1372
  */
1061
1373
  "fullWidth"?: boolean;
1374
+ /**
1375
+ * href to use when using a link.
1376
+ */
1377
+ "href"?: string;
1062
1378
  /**
1063
1379
  * The size of the button. Options are: `"small"`, `"medium". Default is: `"medium"`.
1064
1380
  */
1065
1381
  "size"?: 'small' | 'medium';
1066
1382
  /**
1067
- * The variant of the button. Options are: `"primary"`, `"secondary", `"icon". Default is: `"primary"`.
1383
+ * target to use when using a link.
1384
+ */
1385
+ "target"?: string;
1386
+ /**
1387
+ * The variant of the button. Options are: `"primary"`, `"secondary", `"icon", `"text"`. Default is: `"primary"`.
1068
1388
  */
1069
- "variant"?: 'primary' | 'secondary' | 'icon';
1389
+ "variant"?: 'primary' | 'secondary' | 'ghost' | 'destructive';
1070
1390
  }
1071
1391
  interface CpslButtonGroup {
1072
1392
  /**
@@ -1217,6 +1537,14 @@ declare namespace LocalJSX {
1217
1537
  * Side from which the drawer will enter from.
1218
1538
  */
1219
1539
  "anchor"?: 'top' | 'bottom' | 'left' | 'right';
1540
+ /**
1541
+ * Starting anchor position.
1542
+ */
1543
+ "anchorPosition"?: number;
1544
+ /**
1545
+ * Hides the overlay for temporary drawers.
1546
+ */
1547
+ "noOverlay"?: boolean;
1220
1548
  /**
1221
1549
  * Whether the drawer is open or not.
1222
1550
  */
@@ -1224,7 +1552,7 @@ declare namespace LocalJSX {
1224
1552
  /**
1225
1553
  * Size (height or width) of the drawer.
1226
1554
  */
1227
- "size"?: number;
1555
+ "size"?: number | 'auto';
1228
1556
  /**
1229
1557
  * Duration in seconds of the open/close animation. Default is 0.15.
1230
1558
  */
@@ -1237,6 +1565,10 @@ declare namespace LocalJSX {
1237
1565
  * The variant of the drawer. `temporary` drawers will cover content and contain a backdrop. `permanent` drawers will sit beside content, i.e. desktop navigation. Default is `temporary`.
1238
1566
  */
1239
1567
  "variant"?: 'temporary' | 'permanent';
1568
+ /**
1569
+ * Override z-index.
1570
+ */
1571
+ "zIndexOverride"?: number;
1240
1572
  }
1241
1573
  interface CpslDropdown {
1242
1574
  /**
@@ -1260,6 +1592,64 @@ declare namespace LocalJSX {
1260
1592
  */
1261
1593
  "width"?: string;
1262
1594
  }
1595
+ interface CpslFileUpload {
1596
+ /**
1597
+ * Error text to show below the input. If this is provided the input will enter an error state.
1598
+ */
1599
+ "errorText"?: string;
1600
+ /**
1601
+ * Filename for the external source of the selected file.
1602
+ */
1603
+ "externalFilename"?: string;
1604
+ /**
1605
+ * External source for the selected file.
1606
+ */
1607
+ "externalSrc"?: string;
1608
+ /**
1609
+ * Valid file types.
1610
+ */
1611
+ "fileTypes"?: string[];
1612
+ /**
1613
+ * Helper text to show below the input. If `"errorText"` is provided that will take precedence.
1614
+ */
1615
+ "helperText"?: string;
1616
+ /**
1617
+ * The label for the input.
1618
+ */
1619
+ "label"?: string;
1620
+ /**
1621
+ * Emitted when the file changes.
1622
+ */
1623
+ "onCpslFileChange"?: (event: CpslFileUploadCustomEvent<File>) => void;
1624
+ /**
1625
+ * Emitted when the file is removed.
1626
+ */
1627
+ "onCpslFileRemoved"?: (event: CpslFileUploadCustomEvent<void>) => void;
1628
+ /**
1629
+ * Emitted when the file drag enters the input.
1630
+ */
1631
+ "onCpslOnDragEnter"?: (event: CpslFileUploadCustomEvent<DragEvent>) => void;
1632
+ /**
1633
+ * Emitted when the file drag leaves the input.
1634
+ */
1635
+ "onCpslOnDragLeave"?: (event: CpslFileUploadCustomEvent<DragEvent>) => void;
1636
+ /**
1637
+ * Emitted when the file is dropped in the input.
1638
+ */
1639
+ "onCpslOnDrop"?: (event: CpslFileUploadCustomEvent<DragEvent>) => void;
1640
+ /**
1641
+ * If `true`, the user must fill in a value before submitting a form.
1642
+ */
1643
+ "required"?: boolean;
1644
+ /**
1645
+ * If `true`, the label will display an "optional" tag.
1646
+ */
1647
+ "showOptionalLabel"?: boolean;
1648
+ /**
1649
+ * Function to trigger file upload to server. Returns: boolean indicating success or failure.
1650
+ */
1651
+ "uploadFile"?: (file: File) => Promise<boolean>;
1652
+ }
1263
1653
  interface CpslGrid {
1264
1654
  /**
1265
1655
  * If `true`, the grid will have a fixed width based on the screen size.
@@ -1462,6 +1852,48 @@ declare namespace LocalJSX {
1462
1852
  */
1463
1853
  "zIndexOverride"?: number;
1464
1854
  }
1855
+ interface CpslModalV2 {
1856
+ /**
1857
+ * Whether or not to show the modal with a box shadow.
1858
+ */
1859
+ "elevated"?: boolean;
1860
+ /**
1861
+ * Duration in seconds of the modal entering. Default is .15.
1862
+ */
1863
+ "enterTransitionDuration"?: number;
1864
+ /**
1865
+ * Duration in seconds of the modal exiting. Default is .15.
1866
+ */
1867
+ "exitTransitionDuration"?: number;
1868
+ /**
1869
+ * Whether or not to show the overlay.
1870
+ */
1871
+ "noOverlay"?: boolean;
1872
+ /**
1873
+ * Emitted when enter animation finishes.
1874
+ */
1875
+ "onCpslModalEntered"?: (event: CpslModalV2CustomEvent<null>) => void;
1876
+ /**
1877
+ * Emitted when enter animation starts.
1878
+ */
1879
+ "onCpslModalEntering"?: (event: CpslModalV2CustomEvent<null>) => void;
1880
+ /**
1881
+ * Emitted when exit animation finishes.
1882
+ */
1883
+ "onCpslModalExited"?: (event: CpslModalV2CustomEvent<null>) => void;
1884
+ /**
1885
+ * Emitted when exit animation starts.
1886
+ */
1887
+ "onCpslModalExiting"?: (event: CpslModalV2CustomEvent<null>) => void;
1888
+ /**
1889
+ * Whether or not to show the modal.
1890
+ */
1891
+ "open"?: boolean;
1892
+ /**
1893
+ * Override z-index.
1894
+ */
1895
+ "zIndexOverride"?: number;
1896
+ }
1465
1897
  interface CpslNavButtonGroup {
1466
1898
  /**
1467
1899
  * The id of the selected button.
@@ -1510,6 +1942,52 @@ declare namespace LocalJSX {
1510
1942
  */
1511
1943
  "text"?: string;
1512
1944
  }
1945
+ interface CpslPopover {
1946
+ /**
1947
+ * Vertical anchor origin. Options are: `"left"`, `"center"`, `"right"`. Default is: `"left"`.
1948
+ */
1949
+ "anchorOriginHorizontal"?: 'left' | 'center' | 'right';
1950
+ /**
1951
+ * Vertical anchor origin. Options are: `"top"`, `"center"`, `"bottom"`. Default is: `"bottom"`.
1952
+ */
1953
+ "anchorOriginVertical"?: 'top' | 'center' | 'bottom';
1954
+ /**
1955
+ * If `true` the container will use the width of the content, else it will be set to the width of the trigger. Default is `true`
1956
+ */
1957
+ "autoWidth"?: boolean;
1958
+ /**
1959
+ * Emitted when the popover closes.
1960
+ */
1961
+ "onCpslClose"?: (event: CpslPopoverCustomEvent<void>) => void;
1962
+ /**
1963
+ * Emitted when the popover opens.
1964
+ */
1965
+ "onCpslOpen"?: (event: CpslPopoverCustomEvent<void>) => void;
1966
+ /**
1967
+ * Used internally to prevent select from blurring unintentionally.
1968
+ */
1969
+ "preventBlur"?: boolean;
1970
+ /**
1971
+ * Vertical transformation origin. Options are: `"left"`, `"center"`, `"right"`. Default is: `"left"`.
1972
+ */
1973
+ "transformOriginHorizontal"?: 'left' | 'center' | 'right';
1974
+ /**
1975
+ * Vertical transformation origin. Options are: `"top"`, `"center"`, `"bottom"`. Default is: `"bottom"`.
1976
+ */
1977
+ "transformOriginVertical"?: 'top' | 'center' | 'bottom';
1978
+ /**
1979
+ * ID for the element that triggers the popover to open.
1980
+ */
1981
+ "trigger"?: string;
1982
+ /**
1983
+ * Which trigger causes the popover to open. Options are: `"click"`, `"hover"`. Default is: `"click"`.
1984
+ */
1985
+ "triggerAction"?: 'click' | 'hover';
1986
+ /**
1987
+ * Padding from edge of window for the popover container.
1988
+ */
1989
+ "windowPadding"?: number;
1990
+ }
1513
1991
  interface CpslProgressIndicator {
1514
1992
  /**
1515
1993
  * Current zero based step.
@@ -1546,6 +2024,78 @@ declare namespace LocalJSX {
1546
2024
  }
1547
2025
  interface CpslRow {
1548
2026
  }
2027
+ interface CpslSelect {
2028
+ /**
2029
+ * If `true`, the user cannot interact with the input.
2030
+ */
2031
+ "disabled"?: boolean;
2032
+ /**
2033
+ * Set the max height of the dropdown.
2034
+ */
2035
+ "dropdownMaxHeight"?: number;
2036
+ /**
2037
+ * Error text to show below the input. If this is provided the input will enter an error state.
2038
+ */
2039
+ "errorText"?: string;
2040
+ /**
2041
+ * Format value for display when selected.
2042
+ */
2043
+ "formatValue"?: (value: string) => string;
2044
+ /**
2045
+ * Helper text to show below the input. If `"errorText"` is provided that will take precedence.
2046
+ */
2047
+ "helperText"?: string;
2048
+ /**
2049
+ * ID of the element, must be unique for the popover trigger.
2050
+ */
2051
+ "id"?: string;
2052
+ /**
2053
+ * The label for the input.
2054
+ */
2055
+ "label"?: string;
2056
+ /**
2057
+ * Emitted when the input loses focus.
2058
+ */
2059
+ "onCpslBlur"?: (event: CpslSelectCustomEvent<FocusEvent>) => void;
2060
+ /**
2061
+ * Emitted when the input has focus.
2062
+ */
2063
+ "onCpslFocus"?: (event: CpslSelectCustomEvent<FocusEvent>) => void;
2064
+ /**
2065
+ * Emitted when the value changes.
2066
+ */
2067
+ "onCpslSelectValueChange"?: (event: CpslSelectCustomEvent<string>) => void;
2068
+ /**
2069
+ * Placeholder to display if `selectedValue` is empty.
2070
+ */
2071
+ "placeholder"?: string;
2072
+ /**
2073
+ * If `true`, the user must fill in a value before submitting a form.
2074
+ */
2075
+ "required"?: boolean;
2076
+ /**
2077
+ * Value of the selected item.
2078
+ */
2079
+ "selectedValue"?: string;
2080
+ /**
2081
+ * Will show the formatted selected item (passed in the `selected-item` slot) in the select rather than the item value.
2082
+ */
2083
+ "showFormattedSelectedItem"?: boolean;
2084
+ /**
2085
+ * If `true`, the label will display an "optional" tag.
2086
+ */
2087
+ "showOptionalLabel"?: boolean;
2088
+ }
2089
+ interface CpslSelectItem {
2090
+ /**
2091
+ * Whether the item is selected or not.
2092
+ */
2093
+ "selected"?: boolean;
2094
+ /**
2095
+ * Value of the item.
2096
+ */
2097
+ "value"?: string;
2098
+ }
1549
2099
  interface CpslSlideButton {
1550
2100
  /**
1551
2101
  * Whether or not the component is disabled. If true, the component will display the `startText`.
@@ -1603,14 +2153,6 @@ declare namespace LocalJSX {
1603
2153
  "tab"?: string;
1604
2154
  }
1605
2155
  interface CpslTable {
1606
- /**
1607
- * Columns for the table.
1608
- */
1609
- "columns"?: ColDef[];
1610
- /**
1611
- * Data rows for the table.
1612
- */
1613
- "rows"?: RowDef[];
1614
2156
  }
1615
2157
  interface CpslTabs {
1616
2158
  /**
@@ -1628,9 +2170,9 @@ declare namespace LocalJSX {
1628
2170
  }
1629
2171
  interface CpslText {
1630
2172
  /**
1631
- * The color of text. Options are: `"primary"`, `"secondary", `"subtle", `"inverted", `"error". Default is: `"primary"`.
2173
+ * The color of text. Options are: `"primary"`, `"secondary", `"tertiary", `"subtle", `"inverted", `"error". Default is: `"primary"`.
1632
2174
  */
1633
- "color"?: 'primary' | 'secondary' | 'subtle' | 'inverted' | 'error';
2175
+ "color"?: 'primary' | 'secondary' | 'tertiary' | 'subtle' | 'inverted' | 'error';
1634
2176
  /**
1635
2177
  * The variant of text. Options are: `"body2XS"`, `"bodyXS", `"bodyS", `"bodyM", `"bodyL", `"bodyXL", `"headingXS", `"headingS", `"headingM", `"headingL", `"headingXL", `"heading2XL". Default is: `"bodyM"`.
1636
2178
  */
@@ -1664,19 +2206,24 @@ declare namespace LocalJSX {
1664
2206
  "cpsl-divider": CpslDivider;
1665
2207
  "cpsl-drawer": CpslDrawer;
1666
2208
  "cpsl-dropdown": CpslDropdown;
2209
+ "cpsl-file-upload": CpslFileUpload;
1667
2210
  "cpsl-grid": CpslGrid;
1668
2211
  "cpsl-icon": CpslIcon;
1669
2212
  "cpsl-info-box": CpslInfoBox;
1670
2213
  "cpsl-input": CpslInput;
1671
2214
  "cpsl-modal": CpslModal;
2215
+ "cpsl-modal-v2": CpslModalV2;
1672
2216
  "cpsl-nav-button-group": CpslNavButtonGroup;
1673
2217
  "cpsl-overlay": CpslOverlay;
1674
2218
  "cpsl-pagination": CpslPagination;
1675
2219
  "cpsl-pill": CpslPill;
2220
+ "cpsl-popover": CpslPopover;
1676
2221
  "cpsl-progress-indicator": CpslProgressIndicator;
1677
2222
  "cpsl-qr-code": CpslQrCode;
1678
2223
  "cpsl-radio": CpslRadio;
1679
2224
  "cpsl-row": CpslRow;
2225
+ "cpsl-select": CpslSelect;
2226
+ "cpsl-select-item": CpslSelectItem;
1680
2227
  "cpsl-slide-button": CpslSlideButton;
1681
2228
  "cpsl-spinner": CpslSpinner;
1682
2229
  "cpsl-switch": CpslSwitch;
@@ -1704,19 +2251,24 @@ declare module "@stencil/core" {
1704
2251
  "cpsl-divider": LocalJSX.CpslDivider & JSXBase.HTMLAttributes<HTMLCpslDividerElement>;
1705
2252
  "cpsl-drawer": LocalJSX.CpslDrawer & JSXBase.HTMLAttributes<HTMLCpslDrawerElement>;
1706
2253
  "cpsl-dropdown": LocalJSX.CpslDropdown & JSXBase.HTMLAttributes<HTMLCpslDropdownElement>;
2254
+ "cpsl-file-upload": LocalJSX.CpslFileUpload & JSXBase.HTMLAttributes<HTMLCpslFileUploadElement>;
1707
2255
  "cpsl-grid": LocalJSX.CpslGrid & JSXBase.HTMLAttributes<HTMLCpslGridElement>;
1708
2256
  "cpsl-icon": LocalJSX.CpslIcon & JSXBase.HTMLAttributes<HTMLCpslIconElement>;
1709
2257
  "cpsl-info-box": LocalJSX.CpslInfoBox & JSXBase.HTMLAttributes<HTMLCpslInfoBoxElement>;
1710
2258
  "cpsl-input": LocalJSX.CpslInput & JSXBase.HTMLAttributes<HTMLCpslInputElement>;
1711
2259
  "cpsl-modal": LocalJSX.CpslModal & JSXBase.HTMLAttributes<HTMLCpslModalElement>;
2260
+ "cpsl-modal-v2": LocalJSX.CpslModalV2 & JSXBase.HTMLAttributes<HTMLCpslModalV2Element>;
1712
2261
  "cpsl-nav-button-group": LocalJSX.CpslNavButtonGroup & JSXBase.HTMLAttributes<HTMLCpslNavButtonGroupElement>;
1713
2262
  "cpsl-overlay": LocalJSX.CpslOverlay & JSXBase.HTMLAttributes<HTMLCpslOverlayElement>;
1714
2263
  "cpsl-pagination": LocalJSX.CpslPagination & JSXBase.HTMLAttributes<HTMLCpslPaginationElement>;
1715
2264
  "cpsl-pill": LocalJSX.CpslPill & JSXBase.HTMLAttributes<HTMLCpslPillElement>;
2265
+ "cpsl-popover": LocalJSX.CpslPopover & JSXBase.HTMLAttributes<HTMLCpslPopoverElement>;
1716
2266
  "cpsl-progress-indicator": LocalJSX.CpslProgressIndicator & JSXBase.HTMLAttributes<HTMLCpslProgressIndicatorElement>;
1717
2267
  "cpsl-qr-code": LocalJSX.CpslQrCode & JSXBase.HTMLAttributes<HTMLCpslQrCodeElement>;
1718
2268
  "cpsl-radio": LocalJSX.CpslRadio & JSXBase.HTMLAttributes<HTMLCpslRadioElement>;
1719
2269
  "cpsl-row": LocalJSX.CpslRow & JSXBase.HTMLAttributes<HTMLCpslRowElement>;
2270
+ "cpsl-select": LocalJSX.CpslSelect & JSXBase.HTMLAttributes<HTMLCpslSelectElement>;
2271
+ "cpsl-select-item": LocalJSX.CpslSelectItem & JSXBase.HTMLAttributes<HTMLCpslSelectItemElement>;
1720
2272
  "cpsl-slide-button": LocalJSX.CpslSlideButton & JSXBase.HTMLAttributes<HTMLCpslSlideButtonElement>;
1721
2273
  "cpsl-spinner": LocalJSX.CpslSpinner & JSXBase.HTMLAttributes<HTMLCpslSpinnerElement>;
1722
2274
  "cpsl-switch": LocalJSX.CpslSwitch & JSXBase.HTMLAttributes<HTMLCpslSwitchElement>;