@usecapsule/core-components 3.0.1 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (234) 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-397edab5.entry.js +2 -0
  8. package/dist/capsule/{p-ad14a817.entry.js.map → p-397edab5.entry.js.map} +1 -1
  9. package/dist/capsule/p-52d6ebee.entry.js +2 -0
  10. package/dist/capsule/{p-fcead80b.entry.js.map → p-52d6ebee.entry.js.map} +1 -1
  11. package/dist/capsule/p-5ed5e96c.entry.js +2 -0
  12. package/dist/capsule/p-5ed5e96c.entry.js.map +1 -0
  13. package/dist/capsule/p-6e71539d.js +3 -0
  14. package/dist/capsule/p-6e71539d.js.map +1 -0
  15. package/dist/capsule/p-6e900654.entry.js +29 -0
  16. package/dist/capsule/p-6e900654.entry.js.map +1 -0
  17. package/dist/capsule/{p-0d0a0037.entry.js → p-70f95c93.entry.js} +2 -2
  18. package/dist/capsule/{p-0d0a0037.entry.js.map → p-70f95c93.entry.js.map} +1 -1
  19. package/dist/capsule/p-86e6cba5.entry.js +10 -0
  20. package/dist/capsule/{p-d28b96ba.entry.js.map → p-86e6cba5.entry.js.map} +1 -1
  21. package/dist/capsule/p-f2393be6.js +2 -0
  22. package/dist/capsule/p-f2393be6.js.map +1 -0
  23. package/dist/capsule/{p-fa078837.entry.js → p-f9351426.entry.js} +2 -2
  24. package/dist/capsule/{p-fa078837.entry.js.map → p-f9351426.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} +663 -94
  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-85125285.js +1414 -0
  40. package/dist/cjs/index-85125285.js.map +1 -0
  41. package/dist/cjs/index.cjs.js +116 -107
  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/chevron-up.svg +2 -2
  45. package/dist/collection/assets/icons/close.svg +3 -4
  46. package/dist/collection/assets/icons/cube.svg +3 -0
  47. package/dist/collection/assets/icons/farcaster-brand.svg +10 -0
  48. package/dist/collection/assets/icons/farcaster.svg +10 -0
  49. package/dist/collection/assets/icons/image.svg +3 -0
  50. package/dist/collection/assets/icons/index.js +9 -1
  51. package/dist/collection/assets/icons/index.js.map +1 -1
  52. package/dist/collection/assets/icons/menu.svg +3 -0
  53. package/dist/collection/assets/icons/refresh.svg +3 -0
  54. package/dist/collection/assets/icons/stars.svg +4 -0
  55. package/dist/collection/assets/icons/x.svg +3 -0
  56. package/dist/collection/collection-manifest.json +7 -2
  57. package/dist/collection/components/cpsl-alert/cpsl-alert.js +2 -2
  58. package/dist/collection/components/cpsl-alert/cpsl-alert.js.map +1 -1
  59. package/dist/collection/components/cpsl-animation/cpsl-animation.js +1 -1
  60. package/dist/collection/components/cpsl-app-bar/cpsl-app-bar.js +20 -4
  61. package/dist/collection/components/cpsl-app-bar/cpsl-app-bar.js.map +1 -1
  62. package/dist/collection/components/cpsl-avatar/cpsl-avatar.js +1 -1
  63. package/dist/collection/components/cpsl-button/cpsl-button.css +113 -17
  64. package/dist/collection/components/cpsl-button/cpsl-button.js +63 -7
  65. package/dist/collection/components/cpsl-button/cpsl-button.js.map +1 -1
  66. package/dist/collection/components/cpsl-button-group/cpsl-button-group.css +1 -0
  67. package/dist/collection/components/cpsl-button-group/cpsl-button-group.js +1 -1
  68. package/dist/collection/components/cpsl-card/cpsl-card.css +1 -1
  69. package/dist/collection/components/cpsl-card/cpsl-card.js +1 -1
  70. package/dist/collection/components/cpsl-card/cpsl-card.js.map +1 -1
  71. package/dist/collection/components/cpsl-checkbox/cpsl-checkbox.css +2 -2
  72. package/dist/collection/components/cpsl-checkbox/cpsl-checkbox.js +1 -1
  73. package/dist/collection/components/cpsl-code-input/cpsl-code-input.css +1 -1
  74. package/dist/collection/components/cpsl-code-input/cpsl-code-input.js +2 -2
  75. package/dist/collection/components/cpsl-code-input/cpsl-code-input.js.map +1 -1
  76. package/dist/collection/components/cpsl-col/cpsl-col.js +1 -1
  77. package/dist/collection/components/cpsl-divider/cpsl-divider.css +1 -1
  78. package/dist/collection/components/cpsl-divider/cpsl-divider.js +1 -1
  79. package/dist/collection/components/cpsl-drawer/cpsl-drawer.js +84 -11
  80. package/dist/collection/components/cpsl-drawer/cpsl-drawer.js.map +1 -1
  81. package/dist/collection/components/cpsl-dropdown/cpsl-dropdown.js +1 -1
  82. package/dist/collection/components/cpsl-dropdown/cpsl-dropdown.js.map +1 -1
  83. package/dist/collection/components/cpsl-file-upload/cpsl-file-upload.css +211 -0
  84. package/dist/collection/components/cpsl-file-upload/cpsl-file-upload.js +406 -0
  85. package/dist/collection/components/cpsl-file-upload/cpsl-file-upload.js.map +1 -0
  86. package/dist/collection/components/cpsl-file-upload/test/cpsl-file-upload.e2e.js +29 -0
  87. package/dist/collection/components/cpsl-file-upload/test/cpsl-file-upload.e2e.js.map +1 -0
  88. package/dist/collection/components/cpsl-file-upload/test/cpsl-file-upload.spec.js +37 -0
  89. package/dist/collection/components/cpsl-file-upload/test/cpsl-file-upload.spec.js.map +1 -0
  90. package/dist/collection/components/cpsl-grid/cpsl-grid.js +2 -2
  91. package/dist/collection/components/cpsl-icon/cpsl-icon.js +2 -2
  92. package/dist/collection/components/cpsl-info-box/cpsl-info-box.css +1 -1
  93. package/dist/collection/components/cpsl-info-box/cpsl-info-box.js +1 -1
  94. package/dist/collection/components/cpsl-input/cpsl-input.css +7 -6
  95. package/dist/collection/components/cpsl-input/cpsl-input.js +3 -8
  96. package/dist/collection/components/cpsl-input/cpsl-input.js.map +1 -1
  97. package/dist/collection/components/cpsl-modal/cpsl-modal.css +4 -4
  98. package/dist/collection/components/cpsl-modal/cpsl-modal.js +1 -0
  99. package/dist/collection/components/cpsl-modal/cpsl-modal.js.map +1 -1
  100. package/dist/collection/components/cpsl-modal-v2/cpsl-modal-v2.css +91 -0
  101. package/dist/collection/components/cpsl-modal-v2/cpsl-modal-v2.js +224 -0
  102. package/dist/collection/components/cpsl-modal-v2/cpsl-modal-v2.js.map +1 -0
  103. package/dist/collection/components/cpsl-modal-v2/test/cpsl-modal-v2.e2e.js +29 -0
  104. package/dist/collection/components/cpsl-modal-v2/test/cpsl-modal-v2.e2e.js.map +1 -0
  105. package/dist/collection/components/cpsl-modal-v2/test/cpsl-modal-v2.spec.js +37 -0
  106. package/dist/collection/components/cpsl-modal-v2/test/cpsl-modal-v2.spec.js.map +1 -0
  107. package/dist/collection/components/cpsl-nav-button-group/cpsl-nav-button-group.js +1 -1
  108. package/dist/collection/components/cpsl-overlay/cpsl-overlay.css +1 -1
  109. package/dist/collection/components/cpsl-overlay/cpsl-overlay.js +1 -1
  110. package/dist/collection/components/cpsl-pagination/cpsl-pagination.css +4 -0
  111. package/dist/collection/components/cpsl-pagination/cpsl-pagination.js +1 -1
  112. package/dist/collection/components/cpsl-pagination/cpsl-pagination.js.map +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 +511 -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 +229 -0
  129. package/dist/collection/components/cpsl-select/cpsl-select.js +409 -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 +114 -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 +48 -60
  149. package/dist/collection/components/cpsl-table/cpsl-table.js +34 -58
  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/interface.js.map +1 -1
  161. package/dist/collection/utils/theme/generateBorderRadii.js +40 -39
  162. package/dist/collection/utils/theme/generateBorderRadii.js.map +1 -1
  163. package/dist/collection/utils/theme/generatePalette.js +11 -3
  164. package/dist/collection/utils/theme/generatePalette.js.map +1 -1
  165. package/dist/collection/utils/theme/generateTheme.js +2 -2
  166. package/dist/collection/utils/theme/generateTheme.js.map +1 -1
  167. package/dist/collection/utils/theme/utils.js +1 -0
  168. package/dist/collection/utils/theme/utils.js.map +1 -1
  169. package/dist/esm/capsule.js +11 -11
  170. package/dist/esm/capsule.js.map +1 -1
  171. package/dist/esm/{constants-6acf4ea8.js → constants-fce138fa.js} +3 -3
  172. package/dist/esm/{constants-6acf4ea8.js.map → constants-fce138fa.js.map} +1 -1
  173. package/dist/esm/{cpsl-alert_29.entry.js → cpsl-alert_33.entry.js} +660 -95
  174. package/dist/esm/cpsl-alert_33.entry.js.map +1 -0
  175. package/dist/esm/cpsl-animation.entry.js +2 -2
  176. package/dist/esm/cpsl-col.entry.js +2 -2
  177. package/dist/esm/cpsl-grid.entry.js +3 -3
  178. package/dist/esm/cpsl-info-box.entry.js +3 -3
  179. package/dist/esm/cpsl-info-box.entry.js.map +1 -1
  180. package/dist/esm/cpsl-modal-v2.entry.js +51 -0
  181. package/dist/esm/cpsl-modal-v2.entry.js.map +1 -0
  182. package/dist/esm/cpsl-row.entry.js +2 -2
  183. package/dist/esm/index-b9a060b3.js +1383 -0
  184. package/dist/esm/index-b9a060b3.js.map +1 -0
  185. package/dist/esm/index.js +116 -107
  186. package/dist/esm/index.js.map +1 -1
  187. package/dist/esm/loader.js +3 -3
  188. package/dist/loader/cdn.js +1 -3
  189. package/dist/loader/index.cjs.js +1 -3
  190. package/dist/loader/index.es2017.js +1 -3
  191. package/dist/loader/index.js +1 -3
  192. package/dist/types/assets/icons/index.d.ts +8 -0
  193. package/dist/types/components/cpsl-app-bar/cpsl-app-bar.d.ts +1 -0
  194. package/dist/types/components/cpsl-button/cpsl-button.d.ts +4 -1
  195. package/dist/types/components/cpsl-drawer/cpsl-drawer.d.ts +10 -1
  196. package/dist/types/components/cpsl-file-upload/cpsl-file-upload.d.ts +34 -0
  197. package/dist/types/components/cpsl-input/cpsl-input.d.ts +1 -1
  198. package/dist/types/components/cpsl-modal-v2/cpsl-modal-v2.d.ts +17 -0
  199. package/dist/types/components/cpsl-popover/cpsl-popover.d.ts +35 -0
  200. package/dist/types/components/cpsl-select/cpsl-select.d.ts +38 -0
  201. package/dist/types/components/cpsl-select-item/cpsl-select-item.d.ts +8 -0
  202. package/dist/types/components/cpsl-table/cpsl-table.d.ts +6 -3
  203. package/dist/types/components/cpsl-text/cpsl-text.d.ts +1 -1
  204. package/dist/types/components.d.ts +596 -28
  205. package/dist/types/constants.d.ts +2 -2
  206. package/dist/types/interface.d.ts +68 -1
  207. package/dist/types/stencil-public-runtime.d.ts +3 -8
  208. package/dist/types/utils/theme/generateBorderRadii.d.ts +1 -1
  209. package/dist/types/utils/theme/generateTheme.d.ts +1 -1
  210. package/dist/types/utils/theme/utils.d.ts +4 -1
  211. package/package.json +2 -2
  212. package/dist/capsule/p-107e1ff5.entry.js +0 -29
  213. package/dist/capsule/p-107e1ff5.entry.js.map +0 -1
  214. package/dist/capsule/p-86e48e61.js +0 -3
  215. package/dist/capsule/p-86e48e61.js.map +0 -1
  216. package/dist/capsule/p-ad14a817.entry.js +0 -2
  217. package/dist/capsule/p-b6b38e73.js +0 -2
  218. package/dist/capsule/p-b6b38e73.js.map +0 -1
  219. package/dist/capsule/p-d28b96ba.entry.js +0 -10
  220. package/dist/capsule/p-fcead80b.entry.js +0 -2
  221. package/dist/cjs/cpsl-alert_29.cjs.entry.js.map +0 -1
  222. package/dist/cjs/index-5733071e.js +0 -2020
  223. package/dist/cjs/index-5733071e.js.map +0 -1
  224. package/dist/collection/components/cpsl-table/table-interface.js +0 -2
  225. package/dist/collection/components/cpsl-table/table-interface.js.map +0 -1
  226. package/dist/esm/cpsl-alert_29.entry.js.map +0 -1
  227. package/dist/esm/index-8fe9f35e.js +0 -1990
  228. package/dist/esm/index-8fe9f35e.js.map +0 -1
  229. package/dist/esm/polyfills/core-js.js +0 -11
  230. package/dist/esm/polyfills/dom.js +0 -79
  231. package/dist/esm/polyfills/es5-html-element.js +0 -1
  232. package/dist/esm/polyfills/index.js +0 -34
  233. package/dist/esm/polyfills/system.js +0 -6
  234. package/dist/types/components/cpsl-table/table-interface.d.ts +0 -19
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cpsl-modal-v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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: 'e677688e630bcbfa89cd8cff36fd84a4bdc1a627' }, h("slot", { key: 'd0c04a917b6818e7b40cdae32fe19e158da2f38d' })));
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: 'f0a39fa80559007fa5312ca2d88dbbb8d6a65adf', style: Boolean(this.zIndexOverride) ? { zIndex: `${this.zIndexOverride}` } : {} }, h("slot", { key: '4ff06458ac6e33f80c252afe9215d7e084a1f8d8' })));
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: 'a606e9d711b7e5d3154126e0a9b9f87c192a9e1e' }, h("cpsl-button-group", { key: '7ac1f34cb86fa73897bb58044d9f4c2a76e4b06c', selectedId: `${this.currentPage}` }, h("cpsl-button", { key: '8c78bd8f77c65535ceb6fc414f019b1fa7f8d7e8', class: "arrow-button", onClick: this.handlePrevClick }, h("cpsl-icon", { key: 'da4779051c45a41a7fcec1fbe04eebf75a417e01', 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: '63f71be7e364edd629077d71ad4c401445807704', class: "arrow-button", onClick: this.handleNextClick }, h("cpsl-icon", { key: 'd21bc4f342374d026816d6c091fef282a77320d8', 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,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,CAAC,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACpD,CAAC;IAED,iBAAiB;;QACf,IAAI,CAAC,WAAW,GAAG,MA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AAI,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":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,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: '788ab049c90438152e472230dbdfb6c5204d1694' }, h("div", { key: 'c8da2bc450f16a9dab6bb25af747cc047908ef2e', class: "pill-container" }, h("span", { key: '71013ebcc7c8253a3370ca3abe6f1094b101e602' }, 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
+ }