@snyk-mktg/brand-ui 2.5.9 → 2.5.10-canary.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 (81) hide show
  1. package/dist/css/bundle.css +82 -1
  2. package/dist/css/bundle.css.map +1 -1
  3. package/dist/css/components.css +82 -1
  4. package/dist/css/components.css.map +1 -1
  5. package/dist/css/evo-bundle.css +31 -1
  6. package/dist/css/evo-bundle.css.map +1 -1
  7. package/dist/css/labs-bundle.css +31 -1
  8. package/dist/css/labs-bundle.css.map +1 -1
  9. package/dist/scss/base/_baseline.scss +9 -4
  10. package/dist/scss/base/_color.scss +2 -17
  11. package/dist/scss/base/_layout.scss +35 -10
  12. package/dist/scss/base/_links.scss +3 -1
  13. package/dist/scss/base/decorations/_backgrounds.scss +21 -53
  14. package/dist/scss/base/decorations/_markers.scss +28 -26
  15. package/dist/scss/base/mixins/_accessibility.scss +6 -0
  16. package/dist/scss/base/mixins/_color-mode.scss +12 -0
  17. package/dist/scss/base/mixins/_glass.scss +36 -12
  18. package/dist/scss/base/mixins/_gradient-border.scss +49 -0
  19. package/dist/scss/base/mixins/index.scss +1 -0
  20. package/dist/scss/base/variables/_colors.scss +39 -33
  21. package/dist/scss/base/variables/_effects.scss +5 -5
  22. package/dist/scss/base/variables/_themes.scss +18 -18
  23. package/dist/scss/base/variables/_typography.scss +49 -57
  24. package/dist/scss/base.scss +3 -1
  25. package/dist/scss/components/atoms/_badge.scss +1 -1
  26. package/dist/scss/components/atoms/_button.scss +17 -115
  27. package/dist/scss/components/atoms/_checkbox.scss +12 -2
  28. package/dist/scss/components/atoms/_dropdown.scss +3 -3
  29. package/dist/scss/components/atoms/_feature-checkmark.scss +3 -1
  30. package/dist/scss/components/atoms/_icons.scss +6 -3
  31. package/dist/scss/components/atoms/_tabs.scss +4 -4
  32. package/dist/scss/components/atoms/_tag.scss +3 -2
  33. package/dist/scss/components/atoms/triggers/_filter.scss +1 -1
  34. package/dist/scss/components/molecules/_announcements.scss +15 -7
  35. package/dist/scss/components/molecules/_pagination.scss +5 -5
  36. package/dist/scss/components/molecules/_search.scss +1 -11
  37. package/dist/scss/components/molecules/_share-this.scss +2 -1
  38. package/dist/scss/components/molecules/_table-of-contents.scss +4 -4
  39. package/dist/scss/components/molecules/_tables.scss +59 -2
  40. package/dist/scss/components/molecules/cards/_card-bg-image.scss +1 -1
  41. package/dist/scss/components/molecules/cards/_card.scss +11 -6
  42. package/dist/scss/components/organisms/_footer.scss +1 -1
  43. package/dist/scss/components/organisms/_glossary.scss +7 -0
  44. package/dist/scss/components/organisms/_navigation.scss +5 -5
  45. package/dist/scss/components/organisms/_split-content.scss +0 -4
  46. package/dist/scss/components/organisms/_sub-navigation.scss +1 -1
  47. package/dist/scss/components/organisms/ctas/_basic-cta.scss +6 -4
  48. package/dist/scss/components/organisms/ctas/_body-cta.scss +16 -6
  49. package/dist/scss/components/organisms/ctas/_footer-cta.scss +20 -1
  50. package/dist/scss/components/organisms/heroes/_hero-case-study.scss +4 -7
  51. package/dist/scss/evo/_components.scss +1 -1
  52. package/dist/scss/evo/base/variables/_typography.scss +2 -0
  53. package/dist/scss/evo/components/atoms/_button.scss +92 -4
  54. package/dist/scss/evo/components/molecules/_share-this.scss +44 -0
  55. package/dist/scss/evo/components/molecules/cards/_card.scss +3 -0
  56. package/dist/scss/evo/components/organisms/_footer.scss +14 -0
  57. package/dist/scss/evo/components/organisms/ctas/_basic-cta.scss +1 -0
  58. package/dist/scss/labs/_components.scss +1 -1
  59. package/dist/scss/labs/base/_baseline.scss +2 -0
  60. package/dist/scss/labs/base/variables/_colors.scss +8 -0
  61. package/dist/scss/labs/base/variables/_typography.scss +44 -0
  62. package/dist/scss/labs/components/atoms/_button.scss +12 -0
  63. package/dist/scss/labs/components/atoms/triggers/_play.scss +1 -1
  64. package/dist/scss/labs/components/molecules/_pagination.scss +5 -0
  65. package/dist/scss/labs/components/molecules/_table-of-contents.scss +14 -1
  66. package/dist/scss/labs/components/molecules/cards/_card-bg-image.scss +7 -0
  67. package/dist/scss/labs/components/molecules/cards/_card.scss +10 -0
  68. package/dist/scss/labs/components/organisms/ctas/_basic-cta.scss +2 -0
  69. package/dist/scss/labs/utilities/_rich-text.scss +13 -0
  70. package/dist/scss/utilities/_rich-text.scss +1 -1
  71. package/package.json +3 -2
  72. package/dist/js/helpers/caseFormats.test.d.ts +0 -1
  73. package/dist/js/helpers/caseFormats.test.js +0 -59
  74. package/dist/js/helpers/classnames.test.d.ts +0 -1
  75. package/dist/js/helpers/classnames.test.js +0 -13
  76. package/dist/js/helpers/getInitials.test.d.ts +0 -1
  77. package/dist/js/helpers/getInitials.test.js +0 -29
  78. package/dist/js/helpers/grid.test.d.ts +0 -1
  79. package/dist/js/helpers/grid.test.js +0 -44
  80. package/dist/js/helpers/range.test.d.ts +0 -1
  81. package/dist/js/helpers/range.test.js +0 -24
@@ -6,17 +6,41 @@
6
6
  @use '../../../base/variables/sizing' as *;
7
7
  @use '../../../base/mixins/color-mode' as color;
8
8
 
9
- $primary-conic-light-values: RGBA(brandui-rgb-labels(action-dark), 1), RGBA(brandui-rgb-labels(action-dark), 0.3),
10
- RGBA(brandui-rgb-labels(action-secondary-dark), 0.3), RGBA(brandui-rgb-labels(action-secondary-dark), 1);
11
- $primary-conic-dark-values: RGBA(brandui-rgb-labels(action-dark), 1), RGBA(brandui-rgb-labels(action-dark), 0.3),
12
- RGBA(brandui-rgb-labels(action-secondary-dark), 0.3), RGBA(brandui-rgb-labels(action-secondary-dark), 1);
9
+ $action-base: RGBA(brandui-rgb-labels(action), 0.1);
10
+ $action-base-dark: RGBA(brandui-rgb-labels(action-dark), 0.1);
11
+ $action-secondary-base: RGBA(brandui-rgb-labels(action-secondary), 0.1);
12
+ $action-secondary-base-dark: RGBA(brandui-rgb-labels(action-secondary-dark), 0.1);
13
+ $fail-base: RGBA(brandui-rgb-labels(fail), 0.1);
14
+ $fail-base-dark: RGBA(brandui-rgb-labels(fail-dark), 0.1);
15
+ $fail-hover: brandui-color-labels(fail);
16
+ $fail-hover-dark: brandui-color-labels(fail-dark);
17
+ $neutral: brandui-color-labels(neutral-3);
18
+ $neutral-hover: brandui-color-labels(neutral-6);
19
+ $primary-conic-light-values: RGBA(brandui-rgb-labels(action-dark), 1), RGBA(brandui-rgb-labels(action-dark), 0.7),
20
+ RGBA(brandui-rgb-labels(action-secondary-dark), 0.7), RGBA(brandui-rgb-labels(action-secondary-dark), 1);
21
+ $primary-conic-dark-values: RGBA(brandui-rgb-labels(action-dark), 1), RGBA(brandui-rgb-labels(action-dark), 0.7),
22
+ RGBA(brandui-rgb-labels(action-secondary-dark), 0.7), RGBA(brandui-rgb-labels(action-secondary-dark), 1);
13
23
  $secondary-conic-light-values: RGBA(brandui-rgb-labels(action-dark), 1), RGBA(brandui-rgb-labels(action-dark), 0.3),
14
24
  RGBA(brandui-rgb-labels(action-secondary-dark), 0.3), RGBA(brandui-rgb-labels(action-secondary-dark), 1);
15
25
  $secondary-conic-dark-values: RGBA(brandui-rgb-labels(action-dark), 1), RGBA(brandui-rgb-labels(action-dark), 0.3),
16
26
  RGBA(brandui-rgb-labels(action-secondary-dark), 0.3), RGBA(brandui-rgb-labels(action-secondary-dark), 1);
17
27
 
28
+ @property --glimmer-angle {
29
+ syntax: '<angle>';
30
+ inherits: false;
31
+ initial-value: 0deg;
32
+ }
33
+
34
+ @property --glimmer-duration {
35
+ syntax: '<time>';
36
+ inherits: false;
37
+ initial-value: 6s;
38
+ }
39
+
18
40
  .button {
19
41
  font-family: map.get($brandui-font-family, geist-mono), monospace;
42
+ isolation: isolate;
43
+ border: none;
20
44
  border-radius: map.get($brandui-radius, medium);
21
45
 
22
46
  &.primary {
@@ -30,6 +54,31 @@ $secondary-conic-dark-values: RGBA(brandui-rgb-labels(action-dark), 1), RGBA(bra
30
54
  brandui-color-labels(action-dark),
31
55
  brandui-color-labels(action-secondary-dark)
32
56
  );
57
+ &:before {
58
+ content: '';
59
+ position: absolute;
60
+ inset: 0;
61
+ border-radius: inherit;
62
+ z-index: -1;
63
+ }
64
+
65
+ @include color.conic-gradient-mode-pseudo(
66
+ '&:after',
67
+ background,
68
+ var(--glimmer-angle),
69
+ $primary-conic-light-values,
70
+ $primary-conic-dark-values
71
+ );
72
+ &:after {
73
+ content: '';
74
+ display: block;
75
+ position: absolute;
76
+ inset: -1px;
77
+ animation: glimmer var(--glimmer-duration) linear infinite;
78
+ border-radius: inherit;
79
+ z-index: -2;
80
+ }
81
+
33
82
  &:hover,
34
83
  &:focus {
35
84
  @include color.gradient-mode-pseudo(
@@ -42,6 +91,9 @@ $secondary-conic-dark-values: RGBA(brandui-rgb-labels(action-dark), 1), RGBA(bra
42
91
  brandui-color-labels(action-secondary-dark),
43
92
  brandui-color-labels(action-dark)
44
93
  );
94
+ &:after {
95
+ --glimmer-duration: 2s;
96
+ }
45
97
  }
46
98
 
47
99
  // This is the rotating conic-gradient glimmer effect
@@ -55,13 +107,49 @@ $secondary-conic-dark-values: RGBA(brandui-rgb-labels(action-dark), 1), RGBA(bra
55
107
  }
56
108
 
57
109
  &.secondary {
110
+ border: none;
111
+ isolation: isolate;
112
+
58
113
  @include color.color-mode(color, brandui-color-labels(action-secondary-contrast), brandui-color-labels(action-secondary-contrast-dark));
59
114
  @include color.color-mode-pseudo('&:before', background-color, brandui-color-labels(neutral-1), brandui-color-labels(neutral-1));
60
115
 
116
+ &:before {
117
+ content: '';
118
+ position: absolute;
119
+ inset: 0;
120
+ border-radius: inherit;
121
+ backdrop-filter: blur(4px);
122
+ z-index: -1;
123
+ }
124
+ // This is the rotating conic-gradient glimmer effect
125
+ @include color.conic-gradient-mode-pseudo(
126
+ '&:after',
127
+ background,
128
+ var(--glimmer-angle),
129
+ $secondary-conic-light-values,
130
+ $secondary-conic-dark-values
131
+ );
132
+ &:after {
133
+ content: '';
134
+ display: block;
135
+ position: absolute;
136
+ inset: -1px;
137
+ animation: glimmer var(--glimmer-duration) linear infinite;
138
+ border-radius: inherit;
139
+ z-index: -2;
140
+ }
141
+
61
142
  &:hover,
62
143
  &:focus {
63
144
  @include color.color-mode(color, brandui-color-labels(action-secondary-contrast), brandui-color-labels(action-secondary-contrast-dark));
64
145
  @include color.color-mode-pseudo('&:before', background-color, brandui-color-labels(neutral-6), brandui-color-labels(neutral-3));
146
+ &:before {
147
+ transition: background-color map.get($brandui-transition, fast);
148
+ }
149
+
150
+ &:after {
151
+ --glimmer-duration: 2s;
152
+ }
65
153
  }
66
154
 
67
155
  // This is the rotating conic-gradient glimmer effect
@@ -0,0 +1,44 @@
1
+ @use 'sass:map';
2
+ @use '../../../base/functions' as *;
3
+ @use '../../../base/variables/effects' as *;
4
+ @use '../../../base/variables/sizing' as *;
5
+ @use '../../../base/mixins/color-mode' as color;
6
+ @use '../../../base/mixins/typography' as font;
7
+
8
+ // Not importing the other share this component because they are so different
9
+ .share-this {
10
+ display: flex;
11
+ gap: map.get($brandui-padding, extra-small);
12
+
13
+ &-label {
14
+ max-width: max-content;
15
+ @include font.get-typography(body-bold);
16
+ }
17
+
18
+ &-icon {
19
+ text-decoration: none;
20
+ display: flex;
21
+ justify-content: center;
22
+ align-items: center;
23
+ width: map.get($brandui-padding, medium);
24
+ height: map.get($brandui-padding, medium);
25
+ border-style: solid;
26
+ border-width: 1px;
27
+ border-radius: map.get($brandui-radius, small);
28
+ transition: map.get($brandui-transition, 'fast');
29
+ padding: map.get($brandui-padding, extra-small);
30
+ @include color.color-mode(color, brandui-color-labels(neutral-1), brandui-color-labels(neutral-5));
31
+ @include color.color-mode(border-color, RGBA(brandui-rgb-labels(neutral-1), 0.3), RGBA(brandui-rgb-labels(neutral-5), 0.1));
32
+
33
+ &-list {
34
+ display: flex;
35
+ gap: map.get($brandui-padding, extra-small);
36
+ }
37
+
38
+ &:hover {
39
+ cursor: pointer;
40
+ @include color.color-mode(background-color, brandui-color-labels(ui-fill), brandui-color-labels(ui-fill-dark));
41
+ @include color.color-mode(color, brandui-color-labels(action-secondary), brandui-color-labels(action-secondary-dark));
42
+ }
43
+ }
44
+ }
@@ -6,7 +6,10 @@
6
6
 
7
7
  .card {
8
8
  position: relative;
9
+ border-width: 0.1875rem;
10
+ border-style: solid;
9
11
  border-width: map.get($brandui-padding, 'hairline');
12
+ border-radius: map.get($brandui-radius, 'large');
10
13
  // box-shadow: map.get($brandui-shadow, 'outline');
11
14
  //TODO: Extend Drop shadow theme later
12
15
  box-shadow: 0px 0px 40px rgba(0, 0, 0, 0.4);
@@ -22,7 +22,21 @@
22
22
  }
23
23
  }
24
24
  &-social-links {
25
+ @include color.color-mode(color, brandui-color-labels(ui-text), brandui-color-labels(ui-text-dark));
26
+
27
+ li {
28
+ list-style: none;
29
+ }
30
+
31
+ .icon-border {
32
+ @include color.color-mode(border-color, RGBA(brandui-rgb-labels(neutral-6), 0.3), RGBA(brandui-rgb-labels(neutral-1), 0.7));
33
+ }
34
+
25
35
  a {
36
+ font-weight: 400;
37
+ text-decoration: none;
38
+ @include color.color-mode(color, brandui-color-labels(ui-text), brandui-color-labels(ui-text-dark));
39
+
26
40
  &:hover {
27
41
  @include color.color-mode(color, brandui-color-labels(action-secondary), brandui-color-labels(action-secondary-dark));
28
42
  }
@@ -10,6 +10,7 @@
10
10
  border-width: 1px;
11
11
  background-color: none;
12
12
  background: none;
13
+ box-shadow: map.get($brandui-shadow, outline);
13
14
  @include glass.bg-glass;
14
15
  @include glass.border-glass;
15
16
  }
@@ -28,7 +28,6 @@
28
28
  @use '../components/molecules/alert' as *;
29
29
  @use '../components/molecules/avatar-grid-item' as *;
30
30
  @use '../components/molecules/avatar-username' as *;
31
- @use '../components/molecules/cards/card-bg-image' as *;
32
31
  @use '../components/molecules/charts/charts' as *;
33
32
  @use '../components/molecules/charts/vertical-chart' as *;
34
33
  @use '../components/molecules/charts/horizontal-chart' as *;
@@ -60,6 +59,7 @@
60
59
  @use './components/atoms/tooltip' as *;
61
60
  @use './components/molecules/announcements' as *;
62
61
  @use './components/molecules/cards/card' as *;
62
+ @use './components/molecules/cards/card-bg-image' as *;
63
63
  @use './components/molecules/cards/card-repo' as *;
64
64
  @use './components/molecules/pagination' as *;
65
65
  @use './components/molecules/share-this' as *;
@@ -20,6 +20,8 @@ h6 {
20
20
 
21
21
  code:not([class]) {
22
22
  font-family: map.get($brandui-font-family, space-mono), monospace;
23
+ @include color.color-mode(background-color, brandui-color-labels(neutral-5), brandui-color-labels(neutral-2));
24
+ @include color.color-mode(border-color, RGBA(brandui-rgb-labels(neutral-4), 0.1), RGBA(brandui-rgb-labels(neutral-2), 0.1));
23
25
  }
24
26
 
25
27
  hr {
@@ -8,10 +8,18 @@ $labsui-color-labels: (
8
8
  'ui-headline-dark': map.get($brandui-colors, 'white'),
9
9
  'ui-body': map.get($brandui-colors, 'space'),
10
10
  'ui-body-dark': map.get($brandui-colors, 'white'),
11
+ 'ui-stroke': map.get($brandui-colors, 'space'),
12
+ 'ui-stroke-dark': map.get($brandui-colors, 'dawn'),
11
13
  'action': map.get($brandui-colors, 'deep-blue'),
12
14
  'action-dark': map.get($brandui-colors, 'cyan'),
13
15
  'action-secondary': map.get($brandui-colors, 'midnight'),
14
16
  'action-secondary-dark': map.get($brandui-colors, 'snow'),
17
+ 'neutral-1': map.get($brandui-colors, 'midnight'),
18
+ 'neutral-2': map.get($brandui-colors, 'ocean'),
19
+ 'neutral-3': map.get($brandui-colors, 'dawn'),
20
+ 'neutral-4': map.get($brandui-colors, 'smoke'),
21
+ 'neutral-5': map.get($brandui-colors, 'snow'),
22
+ 'neutral-6': map.get($brandui-colors, 'white'),
15
23
  );
16
24
 
17
25
  $brandui-color-labels: map.merge($brandui-color-labels, $labsui-color-labels);
@@ -5,6 +5,50 @@ $labsui-font-family: (
5
5
  space-mono: 'Space Mono',
6
6
  );
7
7
 
8
+ $brandui-font-size: (
9
+ hero-title-large: 5.625rem,
10
+ hero-title-small: 3.125rem,
11
+ page-title-large: 4.375rem,
12
+ page-title: 3rem,
13
+ section-title: 3rem,
14
+ headline-large: 2.5rem,
15
+ headline-small: 2rem,
16
+ subhead: 1.5rem,
17
+ subhead-small: 1.125rem,
18
+ mini-header: 1rem,
19
+ mini-header-small: 0.875rem,
20
+ body-lead: 1rem,
21
+ body-lead-bold: 1rem,
22
+ body: 1rem,
23
+ body-bold: 1rem,
24
+ body-long: 1.125rem,
25
+ body-small: 0.875rem,
26
+ body-small-medium: 0.875rem,
27
+ code: 1rem,
28
+ ) !default;
29
+
30
+ $brandui-line-height: (
31
+ hero-title-large: 6.25rem,
32
+ hero-title-small: 3.75rem,
33
+ page-title-large: 5rem,
34
+ page-title: 4rem,
35
+ section-title: 4rem,
36
+ headline-large: 3rem,
37
+ headline-small: 2.5rem,
38
+ subhead: 2.25rem,
39
+ subhead-small: 1.75rem,
40
+ mini-header: 1.5rem,
41
+ mini-header-small: 1.5rem,
42
+ body-lead: 1.5rem,
43
+ body-lead-bold: 1.5rem,
44
+ body: 1.5rem,
45
+ body-bold: 1.5rem,
46
+ body-long: 2rem,
47
+ body-small: 1.5rem,
48
+ body-small-medium: 1.5rem,
49
+ code: 1.625rem,
50
+ ) !default;
51
+
8
52
  // Why does this work? Do I need the font 'as'?
9
53
  $brandui-font-family: map.merge(font.$brandui-font-family, $labsui-font-family);
10
54
 
@@ -11,6 +11,7 @@
11
11
 
12
12
  .button {
13
13
  font-family: map.get($brandui-font-family, space-mono), monospace;
14
+ border-radius: map.get($brandui-radius, pill);
14
15
 
15
16
  &.primary {
16
17
  border-width: 0.0625rem;
@@ -50,4 +51,15 @@
50
51
  @include color.color-mode(border-color, brandui-color-labels(action-secondary), brandui-color-labels(action-secondary-dark));
51
52
  }
52
53
  }
54
+ &.tertiary,
55
+ &.glyph,
56
+ &.arrow,
57
+ &.external {
58
+ @include color.color-mode(color, brandui-color-labels(action), brandui-color-labels(action-dark));
59
+
60
+ &:hover,
61
+ &:focus {
62
+ @include color.color-mode(color, brandui-color-labels(action-secondary), brandui-color-labels(action-secondary-dark));
63
+ }
64
+ }
53
65
  }
@@ -16,6 +16,6 @@
16
16
  }
17
17
  &:after {
18
18
  border-radius: map.get($brandui-radius, 'pill');
19
- @include color.color-mode(background-color, brandui-color-labels(ui-fill), brandui-color-labels(ui-fill));
20
19
  }
20
+ @include color.color-mode-pseudo('&:after', background-color, brandui-color-labels(action), brandui-color-labels(action-dark));
21
21
  }
@@ -17,6 +17,11 @@
17
17
  @include color.color-mode(background-color, brandui-color-labels(neutral-5), brandui-color-labels(neutral-3));
18
18
  @include color.color-mode(border-color, brandui-color-labels(action), brandui-color-labels(neutral-3));
19
19
  @include color.color-mode(color, brandui-color-labels(action), brandui-color-labels(neutral-6));
20
+ &:hover {
21
+ @include color.color-mode(color, brandui-color-labels(action-secondary), brandui-color-labels(action-secondary-dark));
22
+ @include color.color-mode(background-color, brandui-color-labels(neutral-6), brandui-color-labels(neutral-1));
23
+ @include color.color-mode(border-color, brandui-color-labels(action-secondary), brandui-color-labels(action-secondary-dark));
24
+ }
20
25
  }
21
26
  &-tile {
22
27
  &.active {
@@ -1,11 +1,24 @@
1
+ @use 'sass:map';
1
2
  @use '../../../components/molecules/table-of-contents';
2
-
3
+ @use '../../../base/variables/effects' as *;
4
+ @use '../../../base/mixins/color-mode' as color;
3
5
  @use '../../base/mixins/typography' as font;
4
6
 
5
7
  .toc {
8
+ border-radius: map.get($brandui-radius, extra-large);
9
+ @include color.color-mode(border-color, brandui-color-labels(ui-stroke), brandui-color-labels(ui-stroke-dark));
10
+
11
+ &-title {
12
+ @include color.color-mode(border-bottom-color, brandui-color-labels(ui-stroke), brandui-color-labels(ui-stroke-dark));
13
+ }
14
+
6
15
  &-item {
7
16
  &-link {
8
17
  @include font.get-typography(body-small);
9
18
  }
10
19
  }
20
+
21
+ &.active {
22
+ @include color.color-mode(background-color, brandui-color-labels(neutral-5), brandui-color-labels(neutral-2));
23
+ }
11
24
  }
@@ -0,0 +1,7 @@
1
+ @use 'sass:map';
2
+ @use '../../../../components/molecules/cards/card-bg-image' as *;
3
+ @use '../../../../base/variables/effects' as *;
4
+
5
+ .card-bg-image {
6
+ border-radius: map.get($brandui-radius, large);
7
+ }
@@ -1,12 +1,18 @@
1
+ @use 'sass:map';
1
2
  @use '../../../../components/molecules/cards/card' as *;
2
3
  @use '../../../../base/mixins/breakpoints' as break;
3
4
  @use '../../../../base/functions' as *;
5
+ @use '../../../../base/variables/effects' as *;
6
+ @use '../../../../base/variables/sizing' as *;
4
7
  @use '../../../../base/mixins/color-mode' as color;
8
+ @use '../../../../base/mixins/glass' as glass;
5
9
 
6
10
  .card {
7
11
  backdrop-filter: none;
8
12
  -webkit-backdrop-filter: none;
9
13
  border: none;
14
+ border-radius: map.get($brandui-radius, 'large');
15
+
10
16
  @include color.color-mode(background-color, brandui-color-labels(neutral-5), brandui-color-labels(neutral-2));
11
17
 
12
18
  &-wrapper {
@@ -53,6 +59,10 @@
53
59
  }
54
60
  }
55
61
  }
62
+
63
+ &-banner {
64
+ border-radius: map.get($brandui-radius, 'medium') map.get($brandui-radius, 'medium') 0 0;
65
+ }
56
66
  }
57
67
 
58
68
  /* Unfinished example of using clip-path (link: https://www.sitepoint.com/css-path-function-squeaky-portraits/) */
@@ -1,5 +1,6 @@
1
1
  @use 'sass:map';
2
2
  @use '../../../../base/variables/sizing' as *;
3
+ @use '../../../../base/variables/effects' as *;
3
4
  @use '../../../../base/mixins/page-theme' as theme;
4
5
  @use '../../../../base/mixins/breakpoints' as break;
5
6
  @use '../../../../components/organisms/ctas/basic-cta' as *;
@@ -8,6 +9,7 @@
8
9
  .basic-cta {
9
10
  max-width: unset;
10
11
  gap: map.get($brandui-padding, extra-large);
12
+ box-shadow: map.get($brandui-shadow, outline);
11
13
  @include theme.theme-color(background-color, spotlight);
12
14
  @include theme.theme-color(border-color, spotlight);
13
15
  }
@@ -2,6 +2,7 @@
2
2
  @use '../../utilities/rich-text' as *;
3
3
  @use '../base/mixins/typography' as font;
4
4
  @use '../../base/functions' as *;
5
+ @use '../../base/mixins/color-mode' as color;
5
6
  @use '../base/variables/typography' as *;
6
7
 
7
8
  .txt-rich,
@@ -38,4 +39,16 @@
38
39
  blockquote:not([class]) {
39
40
  @include font.get-typography(body-lead);
40
41
  }
42
+
43
+ a:not([class]) {
44
+ overflow-wrap: break-word;
45
+ text-decoration: underline;
46
+ font-weight: 700;
47
+ @include color.color-mode(color, brandui-color-labels('action'), brandui-color-labels('action-dark'));
48
+
49
+ &:hover,
50
+ &:focus {
51
+ @include color.color-mode(color, brandui-color-labels('action-secondary'), brandui-color-labels('action-secondary-dark'));
52
+ }
53
+ }
41
54
  }
@@ -60,7 +60,7 @@ The rich text class applies default styling to HTML when you cannot apply class
60
60
 
61
61
  &:hover,
62
62
  &:focus {
63
- @include color.color-mode(color, brandui-color-labels('action-secondary'), brandui-color-labels('action-secondary-dark'));
63
+ @include color.color-mode(color, brandui-color-labels('action-tertiary'), brandui-color-labels('action-tertiary-dark'));
64
64
  }
65
65
  }
66
66
 
package/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "@snyk-mktg/brand-ui",
3
- "version": "2.5.9",
3
+ "version": "2.5.10-canary.0",
4
4
  "description": "The official style library for Snyk’s BrandUI Design System",
5
5
  "scripts": {
6
6
  "dev:css": "gulp devCss",
7
7
  "build": "gulp",
8
8
  "test": "jest",
9
9
  "lint": "sass-lint -v",
10
- "lint:fix": "sass-lint-auto-fix"
10
+ "lint:fix": "sass-lint-auto-fix",
11
+ "compile": "rm -rf dist/js && tsc -p tsconfig.build.json && tsc -p tsconfig.build.json --module CommonJs --moduleResolution node --outDir dist/js/cjs"
11
12
  },
12
13
  "type": "module",
13
14
  "repository": {
@@ -1 +0,0 @@
1
- export {};
@@ -1,59 +0,0 @@
1
- import { expect, describe, it } from '@jest/globals';
2
- import { formatCase } from './';
3
- describe('formatCase', () => {
4
- it('should convert text to kebab case', () => {
5
- const text = 'helloWorld';
6
- const result = formatCase(text, 'kebab');
7
- expect(result).toBe('hello-world');
8
- });
9
- it('should convert text to snake case', () => {
10
- const text = 'helloWorld';
11
- const result = formatCase(text, 'snake');
12
- expect(result).toBe('hello_world');
13
- });
14
- it('should convert text to space case', () => {
15
- const text = 'helloWorld';
16
- const result = formatCase(text, 'space');
17
- expect(result).toBe('hello world');
18
- });
19
- it('should convert text to camel case', () => {
20
- const text = 'hello world';
21
- const result = formatCase(text, 'camel');
22
- expect(result).toBe('helloWorld');
23
- });
24
- it('should convert text to sentence case', () => {
25
- const text = 'hello world';
26
- const result = formatCase(text, 'sentence');
27
- expect(result).toBe('Hello world');
28
- });
29
- it('should capitalize the first letter', () => {
30
- const text = 'hello world';
31
- const result = formatCase(text, 'capitalize');
32
- expect(result).toBe('Hello world');
33
- });
34
- it('should capitalize the first letter of each word', () => {
35
- const text = 'hello world';
36
- const result = formatCase(text, 'capitalizeSentence');
37
- expect(result).toBe('Hello World');
38
- });
39
- it('should handle empty text', () => {
40
- const text = '';
41
- const result = formatCase(text, 'kebab');
42
- expect(result).toBe('');
43
- });
44
- it('should handle invalid convertCase', () => {
45
- const text = 'hello world';
46
- const result = formatCase(text, 'invalid');
47
- expect(result).toBe('hello world');
48
- });
49
- it('should handle text with special characters', () => {
50
- const text = 'hello-world123';
51
- const result = formatCase(text, 'kebab');
52
- expect(result).toBe('hello-world123');
53
- });
54
- it('should handle text with mixed case', () => {
55
- const text = 'HelloWorld';
56
- const result = formatCase(text, 'camel');
57
- expect(result).toBe('helloWorld');
58
- });
59
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,13 +0,0 @@
1
- import { expect, describe, it } from '@jest/globals';
2
- import { classNames } from './'; // Replace with the correct import path
3
- describe('classNames', () => {
4
- it('should return an empty string with no classes', () => {
5
- expect(classNames()).toBe('');
6
- });
7
- it('should return a single class', () => {
8
- expect(classNames('class1')).toBe('class1');
9
- });
10
- it('should return multiple classes joined by spaces', () => {
11
- expect(classNames('class1', 'class2', 'class3')).toBe('class1 class2 class3');
12
- });
13
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,29 +0,0 @@
1
- import { expect, describe, it } from '@jest/globals';
2
- import { getInitials } from './';
3
- describe('getInitials', () => {
4
- it('should return the first and last initials for a full name', () => {
5
- const fullName = 'John Doe';
6
- const initials = getInitials(fullName);
7
- expect(initials).toBe('JD');
8
- });
9
- it('should return the first initial for a single name', () => {
10
- const fullName = 'John';
11
- const initials = getInitials(fullName);
12
- expect(initials).toBe('J');
13
- });
14
- it('should handle empty string input', () => {
15
- const fullName = '';
16
- const initials = getInitials(fullName);
17
- expect(initials).toBe('');
18
- });
19
- it('should handle multiple middle names', () => {
20
- const fullName = 'John William Doe Smith';
21
- const initials = getInitials(fullName);
22
- expect(initials).toBe('JS');
23
- });
24
- it('should handle names with special characters', () => {
25
- const fullName = 'John O\'Brien Smith';
26
- const initials = getInitials(fullName);
27
- expect(initials).toBe('JS');
28
- });
29
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,44 +0,0 @@
1
- import { expect, describe, it } from '@jest/globals';
2
- import { gridSplit, gridSpacing } from './';
3
- describe('gridSplit', () => {
4
- it('should return the count when count is less than maxCols', () => {
5
- expect(gridSplit(3)).toBe(3);
6
- expect(gridSplit(4, 10)).toBe(4);
7
- });
8
- it('should return maxCols when count is greater than or equal to maxCols', () => {
9
- expect(gridSplit(6)).toBe(5); // Default maxCols is 5
10
- expect(gridSplit(10, 8)).toBe(8);
11
- });
12
- it('should return 12 when maxCols is greater than or equal to 12 and sount is 0', () => {
13
- expect(gridSplit(0, 15)).toBe(12);
14
- expect(gridSplit(0, 13)).toBe(12);
15
- });
16
- it('should return 1 for invalid or zero count', () => {
17
- expect(gridSplit(0)).toBe(1);
18
- expect(gridSplit(-2)).toBe(1);
19
- });
20
- });
21
- describe('gridSpacing', () => {
22
- it('should return max width for 2 or less columns', () => {
23
- const spacing2 = gridSpacing(2);
24
- expect(spacing2.hasMaxWidth).toBe(true);
25
- const spacing1 = gridSpacing(1);
26
- expect(spacing1.hasMaxWidth).toBe(true);
27
- });
28
- it('should adjust padding and gap for 4 columns', () => {
29
- const spacing = gridSpacing(4);
30
- expect(spacing).toEqual({
31
- hasMaxWidth: false,
32
- itemPadding: 'medium',
33
- gap: 'medium',
34
- });
35
- });
36
- it('should adjust padding and gap for more than 4 columns', () => {
37
- const spacing = gridSpacing(5);
38
- expect(spacing).toEqual({
39
- hasMaxWidth: false,
40
- itemPadding: 'medium',
41
- gap: 'small',
42
- });
43
- });
44
- });