@simplybusiness/theme-core 7.6.14 → 7.7.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # Changelog
2
2
 
3
+ ## 7.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 6962cbb: feat: Hoist all CSS variables into theme variable files
8
+
9
+ ### Patch Changes
10
+
11
+ - 909dfe7: Add button variables to theme-core and ctm
12
+ - Updated dependencies [909dfe7]
13
+ - Updated dependencies [6962cbb]
14
+ - @simplybusiness/mobius@5.28.0
15
+
16
+ ## 7.6.15
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies [29209dd]
21
+ - @simplybusiness/mobius@5.27.5
22
+
3
23
  ## 7.6.14
4
24
 
5
25
  ### Patch Changes
package/dist/index.css CHANGED
@@ -171,12 +171,12 @@ h6.mobius-accordion__link-text,
171
171
 
172
172
  :root,
173
173
  :host{
174
- --button-variant-primary-font-variation-settings:normal;
175
- --button-variant-primary-color:var(--color-primary);
176
- --button-variant-primary-content-color:var(--color-text-inverted);
177
- --button-variant-primary-hover-color:var(--color-primary-hover);
178
- --button-variant-secondary-color:var(--color-secondary);
179
- --button-variant-secondary-hover-color:var(--color-secondary-hover);
174
+ --button-primary-font-variation:normal;
175
+ --button-primary-color:var(--color-primary);
176
+ --button-primary-content-color:var(--color-text-inverted);
177
+ --button-primary-hover-color:var(--color-primary-hover);
178
+ --button-secondary-color:var(--color-secondary);
179
+ --button-secondary-hover-color:var(--color-secondary-hover);
180
180
  --button-border-radius:var(--radius-1);
181
181
  }
182
182
 
@@ -201,37 +201,35 @@ h6.mobius-accordion__link-text,
201
201
 
202
202
  .mobius-button:where(.--has-icon){
203
203
  display:inline-flex;
204
- gap:var(--size-xs);
204
+ gap:var(--button-gap);
205
205
  }
206
206
 
207
207
  .mobius-button:where(.--size-sm){
208
208
  font-size:var(--font-size-3);
209
209
  line-height:16px;
210
- padding:10px var(--size-sm);
210
+ padding:var(--button-padding-sm);
211
211
  }
212
212
 
213
213
  .mobius-button:where(.--size-md){
214
214
  font-size:var(--font-size-4);
215
215
  line-height:24px;
216
- padding:14px var(--size-md);
216
+ padding:var(--button-padding-md);
217
217
  }
218
218
 
219
219
  .mobius-button:where(.--size-lg){
220
220
  font-size:var(--font-size-5);
221
221
  line-height:32px;
222
- padding:14px var(--size-md);
222
+ padding:var(--button-padding-lg);
223
223
  }
224
224
 
225
225
  .mobius-button:where(.--variant-primary){
226
- --button-content-color:var(--button-variant-primary-content-color);
227
- background-color:var(--button-variant-primary-color);
228
- font-variation-settings:var(
229
- --button-variant-primary-font-variation-settings
230
- );
226
+ --button-content-color:var(--button-primary-content-color);
227
+ background-color:var(--button-primary-color);
228
+ font-variation-settings:var(--button-primary-font-variation);
231
229
  }
232
230
 
233
231
  .mobius-button:where(.--variant-primary):where(:active),.mobius-button:where(.--variant-primary):where(:hover){
234
- background-color:var(--button-variant-primary-hover-color);
232
+ background-color:var(--button-primary-hover-color);
235
233
  }
236
234
 
237
235
  .mobius-button:where(.--variant-primary):where(:focus-visible){
@@ -245,15 +243,15 @@ h6.mobius-accordion__link-text,
245
243
  }
246
244
 
247
245
  .mobius-button:where(.--variant-secondary){
248
- --button-content-color:var(--button-variant-secondary-color);
246
+ --button-content-color:var(--button-secondary-color);
249
247
  background-color:transparent;
250
- border-color:var(--button-variant-secondary-color);
248
+ border-color:var(--button-secondary-color);
251
249
  }
252
250
 
253
251
  .mobius-button:where(.--variant-secondary):where(:active),.mobius-button:where(.--variant-secondary):where(:hover){
254
252
  --button-content-color:var(--color-text-inverted);
255
- background-color:var(--button-variant-secondary-hover-color);
256
- border-color:var(--button-variant-secondary-hover-color);
253
+ background-color:var(--button-secondary-hover-color);
254
+ border-color:var(--button-secondary-hover-color);
257
255
  }
258
256
 
259
257
  .mobius-button:where(.--variant-secondary):where(:focus-visible){
@@ -674,7 +672,7 @@ a.mobius-button:focus-visible,
674
672
  :host,
675
673
  ::backdrop{
676
674
  --drawer-transition-duration:0;
677
- --color-neutral-700:#18181d;
675
+ --backdrop-color:#18181d;
678
676
  }
679
677
 
680
678
  @media (prefers-reduced-motion: no-preference){
@@ -709,7 +707,7 @@ a.mobius-button:focus-visible,
709
707
  }
710
708
 
711
709
  .mobius-drawer::backdrop{
712
- background-color:var(--color-neutral-700);
710
+ background-color:var(--backdrop-color);
713
711
  opacity:0;
714
712
  transition:opacity var(--drawer-transition-duration) ease-in-out;
715
713
  }
@@ -720,7 +718,7 @@ a.mobius-button:focus-visible,
720
718
  right:0;
721
719
  bottom:0;
722
720
  left:0;
723
- background-color:var(--color-neutral-700);
721
+ background-color:var(--backdrop-color);
724
722
  opacity:0.3;
725
723
  }
726
724
 
@@ -744,9 +742,9 @@ a.mobius-button:focus-visible,
744
742
  @supports (height: 100dvh){
745
743
 
746
744
  .mobius-drawer.--top,.mobius-drawer.--bottom{
747
- height:100dvh;
748
- max-height:100dvh;
749
- padding-bottom:0;
745
+ height:100dvh;
746
+ max-height:100dvh;
747
+ padding-bottom:0;
750
748
  }
751
749
  }
752
750
 
@@ -767,7 +765,7 @@ a.mobius-button:focus-visible,
767
765
  max-height:100dvh;
768
766
  padding-bottom:0;
769
767
  }
770
- }
768
+ }
771
769
 
772
770
  .mobius-drawer:not(.--should-transition){
773
771
  display:none;
@@ -1122,7 +1120,7 @@ a.mobius-button:focus-visible,
1122
1120
  :host,
1123
1121
  ::backdrop{
1124
1122
  --modal-transition-duration:0;
1125
- --color-neutral-700:#18181d;
1123
+ --backdrop-color:#18181d;
1126
1124
  }
1127
1125
 
1128
1126
  @media (prefers-reduced-motion: no-preference){
@@ -1163,7 +1161,7 @@ a.mobius-button:focus-visible,
1163
1161
  }
1164
1162
 
1165
1163
  .mobius-modal::backdrop{
1166
- background-color:var(--color-neutral-700);
1164
+ background-color:var(--backdrop-color);
1167
1165
  opacity:0;
1168
1166
  transition:opacity var(--modal-transition-duration) ease-in-out;
1169
1167
  }
@@ -1174,7 +1172,7 @@ a.mobius-button:focus-visible,
1174
1172
  right:0;
1175
1173
  bottom:0;
1176
1174
  left:0;
1177
- background-color:var(--color-neutral-700);
1175
+ background-color:var(--backdrop-color);
1178
1176
  opacity:0.3;
1179
1177
  }
1180
1178
 
@@ -1813,6 +1811,7 @@ a.mobius-button:focus-visible,
1813
1811
  box-sizing:border-box;
1814
1812
  width:100%;
1815
1813
  padding:var(--input-field-padding);
1814
+ padding-right:var(--size-xxl);
1816
1815
  font-family:var(--font-family);
1817
1816
  font-size:var(--font-size-regular);
1818
1817
  border:var(--border-default);
@@ -1821,6 +1820,8 @@ a.mobius-button:focus-visible,
1821
1820
  color:var(--color-text-medium);
1822
1821
  outline:0;
1823
1822
  appearance:none;
1823
+ white-space:nowrap;
1824
+ text-overflow:ellipsis;
1824
1825
  }
1825
1826
 
1826
1827
  .mobius-select.--is-disabled{
@@ -1855,6 +1856,7 @@ a.mobius-button:focus-visible,
1855
1856
  position:absolute;
1856
1857
  right:2px;
1857
1858
  height:100%;
1859
+ width:var(--size-xxl);
1858
1860
  padding:var(--size-md);
1859
1861
  border-radius:var(--radius-1);
1860
1862
  pointer-events:none;
@@ -2023,7 +2025,7 @@ a.mobius-button:focus-visible,
2023
2025
 
2024
2026
  :root,
2025
2027
  :host{
2026
- --transition-duration:0.15s;
2028
+ --switch-transition-duration:0.15s;
2027
2029
  }
2028
2030
 
2029
2031
  .mobius-switch{
@@ -2053,7 +2055,7 @@ a.mobius-button:focus-visible,
2053
2055
  right:0;
2054
2056
  bottom:0;
2055
2057
  background-color:var(--color-border);
2056
- transition:var(--transition-duration);
2058
+ transition:var(--switch-transition-duration);
2057
2059
  }
2058
2060
 
2059
2061
  .mobius-switch__slider:before{
@@ -2065,7 +2067,7 @@ a.mobius-button:focus-visible,
2065
2067
  left:3px;
2066
2068
  bottom:2px;
2067
2069
  background-color:var(--color-background);
2068
- transition:var(--transition-duration);
2070
+ transition:var(--switch-transition-duration);
2069
2071
  }
2070
2072
 
2071
2073
  .mobius-switch--checked .mobius-switch__slider{
@@ -2952,10 +2954,6 @@ svg:not(:host).svg-inline--mobius-icon{
2952
2954
  --color-focus:var(--color-bubblegum-500);
2953
2955
  --color-accent:var(--color-bubblegum-500);
2954
2956
  --color-accent-lighter:var(--color-bubblegum-300);
2955
- --color-text:var(--color-neutral-700);
2956
- --color-text-medium:var(--color-neutral-500);
2957
- --color-text-light:var(--color-neutral-300);
2958
- --color-text-inverted:var(--color-neutral-100);
2959
2957
  --color-background:var(--color-neutral-100);
2960
2958
  --color-background-light:var(--color-neutral-200);
2961
2959
  --color-background-medium:var(--color-neutral-500);
@@ -3010,10 +3008,42 @@ svg:not(:host).svg-inline--mobius-icon{
3010
3008
  --radius-1:4px;
3011
3009
  --radius-2:8px;
3012
3010
  --transition-standard:160ms ease-in-out;
3011
+ --button-primary-color:var(--color-primary);
3012
+ --button-primary-content-color:var(--color-text-inverted);
3013
+ --button-primary-hover-color:var(--color-primary-hover);
3014
+ --button-secondary-color:var(--color-secondary);
3015
+ --button-secondary-hover-color:var(--color-secondary-hover);
3016
+ --button-border-radius:var(--radius-1);
3017
+ --button-padding-sm:10px var(--size-sm);
3018
+ --button-padding-md:14px var(--size-md);
3019
+ --button-padding-lg:14px var(--size-md);
3020
+ --button-gap:var(--size-xs);
3021
+ --button-primary-font-variation:normal;
3022
+ --color-text:var(--color-neutral-700);
3023
+ --color-text-medium:var(--color-neutral-500);
3024
+ --color-text-light:var(--color-neutral-300);
3025
+ --color-text-inverted:var(--color-neutral-100);
3026
+ --combobox-border-color:#cccccc;
3027
+ --combobox-group-color:var(--color-text);
3028
+ --combobox-group-background-color:#dad6f7;
3029
+ --combobox-selected-background-color:var(--color-primary);
3030
+ --listbox-height:min-content;
3031
+ --listbox-max-height:350px;
3032
+ --listbox-max-height-mobile:240px;
3033
+ --listbox-gap:4px;
3034
+ --option-padding:var(--size-xs) var(--size-lg);
3035
+ --drawer-transition-duration:200ms;
3036
+ --modal-transition-duration:0;
3037
+ --backdrop-color:#18181d;
3038
+ --label-font-weight:var(--font-weight-bold);
3039
+ --label-font-variation-settings:normal;
3013
3040
  --input-field-padding:17px var(--size-sm);
3014
3041
  --input-field-padding-tight:14px var(--size-sm);
3015
3042
  --border-default:var(--size-border-width) solid var(--color-primary-light);
3016
3043
  --box-shadow-default:0 0 0 var(--size-focus-ring) var(--color-focus);
3044
+ --text-input-max-width:none;
3045
+ --number-input-max-width:none;
3046
+ --select-wrapper-max-width:none;
3017
3047
  --popover-max-width:260px;
3018
3048
  --popover-z-index:2147483647;
3019
3049
  --color-background-popover:var(--color-azure-700);
@@ -3023,6 +3053,11 @@ svg:not(:host).svg-inline--mobius-icon{
3023
3053
  --slider-secondary-track-background:var(--color-accent-lighter);
3024
3054
  --slider-secondary-thumb-background:var(--color-accent);
3025
3055
  --thumb-size:20px;
3056
+ --dropdown-menu-max-width:200px;
3057
+ --segment-border:var(--size-border-width) solid var(--color-border-light);
3058
+ --switch-transition-duration:150ms;
3059
+ --table-border-width:1px;
3060
+ --title-decorator-width:8px;
3026
3061
  }
3027
3062
 
3028
3063
  :root{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simplybusiness/theme-core",
3
- "version": "7.6.14",
3
+ "version": "7.7.0",
4
4
  "main": "dist/index.css",
5
5
  "simplyBusiness": {
6
6
  "publishToPublicNpm": true
@@ -26,7 +26,7 @@
26
26
  "./fonts": "./dist/fonts.css"
27
27
  },
28
28
  "dependencies": {
29
- "@simplybusiness/mobius": "^5.27.4"
29
+ "@simplybusiness/mobius": "^5.28.0"
30
30
  },
31
31
  "devDependencies": {
32
32
  "css-loader": "^7.1.2",
package/src/variables.css CHANGED
@@ -56,12 +56,6 @@
56
56
  --color-accent: var(--color-bubblegum-500);
57
57
  --color-accent-lighter: var(--color-bubblegum-300);
58
58
 
59
- /* Text */
60
- --color-text: var(--color-neutral-700);
61
- --color-text-medium: var(--color-neutral-500);
62
- --color-text-light: var(--color-neutral-300);
63
- --color-text-inverted: var(--color-neutral-100);
64
-
65
59
  /* Background */
66
60
  --color-background: var(--color-neutral-100);
67
61
  --color-background-light: var(--color-neutral-200);
@@ -133,10 +127,54 @@
133
127
  --radius-1: 4px;
134
128
  --radius-2: 8px;
135
129
  --transition-standard: 160ms ease-in-out;
130
+
131
+ /*** Atoms ***/
132
+ /* Button */
133
+ --button-primary-color: var(--color-primary);
134
+ --button-primary-content-color: var(--color-text-inverted);
135
+ --button-primary-hover-color: var(--color-primary-hover);
136
+ --button-secondary-color: var(--color-secondary);
137
+ --button-secondary-hover-color: var(--color-secondary-hover);
138
+ --button-border-radius: var(--radius-1);
139
+ --button-padding-sm: 10px var(--size-sm);
140
+ --button-padding-md: 14px var(--size-md);
141
+ --button-padding-lg: 14px var(--size-md);
142
+ --button-gap: var(--size-xs);
143
+ --button-primary-font-variation: normal;
144
+
145
+ /* Text */
146
+ --color-text: var(--color-neutral-700);
147
+ --color-text-medium: var(--color-neutral-500);
148
+ --color-text-light: var(--color-neutral-300);
149
+ --color-text-inverted: var(--color-neutral-100);
150
+
151
+ /* Combobox */
152
+ /* --combobox-max-width: 562px; */
153
+ --combobox-border-color: #cccccc;
154
+ --combobox-group-color: var(--color-text);
155
+ --combobox-group-background-color: #dad6f7;
156
+ --combobox-selected-background-color: var(--color-primary);
157
+ --listbox-height: min-content;
158
+ --listbox-max-height: 350px;
159
+ --listbox-max-height-mobile: 240px;
160
+ --listbox-gap: 4px;
161
+ --option-padding: var(--size-xs) var(--size-lg);
162
+
163
+ /* Drawer and Modal */
164
+ --drawer-transition-duration: 200ms;
165
+ --modal-transition-duration: 0;
166
+ --backdrop-color: #18181d;
167
+
168
+ /* Label and Inputs */
169
+ --label-font-weight: var(--font-weight-bold);
170
+ --label-font-variation-settings: normal;
136
171
  --input-field-padding: 17px var(--size-sm);
137
172
  --input-field-padding-tight: 14px var(--size-sm);
138
173
  --border-default: var(--size-border-width) solid var(--color-primary-light);
139
174
  --box-shadow-default: 0 0 0 var(--size-focus-ring) var(--color-focus);
175
+ --text-input-max-width: none;
176
+ --number-input-max-width: none;
177
+ --select-wrapper-max-width: none;
140
178
 
141
179
  /* Popover */
142
180
  --popover-max-width: 260px;
@@ -150,4 +188,11 @@
150
188
  --slider-secondary-track-background: var(--color-accent-lighter);
151
189
  --slider-secondary-thumb-background: var(--color-accent);
152
190
  --thumb-size: 20px;
191
+
192
+ /* Misc */
193
+ --dropdown-menu-max-width: 200px;
194
+ --segment-border: var(--size-border-width) solid var(--color-border-light);
195
+ --switch-transition-duration: 150ms;
196
+ --table-border-width: 1px;
197
+ --title-decorator-width: 8px;
153
198
  }