@usecapsule/core-components 1.0.13 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (158) hide show
  1. package/css/capsule-core.css +74 -41
  2. package/css/capsule-core.css.map +1 -1
  3. package/dist/capsule/capsule.esm.js +1 -1
  4. package/dist/capsule/capsule.esm.js.map +1 -1
  5. package/dist/capsule/index.esm.js +1 -1
  6. package/dist/capsule/index.esm.js.map +1 -1
  7. package/dist/capsule/p-0462f723.js +2 -0
  8. package/dist/capsule/p-0462f723.js.map +1 -0
  9. package/dist/capsule/p-654cb899.entry.js +29 -0
  10. package/dist/capsule/p-654cb899.entry.js.map +1 -0
  11. package/dist/capsule/p-68c73705.entry.js +2 -0
  12. package/dist/capsule/{p-1dc07cd7.entry.js.map → p-68c73705.entry.js.map} +1 -1
  13. package/dist/capsule/p-6fb7c4d1.js +3 -0
  14. package/dist/capsule/p-6fb7c4d1.js.map +1 -0
  15. package/dist/capsule/{p-11048392.entry.js → p-91412151.entry.js} +2 -2
  16. package/dist/capsule/{p-62e7869a.entry.js → p-a95ec4df.entry.js} +2 -2
  17. package/dist/capsule/p-c2bf050b.js +2 -0
  18. package/dist/capsule/p-c2bf050b.js.map +1 -0
  19. package/dist/capsule/p-d7be092d.entry.js +10 -0
  20. package/dist/capsule/p-d7be092d.entry.js.map +1 -0
  21. package/dist/capsule/p-f604b591.entry.js +2 -0
  22. package/dist/cjs/_commonjsHelpers-b3309d7b.js +12 -0
  23. package/dist/cjs/_commonjsHelpers-b3309d7b.js.map +1 -0
  24. package/dist/cjs/capsule.cjs.js +2 -2
  25. package/dist/cjs/constants-4bb85cc5.js +12 -0
  26. package/dist/cjs/constants-4bb85cc5.js.map +1 -0
  27. package/dist/cjs/cpsl-alert_17.cjs.entry.js +3755 -554
  28. package/dist/cjs/cpsl-alert_17.cjs.entry.js.map +1 -1
  29. package/dist/cjs/cpsl-animation.cjs.entry.js +20129 -0
  30. package/dist/cjs/cpsl-animation.cjs.entry.js.map +1 -0
  31. package/dist/cjs/cpsl-col.cjs.entry.js +2 -2
  32. package/dist/cjs/cpsl-grid.cjs.entry.js +3 -3
  33. package/dist/cjs/cpsl-info-box.cjs.entry.js +3 -3
  34. package/dist/cjs/cpsl-info-box.cjs.entry.js.map +1 -1
  35. package/dist/cjs/cpsl-row.cjs.entry.js +2 -2
  36. package/dist/cjs/{index-2a026742.js → index-3fccb5b4.js} +22 -1
  37. package/dist/cjs/index-3fccb5b4.js.map +1 -0
  38. package/dist/cjs/index.cjs.js +338 -0
  39. package/dist/cjs/index.cjs.js.map +1 -1
  40. package/dist/cjs/loader.cjs.js +2 -2
  41. package/dist/collection/assets/icons/capsule-rings-dark.svg +34 -0
  42. package/dist/collection/assets/icons/capsule.svg +4 -4
  43. package/dist/collection/assets/icons/hero-email.svg +8 -30
  44. package/dist/collection/assets/icons/hero-lock.svg +4 -34
  45. package/dist/collection/assets/icons/hero-passkey.svg +9 -17
  46. package/dist/collection/assets/icons/hero-phone.svg +4 -15
  47. package/dist/collection/assets/icons/hero-wallet.svg +5 -44
  48. package/dist/collection/assets/icons/index.js +4 -2
  49. package/dist/collection/assets/icons/index.js.map +1 -1
  50. package/dist/collection/assets/icons/more-login-options.svg +10 -10
  51. package/dist/collection/assets/icons/plus-circle.svg +5 -0
  52. package/dist/collection/assets/icons/wallet.svg +5 -0
  53. package/dist/collection/collection-manifest.json +1 -0
  54. package/dist/collection/components/cpsl-alert/cpsl-alert.js +1 -1
  55. package/dist/collection/components/cpsl-animation/cpsl-animation.css +17 -0
  56. package/dist/collection/components/cpsl-animation/cpsl-animation.js +102 -0
  57. package/dist/collection/components/cpsl-animation/cpsl-animation.js.map +1 -0
  58. package/dist/collection/components/cpsl-animation/test/cpsl-animation.e2e.js +29 -0
  59. package/dist/collection/components/cpsl-animation/test/cpsl-animation.e2e.js.map +1 -0
  60. package/dist/collection/components/cpsl-animation/test/cpsl-animation.spec.js +37 -0
  61. package/dist/collection/components/cpsl-animation/test/cpsl-animation.spec.js.map +1 -0
  62. package/dist/collection/components/cpsl-button/cpsl-button.css +3 -0
  63. package/dist/collection/components/cpsl-button/cpsl-button.js +2 -2
  64. package/dist/collection/components/cpsl-button/cpsl-button.js.map +1 -1
  65. package/dist/collection/components/cpsl-code-input/cpsl-code-input.js +1 -1
  66. package/dist/collection/components/cpsl-col/cpsl-col.js +1 -1
  67. package/dist/collection/components/cpsl-divider/cpsl-divider.js +1 -1
  68. package/dist/collection/components/cpsl-grid/cpsl-grid.js +2 -2
  69. package/dist/collection/components/cpsl-icon/cpsl-icon.css +14 -0
  70. package/dist/collection/components/cpsl-icon/cpsl-icon.js +2 -3
  71. package/dist/collection/components/cpsl-icon/cpsl-icon.js.map +1 -1
  72. package/dist/collection/components/cpsl-info-box/cpsl-info-box.css +1 -1
  73. package/dist/collection/components/cpsl-info-box/cpsl-info-box.js +1 -1
  74. package/dist/collection/components/cpsl-input/cpsl-input.css +9 -4
  75. package/dist/collection/components/cpsl-input/cpsl-input.js +8 -6
  76. package/dist/collection/components/cpsl-input/cpsl-input.js.map +1 -1
  77. package/dist/collection/components/cpsl-modal/cpsl-modal.css +46 -4
  78. package/dist/collection/components/cpsl-modal/cpsl-modal.js +347 -23
  79. package/dist/collection/components/cpsl-modal/cpsl-modal.js.map +1 -1
  80. package/dist/collection/components/cpsl-overlay/cpsl-overlay.js +30 -13
  81. package/dist/collection/components/cpsl-overlay/cpsl-overlay.js.map +1 -1
  82. package/dist/collection/components/cpsl-pill/cpsl-pill.css +3 -3
  83. package/dist/collection/components/cpsl-pill/cpsl-pill.js +1 -1
  84. package/dist/collection/components/cpsl-progress-indicator/cpsl-progress-indicator.css +3 -3
  85. package/dist/collection/components/cpsl-qr-code/cpsl-qr-code.css +3 -3
  86. package/dist/collection/components/cpsl-qr-code/cpsl-qr-code.js +1 -1
  87. package/dist/collection/components/cpsl-row/cpsl-row.js +1 -1
  88. package/dist/collection/components/cpsl-slide-button/cpsl-slide-button.css +11 -9
  89. package/dist/collection/components/cpsl-slide-button/cpsl-slide-button.js +3 -3
  90. package/dist/collection/components/cpsl-spinner/cpsl-spinner.css +2 -2
  91. package/dist/collection/components/cpsl-spinner/cpsl-spinner.js +2 -2
  92. package/dist/collection/components/cpsl-tab/cpsl-tab.js +1 -1
  93. package/dist/collection/components/cpsl-tabs/cpsl-tabs.css +17 -16
  94. package/dist/collection/components/cpsl-tabs/cpsl-tabs.js +2 -2
  95. package/dist/collection/components/cpsl-tabs/cpsl-tabs.js.map +1 -1
  96. package/dist/collection/components/cpsl-text/cpsl-text.js +1 -1
  97. package/dist/collection/components/cpsl-tile-button/cpsl-tile-button.css +3 -0
  98. package/dist/collection/components/cpsl-tile-button/cpsl-tile-button.js +2 -2
  99. package/dist/collection/constants.js +6 -0
  100. package/dist/collection/constants.js.map +1 -0
  101. package/dist/collection/index.js +1 -0
  102. package/dist/collection/index.js.map +1 -1
  103. package/dist/collection/interface.js.map +1 -1
  104. package/dist/collection/utils/theme/generateBorderRadii.js +56 -0
  105. package/dist/collection/utils/theme/generateBorderRadii.js.map +1 -0
  106. package/dist/collection/utils/theme/generateFont.js +7 -0
  107. package/dist/collection/utils/theme/generateFont.js.map +1 -0
  108. package/dist/collection/utils/theme/generatePalette.js +46 -0
  109. package/dist/collection/utils/theme/generatePalette.js.map +1 -0
  110. package/dist/collection/utils/theme/generateTheme.js +12 -0
  111. package/dist/collection/utils/theme/generateTheme.js.map +1 -0
  112. package/dist/collection/utils/theme/utils.js +21 -0
  113. package/dist/collection/utils/theme/utils.js.map +1 -0
  114. package/dist/esm/_commonjsHelpers-1789f0cf.js +9 -0
  115. package/dist/esm/_commonjsHelpers-1789f0cf.js.map +1 -0
  116. package/dist/esm/capsule.js +3 -3
  117. package/dist/esm/constants-7b49abd5.js +9 -0
  118. package/dist/esm/constants-7b49abd5.js.map +1 -0
  119. package/dist/esm/cpsl-alert_17.entry.js +3754 -553
  120. package/dist/esm/cpsl-alert_17.entry.js.map +1 -1
  121. package/dist/esm/cpsl-animation.entry.js +20125 -0
  122. package/dist/esm/cpsl-animation.entry.js.map +1 -0
  123. package/dist/esm/cpsl-col.entry.js +2 -2
  124. package/dist/esm/cpsl-grid.entry.js +3 -3
  125. package/dist/esm/cpsl-info-box.entry.js +3 -3
  126. package/dist/esm/cpsl-info-box.entry.js.map +1 -1
  127. package/dist/esm/cpsl-row.entry.js +2 -2
  128. package/dist/esm/{index-7c2f5cb9.js → index-f00e090c.js} +22 -1
  129. package/dist/esm/index-f00e090c.js.map +1 -0
  130. package/dist/esm/index.js +335 -0
  131. package/dist/esm/index.js.map +1 -1
  132. package/dist/esm/loader.js +3 -3
  133. package/dist/types/assets/icons/index.d.ts +3 -1
  134. package/dist/types/components/cpsl-animation/cpsl-animation.d.ts +9 -0
  135. package/dist/types/components/cpsl-modal/cpsl-modal.d.ts +28 -5
  136. package/dist/types/components/cpsl-overlay/cpsl-overlay.d.ts +2 -2
  137. package/dist/types/components.d.ts +117 -13
  138. package/dist/types/constants.d.ts +3 -0
  139. package/dist/types/index.d.ts +2 -0
  140. package/dist/types/interface.d.ts +122 -0
  141. package/dist/types/utils/theme/generateBorderRadii.d.ts +2 -0
  142. package/dist/types/utils/theme/generateFont.d.ts +2 -0
  143. package/dist/types/utils/theme/generatePalette.d.ts +7 -0
  144. package/dist/types/utils/theme/generateTheme.d.ts +3 -0
  145. package/dist/types/utils/theme/utils.d.ts +5 -0
  146. package/package.json +5 -2
  147. package/dist/capsule/p-0e2fbb7f.entry.js +0 -20
  148. package/dist/capsule/p-0e2fbb7f.entry.js.map +0 -1
  149. package/dist/capsule/p-1dc07cd7.entry.js +0 -2
  150. package/dist/capsule/p-5c020abe.entry.js +0 -2
  151. package/dist/capsule/p-9647dd63.js +0 -3
  152. package/dist/capsule/p-9647dd63.js.map +0 -1
  153. package/dist/cjs/index-2a026742.js.map +0 -1
  154. package/dist/collection/assets/icons/more-login-options-dark.svg +0 -13
  155. package/dist/esm/index-7c2f5cb9.js.map +0 -1
  156. /package/dist/capsule/{p-11048392.entry.js.map → p-91412151.entry.js.map} +0 -0
  157. /package/dist/capsule/{p-62e7869a.entry.js.map → p-a95ec4df.entry.js.map} +0 -0
  158. /package/dist/capsule/{p-5c020abe.entry.js.map → p-f604b591.entry.js.map} +0 -0
@@ -26,6 +26,16 @@ export namespace Components {
26
26
  */
27
27
  "type"?: 'error';
28
28
  }
29
+ interface CpslAnimation {
30
+ /**
31
+ * Will replay the animation
32
+ */
33
+ "replayAnimation": () => Promise<void>;
34
+ /**
35
+ * Source of the Lottie animation file.
36
+ */
37
+ "src": string;
38
+ }
29
39
  interface CpslButton {
30
40
  /**
31
41
  * If the button is disabled. Default is: false.
@@ -287,24 +297,44 @@ export namespace Components {
287
297
  "value"?: string;
288
298
  }
289
299
  interface CpslModal {
300
+ /**
301
+ * Duration in seconds of the modal entering. Default is .15.
302
+ */
303
+ "enterTransitionDuration"?: number;
304
+ /**
305
+ * Duration in seconds of the modal exiting. Default is .15.
306
+ */
307
+ "exitTransitionDuration"?: number;
290
308
  /**
291
309
  * Whether or not to show `footerExpandedFooter` and `footerExpandedHeader` slots.
292
310
  */
293
- "footerExpanded": boolean;
311
+ "footerExpanded"?: boolean;
312
+ /**
313
+ * Duration in seconds of the footer expansion animation. Default is 0.15.
314
+ */
315
+ "footerTransitionDuration"?: number;
294
316
  /**
295
- * Duration in seconds of the footer expansion animation. Default is .5.
317
+ * Whether or not to show the overlay. This will always show the modal, regardless of the value of `open`.
296
318
  */
297
- "transitionDuration": number;
319
+ "noOverlay"?: boolean;
320
+ /**
321
+ * Whether or not to show the modal.
322
+ */
323
+ "open": boolean;
298
324
  }
299
325
  interface CpslOverlay {
300
326
  /**
301
- * Whether or not to show the overlay.
327
+ * Duration in seconds of the fade out animation. Default is .5.
302
328
  */
303
- "open": boolean;
329
+ "enterTransitionDuration"?: number;
330
+ /**
331
+ * Duration in seconds of the fade out animation. Default is .5.
332
+ */
333
+ "exitTransitionDuration"?: number;
304
334
  /**
305
- * Duration in seconds of the fade in/out animation. Default is .5.
335
+ * Whether or not to show the overlay.
306
336
  */
307
- "transitionDuration": number;
337
+ "open": boolean;
308
338
  }
309
339
  interface CpslPill {
310
340
  /**
@@ -411,6 +441,10 @@ export interface CpslInputCustomEvent<T> extends CustomEvent<T> {
411
441
  detail: T;
412
442
  target: HTMLCpslInputElement;
413
443
  }
444
+ export interface CpslModalCustomEvent<T> extends CustomEvent<T> {
445
+ detail: T;
446
+ target: HTMLCpslModalElement;
447
+ }
414
448
  export interface CpslSlideButtonCustomEvent<T> extends CustomEvent<T> {
415
449
  detail: T;
416
450
  target: HTMLCpslSlideButtonElement;
@@ -430,6 +464,12 @@ declare global {
430
464
  prototype: HTMLCpslAlertElement;
431
465
  new (): HTMLCpslAlertElement;
432
466
  };
467
+ interface HTMLCpslAnimationElement extends Components.CpslAnimation, HTMLStencilElement {
468
+ }
469
+ var HTMLCpslAnimationElement: {
470
+ prototype: HTMLCpslAnimationElement;
471
+ new (): HTMLCpslAnimationElement;
472
+ };
433
473
  interface HTMLCpslButtonElement extends Components.CpslButton, HTMLStencilElement {
434
474
  }
435
475
  var HTMLCpslButtonElement: {
@@ -503,7 +543,22 @@ declare global {
503
543
  prototype: HTMLCpslInputElement;
504
544
  new (): HTMLCpslInputElement;
505
545
  };
546
+ interface HTMLCpslModalElementEventMap {
547
+ "cpslModalEntering": null;
548
+ "cpslModalEntered": null;
549
+ "cpslModalExiting": null;
550
+ "cpslModalExited": null;
551
+ "cpslModalRequestClose": null;
552
+ }
506
553
  interface HTMLCpslModalElement extends Components.CpslModal, HTMLStencilElement {
554
+ addEventListener<K extends keyof HTMLCpslModalElementEventMap>(type: K, listener: (this: HTMLCpslModalElement, ev: CpslModalCustomEvent<HTMLCpslModalElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
555
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
556
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
557
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
558
+ removeEventListener<K extends keyof HTMLCpslModalElementEventMap>(type: K, listener: (this: HTMLCpslModalElement, ev: CpslModalCustomEvent<HTMLCpslModalElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
559
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
560
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
561
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
507
562
  }
508
563
  var HTMLCpslModalElement: {
509
564
  prototype: HTMLCpslModalElement;
@@ -611,6 +666,7 @@ declare global {
611
666
  };
612
667
  interface HTMLElementTagNameMap {
613
668
  "cpsl-alert": HTMLCpslAlertElement;
669
+ "cpsl-animation": HTMLCpslAnimationElement;
614
670
  "cpsl-button": HTMLCpslButtonElement;
615
671
  "cpsl-code-input": HTMLCpslCodeInputElement;
616
672
  "cpsl-col": HTMLCpslColElement;
@@ -644,6 +700,12 @@ declare namespace LocalJSX {
644
700
  */
645
701
  "type"?: 'error';
646
702
  }
703
+ interface CpslAnimation {
704
+ /**
705
+ * Source of the Lottie animation file.
706
+ */
707
+ "src"?: string;
708
+ }
647
709
  interface CpslButton {
648
710
  /**
649
711
  * If the button is disabled. Default is: false.
@@ -925,24 +987,64 @@ declare namespace LocalJSX {
925
987
  "value"?: string;
926
988
  }
927
989
  interface CpslModal {
990
+ /**
991
+ * Duration in seconds of the modal entering. Default is .15.
992
+ */
993
+ "enterTransitionDuration"?: number;
994
+ /**
995
+ * Duration in seconds of the modal exiting. Default is .15.
996
+ */
997
+ "exitTransitionDuration"?: number;
928
998
  /**
929
999
  * Whether or not to show `footerExpandedFooter` and `footerExpandedHeader` slots.
930
1000
  */
931
1001
  "footerExpanded"?: boolean;
932
1002
  /**
933
- * Duration in seconds of the footer expansion animation. Default is .5.
1003
+ * Duration in seconds of the footer expansion animation. Default is 0.15.
1004
+ */
1005
+ "footerTransitionDuration"?: number;
1006
+ /**
1007
+ * Whether or not to show the overlay. This will always show the modal, regardless of the value of `open`.
1008
+ */
1009
+ "noOverlay"?: boolean;
1010
+ /**
1011
+ * Emitted when enter animation finishes.
1012
+ */
1013
+ "onCpslModalEntered"?: (event: CpslModalCustomEvent<null>) => void;
1014
+ /**
1015
+ * Emitted when enter animation starts.
934
1016
  */
935
- "transitionDuration"?: number;
1017
+ "onCpslModalEntering"?: (event: CpslModalCustomEvent<null>) => void;
1018
+ /**
1019
+ * Emitted when exit animation finishes.
1020
+ */
1021
+ "onCpslModalExited"?: (event: CpslModalCustomEvent<null>) => void;
1022
+ /**
1023
+ * Emitted when exit animation starts.
1024
+ */
1025
+ "onCpslModalExiting"?: (event: CpslModalCustomEvent<null>) => void;
1026
+ /**
1027
+ * Emitted when exit animation finishes.
1028
+ */
1029
+ "onCpslModalRequestClose"?: (event: CpslModalCustomEvent<null>) => void;
1030
+ /**
1031
+ * Whether or not to show the modal.
1032
+ */
1033
+ "open"?: boolean;
936
1034
  }
937
1035
  interface CpslOverlay {
938
1036
  /**
939
- * Whether or not to show the overlay.
1037
+ * Duration in seconds of the fade out animation. Default is .5.
940
1038
  */
941
- "open"?: boolean;
1039
+ "enterTransitionDuration"?: number;
942
1040
  /**
943
- * Duration in seconds of the fade in/out animation. Default is .5.
1041
+ * Duration in seconds of the fade out animation. Default is .5.
944
1042
  */
945
- "transitionDuration"?: number;
1043
+ "exitTransitionDuration"?: number;
1044
+ /**
1045
+ * Whether or not to show the overlay.
1046
+ */
1047
+ "open"?: boolean;
946
1048
  }
947
1049
  interface CpslPill {
948
1050
  /**
@@ -1050,6 +1152,7 @@ declare namespace LocalJSX {
1050
1152
  }
1051
1153
  interface IntrinsicElements {
1052
1154
  "cpsl-alert": CpslAlert;
1155
+ "cpsl-animation": CpslAnimation;
1053
1156
  "cpsl-button": CpslButton;
1054
1157
  "cpsl-code-input": CpslCodeInput;
1055
1158
  "cpsl-col": CpslCol;
@@ -1077,6 +1180,7 @@ declare module "@stencil/core" {
1077
1180
  export namespace JSX {
1078
1181
  interface IntrinsicElements {
1079
1182
  "cpsl-alert": LocalJSX.CpslAlert & JSXBase.HTMLAttributes<HTMLCpslAlertElement>;
1183
+ "cpsl-animation": LocalJSX.CpslAnimation & JSXBase.HTMLAttributes<HTMLCpslAnimationElement>;
1080
1184
  "cpsl-button": LocalJSX.CpslButton & JSXBase.HTMLAttributes<HTMLCpslButtonElement>;
1081
1185
  "cpsl-code-input": LocalJSX.CpslCodeInput & JSXBase.HTMLAttributes<HTMLCpslCodeInputElement>;
1082
1186
  "cpsl-col": LocalJSX.CpslCol & JSXBase.HTMLAttributes<HTMLCpslColElement>;
@@ -0,0 +1,3 @@
1
+ import { Theme } from './interface';
2
+ export declare const MOBILE_SIZE = 480;
3
+ export declare const DEFAULT_THEME: Theme;
@@ -1 +1,3 @@
1
1
  export * from './components';
2
+ export { default as generateTheme } from './utils/theme/generateTheme';
3
+ export type { Theme, BorderRadius } from './interface';
@@ -8,3 +8,125 @@ export type CssClassMap = {
8
8
  [className: string]: boolean;
9
9
  };
10
10
  export type IconType = keyof typeof Icons;
11
+ export type Theme = {
12
+ foregroundColor?: string;
13
+ backgroundColor?: string;
14
+ borderRadius?: BorderRadius;
15
+ font?: string;
16
+ customPalette?: CustomPalette;
17
+ };
18
+ export type BorderRadius = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'full';
19
+ export interface CustomPalette {
20
+ text?: {
21
+ primary?: string;
22
+ secondary?: string;
23
+ subtle?: string;
24
+ inverted?: string;
25
+ error?: string;
26
+ };
27
+ modal?: {
28
+ surface?: {
29
+ main?: string;
30
+ footer?: string;
31
+ };
32
+ border?: string;
33
+ };
34
+ input?: {
35
+ surface?: {
36
+ disabled?: string;
37
+ default?: string;
38
+ };
39
+ border?: {
40
+ placeholder?: string;
41
+ active?: string;
42
+ error?: string;
43
+ };
44
+ };
45
+ tileButton?: {
46
+ surface?: {
47
+ default?: string;
48
+ hover?: string;
49
+ pressed?: string;
50
+ };
51
+ border?: string;
52
+ };
53
+ primaryButton?: {
54
+ surface?: {
55
+ default?: string;
56
+ hover?: string;
57
+ pressed?: string;
58
+ disabled?: string;
59
+ };
60
+ border?: {
61
+ default?: string;
62
+ disabled?: string;
63
+ };
64
+ outline?: string;
65
+ };
66
+ secondaryButton?: {
67
+ surface?: {
68
+ default?: string;
69
+ hover?: string;
70
+ pressed?: string;
71
+ disabled?: string;
72
+ };
73
+ border?: {
74
+ default?: string;
75
+ disabled?: string;
76
+ };
77
+ outline?: string;
78
+ };
79
+ divider?: string;
80
+ spinner?: {
81
+ path?: string;
82
+ circle?: string;
83
+ };
84
+ pill?: {
85
+ text?: string;
86
+ container?: {
87
+ background?: string;
88
+ border?: string;
89
+ };
90
+ };
91
+ progressIndicator?: {
92
+ active?: string;
93
+ next?: string;
94
+ previous?: string;
95
+ };
96
+ qr?: {
97
+ fill?: string;
98
+ background?: string;
99
+ border?: string;
100
+ };
101
+ slideButton?: {
102
+ slider?: {
103
+ background?: string;
104
+ border?: string;
105
+ text?: string;
106
+ container?: {
107
+ start?: {
108
+ background?: string;
109
+ border?: string;
110
+ };
111
+ end?: {
112
+ background?: string;
113
+ border?: string;
114
+ };
115
+ };
116
+ };
117
+ start?: {
118
+ text?: string;
119
+ };
120
+ end?: {
121
+ text?: string;
122
+ };
123
+ };
124
+ alert?: {
125
+ surface?: {
126
+ error?: string;
127
+ };
128
+ border?: {
129
+ error?: string;
130
+ };
131
+ };
132
+ }
@@ -0,0 +1,2 @@
1
+ import { Theme } from '../../interface';
2
+ export declare const generateBorderRadii: ({ borderRadius }: Pick<Theme, 'borderRadius'>) => void;
@@ -0,0 +1,2 @@
1
+ import { Theme } from '../../interface';
2
+ export declare const generateFont: ({ font }: Pick<Theme, 'font'>) => void;
@@ -0,0 +1,7 @@
1
+ import { Theme } from '../../interface';
2
+ export type Palette = {
3
+ foregroundColors: string[];
4
+ backgroundColors: string[];
5
+ isDarkBackground: boolean;
6
+ };
7
+ export declare const generatePalette: ({ foregroundColor, backgroundColor, customPalette }: Pick<Theme, 'foregroundColor' | 'backgroundColor' | 'customPalette'>) => Palette;
@@ -0,0 +1,3 @@
1
+ import { Theme } from '../../interface';
2
+ declare const generateTheme: ({ foregroundColor, backgroundColor, font, customPalette, borderRadius }: Theme) => boolean;
3
+ export default generateTheme;
@@ -0,0 +1,5 @@
1
+ import { CustomPalette } from '../../interface';
2
+ export declare const isColor: (strColor: any) => boolean;
3
+ export declare const getCssColors: (customPalette: CustomPalette) => {
4
+ [k: string]: string;
5
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@usecapsule/core-components",
3
- "version": "1.0.13",
3
+ "version": "2.0.1",
4
4
  "description": "Capsule Core Components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -27,7 +27,9 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@stencil/core": "^4.7.0",
30
+ "color2k": "^2.0.3",
30
31
  "gsap": "^3.12.5",
32
+ "lottie-web": "^5.12.2",
31
33
  "qr-code-styling": "^1.6.0-rc.1"
32
34
  },
33
35
  "devDependencies": {
@@ -43,9 +45,10 @@
43
45
  "jest": "^29.7.0",
44
46
  "jest-cli": "^29.7.0",
45
47
  "puppeteer": "^21.9.0",
48
+ "rollup-plugin-dotenv": "^0.5.0",
46
49
  "sass": "^1.71.1",
47
50
  "stencil-inline-svg": "^1.1.0",
48
51
  "ts-node": "^10.9.2"
49
52
  },
50
- "gitHead": "09410910d0605605fadb4e0afaf4f9d6c494a252"
53
+ "gitHead": "c7a7c4f14fa575888fd2dbd597dd6aef068a6707"
51
54
  }