@usecapsule/core-components 1.0.13 → 2.0.0-dev.dropdown

Sign up to get free protection for your applications and to get access to all the features.
Files changed (173) hide show
  1. package/css/capsule-core.css +86 -41
  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-0462f723.js +2 -0
  8. package/dist/capsule/p-0462f723.js.map +1 -0
  9. package/dist/capsule/p-0cab90fa.entry.js +2 -0
  10. package/dist/capsule/{p-1dc07cd7.entry.js.map → p-0cab90fa.entry.js.map} +1 -1
  11. package/dist/capsule/{p-11048392.entry.js → p-193ac141.entry.js} +2 -2
  12. package/dist/capsule/p-6fb7c4d1.js +3 -0
  13. package/dist/capsule/p-6fb7c4d1.js.map +1 -0
  14. package/dist/capsule/{p-62e7869a.entry.js → p-a95ec4df.entry.js} +2 -2
  15. package/dist/capsule/p-bea93fae.entry.js +29 -0
  16. package/dist/capsule/p-bea93fae.entry.js.map +1 -0
  17. package/dist/capsule/p-c2bf050b.js +2 -0
  18. package/dist/capsule/p-c2bf050b.js.map +1 -0
  19. package/dist/capsule/p-cb8dc0a4.entry.js +2 -0
  20. package/dist/capsule/p-d7be092d.entry.js +10 -0
  21. package/dist/capsule/p-d7be092d.entry.js.map +1 -0
  22. package/dist/cjs/_commonjsHelpers-b3309d7b.js +12 -0
  23. package/dist/cjs/_commonjsHelpers-b3309d7b.js.map +1 -0
  24. package/dist/cjs/capsule.cjs.js +2 -2
  25. package/dist/cjs/constants-4bb85cc5.js +12 -0
  26. package/dist/cjs/constants-4bb85cc5.js.map +1 -0
  27. package/dist/cjs/{cpsl-alert_17.cjs.entry.js → cpsl-alert_18.cjs.entry.js} +3838 -537
  28. package/dist/cjs/cpsl-alert_18.cjs.entry.js.map +1 -0
  29. package/dist/cjs/cpsl-animation.cjs.entry.js +20129 -0
  30. package/dist/cjs/cpsl-animation.cjs.entry.js.map +1 -0
  31. package/dist/cjs/cpsl-col.cjs.entry.js +2 -2
  32. package/dist/cjs/cpsl-grid.cjs.entry.js +3 -3
  33. package/dist/cjs/cpsl-info-box.cjs.entry.js +3 -3
  34. package/dist/cjs/cpsl-info-box.cjs.entry.js.map +1 -1
  35. package/dist/cjs/cpsl-row.cjs.entry.js +2 -2
  36. package/dist/cjs/{index-2a026742.js → index-3fccb5b4.js} +24 -3
  37. package/dist/cjs/index-3fccb5b4.js.map +1 -0
  38. package/dist/cjs/index.cjs.js +358 -0
  39. package/dist/cjs/index.cjs.js.map +1 -1
  40. package/dist/cjs/loader.cjs.js +2 -2
  41. package/dist/collection/assets/icons/capsule-rings-dark.svg +34 -0
  42. package/dist/collection/assets/icons/capsule.svg +4 -4
  43. package/dist/collection/assets/icons/chevron-up.svg +3 -0
  44. package/dist/collection/assets/icons/hero-email.svg +8 -30
  45. package/dist/collection/assets/icons/hero-lock.svg +4 -34
  46. package/dist/collection/assets/icons/hero-passkey.svg +9 -17
  47. package/dist/collection/assets/icons/hero-phone.svg +4 -15
  48. package/dist/collection/assets/icons/hero-wallet.svg +5 -44
  49. package/dist/collection/assets/icons/index.js +5 -2
  50. package/dist/collection/assets/icons/index.js.map +1 -1
  51. package/dist/collection/assets/icons/more-login-options.svg +10 -10
  52. package/dist/collection/assets/icons/plus-circle.svg +5 -0
  53. package/dist/collection/assets/icons/wallet.svg +5 -0
  54. package/dist/collection/collection-manifest.json +2 -0
  55. package/dist/collection/components/cpsl-alert/cpsl-alert.js +1 -1
  56. package/dist/collection/components/cpsl-animation/cpsl-animation.css +17 -0
  57. package/dist/collection/components/cpsl-animation/cpsl-animation.js +102 -0
  58. package/dist/collection/components/cpsl-animation/cpsl-animation.js.map +1 -0
  59. package/dist/collection/components/cpsl-animation/test/cpsl-animation.e2e.js +29 -0
  60. package/dist/collection/components/cpsl-animation/test/cpsl-animation.e2e.js.map +1 -0
  61. package/dist/collection/components/cpsl-animation/test/cpsl-animation.spec.js +37 -0
  62. package/dist/collection/components/cpsl-animation/test/cpsl-animation.spec.js.map +1 -0
  63. package/dist/collection/components/cpsl-button/cpsl-button.css +3 -0
  64. package/dist/collection/components/cpsl-button/cpsl-button.js +2 -2
  65. package/dist/collection/components/cpsl-button/cpsl-button.js.map +1 -1
  66. package/dist/collection/components/cpsl-code-input/cpsl-code-input.js +1 -1
  67. package/dist/collection/components/cpsl-col/cpsl-col.js +1 -1
  68. package/dist/collection/components/cpsl-divider/cpsl-divider.js +1 -1
  69. package/dist/collection/components/cpsl-dropdown/cpsl-dropdown.css +88 -0
  70. package/dist/collection/components/cpsl-dropdown/cpsl-dropdown.js +113 -0
  71. package/dist/collection/components/cpsl-dropdown/cpsl-dropdown.js.map +1 -0
  72. package/dist/collection/components/cpsl-dropdown/test/cpsl-dropdown.e2e.js +29 -0
  73. package/dist/collection/components/cpsl-dropdown/test/cpsl-dropdown.e2e.js.map +1 -0
  74. package/dist/collection/components/cpsl-dropdown/test/cpsl-dropdown.spec.js +37 -0
  75. package/dist/collection/components/cpsl-dropdown/test/cpsl-dropdown.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.css +14 -0
  78. package/dist/collection/components/cpsl-icon/cpsl-icon.js +2 -3
  79. package/dist/collection/components/cpsl-icon/cpsl-icon.js.map +1 -1
  80. package/dist/collection/components/cpsl-info-box/cpsl-info-box.css +1 -1
  81. package/dist/collection/components/cpsl-info-box/cpsl-info-box.js +1 -1
  82. package/dist/collection/components/cpsl-input/cpsl-input.css +12 -7
  83. package/dist/collection/components/cpsl-input/cpsl-input.js +8 -6
  84. package/dist/collection/components/cpsl-input/cpsl-input.js.map +1 -1
  85. package/dist/collection/components/cpsl-modal/cpsl-modal.css +46 -4
  86. package/dist/collection/components/cpsl-modal/cpsl-modal.js +341 -24
  87. package/dist/collection/components/cpsl-modal/cpsl-modal.js.map +1 -1
  88. package/dist/collection/components/cpsl-overlay/cpsl-overlay.js +30 -13
  89. package/dist/collection/components/cpsl-overlay/cpsl-overlay.js.map +1 -1
  90. package/dist/collection/components/cpsl-pill/cpsl-pill.css +3 -3
  91. package/dist/collection/components/cpsl-pill/cpsl-pill.js +1 -1
  92. package/dist/collection/components/cpsl-progress-indicator/cpsl-progress-indicator.css +3 -3
  93. package/dist/collection/components/cpsl-qr-code/cpsl-qr-code.css +3 -3
  94. package/dist/collection/components/cpsl-qr-code/cpsl-qr-code.js +1 -1
  95. package/dist/collection/components/cpsl-row/cpsl-row.js +1 -1
  96. package/dist/collection/components/cpsl-slide-button/cpsl-slide-button.css +11 -9
  97. package/dist/collection/components/cpsl-slide-button/cpsl-slide-button.js +3 -3
  98. package/dist/collection/components/cpsl-spinner/cpsl-spinner.css +2 -2
  99. package/dist/collection/components/cpsl-spinner/cpsl-spinner.js +2 -2
  100. package/dist/collection/components/cpsl-tab/cpsl-tab.js +1 -1
  101. package/dist/collection/components/cpsl-tabs/cpsl-tabs.css +17 -16
  102. package/dist/collection/components/cpsl-tabs/cpsl-tabs.js +2 -2
  103. package/dist/collection/components/cpsl-tabs/cpsl-tabs.js.map +1 -1
  104. package/dist/collection/components/cpsl-text/cpsl-text.css +101 -0
  105. package/dist/collection/components/cpsl-text/cpsl-text.js +110 -1
  106. package/dist/collection/components/cpsl-text/cpsl-text.js.map +1 -1
  107. package/dist/collection/components/cpsl-tile-button/cpsl-tile-button.css +3 -0
  108. package/dist/collection/components/cpsl-tile-button/cpsl-tile-button.js +2 -2
  109. package/dist/collection/constants.js +6 -0
  110. package/dist/collection/constants.js.map +1 -0
  111. package/dist/collection/index.js +1 -0
  112. package/dist/collection/index.js.map +1 -1
  113. package/dist/collection/interface.js.map +1 -1
  114. package/dist/collection/utils/theme/generateBorderRadii.js +56 -0
  115. package/dist/collection/utils/theme/generateBorderRadii.js.map +1 -0
  116. package/dist/collection/utils/theme/generateFont.js +28 -0
  117. package/dist/collection/utils/theme/generateFont.js.map +1 -0
  118. package/dist/collection/utils/theme/generatePalette.js +46 -0
  119. package/dist/collection/utils/theme/generatePalette.js.map +1 -0
  120. package/dist/collection/utils/theme/generateTheme.js +11 -0
  121. package/dist/collection/utils/theme/generateTheme.js.map +1 -0
  122. package/dist/collection/utils/theme/utils.js +21 -0
  123. package/dist/collection/utils/theme/utils.js.map +1 -0
  124. package/dist/esm/_commonjsHelpers-1789f0cf.js +9 -0
  125. package/dist/esm/_commonjsHelpers-1789f0cf.js.map +1 -0
  126. package/dist/esm/capsule.js +3 -3
  127. package/dist/esm/constants-7b49abd5.js +9 -0
  128. package/dist/esm/constants-7b49abd5.js.map +1 -0
  129. package/dist/esm/{cpsl-alert_17.entry.js → cpsl-alert_18.entry.js} +3837 -537
  130. package/dist/esm/cpsl-alert_18.entry.js.map +1 -0
  131. package/dist/esm/cpsl-animation.entry.js +20125 -0
  132. package/dist/esm/cpsl-animation.entry.js.map +1 -0
  133. package/dist/esm/cpsl-col.entry.js +2 -2
  134. package/dist/esm/cpsl-grid.entry.js +3 -3
  135. package/dist/esm/cpsl-info-box.entry.js +3 -3
  136. package/dist/esm/cpsl-info-box.entry.js.map +1 -1
  137. package/dist/esm/cpsl-row.entry.js +2 -2
  138. package/dist/esm/{index-7c2f5cb9.js → index-f00e090c.js} +24 -3
  139. package/dist/esm/index-f00e090c.js.map +1 -0
  140. package/dist/esm/index.js +355 -0
  141. package/dist/esm/index.js.map +1 -1
  142. package/dist/esm/loader.js +3 -3
  143. package/dist/types/assets/icons/index.d.ts +4 -1
  144. package/dist/types/components/cpsl-animation/cpsl-animation.d.ts +9 -0
  145. package/dist/types/components/cpsl-dropdown/cpsl-dropdown.d.ts +25 -0
  146. package/dist/types/components/cpsl-modal/cpsl-modal.d.ts +26 -5
  147. package/dist/types/components/cpsl-overlay/cpsl-overlay.d.ts +2 -2
  148. package/dist/types/components/cpsl-text/cpsl-text.d.ts +4 -0
  149. package/dist/types/components.d.ts +170 -13
  150. package/dist/types/constants.d.ts +3 -0
  151. package/dist/types/index.d.ts +2 -0
  152. package/dist/types/interface.d.ts +137 -0
  153. package/dist/types/utils/theme/generateBorderRadii.d.ts +2 -0
  154. package/dist/types/utils/theme/generateFont.d.ts +2 -0
  155. package/dist/types/utils/theme/generatePalette.d.ts +7 -0
  156. package/dist/types/utils/theme/generateTheme.d.ts +2 -0
  157. package/dist/types/utils/theme/utils.d.ts +5 -0
  158. package/package.json +5 -3
  159. package/dist/capsule/p-0e2fbb7f.entry.js +0 -20
  160. package/dist/capsule/p-0e2fbb7f.entry.js.map +0 -1
  161. package/dist/capsule/p-1dc07cd7.entry.js +0 -2
  162. package/dist/capsule/p-5c020abe.entry.js +0 -2
  163. package/dist/capsule/p-9647dd63.js +0 -3
  164. package/dist/capsule/p-9647dd63.js.map +0 -1
  165. package/dist/cjs/cpsl-alert_17.cjs.entry.js.map +0 -1
  166. package/dist/cjs/index-2a026742.js.map +0 -1
  167. package/dist/collection/assets/icons/more-login-options-dark.svg +0 -13
  168. package/dist/esm/cpsl-alert_17.entry.js.map +0 -1
  169. package/dist/esm/index-7c2f5cb9.js.map +0 -1
  170. /package/dist/capsule/{p-11048392.entry.js.map → p-193ac141.entry.js.map} +0 -0
  171. /package/dist/capsule/{p-62e7869a.entry.js.map → p-a95ec4df.entry.js.map} +0 -0
  172. /package/dist/capsule/{p-5c020abe.entry.js.map → p-cb8dc0a4.entry.js.map} +0 -0
  173. /package/dist/types/Users/{taylorbosch → vinay}/Documents/GitHub/Capsule/component-library/core/.stencil/scripts/buildIconLibrary.d.ts +0 -0
@@ -56,6 +56,7 @@
56
56
  :host {
57
57
  --button-border-radius: var(--cpsl-border-radius-primary-button);
58
58
  --button-border-width: 1px;
59
+ --button-gap: 4px;
59
60
  --button-box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05), 0px 2px 2px 0px var(--cpsl-color-alpha-white-25) inset, 0px -2px 2px 0px var(--cpsl-color-alpha-black-25) inset;
60
61
  --button-padding-top: 10px;
61
62
  --button-padding-bottom: 10px;
@@ -155,5 +156,7 @@
155
156
  height: 100%;
156
157
  width: 100%;
157
158
  box-shadow: var(--button-box-shadow);
159
+ gap: var(--button-gap);
160
+ word-break: break-all;
158
161
  outline-color: var(--button-outline-color);
159
162
  }
@@ -5,12 +5,12 @@ export class CpslButton {
5
5
  this.variant = 'primary';
6
6
  }
7
7
  render() {
8
- return (h(Host, { key: 'f1fa105aeacb8c4650321d312d7bd43932fe6c9d', class: {
8
+ return (h(Host, { key: '258bec70d4cf27d453500c712285e45a1304b925', class: {
9
9
  'primary': this.variant === 'primary',
10
10
  'secondary': this.variant === 'secondary',
11
11
  'icon': this.variant === 'icon',
12
12
  'button-disabled': this.disabled,
13
- } }, h("button", { key: '92bffb8acc599eb2b3f3bc71ab99d08e7332d498', class: "button-native" }, h("slot", { key: 'cdb33b60e6b5c1bf423ee7e577d58fbcce65a64e' }))));
13
+ } }, h("button", { key: 'b13438808d69e389bc75d6f06b81a40c7561eea8', class: "button-native" }, h("slot", { key: 'e684524f4ff0ceeca466293e1fc8737cf66184e0', name: "start" }), h("slot", { key: '66a1c7fa233f85a76a7d0cc2aad74e35ce5cd3f4' }), h("slot", { key: 'e369d09a351a1d1dd0d98d3812c1b75a0e84eae0', name: "end" }))));
14
14
  }
15
15
  static get is() { return "cpsl-button"; }
16
16
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"cpsl-button.js","sourceRoot":"","sources":["../../../../src/components/cpsl-button/cpsl-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAOzD,MAAM,OAAO,UAAU;;wBAKyB,KAAK;uBAOmB,SAAS;;IAE/E,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDACH,KAAK,EAAE;gBACL,SAAS,EAAE,IAAI,CAAC,OAAO,KAAK,SAAS;gBACrC,WAAW,EAAE,IAAI,CAAC,OAAO,KAAK,WAAW;gBACzC,MAAM,EAAE,IAAI,CAAC,OAAO,KAAK,MAAM;gBAC/B,iBAAiB,EAAE,IAAI,CAAC,QAAQ;aACjC;YAED,+DAAQ,KAAK,EAAC,eAAe;gBAC3B,8DAAa,CACN,CACJ,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'cpsl-button',\n styleUrl: 'cpsl-button.scss',\n shadow: true,\n})\nexport class CpslButton {\n /**\n * If the button is disabled.\n * Default is: false.\n */\n @Prop({ reflect: true }) disabled?: boolean = false;\n\n /**\n * The variant of button.\n * Options are: `\"primary\"`, `\"secondary\", `\"icon\".\n * Default is: `\"primary\"`.\n */\n @Prop({ reflect: true }) variant?: 'primary' | 'secondary' | 'icon' = 'primary';\n\n render() {\n return (\n <Host\n class={{\n 'primary': this.variant === 'primary',\n 'secondary': this.variant === 'secondary',\n 'icon': this.variant === 'icon',\n 'button-disabled': this.disabled,\n }}\n >\n <button class=\"button-native\">\n <slot></slot>\n </button>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"cpsl-button.js","sourceRoot":"","sources":["../../../../src/components/cpsl-button/cpsl-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAOzD,MAAM,OAAO,UAAU;;wBAKyB,KAAK;uBAOmB,SAAS;;IAE/E,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDACH,KAAK,EAAE;gBACL,SAAS,EAAE,IAAI,CAAC,OAAO,KAAK,SAAS;gBACrC,WAAW,EAAE,IAAI,CAAC,OAAO,KAAK,WAAW;gBACzC,MAAM,EAAE,IAAI,CAAC,OAAO,KAAK,MAAM;gBAC/B,iBAAiB,EAAE,IAAI,CAAC,QAAQ;aACjC;YAED,+DAAQ,KAAK,EAAC,eAAe;gBAC3B,6DAAM,IAAI,EAAC,OAAO,GAAQ;gBAC1B,8DAAa;gBACb,6DAAM,IAAI,EAAC,KAAK,GAAQ,CACjB,CACJ,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'cpsl-button',\n styleUrl: 'cpsl-button.scss',\n shadow: true,\n})\nexport class CpslButton {\n /**\n * If the button is disabled.\n * Default is: false.\n */\n @Prop({ reflect: true }) disabled?: boolean = false;\n\n /**\n * The variant of button.\n * Options are: `\"primary\"`, `\"secondary\", `\"icon\".\n * Default is: `\"primary\"`.\n */\n @Prop({ reflect: true }) variant?: 'primary' | 'secondary' | 'icon' = 'primary';\n\n render() {\n return (\n <Host\n class={{\n 'primary': this.variant === 'primary',\n 'secondary': this.variant === 'secondary',\n 'icon': this.variant === 'icon',\n 'button-disabled': this.disabled,\n }}\n >\n <button class=\"button-native\">\n <slot name=\"start\"></slot>\n <slot></slot>\n <slot name=\"end\"></slot>\n </button>\n </Host>\n );\n }\n}\n"]}
@@ -87,7 +87,7 @@ export class CpslCodeInput {
87
87
  }
88
88
  render() {
89
89
  var _a;
90
- return (h(Host, { key: '1c877c2c935da7b35b291ef549d1df66aef4a999' }, h("div", { key: 'cf8bba26f01b2036ec7414f2f22113f8e270e810', class: "code-container" }, new Array(this.length).fill(0).map((_, i) => {
90
+ return (h(Host, { key: 'a71927ad671c9bcea55951797bb22fcede118d59' }, h("div", { key: '033281ae8250377ee175112f6428f412eaa339f5', class: "code-container" }, new Array(this.length).fill(0).map((_, i) => {
91
91
  var _a;
92
92
  return (h("input", { class: { 'code-input': true, 'error': Boolean(this.errorText) }, id: `code-input-${i}`, maxLength: 1, onKeyDown: ev => this.handleKeyDown(i, ev), onInput: ev => this.handleInput(i, ev), onFocus: () => this.handleFocus(i), onPaste: this.handlePaste, min: 0, max: 9, value: (_a = this.code) === null || _a === void 0 ? void 0 : _a[i], inputMode: this.type === 'number' ? 'numeric' : 'text' }));
93
93
  })), (this.errorText || this.helperText) && (h("div", { class: { 'helper-text-container': true, 'error-text': Boolean(this.errorText) } }, h("cpsl-icon", { icon: Boolean(this.errorText) ? 'alertCircle' : 'infoCircle' }), h("span", null, (_a = this.errorText) !== null && _a !== void 0 ? _a : this.helperText)))));
@@ -89,7 +89,7 @@ export class CpslCol {
89
89
  }
90
90
  render() {
91
91
  const isRTL = document.dir === 'rtl';
92
- return (h(Host, { key: 'd139326f078622312b5d8113d621049ad15ac522', style: Object.assign(Object.assign(Object.assign(Object.assign({}, this.calculateOffset(isRTL)), this.calculatePull(isRTL)), this.calculatePush(isRTL)), this.calculateSize()) }, h("slot", { key: '7dc68151a908d12d6fc2f62935e7d029539a1caf' })));
92
+ return (h(Host, { key: 'fdb8a99b8b9225949b4eea931277e461efac29eb', style: Object.assign(Object.assign(Object.assign(Object.assign({}, this.calculateOffset(isRTL)), this.calculatePull(isRTL)), this.calculatePush(isRTL)), this.calculateSize()) }, h("slot", { key: '0976c09d835a37413455f787596a75eafc1db14f' })));
93
93
  }
94
94
  static get is() { return "cpsl-col"; }
95
95
  static get encapsulation() { return "shadow"; }
@@ -1,7 +1,7 @@
1
1
  import { Host, h } from "@stencil/core";
2
2
  export class CpslDivider {
3
3
  render() {
4
- return (h(Host, { key: '3cc871a98ef7808935b3c1dbec0c6b84cbc69939' }, h("div", { key: 'ce391dc5bfd37cf3834224b7f9cae74b6d5034c4' }), h("slot", { key: '3859f266ab28d3e4a71bcc5fdbfbbfb07356df26' }), h("div", { key: '2495dfa554e635f9925fbc71703e45a0e47416ab' })));
4
+ return (h(Host, { key: '7b35806d55027d32c6f8c0e5cfcaef46f35ebd68' }, h("div", { key: '5af8157b329cfd491256537c267adbe3e15c8914' }), h("slot", { key: '913734d72f49bc1092f447326710223eb85f901e' }), h("div", { key: '47b8c8569f8e43a830bfb84636faca0df7b7e7df' })));
5
5
  }
6
6
  static get is() { return "cpsl-divider"; }
7
7
  static get encapsulation() { return "shadow"; }
@@ -0,0 +1,88 @@
1
+ :host {
2
+ display: block;
3
+ position: relative;
4
+ font-family: Arial, sans-serif;
5
+ }
6
+
7
+ .input-container {
8
+ position: relative;
9
+ width: 100%;
10
+ }
11
+
12
+ ::slotted(cpsl-dropdown) {
13
+ position: absolute;
14
+ width: 100%;
15
+ top: 100%;
16
+ left: 0;
17
+ z-index: 2;
18
+ }
19
+
20
+ .dropdown-button {
21
+ display: flex;
22
+ width: 100%;
23
+ padding: 0 4px;
24
+ background: none;
25
+ border: none;
26
+ align-items: center;
27
+ justify-content: space-between;
28
+ cursor: pointer;
29
+ white-space: nowrap;
30
+ overflow: hidden;
31
+ text-overflow: ellipsis;
32
+ font: inherit;
33
+ color: inherit;
34
+ }
35
+
36
+ .dropdown-button span {
37
+ overflow: hidden;
38
+ text-overflow: ellipsis;
39
+ white-space: nowrap;
40
+ flex-grow: 1;
41
+ }
42
+
43
+ .dropdown-button div {
44
+ margin-left: 8px;
45
+ display: flex;
46
+ align-items: center;
47
+ }
48
+
49
+ .dropdown-options {
50
+ display: none;
51
+ position: absolute;
52
+ list-style: none;
53
+ padding: 0;
54
+ margin: 0;
55
+ border: 1px solid #ccc;
56
+ background: white;
57
+ z-index: 1000;
58
+ }
59
+ .dropdown-options.open {
60
+ display: block;
61
+ border-radius: 8px;
62
+ border: 1px solid #483e3e;
63
+ }
64
+
65
+ .dropdown-options.open {
66
+ display: block;
67
+ margin-top: 20px;
68
+ }
69
+
70
+ .dropdown-options li {
71
+ padding: 6px;
72
+ cursor: pointer;
73
+ display: flex;
74
+ align-items: center;
75
+ border-bottom: 1px solid #ccc;
76
+ }
77
+
78
+ .dropdown-options li svg {
79
+ width: 24px;
80
+ height: 24px;
81
+ margin-right: 8px;
82
+ padding: 0 8px;
83
+ }
84
+
85
+ .dropdown-value {
86
+ margin-left: 8px;
87
+ color: #6c757d;
88
+ }
@@ -0,0 +1,113 @@
1
+ import { Host, h } from "@stencil/core";
2
+ import { Icons } from "../../assets/icons";
3
+ export class CpslDropdown {
4
+ constructor() {
5
+ this.toggleDropdown = () => {
6
+ this.isOpen = !this.isOpen;
7
+ };
8
+ this.selectItem = (item) => {
9
+ this.selectedItem = item;
10
+ this.toggleDropdown();
11
+ };
12
+ this.handleItemSelect = (item) => () => {
13
+ this.selectItem(item);
14
+ };
15
+ this.width = '100%';
16
+ this.isOpen = false;
17
+ this.selectedItem = undefined;
18
+ this.items = [];
19
+ }
20
+ handleOpenChange() {
21
+ if (this.isOpen) {
22
+ this.adjustPosition();
23
+ }
24
+ }
25
+ adjustPosition() {
26
+ var _a;
27
+ const dropdownOptions = this.el.shadowRoot.querySelector('.dropdown-options');
28
+ const hostRect = this.el.getBoundingClientRect();
29
+ const parentRect = (_a = this.el.parentElement) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
30
+ if (parentRect) {
31
+ this.width = `${parentRect.width}px`;
32
+ dropdownOptions.style.left = `${parentRect.left - hostRect.left}px`;
33
+ }
34
+ }
35
+ componentWillLoad() {
36
+ if (this.items.length > 0) {
37
+ this.selectedItem = this.items[0];
38
+ }
39
+ }
40
+ render() {
41
+ var _a, _b, _c;
42
+ return (h(Host, { key: '6882468bccd50b57e16ce09ca360392415c0b1ce', style: { width: this.width } }, h("button", { key: '0f34c3f861543fd6f2781adeb371f6dbbf4a7e7c', class: "dropdown-button", onClick: this.toggleDropdown }, `${((_a = this.selectedItem) === null || _a === void 0 ? void 0 : _a.selectedLabel) || ((_b = this.selectedItem) === null || _b === void 0 ? void 0 : _b.label)} ${(_c = this.selectedItem) === null || _c === void 0 ? void 0 : _c.value}`, h("div", { key: '9d266062c49e3fce689eccf57229534043d975e8', innerHTML: Icons['chevronUp'] })), h("ul", { key: 'c82c76fae351883748e0094d218cfff8261b8ed8', class: { 'dropdown-options': true, 'open': this.isOpen }, style: { width: this.width } }, this.items.map(item => h("li", { onClick: this.handleItemSelect(item) }, h("span", { innerHTML: item.icon }), item.label, " ", h("span", { class: "dropdown-value" }, item.value))))));
43
+ }
44
+ static get is() { return "cpsl-dropdown"; }
45
+ static get encapsulation() { return "shadow"; }
46
+ static get originalStyleUrls() {
47
+ return {
48
+ "$": ["cpsl-dropdown.scss"]
49
+ };
50
+ }
51
+ static get styleUrls() {
52
+ return {
53
+ "$": ["cpsl-dropdown.css"]
54
+ };
55
+ }
56
+ static get properties() {
57
+ return {
58
+ "width": {
59
+ "type": "string",
60
+ "mutable": false,
61
+ "complexType": {
62
+ "original": "string",
63
+ "resolved": "string",
64
+ "references": {}
65
+ },
66
+ "required": false,
67
+ "optional": false,
68
+ "docs": {
69
+ "tags": [],
70
+ "text": "Width of the dropdown"
71
+ },
72
+ "attribute": "width",
73
+ "reflect": false,
74
+ "defaultValue": "'100%'"
75
+ },
76
+ "items": {
77
+ "type": "unknown",
78
+ "mutable": false,
79
+ "complexType": {
80
+ "original": "Array<{ icon: string, label: string, value: string, selectedLabel?: string }>",
81
+ "resolved": "{ icon: string; label: string; value: string; selectedLabel?: string; }[]",
82
+ "references": {
83
+ "Array": {
84
+ "location": "global",
85
+ "id": "global::Array"
86
+ }
87
+ }
88
+ },
89
+ "required": false,
90
+ "optional": false,
91
+ "docs": {
92
+ "tags": [],
93
+ "text": "Items to be presented in the dropdown"
94
+ },
95
+ "defaultValue": "[]"
96
+ }
97
+ };
98
+ }
99
+ static get states() {
100
+ return {
101
+ "isOpen": {},
102
+ "selectedItem": {}
103
+ };
104
+ }
105
+ static get elementRef() { return "el"; }
106
+ static get watchers() {
107
+ return [{
108
+ "propName": "isOpen",
109
+ "methodName": "handleOpenChange"
110
+ }];
111
+ }
112
+ }
113
+ //# sourceMappingURL=cpsl-dropdown.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cpsl-dropdown.js","sourceRoot":"","sources":["../../../../src/components/cpsl-dropdown/cpsl-dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAsB,KAAK,EAAE,MAAM,eAAe,CAAC;AACpG,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAO3C,MAAM,OAAO,YAAY;;QAcf,mBAAc,GAAG,GAAG,EAAE;YAC5B,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC;QAC7B,CAAC,CAAC;QAEM,eAAU,GAAG,CAAC,IAA4E,EAAE,EAAE;YACpG,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;YACzB,IAAI,CAAC,cAAc,EAAE,CAAC;QACxB,CAAC,CAAC;QAEM,qBAAgB,GAAG,CAAC,IAA4E,EAAE,EAAE,CAAC,GAAG,EAAE;YAChH,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QACxB,CAAC,CAAA;qBApBuB,MAAM;sBACH,KAAK;;qBAM+D,EAAE;;IAgBjG,gBAAgB;QACd,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,IAAI,CAAC,cAAc,EAAE,CAAC;QACxB,CAAC;IACH,CAAC;IAEO,cAAc;;QACpB,MAAM,eAAe,GAAG,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,mBAAmB,CAAgB,CAAC;QAC7F,MAAM,QAAQ,GAAG,IAAI,CAAC,EAAE,CAAC,qBAAqB,EAAE,CAAC;QACjD,MAAM,UAAU,GAAG,MAAA,IAAI,CAAC,EAAE,CAAC,aAAa,0CAAE,qBAAqB,EAAE,CAAC;QAClE,IAAI,UAAU,EAAE,CAAC;YACf,IAAI,CAAC,KAAK,GAAG,GAAG,UAAU,CAAC,KAAK,IAAI,CAAC;YACrC,eAAe,CAAC,KAAK,CAAC,IAAI,GAAG,GAAG,UAAU,CAAC,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,CAAC;QACtE,CAAC;IACH,CAAC;IAED,iBAAiB;QACf,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC1B,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACpC,CAAC;IACH,CAAC;IAED,MAAM;;QACJ,OAAO,CACL,EAAC,IAAI,qDAAC,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE;YAChC,+DAAQ,KAAK,EAAC,iBAAiB,EAAC,OAAO,EAAE,IAAI,CAAC,cAAc;gBACzD,GAAG,CAAA,MAAA,IAAI,CAAC,YAAY,0CAAE,aAAa,MAAI,MAAA,IAAI,CAAC,YAAY,0CAAE,KAAK,CAAA,IAAI,MAAA,IAAI,CAAC,YAAY,0CAAE,KAAK,EAAE;gBAC9F,4DAAK,SAAS,EAAE,KAAK,CAAC,WAAW,CAAC,GAAI,CAC/B;YACT,2DAAI,KAAK,EAAE,EAAE,kBAAkB,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,IACvF,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CACrB,UAAI,OAAO,EAAE,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC;gBACtC,YAAM,SAAS,EAAE,IAAI,CAAC,IAAI,GAAS;gBAClC,IAAI,CAAC,KAAK;;gBAAE,YAAM,KAAK,EAAC,gBAAgB,IAAE,IAAI,CAAC,KAAK,CAAQ,CAC1D,CACN,CACE,CACA,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, State, Element, ComponentInterface, Watch } from '@stencil/core';\nimport { Icons } from '../../assets/icons';\n\n@Component({\n tag: 'cpsl-dropdown',\n styleUrl: 'cpsl-dropdown.scss',\n shadow: true,\n})\nexport class CpslDropdown implements ComponentInterface {\n @Element() el: HTMLCpslDropdownElement;\n /**\n * Width of the dropdown\n */\n @Prop() width: string = '100%';\n @State() isOpen: boolean = false;\n @State() selectedItem: { icon: string, label: string, value: string, selectedLabel?: string };\n\n /**\n * Items to be presented in the dropdown\n */\n @Prop() items: Array<{ icon: string, label: string, value: string, selectedLabel?: string }> = [];\n\n private toggleDropdown = () => {\n this.isOpen = !this.isOpen;\n };\n\n private selectItem = (item: { icon: string, label: string, value: string, selectedLabel?: string }) => {\n this.selectedItem = item;\n this.toggleDropdown();\n };\n\n private handleItemSelect = (item: { icon: string, label: string, value: string, selectedLabel?: string }) => () => {\n this.selectItem(item);\n }\n\n @Watch('isOpen')\n handleOpenChange() {\n if (this.isOpen) {\n this.adjustPosition();\n }\n }\n\n private adjustPosition() {\n const dropdownOptions = this.el.shadowRoot.querySelector('.dropdown-options') as HTMLElement;\n const hostRect = this.el.getBoundingClientRect(); \n const parentRect = this.el.parentElement?.getBoundingClientRect();\n if (parentRect) {\n this.width = `${parentRect.width}px`;\n dropdownOptions.style.left = `${parentRect.left - hostRect.left}px`;\n }\n }\n\n componentWillLoad() {\n if (this.items.length > 0) {\n this.selectedItem = this.items[0];\n }\n }\n\n render() {\n return (\n <Host style={{ width: this.width }}>\n <button class=\"dropdown-button\" onClick={this.toggleDropdown}>\n {`${this.selectedItem?.selectedLabel || this.selectedItem?.label} ${this.selectedItem?.value}`}\n <div innerHTML={Icons['chevronUp']} />\n </button>\n <ul class={{ 'dropdown-options': true, 'open': this.isOpen }} style={{ width: this.width }}>\n {this.items.map(item =>\n <li onClick={this.handleItemSelect(item)}>\n <span innerHTML={item.icon}></span>\n {item.label} <span class=\"dropdown-value\">{item.value}</span>\n </li>\n )}\n </ul>\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-dropdown', () => {
22
+ it('renders', () => __awaiter(void 0, void 0, void 0, function* () {
23
+ const page = yield newE2EPage();
24
+ yield page.setContent('<cpsl-dropdown></cpsl-dropdown>');
25
+ const element = yield page.find('cpsl-dropdown');
26
+ expect(element).toHaveClass('hydrated');
27
+ }));
28
+ });
29
+ //# sourceMappingURL=cpsl-dropdown.e2e.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cpsl-dropdown.e2e.js","sourceRoot":"","sources":["../../../../../src/components/cpsl-dropdown/test/cpsl-dropdown.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-dropdown', () => {\n it('renders', async () => {\n const page = await newE2EPage();\n await page.setContent('<cpsl-dropdown></cpsl-dropdown>');\n\n const element = await page.find('cpsl-dropdown');\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 { CpslDropdown } from "../cpsl-dropdown";
22
+ describe('cpsl-dropdown', () => {
23
+ it('renders', () => __awaiter(void 0, void 0, void 0, function* () {
24
+ const page = yield newSpecPage({
25
+ components: [CpslDropdown],
26
+ html: `<cpsl-dropdown></cpsl-dropdown>`,
27
+ });
28
+ expect(page.root).toEqualHtml(`
29
+ <cpsl-dropdown>
30
+ <mock:shadow-root>
31
+ <slot></slot>
32
+ </mock:shadow-root>
33
+ </cpsl-dropdown>
34
+ `);
35
+ }));
36
+ });
37
+ //# sourceMappingURL=cpsl-dropdown.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cpsl-dropdown.spec.js","sourceRoot":"","sources":["../../../../../src/components/cpsl-dropdown/test/cpsl-dropdown.spec.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;IAC7B,EAAE,CAAC,SAAS,EAAE,GAAS,EAAE;QACvB,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,YAAY,CAAC;YAC1B,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 { CpslDropdown } from '../cpsl-dropdown';\n\ndescribe('cpsl-dropdown', () => {\n it('renders', async () => {\n const page = await newSpecPage({\n components: [CpslDropdown],\n html: `<cpsl-dropdown></cpsl-dropdown>`,\n });\n expect(page.root).toEqualHtml(`\n <cpsl-dropdown>\n <mock:shadow-root>\n <slot></slot>\n </mock:shadow-root>\n </cpsl-dropdown>\n `);\n });\n});\n"]}
@@ -4,9 +4,9 @@ export class CpslGrid {
4
4
  this.fixed = false;
5
5
  }
6
6
  render() {
7
- return (h(Host, { key: 'b0a1f06f9b42d8221691fbebca0af4fd18c5961d', class: {
7
+ return (h(Host, { key: 'ad08de3e168770731291ad1fd2ddffcac4ca6145', class: {
8
8
  'grid-fixed': this.fixed,
9
- } }, h("slot", { key: '7d7ed9333ccf1fcd93d6327e7ba1d430054b1230' })));
9
+ } }, h("slot", { key: '0c93c6a07b6acfaa4bd50c6edabbae30e37ed09d' })));
10
10
  }
11
11
  static get is() { return "cpsl-grid"; }
12
12
  static get encapsulation() { return "shadow"; }
@@ -58,6 +58,8 @@
58
58
  --height: 24px;
59
59
  --width: 24px;
60
60
  --icon-color: var(--cpsl-color-text-primary);
61
+ --icon-fill-color: var(--cpsl-color-text-primary);
62
+ --icon-stroke-color: var(--cpsl-color-text-primary);
61
63
  width: var(--width);
62
64
  height: var(--height);
63
65
  }
@@ -73,6 +75,18 @@
73
75
  width: var(--width);
74
76
  height: var(--height);
75
77
  }
78
+ :host svg .background-16 {
79
+ fill: var(--cpsl-color-background-16);
80
+ }
81
+ :host svg .foreground-0 {
82
+ fill: var(--cpsl-color-foreground-0);
83
+ }
84
+ :host svg .fill {
85
+ fill: var(--icon-fill-color);
86
+ }
87
+ :host svg .stroke {
88
+ stroke: var(--icon-stroke-color);
89
+ }
76
90
 
77
91
  :host img {
78
92
  width: var(--width);
@@ -6,7 +6,7 @@ export class CpslIcon {
6
6
  this.icon = undefined;
7
7
  }
8
8
  render() {
9
- return (h(Host, { key: '314f7ee70c5ba6a2d70a15fd3e0ed3510140d640', part: "icon", role: "img" }, !Boolean(this.icon) ? h("img", { src: this.src }) : h("div", { innerHTML: Icons[this.icon] })));
9
+ return (h(Host, { key: '89f3081baf013558e965cc6682811d66dc2b188d', part: "icon", role: "img" }, !Boolean(this.icon) ? h("img", { src: this.src }) : h("div", { innerHTML: Icons[this.icon] })));
10
10
  }
11
11
  static get is() { return "cpsl-icon"; }
12
12
  static get encapsulation() { return "shadow"; }
@@ -20,7 +20,6 @@ export class CpslIcon {
20
20
  "$": ["cpsl-icon.css"]
21
21
  };
22
22
  }
23
- static get assetsDirs() { return ["../assets"]; }
24
23
  static get properties() {
25
24
  return {
26
25
  "src": {
@@ -45,7 +44,7 @@ export class CpslIcon {
45
44
  "mutable": false,
46
45
  "complexType": {
47
46
  "original": "IconType",
48
- "resolved": "\"alertCircle\" | \"angelListBrand\" | \"angelList\" | \"appleBrand\" | \"apple\" | \"arrowNarrow\" | \"arrow\" | \"backupKit\" | \"capsuleLogo\" | \"capsuleRings\" | \"capsule\" | \"check\" | \"clock\" | \"close\" | \"clubhouseBrand\" | \"clubhouse\" | \"copy\" | \"discordBrand\" | \"discord\" | \"downloadCloud\" | \"dribbbleBrand\" | \"dribbble\" | \"eyeOff\" | \"eye\" | \"facebookBrand\" | \"facebook\" | \"figmaBrand\" | \"figma\" | \"githubBrand\" | \"github\" | \"googleBrand\" | \"google\" | \"helpCircle\" | \"heroEmail\" | \"heroLock\" | \"heroPasskey\" | \"heroPhone\" | \"heroWallet\" | \"infoCircle\" | \"instagramBrand\" | \"instagram\" | \"key\" | \"linkedinBrand\" | \"linkedin\" | \"mail\" | \"moreLoginOptionsDark\" | \"moreLoginOptions\" | \"phone\" | \"pintrestBrand\" | \"pintrest\" | \"redditBrand\" | \"reddit\" | \"signalBrand\" | \"signal\" | \"snapchatBrand\" | \"snapchat\" | \"telegramBrand\" | \"telegram\" | \"tikTokBrand\" | \"tikTok\" | \"tumblrBrand\" | \"tumblr\" | \"twitterBrand\" | \"twitter\" | \"youtubeBrand\" | \"youtube\"",
47
+ "resolved": "\"key\" | \"alertCircle\" | \"angelListBrand\" | \"angelList\" | \"appleBrand\" | \"apple\" | \"arrowNarrow\" | \"arrow\" | \"backupKit\" | \"capsuleLogo\" | \"capsuleRingsDark\" | \"capsuleRings\" | \"capsule\" | \"check\" | \"chevronUp\" | \"clock\" | \"close\" | \"clubhouseBrand\" | \"clubhouse\" | \"copy\" | \"discordBrand\" | \"discord\" | \"downloadCloud\" | \"dribbbleBrand\" | \"dribbble\" | \"eyeOff\" | \"eye\" | \"facebookBrand\" | \"facebook\" | \"figmaBrand\" | \"figma\" | \"githubBrand\" | \"github\" | \"googleBrand\" | \"google\" | \"helpCircle\" | \"heroEmail\" | \"heroLock\" | \"heroPasskey\" | \"heroPhone\" | \"heroWallet\" | \"infoCircle\" | \"instagramBrand\" | \"instagram\" | \"linkedinBrand\" | \"linkedin\" | \"mail\" | \"moreLoginOptions\" | \"phone\" | \"pintrestBrand\" | \"pintrest\" | \"plusCircle\" | \"redditBrand\" | \"reddit\" | \"signalBrand\" | \"signal\" | \"snapchatBrand\" | \"snapchat\" | \"telegramBrand\" | \"telegram\" | \"tikTokBrand\" | \"tikTok\" | \"tumblrBrand\" | \"tumblr\" | \"twitterBrand\" | \"twitter\" | \"wallet\" | \"youtubeBrand\" | \"youtube\"",
49
48
  "references": {
50
49
  "IconType": {
51
50
  "location": "import",
@@ -1 +1 @@
1
- {"version":3,"file":"cpsl-icon.js","sourceRoot":"","sources":["../../../../src/components/cpsl-icon/cpsl-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAEzD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAQ3C,MAAM,OAAO,QAAQ;;;;;IAWnB,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,KAAK,IACzB,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,WAAK,GAAG,EAAE,IAAI,CAAC,GAAG,GAAI,CAAC,CAAC,CAAC,WAAK,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAI,CAC/E,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop } from '@stencil/core';\nimport { IconType } from '../../interface';\nimport { Icons } from '../../assets/icons';\n\n@Component({\n tag: 'cpsl-icon',\n styleUrl: 'cpsl-icon.scss',\n shadow: true,\n assetsDirs: ['../assets'],\n})\nexport class CpslIcon {\n /**\n * The external source of the icon. If both `icon` and `src` are provided, `icon` will be used.\n */\n @Prop() src?: string;\n\n /**\n * The name of the icon. If both `icon` and `src` are provided, `icon` will be used.\n */\n @Prop() icon?: IconType;\n\n render() {\n return (\n <Host part=\"icon\" role=\"img\">\n {!Boolean(this.icon) ? <img src={this.src} /> : <div innerHTML={Icons[this.icon]} />}\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"cpsl-icon.js","sourceRoot":"","sources":["../../../../src/components/cpsl-icon/cpsl-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAEzD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAO3C,MAAM,OAAO,QAAQ;;;;;IAWnB,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,KAAK,IACzB,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,WAAK,GAAG,EAAE,IAAI,CAAC,GAAG,GAAI,CAAC,CAAC,CAAC,WAAK,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAI,CAC/E,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop } from '@stencil/core';\nimport { IconType } from '../../interface';\nimport { Icons } from '../../assets/icons';\n\n@Component({\n tag: 'cpsl-icon',\n styleUrl: 'cpsl-icon.scss',\n shadow: true,\n})\nexport class CpslIcon {\n /**\n * The external source of the icon. If both `icon` and `src` are provided, `icon` will be used.\n */\n @Prop() src?: string;\n\n /**\n * The name of the icon. If both `icon` and `src` are provided, `icon` will be used.\n */\n @Prop() icon?: IconType;\n\n render() {\n return (\n <Host part=\"icon\" role=\"img\">\n {!Boolean(this.icon) ? <img src={this.src} /> : <div innerHTML={Icons[this.icon]} />}\n </Host>\n );\n }\n}\n"]}
@@ -71,7 +71,7 @@
71
71
  padding-top: var(--box-padding-top);
72
72
  padding-bottom: var(--box-padding-bottom);
73
73
  display: flex;
74
- background-color: var(--cpsl-color-background-subtle);
74
+ background-color: var(--cpsl-color-background-secondary);
75
75
  border: var(--box-border-width) solid var(--cpsl-color-input-border-placeholder);
76
76
  border-radius: var(--box-border-radius);
77
77
  }
@@ -1,7 +1,7 @@
1
1
  import { Host, h } from "@stencil/core";
2
2
  export class CpslInfoBox {
3
3
  render() {
4
- return (h(Host, { key: '17a3490640f95a341c0942188979b2cb82f37da1' }, h("div", { key: '51c7731b3e11119e3fcb96f5ef2f47ffd71ba097', class: "info-box-container" }, h("slot", { key: '82bfc871c4fb3856e553637514806435473f4728' }))));
4
+ return (h(Host, { key: 'c3adc346763da83e631c71bbc4f1ce7aad99ba04' }, h("div", { key: 'c03ce70d8c94d42264216c1376d81f8601a45656', class: "info-box-container" }, h("slot", { key: '3ae35495b7371479d0ad8e731011fb8b06a2c0d9' }))));
5
5
  }
6
6
  static get is() { return "cpsl-info-box"; }
7
7
  static get encapsulation() { return "shadow"; }
@@ -72,16 +72,16 @@
72
72
  --input-background-color-disabled: var(--cpsl-color-input-surface-disabled);
73
73
  --input-color: var(--cpsl-color-text-primary);
74
74
  --input-placeholder-color: var(--cpsl-color-text-secondary);
75
- --input-font-size: clamp(16px, 1rem, 24px);
75
+ --input-font-size: var(--cpsl-font-size-body-m);
76
76
  --label-color: var(--cpsl-color-text-primary);
77
- --label-font-size: clamp(14px, 0.875rem, 21px);
77
+ --label-font-size: var(--cpsl-font-size-body-s);
78
78
  --label-margin-bottom: 5px;
79
79
  --helper-text-color: var(--cpsl-color-text-secondary);
80
80
  --helper-text-error-color: var(--cpsl-color-text-error);
81
81
  --helper-text-icon-color: var(--cpsl-color-text-secondary);
82
82
  --helper-text-icon-error-color: var(--cpsl-color-text-error);
83
83
  --helper-text-icon-size: 16px;
84
- --helper-text-font-size: clamp(14px, 0.875rem, 21px);
84
+ --helper-text-font-size: var(--cpsl-font-size-body-xs);
85
85
  --helper-text-margin-top: 8px;
86
86
  display: block;
87
87
  font-family: var(--cpsl-font-family, inherit);
@@ -93,13 +93,17 @@
93
93
  --input-color: var(--cpsl-color-text-secondary);
94
94
  }
95
95
 
96
- :host(.focused) {
97
- --container-box-shadow: 0px 0px 0px 2px var(--container-box-shadow-color);
98
- }
99
-
100
96
  :host(:not(.has-value)) {
101
97
  --container-border-color: var(--cpsl-color-input-border-placeholder);
102
98
  --input-color: var(--cpsl-color-text-secondary);
99
+ --container-background-color: transparent;
100
+ --input-background-color: transparent;
101
+ }
102
+
103
+ :host(.focused) {
104
+ --container-box-shadow: 0px 0px 0px 2px var(--container-box-shadow-color);
105
+ --container-border-color: var(--cpsl-color-input-border-active);
106
+ --container-background-color: var(--cpsl-color-input-surface-default);
103
107
  }
104
108
 
105
109
  .input-container {
@@ -186,4 +190,5 @@
186
190
  }
187
191
  :host ::slotted(cpsl-button) {
188
192
  width: calc(var(--container-height) - var(--container-padding-top) - var(--container-padding-bottom) - var(--container-border-width) * 2);
193
+ --button-border-radius: calc(var(--container-border-radius) - 2px);
189
194
  }
@@ -74,14 +74,16 @@ export class CpslInput {
74
74
  }
75
75
  }
76
76
  disableSlots() {
77
+ var _a, _b;
77
78
  if (!this.noAutoDisable) {
78
- this.el.querySelector('[slot="end"]').setAttribute('disabled', 'true');
79
- this.el.querySelector('[slot="start"]').setAttribute('disabled', 'true');
79
+ (_a = this.el.querySelector('[slot="end"]')) === null || _a === void 0 ? void 0 : _a.setAttribute('disabled', 'true');
80
+ (_b = this.el.querySelector('[slot="start"]')) === null || _b === void 0 ? void 0 : _b.setAttribute('disabled', 'true');
80
81
  }
81
82
  }
82
83
  enableSlots() {
83
- this.el.querySelector('[slot="end"]').setAttribute('disabled', 'false');
84
- this.el.querySelector('[slot="start"]').setAttribute('disabled', 'false');
84
+ var _a, _b;
85
+ (_a = this.el.querySelector('[slot="end"]')) === null || _a === void 0 ? void 0 : _a.setAttribute('disabled', 'false');
86
+ (_b = this.el.querySelector('[slot="start"]')) === null || _b === void 0 ? void 0 : _b.setAttribute('disabled', 'false');
85
87
  }
86
88
  emitInputChange(event) {
87
89
  const { value } = this;
@@ -99,7 +101,7 @@ export class CpslInput {
99
101
  }
100
102
  render() {
101
103
  var _a;
102
- return (h(Host, { key: '2627de83fa1973eac8002f4807c4f2319a7541cf', class: { 'disabled': this.disabled, 'focused': this.hasFocus, 'has-value': Boolean(this.focusedValue) || Boolean(this.value) } }, this.label && (h("label", { class: "label", htmlFor: this.inputId }, this.label)), h("div", { key: '9f2eaa8fe2a2fa67dcd61e69cd43698c33829d48', onClick: this.focusInput, class: { 'input-container': true, 'error-container': Boolean(this.errorText) } }, h("slot", { key: 'cc4d99747dcc55aa2dc27a58244bd0dbdc872332', name: "start" }), h("input", { key: '52ba9b2248af07ee072628fd0207d1b965d44829', class: "native-input", id: this.inputId, disabled: this.disabled, autoCapitalize: this.autocapitalize, autoComplete: this.autocomplete, autoCorrect: this.autocorrect, autoFocus: this.autofocus, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, min: this.min, max: this.max, minLength: this.minlength, maxLength: this.maxlength, multiple: this.multiple, name: this.name, pattern: this.pattern, placeholder: this.placeholder || '', readOnly: this.readonly, required: this.required, spellcheck: this.spellcheck, type: this.type, value: this.value, onInput: this.onInput, onChange: this.onChange, onFocus: this.onFocus, onBlur: this.onBlur }), h("slot", { key: 'b15d92b44f321351e3a8465b7c7c3409305e0196', name: "end" })), (this.errorText || this.helperText) && (h("div", { class: { 'helper-text-container': true, 'error-text': Boolean(this.errorText) } }, h("cpsl-icon", { icon: Boolean(this.errorText) ? 'alertCircle' : 'infoCircle' }), h("span", null, (_a = this.errorText) !== null && _a !== void 0 ? _a : this.helperText)))));
104
+ return (h(Host, { key: '3e1a55cf2869a31c54ab03c3ecf2bae84ef5031b', class: { 'disabled': this.disabled, 'focused': this.hasFocus, 'has-value': Boolean(this.focusedValue) || Boolean(this.value) } }, this.label && (h("label", { class: "label", htmlFor: this.inputId }, this.label)), h("div", { key: '00a7a2d2dde66c610a9626044aae8ed75b9e9bf3', onClick: this.focusInput, class: { 'input-container': true, 'error-container': Boolean(this.errorText) } }, h("slot", { key: 'aefa6ccf3ca17216da5a657e104f471109836c78', name: "start" }), h("input", { key: '86e8426bff08ead8595bd40086fc7e5fc3c67295', class: "native-input", id: this.inputId, disabled: this.disabled, autoCapitalize: this.autocapitalize, autoComplete: this.autocomplete, autoCorrect: this.autocorrect, autoFocus: this.autofocus, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, min: this.min, max: this.max, minLength: this.minlength, maxLength: this.maxlength, multiple: this.multiple, name: this.name, pattern: this.pattern, placeholder: this.placeholder || '', readOnly: this.readonly, required: this.required, spellcheck: this.spellcheck, type: this.type, value: this.value, onInput: this.onInput, onChange: this.onChange, onFocus: this.onFocus, onBlur: this.onBlur }), h("slot", { key: '246e05dbbc4740ce09bd9b4bba779eb0d1010882', name: "end" })), (this.errorText || this.helperText) && (h("div", { class: { 'helper-text-container': true, 'error-text': Boolean(this.errorText) } }, h("cpsl-icon", { icon: Boolean(this.errorText) ? 'alertCircle' : 'infoCircle' }), h("span", null, (_a = this.errorText) !== null && _a !== void 0 ? _a : this.helperText)))));
103
105
  }
104
106
  static get is() { return "cpsl-input"; }
105
107
  static get encapsulation() { return "shadow"; }
@@ -526,7 +528,7 @@ export class CpslInput {
526
528
  "mutable": false,
527
529
  "complexType": {
528
530
  "original": "IconType",
529
- "resolved": "\"alertCircle\" | \"angelListBrand\" | \"angelList\" | \"appleBrand\" | \"apple\" | \"arrowNarrow\" | \"arrow\" | \"backupKit\" | \"capsuleLogo\" | \"capsuleRings\" | \"capsule\" | \"check\" | \"clock\" | \"close\" | \"clubhouseBrand\" | \"clubhouse\" | \"copy\" | \"discordBrand\" | \"discord\" | \"downloadCloud\" | \"dribbbleBrand\" | \"dribbble\" | \"eyeOff\" | \"eye\" | \"facebookBrand\" | \"facebook\" | \"figmaBrand\" | \"figma\" | \"githubBrand\" | \"github\" | \"googleBrand\" | \"google\" | \"helpCircle\" | \"heroEmail\" | \"heroLock\" | \"heroPasskey\" | \"heroPhone\" | \"heroWallet\" | \"infoCircle\" | \"instagramBrand\" | \"instagram\" | \"key\" | \"linkedinBrand\" | \"linkedin\" | \"mail\" | \"moreLoginOptionsDark\" | \"moreLoginOptions\" | \"phone\" | \"pintrestBrand\" | \"pintrest\" | \"redditBrand\" | \"reddit\" | \"signalBrand\" | \"signal\" | \"snapchatBrand\" | \"snapchat\" | \"telegramBrand\" | \"telegram\" | \"tikTokBrand\" | \"tikTok\" | \"tumblrBrand\" | \"tumblr\" | \"twitterBrand\" | \"twitter\" | \"youtubeBrand\" | \"youtube\"",
531
+ "resolved": "\"key\" | \"alertCircle\" | \"angelListBrand\" | \"angelList\" | \"appleBrand\" | \"apple\" | \"arrowNarrow\" | \"arrow\" | \"backupKit\" | \"capsuleLogo\" | \"capsuleRingsDark\" | \"capsuleRings\" | \"capsule\" | \"check\" | \"chevronUp\" | \"clock\" | \"close\" | \"clubhouseBrand\" | \"clubhouse\" | \"copy\" | \"discordBrand\" | \"discord\" | \"downloadCloud\" | \"dribbbleBrand\" | \"dribbble\" | \"eyeOff\" | \"eye\" | \"facebookBrand\" | \"facebook\" | \"figmaBrand\" | \"figma\" | \"githubBrand\" | \"github\" | \"googleBrand\" | \"google\" | \"helpCircle\" | \"heroEmail\" | \"heroLock\" | \"heroPasskey\" | \"heroPhone\" | \"heroWallet\" | \"infoCircle\" | \"instagramBrand\" | \"instagram\" | \"linkedinBrand\" | \"linkedin\" | \"mail\" | \"moreLoginOptions\" | \"phone\" | \"pintrestBrand\" | \"pintrest\" | \"plusCircle\" | \"redditBrand\" | \"reddit\" | \"signalBrand\" | \"signal\" | \"snapchatBrand\" | \"snapchat\" | \"telegramBrand\" | \"telegram\" | \"tikTokBrand\" | \"tikTok\" | \"tumblrBrand\" | \"tumblr\" | \"twitterBrand\" | \"twitter\" | \"wallet\" | \"youtubeBrand\" | \"youtube\"",
530
532
  "references": {
531
533
  "IconType": {
532
534
  "location": "import",