@usecapsule/core-components 3.0.1 → 3.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (210) hide show
  1. package/css/capsule-core.css +93 -24
  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-02072c68.entry.js +2 -0
  8. package/dist/capsule/p-02072c68.entry.js.map +1 -0
  9. package/dist/capsule/p-1474c545.entry.js +29 -0
  10. package/dist/capsule/p-1474c545.entry.js.map +1 -0
  11. package/dist/capsule/p-2c16694d.entry.js +2 -0
  12. package/dist/capsule/p-41088cd4.entry.js +2 -0
  13. package/dist/capsule/{p-fcead80b.entry.js.map → p-41088cd4.entry.js.map} +1 -1
  14. package/dist/capsule/{p-fa078837.entry.js → p-6dcaee48.entry.js} +2 -2
  15. package/dist/capsule/p-7dde3172.js +3 -0
  16. package/dist/capsule/p-7dde3172.js.map +1 -0
  17. package/dist/capsule/{p-d28b96ba.entry.js → p-a6aaf3f4.entry.js} +2 -2
  18. package/dist/capsule/{p-0d0a0037.entry.js → p-b976b6f0.entry.js} +2 -2
  19. package/dist/capsule/p-f2393be6.js +2 -0
  20. package/dist/capsule/p-f2393be6.js.map +1 -0
  21. package/dist/cjs/capsule.cjs.js +2 -2
  22. package/dist/cjs/{constants-0869a780.js → constants-9b1b01bb.js} +3 -3
  23. package/dist/cjs/{constants-0869a780.js.map → constants-9b1b01bb.js.map} +1 -1
  24. package/dist/cjs/{cpsl-alert_29.cjs.entry.js → cpsl-alert_33.cjs.entry.js} +662 -87
  25. package/dist/cjs/cpsl-alert_33.cjs.entry.js.map +1 -0
  26. package/dist/cjs/cpsl-animation.cjs.entry.js +1 -1
  27. package/dist/cjs/cpsl-col.cjs.entry.js +1 -1
  28. package/dist/cjs/cpsl-grid.cjs.entry.js +3 -3
  29. package/dist/cjs/cpsl-info-box.cjs.entry.js +3 -3
  30. package/dist/cjs/cpsl-info-box.cjs.entry.js.map +1 -1
  31. package/dist/cjs/cpsl-modal-v2.cjs.entry.js +55 -0
  32. package/dist/cjs/cpsl-modal-v2.cjs.entry.js.map +1 -0
  33. package/dist/cjs/cpsl-row.cjs.entry.js +2 -2
  34. package/dist/cjs/{index-5733071e.js → index-528f7428.js} +86 -3
  35. package/dist/cjs/index-528f7428.js.map +1 -0
  36. package/dist/cjs/index.cjs.js +116 -107
  37. package/dist/cjs/index.cjs.js.map +1 -1
  38. package/dist/cjs/loader.cjs.js +2 -2
  39. package/dist/collection/assets/icons/chevron-up.svg +2 -2
  40. package/dist/collection/assets/icons/close.svg +3 -4
  41. package/dist/collection/assets/icons/cube.svg +3 -0
  42. package/dist/collection/assets/icons/farcaster-brand.svg +10 -0
  43. package/dist/collection/assets/icons/farcaster.svg +10 -0
  44. package/dist/collection/assets/icons/image.svg +3 -0
  45. package/dist/collection/assets/icons/index.js +9 -1
  46. package/dist/collection/assets/icons/index.js.map +1 -1
  47. package/dist/collection/assets/icons/menu.svg +3 -0
  48. package/dist/collection/assets/icons/refresh.svg +3 -0
  49. package/dist/collection/assets/icons/stars.svg +4 -0
  50. package/dist/collection/assets/icons/x.svg +3 -0
  51. package/dist/collection/collection-manifest.json +5 -0
  52. package/dist/collection/components/cpsl-alert/cpsl-alert.js +1 -1
  53. package/dist/collection/components/cpsl-app-bar/cpsl-app-bar.js +20 -4
  54. package/dist/collection/components/cpsl-app-bar/cpsl-app-bar.js.map +1 -1
  55. package/dist/collection/components/cpsl-button/cpsl-button.css +113 -17
  56. package/dist/collection/components/cpsl-button/cpsl-button.js +63 -7
  57. package/dist/collection/components/cpsl-button/cpsl-button.js.map +1 -1
  58. package/dist/collection/components/cpsl-button-group/cpsl-button-group.css +1 -0
  59. package/dist/collection/components/cpsl-card/cpsl-card.css +1 -1
  60. package/dist/collection/components/cpsl-card/cpsl-card.js +1 -1
  61. package/dist/collection/components/cpsl-card/cpsl-card.js.map +1 -1
  62. package/dist/collection/components/cpsl-checkbox/cpsl-checkbox.css +2 -2
  63. package/dist/collection/components/cpsl-code-input/cpsl-code-input.css +1 -1
  64. package/dist/collection/components/cpsl-divider/cpsl-divider.css +1 -1
  65. package/dist/collection/components/cpsl-drawer/cpsl-drawer.js +84 -11
  66. package/dist/collection/components/cpsl-drawer/cpsl-drawer.js.map +1 -1
  67. package/dist/collection/components/cpsl-dropdown/cpsl-dropdown.js +1 -1
  68. package/dist/collection/components/cpsl-dropdown/cpsl-dropdown.js.map +1 -1
  69. package/dist/collection/components/cpsl-file-upload/cpsl-file-upload.css +211 -0
  70. package/dist/collection/components/cpsl-file-upload/cpsl-file-upload.js +406 -0
  71. package/dist/collection/components/cpsl-file-upload/cpsl-file-upload.js.map +1 -0
  72. package/dist/collection/components/cpsl-file-upload/test/cpsl-file-upload.e2e.js +29 -0
  73. package/dist/collection/components/cpsl-file-upload/test/cpsl-file-upload.e2e.js.map +1 -0
  74. package/dist/collection/components/cpsl-file-upload/test/cpsl-file-upload.spec.js +37 -0
  75. package/dist/collection/components/cpsl-file-upload/test/cpsl-file-upload.spec.js.map +1 -0
  76. package/dist/collection/components/cpsl-grid/cpsl-grid.js +2 -2
  77. package/dist/collection/components/cpsl-icon/cpsl-icon.js +2 -2
  78. package/dist/collection/components/cpsl-info-box/cpsl-info-box.css +1 -1
  79. package/dist/collection/components/cpsl-info-box/cpsl-info-box.js +1 -1
  80. package/dist/collection/components/cpsl-input/cpsl-input.css +7 -6
  81. package/dist/collection/components/cpsl-input/cpsl-input.js +3 -8
  82. package/dist/collection/components/cpsl-input/cpsl-input.js.map +1 -1
  83. package/dist/collection/components/cpsl-modal/cpsl-modal.css +4 -4
  84. package/dist/collection/components/cpsl-modal/cpsl-modal.js +1 -0
  85. package/dist/collection/components/cpsl-modal/cpsl-modal.js.map +1 -1
  86. package/dist/collection/components/cpsl-modal-v2/cpsl-modal-v2.css +91 -0
  87. package/dist/collection/components/cpsl-modal-v2/cpsl-modal-v2.js +224 -0
  88. package/dist/collection/components/cpsl-modal-v2/cpsl-modal-v2.js.map +1 -0
  89. package/dist/collection/components/cpsl-modal-v2/test/cpsl-modal-v2.e2e.js +29 -0
  90. package/dist/collection/components/cpsl-modal-v2/test/cpsl-modal-v2.e2e.js.map +1 -0
  91. package/dist/collection/components/cpsl-modal-v2/test/cpsl-modal-v2.spec.js +37 -0
  92. package/dist/collection/components/cpsl-modal-v2/test/cpsl-modal-v2.spec.js.map +1 -0
  93. package/dist/collection/components/cpsl-nav-button-group/cpsl-nav-button-group.js +1 -1
  94. package/dist/collection/components/cpsl-overlay/cpsl-overlay.css +1 -1
  95. package/dist/collection/components/cpsl-overlay/cpsl-overlay.js +1 -1
  96. package/dist/collection/components/cpsl-pagination/cpsl-pagination.css +4 -0
  97. package/dist/collection/components/cpsl-pagination/cpsl-pagination.js +1 -1
  98. package/dist/collection/components/cpsl-pagination/cpsl-pagination.js.map +1 -1
  99. package/dist/collection/components/cpsl-pill/cpsl-pill.css +1 -1
  100. package/dist/collection/components/cpsl-pill/cpsl-pill.js +1 -1
  101. package/dist/collection/components/cpsl-popover/cpsl-popover.css +98 -0
  102. package/dist/collection/components/cpsl-popover/cpsl-popover.js +511 -0
  103. package/dist/collection/components/cpsl-popover/cpsl-popover.js.map +1 -0
  104. package/dist/collection/components/cpsl-popover/test/cpsl-popover.e2e.js +29 -0
  105. package/dist/collection/components/cpsl-popover/test/cpsl-popover.e2e.js.map +1 -0
  106. package/dist/collection/components/cpsl-popover/test/cpsl-popover.spec.js +37 -0
  107. package/dist/collection/components/cpsl-popover/test/cpsl-popover.spec.js.map +1 -0
  108. package/dist/collection/components/cpsl-progress-indicator/cpsl-progress-indicator.css +3 -3
  109. package/dist/collection/components/cpsl-qr-code/cpsl-qr-code.css +1 -1
  110. package/dist/collection/components/cpsl-qr-code/cpsl-qr-code.js +1 -1
  111. package/dist/collection/components/cpsl-radio/cpsl-radio.css +2 -2
  112. package/dist/collection/components/cpsl-radio/cpsl-radio.js +1 -1
  113. package/dist/collection/components/cpsl-row/cpsl-row.js +1 -1
  114. package/dist/collection/components/cpsl-select/cpsl-select.css +229 -0
  115. package/dist/collection/components/cpsl-select/cpsl-select.js +409 -0
  116. package/dist/collection/components/cpsl-select/cpsl-select.js.map +1 -0
  117. package/dist/collection/components/cpsl-select/test/cpsl-select.e2e.js +29 -0
  118. package/dist/collection/components/cpsl-select/test/cpsl-select.e2e.js.map +1 -0
  119. package/dist/collection/components/cpsl-select/test/cpsl-select.spec.js +37 -0
  120. package/dist/collection/components/cpsl-select/test/cpsl-select.spec.js.map +1 -0
  121. package/dist/collection/components/cpsl-select-item/cpsl-select-item.css +114 -0
  122. package/dist/collection/components/cpsl-select-item/cpsl-select-item.js +85 -0
  123. package/dist/collection/components/cpsl-select-item/cpsl-select-item.js.map +1 -0
  124. package/dist/collection/components/cpsl-select-item/test/cpsl-select-item.e2e.js +29 -0
  125. package/dist/collection/components/cpsl-select-item/test/cpsl-select-item.e2e.js.map +1 -0
  126. package/dist/collection/components/cpsl-select-item/test/cpsl-select-item.spec.js +37 -0
  127. package/dist/collection/components/cpsl-select-item/test/cpsl-select-item.spec.js.map +1 -0
  128. package/dist/collection/components/cpsl-slide-button/cpsl-slide-button.css +3 -3
  129. package/dist/collection/components/cpsl-slide-button/cpsl-slide-button.js +3 -3
  130. package/dist/collection/components/cpsl-spinner/cpsl-spinner.js +2 -2
  131. package/dist/collection/components/cpsl-switch/cpsl-switch.css +4 -4
  132. package/dist/collection/components/cpsl-switch/cpsl-switch.js +1 -1
  133. package/dist/collection/components/cpsl-tab/cpsl-tab.js +1 -1
  134. package/dist/collection/components/cpsl-table/cpsl-table.css +40 -60
  135. package/dist/collection/components/cpsl-table/cpsl-table.js +40 -58
  136. package/dist/collection/components/cpsl-table/cpsl-table.js.map +1 -1
  137. package/dist/collection/components/cpsl-tabs/cpsl-tabs.css +2 -2
  138. package/dist/collection/components/cpsl-tabs/cpsl-tabs.js +1 -1
  139. package/dist/collection/components/cpsl-text/cpsl-text.css +4 -0
  140. package/dist/collection/components/cpsl-text/cpsl-text.js +5 -4
  141. package/dist/collection/components/cpsl-text/cpsl-text.js.map +1 -1
  142. package/dist/collection/components/cpsl-tile-button/cpsl-tile-button.css +1 -1
  143. package/dist/collection/components/cpsl-tile-button/cpsl-tile-button.js +2 -2
  144. package/dist/collection/constants.js +2 -2
  145. package/dist/collection/constants.js.map +1 -1
  146. package/dist/collection/interface.js.map +1 -1
  147. package/dist/collection/utils/theme/generateBorderRadii.js +40 -39
  148. package/dist/collection/utils/theme/generateBorderRadii.js.map +1 -1
  149. package/dist/collection/utils/theme/generatePalette.js +11 -3
  150. package/dist/collection/utils/theme/generatePalette.js.map +1 -1
  151. package/dist/collection/utils/theme/generateTheme.js +2 -2
  152. package/dist/collection/utils/theme/generateTheme.js.map +1 -1
  153. package/dist/collection/utils/theme/utils.js +1 -0
  154. package/dist/collection/utils/theme/utils.js.map +1 -1
  155. package/dist/esm/capsule.js +3 -3
  156. package/dist/esm/{constants-6acf4ea8.js → constants-fce138fa.js} +3 -3
  157. package/dist/esm/{constants-6acf4ea8.js.map → constants-fce138fa.js.map} +1 -1
  158. package/dist/esm/{cpsl-alert_29.entry.js → cpsl-alert_33.entry.js} +659 -88
  159. package/dist/esm/cpsl-alert_33.entry.js.map +1 -0
  160. package/dist/esm/cpsl-animation.entry.js +1 -1
  161. package/dist/esm/cpsl-col.entry.js +1 -1
  162. package/dist/esm/cpsl-grid.entry.js +3 -3
  163. package/dist/esm/cpsl-info-box.entry.js +3 -3
  164. package/dist/esm/cpsl-info-box.entry.js.map +1 -1
  165. package/dist/esm/cpsl-modal-v2.entry.js +51 -0
  166. package/dist/esm/cpsl-modal-v2.entry.js.map +1 -0
  167. package/dist/esm/cpsl-row.entry.js +2 -2
  168. package/dist/esm/{index-8fe9f35e.js → index-b188f201.js} +86 -4
  169. package/dist/esm/index-b188f201.js.map +1 -0
  170. package/dist/esm/index.js +116 -107
  171. package/dist/esm/index.js.map +1 -1
  172. package/dist/esm/loader.js +3 -3
  173. package/dist/types/assets/icons/index.d.ts +8 -0
  174. package/dist/types/components/cpsl-app-bar/cpsl-app-bar.d.ts +1 -0
  175. package/dist/types/components/cpsl-button/cpsl-button.d.ts +4 -1
  176. package/dist/types/components/cpsl-drawer/cpsl-drawer.d.ts +10 -1
  177. package/dist/types/components/cpsl-file-upload/cpsl-file-upload.d.ts +34 -0
  178. package/dist/types/components/cpsl-input/cpsl-input.d.ts +1 -1
  179. package/dist/types/components/cpsl-modal-v2/cpsl-modal-v2.d.ts +17 -0
  180. package/dist/types/components/cpsl-popover/cpsl-popover.d.ts +35 -0
  181. package/dist/types/components/cpsl-select/cpsl-select.d.ts +38 -0
  182. package/dist/types/components/cpsl-select-item/cpsl-select-item.d.ts +8 -0
  183. package/dist/types/components/cpsl-table/cpsl-table.d.ts +8 -3
  184. package/dist/types/components/cpsl-text/cpsl-text.d.ts +1 -1
  185. package/dist/types/components.d.ts +596 -28
  186. package/dist/types/constants.d.ts +2 -2
  187. package/dist/types/interface.d.ts +68 -1
  188. package/dist/types/utils/theme/generateBorderRadii.d.ts +1 -1
  189. package/dist/types/utils/theme/generateTheme.d.ts +1 -1
  190. package/dist/types/utils/theme/utils.d.ts +4 -1
  191. package/package.json +2 -2
  192. package/dist/capsule/p-107e1ff5.entry.js +0 -29
  193. package/dist/capsule/p-107e1ff5.entry.js.map +0 -1
  194. package/dist/capsule/p-86e48e61.js +0 -3
  195. package/dist/capsule/p-86e48e61.js.map +0 -1
  196. package/dist/capsule/p-ad14a817.entry.js +0 -2
  197. package/dist/capsule/p-b6b38e73.js +0 -2
  198. package/dist/capsule/p-b6b38e73.js.map +0 -1
  199. package/dist/capsule/p-fcead80b.entry.js +0 -2
  200. package/dist/cjs/cpsl-alert_29.cjs.entry.js.map +0 -1
  201. package/dist/cjs/index-5733071e.js.map +0 -1
  202. package/dist/collection/components/cpsl-table/table-interface.js +0 -2
  203. package/dist/collection/components/cpsl-table/table-interface.js.map +0 -1
  204. package/dist/esm/cpsl-alert_29.entry.js.map +0 -1
  205. package/dist/esm/index-8fe9f35e.js.map +0 -1
  206. package/dist/types/components/cpsl-table/table-interface.d.ts +0 -19
  207. /package/dist/capsule/{p-ad14a817.entry.js.map → p-2c16694d.entry.js.map} +0 -0
  208. /package/dist/capsule/{p-fa078837.entry.js.map → p-6dcaee48.entry.js.map} +0 -0
  209. /package/dist/capsule/{p-d28b96ba.entry.js.map → p-a6aaf3f4.entry.js.map} +0 -0
  210. /package/dist/capsule/{p-0d0a0037.entry.js.map → p-b976b6f0.entry.js.map} +0 -0
@@ -0,0 +1,224 @@
1
+ import { Host, h } from "@stencil/core";
2
+ export class CpslModalV2 {
3
+ constructor() {
4
+ this.enterTransitionDuration = 0.15;
5
+ this.exitTransitionDuration = 0.15;
6
+ this.elevated = undefined;
7
+ this.noOverlay = undefined;
8
+ this.open = undefined;
9
+ this.zIndexOverride = undefined;
10
+ }
11
+ toggleHeight() {
12
+ if (!this.open) {
13
+ this.cpslModalExiting.emit();
14
+ setTimeout(() => {
15
+ this.el.style.display = 'none';
16
+ this.cpslModalExited.emit();
17
+ }, this.exitTransitionDuration * 1000);
18
+ }
19
+ else {
20
+ this.cpslModalEntering.emit();
21
+ this.el.style.display = 'flex';
22
+ setTimeout(() => {
23
+ this.cpslModalEntered.emit();
24
+ }, this.enterTransitionDuration * 1000);
25
+ }
26
+ }
27
+ componentDidLoad() {
28
+ this.toggleHeight();
29
+ }
30
+ render() {
31
+ return (h(Host, { key: 'ecdfd932091801f470beb579793ba8faaddd1858', class: { 'open': this.open, 'elevated': this.elevated, 'no-overlay': this.noOverlay } }, !this.noOverlay && (h("cpsl-overlay", { zIndexOverride: Boolean(this.zIndexOverride) ? this.zIndexOverride : undefined, id: "overlay", open: this.open, enterTransitionDuration: this.enterTransitionDuration, exitTransitionDuration: this.exitTransitionDuration })), h("cpsl-card", { key: '9c0d1dc565ed8d178f56e02d3e53cc6f979d66b5', class: "card", style: { transitionDuration: this.open ? `${this.exitTransitionDuration}s` : `${this.enterTransitionDuration}s` } }, h("slot", { key: 'be77c75323488daed7b254daeca431835f96f081' }))));
32
+ }
33
+ static get is() { return "cpsl-modal-v2"; }
34
+ static get encapsulation() { return "shadow"; }
35
+ static get originalStyleUrls() {
36
+ return {
37
+ "$": ["cpsl-modal-v2.scss"]
38
+ };
39
+ }
40
+ static get styleUrls() {
41
+ return {
42
+ "$": ["cpsl-modal-v2.css"]
43
+ };
44
+ }
45
+ static get properties() {
46
+ return {
47
+ "enterTransitionDuration": {
48
+ "type": "number",
49
+ "mutable": false,
50
+ "complexType": {
51
+ "original": "number",
52
+ "resolved": "number",
53
+ "references": {}
54
+ },
55
+ "required": false,
56
+ "optional": true,
57
+ "docs": {
58
+ "tags": [],
59
+ "text": "Duration in seconds of the modal entering.\nDefault is .15."
60
+ },
61
+ "attribute": "enter-transition-duration",
62
+ "reflect": false,
63
+ "defaultValue": "0.15"
64
+ },
65
+ "exitTransitionDuration": {
66
+ "type": "number",
67
+ "mutable": false,
68
+ "complexType": {
69
+ "original": "number",
70
+ "resolved": "number",
71
+ "references": {}
72
+ },
73
+ "required": false,
74
+ "optional": true,
75
+ "docs": {
76
+ "tags": [],
77
+ "text": "Duration in seconds of the modal exiting.\nDefault is .15."
78
+ },
79
+ "attribute": "exit-transition-duration",
80
+ "reflect": false,
81
+ "defaultValue": "0.15"
82
+ },
83
+ "elevated": {
84
+ "type": "boolean",
85
+ "mutable": false,
86
+ "complexType": {
87
+ "original": "boolean",
88
+ "resolved": "boolean",
89
+ "references": {}
90
+ },
91
+ "required": false,
92
+ "optional": false,
93
+ "docs": {
94
+ "tags": [],
95
+ "text": "Whether or not to show the modal with a box shadow."
96
+ },
97
+ "attribute": "elevated",
98
+ "reflect": false
99
+ },
100
+ "noOverlay": {
101
+ "type": "boolean",
102
+ "mutable": false,
103
+ "complexType": {
104
+ "original": "boolean",
105
+ "resolved": "boolean",
106
+ "references": {}
107
+ },
108
+ "required": false,
109
+ "optional": false,
110
+ "docs": {
111
+ "tags": [],
112
+ "text": "Whether or not to show the overlay."
113
+ },
114
+ "attribute": "no-overlay",
115
+ "reflect": false
116
+ },
117
+ "open": {
118
+ "type": "boolean",
119
+ "mutable": false,
120
+ "complexType": {
121
+ "original": "boolean",
122
+ "resolved": "boolean",
123
+ "references": {}
124
+ },
125
+ "required": false,
126
+ "optional": false,
127
+ "docs": {
128
+ "tags": [],
129
+ "text": "Whether or not to show the modal."
130
+ },
131
+ "attribute": "open",
132
+ "reflect": false
133
+ },
134
+ "zIndexOverride": {
135
+ "type": "number",
136
+ "mutable": false,
137
+ "complexType": {
138
+ "original": "number",
139
+ "resolved": "number",
140
+ "references": {}
141
+ },
142
+ "required": false,
143
+ "optional": true,
144
+ "docs": {
145
+ "tags": [],
146
+ "text": "Override z-index."
147
+ },
148
+ "attribute": "z-index-override",
149
+ "reflect": false
150
+ }
151
+ };
152
+ }
153
+ static get events() {
154
+ return [{
155
+ "method": "cpslModalEntering",
156
+ "name": "cpslModalEntering",
157
+ "bubbles": true,
158
+ "cancelable": true,
159
+ "composed": true,
160
+ "docs": {
161
+ "tags": [],
162
+ "text": "Emitted when enter animation starts."
163
+ },
164
+ "complexType": {
165
+ "original": "null",
166
+ "resolved": "null",
167
+ "references": {}
168
+ }
169
+ }, {
170
+ "method": "cpslModalEntered",
171
+ "name": "cpslModalEntered",
172
+ "bubbles": true,
173
+ "cancelable": true,
174
+ "composed": true,
175
+ "docs": {
176
+ "tags": [],
177
+ "text": "Emitted when enter animation finishes."
178
+ },
179
+ "complexType": {
180
+ "original": "null",
181
+ "resolved": "null",
182
+ "references": {}
183
+ }
184
+ }, {
185
+ "method": "cpslModalExiting",
186
+ "name": "cpslModalExiting",
187
+ "bubbles": true,
188
+ "cancelable": true,
189
+ "composed": true,
190
+ "docs": {
191
+ "tags": [],
192
+ "text": "Emitted when exit animation starts."
193
+ },
194
+ "complexType": {
195
+ "original": "null",
196
+ "resolved": "null",
197
+ "references": {}
198
+ }
199
+ }, {
200
+ "method": "cpslModalExited",
201
+ "name": "cpslModalExited",
202
+ "bubbles": true,
203
+ "cancelable": true,
204
+ "composed": true,
205
+ "docs": {
206
+ "tags": [],
207
+ "text": "Emitted when exit animation finishes."
208
+ },
209
+ "complexType": {
210
+ "original": "null",
211
+ "resolved": "null",
212
+ "references": {}
213
+ }
214
+ }];
215
+ }
216
+ static get elementRef() { return "el"; }
217
+ static get watchers() {
218
+ return [{
219
+ "propName": "open",
220
+ "methodName": "toggleHeight"
221
+ }];
222
+ }
223
+ }
224
+ //# sourceMappingURL=cpsl-modal-v2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cpsl-modal-v2.js","sourceRoot":"","sources":["../../../../src/components/cpsl-modal-v2/cpsl-modal-v2.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,EAAgB,MAAM,eAAe,CAAC;AAO9F,MAAM,OAAO,WAAW;;uCAOqB,IAAI;sCAML,IAAI;;;;;;IA2C9C,YAAY;QACV,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;YACf,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,CAAC;YAE7B,UAAU,CAAC,GAAG,EAAE;gBACd,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC;gBAC/B,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC;YAC9B,CAAC,EAAE,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC,CAAC;QACzC,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAC;YAC9B,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC;YAC/B,UAAU,CAAC,GAAG,EAAE;gBACd,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,CAAC;YAC/B,CAAC,EAAE,IAAI,CAAC,uBAAuB,GAAG,IAAI,CAAC,CAAC;QAC1C,CAAC;IACH,CAAC;IAED,gBAAgB;QACd,IAAI,CAAC,YAAY,EAAE,CAAC;IACtB,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDAAC,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,CAAC,QAAQ,EAAE,YAAY,EAAE,IAAI,CAAC,SAAS,EAAE;YACxF,CAAC,IAAI,CAAC,SAAS,IAAI,CAClB,oBACE,cAAc,EAAE,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS,EAC9E,EAAE,EAAC,SAAS,EACZ,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,uBAAuB,EAAE,IAAI,CAAC,uBAAuB,EACrD,sBAAsB,EAAE,IAAI,CAAC,sBAAsB,GACnD,CACH;YACD,kEAAW,KAAK,EAAC,MAAM,EAAC,KAAK,EAAE,EAAE,kBAAkB,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,sBAAsB,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,uBAAuB,GAAG,EAAE;gBACvI,8DAAa,CACH,CACP,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, Watch, Element, Event, h, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'cpsl-modal-v2',\n styleUrl: 'cpsl-modal-v2.scss',\n shadow: true,\n})\nexport class CpslModalV2 {\n @Element() el!: HTMLCpslModalV2Element;\n\n /**\n * Duration in seconds of the modal entering.\n * Default is .15.\n */\n @Prop() enterTransitionDuration?: number = 0.15;\n\n /**\n * Duration in seconds of the modal exiting.\n * Default is .15.\n */\n @Prop() exitTransitionDuration?: number = 0.15;\n\n /**\n * Whether or not to show the modal with a box shadow.\n */\n @Prop() elevated: boolean;\n\n /**\n * Whether or not to show the overlay.\n */\n @Prop() noOverlay: boolean;\n\n /**\n * Whether or not to show the modal.\n */\n @Prop() open: boolean;\n\n /**\n * Override z-index.\n */\n @Prop() zIndexOverride?: number;\n\n /**\n * Emitted when enter animation starts.\n */\n @Event() cpslModalEntering!: EventEmitter<null>;\n\n /**\n * Emitted when enter animation finishes.\n */\n @Event() cpslModalEntered!: EventEmitter<null>;\n\n /**\n * Emitted when exit animation starts.\n */\n @Event() cpslModalExiting!: EventEmitter<null>;\n\n /**\n * Emitted when exit animation finishes.\n */\n @Event() cpslModalExited!: EventEmitter<null>;\n\n @Watch('open')\n toggleHeight() {\n if (!this.open) {\n this.cpslModalExiting.emit();\n // Animate out before setting display to none\n setTimeout(() => {\n this.el.style.display = 'none';\n this.cpslModalExited.emit();\n }, this.exitTransitionDuration * 1000);\n } else {\n this.cpslModalEntering.emit();\n this.el.style.display = 'flex';\n setTimeout(() => {\n this.cpslModalEntered.emit();\n }, this.enterTransitionDuration * 1000);\n }\n }\n\n componentDidLoad() {\n this.toggleHeight();\n }\n\n render() {\n return (\n <Host class={{ 'open': this.open, 'elevated': this.elevated, 'no-overlay': this.noOverlay }}>\n {!this.noOverlay && (\n <cpsl-overlay\n zIndexOverride={Boolean(this.zIndexOverride) ? this.zIndexOverride : undefined}\n id=\"overlay\"\n open={this.open}\n enterTransitionDuration={this.enterTransitionDuration}\n exitTransitionDuration={this.exitTransitionDuration}\n />\n )}\n <cpsl-card class=\"card\" style={{ transitionDuration: this.open ? `${this.exitTransitionDuration}s` : `${this.enterTransitionDuration}s` }}>\n <slot></slot>\n </cpsl-card>\n </Host>\n );\n }\n}\n"]}
@@ -0,0 +1,29 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try {
5
+ step(generator.next(value));
6
+ }
7
+ catch (e) {
8
+ reject(e);
9
+ } }
10
+ function rejected(value) { try {
11
+ step(generator["throw"](value));
12
+ }
13
+ catch (e) {
14
+ reject(e);
15
+ } }
16
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
17
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
18
+ });
19
+ };
20
+ import { newE2EPage } from "@stencil/core/testing";
21
+ describe('cpsl-modal-v2', () => {
22
+ it('renders', () => __awaiter(void 0, void 0, void 0, function* () {
23
+ const page = yield newE2EPage();
24
+ yield page.setContent('<cpsl-modal-v2></cpsl-modal-v2>');
25
+ const element = yield page.find('cpsl-modal-v2');
26
+ expect(element).toHaveClass('hydrated');
27
+ }));
28
+ });
29
+ //# sourceMappingURL=cpsl-modal-v2.e2e.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cpsl-modal-v2.e2e.js","sourceRoot":"","sources":["../../../../../src/components/cpsl-modal-v2/test/cpsl-modal-v2.e2e.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;IAC7B,EAAE,CAAC,SAAS,EAAE,GAAS,EAAE;QACvB,MAAM,IAAI,GAAG,MAAM,UAAU,EAAE,CAAC;QAChC,MAAM,IAAI,CAAC,UAAU,CAAC,iCAAiC,CAAC,CAAC;QAEzD,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QACjD,MAAM,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAC1C,CAAC,CAAA,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newE2EPage } from '@stencil/core/testing';\n\ndescribe('cpsl-modal-v2', () => {\n it('renders', async () => {\n const page = await newE2EPage();\n await page.setContent('<cpsl-modal-v2></cpsl-modal-v2>');\n\n const element = await page.find('cpsl-modal-v2');\n expect(element).toHaveClass('hydrated');\n });\n});\n"]}
@@ -0,0 +1,37 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try {
5
+ step(generator.next(value));
6
+ }
7
+ catch (e) {
8
+ reject(e);
9
+ } }
10
+ function rejected(value) { try {
11
+ step(generator["throw"](value));
12
+ }
13
+ catch (e) {
14
+ reject(e);
15
+ } }
16
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
17
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
18
+ });
19
+ };
20
+ import { newSpecPage } from "@stencil/core/testing";
21
+ import { CpslModalV2 } from "../cpsl-modal-v2";
22
+ describe('cpsl-modal-v2', () => {
23
+ it('renders', () => __awaiter(void 0, void 0, void 0, function* () {
24
+ const page = yield newSpecPage({
25
+ components: [CpslModalV2],
26
+ html: `<cpsl-modal-v2></cpsl-modal-v2>`,
27
+ });
28
+ expect(page.root).toEqualHtml(`
29
+ <cpsl-modal-v2>
30
+ <mock:shadow-root>
31
+ <slot></slot>
32
+ </mock:shadow-root>
33
+ </cpsl-modal-v2>
34
+ `);
35
+ }));
36
+ });
37
+ //# sourceMappingURL=cpsl-modal-v2.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cpsl-modal-v2.spec.js","sourceRoot":"","sources":["../../../../../src/components/cpsl-modal-v2/test/cpsl-modal-v2.spec.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;IAC7B,EAAE,CAAC,SAAS,EAAE,GAAS,EAAE;QACvB,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,WAAW,CAAC;YACzB,IAAI,EAAE,iCAAiC;SACxC,CAAC,CAAC;QACH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;KAM7B,CAAC,CAAC;IACL,CAAC,CAAA,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newSpecPage } from '@stencil/core/testing';\nimport { CpslModalV2 } from '../cpsl-modal-v2';\n\ndescribe('cpsl-modal-v2', () => {\n it('renders', async () => {\n const page = await newSpecPage({\n components: [CpslModalV2],\n html: `<cpsl-modal-v2></cpsl-modal-v2>`,\n });\n expect(page.root).toEqualHtml(`\n <cpsl-modal-v2>\n <mock:shadow-root>\n <slot></slot>\n </mock:shadow-root>\n </cpsl-modal-v2>\n `);\n });\n});\n"]}
@@ -32,7 +32,7 @@ export class CpslNavButtonGroup {
32
32
  return this.el.querySelectorAll('&> *:not(cpsl-button)');
33
33
  }
34
34
  render() {
35
- return (h(Host, { key: '4de8526be6448d13688e491a0d460557939fe83b' }, h("slot", { key: '633ee1b8e1e637171e8fd55b0375df99bb9d4607' })));
35
+ return (h(Host, { key: 'e5cf1902a3d5f8b6df197441e144987dcb016762' }, h("slot", { key: '56322f15e640f356fae1c9eb16f525753d91fdae' })));
36
36
  }
37
37
  static get is() { return "cpsl-nav-button-group"; }
38
38
  static get encapsulation() { return "shadow"; }
@@ -61,7 +61,7 @@
61
61
  z-index: 10001;
62
62
  opacity: 0%;
63
63
  display: none;
64
- background-color: var(--cpsl-color-alpha-black-50);
64
+ background: linear-gradient(180deg, rgba(0, 0, 0, 0.14) 0%, rgba(0, 0, 0, 0.7) 100%);
65
65
  }
66
66
 
67
67
  :host(.over-modal) {
@@ -27,7 +27,7 @@ export class CpslOverlay {
27
27
  }
28
28
  }
29
29
  render() {
30
- return (h(Host, { key: '7e2c644351871bd6d49b477302635ee51b57848b', style: Boolean(this.zIndexOverride) ? { zIndex: `${this.zIndexOverride}` } : {} }, h("slot", { key: 'd21ebec32fbc75066a5fd3c4107ff48fd6a9ee91' })));
30
+ return (h(Host, { key: 'daa05884bc8489f8227873b6778e129bdf922ffd', style: Boolean(this.zIndexOverride) ? { zIndex: `${this.zIndexOverride}` } : {} }, h("slot", { key: 'd0783d37893a51fe16fe292c5847dc4acee627ee' })));
31
31
  }
32
32
  static get is() { return "cpsl-overlay"; }
33
33
  static get encapsulation() { return "shadow"; }
@@ -64,4 +64,8 @@
64
64
 
65
65
  .start-icon {
66
66
  transform: rotate(180deg);
67
+ }
68
+
69
+ .arrow-button {
70
+ --button-secondary-icon-color: var(--cpsl-color-text-tertiary);
67
71
  }
@@ -71,7 +71,7 @@ export class CpslPagination {
71
71
  filteredPages.push(this.totalPages - 1);
72
72
  }
73
73
  }
74
- return (h(Host, { key: 'ac3681eabdc35a5c620713a722619b7e5f52e2e3' }, h("cpsl-button-group", { key: '05f7fcfb5ca4edf4de561357ec16fe2fd5bdf9d8', selectedId: `${this.currentPage}` }, h("cpsl-button", { key: '613f70869b90aad3c5973b7c55270e3088335ff9', onClick: this.handlePrevClick }, h("cpsl-icon", { key: '458e036ab72bd2a8fc57bb8bcc0be614ad07aa72', class: { 'icon': true, 'start-icon': true }, icon: "arrowNarrow" })), filteredPages.map(page => (h("cpsl-button", { key: page, variant: "secondary", fullWidth: true, id: `${page}`, onClick: this.handlePageClick(page) }, h("cpsl-text", { variant: "bodyS" }, page + 1)))), h("cpsl-button", { key: '2dc257023f6d4270a79bf88399e3b27ad538b928', onClick: this.handleNextClick }, h("cpsl-icon", { key: '716ad78992c6e56c3855d8dc544fc19fefa01804', class: "icon", icon: "arrowNarrow" })))));
74
+ return (h(Host, { key: '42ae13b8cdb18ea35db7abc8195d49e36ee4494e' }, h("cpsl-button-group", { key: 'a031f2cda1cbd10724ef65cd2fd74b5b237b9841', selectedId: `${this.currentPage}` }, h("cpsl-button", { key: '83d653a99ce0eea881eb6332c9d7088b328c20dd', class: "arrow-button", onClick: this.handlePrevClick }, h("cpsl-icon", { key: '2e6650d7c873a9e2de4922c08c5b5b2fe27f2b33', class: { 'icon': true, 'start-icon': true }, icon: "arrowNarrow" })), filteredPages.map(page => (h("cpsl-button", { key: page, variant: "secondary", fullWidth: true, id: `${page}`, onClick: this.handlePageClick(page) }, h("cpsl-text", { variant: "bodyS" }, page + 1)))), h("cpsl-button", { key: '4cd4c8623368c96f3457d818a0542fd7ab560182', class: "arrow-button", onClick: this.handleNextClick }, h("cpsl-icon", { key: '52865869846d7afbe7a66f44f9564913caf97380', class: "icon", icon: "arrowNarrow" })))));
75
75
  }
76
76
  static get is() { return "cpsl-pagination"; }
77
77
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"cpsl-pagination.js","sourceRoot":"","sources":["../../../../src/components/cpsl-pagination/cpsl-pagination.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAgB,KAAK,EAAE,MAAM,eAAe,CAAC;AAO5F,MAAM,OAAO,cAAc;;QAwCjB,oBAAe,GAAG,GAAG,EAAE;YAC7B,IAAI,IAAI,CAAC,WAAW,GAAG,CAAC,EAAE,CAAC;gBACzB,IAAI,CAAC,WAAW,EAAE,CAAC;YACrB,CAAC;QACH,CAAC,CAAC;QAEM,oBAAe,GAAG,GAAG,EAAE;YAC7B,IAAI,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,UAAU,GAAG,CAAC,EAAE,CAAC;gBAC3C,IAAI,CAAC,WAAW,EAAE,CAAC;YACrB,CAAC;QACH,CAAC,CAAC;QAEM,oBAAe,GAAG,C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AAC,UAAU,GAAG,CAAC,CAAC,CAAC;YAC1C,CAAC;QACH,CAAC;QAED,OAAO,CACL,EAAC,IAAI;YACH,0EAAmB,UAAU,EAAE,GAAG,IAAI,CAAC,WAAW,EAAE;gBAClD,oEAAa,OAAO,EAAE,IAAI,CAAC,eAAe;oBACxC,kEAAW,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,EAAE,IAAI,EAAC,aAAa,GAAG,CACjE;gBACb,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CACzB,mBAAa,GAAG,EAAE,IAAI,EAAE,OAAO,EAAC,WAAW,EAAC,SAAS,QAAC,EAAE,EAAE,GAAG,IAAI,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC;oBACtG,iBAAW,OAAO,EAAC,OAAO,IAAE,IAAI,GAAG,CAAC,CAAa,CACrC,CACf,CAAC;gBACF,oEAAa,OAAO,EAAE,IAAI,CAAC,eAAe;oBACxC,kEAAW,KAAK,EAAC,MAAM,EAAC,IAAI,EAAC,aAAa,GAAG,CACjC,CACI,CACf,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, State, Event, h, EventEmitter, Watch } from '@stencil/core';\n\n@Component({\n tag: 'cpsl-pagination',\n styleUrl: 'cpsl-pagination.scss',\n shadow: true,\n})\nexport class CpslPagination {\n @State() currentPage = 0;\n\n /**\n * The initial page to select.\n * Default is 0.\n */\n @Prop() initialPage?: number;\n\n /**\n * The total number of pages.\n */\n @Prop() totalPages: number;\n\n /**\n * The number of pages visible to select.\n * Default is 5.\n * Min is 5.\n */\n\n // eslint-disable-next-line @stencil-community/strict-mutable\n @Prop({ mutable: true }) visiblePages?: number = 5;\n\n /**\n * Emitted when exit animation finishes.\n */\n @Event() cpslPaginationChanged!: EventEmitter<number>;\n\n @Watch('currentPage')\n watchChange() {\n this.cpslPaginationChanged.emit(this.currentPage);\n }\n\n componentWillLoad() {\n this.currentPage = this.initialPage ?? 0;\n if (this.visiblePages < 5) {\n this.visiblePages = 5;\n }\n }\n\n private handlePrevClick = () => {\n if (this.currentPage > 0) {\n this.currentPage--;\n }\n };\n\n private handleNextClick = () => {\n if (this.currentPage < this.totalPages - 1) {\n this.currentPage++;\n }\n };\n\n private handlePageClick = (value: number) => () => {\n if (value >= 0 && value <= this.totalPages - 1) {\n this.currentPage = value;\n }\n };\n\n render() {\n const filteredPages: number[] = this.totalPages <= this.visiblePages ? [...Array(this.totalPages).keys()] : [];\n\n if (this.totalPages > this.visiblePages) {\n filteredPages.push(0);\n\n const isFirstSelected = this.currentPage === 0;\n const isLastSelected = this.currentPage === this.totalPages - 1;\n const isFirstOrLastSelected = isFirstSelected || isLastSelected;\n\n let remainingVisible = this.visiblePages - (isFirstOrLastSelected ? 2 : 3);\n const halfRemaining = Math.round(remainingVisible / 2);\n const numberBefore = Math.max(this.currentPage - 1, 0);\n const numberAfter = Math.max(this.totalPages - 2 - this.currentPage, 0);\n let beforeHalf = halfRemaining;\n let afterHalf = remainingVisible - halfRemaining;\n\n if (numberBefore >= beforeHalf) {\n if (numberAfter < afterHalf) {\n beforeHalf += afterHalf - numberAfter;\n afterHalf = numberAfter;\n }\n } else {\n afterHalf += beforeHalf - numberBefore;\n beforeHalf = numberBefore;\n }\n\n while (beforeHalf > 0) {\n filteredPages.push(this.currentPage - beforeHalf);\n beforeHalf--;\n }\n\n if (!isFirstSelected) {\n filteredPages.push(this.currentPage);\n }\n\n const pagesAfter: number[] = [];\n while (afterHalf > 0) {\n pagesAfter.push(this.currentPage + afterHalf);\n afterHalf--;\n }\n\n filteredPages.push(...pagesAfter.reverse());\n\n if (!isLastSelected) {\n filteredPages.push(this.totalPages - 1);\n }\n }\n\n return (\n <Host>\n <cpsl-button-group selectedId={`${this.currentPage}`}>\n <cpsl-button onClick={this.handlePrevClick}>\n <cpsl-icon class={{ 'icon': true, 'start-icon': true }} icon=\"arrowNarrow\" />\n </cpsl-button>\n {filteredPages.map(page => (\n <cpsl-button key={page} variant=\"secondary\" fullWidth id={`${page}`} onClick={this.handlePageClick(page)}>\n <cpsl-text variant=\"bodyS\">{page + 1}</cpsl-text>\n </cpsl-button>\n ))}\n <cpsl-button onClick={this.handleNextClick}>\n <cpsl-icon class=\"icon\" icon=\"arrowNarrow\" />\n </cpsl-button>\n </cpsl-button-group>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"cpsl-pagination.js","sourceRoot":"","sources":["../../../../src/components/cpsl-pagination/cpsl-pagination.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAgB,KAAK,EAAE,MAAM,eAAe,CAAC;AAO5F,MAAM,OAAO,cAAc;;QAwCjB,oBAAe,GAAG,GAAG,EAAE;YAC7B,IAAI,IAAI,CAAC,WAAW,GAAG,CAAC,EAAE,CAAC;gBACzB,IAAI,CAAC,WAAW,EAAE,CAAC;YACrB,CAAC;QACH,CAAC,CAAC;QAEM,oBAAe,GAAG,GAAG,EAAE;YAC7B,IAAI,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,UAAU,GAAG,CAAC,EAAE,CAAC;gBAC3C,IAAI,CAAC,WAAW,EAAE,CAAC;YACrB,CAAC;QACH,CAAC,CAAC;QAEM,oBAAe,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,GAAG,EAAE;YAChD,IAAI,KAAK,IAAI,CAAC,IAAI,KAAK,IAAI,IAAI,CAAC,UAAU,GAAG,CAAC,EAAE,CAAC;gBAC/C,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;YAC3B,CAAC;QACH,CAAC,CAAC;2BAvDqB,CAAC;;;4BAoByB,CAAC;;IAQlD,WAAW;QACT,IAAI,CA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E,YAAY,EAAE,IAAI,EAAE,EAAE,IAAI,EAAC,aAAa,GAAG,CACjE;gBACb,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CACzB,mBAAa,GAAG,EAAE,IAAI,EAAE,OAAO,EAAC,WAAW,EAAC,SAAS,QAAC,EAAE,EAAE,GAAG,IAAI,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC;oBACtG,iBAAW,OAAO,EAAC,OAAO,IAAE,IAAI,GAAG,CAAC,CAAa,CACrC,CACf,CAAC;gBACF,oEAAa,KAAK,EAAC,cAAc,EAAC,OAAO,EAAE,IAAI,CAAC,eAAe;oBAC7D,kEAAW,KAAK,EAAC,MAAM,EAAC,IAAI,EAAC,aAAa,GAAG,CACjC,CACI,CACf,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, State, Event, h, EventEmitter, Watch } from '@stencil/core';\n\n@Component({\n tag: 'cpsl-pagination',\n styleUrl: 'cpsl-pagination.scss',\n shadow: true,\n})\nexport class CpslPagination {\n @State() currentPage = 0;\n\n /**\n * The initial page to select.\n * Default is 0.\n */\n @Prop() initialPage?: number;\n\n /**\n * The total number of pages.\n */\n @Prop() totalPages: number;\n\n /**\n * The number of pages visible to select.\n * Default is 5.\n * Min is 5.\n */\n\n // eslint-disable-next-line @stencil-community/strict-mutable\n @Prop({ mutable: true }) visiblePages?: number = 5;\n\n /**\n * Emitted when exit animation finishes.\n */\n @Event() cpslPaginationChanged!: EventEmitter<number>;\n\n @Watch('currentPage')\n watchChange() {\n this.cpslPaginationChanged.emit(this.currentPage);\n }\n\n componentWillLoad() {\n this.currentPage = this.initialPage ?? 0;\n if (this.visiblePages < 5) {\n this.visiblePages = 5;\n }\n }\n\n private handlePrevClick = () => {\n if (this.currentPage > 0) {\n this.currentPage--;\n }\n };\n\n private handleNextClick = () => {\n if (this.currentPage < this.totalPages - 1) {\n this.currentPage++;\n }\n };\n\n private handlePageClick = (value: number) => () => {\n if (value >= 0 && value <= this.totalPages - 1) {\n this.currentPage = value;\n }\n };\n\n render() {\n const filteredPages: number[] = this.totalPages <= this.visiblePages ? [...Array(this.totalPages).keys()] : [];\n\n if (this.totalPages > this.visiblePages) {\n filteredPages.push(0);\n\n const isFirstSelected = this.currentPage === 0;\n const isLastSelected = this.currentPage === this.totalPages - 1;\n const isFirstOrLastSelected = isFirstSelected || isLastSelected;\n\n let remainingVisible = this.visiblePages - (isFirstOrLastSelected ? 2 : 3);\n const halfRemaining = Math.round(remainingVisible / 2);\n const numberBefore = Math.max(this.currentPage - 1, 0);\n const numberAfter = Math.max(this.totalPages - 2 - this.currentPage, 0);\n let beforeHalf = halfRemaining;\n let afterHalf = remainingVisible - halfRemaining;\n\n if (numberBefore >= beforeHalf) {\n if (numberAfter < afterHalf) {\n beforeHalf += afterHalf - numberAfter;\n afterHalf = numberAfter;\n }\n } else {\n afterHalf += beforeHalf - numberBefore;\n beforeHalf = numberBefore;\n }\n\n while (beforeHalf > 0) {\n filteredPages.push(this.currentPage - beforeHalf);\n beforeHalf--;\n }\n\n if (!isFirstSelected) {\n filteredPages.push(this.currentPage);\n }\n\n const pagesAfter: number[] = [];\n while (afterHalf > 0) {\n pagesAfter.push(this.currentPage + afterHalf);\n afterHalf--;\n }\n\n filteredPages.push(...pagesAfter.reverse());\n\n if (!isLastSelected) {\n filteredPages.push(this.totalPages - 1);\n }\n }\n\n return (\n <Host>\n <cpsl-button-group selectedId={`${this.currentPage}`}>\n <cpsl-button class=\"arrow-button\" onClick={this.handlePrevClick}>\n <cpsl-icon class={{ 'icon': true, 'start-icon': true }} icon=\"arrowNarrow\" />\n </cpsl-button>\n {filteredPages.map(page => (\n <cpsl-button key={page} variant=\"secondary\" fullWidth id={`${page}`} onClick={this.handlePageClick(page)}>\n <cpsl-text variant=\"bodyS\">{page + 1}</cpsl-text>\n </cpsl-button>\n ))}\n <cpsl-button class=\"arrow-button\" onClick={this.handleNextClick}>\n <cpsl-icon class=\"icon\" icon=\"arrowNarrow\" />\n </cpsl-button>\n </cpsl-button-group>\n </Host>\n );\n }\n}\n"]}
@@ -79,7 +79,7 @@
79
79
  align-items: center;
80
80
  box-sizing: border-box;
81
81
  height: var(--pill-container-height);
82
- background-color: var(--pill-container-background-color);
82
+ background: var(--pill-container-background-color);
83
83
  border: 1px solid;
84
84
  border-color: var(--pill-container-border-color);
85
85
  border-radius: var(--pill-container-border-radius);
@@ -4,7 +4,7 @@ export class CpslPill {
4
4
  this.text = undefined;
5
5
  }
6
6
  render() {
7
- return (h(Host, { key: 'cfb75db6154db11d15a26f253686793fd21beccc' }, h("div", { key: '00381588b8d9e34201b439a7fd4233069a62f2f5', class: "pill-container" }, h("span", { key: '4fa5134cc5f873373ca8a2102d4a88ef6455ff7d' }, this.text))));
7
+ return (h(Host, { key: 'c57c4206cb82aef700747dee7712ed15ff5907b9' }, h("div", { key: 'bc60013838c2d7a7632269b711a506aa83e5b98c', class: "pill-container" }, h("span", { key: '6eb81137bfbe02e9fa68a5ef1399b7d73b6bc89b' }, this.text))));
8
8
  }
9
9
  static get is() { return "cpsl-pill"; }
10
10
  static get encapsulation() { return "shadow"; }
@@ -0,0 +1,98 @@
1
+ /**
2
+ * Convert a font size to a dynamic font size.
3
+ * Fonts that participate in Dynamic Type should use
4
+ * dynamic font sizes.
5
+ * @param size - The initial font size including the unit (i.e. px or pt)
6
+ * @param unit (optional) - The unit to convert to. Use this if you want to
7
+ * convert to a unit other than $baselineUnit.
8
+ */
9
+ /**
10
+ * Convert a font size to a dynamic font size but impose
11
+ * a maximum font size.
12
+ * @param size - The initial font size including the unit (i.e. px or pt)
13
+ * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
14
+ * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
15
+ * convert to a unit other than $baselineUnit.
16
+ */
17
+ /**
18
+ * Convert a font size to a dynamic font size but impose
19
+ * a minimum font size.
20
+ * @param size - The initial font size including the unit (i.e. px or pt)
21
+ * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
22
+ * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
23
+ * convert to a unit other than $baselineUnit.
24
+ */
25
+ /**
26
+ * Convert a font size to a dynamic font size but impose
27
+ * maximum and minimum font sizes.
28
+ * @param size - The initial font size including the unit (i.e. px or pt)
29
+ * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
30
+ * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
31
+ * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
32
+ * convert to a unit other than $baselineUnit.
33
+ */
34
+ /**
35
+ * A heuristic that applies CSS to tablet
36
+ * viewports.
37
+ *
38
+ * Usage:
39
+ * @include tablet-viewport() {
40
+ * :host {
41
+ * background-color: green;
42
+ * }
43
+ * }
44
+ */
45
+ /**
46
+ * A heuristic that applies CSS to mobile
47
+ * viewports (i.e. phones, not tablets).
48
+ *
49
+ * Usage:
50
+ * @include mobile-viewport() {
51
+ * :host {
52
+ * background-color: blue;
53
+ * }
54
+ * }
55
+ */
56
+ :host {
57
+ position: fixed;
58
+ display: block;
59
+ z-index: -1;
60
+ overflow: auto;
61
+ }
62
+
63
+ :host(.open) {
64
+ z-index: 10006;
65
+ }
66
+
67
+ .container {
68
+ visibility: hidden;
69
+ }
70
+
71
+ .open {
72
+ visibility: visible;
73
+ z-index: 10006;
74
+ }
75
+
76
+ :host(.transform-h-left) {
77
+ transform: translateX(0);
78
+ }
79
+
80
+ :host(.transform-h-center) {
81
+ transform: translateX(-50%);
82
+ }
83
+
84
+ :host(.transform-h-right) {
85
+ transform: translateX(-100%);
86
+ }
87
+
88
+ :host(.transform-v-top) {
89
+ transform: translateY(0);
90
+ }
91
+
92
+ :host(.transform-v-center) {
93
+ transform: translateY(-50%);
94
+ }
95
+
96
+ :host(.transform-v-bottom) {
97
+ transform: translateY(-100%);
98
+ }