@mond-design-system/react 1.1.0 → 3.0.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/dist/index.css CHANGED
@@ -116,17 +116,25 @@
116
116
  flex: none;
117
117
  color: inherit;
118
118
  }
119
+ .mds-Icon__size-slot {
120
+ width: var(--mds-icon-slot, var(--mds-icon-md));
121
+ height: var(--mds-icon-slot, var(--mds-icon-md));
122
+ font-size: var(--mds-icon-slot, var(--mds-icon-md));
123
+ }
119
124
  .mds-Icon__size-sm {
120
125
  width: var(--mds-icon-sm);
121
126
  height: var(--mds-icon-sm);
127
+ font-size: var(--mds-icon-sm);
122
128
  }
123
129
  .mds-Icon__size-md {
124
130
  width: var(--mds-icon-md);
125
131
  height: var(--mds-icon-md);
132
+ font-size: var(--mds-icon-md);
126
133
  }
127
134
  .mds-Icon__size-lg {
128
135
  width: var(--mds-icon-lg);
129
136
  height: var(--mds-icon-lg);
137
+ font-size: var(--mds-icon-lg);
130
138
  }
131
139
 
132
140
  /* mds-css:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Button/Button.module.css?mds-scoped */
@@ -135,7 +143,7 @@
135
143
  align-items: center;
136
144
  justify-content: center;
137
145
  gap: var(--mds-gap-tight);
138
- border: var(--mds-border-width) solid transparent;
146
+ border: var(--mds-border-emphasis) solid transparent;
139
147
  border-radius: var(--mds-radius-control);
140
148
  font-family: var(--mds-font-body);
141
149
  font-weight: var(--mds-weight-semibold);
@@ -149,16 +157,32 @@
149
157
  height: var(--mds-control-h-sm);
150
158
  padding: 0 var(--mds-pad-button-sm);
151
159
  font-size: var(--mds-text-button-sm);
160
+ --mds-icon-slot: var(--mds-icon-sm);
152
161
  }
153
162
  .mds-Button__size-md {
154
163
  height: var(--mds-control-h-md);
155
164
  padding: 0 var(--mds-pad-button-md);
156
165
  font-size: var(--mds-text-button-md);
166
+ --mds-icon-slot: var(--mds-icon-md);
157
167
  }
158
168
  .mds-Button__size-lg {
159
169
  height: var(--mds-control-h-lg);
160
170
  padding: 0 var(--mds-pad-button-lg);
161
171
  font-size: var(--mds-text-button-lg);
172
+ --mds-icon-slot: var(--mds-icon-lg);
173
+ }
174
+ .mds-Button__slot {
175
+ display: inline-flex;
176
+ align-items: center;
177
+ justify-content: center;
178
+ flex: none;
179
+ width: var(--mds-icon-slot);
180
+ height: var(--mds-icon-slot);
181
+ font-size: var(--mds-icon-slot);
182
+ }
183
+ .mds-Button__slot > svg {
184
+ width: 100%;
185
+ height: 100%;
162
186
  }
163
187
  .mds-Button__variant-primary {
164
188
  background: var(--mds-action-bg);
@@ -172,7 +196,7 @@
172
196
  }
173
197
  .mds-Button__variant-secondary {
174
198
  background: transparent;
175
- color: var(--mds-text-primary);
199
+ color: var(--mds-button-secondary-fg);
176
200
  border-color: var(--mds-button-border);
177
201
  }
178
202
  .mds-Button__variant-ghost {
@@ -287,8 +311,8 @@ button.mds-Link__link {
287
311
  border-radius: var(--mds-radius-avatar);
288
312
  background: var(--mds-surface-sunken);
289
313
  color: var(--mds-text-secondary);
290
- font-family: var(--mds-font-body);
291
- font-weight: var(--mds-weight-semibold);
314
+ font-family: var(--mds-font-display);
315
+ font-weight: var(--mds-weight-medium);
292
316
  user-select: none;
293
317
  }
294
318
  .mds-Avatar__size-xs {
@@ -371,27 +395,27 @@ button.mds-Link__link {
371
395
  .mds-AvatarGroup__size-xs {
372
396
  width: var(--mds-avatar-xs);
373
397
  height: var(--mds-avatar-xs);
374
- font-size: var(--mds-avatar-text-xs);
398
+ font-size: calc(var(--mds-avatar-xs) * var(--mds-avatar-count-ratio));
375
399
  }
376
400
  .mds-AvatarGroup__size-sm {
377
401
  width: var(--mds-avatar-sm);
378
402
  height: var(--mds-avatar-sm);
379
- font-size: var(--mds-avatar-text-sm);
403
+ font-size: calc(var(--mds-avatar-sm) * var(--mds-avatar-count-ratio));
380
404
  }
381
405
  .mds-AvatarGroup__size-md {
382
406
  width: var(--mds-avatar-md);
383
407
  height: var(--mds-avatar-md);
384
- font-size: var(--mds-avatar-text-md);
408
+ font-size: calc(var(--mds-avatar-md) * var(--mds-avatar-count-ratio));
385
409
  }
386
410
  .mds-AvatarGroup__size-lg {
387
411
  width: var(--mds-avatar-lg);
388
412
  height: var(--mds-avatar-lg);
389
- font-size: var(--mds-avatar-text-lg);
413
+ font-size: calc(var(--mds-avatar-lg) * var(--mds-avatar-count-ratio));
390
414
  }
391
415
  .mds-AvatarGroup__size-xl {
392
416
  width: var(--mds-avatar-xl);
393
417
  height: var(--mds-avatar-xl);
394
- font-size: var(--mds-avatar-text-xl);
418
+ font-size: calc(var(--mds-avatar-xl) * var(--mds-avatar-count-ratio));
395
419
  }
396
420
 
397
421
  /* mds-css:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Badge/Badge.module.css?mds-scoped */
@@ -444,6 +468,20 @@ button.mds-Link__link {
444
468
  cursor: default;
445
469
  transition: var(--mds-transition-control);
446
470
  }
471
+ .mds-Chip__icon {
472
+ --mds-icon-slot: 1em;
473
+ display: inline-flex;
474
+ align-items: center;
475
+ justify-content: center;
476
+ flex: none;
477
+ width: var(--mds-icon-slot);
478
+ height: var(--mds-icon-slot);
479
+ font-size: var(--mds-icon-slot);
480
+ }
481
+ .mds-Chip__icon > svg {
482
+ width: 100%;
483
+ height: 100%;
484
+ }
447
485
  .mds-Chip__variant-soft {
448
486
  background: var(--mds-accent-soft);
449
487
  border: var(--mds-border-width) solid transparent;
@@ -559,6 +597,16 @@ button.mds-Link__link {
559
597
  .mds-CountButton__glyph {
560
598
  display: inline-flex;
561
599
  align-items: center;
600
+ justify-content: center;
601
+ flex: none;
602
+ --mds-icon-slot: var(--mds-icon-md);
603
+ width: var(--mds-icon-slot);
604
+ height: var(--mds-icon-slot);
605
+ font-size: var(--mds-icon-slot);
606
+ }
607
+ .mds-CountButton__glyph > svg {
608
+ width: 100%;
609
+ height: 100%;
562
610
  }
563
611
 
564
612
  /* mds-css:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Field/Field.module.css?mds-scoped */
@@ -656,6 +704,7 @@ button.mds-Link__link {
656
704
  .mds-Overlay__variant-sheet {
657
705
  z-index: var(--mds-z-sheet);
658
706
  align-items: flex-end;
707
+ justify-content: center;
659
708
  }
660
709
 
661
710
  /* mds-css:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Sheet/Sheet.module.css?mds-scoped */
@@ -663,6 +712,7 @@ button.mds-Link__link {
663
712
  display: flex;
664
713
  flex-direction: column;
665
714
  width: 100%;
715
+ max-width: var(--mds-frame-width);
666
716
  max-height: 85%;
667
717
  padding-bottom: var(--mds-safe-bottom);
668
718
  background: var(--mds-surface-raised);
@@ -982,13 +1032,23 @@ button.mds-Link__link {
982
1032
  width: 100%;
983
1033
  }
984
1034
  .mds-Input__icon {
1035
+ --mds-icon-slot: var(--mds-icon-md);
985
1036
  position: absolute;
986
1037
  top: 50%;
987
1038
  transform: translateY(-50%);
988
1039
  display: inline-flex;
1040
+ align-items: center;
1041
+ justify-content: center;
1042
+ width: var(--mds-icon-slot);
1043
+ height: var(--mds-icon-slot);
1044
+ font-size: var(--mds-icon-slot);
989
1045
  color: var(--mds-text-muted);
990
1046
  pointer-events: none;
991
1047
  }
1048
+ .mds-Input__icon > svg {
1049
+ width: 100%;
1050
+ height: 100%;
1051
+ }
992
1052
  .mds-Input__iconLeft {
993
1053
  left: var(--mds-pad-control-md);
994
1054
  }
@@ -1076,7 +1136,6 @@ button.mds-Link__link {
1076
1136
  align-items: center;
1077
1137
  gap: var(--mds-gap-tight);
1078
1138
  cursor: pointer;
1079
- min-height: var(--mds-tap-min);
1080
1139
  }
1081
1140
  .mds-Checkbox__root:has(.mds-Checkbox__box:disabled) {
1082
1141
  cursor: not-allowed;
@@ -1095,6 +1154,7 @@ button.mds-Link__link {
1095
1154
  place-content: center;
1096
1155
  cursor: inherit;
1097
1156
  transition: var(--mds-transition-control);
1157
+ position: relative;
1098
1158
  }
1099
1159
  .mds-Checkbox__box:checked {
1100
1160
  background: var(--mds-action-bg);
@@ -1123,6 +1183,15 @@ button.mds-Link__link {
1123
1183
  .mds-Checkbox__box:disabled ~ .mds-Checkbox__label {
1124
1184
  color: var(--mds-action-disabled-fg);
1125
1185
  }
1186
+ .mds-Checkbox__box::before {
1187
+ content: "";
1188
+ position: absolute;
1189
+ top: 50%;
1190
+ left: 50%;
1191
+ translate: -50% -50%;
1192
+ width: max(100%, var(--mds-tap-min));
1193
+ height: max(100%, var(--mds-tap-min));
1194
+ }
1126
1195
 
1127
1196
  /* mds-css:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Radio/Radio.module.css?mds-scoped */
1128
1197
  .mds-Radio__root {
@@ -1130,7 +1199,6 @@ button.mds-Link__link {
1130
1199
  align-items: center;
1131
1200
  gap: var(--mds-gap-tight);
1132
1201
  cursor: pointer;
1133
- min-height: var(--mds-tap-min);
1134
1202
  }
1135
1203
  .mds-Radio__root:has(.mds-Radio__dot:disabled) {
1136
1204
  cursor: not-allowed;
@@ -1148,6 +1216,7 @@ button.mds-Link__link {
1148
1216
  place-content: center;
1149
1217
  cursor: inherit;
1150
1218
  transition: var(--mds-transition-control);
1219
+ position: relative;
1151
1220
  }
1152
1221
  .mds-Radio__dot:checked {
1153
1222
  border-color: var(--mds-action-bg);
@@ -1173,6 +1242,15 @@ button.mds-Link__link {
1173
1242
  .mds-Radio__dot:disabled ~ .mds-Radio__label {
1174
1243
  color: var(--mds-action-disabled-fg);
1175
1244
  }
1245
+ .mds-Radio__dot::before {
1246
+ content: "";
1247
+ position: absolute;
1248
+ top: 50%;
1249
+ left: 50%;
1250
+ translate: -50% -50%;
1251
+ width: max(100%, var(--mds-tap-min));
1252
+ height: max(100%, var(--mds-tap-min));
1253
+ }
1176
1254
 
1177
1255
  /* mds-css:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Switch/Switch.module.css?mds-scoped */
1178
1256
  .mds-Switch__root {
@@ -1180,7 +1258,6 @@ button.mds-Link__link {
1180
1258
  align-items: center;
1181
1259
  gap: var(--mds-gap-tight);
1182
1260
  cursor: pointer;
1183
- min-height: var(--mds-tap-min);
1184
1261
  }
1185
1262
  .mds-Switch__root:has(.mds-Switch__track:disabled) {
1186
1263
  cursor: not-allowed;
@@ -1241,6 +1318,15 @@ button.mds-Link__link {
1241
1318
  .mds-Switch__root:has(.mds-Switch__track:disabled) .mds-Switch__label {
1242
1319
  color: var(--mds-action-disabled-fg);
1243
1320
  }
1321
+ .mds-Switch__track::before {
1322
+ content: "";
1323
+ position: absolute;
1324
+ top: 50%;
1325
+ left: 50%;
1326
+ translate: -50% -50%;
1327
+ width: max(100%, var(--mds-tap-min));
1328
+ height: max(100%, var(--mds-tap-min));
1329
+ }
1244
1330
 
1245
1331
  /* mds-css:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/SegmentedControl/SegmentedControl.module.css?mds-scoped */
1246
1332
  .mds-SegmentedControl__group {
@@ -1851,10 +1937,10 @@ button.mds-Link__link {
1851
1937
  z-index: var(--mds-z-tabbar);
1852
1938
  display: flex;
1853
1939
  align-items: stretch;
1854
- height: var(--mds-tabbar-h);
1940
+ height: calc(var(--mds-tabbar-h) + var(--mds-safe-bottom));
1941
+ padding: 0 var(--mds-tabbar-pad-x) calc(var(--mds-tabbar-seat) + var(--mds-safe-bottom));
1855
1942
  background: var(--mds-surface-page);
1856
1943
  border-top: var(--mds-border-width) solid var(--mds-border-subtle);
1857
- padding-bottom: var(--mds-safe-bottom);
1858
1944
  }
1859
1945
  .mds-TabBar__item {
1860
1946
  flex: 1;
@@ -1868,7 +1954,7 @@ button.mds-Link__link {
1868
1954
  border: none;
1869
1955
  background: none;
1870
1956
  cursor: pointer;
1871
- font: var(--mds-type-meta);
1957
+ font: var(--mds-type-tab);
1872
1958
  color: var(--mds-text-muted);
1873
1959
  text-decoration: none;
1874
1960
  transition: color var(--mds-transition-control);
@@ -1883,6 +1969,14 @@ button.mds-Link__link {
1883
1969
  .mds-TabBar__icon {
1884
1970
  position: relative;
1885
1971
  display: inline-flex;
1972
+ --mds-icon-slot: var(--mds-tabbar-icon);
1973
+ width: var(--mds-icon-slot);
1974
+ height: var(--mds-icon-slot);
1975
+ font-size: var(--mds-icon-slot);
1976
+ }
1977
+ .mds-TabBar__icon > svg {
1978
+ width: 100%;
1979
+ height: 100%;
1886
1980
  }
1887
1981
  .mds-TabBar__badge {
1888
1982
  position: absolute;
@@ -1895,7 +1989,10 @@ button.mds-Link__link {
1895
1989
  box-shadow: 0 0 0 var(--mds-dot-ring) var(--mds-surface-page);
1896
1990
  }
1897
1991
  .mds-TabBar__label {
1898
- line-height: 1;
1992
+ max-width: 100%;
1993
+ overflow: hidden;
1994
+ text-overflow: ellipsis;
1995
+ white-space: nowrap;
1899
1996
  }
1900
1997
  .mds-TabBar__action {
1901
1998
  flex: none;