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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (229) hide show
  1. package/css/capsule-core.css +84 -15
  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-0d0a0037.entry.js → p-70f95c93.entry.js} +2 -2
  16. package/dist/capsule/{p-0d0a0037.entry.js.map → p-70f95c93.entry.js.map} +1 -1
  17. package/dist/capsule/p-86e6cba5.entry.js +10 -0
  18. package/dist/capsule/{p-d28b96ba.entry.js.map → p-86e6cba5.entry.js.map} +1 -1
  19. package/dist/capsule/p-dd596431.entry.js +29 -0
  20. package/dist/capsule/p-dd596431.entry.js.map +1 -0
  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} +645 -95
  30. package/dist/cjs/cpsl-alert_33.cjs.entry.js.map +1 -0
  31. package/dist/cjs/cpsl-animation.cjs.entry.js +2 -2
  32. package/dist/cjs/cpsl-col.cjs.entry.js +2 -2
  33. package/dist/cjs/cpsl-grid.cjs.entry.js +3 -3
  34. package/dist/cjs/cpsl-info-box.cjs.entry.js +3 -3
  35. package/dist/cjs/cpsl-info-box.cjs.entry.js.map +1 -1
  36. package/dist/cjs/cpsl-modal-v2.cjs.entry.js +55 -0
  37. package/dist/cjs/cpsl-modal-v2.cjs.entry.js.map +1 -0
  38. package/dist/cjs/cpsl-row.cjs.entry.js +2 -2
  39. package/dist/cjs/index-85125285.js +1414 -0
  40. package/dist/cjs/index-85125285.js.map +1 -0
  41. package/dist/cjs/index.cjs.js +16 -4
  42. package/dist/cjs/index.cjs.js.map +1 -1
  43. package/dist/cjs/loader.cjs.js +2 -2
  44. package/dist/collection/assets/icons/brush.svg +3 -0
  45. package/dist/collection/assets/icons/chevron-up.svg +2 -2
  46. package/dist/collection/assets/icons/close.svg +3 -4
  47. package/dist/collection/assets/icons/cube.svg +3 -0
  48. package/dist/collection/assets/icons/file.svg +3 -0
  49. package/dist/collection/assets/icons/image.svg +3 -0
  50. package/dist/collection/assets/icons/index.js +10 -1
  51. package/dist/collection/assets/icons/index.js.map +1 -1
  52. package/dist/collection/assets/icons/lightning-01.svg +3 -0
  53. package/dist/collection/assets/icons/lightning.svg +2 -2
  54. package/dist/collection/assets/icons/menu.svg +3 -0
  55. package/dist/collection/assets/icons/refresh.svg +3 -0
  56. package/dist/collection/assets/icons/stars.svg +4 -0
  57. package/dist/collection/assets/icons/x.svg +3 -0
  58. package/dist/collection/collection-manifest.json +7 -2
  59. package/dist/collection/components/cpsl-alert/cpsl-alert.js +2 -2
  60. package/dist/collection/components/cpsl-alert/cpsl-alert.js.map +1 -1
  61. package/dist/collection/components/cpsl-animation/cpsl-animation.js +1 -1
  62. package/dist/collection/components/cpsl-app-bar/cpsl-app-bar.js +20 -4
  63. package/dist/collection/components/cpsl-app-bar/cpsl-app-bar.js.map +1 -1
  64. package/dist/collection/components/cpsl-avatar/cpsl-avatar.js +1 -1
  65. package/dist/collection/components/cpsl-button/cpsl-button.css +113 -17
  66. package/dist/collection/components/cpsl-button/cpsl-button.js +63 -7
  67. package/dist/collection/components/cpsl-button/cpsl-button.js.map +1 -1
  68. package/dist/collection/components/cpsl-button-group/cpsl-button-group.css +1 -0
  69. package/dist/collection/components/cpsl-button-group/cpsl-button-group.js +1 -1
  70. package/dist/collection/components/cpsl-card/cpsl-card.css +1 -1
  71. package/dist/collection/components/cpsl-card/cpsl-card.js +1 -1
  72. package/dist/collection/components/cpsl-card/cpsl-card.js.map +1 -1
  73. package/dist/collection/components/cpsl-checkbox/cpsl-checkbox.css +2 -2
  74. package/dist/collection/components/cpsl-checkbox/cpsl-checkbox.js +1 -1
  75. package/dist/collection/components/cpsl-code-input/cpsl-code-input.css +1 -1
  76. package/dist/collection/components/cpsl-code-input/cpsl-code-input.js +2 -2
  77. package/dist/collection/components/cpsl-code-input/cpsl-code-input.js.map +1 -1
  78. package/dist/collection/components/cpsl-col/cpsl-col.js +1 -1
  79. package/dist/collection/components/cpsl-divider/cpsl-divider.css +1 -1
  80. package/dist/collection/components/cpsl-divider/cpsl-divider.js +1 -1
  81. package/dist/collection/components/cpsl-drawer/cpsl-drawer.js +84 -11
  82. package/dist/collection/components/cpsl-drawer/cpsl-drawer.js.map +1 -1
  83. package/dist/collection/components/cpsl-dropdown/cpsl-dropdown.js +1 -1
  84. package/dist/collection/components/cpsl-dropdown/cpsl-dropdown.js.map +1 -1
  85. package/dist/collection/components/cpsl-file-upload/cpsl-file-upload.css +210 -0
  86. package/dist/collection/components/cpsl-file-upload/cpsl-file-upload.js +406 -0
  87. package/dist/collection/components/cpsl-file-upload/cpsl-file-upload.js.map +1 -0
  88. package/dist/collection/components/cpsl-file-upload/test/cpsl-file-upload.e2e.js +29 -0
  89. package/dist/collection/components/cpsl-file-upload/test/cpsl-file-upload.e2e.js.map +1 -0
  90. package/dist/collection/components/cpsl-file-upload/test/cpsl-file-upload.spec.js +37 -0
  91. package/dist/collection/components/cpsl-file-upload/test/cpsl-file-upload.spec.js.map +1 -0
  92. package/dist/collection/components/cpsl-grid/cpsl-grid.js +2 -2
  93. package/dist/collection/components/cpsl-icon/cpsl-icon.js +2 -2
  94. package/dist/collection/components/cpsl-info-box/cpsl-info-box.css +1 -1
  95. package/dist/collection/components/cpsl-info-box/cpsl-info-box.js +1 -1
  96. package/dist/collection/components/cpsl-input/cpsl-input.css +7 -6
  97. package/dist/collection/components/cpsl-input/cpsl-input.js +3 -8
  98. package/dist/collection/components/cpsl-input/cpsl-input.js.map +1 -1
  99. package/dist/collection/components/cpsl-modal/cpsl-modal.css +4 -4
  100. package/dist/collection/components/cpsl-modal/cpsl-modal.js +1 -0
  101. package/dist/collection/components/cpsl-modal/cpsl-modal.js.map +1 -1
  102. package/dist/collection/components/cpsl-modal-v2/cpsl-modal-v2.css +91 -0
  103. package/dist/collection/components/cpsl-modal-v2/cpsl-modal-v2.js +224 -0
  104. package/dist/collection/components/cpsl-modal-v2/cpsl-modal-v2.js.map +1 -0
  105. package/dist/collection/components/cpsl-modal-v2/test/cpsl-modal-v2.e2e.js +29 -0
  106. package/dist/collection/components/cpsl-modal-v2/test/cpsl-modal-v2.e2e.js.map +1 -0
  107. package/dist/collection/components/cpsl-modal-v2/test/cpsl-modal-v2.spec.js +37 -0
  108. package/dist/collection/components/cpsl-modal-v2/test/cpsl-modal-v2.spec.js.map +1 -0
  109. package/dist/collection/components/cpsl-nav-button-group/cpsl-nav-button-group.js +1 -1
  110. package/dist/collection/components/cpsl-overlay/cpsl-overlay.css +1 -1
  111. package/dist/collection/components/cpsl-overlay/cpsl-overlay.js +1 -1
  112. package/dist/collection/components/cpsl-pagination/cpsl-pagination.js +1 -1
  113. package/dist/collection/components/cpsl-pill/cpsl-pill.css +1 -1
  114. package/dist/collection/components/cpsl-pill/cpsl-pill.js +1 -1
  115. package/dist/collection/components/cpsl-popover/cpsl-popover.css +98 -0
  116. package/dist/collection/components/cpsl-popover/cpsl-popover.js +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 +427 -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 +25 -64
  149. package/dist/collection/components/cpsl-table/cpsl-table.js +1 -63
  150. package/dist/collection/components/cpsl-table/cpsl-table.js.map +1 -1
  151. package/dist/collection/components/cpsl-tabs/cpsl-tabs.css +2 -2
  152. package/dist/collection/components/cpsl-tabs/cpsl-tabs.js +1 -1
  153. package/dist/collection/components/cpsl-text/cpsl-text.css +4 -0
  154. package/dist/collection/components/cpsl-text/cpsl-text.js +5 -4
  155. package/dist/collection/components/cpsl-text/cpsl-text.js.map +1 -1
  156. package/dist/collection/components/cpsl-tile-button/cpsl-tile-button.css +1 -1
  157. package/dist/collection/components/cpsl-tile-button/cpsl-tile-button.js +2 -2
  158. package/dist/collection/constants.js +2 -2
  159. package/dist/collection/constants.js.map +1 -1
  160. package/dist/collection/index.js.map +1 -1
  161. package/dist/collection/interface.js.map +1 -1
  162. package/dist/collection/utils/theme/generateBorderRadii.js +4 -0
  163. package/dist/collection/utils/theme/generateBorderRadii.js.map +1 -1
  164. package/dist/collection/utils/theme/generatePalette.js +11 -3
  165. package/dist/collection/utils/theme/generatePalette.js.map +1 -1
  166. package/dist/esm/capsule.js +11 -11
  167. package/dist/esm/capsule.js.map +1 -1
  168. package/dist/esm/{constants-6acf4ea8.js → constants-fce138fa.js} +3 -3
  169. package/dist/esm/{constants-6acf4ea8.js.map → constants-fce138fa.js.map} +1 -1
  170. package/dist/esm/{cpsl-alert_29.entry.js → cpsl-alert_33.entry.js} +642 -96
  171. package/dist/esm/cpsl-alert_33.entry.js.map +1 -0
  172. package/dist/esm/cpsl-animation.entry.js +2 -2
  173. package/dist/esm/cpsl-col.entry.js +2 -2
  174. package/dist/esm/cpsl-grid.entry.js +3 -3
  175. package/dist/esm/cpsl-info-box.entry.js +3 -3
  176. package/dist/esm/cpsl-info-box.entry.js.map +1 -1
  177. package/dist/esm/cpsl-modal-v2.entry.js +51 -0
  178. package/dist/esm/cpsl-modal-v2.entry.js.map +1 -0
  179. package/dist/esm/cpsl-row.entry.js +2 -2
  180. package/dist/esm/index-b9a060b3.js +1383 -0
  181. package/dist/esm/index-b9a060b3.js.map +1 -0
  182. package/dist/esm/index.js +16 -4
  183. package/dist/esm/index.js.map +1 -1
  184. package/dist/esm/loader.js +3 -3
  185. package/dist/loader/cdn.js +1 -3
  186. package/dist/loader/index.cjs.js +1 -3
  187. package/dist/loader/index.es2017.js +1 -3
  188. package/dist/loader/index.js +1 -3
  189. package/dist/types/assets/icons/index.d.ts +9 -0
  190. package/dist/types/components/cpsl-app-bar/cpsl-app-bar.d.ts +1 -0
  191. package/dist/types/components/cpsl-button/cpsl-button.d.ts +4 -1
  192. package/dist/types/components/cpsl-drawer/cpsl-drawer.d.ts +10 -1
  193. package/dist/types/components/cpsl-file-upload/cpsl-file-upload.d.ts +34 -0
  194. package/dist/types/components/cpsl-input/cpsl-input.d.ts +1 -1
  195. package/dist/types/components/cpsl-modal-v2/cpsl-modal-v2.d.ts +17 -0
  196. package/dist/types/components/cpsl-popover/cpsl-popover.d.ts +35 -0
  197. package/dist/types/components/cpsl-select/cpsl-select.d.ts +41 -0
  198. package/dist/types/components/cpsl-select-item/cpsl-select-item.d.ts +8 -0
  199. package/dist/types/components/cpsl-table/cpsl-table.d.ts +0 -3
  200. package/dist/types/components/cpsl-text/cpsl-text.d.ts +1 -1
  201. package/dist/types/components.d.ts +596 -28
  202. package/dist/types/constants.d.ts +2 -2
  203. package/dist/types/index.d.ts +1 -1
  204. package/dist/types/interface.d.ts +44 -0
  205. package/dist/types/stencil-public-runtime.d.ts +3 -8
  206. package/package.json +2 -3
  207. package/dist/capsule/p-4d8e4d86.entry.js +0 -29
  208. package/dist/capsule/p-4d8e4d86.entry.js.map +0 -1
  209. package/dist/capsule/p-86e48e61.js +0 -3
  210. package/dist/capsule/p-86e48e61.js.map +0 -1
  211. package/dist/capsule/p-ad14a817.entry.js +0 -2
  212. package/dist/capsule/p-b6b38e73.js +0 -2
  213. package/dist/capsule/p-b6b38e73.js.map +0 -1
  214. package/dist/capsule/p-d28b96ba.entry.js +0 -10
  215. package/dist/capsule/p-fcead80b.entry.js +0 -2
  216. package/dist/cjs/cpsl-alert_29.cjs.entry.js.map +0 -1
  217. package/dist/cjs/index-5733071e.js +0 -2020
  218. package/dist/cjs/index-5733071e.js.map +0 -1
  219. package/dist/collection/components/cpsl-table/table-interface.js +0 -2
  220. package/dist/collection/components/cpsl-table/table-interface.js.map +0 -1
  221. package/dist/esm/cpsl-alert_29.entry.js.map +0 -1
  222. package/dist/esm/index-8fe9f35e.js +0 -1990
  223. package/dist/esm/index-8fe9f35e.js.map +0 -1
  224. package/dist/esm/polyfills/core-js.js +0 -11
  225. package/dist/esm/polyfills/dom.js +0 -79
  226. package/dist/esm/polyfills/es5-html-element.js +0 -1
  227. package/dist/esm/polyfills/index.js +0 -34
  228. package/dist/esm/polyfills/system.js +0 -6
  229. package/dist/types/components/cpsl-table/table-interface.d.ts +0 -19
@@ -54,7 +54,6 @@
54
54
  * }
55
55
  */
56
56
  :host {
57
- --container-background-radius: var(--cpsl-border-radius-table-container);
58
57
  --container-border-radius: var(--cpsl-border-radius-table-container);
59
58
  --container-border-color: var(--cpsl-color-background-16);
60
59
  --container-background-color: var(--cpsl-color-background-0);
@@ -63,14 +62,14 @@
63
62
  --container-header-padding-bottom: 24px;
64
63
  --container-header-padding-start: 24px;
65
64
  --container-header-padding-end: 24px;
66
- --container-no-content-padding-top: 24px;
67
- --container-no-content-padding-bottom: 24px;
68
- --container-no-content-padding-start: 24px;
69
- --container-no-content-padding-end: 24px;
65
+ --container-header-border-width: 1px;
66
+ --container-header-border-color: var(--cpsl-color-background-16);
70
67
  --container-footer-padding-top: 16px;
71
68
  --container-footer-padding-bottom: 16px;
72
69
  --container-footer-padding-start: 24px;
73
70
  --container-footer-padding-end: 24px;
71
+ --container-footer-border-width: 1px;
72
+ --container-footer-border-color: var(--cpsl-color-background-8);
74
73
  --table-header-padding-top: 16px;
75
74
  --table-header-padding-bottom: 16px;
76
75
  --table-header-padding-start: 24px;
@@ -84,51 +83,34 @@
84
83
  --table-content-padding-end: 24px;
85
84
  --table-content-border-color: var(--cpsl-color-background-8);
86
85
  --table-content-border-width: 1px;
87
- display: flex;
86
+ display: block;
88
87
  }
89
88
 
90
- .table-container {
89
+ :host cpsl-card {
90
+ height: 100%;
91
+ --card-padding-top: 0px;
92
+ --card-padding-bottom: 0px;
93
+ --card-padding-start: 0px;
94
+ --card-padding-end: 0px;
95
+ --card-border-width: var(--container-border-width);
96
+ --card-border-color: var(--container-border-color);
97
+ --card-border-radius: var(--container-border-radius);
98
+ --card-background-color: var(--container-background-color);
99
+ }
100
+ :host cpsl-card::part(card-container) {
101
+ height: 100%;
91
102
  display: flex;
92
103
  flex-direction: column;
93
- flex: 1;
94
- overflow: hidden;
95
- border-radius: var(--container-border-radius);
96
- border: var(--container-border-width) solid var(--container-border-color);
97
- background-color: var(--container-background-color);
98
104
  }
99
105
 
100
- .table-wrapper {
106
+ .content {
107
+ flex: 1;
101
108
  overflow: auto;
102
109
  }
103
110
 
104
- .table {
105
- width: 100%;
106
- border-spacing: 0;
107
- border-collapse: collapse;
108
- }
109
- .table th {
110
- -webkit-padding-start: var(--table-header-padding-start);
111
- padding-inline-start: var(--table-header-padding-start);
112
- -webkit-padding-end: var(--table-header-padding-end);
113
- padding-inline-end: var(--table-header-padding-end);
114
- padding-top: var(--table-header-padding-top);
115
- padding-bottom: var(--table-header-padding-bottom);
116
- background-color: var(--table-header-background-color);
117
- border-bottom: var(--table-header-border-width) solid var(--table-header-border-color);
118
- }
119
- .table td {
120
- -webkit-padding-start: var(--table-content-padding-start);
121
- padding-inline-start: var(--table-content-padding-start);
122
- -webkit-padding-end: var(--table-content-padding-end);
123
- padding-inline-end: var(--table-content-padding-end);
124
- padding-top: var(--table-content-padding-top);
125
- padding-bottom: var(--table-content-padding-bottom);
126
- }
127
- .table tr {
128
- border-bottom: var(--table-content-border-width) solid var(--table-content-border-color);
129
- }
130
- .table tr:last-child {
131
- border-bottom: none;
111
+ .table-wrapper {
112
+ overflow: auto;
113
+ height: 100%;
132
114
  }
133
115
 
134
116
  .container-header {
@@ -139,7 +121,7 @@
139
121
  padding-inline-end: var(--container-header-padding-end);
140
122
  padding-top: var(--container-header-padding-top);
141
123
  padding-bottom: var(--container-header-padding-bottom);
142
- border-bottom: var(--table-header-border-width) solid var(--table-header-border-color);
124
+ border-bottom: var(--container-header-border-width) solid var(--container-header-border-color);
143
125
  }
144
126
 
145
127
  .container-footer {
@@ -150,30 +132,9 @@
150
132
  padding-inline-end: var(--container-footer-padding-end);
151
133
  padding-top: var(--container-footer-padding-top);
152
134
  padding-bottom: var(--container-footer-padding-bottom);
153
- border-top: var(--table-content-border-width) solid var(--table-content-border-color);
154
- }
155
-
156
- .container-no-content {
157
- -webkit-padding-start: var(--container-no-content-padding-start);
158
- padding-inline-start: var(--container-no-content-padding-start);
159
- -webkit-padding-end: var(--container-no-content-padding-end);
160
- padding-inline-end: var(--container-no-content-padding-end);
161
- padding-top: var(--container-no-content-padding-top);
162
- padding-bottom: var(--container-no-content-padding-bottom);
135
+ border-top: var(--container-footer-border-width) solid var(--container-footer-border-color);
163
136
  }
164
137
 
165
138
  .shown {
166
139
  display: block;
167
- }
168
-
169
- .text-left {
170
- text-align: left;
171
- }
172
-
173
- .text-center {
174
- text-align: center;
175
- }
176
-
177
- .text-right {
178
- text-align: right;
179
140
  }
@@ -1,9 +1,5 @@
1
1
  import { Host, h } from "@stencil/core";
2
2
  export class CpslTable {
3
- constructor() {
4
- this.columns = undefined;
5
- this.rows = undefined;
6
- }
7
3
  get containerHeaderEl() {
8
4
  return this.el.querySelector('[slot="header"]');
9
5
  }
@@ -11,19 +7,7 @@ export class CpslTable {
11
7
  return this.el.querySelector('[slot="footer"]');
12
8
  }
13
9
  render() {
14
- var _a;
15
- return (h(Host, { key: '8ff024bee3c372cff775b8ecc68be3ee884eae3f' }, h("div", { key: 'cea1971fa6faf622f72a6ec103bcd6c6df81a457', class: "table-container", part: "table-container" }, h("div", { key: '191fbeab85091a081e6bacc76ea3a8f52e342c0d', class: { 'container-header': true, 'shown': Boolean(this.containerHeaderEl) } }, h("slot", { key: 'caf8cb186cb311b7db83f65e8bad15ee9ecf8cb8', name: "header" })), h("div", { key: 'b0d534df26ab4784fa89e8b1e6b74b6ea973b203', class: "table-wrapper", part: "table-wrapper" }, Boolean((_a = this.rows) === null || _a === void 0 ? void 0 : _a.length) ? (h("table", { class: "table" }, h("thead", null, h("tr", null, this.columns.map(col => {
16
- var _a;
17
- const align = (_a = col.align) !== null && _a !== void 0 ? _a : 'left';
18
- return (h("th", { class: { 'text-center': align === 'center', 'text-right': align === 'right', 'text-left': align === 'left' }, id: col.field, scope: "col" }, h("cpsl-text", { variant: "bodyXS", weight: "medium" }, col.headerName)));
19
- }))), h("tbody", null, this.rows.map(row => {
20
- return (h("tr", { style: { height: Boolean(row.height) ? `${row.height}px` : `80px` } }, this.columns.map(col => {
21
- var _a;
22
- const align = (_a = col.align) !== null && _a !== void 0 ? _a : 'left';
23
- const value = Boolean(col.valueGetter) ? col.valueGetter(row[col.field], row) : row[col.field];
24
- return (h("td", { class: { 'text-center': align === 'center', 'text-right': align === 'right', 'text-left': align === 'left' } }, Boolean(col.renderCell) ? (col.renderCell(value, row)) : (h("cpsl-text", { variant: "bodyXS", weight: "medium" }, value))));
25
- })));
26
- })))) : (h("div", { class: { 'container-no-content': true } }, h("slot", { name: "no-content" })))), h("div", { key: '5ac2bfcfdebca316cd61b39826772819ccfe5444', class: { 'container-footer': true, 'shown': Boolean(this.containerFooterEl) } }, h("slot", { key: 'f2506b2260272276a49ebd98c636064b148bccaa', name: "footer" })))));
10
+ return (h(Host, { key: '69d28584233c9f7545be8068c6f6fe5c6698d36f' }, h("cpsl-card", { key: 'fe1cdd5e9b0332d6056a38d32239057a252909e1', part: "table-container" }, h("div", { key: 'fd8eba0d9ebb48efb45617da3884d4a330a42704', class: { 'container-header': true, 'shown': Boolean(this.containerHeaderEl) } }, h("slot", { key: '8aaf689f820bc2c6732058b9d60a16d34974f0f0', name: "header" })), h("div", { key: '54610dd3abedc4f1214308a8b1f57d5f41b4d530', class: "content", part: "content" }, h("slot", { key: '49b369b546a08d25c85573e9807a4dd730a3e5e6', name: "content" })), h("div", { key: 'dcfb4bcbe1ad526bf07f4717ac4089711a8e4e70', class: { 'container-footer': true, 'shown': Boolean(this.containerFooterEl) } }, h("slot", { key: '4c60a98ad1098c77b8c14f8943fabe6141428fe0', name: "footer" })))));
27
11
  }
28
12
  static get is() { return "cpsl-table"; }
29
13
  static get encapsulation() { return "shadow"; }
@@ -37,52 +21,6 @@ export class CpslTable {
37
21
  "$": ["cpsl-table.css"]
38
22
  };
39
23
  }
40
- static get properties() {
41
- return {
42
- "columns": {
43
- "type": "unknown",
44
- "mutable": false,
45
- "complexType": {
46
- "original": "ColDef[]",
47
- "resolved": "ColDef[]",
48
- "references": {
49
- "ColDef": {
50
- "location": "import",
51
- "path": "./table-interface",
52
- "id": "src/components/cpsl-table/table-interface.ts::ColDef"
53
- }
54
- }
55
- },
56
- "required": false,
57
- "optional": false,
58
- "docs": {
59
- "tags": [],
60
- "text": "Columns for the table."
61
- }
62
- },
63
- "rows": {
64
- "type": "unknown",
65
- "mutable": false,
66
- "complexType": {
67
- "original": "RowDef[]",
68
- "resolved": "RowDef[]",
69
- "references": {
70
- "RowDef": {
71
- "location": "import",
72
- "path": "./table-interface",
73
- "id": "src/components/cpsl-table/table-interface.ts::RowDef"
74
- }
75
- }
76
- },
77
- "required": false,
78
- "optional": false,
79
- "docs": {
80
- "tags": [],
81
- "text": "Data rows for the table."
82
- }
83
- }
84
- };
85
- }
86
24
  static get elementRef() { return "el"; }
87
25
  }
88
26
  //# sourceMappingURL=cpsl-table.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cpsl-table.js","sourceRoot":"","sources":["../../../../src/components/cpsl-table/cpsl-table.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAQlE,MAAM,OAAO,SAAS;;;;;IAapB,IAAY,iBAAiB;QAC3B,OAAO,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,iBAAiB,CAAC,CAAC;IAClD,CAAC;IAED,IAAY,iBAAiB;QAC3B,OAAO,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,iBAAiB,CAAC,CAAC;IAClD,CAAC;IAED,MAAM;;QACJ,OAAO,CACL,EAAC,IAAI;YACH,4DAAK,KAAK,EAAC,iBAAiB,EAAC,IAAI,EAAC,iBAAiB;gBACjD,4DAAK,KAAK,EAAE,EAAE,kBAAkB,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,iBAAiB,CAAC,EAAE;oBAChF,6DAAM,IAAI,EAAC,QAAQ,GAAQ,CACvB;gBACN,4DAAK,KAAK,EAAC,eAAe,EAAC,IAAI,EAAC,eAAe,IAC5C,OAAO,CAAC,MAAA,IAAI,CAAC,IAAI,0CAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAC5B,aAAO,KAAK,EAAC,OAAO;oBAClB;wBACE,cACG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;;4BACtB,MAAM,KAAK,GAAG,MAAA,GAAG,CAAC,KAAK,mCAAI,MAAM,CAAC;4BAElC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,EAAC,QAAQ,EAAC,MAAM,EAAC,QAAQ,IACxC,KAAK,CACI,CACb,CACE,CACN,CAAC;wBACJ,CAAC,CAAC,CACC,CACN,CAAC;oBACJ,CAAC,CAAC,CACI,CACF,CACT,CAAC,CAAC,CAAC,CACF,WAAK,KAAK,EAAE,EAAE,sBAAsB,EAAE,IAAI,EAAE;oBAC1C,YAAM,IAAI,EAAC,YAAY,GAAQ,CAC3B,CACP,CACG;gBACN,4DAAK,KAAK,EAAE,EAAE,kBAAkB,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,iBAAiB,CAAC,EAAE;oBAChF,6DAAM,IAAI,EAAC,QAAQ,GAAQ,CACvB,CACF,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, Element, h } from '@stencil/core';\nimport { ColDef, RowDef } from './table-interface';\n\n@Component({\n tag: 'cpsl-table',\n styleUrl: 'cpsl-table.scss',\n shadow: true,\n})\nexport class CpslTable {\n @Element() el!: HTMLCpslTableElement;\n\n /**\n * Columns for the table.\n */\n @Prop() columns: ColDef[];\n\n /**\n * Data rows for the table.\n */\n @Prop() rows: RowDef[];\n\n private get containerHeaderEl() {\n return this.el.querySelector('[slot=\"header\"]');\n }\n\n private get containerFooterEl() {\n return this.el.querySelector('[slot=\"footer\"]');\n }\n\n render() {\n return (\n <Host>\n <div class=\"table-container\" part=\"table-container\">\n <div class={{ 'container-header': true, 'shown': Boolean(this.containerHeaderEl) }}>\n <slot name=\"header\"></slot>\n </div>\n <div class=\"table-wrapper\" part=\"table-wrapper\">\n {Boolean(this.rows?.length) ? (\n <table class=\"table\">\n <thead>\n <tr>\n {this.columns.map(col => {\n const align = col.align ?? 'left';\n\n return (\n <th class={{ 'text-center': align === 'center', 'text-right': align === 'right', 'text-left': align === 'left' }} id={col.field} scope=\"col\">\n <cpsl-text variant=\"bodyXS\" weight=\"medium\">\n {col.headerName}\n </cpsl-text>\n </th>\n );\n })}\n </tr>\n </thead>\n <tbody>\n {this.rows.map(row => {\n return (\n <tr style={{ height: Boolean(row.height) ? `${row.height}px` : `80px` }}>\n {this.columns.map(col => {\n const align = col.align ?? 'left';\n const value = Boolean(col.valueGetter) ? col.valueGetter(row[col.field], row) : row[col.field];\n\n return (\n <td class={{ 'text-center': align === 'center', 'text-right': align === 'right', 'text-left': align === 'left' }}>\n {Boolean(col.renderCell) ? (\n col.renderCell(value, row)\n ) : (\n <cpsl-text variant=\"bodyXS\" weight=\"medium\">\n {value}\n </cpsl-text>\n )}\n </td>\n );\n })}\n </tr>\n );\n })}\n </tbody>\n </table>\n ) : (\n <div class={{ 'container-no-content': true }}>\n <slot name=\"no-content\"></slot>\n </div>\n )}\n </div>\n <div class={{ 'container-footer': true, 'shown': Boolean(this.containerFooterEl) }}>\n <slot name=\"footer\"></slot>\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"cpsl-table.js","sourceRoot":"","sources":["../../../../src/components/cpsl-table/cpsl-table.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAO5D,MAAM,OAAO,SAAS;IAGpB,IAAY,iBAAiB;QAC3B,OAAO,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,iBAAiB,CAAC,CAAC;IAClD,CAAC;IAED,IAAY,iBAAiB;QAC3B,OAAO,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,iBAAiB,CAAC,CAAC;IAClD,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI;YACH,kEAAW,IAAI,EAAC,iBAAiB;gBAC/B,4DAAK,KAAK,EAAE,EAAE,kBAAkB,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,iBAAiB,CAAC,EAAE;oBAChF,6DAAM,IAAI,EAAC,QAAQ,GAAQ,CACvB;gBACN,4DAAK,KAAK,EAAC,SAAS,EAAC,IAAI,EAAC,SAAS;oBACjC,6DAAM,IAAI,EAAC,SAAS,GAAQ,CACxB;gBACN,4DAAK,KAAK,EAAE,EAAE,kBAAkB,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,iBAAiB,CAAC,EAAE;oBAChF,6DAAM,IAAI,EAAC,QAAQ,GAAQ,CACvB,CACI,CACP,CACR,CAAC;IACJ,CAAC;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Element, h } from '@stencil/core';\n\n@Component({\n tag: 'cpsl-table',\n styleUrl: 'cpsl-table.scss',\n shadow: true,\n})\nexport class CpslTable {\n @Element() el!: HTMLCpslTableElement;\n\n private get containerHeaderEl() {\n return this.el.querySelector('[slot=\"header\"]');\n }\n\n private get containerFooterEl() {\n return this.el.querySelector('[slot=\"footer\"]');\n }\n\n render() {\n return (\n <Host>\n <cpsl-card part=\"table-container\">\n <div class={{ 'container-header': true, 'shown': Boolean(this.containerHeaderEl) }}>\n <slot name=\"header\"></slot>\n </div>\n <div class=\"content\" part=\"content\">\n <slot name=\"content\"></slot>\n </div>\n <div class={{ 'container-footer': true, 'shown': Boolean(this.containerFooterEl) }}>\n <slot name=\"footer\"></slot>\n </div>\n </cpsl-card>\n </Host>\n );\n }\n}\n"]}
@@ -83,7 +83,7 @@
83
83
  border-style: solid;
84
84
  border-color: var(--tabs-border-color);
85
85
  border-radius: var(--tabs-border-radius);
86
- background-color: var(--tabs-background-color);
86
+ background: var(--tabs-background-color);
87
87
  font-size: var(--tabs-font-size);
88
88
  line-height: var(--tabs-line-height);
89
89
  -ms-overflow-style: none;
@@ -102,7 +102,7 @@
102
102
  border-style: solid;
103
103
  border-color: var(--tabs-border-color);
104
104
  border-radius: var(--tabs-border-radius);
105
- background-color: var(--slider-background-color);
105
+ background: var(--slider-background-color);
106
106
  box-shadow: -1px 0px 2px 0px var(--cpsl-color-alpha-black-10), 1px 0px 2px 0px var(--cpsl-color-alpha-black-10);
107
107
  }
108
108
 
@@ -46,7 +46,7 @@ export class CpslTabs {
46
46
  const tabsPosition = this.el.getBoundingClientRect();
47
47
  const tabsBorderWidth = +getComputedStyle(this.el).getPropertyValue('--tabs-border-width').slice(0, -2);
48
48
  const selectedTabRect = this.selectedTabRect;
49
- return (h(Host, { key: '372d02e7014c72414dc3282660ffab8a37df3a5e', class: { 'full-width': this.fullWidth }, onCpslTabButtonClick: this.onTabClicked }, h("div", { key: '762452e904014f3ea0d6e2bfb20d4277916bd296', class: "tabs-container" }, h("slot", { key: '52c4edd26157825c5bcd4cb5ffa30a6b5944d6ce' }), h("div", { key: '4b83b7a5c78bcf913622ddc7b8dc870ed001e93d', class: { slider: true, loaded: this.loaded }, style: { width: `${selectedTabRect.width}px`, left: `${selectedTabRect.x - tabsPosition.x - tabsBorderWidth * 2}px` } }))));
49
+ return (h(Host, { key: '8620de3b1cff8b60d0273f892ca7669cd53e479c', class: { 'full-width': this.fullWidth }, onCpslTabButtonClick: this.onTabClicked }, h("div", { key: '1441d0f383ae41c5293e2ced9a0c77b04e3cfd5f', class: "tabs-container" }, h("slot", { key: '78f40c6d6f4826bc83254349e35ef98faf3968ce' }), h("div", { key: '900ab917e38b71195cd498cc2ed05a90d48515ac', class: { slider: true, loaded: this.loaded }, style: { width: `${selectedTabRect.width}px`, left: `${selectedTabRect.x - tabsPosition.x - tabsBorderWidth * 2}px` } }))));
50
50
  }
51
51
  static get is() { return "cpsl-tabs"; }
52
52
  static get encapsulation() { return "shadow"; }
@@ -83,6 +83,10 @@ h6 {
83
83
  color: var(--cpsl-color-text-secondary);
84
84
  }
85
85
 
86
+ :host(.tertiary) {
87
+ color: var(--cpsl-color-text-tertiary);
88
+ }
89
+
86
90
  :host(.subtle) {
87
91
  color: var(--cpsl-color-text-subtle);
88
92
  }
@@ -31,9 +31,10 @@ export class CpslText {
31
31
  }
32
32
  }
33
33
  render() {
34
- return (h(Host, { key: 'dfb056131c8efe94b9a5ec99a8dadd4669dde15f', class: {
34
+ return (h(Host, { key: '0f21250f8e8b38eeb854ba3b465c4ac0917b058b', class: {
35
35
  'primary': this.color === 'primary',
36
36
  'secondary': this.color === 'secondary',
37
+ 'tertiary': this.color === 'tertiary',
37
38
  'subtle': this.color === 'subtle',
38
39
  'inverted': this.color === 'inverted',
39
40
  'error': this.color === 'error',
@@ -72,15 +73,15 @@ export class CpslText {
72
73
  "type": "string",
73
74
  "mutable": false,
74
75
  "complexType": {
75
- "original": "'primary' | 'secondary' | 'subtle' | 'inverted' | 'error'",
76
- "resolved": "\"error\" | \"inverted\" | \"primary\" | \"secondary\" | \"subtle\"",
76
+ "original": "'primary' | 'secondary' | 'tertiary' | 'subtle' | 'inverted' | 'error'",
77
+ "resolved": "\"error\" | \"inverted\" | \"primary\" | \"secondary\" | \"subtle\" | \"tertiary\"",
77
78
  "references": {}
78
79
  },
79
80
  "required": false,
80
81
  "optional": true,
81
82
  "docs": {
82
83
  "tags": [],
83
- "text": "The color of text.\nOptions are: `\"primary\"`, `\"secondary\", `\"subtle\", `\"inverted\", `\"error\".\nDefault is: `\"primary\"`."
84
+ "text": "The color of text.\nOptions are: `\"primary\"`, `\"secondary\", `\"tertiary\", `\"subtle\", `\"inverted\", `\"error\".\nDefault is: `\"primary\"`."
84
85
  },
85
86
  "attribute": "color",
86
87
  "reflect": false,
@@ -1 +1 @@
1
- {"version":3,"file":"cpsl-text.js","sourceRoot":"","sources":["../../../../src/components/cpsl-text/cpsl-text.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAOzD,MAAM,OAAO,QAAQ;;qBAMyD,SAAS;uBAO+E,OAAO;sBAO7G,SAAS;;IAEvE,IAAY,OAAO;QACjB,QAAQ,IAAI,CAAC,OAAO,EAAE,CAAC;YACrB,KAAK,WAAW,CAAC,CAAC,CAAC;gBACjB,OAAO,CACL;oBACE,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E,IAAI,CAAC,OAAO,KAAK,OAAO;gBAClC,QAAQ,EAAE,IAAI,CAAC,OAAO,KAAK,OAAO;gBAClC,SAAS,EAAE,IAAI,CAAC,OAAO,KAAK,QAAQ;gBACpC,YAAY,EAAE,IAAI,CAAC,OAAO,KAAK,WAAW;gBAC1C,WAAW,EAAE,IAAI,CAAC,OAAO,KAAK,UAAU;gBACxC,WAAW,EAAE,IAAI,CAAC,OAAO,KAAK,UAAU;gBACxC,WAAW,EAAE,IAAI,CAAC,OAAO,KAAK,UAAU;gBACxC,YAAY,EAAE,IAAI,CAAC,OAAO,KAAK,WAAW;gBAC1C,aAAa,EAAE,IAAI,CAAC,OAAO,KAAK,YAAY;aAC7C,IAEA,IAAI,CAAC,OAAO,CACR,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'cpsl-text',\n styleUrl: 'cpsl-text.scss',\n shadow: true,\n})\nexport class CpslText {\n /**\n * The color of text.\n * Options are: `\"primary\"`, `\"secondary\", `\"subtle\", `\"inverted\", `\"error\".\n * Default is: `\"primary\"`.\n */\n @Prop() color?: 'primary' | 'secondary' | 'subtle' | 'inverted' | 'error' = 'primary';\n\n /**\n * The variant of text.\n * Options are: `\"body2XS\"`, `\"bodyXS\", `\"bodyS\", `\"bodyM\", `\"bodyL\", `\"bodyXL\", `\"headingXS\", `\"headingS\", `\"headingM\", `\"headingL\", `\"headingXL\", `\"heading2XL\".\n * Default is: `\"bodyM\"`.\n */\n @Prop() variant?: 'body2XS' | 'bodyXS' | 'bodyS' | 'bodyM' | 'bodyL' | 'bodyXL' | 'headingXS' | 'headingS' | 'headingM' | 'headingL' | 'headingXL' | 'heading2XL' = 'bodyM';\n\n /**\n * The weight of text.\n * Options are: `\"regular\"`, `\"medium\", `\"semiBold\", `\"bold\".\n * Default is: `\"regular\"`.\n */\n @Prop() weight?: 'regular' | 'medium' | 'semiBold' | 'bold' = 'regular';\n\n private get Content() {\n switch (this.variant) {\n case 'headingXS': {\n return (\n <h6>\n <slot></slot>\n </h6>\n );\n }\n case 'headingS': {\n return (\n <h5>\n <slot></slot>\n </h5>\n );\n }\n case 'headingM': {\n return (\n <h4>\n <slot></slot>\n </h4>\n );\n }\n case 'headingL': {\n return (\n <h3>\n <slot></slot>\n </h3>\n );\n }\n case 'headingXL': {\n return (\n <h2>\n <slot></slot>\n </h2>\n );\n }\n case 'heading2XL': {\n return (\n <h1>\n <slot></slot>\n </h1>\n );\n }\n default: {\n return (\n <p>\n <slot></slot>\n </p>\n );\n }\n }\n }\n\n render() {\n return (\n <Host\n class={{\n // COLORS\n 'primary': this.color === 'primary',\n 'secondary': this.color === 'secondary',\n 'subtle': this.color === 'subtle',\n 'inverted': this.color === 'inverted',\n 'error': this.color === 'error',\n // WEIGHTS\n 'medium': this.weight === 'medium',\n 'semi-bold': this.weight === 'semiBold',\n 'bold': this.weight === 'bold',\n // SIZES\n 'body-2xs': this.variant === 'body2XS',\n 'body-xs': this.variant === 'bodyXS',\n 'body-s': this.variant === 'bodyS',\n 'body-m': this.variant === 'bodyM',\n 'body-l': this.variant === 'bodyL',\n 'body-xl': this.variant === 'bodyXL',\n 'heading-xs': this.variant === 'headingXS',\n 'heading-s': this.variant === 'headingS',\n 'heading-m': this.variant === 'headingM',\n 'heading-l': this.variant === 'headingL',\n 'heading-xl': this.variant === 'headingXL',\n 'heading-2xl': this.variant === 'heading2XL',\n }}\n >\n {this.Content}\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"cpsl-text.js","sourceRoot":"","sources":["../../../../src/components/cpsl-text/cpsl-text.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAOzD,MAAM,OAAO,QAAQ;;qBAMsE,SAAS;uBAOkE,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CAAC,MAAM,KAAK,MAAM;gBAE9B,UAAU,EAAE,IAAI,CAAC,OAAO,KAAK,SAAS;gBACtC,SAAS,EAAE,IAAI,CAAC,OAAO,KAAK,QAAQ;gBACpC,QAAQ,EAAE,IAAI,CAAC,OAAO,KAAK,OAAO;gBAClC,QAAQ,EAAE,IAAI,CAAC,OAAO,KAAK,OAAO;gBAClC,QAAQ,EAAE,IAAI,CAAC,OAAO,KAAK,OAAO;gBAClC,SAAS,EAAE,IAAI,CAAC,OAAO,KAAK,QAAQ;gBACpC,YAAY,EAAE,IAAI,CAAC,OAAO,KAAK,WAAW;gBAC1C,WAAW,EAAE,IAAI,CAAC,OAAO,KAAK,UAAU;gBACxC,WAAW,EAAE,IAAI,CAAC,OAAO,KAAK,UAAU;gBACxC,WAAW,EAAE,IAAI,CAAC,OAAO,KAAK,UAAU;gBACxC,YAAY,EAAE,IAAI,CAAC,OAAO,KAAK,WAAW;gBAC1C,aAAa,EAAE,IAAI,CAAC,OAAO,KAAK,YAAY;aAC7C,IAEA,IAAI,CAAC,OAAO,CACR,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'cpsl-text',\n styleUrl: 'cpsl-text.scss',\n shadow: true,\n})\nexport class CpslText {\n /**\n * The color of text.\n * Options are: `\"primary\"`, `\"secondary\", `\"tertiary\", `\"subtle\", `\"inverted\", `\"error\".\n * Default is: `\"primary\"`.\n */\n @Prop() color?: 'primary' | 'secondary' | 'tertiary' | 'subtle' | 'inverted' | 'error' = 'primary';\n\n /**\n * The variant of text.\n * Options are: `\"body2XS\"`, `\"bodyXS\", `\"bodyS\", `\"bodyM\", `\"bodyL\", `\"bodyXL\", `\"headingXS\", `\"headingS\", `\"headingM\", `\"headingL\", `\"headingXL\", `\"heading2XL\".\n * Default is: `\"bodyM\"`.\n */\n @Prop() variant?: 'body2XS' | 'bodyXS' | 'bodyS' | 'bodyM' | 'bodyL' | 'bodyXL' | 'headingXS' | 'headingS' | 'headingM' | 'headingL' | 'headingXL' | 'heading2XL' = 'bodyM';\n\n /**\n * The weight of text.\n * Options are: `\"regular\"`, `\"medium\", `\"semiBold\", `\"bold\".\n * Default is: `\"regular\"`.\n */\n @Prop() weight?: 'regular' | 'medium' | 'semiBold' | 'bold' = 'regular';\n\n private get Content() {\n switch (this.variant) {\n case 'headingXS': {\n return (\n <h6>\n <slot></slot>\n </h6>\n );\n }\n case 'headingS': {\n return (\n <h5>\n <slot></slot>\n </h5>\n );\n }\n case 'headingM': {\n return (\n <h4>\n <slot></slot>\n </h4>\n );\n }\n case 'headingL': {\n return (\n <h3>\n <slot></slot>\n </h3>\n );\n }\n case 'headingXL': {\n return (\n <h2>\n <slot></slot>\n </h2>\n );\n }\n case 'heading2XL': {\n return (\n <h1>\n <slot></slot>\n </h1>\n );\n }\n default: {\n return (\n <p>\n <slot></slot>\n </p>\n );\n }\n }\n }\n\n render() {\n return (\n <Host\n class={{\n // COLORS\n 'primary': this.color === 'primary',\n 'secondary': this.color === 'secondary',\n 'tertiary': this.color === 'tertiary',\n 'subtle': this.color === 'subtle',\n 'inverted': this.color === 'inverted',\n 'error': this.color === 'error',\n // WEIGHTS\n 'medium': this.weight === 'medium',\n 'semi-bold': this.weight === 'semiBold',\n 'bold': this.weight === 'bold',\n // SIZES\n 'body-2xs': this.variant === 'body2XS',\n 'body-xs': this.variant === 'bodyXS',\n 'body-s': this.variant === 'bodyS',\n 'body-m': this.variant === 'bodyM',\n 'body-l': this.variant === 'bodyL',\n 'body-xl': this.variant === 'bodyXL',\n 'heading-xs': this.variant === 'headingXS',\n 'heading-s': this.variant === 'headingS',\n 'heading-m': this.variant === 'headingM',\n 'heading-l': this.variant === 'headingL',\n 'heading-xl': this.variant === 'headingXL',\n 'heading-2xl': this.variant === 'heading2XL',\n }}\n >\n {this.Content}\n </Host>\n );\n }\n}\n"]}
@@ -81,7 +81,7 @@
81
81
  padding-bottom: var(--button-padding-bottom);
82
82
  border: 1px solid transparent;
83
83
  cursor: pointer;
84
- background-color: var(--button-background-color);
84
+ background: var(--button-background-color);
85
85
  border-color: var(--button-border-color);
86
86
  display: flex;
87
87
  flex-direction: column;
@@ -5,7 +5,7 @@ export class CpslTileButton {
5
5
  this.icon = undefined;
6
6
  }
7
7
  render() {
8
- return (h(Host, { key: 'c4aee36001539cabc1965e193962701a2f5f7ade' }, h("button", { key: '76e0f5b921f2b6c2086610a8c4b1e48dc85c751e', class: "button-native" }, h("cpsl-icon", { key: '379e1ba5fe8ee4bf089ce84d8ce3eaa0eb32b214', exportparts: "icon", src: this.src, icon: this.icon }), h("slot", { key: 'e09443c7527e061ea752b6ebe7abc6152ae61783' }))));
8
+ return (h(Host, { key: 'f7d808cefadce272235872ba05cd60f9c0bffc3c' }, h("button", { key: '47e808a5ed0bdb6e0705d746844f74ce7ad07620', class: "button-native" }, h("cpsl-icon", { key: 'ba374a65bee6433b96d2f3c8abbe1da51f9172af', exportparts: "icon", src: this.src, icon: this.icon }), h("slot", { key: 'b5f55bdcec9566625f7c7a9567a933ff86815d6c' }))));
9
9
  }
10
10
  static get is() { return "cpsl-tile-button"; }
11
11
  static get encapsulation() { return "shadow"; }
@@ -43,7 +43,7 @@ export class CpslTileButton {
43
43
  "mutable": false,
44
44
  "complexType": {
45
45
  "original": "IconType",
46
- "resolved": "\"AD\" | \"AE\" | \"AF\" | \"AG\" | \"AI\" | \"AL\" | \"AM\" | \"AO\" | \"AR\" | \"AS\" | \"AT\" | \"AU\" | \"AW\" | \"AX\" | \"AZ\" | \"BA\" | \"BB\" | \"BD\" | \"BE\" | \"BF\" | \"BG\" | \"BH\" | \"BI\" | \"BJ\" | \"BL\" | \"BM\" | \"BN\" | \"BO\" | \"BQ\" | \"BQ2\" | \"BQ3\" | \"BR\" | \"BS\" | \"BT\" | \"BW\" | \"BY\" | \"BZ\" | \"CA\" | \"CC\" | \"CD\" | \"CD2\" | \"CF\" | \"CH\" | \"CK\" | \"CL\" | \"CM\" | \"CN\" | \"CO\" | \"CR\" | \"CU\" | \"CW\" | \"CX\" | \"CY\" | \"CZ\" | \"DE\" | \"DJ\" | \"DK\" | \"DM\" | \"DO\" | \"DS\" | \"DZ\" | \"EC\" | \"EE\" | \"EG\" | \"EH\" | \"ER\" | \"ES\" | \"ET\" | \"FI\" | \"FJ\" | \"FK\" | \"FM\" | \"FO\" | \"FR\" | \"GA\" | \"GB2\" | \"GB\" | \"GD\" | \"GE\" | \"GG\" | \"GH\" | \"GI\" | \"GL\" | \"GM\" | \"GN\" | \"GQ\" | \"GR\" | \"GT\" | \"GU\" | \"GW\" | \"GY\" | \"HK\" | \"HN\" | \"HR\" | \"HT\" | \"HU\" | \"ID\" | \"IE\" | \"IL\" | \"IM\" | \"IN\" | \"IO\" | \"IQ\" | \"IR\" | \"IS\" | \"IT\" | \"JE\" | \"JM\" | \"JO\" | \"JP\" | \"KE\" | \"KG\" | \"KH\" | \"KI\" | \"KM\" | \"KN\" | \"KP\" | \"KR\" | \"KW\" | \"KY\" | \"KZ\" | \"LA\" | \"LB\" | \"LC\" | \"LI\" | \"LK\" | \"LR\" | \"LS\" | \"LT\" | \"LU\" | \"LV\" | \"LY\" | \"MA\" | \"MC\" | \"MD\" | \"ME\" | \"MG\" | \"MH\" | \"MK\" | \"ML\" | \"MM\" | \"MN\" | \"MO\" | \"MP\" | \"MQ\" | \"MR\" | \"MS\" | \"MT\" | \"MU\" | \"MV\" | \"MW\" | \"MX\" | \"MY\" | \"MZ\" | \"NA\" | \"NE\" | \"NF\" | \"NG\" | \"NI\" | \"NL\" | \"NO\" | \"NP\" | \"NR\" | \"NU\" | \"NZ\" | \"OM\" | \"PA\" | \"PE\" | \"PF\" | \"PG\" | \"PH\" | \"PK\" | \"PL\" | \"PN\" | \"PR\" | \"PS\" | \"PT\" | \"PW\" | \"PY\" | \"QA\" | \"RO\" | \"RS\" | \"RU\" | \"RW\" | \"SA\" | \"SB\" | \"SC\" | \"SE\" | \"SG\" | \"SI\" | \"SK\" | \"SL\" | \"SM\" | \"SN\" | \"SO\" | \"SR\" | \"SS\" | \"ST\" | \"SV\" | \"SX\" | \"SY\" | \"SZ\" | \"TC\" | \"TD\" | \"TG\" | \"TH\" | \"TJ\" | \"TK\" | \"TL\" | \"TM\" | \"TN\" | \"TO\" | \"TR\" | \"TT\" | \"TV\" | \"TW\" | \"TZ\" | \"UA\" | \"UG\" | \"US\" | \"UY\" | \"UZ\" | \"VC\" | \"VE\" | \"VG\" | \"VI\" | \"VN\" | \"VU\" | \"WS\" | \"YE\" | \"ZA\" | \"ZM\" | \"ZW\" | \"alertCircle\" | \"angelListBrand\" | \"angelList\" | \"appleBrand\" | \"apple\" | \"arrowNarrow\" | \"arrow\" | \"backupKit\" | \"capsuleLogo\" | \"capsuleRingsDark\" | \"capsuleRings\" | \"capsule\" | \"checkCircle\" | \"check\" | \"chevronUp\" | \"clock\" | \"close\" | \"clubhouseBrand\" | \"clubhouse\" | \"copy\" | \"decentBrand\" | \"decent\" | \"discordBrand\" | \"discord\" | \"downloadCloud\" | \"dribbbleBrand\" | \"dribbble\" | \"earth\" | \"eyeOff\" | \"eye\" | \"facebookBrand\" | \"facebook\" | \"figmaBrand\" | \"figma\" | \"githubBrand\" | \"github\" | \"googleBrand\" | \"google\" | \"helpCircle\" | \"heroEmail\" | \"heroLock\" | \"heroPasskey\" | \"heroPhone\" | \"heroWallet\" | \"home\" | \"infoCircle\" | \"instagramBrand\" | \"instagram\" | \"key\" | \"lightning\" | \"linkedinBrand\" | \"linkedin\" | \"mail\" | \"moreLoginOptions\" | \"phone\" | \"pintrestBrand\" | \"pintrest\" | \"plusCircle\" | \"rampNetworkBrand\" | \"rampNetwork\" | \"redditBrand\" | \"reddit\" | \"settings\" | \"signalBrand\" | \"signal\" | \"snapchatBrand\" | \"snapchat\" | \"telegramBrand\" | \"telegram\" | \"tikTokBrand\" | \"tikTok\" | \"tumblrBrand\" | \"tumblr\" | \"twitterBrand\" | \"twitter\" | \"wallet\" | \"youtubeBrand\" | \"youtube\"",
46
+ "resolved": "\"AD\" | \"AE\" | \"AF\" | \"AG\" | \"AI\" | \"AL\" | \"AM\" | \"AO\" | \"AR\" | \"AS\" | \"AT\" | \"AU\" | \"AW\" | \"AX\" | \"AZ\" | \"BA\" | \"BB\" | \"BD\" | \"BE\" | \"BF\" | \"BG\" | \"BH\" | \"BI\" | \"BJ\" | \"BL\" | \"BM\" | \"BN\" | \"BO\" | \"BQ\" | \"BQ2\" | \"BQ3\" | \"BR\" | \"BS\" | \"BT\" | \"BW\" | \"BY\" | \"BZ\" | \"CA\" | \"CC\" | \"CD\" | \"CD2\" | \"CF\" | \"CH\" | \"CK\" | \"CL\" | \"CM\" | \"CN\" | \"CO\" | \"CR\" | \"CU\" | \"CW\" | \"CX\" | \"CY\" | \"CZ\" | \"DE\" | \"DJ\" | \"DK\" | \"DM\" | \"DO\" | \"DS\" | \"DZ\" | \"EC\" | \"EE\" | \"EG\" | \"EH\" | \"ER\" | \"ES\" | \"ET\" | \"FI\" | \"FJ\" | \"FK\" | \"FM\" | \"FO\" | \"FR\" | \"GA\" | \"GB2\" | \"GB\" | \"GD\" | \"GE\" | \"GG\" | \"GH\" | \"GI\" | \"GL\" | \"GM\" | \"GN\" | \"GQ\" | \"GR\" | \"GT\" | \"GU\" | \"GW\" | \"GY\" | \"HK\" | \"HN\" | \"HR\" | \"HT\" | \"HU\" | \"ID\" | \"IE\" | \"IL\" | \"IM\" | \"IN\" | \"IO\" | \"IQ\" | \"IR\" | \"IS\" | \"IT\" | \"JE\" | \"JM\" | \"JO\" | \"JP\" | \"KE\" | \"KG\" | \"KH\" | \"KI\" | \"KM\" | \"KN\" | \"KP\" | \"KR\" | \"KW\" | \"KY\" | \"KZ\" | \"LA\" | \"LB\" | \"LC\" | \"LI\" | \"LK\" | \"LR\" | \"LS\" | \"LT\" | \"LU\" | \"LV\" | \"LY\" | \"MA\" | \"MC\" | \"MD\" | \"ME\" | \"MG\" | \"MH\" | \"MK\" | \"ML\" | \"MM\" | \"MN\" | \"MO\" | \"MP\" | \"MQ\" | \"MR\" | \"MS\" | \"MT\" | \"MU\" | \"MV\" | \"MW\" | \"MX\" | \"MY\" | \"MZ\" | \"NA\" | \"NE\" | \"NF\" | \"NG\" | \"NI\" | \"NL\" | \"NO\" | \"NP\" | \"NR\" | \"NU\" | \"NZ\" | \"OM\" | \"PA\" | \"PE\" | \"PF\" | \"PG\" | \"PH\" | \"PK\" | \"PL\" | \"PN\" | \"PR\" | \"PS\" | \"PT\" | \"PW\" | \"PY\" | \"QA\" | \"RO\" | \"RS\" | \"RU\" | \"RW\" | \"SA\" | \"SB\" | \"SC\" | \"SE\" | \"SG\" | \"SI\" | \"SK\" | \"SL\" | \"SM\" | \"SN\" | \"SO\" | \"SR\" | \"SS\" | \"ST\" | \"SV\" | \"SX\" | \"SY\" | \"SZ\" | \"TC\" | \"TD\" | \"TG\" | \"TH\" | \"TJ\" | \"TK\" | \"TL\" | \"TM\" | \"TN\" | \"TO\" | \"TR\" | \"TT\" | \"TV\" | \"TW\" | \"TZ\" | \"UA\" | \"UG\" | \"US\" | \"UY\" | \"UZ\" | \"VC\" | \"VE\" | \"VG\" | \"VI\" | \"VN\" | \"VU\" | \"WS\" | \"YE\" | \"ZA\" | \"ZM\" | \"ZW\" | \"alertCircle\" | \"angelListBrand\" | \"angelList\" | \"appleBrand\" | \"apple\" | \"arrowNarrow\" | \"arrow\" | \"backupKit\" | \"brush\" | \"capsuleLogo\" | \"capsuleRingsDark\" | \"capsuleRings\" | \"capsule\" | \"checkCircle\" | \"check\" | \"chevronUp\" | \"clock\" | \"close\" | \"clubhouseBrand\" | \"clubhouse\" | \"copy\" | \"cube\" | \"decentBrand\" | \"decent\" | \"discordBrand\" | \"discord\" | \"downloadCloud\" | \"dribbbleBrand\" | \"dribbble\" | \"earth\" | \"eyeOff\" | \"eye\" | \"facebookBrand\" | \"facebook\" | \"figmaBrand\" | \"figma\" | \"file\" | \"githubBrand\" | \"github\" | \"googleBrand\" | \"google\" | \"helpCircle\" | \"heroEmail\" | \"heroLock\" | \"heroPasskey\" | \"heroPhone\" | \"heroWallet\" | \"home\" | \"image\" | \"infoCircle\" | \"instagramBrand\" | \"instagram\" | \"key\" | \"lightning01\" | \"lightning\" | \"linkedinBrand\" | \"linkedin\" | \"mail\" | \"menu\" | \"moreLoginOptions\" | \"phone\" | \"pintrestBrand\" | \"pintrest\" | \"plusCircle\" | \"rampNetworkBrand\" | \"rampNetwork\" | \"redditBrand\" | \"reddit\" | \"refresh\" | \"settings\" | \"signalBrand\" | \"signal\" | \"snapchatBrand\" | \"snapchat\" | \"stars\" | \"telegramBrand\" | \"telegram\" | \"tikTokBrand\" | \"tikTok\" | \"tumblrBrand\" | \"tumblr\" | \"twitterBrand\" | \"twitter\" | \"wallet\" | \"x\" | \"youtubeBrand\" | \"youtube\"",
47
47
  "references": {
48
48
  "IconType": {
49
49
  "location": "import",
@@ -13,8 +13,8 @@ export const DEFAULT_Z_INDICES = {
13
13
  modalNoOverlay: 0,
14
14
  appBar: 10000,
15
15
  overlay: 10001,
16
- modal: 10002,
17
16
  drawer: 10004,
18
- modalWrapper: 10005,
17
+ modal: 10005,
18
+ popover: 10006,
19
19
  };
20
20
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAAC;AAE/B,MAAM,CAAC,MAAM,aAAa,GAAU;IAClC,eAAe,EAAE,SAAS;IAC1B,eAAe,EAAE,SAAS;CAC3B,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;AAE9E,MAAM,CAAC,MAAM,cAAc,GAAmD;IAC5E,GAAG,EAAE,sBAAsB;IAC3B,MAAM,EAAE,sBAAsB;IAC9B,KAAK,EAAE,sBAAsB;CAC9B,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,cAAc,EAAE,CAAC;IACjB,MAAM,EAAE,KAAK;IACb,OAAO,EAAE,KAAK;IACd,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE,KAAK;IACb,YAAY,EAAE,KAAK;CACpB,CAAC","sourcesContent":["import { Theme } from './interface';\n\nexport const MOBILE_SIZE = 480;\n\nexport const DEFAULT_THEME: Theme = {\n foregroundColor: '#121212',\n backgroundColor: '#FAFAFA',\n};\n\nexport const COLOR_MIXES = [0, 0.04, 0.08, 0.16, 0.32, 0.48, 0.64, 0.8, 0.96];\n\nexport const UTILITY_COLORS: { red: string; yellow: string; green: string } = {\n red: 'rgba(240, 68, 56, 1)',\n yellow: 'rgba(251, 188, 4, 1)',\n green: 'rgba(52, 168, 83, 1)',\n};\n\nexport const DEFAULT_Z_INDICES = {\n modalNoOverlay: 0,\n appBar: 10000,\n overlay: 10001,\n modal: 10002,\n drawer: 10004,\n modalWrapper: 10005,\n};\n"]}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAAC;AAE/B,MAAM,CAAC,MAAM,aAAa,GAAU;IAClC,eAAe,EAAE,SAAS;IAC1B,eAAe,EAAE,SAAS;CAC3B,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;AAE9E,MAAM,CAAC,MAAM,cAAc,GAAmD;IAC5E,GAAG,EAAE,sBAAsB;IAC3B,MAAM,EAAE,sBAAsB;IAC9B,KAAK,EAAE,sBAAsB;CAC9B,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,cAAc,EAAE,CAAC;IACjB,MAAM,EAAE,KAAK;IACb,OAAO,EAAE,KAAK;IACd,MAAM,EAAE,KAAK;IACb,KAAK,EAAE,KAAK;IACZ,OAAO,EAAE,KAAK;CACf,CAAC","sourcesContent":["import { Theme } from './interface';\n\nexport const MOBILE_SIZE = 480;\n\nexport const DEFAULT_THEME: Theme = {\n foregroundColor: '#121212',\n backgroundColor: '#FAFAFA',\n};\n\nexport const COLOR_MIXES = [0, 0.04, 0.08, 0.16, 0.32, 0.48, 0.64, 0.8, 0.96];\n\nexport const UTILITY_COLORS: { red: string; yellow: string; green: string } = {\n red: 'rgba(240, 68, 56, 1)',\n yellow: 'rgba(251, 188, 4, 1)',\n green: 'rgba(52, 168, 83, 1)',\n};\n\nexport const DEFAULT_Z_INDICES = {\n modalNoOverlay: 0,\n appBar: 10000,\n overlay: 10001,\n drawer: 10004,\n modal: 10005,\n popover: 10006,\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAE7B,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC","sourcesContent":["export * from './components';\n\nexport { generateTheme } from './utils/theme/generateTheme';\nexport type { Theme, BorderRadius } from './interface';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAE7B,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC","sourcesContent":["export * from './components';\n\nexport { generateTheme } from './utils/theme/generateTheme';\nexport type { Theme, BorderRadius, IconType } from './interface';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"interface.js","sourceRoot":"","sources":["../../src/interface.ts"],"names":[],"mappings":"","sourcesContent":["import { Icons } from './assets/icons';\n\nexport type PredefinedColors = 'primary' | 'secondary' | 'tertiary' | 'success' | 'warning' | 'danger' | 'light' | 'medium' | 'dark';\n\n// From: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete\nexport type AutocompleteTypes =\n | 'on'\n | 'off'\n | 'name'\n | 'honorific-prefix'\n | 'given-name'\n | 'additional-name'\n | 'family-name'\n | 'honorific-suffix'\n | 'nickname'\n | 'email'\n | 'username'\n | 'new-password'\n | 'current-password'\n | 'one-time-code'\n | 'organization-title'\n | 'organization'\n | 'street-address'\n | 'address-line1'\n | 'address-line2'\n | 'address-line3'\n | 'address-level4'\n | 'address-level3'\n | 'address-level2'\n | 'address-level1'\n | 'country'\n | 'country-name'\n | 'postal-code'\n | 'cc-name'\n | 'cc-given-name'\n | 'cc-additional-name'\n | 'cc-family-name'\n | 'cc-family-name'\n | 'cc-number'\n | 'cc-exp'\n | 'cc-exp-month'\n | 'cc-exp-year'\n | 'cc-csc'\n | 'cc-type'\n | 'transaction-currency'\n | 'transaction-amount'\n | 'language'\n | 'bday'\n | 'bday-day'\n | 'bday-month'\n | 'bday-year'\n | 'sex'\n | 'tel'\n | 'tel-country-code'\n | 'tel-national'\n | 'tel-area-code'\n | 'tel-local'\n | 'tel-extension'\n | 'impp'\n | 'url'\n | 'photo';\n\nexport type TextFieldTypes = 'date' | 'email' | 'number' | 'password' | 'search' | 'tel' | 'text' | 'url' | 'time' | 'week' | 'month' | 'datetime-local';\n\nexport type LiteralUnion<T extends U, U = string> = T | (U & Record<never, never>);\n\nexport type Color = LiteralUnion<PredefinedColors, string>;\n\nexport type CssClassMap = { [className: string]: boolean };\n\nexport type IconType = keyof typeof Icons;\n\nexport type Theme = {\n foregroundColor?: string;\n backgroundColor?: string;\n borderRadius?: BorderRadius;\n font?: string;\n customPalette?: CustomPalette;\n customFontSizes?: CustomFontSizes;\n};\n\nexport type BorderRadius = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'full';\n\nexport interface CustomFontSizes {\n body2XS?: string;\n bodyXS?: string;\n bodyS?: string;\n bodyM?: string;\n bodyL?: string;\n bodyXL?: string;\n headingXS?: string;\n headingS?: string;\n headingM?: string;\n headingL?: string;\n headingXL?: string;\n heading2XL?: string;\n}\n\nexport interface CustomPalette {\n text?: {\n primary?: string;\n secondary?: string;\n subtle?: string;\n inverted?: string;\n error?: string;\n };\n modal?: {\n surface?: {\n main?: string;\n footer?: string;\n };\n border?: string;\n };\n input?: {\n surface?: {\n disabled?: string;\n default?: string;\n };\n border?: {\n placeholder?: string;\n active?: string;\n error?: string;\n };\n };\n tileButton?: {\n surface?: {\n default?: string;\n hover?: string;\n pressed?: string;\n };\n border?: string;\n };\n primaryButton?: {\n surface?: {\n default?: string;\n hover?: string;\n pressed?: string;\n disabled?: string;\n };\n border?: {\n default?: string;\n disabled?: string;\n };\n outline?: string;\n };\n secondaryButton?: {\n surface?: {\n default?: string;\n hover?: string;\n pressed?: string;\n disabled?: string;\n };\n border?: {\n default?: string;\n disabled?: string;\n };\n outline?: string;\n };\n divider?: string;\n spinner?: {\n path?: string;\n circle?: string;\n };\n pill?: {\n text?: string;\n container?: {\n background?: string;\n border?: string;\n };\n };\n progressIndicator?: {\n active?: string;\n next?: string;\n previous?: string;\n };\n qr?: {\n fill?: string;\n background?: string;\n border?: string;\n };\n slideButton?: {\n slider?: {\n background?: string;\n border?: string;\n text?: string;\n container?: {\n start?: {\n background?: string;\n border?: string;\n };\n end?: {\n background?: string;\n border?: string;\n };\n };\n };\n start?: {\n text?: string;\n };\n end?: {\n text?: string;\n };\n };\n alert?: {\n surface?: {\n error?: string;\n };\n border?: {\n error?: string;\n };\n };\n switch?: {\n surface?: {\n default?: string;\n checked?: string;\n };\n thumb?: {\n default?: string;\n checked?: string;\n };\n };\n checkbox?: {\n surface?: {\n default?: string;\n checked?: string;\n };\n border?: {\n default?: string;\n checked?: string;\n };\n icon?: string;\n };\n radio?: {\n surface?: {\n default?: string;\n checked?: string;\n };\n border?: {\n default?: string;\n checked?: string;\n };\n };\n card?: {\n surface?: string;\n border?: string;\n };\n}\n"]}
1
+ {"version":3,"file":"interface.js","sourceRoot":"","sources":["../../src/interface.ts"],"names":[],"mappings":"","sourcesContent":["import { Icons } from './assets/icons';\n\nexport type PredefinedColors = 'primary' | 'secondary' | 'tertiary' | 'success' | 'warning' | 'danger' | 'light' | 'medium' | 'dark';\n\n// From: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete\nexport type AutocompleteTypes =\n | 'on'\n | 'off'\n | 'name'\n | 'honorific-prefix'\n | 'given-name'\n | 'additional-name'\n | 'family-name'\n | 'honorific-suffix'\n | 'nickname'\n | 'email'\n | 'username'\n | 'new-password'\n | 'current-password'\n | 'one-time-code'\n | 'organization-title'\n | 'organization'\n | 'street-address'\n | 'address-line1'\n | 'address-line2'\n | 'address-line3'\n | 'address-level4'\n | 'address-level3'\n | 'address-level2'\n | 'address-level1'\n | 'country'\n | 'country-name'\n | 'postal-code'\n | 'cc-name'\n | 'cc-given-name'\n | 'cc-additional-name'\n | 'cc-family-name'\n | 'cc-family-name'\n | 'cc-number'\n | 'cc-exp'\n | 'cc-exp-month'\n | 'cc-exp-year'\n | 'cc-csc'\n | 'cc-type'\n | 'transaction-currency'\n | 'transaction-amount'\n | 'language'\n | 'bday'\n | 'bday-day'\n | 'bday-month'\n | 'bday-year'\n | 'sex'\n | 'tel'\n | 'tel-country-code'\n | 'tel-national'\n | 'tel-area-code'\n | 'tel-local'\n | 'tel-extension'\n | 'impp'\n | 'url'\n | 'photo';\n\nexport type TextFieldTypes = 'date' | 'email' | 'number' | 'password' | 'search' | 'tel' | 'text' | 'url' | 'time' | 'week' | 'month' | 'datetime-local';\n\nexport type LiteralUnion<T extends U, U = string> = T | (U & Record<never, never>);\n\nexport type Color = LiteralUnion<PredefinedColors, string>;\n\nexport type CssClassMap = { [className: string]: boolean };\n\nexport type IconType = keyof typeof Icons;\n\nexport type Theme = {\n foregroundColor?: string;\n backgroundColor?: string;\n borderRadius?: BorderRadius;\n font?: string;\n customPalette?: CustomPalette;\n customFontSizes?: CustomFontSizes;\n};\n\nexport type BorderRadius = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'full';\n\nexport interface CustomFontSizes {\n body2XS?: string;\n bodyXS?: string;\n bodyS?: string;\n bodyM?: string;\n bodyL?: string;\n bodyXL?: string;\n headingXS?: string;\n headingS?: string;\n headingM?: string;\n headingL?: string;\n headingXL?: string;\n heading2XL?: string;\n}\n\nexport interface CustomPalette {\n text?: {\n primary?: string;\n secondary?: string;\n subtle?: string;\n inverted?: string;\n error?: string;\n };\n modal?: {\n surface?: {\n main?: string;\n footer?: string;\n };\n border?: string;\n };\n input?: {\n surface?: {\n disabled?: string;\n default?: string;\n hover?: string;\n };\n border?: {\n placeholder?: string;\n active?: string;\n error?: string;\n };\n };\n select?: {\n surface?: {\n disabled?: string;\n default?: string;\n hover?: string;\n };\n border?: {\n placeholder?: string;\n active?: string;\n error?: string;\n };\n dropdown?: {\n border?: string;\n };\n };\n file?: {\n surface?: {\n disabled?: string;\n default?: string;\n drag?: string;\n };\n border?: {\n placeholder?: string;\n error?: string;\n };\n };\n tileButton?: {\n surface?: {\n default?: string;\n hover?: string;\n pressed?: string;\n };\n border?: string;\n };\n primaryButton?: {\n surface?: {\n default?: string;\n hover?: string;\n pressed?: string;\n disabled?: string;\n };\n border?: {\n default?: string;\n disabled?: string;\n };\n outline?: string;\n };\n secondaryButton?: {\n surface?: {\n default?: string;\n hover?: string;\n pressed?: string;\n disabled?: string;\n };\n border?: {\n default?: string;\n disabled?: string;\n };\n outline?: string;\n };\n destructiveButton?: {\n surface?: {\n default?: string;\n hover?: string;\n pressed?: string;\n disabled?: string;\n };\n border?: {\n default?: string;\n disabled?: string;\n };\n outline?: string;\n };\n divider?: string;\n spinner?: {\n path?: string;\n circle?: string;\n };\n pill?: {\n text?: string;\n container?: {\n background?: string;\n border?: string;\n };\n };\n progressIndicator?: {\n active?: string;\n next?: string;\n previous?: string;\n };\n qr?: {\n fill?: string;\n background?: string;\n border?: string;\n };\n slideButton?: {\n slider?: {\n background?: string;\n border?: string;\n text?: string;\n container?: {\n start?: {\n background?: string;\n border?: string;\n };\n end?: {\n background?: string;\n border?: string;\n };\n };\n };\n start?: {\n text?: string;\n };\n end?: {\n text?: string;\n };\n };\n alert?: {\n surface?: {\n error?: string;\n };\n border?: {\n error?: string;\n };\n };\n switch?: {\n surface?: {\n default?: string;\n checked?: string;\n };\n thumb?: {\n default?: string;\n checked?: string;\n };\n };\n checkbox?: {\n surface?: {\n default?: string;\n checked?: string;\n };\n border?: {\n default?: string;\n checked?: string;\n };\n icon?: string;\n };\n radio?: {\n surface?: {\n default?: string;\n checked?: string;\n };\n border?: {\n default?: string;\n checked?: string;\n };\n };\n card?: {\n surface?: string;\n border?: string;\n };\n}\n\nexport interface InteractionCallback {\n eventName: string;\n callback: (ev: any) => void;\n}\n"]}
@@ -54,10 +54,13 @@ export const generateBorderRadii = ({ borderRadius }) => {
54
54
  }
55
55
  }
56
56
  document.documentElement.style.setProperty('--cpsl-border-radius-input', `${isFull ? fullRadius : smallRadius}px`);
57
+ document.documentElement.style.setProperty('--cpsl-border-radius-select', `${isFull ? fullRadius : smallRadius}px`);
58
+ document.documentElement.style.setProperty('--cpsl-border-radius-file', `${isFull ? fullRadius : smallRadius}px`);
57
59
  document.documentElement.style.setProperty('--cpsl-border-radius-alert', `${smallRadius}px`);
58
60
  document.documentElement.style.setProperty('--cpsl-border-radius-tabs', `${isFull ? fullRadius : smallRadius}px`);
59
61
  document.documentElement.style.setProperty('--cpsl-border-radius-primary-button', `${isFull ? fullRadius : smallRadius}px`);
60
62
  document.documentElement.style.setProperty('--cpsl-border-radius-secondary-button', `${isFull ? fullRadius : smallRadius}px`);
63
+ document.documentElement.style.setProperty('--cpsl-border-radius-destructive-button', `${isFull ? fullRadius : smallRadius}px`);
61
64
  document.documentElement.style.setProperty('--cpsl-border-radius-tile-button', `${smallRadius}px`);
62
65
  document.documentElement.style.setProperty('--cpsl-border-radius-modal', `${mediumRadius}px`);
63
66
  document.documentElement.style.setProperty('--cpsl-border-radius-pill', `${isNone ? 0 : fullRadius}px`);
@@ -69,5 +72,6 @@ export const generateBorderRadii = ({ borderRadius }) => {
69
72
  document.documentElement.style.setProperty('--cpsl-border-radius-radio', `${fullRadius}px`);
70
73
  document.documentElement.style.setProperty('--cpsl-border-radius-avatar', `${smallRadius}px`);
71
74
  document.documentElement.style.setProperty('--cpsl-border-radius-card', `${mediumRadius}px`);
75
+ document.documentElement.style.setProperty('--cpsl-border-radius-button-group', `${xSmallRadius}px`);
72
76
  };
73
77
  //# sourceMappingURL=generateBorderRadii.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"generateBorderRadii.js","sourceRoot":"","sources":["../../../../src/utils/theme/generateBorderRadii.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,EAAE,YAAY,EAA+B,EAAE,EAAE;IACnF,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC;QAC3B,OAAO;IACT,CAAC;IAED,IAAI,YAAoB,EAAE,WAAmB,EAAE,YAAoB,EAAE,WAAmB,CAAC;IACzF,MAAM,UAAU,GAAG,IAAI,CAAC;IACxB,IAAI,MAAM,GAAG,KAAK,CAAC;IACnB,IAAI,MAAM,GAAG,KAAK,CAAC;IAEnB,QAAQ,YAAY,EAAE,CAAC;QACrB,KAAK,MAAM,CAAC,CAAC,CAAC;YACZ,MAAM,GAAG,IAAI,CAAC;YACd,YAAY,GAAG,CAAC,CAAC;YACjB,WAAW,GAAG,CAAC,CAAC;YAChB,YAAY,GAAG,CAAC,CAAC;YACjB,WAAW,GAAG,CAAC,CAAC;YAChB,MAAM;QACR,CAAC;QACD,KAAK,IAAI,CAAC,CAAC,CAAC;YACV,YAAY,GAAG,CAAC,CAAC;YACjB,WAAW,GAAG,CAAC,CAAC;YAChB,YAAY,GAAG,EAAE,CAAC;YAClB,WAAW,GAAG,EAAE,CAAC;YACjB,MAAM;QACR,CAAC;QACD,KAAK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eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,6BAA6B,EAAE,GAAG,WAAW,IAAI,CAAC,CAAC;IAC9F,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,2BAA2B,EAAE,GAAG,YAAY,IAAI,CAAC,CAAC;AAC/F,CAAC,CAAC","sourcesContent":["import { Theme } from '../../interface';\n\nexport const generateBorderRadii = ({ borderRadius }: Pick<Theme, 'borderRadius'>) => {\n if (!Boolean(borderRadius)) {\n return;\n }\n\n let xSmallRadius: number, smallRadius: number, mediumRadius: number, largeRadius: number;\n const fullRadius = 1000;\n let isFull = false;\n let isNone = false;\n\n switch (borderRadius) {\n case 'none': {\n isNone = true;\n xSmallRadius = 0;\n smallRadius = 0;\n mediumRadius = 0;\n largeRadius = 0;\n break;\n }\n case 'xs': {\n xSmallRadius = 2;\n smallRadius = 4;\n mediumRadius = 12;\n largeRadius = 20;\n break;\n }\n case 'sm': {\n xSmallRadius = 2;\n smallRadius = 8;\n mediumRadius = 16;\n largeRadius = 24;\n break;\n }\n case 'lg': {\n xSmallRadius = 8;\n smallRadius = 16;\n mediumRadius = 24;\n largeRadius = 32;\n break;\n }\n case 'full': {\n xSmallRadius = 8;\n smallRadius = 16;\n mediumRadius = 24;\n largeRadius = 32;\n isFull = true;\n break;\n }\n default:\n case 'md': {\n xSmallRadius = 4;\n smallRadius = 12;\n mediumRadius = 20;\n largeRadius = 28;\n break;\n }\n }\n\n document.documentElement.style.setProperty('--cpsl-border-radius-input', `${isFull ? fullRadius : smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-alert', `${smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-tabs', `${isFull ? fullRadius : smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-primary-button', `${isFull ? fullRadius : smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-secondary-button', `${isFull ? fullRadius : smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-tile-button', `${smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-modal', `${mediumRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-pill', `${isNone ? 0 : fullRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-qr-code', `${largeRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-info-box', `${smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-table-container', `${mediumRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-switch', `${isNone ? 0 : fullRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-checkbox', `${xSmallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-radio', `${fullRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-avatar', `${smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-card', `${mediumRadius}px`);\n};\n"]}
1
+ {"version":3,"file":"generateBorderRadii.js","sourceRoot":"","sources":["../../../../src/utils/theme/generateBorderRadii.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,EAAE,YAAY,EAA+B,EAAE,EAAE;IACnF,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC;QAC3B,OAAO;IACT,CAAC;IAED,IAAI,YAAoB,EAAE,WAAmB,EAAE,YAAoB,EAAE,WAAmB,CAAC;IACzF,MAAM,UAAU,GAAG,IAAI,CAAC;IACxB,IAAI,MAAM,GAAG,KAAK,CAAC;IACnB,IAAI,MAAM,GAAG,KAAK,CAAC;IAEnB,QAAQ,YAAY,EAAE,CAAC;QACrB,KAAK,MAAM,CAAC,CAAC,CAAC;YACZ,MAAM,GAAG,IAAI,CAAC;YACd,YAAY,GAAG,CAAC,CAAC;YACjB,WAAW,GAAG,CAAC,CAAC;YAChB,YAAY,GAAG,CAAC,CAAC;YACjB,WAAW,GAAG,CAAC,CAAC;YAChB,MAAM;QACR,CAAC;QACD,KAAK,IAAI,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BAA8B,EAAE,GAAG,WAAW,IAAI,CAAC,CAAC;IAC/F,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,+BAA+B,EAAE,GAAG,WAAW,IAAI,CAAC,CAAC;IAChG,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,sCAAsC,EAAE,GAAG,YAAY,IAAI,CAAC,CAAC;IACxG,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,6BAA6B,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC;IAC1G,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,+BAA+B,EAAE,GAAG,YAAY,IAAI,CAAC,CAAC;IACjG,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,4BAA4B,EAAE,GAAG,UAAU,IAAI,CAAC,CAAC;IAC5F,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,6BAA6B,EAAE,GAAG,WAAW,IAAI,CAAC,CAAC;IAC9F,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,2BAA2B,EAAE,GAAG,YAAY,IAAI,CAAC,CAAC;IAC7F,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,mCAAmC,EAAE,GAAG,YAAY,IAAI,CAAC,CAAC;AACvG,CAAC,CAAC","sourcesContent":["import { Theme } from '../../interface';\n\nexport const generateBorderRadii = ({ borderRadius }: Pick<Theme, 'borderRadius'>) => {\n if (!Boolean(borderRadius)) {\n return;\n }\n\n let xSmallRadius: number, smallRadius: number, mediumRadius: number, largeRadius: number;\n const fullRadius = 1000;\n let isFull = false;\n let isNone = false;\n\n switch (borderRadius) {\n case 'none': {\n isNone = true;\n xSmallRadius = 0;\n smallRadius = 0;\n mediumRadius = 0;\n largeRadius = 0;\n break;\n }\n case 'xs': {\n xSmallRadius = 2;\n smallRadius = 4;\n mediumRadius = 12;\n largeRadius = 20;\n break;\n }\n case 'sm': {\n xSmallRadius = 2;\n smallRadius = 8;\n mediumRadius = 16;\n largeRadius = 24;\n break;\n }\n case 'lg': {\n xSmallRadius = 8;\n smallRadius = 16;\n mediumRadius = 24;\n largeRadius = 32;\n break;\n }\n case 'full': {\n xSmallRadius = 8;\n smallRadius = 16;\n mediumRadius = 24;\n largeRadius = 32;\n isFull = true;\n break;\n }\n default:\n case 'md': {\n xSmallRadius = 4;\n smallRadius = 12;\n mediumRadius = 20;\n largeRadius = 28;\n break;\n }\n }\n\n document.documentElement.style.setProperty('--cpsl-border-radius-input', `${isFull ? fullRadius : smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-select', `${isFull ? fullRadius : smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-file', `${isFull ? fullRadius : smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-alert', `${smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-tabs', `${isFull ? fullRadius : smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-primary-button', `${isFull ? fullRadius : smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-secondary-button', `${isFull ? fullRadius : smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-destructive-button', `${isFull ? fullRadius : smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-tile-button', `${smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-modal', `${mediumRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-pill', `${isNone ? 0 : fullRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-qr-code', `${largeRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-info-box', `${smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-table-container', `${mediumRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-switch', `${isNone ? 0 : fullRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-checkbox', `${xSmallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-radio', `${fullRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-avatar', `${smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-card', `${mediumRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-button-group', `${xSmallRadius}px`);\n};\n"]}
@@ -38,9 +38,17 @@ export const generatePalette = ({ foregroundColor, backgroundColor, customPalett
38
38
  document.documentElement.style.setProperty('--cpsl-color-foreground-64', palette.foregroundColors[6]);
39
39
  document.documentElement.style.setProperty('--cpsl-color-foreground-80', palette.foregroundColors[7]);
40
40
  document.documentElement.style.setProperty('--cpsl-color-foreground-96', palette.foregroundColors[8]);
41
- document.documentElement.style.setProperty('--cpsl-color-utility-red', overlayMix(foregroundColor, UTILITY_COLORS.red));
42
- document.documentElement.style.setProperty('--cpsl-color-utility-yellow', overlayMix(foregroundColor, UTILITY_COLORS.yellow));
43
- document.documentElement.style.setProperty('--cpsl-color-utility-green', overlayMix(foregroundColor, UTILITY_COLORS.green));
41
+ const utilityLightMixColor = '#FFFFFF';
42
+ const utilityLightMixValue = 0.72;
43
+ const red = overlayMix(foregroundColor, UTILITY_COLORS.red);
44
+ const yellow = overlayMix(foregroundColor, UTILITY_COLORS.yellow);
45
+ const green = overlayMix(foregroundColor, UTILITY_COLORS.green);
46
+ document.documentElement.style.setProperty('--cpsl-color-utility-red', red);
47
+ document.documentElement.style.setProperty('--cpsl-color-utility-yellow', yellow);
48
+ document.documentElement.style.setProperty('--cpsl-color-utility-green', green);
49
+ document.documentElement.style.setProperty('--cpsl-color-utility-red-light', mix(red, utilityLightMixColor, utilityLightMixValue));
50
+ document.documentElement.style.setProperty('--cpsl-color-utility-yellow-light', mix(yellow, utilityLightMixColor, utilityLightMixValue));
51
+ document.documentElement.style.setProperty('--cpsl-color-utility-green-light', mix(green, utilityLightMixColor, utilityLightMixValue));
44
52
  if (Boolean(customPalette)) {
45
53
  const cssColorVars = getCssColors(customPalette);
46
54
  Object.entries(cssColorVars).forEach(([k, v]) => document.documentElement.style.setProperty(k, v));
@@ -1 +1 @@
1
- {"version":3,"file":"generatePalette.js","sourceRoot":"","sources":["../../../../src/utils/theme/generatePalette.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAQ7E,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAAE,eAAe,EAAE,eAAe,EAAE,aAAa,EAAwE,EAAW,EAAE;IACpK,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,CAAC;QAC3D,eAAe,GAAG,aAAa,CAAC,eAAe,CAAC;IAClD,CAAC;IACD,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,CAAC;QAC3D,eAAe,GAAG,aAAa,CAAC,eAAe,CAAC;IAClD,CAAC;IAED,MAAM,gBAAgB,GAAG,CAAC,oBAAoB,CAAC,eAAe,CAAC,CAAC;IAEhE,MAAM,OAAO,GAAY;QACvB,gBAAgB,EAAE,EAAE;QACpB,gBAAgB,EAAE,EAAE;QACpB,gBAAgB;KACjB,CAAC;IAEF,MAAM,kBAAkB,GAAG,gBAAgB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;IACpE,MAAM,kBAAkB,GAAG,gBAAgB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;IAEpE,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QAC1B,OAAO,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,UAAU,CAAC,eAAe,EAAE,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC;IACxH,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,6BAA6B,EAAE,UAAU,CAAC,eAAe,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;IAC9H,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,4BAA4B,EAAE,UAAU,CAAC,eAAe,EAAE,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC;IAE5H,IAAI,OAAO,CAAC,aAAa,CAAC,EAAE,CAAC;QAC3B,MAAM,YAAY,GAAG,YAAY,CAAC,aAAa,CAAC,CAAC;QACjD,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACrG,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC","sourcesContent":["import { mix, readableColorIsBlack } from 'color2k';\nimport { Theme } from '../../interface';\nimport { getCssColors, isColor, overlayMix } from './utils';\nimport { COLOR_MIXES, DEFAULT_THEME, UTILITY_COLORS } from '../../constants';\n\nexport type Palette = {\n foregroundColors: string[];\n backgroundColors: string[];\n isDarkBackground: boolean;\n};\n\nexport const generatePalette = ({ foregroundColor, backgroundColor, customPalette }: Pick<Theme, 'foregroundColor' | 'backgroundColor' | 'customPalette'>): Palette => {\n if (!Boolean(foregroundColor) || !isColor(foregroundColor)) {\n foregroundColor = DEFAULT_THEME.foregroundColor;\n }\n if (!Boolean(backgroundColor) || !isColor(backgroundColor)) {\n backgroundColor = DEFAULT_THEME.backgroundColor;\n }\n\n const isDarkBackground = !readableColorIsBlack(backgroundColor);\n\n const palette: Palette = {\n foregroundColors: [],\n backgroundColors: [],\n isDarkBackground,\n };\n\n const backgroundMixColor = isDarkBackground ? '#FFFFFF' : '#000000';\n const foregroundMixColor = isDarkBackground ? '#000000' : '#FFFFFF';\n\n COLOR_MIXES.forEach(value => {\n palette.foregroundColors.push(mix(foregroundColor, foregroundMixColor, value));\n palette.backgroundColors.push(mix(backgroundColor, backgroundMixColor, value));\n });\n\n // BACKGROUND\n document.documentElement.style.setProperty('--cpsl-color-background-0', palette.backgroundColors[0]);\n document.documentElement.style.setProperty('--cpsl-color-background-4', palette.backgroundColors[1]);\n document.documentElement.style.setProperty('--cpsl-color-background-8', palette.backgroundColors[2]);\n document.documentElement.style.setProperty('--cpsl-color-background-16', palette.backgroundColors[3]);\n document.documentElement.style.setProperty('--cpsl-color-background-32', palette.backgroundColors[4]);\n document.documentElement.style.setProperty('--cpsl-color-background-48', palette.backgroundColors[5]);\n document.documentElement.style.setProperty('--cpsl-color-background-64', palette.backgroundColors[6]);\n document.documentElement.style.setProperty('--cpsl-color-background-80', palette.backgroundColors[7]);\n document.documentElement.style.setProperty('--cpsl-color-background-96', palette.backgroundColors[8]);\n\n // FOREGROUND\n document.documentElement.style.setProperty('--cpsl-color-foreground-0', palette.foregroundColors[0]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-4', palette.foregroundColors[1]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-8', palette.foregroundColors[2]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-16', palette.foregroundColors[3]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-32', palette.foregroundColors[4]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-48', palette.foregroundColors[5]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-64', palette.foregroundColors[6]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-80', palette.foregroundColors[7]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-96', palette.foregroundColors[8]);\n\n // UTILITY\n document.documentElement.style.setProperty('--cpsl-color-utility-red', overlayMix(foregroundColor, UTILITY_COLORS.red));\n document.documentElement.style.setProperty('--cpsl-color-utility-yellow', overlayMix(foregroundColor, UTILITY_COLORS.yellow));\n document.documentElement.style.setProperty('--cpsl-color-utility-green', overlayMix(foregroundColor, UTILITY_COLORS.green));\n\n if (Boolean(customPalette)) {\n const cssColorVars = getCssColors(customPalette);\n Object.entries(cssColorVars).forEach(([k, v]) => document.documentElement.style.setProperty(k, v));\n }\n\n return palette;\n};\n"]}
1
+ {"version":3,"file":"generatePalette.js","sourceRoot":"","sources":["../../../../src/utils/theme/generatePalette.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAQ7E,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAAE,eAAe,EAAE,eAAe,EAAE,aAAa,EAAwE,EAAW,EAAE;IACpK,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,CAAC;QAC3D,eAAe,GAAG,aAAa,CAAC,eAAe,CAAC;IAClD,CAAC;IACD,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,CAAC;QAC3D,eAAe,GAAG,aAAa,CAAC,eAAe,CAAC;IAClD,CAAC;IAED,MAAM,gBAAgB,GAAG,CAAC,oBAAoB,CAAC,eAAe,CAAC,CAAC;IAEhE,MAAM,OAAO,GAAY;QACvB,gBAAgB,EAAE,EAAE;QACpB,gBAAgB,EAAE,EAAE;QACpB,gBAAgB;KACjB,CAAC;IAEF,MAAM,kBAAkB,GAAG,gBAAgB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;IACpE,MAAM,kBAAkB,GAAG,gBAAgB,CAAC,CAAC,CAAC,S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AQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACrG,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC","sourcesContent":["import { mix, readableColorIsBlack } from 'color2k';\nimport { Theme } from '../../interface';\nimport { getCssColors, isColor, overlayMix } from './utils';\nimport { COLOR_MIXES, DEFAULT_THEME, UTILITY_COLORS } from '../../constants';\n\nexport type Palette = {\n foregroundColors: string[];\n backgroundColors: string[];\n isDarkBackground: boolean;\n};\n\nexport const generatePalette = ({ foregroundColor, backgroundColor, customPalette }: Pick<Theme, 'foregroundColor' | 'backgroundColor' | 'customPalette'>): Palette => {\n if (!Boolean(foregroundColor) || !isColor(foregroundColor)) {\n foregroundColor = DEFAULT_THEME.foregroundColor;\n }\n if (!Boolean(backgroundColor) || !isColor(backgroundColor)) {\n backgroundColor = DEFAULT_THEME.backgroundColor;\n }\n\n const isDarkBackground = !readableColorIsBlack(backgroundColor);\n\n const palette: Palette = {\n foregroundColors: [],\n backgroundColors: [],\n isDarkBackground,\n };\n\n const backgroundMixColor = isDarkBackground ? '#FFFFFF' : '#000000';\n const foregroundMixColor = isDarkBackground ? '#000000' : '#FFFFFF';\n\n COLOR_MIXES.forEach(value => {\n palette.foregroundColors.push(mix(foregroundColor, foregroundMixColor, value));\n palette.backgroundColors.push(mix(backgroundColor, backgroundMixColor, value));\n });\n\n // BACKGROUND\n document.documentElement.style.setProperty('--cpsl-color-background-0', palette.backgroundColors[0]);\n document.documentElement.style.setProperty('--cpsl-color-background-4', palette.backgroundColors[1]);\n document.documentElement.style.setProperty('--cpsl-color-background-8', palette.backgroundColors[2]);\n document.documentElement.style.setProperty('--cpsl-color-background-16', palette.backgroundColors[3]);\n document.documentElement.style.setProperty('--cpsl-color-background-32', palette.backgroundColors[4]);\n document.documentElement.style.setProperty('--cpsl-color-background-48', palette.backgroundColors[5]);\n document.documentElement.style.setProperty('--cpsl-color-background-64', palette.backgroundColors[6]);\n document.documentElement.style.setProperty('--cpsl-color-background-80', palette.backgroundColors[7]);\n document.documentElement.style.setProperty('--cpsl-color-background-96', palette.backgroundColors[8]);\n\n // FOREGROUND\n document.documentElement.style.setProperty('--cpsl-color-foreground-0', palette.foregroundColors[0]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-4', palette.foregroundColors[1]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-8', palette.foregroundColors[2]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-16', palette.foregroundColors[3]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-32', palette.foregroundColors[4]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-48', palette.foregroundColors[5]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-64', palette.foregroundColors[6]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-80', palette.foregroundColors[7]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-96', palette.foregroundColors[8]);\n\n const utilityLightMixColor = '#FFFFFF';\n const utilityLightMixValue = 0.72;\n // UTILITY\n const red = overlayMix(foregroundColor, UTILITY_COLORS.red);\n const yellow = overlayMix(foregroundColor, UTILITY_COLORS.yellow);\n const green = overlayMix(foregroundColor, UTILITY_COLORS.green);\n document.documentElement.style.setProperty('--cpsl-color-utility-red', red);\n document.documentElement.style.setProperty('--cpsl-color-utility-yellow', yellow);\n document.documentElement.style.setProperty('--cpsl-color-utility-green', green);\n document.documentElement.style.setProperty('--cpsl-color-utility-red-light', mix(red, utilityLightMixColor, utilityLightMixValue));\n document.documentElement.style.setProperty('--cpsl-color-utility-yellow-light', mix(yellow, utilityLightMixColor, utilityLightMixValue));\n document.documentElement.style.setProperty('--cpsl-color-utility-green-light', mix(green, utilityLightMixColor, utilityLightMixValue));\n\n if (Boolean(customPalette)) {\n const cssColorVars = getCssColors(customPalette);\n Object.entries(cssColorVars).forEach(([k, v]) => document.documentElement.style.setProperty(k, v));\n }\n\n return palette;\n};\n"]}