@usecapsule/core-components 3.0.1 → 3.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (210) hide show
  1. package/css/capsule-core.css +93 -24
  2. package/css/capsule-core.css.map +1 -1
  3. package/dist/capsule/capsule.esm.js +1 -1
  4. package/dist/capsule/capsule.esm.js.map +1 -1
  5. package/dist/capsule/index.esm.js +1 -1
  6. package/dist/capsule/index.esm.js.map +1 -1
  7. package/dist/capsule/p-02072c68.entry.js +2 -0
  8. package/dist/capsule/p-02072c68.entry.js.map +1 -0
  9. package/dist/capsule/p-1474c545.entry.js +29 -0
  10. package/dist/capsule/p-1474c545.entry.js.map +1 -0
  11. package/dist/capsule/p-2c16694d.entry.js +2 -0
  12. package/dist/capsule/p-41088cd4.entry.js +2 -0
  13. package/dist/capsule/{p-fcead80b.entry.js.map → p-41088cd4.entry.js.map} +1 -1
  14. package/dist/capsule/{p-fa078837.entry.js → p-6dcaee48.entry.js} +2 -2
  15. package/dist/capsule/p-7dde3172.js +3 -0
  16. package/dist/capsule/p-7dde3172.js.map +1 -0
  17. package/dist/capsule/{p-d28b96ba.entry.js → p-a6aaf3f4.entry.js} +2 -2
  18. package/dist/capsule/{p-0d0a0037.entry.js → p-b976b6f0.entry.js} +2 -2
  19. package/dist/capsule/p-f2393be6.js +2 -0
  20. package/dist/capsule/p-f2393be6.js.map +1 -0
  21. package/dist/cjs/capsule.cjs.js +2 -2
  22. package/dist/cjs/{constants-0869a780.js → constants-9b1b01bb.js} +3 -3
  23. package/dist/cjs/{constants-0869a780.js.map → constants-9b1b01bb.js.map} +1 -1
  24. package/dist/cjs/{cpsl-alert_29.cjs.entry.js → cpsl-alert_33.cjs.entry.js} +662 -87
  25. package/dist/cjs/cpsl-alert_33.cjs.entry.js.map +1 -0
  26. package/dist/cjs/cpsl-animation.cjs.entry.js +1 -1
  27. package/dist/cjs/cpsl-col.cjs.entry.js +1 -1
  28. package/dist/cjs/cpsl-grid.cjs.entry.js +3 -3
  29. package/dist/cjs/cpsl-info-box.cjs.entry.js +3 -3
  30. package/dist/cjs/cpsl-info-box.cjs.entry.js.map +1 -1
  31. package/dist/cjs/cpsl-modal-v2.cjs.entry.js +55 -0
  32. package/dist/cjs/cpsl-modal-v2.cjs.entry.js.map +1 -0
  33. package/dist/cjs/cpsl-row.cjs.entry.js +2 -2
  34. package/dist/cjs/{index-5733071e.js → index-528f7428.js} +86 -3
  35. package/dist/cjs/index-528f7428.js.map +1 -0
  36. package/dist/cjs/index.cjs.js +116 -107
  37. package/dist/cjs/index.cjs.js.map +1 -1
  38. package/dist/cjs/loader.cjs.js +2 -2
  39. package/dist/collection/assets/icons/chevron-up.svg +2 -2
  40. package/dist/collection/assets/icons/close.svg +3 -4
  41. package/dist/collection/assets/icons/cube.svg +3 -0
  42. package/dist/collection/assets/icons/farcaster-brand.svg +10 -0
  43. package/dist/collection/assets/icons/farcaster.svg +10 -0
  44. package/dist/collection/assets/icons/image.svg +3 -0
  45. package/dist/collection/assets/icons/index.js +9 -1
  46. package/dist/collection/assets/icons/index.js.map +1 -1
  47. package/dist/collection/assets/icons/menu.svg +3 -0
  48. package/dist/collection/assets/icons/refresh.svg +3 -0
  49. package/dist/collection/assets/icons/stars.svg +4 -0
  50. package/dist/collection/assets/icons/x.svg +3 -0
  51. package/dist/collection/collection-manifest.json +5 -0
  52. package/dist/collection/components/cpsl-alert/cpsl-alert.js +1 -1
  53. package/dist/collection/components/cpsl-app-bar/cpsl-app-bar.js +20 -4
  54. package/dist/collection/components/cpsl-app-bar/cpsl-app-bar.js.map +1 -1
  55. package/dist/collection/components/cpsl-button/cpsl-button.css +113 -17
  56. package/dist/collection/components/cpsl-button/cpsl-button.js +63 -7
  57. package/dist/collection/components/cpsl-button/cpsl-button.js.map +1 -1
  58. package/dist/collection/components/cpsl-button-group/cpsl-button-group.css +1 -0
  59. package/dist/collection/components/cpsl-card/cpsl-card.css +1 -1
  60. package/dist/collection/components/cpsl-card/cpsl-card.js +1 -1
  61. package/dist/collection/components/cpsl-card/cpsl-card.js.map +1 -1
  62. package/dist/collection/components/cpsl-checkbox/cpsl-checkbox.css +2 -2
  63. package/dist/collection/components/cpsl-code-input/cpsl-code-input.css +1 -1
  64. package/dist/collection/components/cpsl-divider/cpsl-divider.css +1 -1
  65. package/dist/collection/components/cpsl-drawer/cpsl-drawer.js +84 -11
  66. package/dist/collection/components/cpsl-drawer/cpsl-drawer.js.map +1 -1
  67. package/dist/collection/components/cpsl-dropdown/cpsl-dropdown.js +1 -1
  68. package/dist/collection/components/cpsl-dropdown/cpsl-dropdown.js.map +1 -1
  69. package/dist/collection/components/cpsl-file-upload/cpsl-file-upload.css +211 -0
  70. package/dist/collection/components/cpsl-file-upload/cpsl-file-upload.js +406 -0
  71. package/dist/collection/components/cpsl-file-upload/cpsl-file-upload.js.map +1 -0
  72. package/dist/collection/components/cpsl-file-upload/test/cpsl-file-upload.e2e.js +29 -0
  73. package/dist/collection/components/cpsl-file-upload/test/cpsl-file-upload.e2e.js.map +1 -0
  74. package/dist/collection/components/cpsl-file-upload/test/cpsl-file-upload.spec.js +37 -0
  75. package/dist/collection/components/cpsl-file-upload/test/cpsl-file-upload.spec.js.map +1 -0
  76. package/dist/collection/components/cpsl-grid/cpsl-grid.js +2 -2
  77. package/dist/collection/components/cpsl-icon/cpsl-icon.js +2 -2
  78. package/dist/collection/components/cpsl-info-box/cpsl-info-box.css +1 -1
  79. package/dist/collection/components/cpsl-info-box/cpsl-info-box.js +1 -1
  80. package/dist/collection/components/cpsl-input/cpsl-input.css +7 -6
  81. package/dist/collection/components/cpsl-input/cpsl-input.js +3 -8
  82. package/dist/collection/components/cpsl-input/cpsl-input.js.map +1 -1
  83. package/dist/collection/components/cpsl-modal/cpsl-modal.css +4 -4
  84. package/dist/collection/components/cpsl-modal/cpsl-modal.js +1 -0
  85. package/dist/collection/components/cpsl-modal/cpsl-modal.js.map +1 -1
  86. package/dist/collection/components/cpsl-modal-v2/cpsl-modal-v2.css +91 -0
  87. package/dist/collection/components/cpsl-modal-v2/cpsl-modal-v2.js +224 -0
  88. package/dist/collection/components/cpsl-modal-v2/cpsl-modal-v2.js.map +1 -0
  89. package/dist/collection/components/cpsl-modal-v2/test/cpsl-modal-v2.e2e.js +29 -0
  90. package/dist/collection/components/cpsl-modal-v2/test/cpsl-modal-v2.e2e.js.map +1 -0
  91. package/dist/collection/components/cpsl-modal-v2/test/cpsl-modal-v2.spec.js +37 -0
  92. package/dist/collection/components/cpsl-modal-v2/test/cpsl-modal-v2.spec.js.map +1 -0
  93. package/dist/collection/components/cpsl-nav-button-group/cpsl-nav-button-group.js +1 -1
  94. package/dist/collection/components/cpsl-overlay/cpsl-overlay.css +1 -1
  95. package/dist/collection/components/cpsl-overlay/cpsl-overlay.js +1 -1
  96. package/dist/collection/components/cpsl-pagination/cpsl-pagination.css +4 -0
  97. package/dist/collection/components/cpsl-pagination/cpsl-pagination.js +1 -1
  98. package/dist/collection/components/cpsl-pagination/cpsl-pagination.js.map +1 -1
  99. package/dist/collection/components/cpsl-pill/cpsl-pill.css +1 -1
  100. package/dist/collection/components/cpsl-pill/cpsl-pill.js +1 -1
  101. package/dist/collection/components/cpsl-popover/cpsl-popover.css +98 -0
  102. package/dist/collection/components/cpsl-popover/cpsl-popover.js +511 -0
  103. package/dist/collection/components/cpsl-popover/cpsl-popover.js.map +1 -0
  104. package/dist/collection/components/cpsl-popover/test/cpsl-popover.e2e.js +29 -0
  105. package/dist/collection/components/cpsl-popover/test/cpsl-popover.e2e.js.map +1 -0
  106. package/dist/collection/components/cpsl-popover/test/cpsl-popover.spec.js +37 -0
  107. package/dist/collection/components/cpsl-popover/test/cpsl-popover.spec.js.map +1 -0
  108. package/dist/collection/components/cpsl-progress-indicator/cpsl-progress-indicator.css +3 -3
  109. package/dist/collection/components/cpsl-qr-code/cpsl-qr-code.css +1 -1
  110. package/dist/collection/components/cpsl-qr-code/cpsl-qr-code.js +1 -1
  111. package/dist/collection/components/cpsl-radio/cpsl-radio.css +2 -2
  112. package/dist/collection/components/cpsl-radio/cpsl-radio.js +1 -1
  113. package/dist/collection/components/cpsl-row/cpsl-row.js +1 -1
  114. package/dist/collection/components/cpsl-select/cpsl-select.css +229 -0
  115. package/dist/collection/components/cpsl-select/cpsl-select.js +409 -0
  116. package/dist/collection/components/cpsl-select/cpsl-select.js.map +1 -0
  117. package/dist/collection/components/cpsl-select/test/cpsl-select.e2e.js +29 -0
  118. package/dist/collection/components/cpsl-select/test/cpsl-select.e2e.js.map +1 -0
  119. package/dist/collection/components/cpsl-select/test/cpsl-select.spec.js +37 -0
  120. package/dist/collection/components/cpsl-select/test/cpsl-select.spec.js.map +1 -0
  121. package/dist/collection/components/cpsl-select-item/cpsl-select-item.css +114 -0
  122. package/dist/collection/components/cpsl-select-item/cpsl-select-item.js +85 -0
  123. package/dist/collection/components/cpsl-select-item/cpsl-select-item.js.map +1 -0
  124. package/dist/collection/components/cpsl-select-item/test/cpsl-select-item.e2e.js +29 -0
  125. package/dist/collection/components/cpsl-select-item/test/cpsl-select-item.e2e.js.map +1 -0
  126. package/dist/collection/components/cpsl-select-item/test/cpsl-select-item.spec.js +37 -0
  127. package/dist/collection/components/cpsl-select-item/test/cpsl-select-item.spec.js.map +1 -0
  128. package/dist/collection/components/cpsl-slide-button/cpsl-slide-button.css +3 -3
  129. package/dist/collection/components/cpsl-slide-button/cpsl-slide-button.js +3 -3
  130. package/dist/collection/components/cpsl-spinner/cpsl-spinner.js +2 -2
  131. package/dist/collection/components/cpsl-switch/cpsl-switch.css +4 -4
  132. package/dist/collection/components/cpsl-switch/cpsl-switch.js +1 -1
  133. package/dist/collection/components/cpsl-tab/cpsl-tab.js +1 -1
  134. package/dist/collection/components/cpsl-table/cpsl-table.css +40 -60
  135. package/dist/collection/components/cpsl-table/cpsl-table.js +40 -58
  136. package/dist/collection/components/cpsl-table/cpsl-table.js.map +1 -1
  137. package/dist/collection/components/cpsl-tabs/cpsl-tabs.css +2 -2
  138. package/dist/collection/components/cpsl-tabs/cpsl-tabs.js +1 -1
  139. package/dist/collection/components/cpsl-text/cpsl-text.css +4 -0
  140. package/dist/collection/components/cpsl-text/cpsl-text.js +5 -4
  141. package/dist/collection/components/cpsl-text/cpsl-text.js.map +1 -1
  142. package/dist/collection/components/cpsl-tile-button/cpsl-tile-button.css +1 -1
  143. package/dist/collection/components/cpsl-tile-button/cpsl-tile-button.js +2 -2
  144. package/dist/collection/constants.js +2 -2
  145. package/dist/collection/constants.js.map +1 -1
  146. package/dist/collection/interface.js.map +1 -1
  147. package/dist/collection/utils/theme/generateBorderRadii.js +40 -39
  148. package/dist/collection/utils/theme/generateBorderRadii.js.map +1 -1
  149. package/dist/collection/utils/theme/generatePalette.js +11 -3
  150. package/dist/collection/utils/theme/generatePalette.js.map +1 -1
  151. package/dist/collection/utils/theme/generateTheme.js +2 -2
  152. package/dist/collection/utils/theme/generateTheme.js.map +1 -1
  153. package/dist/collection/utils/theme/utils.js +1 -0
  154. package/dist/collection/utils/theme/utils.js.map +1 -1
  155. package/dist/esm/capsule.js +3 -3
  156. package/dist/esm/{constants-6acf4ea8.js → constants-fce138fa.js} +3 -3
  157. package/dist/esm/{constants-6acf4ea8.js.map → constants-fce138fa.js.map} +1 -1
  158. package/dist/esm/{cpsl-alert_29.entry.js → cpsl-alert_33.entry.js} +659 -88
  159. package/dist/esm/cpsl-alert_33.entry.js.map +1 -0
  160. package/dist/esm/cpsl-animation.entry.js +1 -1
  161. package/dist/esm/cpsl-col.entry.js +1 -1
  162. package/dist/esm/cpsl-grid.entry.js +3 -3
  163. package/dist/esm/cpsl-info-box.entry.js +3 -3
  164. package/dist/esm/cpsl-info-box.entry.js.map +1 -1
  165. package/dist/esm/cpsl-modal-v2.entry.js +51 -0
  166. package/dist/esm/cpsl-modal-v2.entry.js.map +1 -0
  167. package/dist/esm/cpsl-row.entry.js +2 -2
  168. package/dist/esm/{index-8fe9f35e.js → index-b188f201.js} +86 -4
  169. package/dist/esm/index-b188f201.js.map +1 -0
  170. package/dist/esm/index.js +116 -107
  171. package/dist/esm/index.js.map +1 -1
  172. package/dist/esm/loader.js +3 -3
  173. package/dist/types/assets/icons/index.d.ts +8 -0
  174. package/dist/types/components/cpsl-app-bar/cpsl-app-bar.d.ts +1 -0
  175. package/dist/types/components/cpsl-button/cpsl-button.d.ts +4 -1
  176. package/dist/types/components/cpsl-drawer/cpsl-drawer.d.ts +10 -1
  177. package/dist/types/components/cpsl-file-upload/cpsl-file-upload.d.ts +34 -0
  178. package/dist/types/components/cpsl-input/cpsl-input.d.ts +1 -1
  179. package/dist/types/components/cpsl-modal-v2/cpsl-modal-v2.d.ts +17 -0
  180. package/dist/types/components/cpsl-popover/cpsl-popover.d.ts +35 -0
  181. package/dist/types/components/cpsl-select/cpsl-select.d.ts +38 -0
  182. package/dist/types/components/cpsl-select-item/cpsl-select-item.d.ts +8 -0
  183. package/dist/types/components/cpsl-table/cpsl-table.d.ts +8 -3
  184. package/dist/types/components/cpsl-text/cpsl-text.d.ts +1 -1
  185. package/dist/types/components.d.ts +596 -28
  186. package/dist/types/constants.d.ts +2 -2
  187. package/dist/types/interface.d.ts +68 -1
  188. package/dist/types/utils/theme/generateBorderRadii.d.ts +1 -1
  189. package/dist/types/utils/theme/generateTheme.d.ts +1 -1
  190. package/dist/types/utils/theme/utils.d.ts +4 -1
  191. package/package.json +2 -2
  192. package/dist/capsule/p-107e1ff5.entry.js +0 -29
  193. package/dist/capsule/p-107e1ff5.entry.js.map +0 -1
  194. package/dist/capsule/p-86e48e61.js +0 -3
  195. package/dist/capsule/p-86e48e61.js.map +0 -1
  196. package/dist/capsule/p-ad14a817.entry.js +0 -2
  197. package/dist/capsule/p-b6b38e73.js +0 -2
  198. package/dist/capsule/p-b6b38e73.js.map +0 -1
  199. package/dist/capsule/p-fcead80b.entry.js +0 -2
  200. package/dist/cjs/cpsl-alert_29.cjs.entry.js.map +0 -1
  201. package/dist/cjs/index-5733071e.js.map +0 -1
  202. package/dist/collection/components/cpsl-table/table-interface.js +0 -2
  203. package/dist/collection/components/cpsl-table/table-interface.js.map +0 -1
  204. package/dist/esm/cpsl-alert_29.entry.js.map +0 -1
  205. package/dist/esm/index-8fe9f35e.js.map +0 -1
  206. package/dist/types/components/cpsl-table/table-interface.d.ts +0 -19
  207. /package/dist/capsule/{p-ad14a817.entry.js.map → p-2c16694d.entry.js.map} +0 -0
  208. /package/dist/capsule/{p-fa078837.entry.js.map → p-6dcaee48.entry.js.map} +0 -0
  209. /package/dist/capsule/{p-d28b96ba.entry.js.map → p-a6aaf3f4.entry.js.map} +0 -0
  210. /package/dist/capsule/{p-0d0a0037.entry.js.map → p-b976b6f0.entry.js.map} +0 -0
@@ -11,7 +11,7 @@ export declare const DEFAULT_Z_INDICES: {
11
11
  modalNoOverlay: number;
12
12
  appBar: number;
13
13
  overlay: number;
14
- modal: number;
15
14
  drawer: number;
16
- modalWrapper: number;
15
+ modal: number;
16
+ popover: number;
17
17
  };
@@ -15,8 +15,31 @@ export type Theme = {
15
15
  font?: string;
16
16
  customPalette?: CustomPalette;
17
17
  customFontSizes?: CustomFontSizes;
18
+ customBorderRadii?: CustomBorderRadii;
18
19
  };
19
- export type BorderRadius = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'full';
20
+ export type BorderRadius = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
21
+ export interface CustomBorderRadii {
22
+ input?: string;
23
+ select?: string;
24
+ fileSelect?: string;
25
+ alert?: string;
26
+ tabs?: string;
27
+ primaryButton?: string;
28
+ secondaryButton?: string;
29
+ destructiveButton?: string;
30
+ tileButton?: string;
31
+ modal?: string;
32
+ pill?: string;
33
+ qrCode?: string;
34
+ infoBox?: string;
35
+ tableContainer?: string;
36
+ switch?: string;
37
+ checkbox?: string;
38
+ radio?: string;
39
+ avatar?: string;
40
+ card?: string;
41
+ buttonGroup?: string;
42
+ }
20
43
  export interface CustomFontSizes {
21
44
  body2XS?: string;
22
45
  bodyXS?: string;
@@ -50,6 +73,7 @@ export interface CustomPalette {
50
73
  surface?: {
51
74
  disabled?: string;
52
75
  default?: string;
76
+ hover?: string;
53
77
  };
54
78
  border?: {
55
79
  placeholder?: string;
@@ -57,6 +81,32 @@ export interface CustomPalette {
57
81
  error?: string;
58
82
  };
59
83
  };
84
+ select?: {
85
+ surface?: {
86
+ disabled?: string;
87
+ default?: string;
88
+ hover?: string;
89
+ };
90
+ border?: {
91
+ placeholder?: string;
92
+ active?: string;
93
+ error?: string;
94
+ };
95
+ dropdown?: {
96
+ border?: string;
97
+ };
98
+ };
99
+ file?: {
100
+ surface?: {
101
+ disabled?: string;
102
+ default?: string;
103
+ drag?: string;
104
+ };
105
+ border?: {
106
+ placeholder?: string;
107
+ error?: string;
108
+ };
109
+ };
60
110
  tileButton?: {
61
111
  surface?: {
62
112
  default?: string;
@@ -91,6 +141,19 @@ export interface CustomPalette {
91
141
  };
92
142
  outline?: string;
93
143
  };
144
+ destructiveButton?: {
145
+ surface?: {
146
+ default?: string;
147
+ hover?: string;
148
+ pressed?: string;
149
+ disabled?: string;
150
+ };
151
+ border?: {
152
+ default?: string;
153
+ disabled?: string;
154
+ };
155
+ outline?: string;
156
+ };
94
157
  divider?: string;
95
158
  spinner?: {
96
159
  path?: string;
@@ -180,3 +243,7 @@ export interface CustomPalette {
180
243
  border?: string;
181
244
  };
182
245
  }
246
+ export interface InteractionCallback {
247
+ eventName: string;
248
+ callback: (ev: any) => void;
249
+ }
@@ -1,2 +1,2 @@
1
1
  import { Theme } from '../../interface';
2
- export declare const generateBorderRadii: ({ borderRadius }: Pick<Theme, 'borderRadius'>) => void;
2
+ export declare const generateBorderRadii: ({ borderRadius, customBorderRadii }: Pick<Theme, 'borderRadius' | 'customBorderRadii'>) => void;
@@ -1,2 +1,2 @@
1
1
  import { Theme } from '../../interface';
2
- export declare const generateTheme: ({ foregroundColor, backgroundColor, font, customPalette, borderRadius, customFontSizes, }: Theme) => boolean;
2
+ export declare const generateTheme: ({ foregroundColor, backgroundColor, font, customPalette, borderRadius, customFontSizes, customBorderRadii, }: Theme) => boolean;
@@ -1,6 +1,9 @@
1
- import { CustomPalette } from '../../interface';
1
+ import { CustomBorderRadii, CustomPalette } from '../../interface';
2
2
  export declare const isColor: (strColor: any) => boolean;
3
3
  export declare const getCssColors: (customPalette: CustomPalette) => {
4
4
  [k: string]: string;
5
5
  };
6
+ export declare const getCssBorderRadii: (customBorderRadii: CustomBorderRadii) => {
7
+ [k: string]: string;
8
+ };
6
9
  export declare const overlayMix: (baseColor: string, overlayColor: string) => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@usecapsule/core-components",
3
- "version": "3.0.1",
3
+ "version": "3.1.1",
4
4
  "description": "Capsule Core Components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -51,5 +51,5 @@
51
51
  "stencil-inline-svg": "^1.1.0",
52
52
  "ts-node": "^10.9.2"
53
53
  },
54
- "gitHead": "ce327f37fb825d3ab1346fbaf317d67e09ae4a58"
54
+ "gitHead": "218adf71219748753bb71aed7d7c106d05b6d974"
55
55
  }