@smwb/ui-css 2.2.0 → 2.4.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 (2) hide show
  1. package/dist/ui.css +144 -12
  2. package/package.json +2 -2
package/dist/ui.css CHANGED
@@ -641,6 +641,13 @@
641
641
  padding: 0 8px;
642
642
  font-size: 0.75rem;
643
643
  }
644
+ @media (pointer: coarse) {
645
+ .smwb-chip_size-small:is(a[href]),
646
+ .smwb-chip_size-small:has(> .smwb-chip__content[role="button"]) {
647
+ height: var(--smui-control-h-sm, 44px);
648
+ min-height: var(--smui-control-h-sm, 44px);
649
+ }
650
+ }
644
651
  .smwb-chip.smwb-chip_color-primary:not(.smwb-chip.smwb-disabled).smwb-filled {
645
652
  background-color: var(--smui-primaryColor);
646
653
  color: var(--smui-onPrimaryColor);
@@ -2032,17 +2039,17 @@
2032
2039
  top: 1rem;
2033
2040
  }
2034
2041
  .smwb-snackbars.smwb-bottom {
2035
- bottom: 1rem;
2042
+ bottom: calc(1rem + var(--smui-bottom-bar-offset, 0px));
2036
2043
  left: 50%;
2037
2044
  transform: translateX(-50%);
2038
2045
  }
2039
2046
  .smwb-snackbars.smwb-bottom-right {
2040
2047
  right: 1rem;
2041
- bottom: 1rem;
2048
+ bottom: calc(1rem + var(--smui-bottom-bar-offset, 0px));
2042
2049
  }
2043
2050
  .smwb-snackbars.smwb-bottom-left {
2044
2051
  left: 1rem;
2045
- bottom: 1rem;
2052
+ bottom: calc(1rem + var(--smui-bottom-bar-offset, 0px));
2046
2053
  }
2047
2054
  .smwb-snackbar {
2048
2055
  box-sizing: border-box;
@@ -2639,6 +2646,11 @@
2639
2646
  .smwb-menu__item--dense {
2640
2647
  height: 32px;
2641
2648
  }
2649
+ @media (pointer: coarse) {
2650
+ .smwb-menu__item--dense {
2651
+ height: max(32px, var(--smui-control-h-sm, 44px));
2652
+ }
2653
+ }
2642
2654
  .smwb-menu__item--disabled {
2643
2655
  color: var(--smui-menuDisabledTextColor);
2644
2656
  pointer-events: none;
@@ -2765,6 +2777,11 @@
2765
2777
  opacity: 0.38;
2766
2778
  cursor: default;
2767
2779
  }
2780
+ @media (pointer: coarse) {
2781
+ .smwb-tabs__scroll-button {
2782
+ width: max(40px, var(--smui-control-h-sm, 44px));
2783
+ }
2784
+ }
2768
2785
  .smwb-tabs__overflow-trigger {
2769
2786
  display: inline-flex;
2770
2787
  align-items: center;
@@ -2788,6 +2805,11 @@
2788
2805
  opacity: 0.38;
2789
2806
  cursor: default;
2790
2807
  }
2808
+ @media (pointer: coarse) {
2809
+ .smwb-tabs__overflow-trigger {
2810
+ width: max(40px, var(--smui-control-h-sm, 44px));
2811
+ }
2812
+ }
2791
2813
  .smwb-tabs__indicator {
2792
2814
  display: flex;
2793
2815
  justify-content: center;
@@ -2974,6 +2996,11 @@
2974
2996
  letter-spacing: normal;
2975
2997
  text-transform: none;
2976
2998
  }
2999
+ @media (pointer: coarse) {
3000
+ .smwb-tabs--dense .smwb-tab {
3001
+ min-height: max(var(--smui-tabDenseHeight, 36px), var(--smui-control-h-sm, 44px));
3002
+ }
3003
+ }
2977
3004
  .smwb-tabs--fit .smwb-tab,
2978
3005
  .smwb-tabs--fit .smwb-tab-item {
2979
3006
  flex: 0 0 auto;
@@ -3617,6 +3644,11 @@
3617
3644
  padding-top: 4px;
3618
3645
  padding-bottom: 4px;
3619
3646
  }
3647
+ @media (pointer: coarse) {
3648
+ .smwb-list__item_dense {
3649
+ min-height: max(36px, var(--smui-control-h-sm, 44px));
3650
+ }
3651
+ }
3620
3652
  .smwb-list__item_divider {
3621
3653
  border-bottom: 1px solid var(--smui-dividerColor);
3622
3654
  }
@@ -3625,6 +3657,11 @@
3625
3657
  padding-top: 4px;
3626
3658
  padding-bottom: 4px;
3627
3659
  }
3660
+ @media (pointer: coarse) {
3661
+ .smwb-list_dense .smwb-list__item {
3662
+ min-height: max(36px, var(--smui-control-h-sm, 44px));
3663
+ }
3664
+ }
3628
3665
  .smwb-list__item.smwb-list__item_link,
3629
3666
  .smwb-list_dense .smwb-list__item.smwb-list__item_link {
3630
3667
  padding: 0;
@@ -5062,6 +5099,9 @@
5062
5099
  display: flex;
5063
5100
  max-width: 100vw;
5064
5101
  }
5102
+ .smwb-sheet[data-smwb-swiping] {
5103
+ transition: none;
5104
+ }
5065
5105
  .smwb-sheet__header {
5066
5106
  display: flex;
5067
5107
  justify-content: space-between;
@@ -5154,10 +5194,11 @@
5154
5194
  }
5155
5195
  .smwb-sheet.smwb-bottom {
5156
5196
  border-radius: 28px 28px 0 0;
5157
- bottom: 0;
5197
+ bottom: var(--smui-bottom-bar-offset, 0px);
5158
5198
  left: 0;
5159
5199
  width: 100%;
5160
5200
  height: var(--sizeProp);
5201
+ max-height: calc(100% - var(--smui-sheet-offset-top, 0px) - var(--smui-bottom-bar-offset, 0px));
5161
5202
  transform: translateY(100%);
5162
5203
  flex-direction: column;
5163
5204
  }
@@ -5170,7 +5211,7 @@
5170
5211
  left: 0;
5171
5212
  width: 100%;
5172
5213
  height: var(--sizeProp);
5173
- max-height: calc(100% - var(--smui-sheet-offset-top, 0px));
5214
+ max-height: calc(100% - var(--smui-sheet-offset-top, 0px) - var(--smui-bottom-bar-offset, 0px));
5174
5215
  transform: translateY(-100%);
5175
5216
  flex-direction: column;
5176
5217
  }
@@ -5181,7 +5222,7 @@
5181
5222
  border-radius: 0 28px 28px 0;
5182
5223
  top: var(--smui-sheet-offset-top, 0px);
5183
5224
  left: 0;
5184
- height: calc(100% - var(--smui-sheet-offset-top, 0px));
5225
+ height: calc(100% - var(--smui-sheet-offset-top, 0px) - var(--smui-bottom-bar-offset, 0px));
5185
5226
  width: var(--sizeProp);
5186
5227
  transform: translateX(-100%);
5187
5228
  flex-direction: row-reverse;
@@ -5195,7 +5236,7 @@
5195
5236
  border-radius: 28px 0 0 28px;
5196
5237
  top: var(--smui-sheet-offset-top, 0px);
5197
5238
  right: 0;
5198
- height: calc(100% - var(--smui-sheet-offset-top, 0px));
5239
+ height: calc(100% - var(--smui-sheet-offset-top, 0px) - var(--smui-bottom-bar-offset, 0px));
5199
5240
  width: var(--sizeProp);
5200
5241
  transform: translateX(100%);
5201
5242
  }
@@ -5208,7 +5249,7 @@
5208
5249
  top: var(--smui-sheet-offset-top, 0px);
5209
5250
  left: 0;
5210
5251
  width: 100%;
5211
- height: calc(100% - var(--smui-sheet-offset-top, 0px));
5252
+ height: calc(100% - var(--smui-sheet-offset-top, 0px) - var(--smui-bottom-bar-offset, 0px));
5212
5253
  display: flex;
5213
5254
  flex-direction: column;
5214
5255
  z-index: 100;
@@ -5228,7 +5269,7 @@
5228
5269
  }
5229
5270
  .smwb-sheet__default.smwb-entered .smwb-sheet.smwb-bottom,
5230
5271
  .smwb-sheet__overlay.smwb-entered .smwb-sheet.smwb-bottom {
5231
- transform: translateY(0);
5272
+ transform: translateY(var(--smwb-sheet-swipe, 0px));
5232
5273
  }
5233
5274
  .smwb-sheet__default.smwb-entered .smwb-sheet.smwb-bottom.smwb-expanded,
5234
5275
  .smwb-sheet__overlay.smwb-entered .smwb-sheet.smwb-bottom.smwb-expanded {
@@ -5252,7 +5293,7 @@
5252
5293
  }
5253
5294
  .smwb-sheet__default.smwb-entered .smwb-sheet.smwb-left,
5254
5295
  .smwb-sheet__overlay.smwb-entered .smwb-sheet.smwb-left {
5255
- transform: translateX(0);
5296
+ transform: translateX(var(--smwb-sheet-swipe, 0px));
5256
5297
  }
5257
5298
  .smwb-sheet__default.smwb-entered .smwb-sheet.smwb-left.smwb-expanded,
5258
5299
  .smwb-sheet__overlay.smwb-entered .smwb-sheet.smwb-left.smwb-expanded {
@@ -5264,7 +5305,7 @@
5264
5305
  }
5265
5306
  .smwb-sheet__default.smwb-entered .smwb-sheet.smwb-right,
5266
5307
  .smwb-sheet__overlay.smwb-entered .smwb-sheet.smwb-right {
5267
- transform: translateX(0);
5308
+ transform: translateX(var(--smwb-sheet-swipe, 0px));
5268
5309
  }
5269
5310
  .smwb-sheet__default.smwb-entered .smwb-sheet.smwb-right.smwb-expanded,
5270
5311
  .smwb-sheet__overlay.smwb-entered .smwb-sheet.smwb-right.smwb-expanded {
@@ -7165,17 +7206,30 @@
7165
7206
  align-self: center;
7166
7207
  }
7167
7208
  .smwb-tab-groups__actions-trigger {
7209
+ --smwb-tab-groups-actions-size: var(--smui-control-h-lg, 48px);
7168
7210
  display: inline-flex;
7169
7211
  align-items: center;
7170
7212
  justify-content: center;
7213
+ box-sizing: border-box;
7171
7214
  flex: 0 0 auto;
7172
- width: 40px;
7215
+ align-self: center;
7216
+ min-width: 0;
7217
+ width: var(--smwb-tab-groups-actions-size);
7218
+ height: var(--smwb-tab-groups-actions-size);
7173
7219
  padding: 0;
7174
7220
  border: none;
7175
7221
  background: none;
7176
7222
  color: var(--smui-onSurfaceVariant);
7177
7223
  cursor: pointer;
7178
7224
  }
7225
+ .smwb-tab-groups__actions-trigger--dense {
7226
+ --smwb-tab-groups-actions-size: var(--smui-tabDenseHeight, 36px);
7227
+ }
7228
+ @media (pointer: coarse) {
7229
+ .smwb-tab-groups__actions-trigger--dense {
7230
+ --smwb-tab-groups-actions-size: max(var(--smui-tabDenseHeight, 36px), var(--smui-control-h-sm, 44px));
7231
+ }
7232
+ }
7179
7233
  .smwb-tab-groups__actions-trigger:hover:not(:disabled) {
7180
7234
  background-color: var(--smui-onSurfaceHover);
7181
7235
  }
@@ -9668,6 +9722,74 @@
9668
9722
  .smwb-stack {
9669
9723
  min-width: 0;
9670
9724
  }
9725
+ .smwb-stack--direction-base-row {
9726
+ flex-direction: row;
9727
+ }
9728
+ .smwb-stack--direction-base-row-reverse {
9729
+ flex-direction: row-reverse;
9730
+ }
9731
+ .smwb-stack--direction-base-column {
9732
+ flex-direction: column;
9733
+ }
9734
+ .smwb-stack--direction-base-column-reverse {
9735
+ flex-direction: column-reverse;
9736
+ }
9737
+ @media (min-width: 420px) {
9738
+ .smwb-stack--direction-sm-row {
9739
+ flex-direction: row;
9740
+ }
9741
+ .smwb-stack--direction-sm-row-reverse {
9742
+ flex-direction: row-reverse;
9743
+ }
9744
+ .smwb-stack--direction-sm-column {
9745
+ flex-direction: column;
9746
+ }
9747
+ .smwb-stack--direction-sm-column-reverse {
9748
+ flex-direction: column-reverse;
9749
+ }
9750
+ }
9751
+ @media (min-width: 768px) {
9752
+ .smwb-stack--direction-md-row {
9753
+ flex-direction: row;
9754
+ }
9755
+ .smwb-stack--direction-md-row-reverse {
9756
+ flex-direction: row-reverse;
9757
+ }
9758
+ .smwb-stack--direction-md-column {
9759
+ flex-direction: column;
9760
+ }
9761
+ .smwb-stack--direction-md-column-reverse {
9762
+ flex-direction: column-reverse;
9763
+ }
9764
+ }
9765
+ @media (min-width: 1024px) {
9766
+ .smwb-stack--direction-lg-row {
9767
+ flex-direction: row;
9768
+ }
9769
+ .smwb-stack--direction-lg-row-reverse {
9770
+ flex-direction: row-reverse;
9771
+ }
9772
+ .smwb-stack--direction-lg-column {
9773
+ flex-direction: column;
9774
+ }
9775
+ .smwb-stack--direction-lg-column-reverse {
9776
+ flex-direction: column-reverse;
9777
+ }
9778
+ }
9779
+ @media (min-width: 1200px) {
9780
+ .smwb-stack--direction-xl-row {
9781
+ flex-direction: row;
9782
+ }
9783
+ .smwb-stack--direction-xl-row-reverse {
9784
+ flex-direction: row-reverse;
9785
+ }
9786
+ .smwb-stack--direction-xl-column {
9787
+ flex-direction: column;
9788
+ }
9789
+ .smwb-stack--direction-xl-column-reverse {
9790
+ flex-direction: column-reverse;
9791
+ }
9792
+ }
9671
9793
  .smwb-stack__divider {
9672
9794
  display: flex;
9673
9795
  align-items: center;
@@ -10339,6 +10461,9 @@
10339
10461
  --smui-control-h-sm: 32px;
10340
10462
  --smui-control-h-md: 40px;
10341
10463
  --smui-control-h-lg: 48px;
10464
+ --smui-control-h-sm-coarse: 44px;
10465
+ --smui-control-h-md-coarse: 44px;
10466
+ --smui-control-h-lg-coarse: 48px;
10342
10467
  /* Border-radius scale */
10343
10468
  --smui-radius-xs: 2px;
10344
10469
  --smui-radius-sm: 4px;
@@ -10360,6 +10485,13 @@
10360
10485
  --smui-bp-lg: 1024px;
10361
10486
  --smui-bp-xl: 1200px;
10362
10487
  }
10488
+ @media (pointer: coarse) {
10489
+ :root {
10490
+ --smui-control-h-sm: var(--smui-control-h-sm-coarse, 44px);
10491
+ --smui-control-h-md: var(--smui-control-h-md-coarse, 44px);
10492
+ --smui-control-h-lg: var(--smui-control-h-lg-coarse, 48px);
10493
+ }
10494
+ }
10363
10495
  :root[data-theme="dark"] {
10364
10496
  --smui-onSurfaceVariant: #cac4d0;
10365
10497
  --smui-onSurfaceColor: #e6e1e5;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smwb/ui-css",
3
- "version": "2.2.0",
3
+ "version": "2.4.0",
4
4
  "description": "Prebuilt aggregate stylesheet for the @smwb design system (compiled from @smwb/ui-styles). Framework-agnostic — shared by the React and SolidJS libraries.",
5
5
  "license": "MIT",
6
6
  "sideEffects": [
@@ -19,7 +19,7 @@
19
19
  "build": "lessc -rp=/ ../styles/less/components.less ./dist/ui.css"
20
20
  },
21
21
  "devDependencies": {
22
- "@smwb/ui-styles": "^2.2.0",
22
+ "@smwb/ui-styles": "^2.4.0",
23
23
  "less": "^4.6.4"
24
24
  },
25
25
  "homepage": "https://sourcecraft.dev/elfenmail/ui",