@apolitical/component-library 0.0.5 → 1.1.0-beta.1

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 (136) hide show
  1. package/accessibility/hidden-from-screen-readers/hidden-from-screen-readers.d.ts +19 -0
  2. package/accessibility/hidden-from-screen-readers/index.d.ts +1 -0
  3. package/accessibility/index.d.ts +2 -0
  4. package/accessibility/visually-hidden/index.d.ts +1 -0
  5. package/accessibility/visually-hidden/visually-hidden.d.ts +21 -0
  6. package/banners/banner-section/banner-section.d.ts +33 -0
  7. package/banners/banner-section/index.d.ts +1 -0
  8. package/banners/index.d.ts +2 -0
  9. package/banners/marketing-block/index.d.ts +1 -0
  10. package/banners/marketing-block/marketing-block.d.ts +17 -0
  11. package/constants/assets.d.ts +1 -0
  12. package/constants/index.d.ts +2 -0
  13. package/constants/number-of-users.d.ts +1 -0
  14. package/context/index.d.ts +1 -0
  15. package/context/user/index.d.ts +3 -0
  16. package/context/user/user.context.d.ts +14 -0
  17. package/context/user/user.provider.d.ts +8 -0
  18. package/form/components/email-helper-text-box/email-helper-text-box.d.ts +14 -0
  19. package/form/components/email-helper-text-box/index.d.ts +1 -0
  20. package/form/components/index.d.ts +3 -0
  21. package/form/components/password-rules/index.d.ts +1 -0
  22. package/form/components/password-rules/password-rules.d.ts +16 -0
  23. package/form/components/rating/index.d.ts +1 -0
  24. package/form/components/rating/rating.d.ts +31 -0
  25. package/form/index.d.ts +2 -0
  26. package/form/types/index.d.ts +1 -0
  27. package/form/types/search-form/index.d.ts +1 -0
  28. package/form/types/search-form/search-form.d.ts +21 -0
  29. package/general/button/button.d.ts +52 -0
  30. package/general/button/index.d.ts +2 -0
  31. package/general/index.d.ts +3 -0
  32. package/general/link/index.d.ts +1 -0
  33. package/general/link/link.d.ts +21 -0
  34. package/general/responsive-image/index.d.ts +2 -0
  35. package/general/responsive-image/responsive-image.helpers.d.ts +68 -0
  36. package/general/responsive-image/responsive-image.mock.d.ts +9 -0
  37. package/helpers/basic-reducer.d.ts +2 -0
  38. package/helpers/breakpoints.d.ts +5 -0
  39. package/helpers/index.d.ts +5 -0
  40. package/helpers/intl-wrapper.d.ts +6 -0
  41. package/helpers/pass-props-to-children.d.ts +3 -0
  42. package/hooks/index.d.ts +3 -0
  43. package/hooks/use-effect-after-mount.d.ts +2 -0
  44. package/hooks/use-screen-width.d.ts +2 -0
  45. package/hooks/use-scroll-listener.d.ts +15 -0
  46. package/index.d.ts +11 -1
  47. package/index.js +160 -1
  48. package/index.mjs +20511 -29
  49. package/layout/download-section/download-section.d.ts +21 -0
  50. package/layout/download-section/index.d.ts +1 -0
  51. package/layout/index.d.ts +3 -1
  52. package/layout/logos/index.d.ts +1 -0
  53. package/layout/logos/logos.d.ts +24 -0
  54. package/layout/logos/logos.mock.d.ts +3 -0
  55. package/layout/page-layout/components/cookie-banner/cookie-banner.d.ts +6 -0
  56. package/layout/page-layout/components/cookie-banner/index.d.ts +1 -0
  57. package/layout/page-layout/components/footer/footer.d.ts +6 -0
  58. package/layout/page-layout/components/footer/footer.data.d.ts +6 -0
  59. package/layout/page-layout/components/footer/index.d.ts +1 -0
  60. package/layout/page-layout/components/header/__mocks__/header.data.d.ts +83 -0
  61. package/layout/page-layout/components/header/components/header-link/header-link.d.ts +13 -0
  62. package/layout/page-layout/components/header/components/header-link/index.d.ts +1 -0
  63. package/layout/page-layout/components/header/components/index.d.ts +1 -0
  64. package/layout/page-layout/components/header/header.d.ts +6 -0
  65. package/layout/page-layout/components/header/header.data.d.ts +112 -0
  66. package/layout/page-layout/components/header/header.helpers.d.ts +39 -0
  67. package/layout/page-layout/components/header/header.mock.d.ts +29 -0
  68. package/layout/page-layout/components/header/index.d.ts +2 -0
  69. package/layout/page-layout/components/index.d.ts +3 -0
  70. package/layout/page-layout/index.d.ts +2 -0
  71. package/layout/page-layout/page-layout.d.ts +16 -0
  72. package/loaders/index.d.ts +4 -0
  73. package/loaders/loading-block/index.d.ts +1 -0
  74. package/loaders/loading-block/loading-block.d.ts +18 -0
  75. package/loaders/loading-placeholder/index.d.ts +1 -0
  76. package/loaders/loading-placeholder/loading-placeholder.d.ts +11 -0
  77. package/loaders/loading-state/index.d.ts +1 -0
  78. package/loaders/loading-state/loading-state.d.ts +5 -0
  79. package/loaders/progress-bar/index.d.ts +1 -0
  80. package/loaders/progress-bar/progress-bar.d.ts +13 -0
  81. package/modals/modal/index.d.ts +1 -0
  82. package/modals/modal/modal.d.ts +9 -0
  83. package/navigation/filters/filters.d.ts +28 -0
  84. package/navigation/filters/index.d.ts +1 -0
  85. package/navigation/index.d.ts +4 -0
  86. package/navigation/load-more/index.d.ts +1 -0
  87. package/navigation/load-more/load-more.d.ts +28 -0
  88. package/navigation/logo/index.d.ts +1 -0
  89. package/navigation/logo/logo.d.ts +12 -0
  90. package/navigation/tags/index.d.ts +1 -0
  91. package/navigation/tags/tags.d.ts +20 -0
  92. package/navigation/tags/tags.helpers.d.ts +34 -0
  93. package/package.json +1 -1
  94. package/style.css +1 -1
  95. package/styles/base/_fonts.scss +1 -1
  96. package/styles/base/_hr.scss +1 -0
  97. package/styles/base/_index.scss +2 -0
  98. package/styles/base/_overlays.scss +26 -0
  99. package/styles/base/_text.scss +5 -1
  100. package/styles/base/_titles.scss +133 -87
  101. package/styles/base/buttons/_buttons.scss +40 -24
  102. package/styles/base/buttons/_sizes.scss +12 -0
  103. package/styles/base/form/_fields.scss +60 -0
  104. package/styles/base/form/_index.scss +2 -0
  105. package/styles/base/form/_search-button.scss +32 -0
  106. package/styles/functions/_size-conversions.scss +3 -1
  107. package/styles/mixins/_backgrounds.scss +1 -5
  108. package/styles/mixins/_breakpoints.scss +4 -1
  109. package/styles/mixins/_browsers.scss +3 -0
  110. package/styles/mixins/_index.scss +3 -0
  111. package/styles/mixins/_selectors.scss +5 -0
  112. package/styles/mixins/_styles.scss +31 -0
  113. package/styles/variables/colors/_colors.scss +5 -0
  114. package/styles/variables/colors/_theme.scss +159 -1
  115. package/styles/variables/sizes/_common.scss +2 -1
  116. package/text/collapsible-section/collapsible-section.d.ts +13 -0
  117. package/text/collapsible-section/index.d.ts +1 -0
  118. package/text/empty-state-box/empty-state-box.d.ts +21 -0
  119. package/text/empty-state-box/index.d.ts +1 -0
  120. package/text/helper-text-box/helper-text-box.d.ts +14 -0
  121. package/text/helper-text-box/index.d.ts +1 -0
  122. package/text/hide-show-text-box/hide-show-text-box.d.ts +16 -0
  123. package/text/hide-show-text-box/hide-show-text-box.mock.d.ts +4 -0
  124. package/text/hide-show-text-box/index.d.ts +1 -0
  125. package/text/highlighted-text-box/highlighted-text-box.d.ts +13 -0
  126. package/text/highlighted-text-box/index.d.ts +1 -0
  127. package/text/index.d.ts +6 -0
  128. package/text/pill/index.d.ts +1 -0
  129. package/text/pill/pill.d.ts +9 -0
  130. package/user/index.d.ts +1 -0
  131. package/user/profile-picture/index.d.ts +1 -0
  132. package/user/profile-picture/profile-picture.d.ts +12 -0
  133. package/user/profile-picture/profile-picture.helpers.d.ts +3 -0
  134. package/demo/demo.d.ts +0 -4
  135. package/demo/index.d.ts +0 -1
  136. package/layout/layout.d.ts +0 -6
@@ -0,0 +1,26 @@
1
+ @use 'sass:map';
2
+ @import './../mixins',
3
+ './../variables';
4
+
5
+ @layer base {
6
+ .overlay {
7
+ @include transition(opacity, 0.1s, ease);
8
+
9
+ width: 0;
10
+ height: 0;
11
+ background: map.get($theme, 'overlay');
12
+ position: fixed;
13
+ top: 0;
14
+ left: 0;
15
+ opacity: 0;
16
+ z-index: -1;
17
+
18
+ &.open {
19
+ width: 100vw;
20
+ height: 100vh;
21
+ opacity: 1;
22
+ z-index: 998;
23
+ }
24
+
25
+ }
26
+ }
@@ -12,9 +12,11 @@ $sup: ('font-size': 10);
12
12
  p, li, small {
13
13
  color: map.get($theme, 'text');
14
14
  font-weight: 500;
15
+
16
+ .error &, &.error { color: map.get($theme, 'text_error'); }
15
17
  }
16
18
 
17
- p, li {
19
+ p, li, dt, dd {
18
20
  font-size: px-to-rem(map.get($default, 'font-size'));
19
21
  line-height: px-to-rem(map.get($default, 'line-height'));
20
22
 
@@ -77,4 +79,6 @@ $sup: ('font-size': 10);
77
79
  vertical-align: sub;
78
80
  }
79
81
 
82
+ address { font-style: normal; }
83
+
80
84
  }
@@ -13,118 +13,164 @@ $h5: ('font-size': 12, 'font-size_md': 14, 'line-height': 16, 'margin-top': 16,
13
13
  $h6: ('font-size': 12, 'font-size_md': 11, 'line-height': 16);
14
14
  $subtitle: ('font-size': 20, 'font-size_md': 24, 'line-height': 28, 'line-height_md': 32, 'margin-bottom': 20);
15
15
 
16
- @layer base {
17
- .pre-title, h5, h6 {
18
- color: map.get($theme, 'title');
19
- text-transform: uppercase;
20
- font-weight: 700;
21
- }
22
-
23
- .title, h1, h2, h3, h4 {
24
- color: map.get($theme, 'title');
25
- font-weight: 900;
26
- }
16
+ @mixin pre-title {
17
+ margin-bottom: px-to-rem(map.get($pre-title, 'margin-bottom'));
18
+ font-size: px-to-rem(map.get($pre-title, 'font-size'));
19
+ color: map.get($theme, 'title');
20
+ font-weight: 700;
21
+ line-height: px-to-rem(map.get($pre-title, 'line-height'));
22
+ letter-spacing: px-to-rem(map.get($pre-title, 'letter-spacing'));
23
+ text-transform: uppercase;
24
+
25
+ @include breakpoint('min-width', 'md') {
26
+ font-size: px-to-rem(map.get($pre-title, 'font-size_md'));
27
+ line-height: px-to-rem(map.get($pre-title, 'line-height_md'));
28
+ }
29
+ }
30
+
31
+ @mixin title {
32
+ margin-bottom: px-to-rem(map.get($title, 'margin-bottom'));
33
+ font-size: px-to-rem(map.get($title, 'font-size'));
34
+ color: map.get($theme, 'title');
35
+ font-weight: 900;
36
+ line-height: px-to-rem(map.get($title, 'line-height'));
37
+ letter-spacing: px-to-rem(map.get($title, 'letter-spacing'));
38
+
39
+ @include breakpoint('min-width', 'md') {
40
+ font-size: px-to-rem(map.get($title, 'font-size_md'));
41
+ line-height: px-to-rem(map.get($title, 'line-height_md'));
42
+ }
43
+ }
44
+
45
+ @mixin h1 {
46
+ margin-bottom: px-to-rem(map.get($h1, 'margin-bottom'));
47
+ font-size: px-to-rem(map.get($h1, 'font-size'));
48
+ color: map.get($theme, 'title');
49
+ text-transform: none;
50
+ font-weight: 900;
51
+ line-height: px-to-rem(map.get($h1, 'line-height'));
52
+ letter-spacing: px-to-rem(map.get($h1, 'letter-spacing'));
53
+
54
+ @include breakpoint('min-width', 'md') {
55
+ font-size: px-to-rem(map.get($h1, 'font-size_md'));
56
+ line-height: px-to-rem(map.get($h1, 'line-height_md'));
57
+ }
58
+ }
59
+
60
+ @mixin h2 {
61
+ margin: px-to-rem(map.get($h2, 'margin-top')) 0 px-to-rem(map.get($h2, 'margin-bottom')) 0;
62
+ font-size: px-to-rem(map.get($h2, 'font-size'));
63
+ color: map.get($theme, 'title');
64
+ text-transform: none;
65
+ font-weight: 900;
66
+ line-height: px-to-rem(map.get($h2, 'line-height'));
67
+
68
+ @include breakpoint('min-width', 'md') {
69
+ font-size: px-to-rem(map.get($h2, 'font-size_md'));
70
+ line-height: px-to-rem(map.get($h2, 'line-height_md'));
71
+ }
72
+ }
73
+
74
+ @mixin h3 {
75
+ margin: px-to-rem(map.get($h3, 'margin-top')) 0 px-to-rem(map.get($h3, 'margin-bottom')) 0;
76
+ font-size: px-to-rem(map.get($h3, 'font-size'));
77
+ color: map.get($theme, 'title');
78
+ text-transform: none;
79
+ font-weight: 900;
80
+ line-height: px-to-rem(map.get($h3, 'line-height'));
81
+
82
+ @include breakpoint('min-width', 'md') {
83
+ font-size: px-to-rem(map.get($h3, 'font-size_md'));
84
+ line-height: px-to-rem(map.get($h3, 'line-height_md'));
85
+ }
86
+ }
87
+
88
+ @mixin h4 {
89
+ margin: px-to-rem(map.get($h4, 'margin-top')) 0 px-to-rem(map.get($h4, 'margin-bottom')) 0;
90
+ font-size: px-to-rem(map.get($h4, 'font-size'));
91
+ color: map.get($theme, 'title');
92
+ text-transform: none;
93
+ font-weight: 900;
94
+ line-height: px-to-rem(map.get($h4, 'line-height'));
95
+
96
+ @include breakpoint('min-width', 'md') {
97
+ font-size: px-to-rem(map.get($h4, 'font-size_md'));
98
+ line-height: px-to-rem(map.get($h4, 'line-height_md'));
99
+ }
100
+ }
101
+
102
+ @mixin h5 {
103
+ margin: px-to-rem(map.get($h5, 'margin-top')) 0 px-to-rem(map.get($h5, 'margin-bottom')) 0;
104
+ font-size: px-to-rem(map.get($h5, 'font-size'));
105
+ color: map.get($theme, 'title');
106
+ text-transform: uppercase;
107
+ font-weight: 700;
108
+ line-height: px-to-rem(map.get($h5, 'line-height'));
109
+
110
+ @include breakpoint('min-width', 'md') {
111
+ font-size: px-to-rem(map.get($h5, 'font-size_md'));
112
+ }
113
+ }
114
+
115
+ @mixin h6 {
116
+ font-size: px-to-rem(map.get($h6, 'font-size'));
117
+ color: map.get($theme, 'title');
118
+ text-transform: uppercase;
119
+ font-weight: 700;
120
+ line-height: px-to-rem(map.get($h6, 'line-height'));
121
+
122
+ @include breakpoint('min-width', 'md') {
123
+ font-size: px-to-rem(map.get($h6, 'font-size_md'));
124
+ }
125
+ }
126
+
127
+ @mixin subtitle {
128
+ margin-bottom: px-to-rem(map.get($subtitle, 'margin-bottom'));
129
+ font-size: px-to-rem(map.get($subtitle, 'font-size'));
130
+ color: map.get($theme, 'subtitle');
131
+ font-weight: 400;
132
+ line-height: px-to-rem(map.get($subtitle, 'line-height'));
133
+
134
+ @include breakpoint('min-width', 'md') {
135
+ font-size: px-to-rem(map.get($subtitle, 'font-size_md'));
136
+ line-height: px-to-rem(map.get($subtitle, 'line-height_md'));
137
+ }
138
+ }
27
139
 
140
+ @layer base {
28
141
  .pre-title {
29
- margin-bottom: px-to-rem(map.get($pre-title, 'margin-bottom'));
30
- font-size: px-to-rem(map.get($pre-title, 'font-size'));
31
- line-height: px-to-rem(map.get($pre-title, 'line-height'));
32
- letter-spacing: px-to-rem(map.get($pre-title, 'letter-spacing'));
33
- text-transform: uppercase;
34
-
35
- @include breakpoint('min-width', 'md') {
36
- font-size: px-to-rem(map.get($pre-title, 'font-size_md'));
37
- line-height: px-to-rem(map.get($title, 'line-height_md'));
38
- }
142
+ @include pre-title;
39
143
  }
40
144
 
41
145
  .title {
42
- margin-bottom: px-to-rem(map.get($title, 'margin-bottom'));
43
- font-size: px-to-rem(map.get($title, 'font-size'));
44
- line-height: px-to-rem(map.get($title, 'line-height'));
45
- letter-spacing: px-to-rem(map.get($title, 'letter-spacing'));
46
-
47
- @include breakpoint('min-width', 'md') {
48
- font-size: px-to-rem(map.get($title, 'font-size_md'));
49
- line-height: px-to-rem(map.get($title, 'line-height_md'));
50
- }
146
+ @include title;
51
147
  }
52
148
 
53
149
  h1 {
54
- margin-bottom: px-to-rem(map.get($h1, 'margin-bottom'));
55
- font-size: px-to-rem(map.get($h1, 'font-size'));
56
- line-height: px-to-rem(map.get($h1, 'line-height'));
57
- letter-spacing: px-to-rem(map.get($h1, 'letter-spacing'));
58
-
59
- @include breakpoint('min-width', 'md') {
60
- font-size: px-to-rem(map.get($h1, 'font-size_md'));
61
- line-height: px-to-rem(map.get($h1, 'line-height_md'));
62
- }
150
+ @include h1;
63
151
  }
64
152
 
65
153
  h2 {
66
- margin: px-to-rem(map.get($h2, 'margin-top')) 0 px-to-rem(map.get($h2, 'margin-bottom')) 0;
67
- font-size: px-to-rem(map.get($h2, 'font-size'));
68
- line-height: px-to-rem(map.get($h2, 'line-height'));
69
-
70
- @include breakpoint('min-width', 'md') {
71
- font-size: px-to-rem(map.get($h2, 'font-size_md'));
72
- line-height: px-to-rem(map.get($h2, 'line-height_md'));
73
- }
154
+ @include h2;
74
155
  }
75
156
 
76
157
  h3 {
77
- margin: px-to-rem(map.get($h3, 'margin-top')) 0 px-to-rem(map.get($h3, 'margin-bottom')) 0;
78
- font-size: px-to-rem(map.get($h3, 'font-size'));
79
- line-height: px-to-rem(map.get($h3, 'line-height'));
80
-
81
- @include breakpoint('min-width', 'md') {
82
- font-size: px-to-rem(map.get($h3, 'font-size_md'));
83
- line-height: px-to-rem(map.get($h3, 'line-height_md'));
84
- }
158
+ @include h3;
85
159
  }
86
160
 
87
161
  h4 {
88
- margin: px-to-rem(map.get($h4, 'margin-top')) 0 px-to-rem(map.get($h4, 'margin-bottom')) 0;
89
- font-size: px-to-rem(map.get($h4, 'font-size'));
90
- line-height: px-to-rem(map.get($h4, 'line-height'));
91
-
92
- @include breakpoint('min-width', 'md') {
93
- font-size: px-to-rem(map.get($h4, 'font-size_md'));
94
- line-height: px-to-rem(map.get($h4, 'line-height_md'));
95
- }
162
+ @include h4;
96
163
  }
97
164
 
98
-
99
165
  h5 {
100
- margin: px-to-rem(map.get($h5, 'margin-top')) 0 px-to-rem(map.get($h5, 'margin-bottom')) 0;
101
- font-size: px-to-rem(map.get($h5, 'font-size'));
102
- line-height: px-to-rem(map.get($h5, 'line-height'));
103
-
104
- @include breakpoint('min-width', 'md') {
105
- font-size: px-to-rem(map.get($h5, 'font-size_md'));
106
- }
166
+ @include h5;
107
167
  }
108
168
 
109
169
  h6 {
110
- font-size: px-to-rem(map.get($h6, 'font-size'));
111
- line-height: px-to-rem(map.get($h6, 'line-height'));
112
-
113
- @include breakpoint('min-width', 'md') {
114
- font-size: px-to-rem(map.get($h6, 'font-size_md'));
115
- }
170
+ @include h6;
116
171
  }
117
172
 
118
173
  .subtitle {
119
- margin-bottom: px-to-rem(map.get($subtitle, 'margin-bottom'));
120
- font-size: px-to-rem(map.get($subtitle, 'font-size'));
121
- color: map.get($theme, 'subtitle');
122
- font-weight: 400;
123
- line-height: px-to-rem(map.get($subtitle, 'line-height'));
124
-
125
- @include breakpoint('min-width', 'md') {
126
- font-size: px-to-rem(map.get($subtitle, 'font-size_md'));
127
- line-height: px-to-rem(map.get($subtitle, 'line-height_md'));
128
- }
174
+ @include subtitle;
129
175
  }
130
176
  }
@@ -3,19 +3,7 @@
3
3
  @import './../../functions',
4
4
  './../../mixins',
5
5
  './../../variables';
6
- @import './icons', './mixins';
7
-
8
- // The button defaults to the primary variant and medium styling so are not added as classes - they live on the default `button` styling
9
- $large: ('font-size': 18, 'padding-top': 14, 'padding-horizontal': 24, 'padding-bottom': 16, 'icon-width': 18, 'icon-offset': 2, 'icon-gutter': 12);
10
- $medium: ('font-size': 16, 'padding-top': 10, 'padding-horizontal': 24, 'padding-bottom': 12, 'icon-width': 16, 'icon-offset': 2, 'icon-gutter': 10);
11
- $small: ('font-size': 14, 'padding-top': 8, 'padding-horizontal': 16, 'padding-bottom': 10, 'icon-width': 12, 'icon-offset': 2, 'icon-gutter': 8);
12
- $sizes: ('large', $large), ('small', $small);
13
- $secondary: ('border': 1);
14
-
15
- // The tertiary styling has its own padding; regardless of size, we add a tiny amount of padding to accommodate
16
- // the focus outline and to ensure any icons are centered
17
- $tertiary: ('padding-top': 1.6, 'padding-horizontal': 8,'padding-bottom': 3.2);
18
- $animation: ('scale': 1.1, 'duration': 0.5, 'iteration': 1);
6
+ @import './icons', './mixins', './sizes';
19
7
 
20
8
  @layer base {
21
9
  button, .button {
@@ -25,7 +13,6 @@ $animation: ('scale': 1.1, 'duration': 0.5, 'iteration': 1);
25
13
  position: relative;
26
14
  text-align: center;
27
15
  font-size: px-to-rem(map.get($medium, 'font-size'));
28
- color: map.get($theme, 'button_primary');
29
16
  font-weight: 700;
30
17
  text-decoration: none;
31
18
  border-radius: 360rem; // Completely round corners. This could be any large number but 360 evokes a circle well!
@@ -34,6 +21,8 @@ $animation: ('scale': 1.1, 'duration': 0.5, 'iteration': 1);
34
21
  box-sizing: border-box;
35
22
  display: inline-block;
36
23
 
24
+ &, &:hover, &:active, &:focus, &:focus-visible { color: map.get($theme, 'button_primary'); }
25
+
37
26
  &:hover {
38
27
  background: map.get($theme, 'button_primary_bg_hover');
39
28
  }
@@ -83,9 +72,10 @@ $animation: ('scale': 1.1, 'duration': 0.5, 'iteration': 1);
83
72
 
84
73
  &.secondary {
85
74
  background: map.get($theme, 'button_secondary_bg');
86
- color: map.get($theme, 'button_secondary');
87
75
  border: px-to-rem(map.get($secondary, 'border')) solid map.get($theme, 'button_secondary_border');
88
76
 
77
+ &, &:hover { color: map.get($theme, 'button_secondary'); }
78
+
89
79
  &:hover {
90
80
  background: map.get($theme, 'button_secondary_bg_hover');
91
81
  }
@@ -185,7 +175,20 @@ $animation: ('scale': 1.1, 'duration': 0.5, 'iteration': 1);
185
175
  display: block;
186
176
  }
187
177
 
188
- &.right::before { order: 2; }
178
+ &.left {
179
+ &::before { margin-right: px-to-rem(map.get($medium, 'icon-gutter')); }
180
+
181
+ &.no-text::before { margin-right: 0; }
182
+ }
183
+
184
+ &.right {
185
+ &::before {
186
+ margin-left: px-to-rem(map.get($medium, 'icon-gutter'));
187
+ order: 2;
188
+ }
189
+
190
+ &.no-text::before { margin-left: 0; }
191
+ }
189
192
 
190
193
  @each $icon, $large-icon, $medium-icon, $small-icon in $icons {
191
194
  $icon-sizes: ('large', $large-icon), ('medium', $medium-icon), ('small', $small-icon);
@@ -207,20 +210,33 @@ $animation: ('scale': 1.1, 'duration': 0.5, 'iteration': 1);
207
210
  }
208
211
 
209
212
  &.animate {
210
- @include animate {
211
- @keyframes bounce {
212
- 0%, 100% { transform: scale(1); }
213
+ &::before {
214
+ @include transition(transform, #{map.get($animation, 'duration')}s, ease);
215
+
216
+ transform: none;
217
+ }
213
218
 
214
- 70% {
215
- transform: scale(#{map.get($animation, 'scale')});
219
+ &.bounce {
220
+ @include animate {
221
+ @keyframes bounce {
222
+ 0%, 100% { transform: scale(1); }
223
+
224
+ 70% {
225
+ transform: scale(#{map.get($animation-bounce, 'scale')});
226
+ }
227
+ }
228
+
229
+ &:focus, &:active, &.do-animation {
230
+ &::before { animation: bounce #{map.get($animation-bounce, 'duration')}s #{map.get($animation-bounce, 'iteration')}; }
216
231
  }
217
- }
218
232
 
219
- &:focus, &:active, &.do-animation {
220
- &::before { animation: bounce #{map.get($animation, 'duration')}s #{map.get($animation, 'iteration')}; }
221
233
  }
234
+ }
222
235
 
236
+ &.rotate-180::before {
237
+ transform: rotate(180deg);
223
238
  }
239
+
224
240
  }
225
241
  }
226
242
 
@@ -0,0 +1,12 @@
1
+ // The button defaults to the primary variant and medium styling so are not added as classes - they live on the default `button` styling
2
+ $large: ('font-size': 18, 'padding-top': 14, 'padding-horizontal': 24, 'padding-bottom': 16, 'icon-width': 18, 'icon-offset': 2, 'icon-gutter': 12);
3
+ $medium: ('font-size': 16, 'padding-top': 10, 'padding-horizontal': 24, 'padding-bottom': 12, 'icon-width': 16, 'icon-offset': 2, 'icon-gutter': 10);
4
+ $small: ('font-size': 14, 'padding-top': 8, 'padding-horizontal': 16, 'padding-bottom': 10, 'icon-width': 12, 'icon-offset': 2, 'icon-gutter': 8);
5
+ $sizes: ('large', $large), ('small', $small);
6
+ $secondary: ('border': 1);
7
+
8
+ // The tertiary styling has its own padding; regardless of size, we add a tiny amount of padding to accommodate
9
+ // the focus outline and to ensure any icons are centered
10
+ $tertiary: ('padding-top': 1.6, 'padding-horizontal': 8,'padding-bottom': 3.2);
11
+ $animation: ('duration': 0.2);
12
+ $animation-bounce: ('scale': 1.1, 'duration': 0.5, 'iteration': 1);
@@ -0,0 +1,60 @@
1
+ @use 'sass:map';
2
+ @import './../../functions',
3
+ './../../mixins',
4
+ './../../variables';
5
+
6
+ $field: ('padding-vertical': 8, 'padding-horizontal': 16, 'font-size': 16, 'line-height': 24, 'border': 1, 'border-radius': 8);
7
+
8
+ @mixin field-styling {
9
+ background: map.get($theme, 'form_input_bg');
10
+ border: px-to-rem(map.get($field, 'border')) solid map.get($theme, 'form_input_border');
11
+ border-radius: px-to-rem(map.get($field, 'border-radius'));
12
+ box-sizing: border-box;
13
+ outline: none;
14
+
15
+ &:focus, &:focus-visible {
16
+ box-shadow: $outline-width map.get($theme, 'form_input_focus_box-shadow');
17
+ }
18
+
19
+ &.error {
20
+ border-color: map.get($theme, 'form_input_error_border');
21
+ }
22
+ }
23
+
24
+ @layer base {
25
+ input, .input, textarea {
26
+ @include field-styling;
27
+
28
+ width: 100%;
29
+ padding: px-to-rem(map.get($field, 'padding-vertical')) px-to-rem(map.get($field, 'padding-horizontal'));
30
+ font-size: px-to-rem(map.get($field, 'font-size'));
31
+ color: map.get($theme, 'form_input');
32
+ line-height: px-to-rem(map.get($field, 'line-height'));
33
+
34
+ ::placeholder {
35
+ color: map.get($theme, 'form_input_placeholder');
36
+ }
37
+
38
+ // Remove default styling, for consistency
39
+ &[type='search'] {
40
+ &::-ms-clear {
41
+ width: 0;
42
+ height: 0;
43
+ display: none;
44
+ }
45
+
46
+ &::-ms-reveal {
47
+ width: 0;
48
+ height: 0;
49
+ display: none;
50
+ }
51
+
52
+ &::-webkit-search-decoration,
53
+ &::-webkit-search-cancel-button,
54
+ &::-webkit-search-results-button,
55
+ &::-webkit-search-results-decoration {
56
+ display: none;
57
+ }
58
+ }
59
+ }
60
+ }
@@ -0,0 +1,2 @@
1
+ @import 'fields',
2
+ 'search-button';
@@ -0,0 +1,32 @@
1
+ @use 'sass:map';
2
+ @import './../../functions',
3
+ './../../mixins',
4
+ './../../variables';
5
+
6
+ $search-icon: ('width': 24, 'height': 24);
7
+
8
+ @layer base {
9
+ button.search {
10
+ width: px-to-rem(map.get($search-icon, 'width'));
11
+ height: px-to-rem(map.get($search-icon, 'height'));
12
+ background: transparent;
13
+ margin: 0;
14
+ padding: 0;
15
+ border: none;
16
+ display: flex;
17
+ align-items: center;
18
+ justify-content: center;
19
+ cursor: pointer;
20
+
21
+ &::before {
22
+ @include transition(background, 0.3s, ease);
23
+ @include image('icons/magnifying-glass.svg', true);
24
+
25
+ content: '';
26
+ width: px-to-rem(map.get($search-icon, 'width'));
27
+ height: px-to-rem(map.get($search-icon, 'height'));
28
+ background: map.get($theme, 'form_search-button_bg');
29
+ display: block;
30
+ }
31
+ }
32
+ }
@@ -4,5 +4,7 @@
4
4
  // We want to use rem for accessibility, but Figma uses px (which is also a bit easier for us
5
5
  // to read and reason about). This mixin does the conversion for us.
6
6
  @function px-to-rem($size, $baseTextSize: 16) {
7
- @return math.div($size, $baseTextSize) + rem;
7
+ $new-size: math.div($size, $baseTextSize);
8
+
9
+ @return $new-size + rem;
8
10
  }
@@ -10,11 +10,7 @@
10
10
  @if string.index($image, 'http') {
11
11
  $image: $image;
12
12
  } @else {
13
- @if $is-mask {
14
- $image: $assets-bucket + $image;
15
- } @else {
16
- $image: $image-bucket + $image;
17
- }
13
+ $image: $assets-bucket + $image;
18
14
  }
19
15
 
20
16
  @if $is-mask {
@@ -1,7 +1,10 @@
1
1
  @use 'sass:map';
2
2
 
3
3
  $breakpoint-sizes: (
4
- 'md': 769
4
+ 'sm': 580,
5
+ 'md': 769,
6
+ 'md-lg': 1024,
7
+ 'lg': 1180,
5
8
  );
6
9
 
7
10
  // This mixin lets us use fast references for common breakpoints, using the map above,
@@ -0,0 +1,3 @@
1
+ @mixin target-safari() {
2
+ @media not all and (resolution >=.001dpcm) { @content; }
3
+ }
@@ -1,4 +1,7 @@
1
1
  @import 'animations',
2
2
  'backgrounds',
3
3
  'breakpoints',
4
+ 'browsers',
5
+ 'selectors',
6
+ 'styles',
4
7
  'transitions';
@@ -0,0 +1,5 @@
1
+ @mixin amend-selector-path($old, $new) {
2
+ @at-root #{selector-replace(&, $old, $new)} {
3
+ @content;
4
+ }
5
+ }
@@ -0,0 +1,31 @@
1
+ @use 'sass:map';
2
+ @use 'sass:math';
3
+ @import './../variables',
4
+ './../functions';
5
+
6
+ @mixin dashed-border($color: map.get($theme, 'divider')) {
7
+ background-image: url("data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='8' ry='8' stroke='#{$color}' stroke-width='1' stroke-dasharray='6%2c 8' stroke-dashoffset='2' stroke-linecap='round'/%3e%3c/svg%3e");
8
+ }
9
+
10
+ @mixin line-under-text($color: 'light', $width: 60, $height: 4, $gap: 16, $border-radius: 2.5) {
11
+ position: relative;
12
+ padding-bottom: px-to-rem($height + $gap);
13
+
14
+ &::after {
15
+ content: '';
16
+ background: map.get($theme, 'text_line');
17
+ width: px-to-rem($width);
18
+ height: px-to-rem($height);
19
+ position: absolute;
20
+ bottom: 0;
21
+ left: 50%;
22
+ margin-left: -(px-to-rem(math.div($width, 2)));
23
+ border-radius: px-to-rem($border-radius);
24
+
25
+ @if $color == 'dark' {
26
+ background: map.get($theme, 'text_line_dark');
27
+ }
28
+ }
29
+
30
+
31
+ }
@@ -20,11 +20,13 @@ $default-colors: (
20
20
 
21
21
  'g50': rgb(235 250 246 / 100%),
22
22
  'g100': rgb(195 240 228 / 100%),
23
+ 'g200': rgb(153 219 201),
23
24
  'g300': rgb(124 220 197 / 100%),
24
25
  'g600': rgb(43 137 117 / 100%),
25
26
  'g700': rgb(28 104 88 / 100%),
26
27
  'g900': rgb(10 38 33 / 100%),
27
28
 
29
+ 'n10': rgb(222 226 232 / 100%),
28
30
  'n50': rgb(240 245 255 / 100%),
29
31
  'n100': rgb(215 224 239 / 100%),
30
32
  'n200': rgb(192 203 223 / 100%),
@@ -38,6 +40,7 @@ $default-colors: (
38
40
  'p100': rgb(238 200 237 / 100%),
39
41
  'p300': rgb(203 130 197 / 100%),
40
42
  'p500': rgb(166 55 152 / 100%),
43
+ 'p600': rgb(136 90 189 / 100%),
41
44
  'p900': rgb(66 1 55 / 100%),
42
45
 
43
46
  'y50': rgb(255 248 232 / 100%),
@@ -61,4 +64,6 @@ $default-colors: (
61
64
  'warning50': rgb(255 242 230 / 100%),
62
65
  'warning500': rgb(220 121 29 / 100%),
63
66
  'warning700': rgb(137 71 11 / 100%),
67
+
68
+
64
69
  );