@servicetitan/mpa-components 1.10.0 → 1.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/lib/components/brands/brand-card/brand-card.d.ts +4 -0
  3. package/lib/components/brands/brand-card/brand-card.d.ts.map +1 -0
  4. package/lib/components/brands/brand-card/brand-card.js +61 -0
  5. package/lib/components/brands/brand-card/brand-card.js.map +1 -0
  6. package/lib/components/brands/cards-grid/cards-grid.d.ts +6 -0
  7. package/lib/components/brands/cards-grid/cards-grid.d.ts.map +1 -0
  8. package/lib/components/brands/cards-grid/cards-grid.js +8 -0
  9. package/lib/components/brands/cards-grid/cards-grid.js.map +1 -0
  10. package/lib/components/brands/index.d.ts +2 -0
  11. package/lib/components/brands/index.d.ts.map +1 -0
  12. package/lib/components/brands/index.js +2 -0
  13. package/lib/components/brands/index.js.map +1 -0
  14. package/lib/components/brands/styles.module.less +73 -0
  15. package/lib/enums/brands.d.ts +21 -0
  16. package/lib/enums/brands.d.ts.map +1 -0
  17. package/lib/enums/brands.js +2 -0
  18. package/lib/enums/brands.js.map +1 -0
  19. package/lib/index.d.ts +1 -0
  20. package/lib/index.d.ts.map +1 -1
  21. package/lib/index.js +1 -0
  22. package/lib/index.js.map +1 -1
  23. package/package.json +15 -11
  24. package/src/components/brands/brand-card/brand-card.tsx +245 -0
  25. package/src/components/brands/cards-grid/cards-grid.tsx +16 -0
  26. package/src/components/brands/index.ts +1 -0
  27. package/src/components/brands/styles.module.less +73 -0
  28. package/src/components/brands/styles.module.less.d.ts +11 -0
  29. package/src/enums/brands.ts +23 -0
  30. package/src/index.ts +1 -1
  31. package/tsconfig.tsbuildinfo +1 -1
@@ -0,0 +1,73 @@
1
+ @import (reference) '@servicetitan/tokens/dist/tokens.less';
2
+
3
+ @action-menu-item-padding: 12px;
4
+ @card-min-width: 330px;
5
+ @card-max-width: 700px;
6
+ @max-number-of-cards: 3;
7
+
8
+ .delete-tooltip {
9
+ min-width: 327px;
10
+ }
11
+
12
+ .grid {
13
+ grid-template-columns: repeat(auto-fill, minmax(@card-min-width, 1fr));
14
+ max-width: calc(@card-max-width * @max-number-of-cards + @spacing-3 * 2);
15
+ }
16
+
17
+ @media (min-width: 1120px) {
18
+ .grid {
19
+ grid-template-columns: repeat(@max-number-of-cards - 1, 1fr);
20
+ }
21
+ }
22
+
23
+ @media (min-width: 1620px) {
24
+ .grid {
25
+ grid-template-columns: repeat(@max-number-of-cards, 1fr);
26
+ }
27
+ }
28
+
29
+ .brand-card {
30
+ height: 200px;
31
+ min-width: @card-min-width;
32
+ max-width: @card-max-width;
33
+ box-sizing: border-box;
34
+ background: inherit !important;
35
+
36
+ :global(.CardSection) {
37
+ height: 150px;
38
+ background-color: @color-white;
39
+ }
40
+ }
41
+
42
+ .card-content {
43
+ height: 139px;
44
+ }
45
+
46
+ .brand-img {
47
+ width: @spacing-6;
48
+ height: @spacing-6;
49
+ min-width: @spacing-6;
50
+ min-height: @spacing-6;
51
+ border-radius: @border-radius-circular;
52
+ border: solid 1px @color-neutral-60;
53
+ }
54
+
55
+ .brand-img-placeholder {
56
+ .brand-img();
57
+ background-color: @color-neutral-60;
58
+ }
59
+
60
+ .tags {
61
+ height: 41px;
62
+ margin-bottom: 2px;
63
+ margin-top: auto;
64
+ }
65
+
66
+ .default-tag {
67
+ width: 53px;
68
+ }
69
+
70
+ .corporate-tag {
71
+ min-width: 86px;
72
+ margin-bottom: @spacing-half;
73
+ }
@@ -0,0 +1,11 @@
1
+ export const __esModule: true;
2
+ export const brandCard: string;
3
+ export const brandImg: string;
4
+ export const brandImgPlaceholder: string;
5
+ export const cardContent: string;
6
+ export const corporateTag: string;
7
+ export const defaultTag: string;
8
+ export const deleteTooltip: string;
9
+ export const grid: string;
10
+ export const tags: string;
11
+
@@ -0,0 +1,23 @@
1
+ import { DomainValidationStatus } from '@servicetitan/marketing-services-api/dist/settings/brand.mrk.api';
2
+
3
+ export interface BrandAction {
4
+ name: string;
5
+ disabled?: boolean;
6
+
7
+ tooltipMessage?: string;
8
+ inProgress?: boolean;
9
+ isConfigured?: boolean;
10
+ href?: string;
11
+ action?: () => void;
12
+ }
13
+
14
+ export interface BrandCardProps {
15
+ id: string;
16
+ actions: BrandAction | BrandAction[];
17
+ logo?: string;
18
+ name?: string;
19
+ isDefault: boolean;
20
+ email?: string;
21
+ domainValidationStatus?: DomainValidationStatus;
22
+ isShared: boolean;
23
+ }
package/src/index.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export * from './components/settings';
2
2
  export * from './components/campaign-actions';
3
-
3
+ export * from './enums/brands';
4
4
  export * from './utils/helpers';