liquent 0.2.0 → 0.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.
package/dist/styles.css CHANGED
@@ -16,10 +16,13 @@
16
16
  --lq-lens: rgb(0 0 0 / 0.03);
17
17
  --lq-lens-outline: rgb(0 0 0 / 0.16);
18
18
  --lq-lens-drop: rgb(0 0 0 / 0.11);
19
- --lq-segment-track: rgb(118 118 128 / 0.12);
20
- --lq-segment-thumb: rgb(255 255 255);
19
+ --lq-segment-track: transparent;
20
+ --lq-segment-thumb: rgb(0 0 0 / 0.1);
21
21
  --lq-segment-label: rgb(0 0 0);
22
- --lq-segment-lens: rgb(0 0 0 / 0.03);
22
+ --lq-segment-lens: rgb(255 255 255 / 0.55);
23
+ --lq-segment-held: rgb(255 255 255 / 0.85);
24
+ --lq-tab-glass: var(--lq-field-glass);
25
+ --lq-tab-glass-held: var(--lq-field-glass);
23
26
  --lq-surface: rgb(250 250 252 / 0.86);
24
27
  --lq-surface-edge: rgb(0 0 0 / 0.08);
25
28
  --lq-shadow: rgb(25 25 35 / 0.12);
@@ -94,7 +97,9 @@
94
97
  --lq-drop: transparent;
95
98
  --lq-selection: rgb(255 255 255 / 0.145);
96
99
  --lq-tab-selection: transparent;
97
- --lq-tab-well: rgb(0 0 0 / 0.25);
100
+ --lq-tab-well: rgb(0 0 0 / 0.6);
101
+ --lq-tab-glass: rgb(110 110 110 / 0.26);
102
+ --lq-tab-glass-held: rgb(110 110 110 / 0.37);
98
103
  --lq-tab-vivid: #fff 18%;
99
104
  --lq-tab-lit: #fff 12%;
100
105
  --lq-lens: rgb(255 255 255 / 0.055);
@@ -104,6 +109,7 @@
104
109
  --lq-segment-thumb: rgb(235 235 245 / 0.3);
105
110
  --lq-segment-label: rgb(255 255 255);
106
111
  --lq-segment-lens: transparent;
112
+ --lq-segment-held: rgb(110 110 110 / 0.45);
107
113
  --lq-surface: rgb(28 28 31 / 0.86);
108
114
  --lq-surface-edge: rgb(255 255 255 / 0.13);
109
115
  --lq-shadow: rgb(0 0 0 / 0.38);
@@ -150,7 +156,9 @@
150
156
  --lq-drop: transparent;
151
157
  --lq-selection: rgb(255 255 255 / 0.145);
152
158
  --lq-tab-selection: transparent;
153
- --lq-tab-well: rgb(0 0 0 / 0.25);
159
+ --lq-tab-well: rgb(0 0 0 / 0.6);
160
+ --lq-tab-glass: rgb(110 110 110 / 0.26);
161
+ --lq-tab-glass-held: rgb(110 110 110 / 0.37);
154
162
  --lq-tab-vivid: #fff 18%;
155
163
  --lq-tab-lit: #fff 12%;
156
164
  --lq-lens: rgb(255 255 255 / 0.055);
@@ -160,6 +168,7 @@
160
168
  --lq-segment-thumb: rgb(235 235 245 / 0.3);
161
169
  --lq-segment-label: rgb(255 255 255);
162
170
  --lq-segment-lens: transparent;
171
+ --lq-segment-held: rgb(110 110 110 / 0.45);
163
172
  --lq-surface: rgb(28 28 31 / 0.86);
164
173
  --lq-surface-edge: rgb(255 255 255 / 0.13);
165
174
  --lq-shadow: rgb(0 0 0 / 0.38);
@@ -268,6 +277,11 @@
268
277
  background: var(--lq-rim, none) 0 0 / 100% 100%;
269
278
  }
270
279
 
280
+ /* A lens that draws what's behind it keeps its rim where it has it already. */
281
+ .lq-drawn[data-behind]::after {
282
+ content: none;
283
+ }
284
+
271
285
  .lq-glass::after {
272
286
  content: "";
273
287
  position: absolute;
@@ -575,6 +589,19 @@
575
589
  --lq-rim-lit: along;
576
590
  }
577
591
 
592
+ /* A tab bar's glass on a dark page is iOS 27's: darker than a field's at
593
+ rest (29 over black) and lighter while it's held (45), measured in Music,
594
+ iOS 27.2. Its selection at rest is a well darker still (12). */
595
+ .lq-tab-bar > .lq-tab-bar-glass {
596
+ --lq-glass: var(--lq-tab-glass, var(--lq-field-glass));
597
+ transition: background-color 160ms ease;
598
+ }
599
+
600
+ .lq-tab-bar[data-lifted] > .lq-tab-bar-glass {
601
+ --lq-glass: var(--lq-tab-glass-held, var(--lq-tab-glass, var(--lq-field-glass)));
602
+ transition-duration: 120ms;
603
+ }
604
+
578
605
  :is(.lq-tab-bar, .lq-segmented) > .lq-tab-bar-glass.lq-glass[data-rim] {
579
606
  box-shadow:
580
607
  inset 0 4px 10px var(--lq-field-inner),
@@ -642,7 +669,7 @@
642
669
  flex: none;
643
670
  align-items: center;
644
671
  justify-content: center;
645
- width: var(--lq-tab-width);
672
+ width: var(--lq-slot, var(--lq-tab-width));
646
673
  height: var(--lq-tab-height);
647
674
  font: inherit;
648
675
  font-size: 14px;
@@ -731,11 +758,11 @@
731
758
  position: absolute;
732
759
  top: calc(var(--lq-tab-inset) + var(--lq-thumb-inset));
733
760
  left: calc(var(--lq-tab-inset) + var(--lq-thumb-inset));
734
- width: calc(var(--lq-tab-width) - 2 * var(--lq-thumb-inset));
761
+ width: calc(var(--lq-slot, var(--lq-tab-width)) - 2 * var(--lq-thumb-inset));
735
762
  height: calc(var(--lq-tab-height) - 2 * var(--lq-thumb-inset));
736
763
  border-radius: calc(var(--lq-tab-height) / 2 - var(--lq-thumb-inset));
737
764
  pointer-events: none;
738
- transform: translateX(calc(var(--lq-tab-width) * var(--lq-place, var(--lq-index, 0))));
765
+ transform: translateX(calc(var(--lq-slot, var(--lq-tab-width)) * var(--lq-place, var(--lq-index, 0))));
739
766
  transition: opacity 140ms ease;
740
767
  will-change: transform;
741
768
  }
@@ -751,7 +778,7 @@
751
778
  display: flex;
752
779
  height: var(--lq-tab-height);
753
780
  margin: calc(var(--lq-thumb-inset) * -1) 0 0 calc(var(--lq-thumb-inset) * -1);
754
- transform: translateX(calc(var(--lq-tab-width) * var(--lq-place, var(--lq-index, 0)) * -1));
781
+ transform: translateX(calc(var(--lq-slot, var(--lq-tab-width)) * var(--lq-place, var(--lq-index, 0)) * -1));
755
782
  transform-origin: 0 0;
756
783
  will-change: transform;
757
784
  }
@@ -774,7 +801,7 @@
774
801
 
775
802
  :is(.lq-tab-bar, .lq-segmented):dir(rtl) .lq-tab-row {
776
803
  flex: none;
777
- width: calc(var(--lq-tab-width) * var(--lq-tabs));
804
+ width: calc(var(--lq-slot, var(--lq-tab-width)) * var(--lq-tabs));
778
805
  }
779
806
 
780
807
  :is(.lq-tab-bar, .lq-segmented):dir(rtl) :is(.lq-tab, .lq-tab-copy) {
@@ -796,7 +823,7 @@
796
823
 
797
824
  :is(.lq-tab-bar, .lq-segmented):is([dir="rtl"], [dir="rtl"] *) .lq-tab-row {
798
825
  flex: none;
799
- width: calc(var(--lq-tab-width) * var(--lq-tabs));
826
+ width: calc(var(--lq-slot, var(--lq-tab-width)) * var(--lq-tabs));
800
827
  }
801
828
 
802
829
  :is(.lq-tab-bar, .lq-segmented):is([dir="rtl"], [dir="rtl"] *) :is(.lq-tab, .lq-tab-copy) {
@@ -909,7 +936,7 @@
909
936
  --lq-rim-lit: along;
910
937
  }
911
938
 
912
- .lq-tab-bar .lq-tab-lens.lq-glass {
939
+ :is(.lq-tab-bar, .lq-segmented) .lq-tab-lens.lq-glass {
913
940
  box-shadow:
914
941
  0 0 0 calc(0.66px / var(--lq-lift-y, 1))
915
942
  color-mix(in srgb, var(--lq-lens-outline) calc(var(--lq-lift, 0) * 100%), transparent),
@@ -934,28 +961,22 @@
934
961
  z-index: 0;
935
962
  }
936
963
 
937
- /* A tab bar's lens bends what's behind it on any page, as iOS 27's does,
938
- once it has dropped under the labels. Through it the bar looks thinner
939
- and the page shows above and below it (see BACKDROP in segments.tsx).
940
- It needs no fill then: what it shows is the bar itself. */
941
- .lq-tab-bar[data-under] .lq-tab-lens.lq-glass {
964
+ /* A tab bar's lens, and a segmented control's, bends what's behind it on any
965
+ page, as iOS 27's does, once it has dropped under the labels. Through it
966
+ the bar or track looks thinner and the page shows above and below it (see
967
+ BACKDROP in segments.tsx). It needs no fill then: what it shows is the bar
968
+ itself. */
969
+ :is(.lq-tab-bar, .lq-segmented)[data-under] .lq-tab-lens.lq-glass {
942
970
  z-index: 0;
943
971
  -webkit-backdrop-filter: var(--lq-filter, none);
944
972
  backdrop-filter: var(--lq-filter, none);
945
973
  }
946
974
 
947
- .lq-tab-bar[data-bends] .lq-tab-lens.lq-glass,
948
- .lq-tab-bar[data-bends][data-lifted] .lq-tab-lens.lq-glass {
975
+ :is(.lq-tab-bar, .lq-segmented)[data-bends] .lq-tab-lens.lq-glass,
976
+ :is(.lq-tab-bar, .lq-segmented)[data-bends][data-lifted] .lq-tab-lens.lq-glass {
949
977
  background-color: transparent;
950
978
  }
951
979
 
952
- /* A segmented control's bend is one strength, so it's the rim that holds it:
953
- it lifts and settles with the rim's light. */
954
- .lq-segmented[data-refracting][data-light] .lq-tab-rim {
955
- -webkit-backdrop-filter: var(--lq-filter, none);
956
- backdrop-filter: var(--lq-filter, none);
957
- }
958
-
959
980
  /* A tab bar's lens on a light page changes over with its lift, so the
960
981
  selected label never changes colour at once: the grey of the selection,
961
982
  which lies over the label at rest, fades as the lens lifts (--lq-rest),
@@ -981,9 +1002,11 @@
981
1002
  capsule, segments of 13px labels, and under the selected one a thumb inset
982
1003
  2px on every side. Held, the thumb fades and the lens lifts in its place,
983
1004
  24px wider and 16px taller. Its track is the tab bar's glass. On a light
984
- page it's tinted with iOS's track fill (--lq-segment-track), or the white
985
- thumb would vanish against a white page; on a dark one it's the glass
986
- alone, exactly as the tab bar's. */
1005
+ page it's iOS 27.2's (measured in Music's search and in Photos): clear
1006
+ glass, the selected segment a grey pill (--lq-segment-thumb) and, while
1007
+ it's held, the track whitened (--lq-segment-held) under a clear lens with
1008
+ a hairline and a shadow. On a dark one it's the glass alone, exactly as
1009
+ the tab bar's, with a lighter thumb. --lq-segment-track tints the track. */
987
1010
  .lq-segmented {
988
1011
  --lq-tab-width: 84px;
989
1012
  --lq-tab-height: var(--lq-control-size, 32px);
@@ -1047,6 +1070,15 @@
1047
1070
  transition-duration: 100ms;
1048
1071
  }
1049
1072
 
1073
+ .lq-segmented > .lq-tab-bar-glass {
1074
+ transition: background-color 160ms ease;
1075
+ }
1076
+
1077
+ .lq-segmented[data-lifted] > .lq-tab-bar-glass {
1078
+ --lq-glass: var(--lq-segment-held, var(--lq-field-glass));
1079
+ transition-duration: 120ms;
1080
+ }
1081
+
1050
1082
  /* Input */
1051
1083
 
1052
1084
  .lq-input {
@@ -1359,6 +1391,18 @@
1359
1391
  cursor: default;
1360
1392
  }
1361
1393
 
1394
+ /* Right to left, as iOS's, the switch is mirrored: on is its left end. Its
1395
+ light still falls from the top; only its travel turns round. */
1396
+ .lq-switch:dir(rtl) {
1397
+ scale: -1 1;
1398
+ }
1399
+
1400
+ @supports not selector(:dir(rtl)) {
1401
+ .lq-switch:is([dir="rtl"], [dir="rtl"] *) {
1402
+ scale: -1 1;
1403
+ }
1404
+ }
1405
+
1362
1406
  /* Slider */
1363
1407
 
1364
1408
  .lq-slider {
@@ -4223,20 +4267,874 @@ button.lq-sheet-handle:focus-visible {
4223
4267
  }
4224
4268
  }
4225
4269
 
4226
- /* Glass on glass */
4270
+ /* List */
4227
4271
 
4228
- /* Glass on glass (see glassUnder) is a faint layer on the glass under it,
4229
- with its own rim and edge: that glass is what's behind it, not the page.
4230
- Last, and doubled, to come after each component's own glass and before a
4231
- page's. */
4232
- .lq-glass.lq-glass[data-within] {
4233
- --lq-glass: var(--lq-within);
4234
- --lq-glass-active: var(--lq-within-active);
4235
- -webkit-backdrop-filter: none;
4236
- backdrop-filter: none;
4272
+ /* iOS's inset grouped list, as Settings draws it: a card of glass with 26px
4273
+ corners, rows 44px tall at least, hairlines that start where the text does,
4274
+ a heading in small grey letters over it and a note under it. */
4275
+ .lq-list {
4276
+ --lq-list-inset: 16px;
4277
+ display: grid;
4278
+ gap: 7px;
4279
+ color: var(--lq-foreground);
4280
+ font-size: 17px;
4237
4281
  }
4238
4282
 
4239
- /* A segmented control's track is that layer too, grey enough there for its thumb. */
4240
- .lq-segmented > .lq-tab-bar-glass[data-within] {
4241
- background-image: var(--lq-rim, none);
4283
+ .lq-list-header,
4284
+ .lq-list-footer {
4285
+ padding-inline: var(--lq-list-inset);
4286
+ color: var(--lq-muted);
4287
+ font-size: 13px;
4288
+ line-height: 1.35;
4289
+ }
4290
+
4291
+ .lq-list-header {
4292
+ font-weight: 500;
4293
+ text-transform: uppercase;
4294
+ letter-spacing: 0.02em;
4295
+ }
4296
+
4297
+ :lang(fa) .lq-list-header,
4298
+ :lang(ar) .lq-list-header {
4299
+ text-transform: none;
4300
+ letter-spacing: 0;
4301
+ }
4302
+
4303
+ .lq-list-rows {
4304
+ display: grid;
4305
+ overflow: hidden;
4306
+ border-radius: 26px;
4307
+ }
4308
+
4309
+ .lq-list-cell {
4310
+ display: grid;
4311
+ }
4312
+
4313
+ .lq-list-item {
4314
+ position: relative;
4315
+ display: flex;
4316
+ align-items: center;
4317
+ gap: 12px;
4318
+ box-sizing: border-box;
4319
+ width: 100%;
4320
+ min-height: 52px;
4321
+ margin: 0;
4322
+ padding: 10px var(--lq-list-inset);
4323
+ border: 0;
4324
+ background: none;
4325
+ color: inherit;
4326
+ font: inherit;
4327
+ text-align: start;
4328
+ text-decoration: none;
4329
+ -webkit-tap-highlight-color: transparent;
4330
+ }
4331
+
4332
+ /* The hairline under each row but the last, from where its text starts. */
4333
+ .lq-list-rows > :not(:last-child) > .lq-list-item::after,
4334
+ .lq-list-rows > .lq-list-item:not(:last-child)::after {
4335
+ content: "";
4336
+ position: absolute;
4337
+ inset-inline: var(--lq-list-rule, var(--lq-list-inset)) 0;
4338
+ bottom: 0;
4339
+ height: 0.5px;
4340
+ background: var(--lq-separator);
4341
+ }
4342
+
4343
+ .lq-list-item:has(> .lq-list-icon) {
4344
+ --lq-list-rule: calc(var(--lq-list-inset) + 30px + 12px);
4345
+ }
4346
+
4347
+ .lq-list-item[data-acts] {
4348
+ cursor: pointer;
4349
+ transition: background-color 250ms ease;
4350
+ }
4351
+
4352
+ .lq-list-item[data-acts]:active {
4353
+ background-color: var(--lq-highlight);
4354
+ transition-duration: 0s;
4355
+ }
4356
+
4357
+ .lq-list-item:focus-visible {
4358
+ outline: 2px solid var(--lq-ring);
4359
+ outline-offset: -4px;
4360
+ border-radius: 20px;
4361
+ }
4362
+
4363
+ .lq-list-item[data-disabled] {
4364
+ opacity: 0.4;
4365
+ cursor: default;
4366
+ }
4367
+
4368
+ .lq-list-item[data-destructive] {
4369
+ color: var(--lq-destructive);
4370
+ }
4371
+
4372
+ .lq-list-icon {
4373
+ display: inline-grid;
4374
+ flex: none;
4375
+ place-items: center;
4376
+ width: 30px;
4377
+ height: 30px;
4378
+ color: var(--lq-fill);
4379
+ }
4380
+
4381
+ .lq-list-icon > svg {
4382
+ width: 20px;
4383
+ height: 20px;
4384
+ }
4385
+
4386
+ .lq-list-icon[data-tinted] {
4387
+ border-radius: 8px;
4388
+ background: var(--lq-list-icon-tint);
4389
+ color: #fff;
4390
+ }
4391
+
4392
+ .lq-list-icon[data-tinted] > svg {
4393
+ width: 18px;
4394
+ height: 18px;
4395
+ }
4396
+
4397
+ .lq-list-text {
4398
+ display: grid;
4399
+ flex: 1;
4400
+ min-width: 0;
4401
+ gap: 2px;
4402
+ }
4403
+
4404
+ .lq-list-label {
4405
+ line-height: 1.25;
4406
+ }
4407
+
4408
+ .lq-list-description {
4409
+ color: var(--lq-muted);
4410
+ font-size: 13px;
4411
+ line-height: 1.3;
4412
+ }
4413
+
4414
+ .lq-list-detail {
4415
+ flex: none;
4416
+ max-width: 50%;
4417
+ overflow: hidden;
4418
+ color: var(--lq-muted);
4419
+ text-overflow: ellipsis;
4420
+ white-space: nowrap;
4421
+ }
4422
+
4423
+ .lq-list-chevron {
4424
+ flex: none;
4425
+ width: 7px;
4426
+ height: 12px;
4427
+ color: var(--lq-muted);
4428
+ opacity: 0.7;
4429
+ }
4430
+
4431
+ .lq-list-check {
4432
+ flex: none;
4433
+ width: 15px;
4434
+ height: 13px;
4435
+ color: var(--lq-fill);
4436
+ }
4437
+
4438
+ .lq-list-accessory {
4439
+ display: inline-flex;
4440
+ flex: none;
4441
+ }
4442
+
4443
+ /* The chevron points the way the page goes: left, right to left. */
4444
+ :dir(rtl) .lq-list-chevron,
4445
+ [dir="rtl"] .lq-list-chevron {
4446
+ scale: -1 1;
4447
+ }
4448
+
4449
+ /* Card */
4450
+
4451
+ /* A widget's card: 26px corners, 16px in, its title at the top and its
4452
+ footer at the bottom however tall it's made. */
4453
+ .lq-card {
4454
+ display: flex;
4455
+ flex-direction: column;
4456
+ gap: 8px;
4457
+ box-sizing: border-box;
4458
+ padding: 16px;
4459
+ border-radius: 26px;
4460
+ color: var(--lq-foreground);
4461
+ }
4462
+
4463
+ .lq-card[data-size="small"] {
4464
+ width: 170px;
4465
+ height: 170px;
4466
+ }
4467
+
4468
+ .lq-card[data-size="medium"] {
4469
+ width: 364px;
4470
+ height: 170px;
4471
+ }
4472
+
4473
+ .lq-card[data-size="large"] {
4474
+ width: 364px;
4475
+ height: 382px;
4476
+ }
4477
+
4478
+ .lq-card[data-size] {
4479
+ max-width: 100%;
4480
+ overflow: hidden;
4481
+ }
4482
+
4483
+ .lq-card-header {
4484
+ display: flex;
4485
+ align-items: center;
4486
+ gap: 10px;
4487
+ }
4488
+
4489
+ .lq-card-icon {
4490
+ display: inline-grid;
4491
+ flex: none;
4492
+ place-items: center;
4493
+ width: 28px;
4494
+ height: 28px;
4495
+ }
4496
+
4497
+ .lq-card-icon > svg {
4498
+ width: 22px;
4499
+ height: 22px;
4500
+ }
4501
+
4502
+ .lq-card-heading {
4503
+ display: grid;
4504
+ min-width: 0;
4505
+ gap: 1px;
4506
+ }
4507
+
4508
+ .lq-card-title {
4509
+ margin: 0;
4510
+ overflow: hidden;
4511
+ font-size: 15px;
4512
+ font-weight: 600;
4513
+ line-height: 1.25;
4514
+ text-overflow: ellipsis;
4515
+ white-space: nowrap;
4516
+ }
4517
+
4518
+ .lq-card-description {
4519
+ margin: 0;
4520
+ color: var(--lq-muted);
4521
+ font-size: 13px;
4522
+ line-height: 1.3;
4523
+ }
4524
+
4525
+ .lq-card-footer {
4526
+ display: flex;
4527
+ align-items: center;
4528
+ gap: 8px;
4529
+ margin-top: auto;
4530
+ color: var(--lq-muted);
4531
+ font-size: 13px;
4532
+ }
4533
+
4534
+ /* Gauge */
4535
+
4536
+ /* SwiftUI's gauge: an open ring, its gap at the bottom, with the value in
4537
+ it, or a bar with a dot riding on it. */
4538
+ .lq-gauge {
4539
+ --lq-gauge-tint: var(--lq-fill);
4540
+ position: relative;
4541
+ display: inline-grid;
4542
+ color: var(--lq-foreground);
4543
+ font-variant-numeric: tabular-nums;
4544
+ }
4545
+
4546
+ .lq-gauge[data-variant="circular"] {
4547
+ place-items: center;
4548
+ width: var(--lq-gauge-size, 64px);
4549
+ aspect-ratio: 1;
4550
+ }
4551
+
4552
+ .lq-gauge-ring {
4553
+ grid-area: 1 / 1;
4554
+ width: 100%;
4555
+ height: 100%;
4556
+ rotate: 135deg;
4557
+ overflow: visible;
4558
+ }
4559
+
4560
+ .lq-gauge-ring circle {
4561
+ fill: none;
4562
+ stroke-width: 5;
4563
+ stroke-linecap: round;
4564
+ }
4565
+
4566
+ .lq-gauge-track {
4567
+ stroke: var(--lq-rail);
4568
+ }
4569
+
4570
+ .lq-gauge-fill {
4571
+ stroke: var(--lq-gauge-tint);
4572
+ transition: stroke-dasharray 400ms var(--lq-ease);
4573
+ }
4574
+
4575
+ .lq-gauge[data-variant="circular"] .lq-gauge-value {
4576
+ grid-area: 1 / 1;
4577
+ font-size: calc(var(--lq-gauge-size, 64px) * 0.28);
4578
+ font-weight: 600;
4579
+ }
4580
+
4581
+ .lq-gauge[data-variant="circular"] .lq-gauge-ends {
4582
+ position: absolute;
4583
+ inset-inline: 12%;
4584
+ bottom: -10%;
4585
+ display: flex;
4586
+ justify-content: space-between;
4587
+ color: var(--lq-muted);
4588
+ font-size: calc(var(--lq-gauge-size, 64px) * 0.14);
4589
+ line-height: 1;
4590
+ }
4591
+
4592
+ .lq-gauge[data-variant="linear"] {
4593
+ gap: 6px;
4594
+ width: 100%;
4595
+ max-width: 240px;
4596
+ }
4597
+
4598
+ .lq-gauge[data-variant="linear"] .lq-gauge-value {
4599
+ font-size: 15px;
4600
+ font-weight: 600;
4601
+ }
4602
+
4603
+ .lq-gauge-bar {
4604
+ position: relative;
4605
+ height: 6px;
4606
+ border-radius: 3px;
4607
+ background: var(--lq-gauge-tint);
4608
+ }
4609
+
4610
+ /* Over a gradient the bar is the gradient, as a forecast's is, and the dot
4611
+ marks the value on it. Over a colour, the part past the value is dimmer. */
4612
+ .lq-gauge-bar::after {
4613
+ content: "";
4614
+ position: absolute;
4615
+ inset-block: 0;
4616
+ inset-inline: calc(var(--lq-gauge) * 100%) 0;
4617
+ border-radius: 0 3px 3px 0;
4618
+ background: var(--lq-rail);
4619
+ }
4620
+
4621
+ .lq-gauge[data-gradient] .lq-gauge-bar::after {
4622
+ content: none;
4623
+ }
4624
+
4625
+ .lq-gauge-dot {
4626
+ position: absolute;
4627
+ top: 50%;
4628
+ inset-inline-start: calc(var(--lq-gauge) * 100%);
4629
+ width: 10px;
4630
+ height: 10px;
4631
+ border: 2px solid var(--lq-gauge-ground, #fff);
4632
+ border-radius: 50%;
4633
+ background: var(--lq-foreground);
4634
+ box-sizing: border-box;
4635
+ translate: -50% -50%;
4636
+ transition: inset-inline-start 400ms var(--lq-ease);
4637
+ }
4638
+
4639
+ :dir(rtl) .lq-gauge-dot,
4640
+ [dir="rtl"] .lq-gauge-dot {
4641
+ translate: 50% -50%;
4642
+ }
4643
+
4644
+ .lq-gauge[data-variant="linear"] .lq-gauge-ends {
4645
+ display: flex;
4646
+ justify-content: space-between;
4647
+ color: var(--lq-muted);
4648
+ font-size: 12px;
4649
+ }
4650
+
4651
+ /* Disclosure */
4652
+
4653
+ /* SwiftUI's DisclosureGroup: a row with a chevron that turns down as what's
4654
+ under it grows into place. */
4655
+ .lq-disclosure {
4656
+ color: var(--lq-foreground);
4657
+ }
4658
+
4659
+ .lq-disclosure-label {
4660
+ display: flex;
4661
+ align-items: center;
4662
+ gap: 10px;
4663
+ box-sizing: border-box;
4664
+ width: 100%;
4665
+ min-height: 44px;
4666
+ margin: 0;
4667
+ padding: 8px 0;
4668
+ border: 0;
4669
+ background: none;
4670
+ color: inherit;
4671
+ font: inherit;
4672
+ text-align: start;
4673
+ cursor: pointer;
4674
+ -webkit-tap-highlight-color: transparent;
4675
+ }
4676
+
4677
+ .lq-disclosure-label:focus-visible {
4678
+ outline: 2px solid var(--lq-ring);
4679
+ outline-offset: 2px;
4680
+ border-radius: 10px;
4681
+ }
4682
+
4683
+ .lq-disclosure-text {
4684
+ flex: 1;
4685
+ min-width: 0;
4686
+ }
4687
+
4688
+ .lq-disclosure-chevron {
4689
+ flex: none;
4690
+ width: 7px;
4691
+ height: 12px;
4692
+ color: var(--lq-fill);
4693
+ transition: rotate 300ms var(--lq-ease);
4694
+ }
4695
+
4696
+ .lq-disclosure[data-open] .lq-disclosure-chevron {
4697
+ rotate: 90deg;
4698
+ }
4699
+
4700
+ :dir(rtl) .lq-disclosure-chevron,
4701
+ [dir="rtl"] .lq-disclosure-chevron {
4702
+ scale: -1 1;
4703
+ }
4704
+
4705
+ :dir(rtl) .lq-disclosure[data-open] .lq-disclosure-chevron,
4706
+ [dir="rtl"] .lq-disclosure[data-open] .lq-disclosure-chevron {
4707
+ rotate: -90deg;
4708
+ }
4709
+
4710
+ .lq-disclosure-panel {
4711
+ display: grid;
4712
+ grid-template-rows: 0fr;
4713
+ opacity: 0;
4714
+ transition:
4715
+ grid-template-rows 320ms var(--lq-ease),
4716
+ opacity 240ms ease;
4717
+ }
4718
+
4719
+ .lq-disclosure[data-open] > .lq-disclosure-panel {
4720
+ grid-template-rows: 1fr;
4721
+ opacity: 1;
4722
+ }
4723
+
4724
+ .lq-disclosure-content {
4725
+ min-height: 0;
4726
+ overflow: hidden;
4727
+ }
4728
+
4729
+ /* Navigation bar */
4730
+
4731
+ /* iOS's navigation bar: clear over the top of the page, glass once anything
4732
+ is under it, buttons at its ends and its small title between them once the
4733
+ large one under it has scrolled up under the bar. */
4734
+ .lq-nav-bar {
4735
+ position: sticky;
4736
+ top: 0;
4737
+ z-index: 10;
4738
+ display: grid;
4739
+ grid-template-columns: 1fr auto 1fr;
4740
+ align-items: center;
4741
+ gap: 8px;
4742
+ box-sizing: border-box;
4743
+ min-height: 54px;
4744
+ padding: 6px 16px;
4745
+ color: var(--lq-foreground);
4746
+ }
4747
+
4748
+ .lq-nav-bar-glass {
4749
+ position: absolute;
4750
+ inset: 0;
4751
+ z-index: -1;
4752
+ border-radius: 0;
4753
+ box-shadow: none;
4754
+ opacity: 0;
4755
+ transition: opacity 200ms ease;
4756
+ }
4757
+
4758
+ .lq-nav-bar[data-under] > .lq-nav-bar-glass {
4759
+ opacity: 1;
4760
+ }
4761
+
4762
+ .lq-nav-bar-leading,
4763
+ .lq-nav-bar-trailing {
4764
+ display: flex;
4765
+ align-items: center;
4766
+ gap: 8px;
4767
+ min-width: 0;
4768
+ }
4769
+
4770
+ .lq-nav-bar-trailing {
4771
+ justify-content: flex-end;
4772
+ }
4773
+
4774
+ .lq-nav-bar-title {
4775
+ margin: 0;
4776
+ overflow: hidden;
4777
+ font-size: 17px;
4778
+ font-weight: 600;
4779
+ text-align: center;
4780
+ text-overflow: ellipsis;
4781
+ white-space: nowrap;
4782
+ opacity: 0;
4783
+ translate: 0 4px;
4784
+ transition:
4785
+ opacity 200ms ease,
4786
+ translate 200ms var(--lq-ease);
4787
+ }
4788
+
4789
+ .lq-nav-bar[data-collapsed] .lq-nav-bar-title {
4790
+ opacity: 1;
4791
+ translate: none;
4792
+ }
4793
+
4794
+ .lq-nav-bar-large {
4795
+ padding: 0 16px 8px;
4796
+ color: var(--lq-foreground);
4797
+ }
4798
+
4799
+ .lq-nav-bar-large > h1 {
4800
+ margin: 0;
4801
+ font-size: 34px;
4802
+ font-weight: 700;
4803
+ line-height: 1.2;
4804
+ letter-spacing: 0.01em;
4805
+ }
4806
+
4807
+ .lq-nav-bar-large > p {
4808
+ margin: 2px 0 0;
4809
+ color: var(--lq-muted);
4810
+ font-size: 15px;
4811
+ }
4812
+
4813
+ @media (prefers-reduced-motion: reduce) {
4814
+ .lq-disclosure-panel,
4815
+ .lq-disclosure-chevron,
4816
+ .lq-nav-bar-title,
4817
+ .lq-gauge-fill,
4818
+ .lq-gauge-dot {
4819
+ transition: none;
4820
+ }
4821
+ }
4822
+
4823
+ /* Glass on glass */
4824
+
4825
+ /* Glass on glass (see glassUnder) is a faint layer on the glass under it,
4826
+ with its own rim and edge: that glass is what's behind it, not the page.
4827
+ Last, and doubled, to come after each component's own glass and before a
4828
+ page's. */
4829
+ .lq-glass.lq-glass[data-within] {
4830
+ --lq-glass: var(--lq-within);
4831
+ --lq-glass-active: var(--lq-within-active);
4832
+ -webkit-backdrop-filter: none;
4833
+ backdrop-filter: none;
4834
+ }
4835
+
4836
+ /* A segmented control's track is that layer too, grey enough there for its thumb. */
4837
+ .lq-segmented > .lq-tab-bar-glass[data-within] {
4838
+ background-image: var(--lq-rim, none);
4839
+ }
4840
+
4841
+ /* Popover */
4842
+
4843
+ .lq-popover-anchor {
4844
+ display: inline-flex;
4845
+ }
4846
+
4847
+ /* A card of glass beside its trigger, in the top layer (see anchor.ts). It
4848
+ grows out of the trigger and shrinks back into it. */
4849
+ .lq-popover-card {
4850
+ position: fixed;
4851
+ inset: auto;
4852
+ margin: 0;
4853
+ box-sizing: border-box;
4854
+ max-width: min(360px, calc(100vw - 16px));
4855
+ padding: 16px;
4856
+ border: 0;
4857
+ border-radius: 24px;
4858
+ color: var(--lq-foreground);
4859
+ font-size: 14px;
4860
+ box-shadow:
4861
+ inset 0 0 0 0.5px var(--lq-edge),
4862
+ 0 16px 40px var(--lq-shadow, rgb(0 0 0 / 0.18));
4863
+ outline: none;
4864
+ opacity: 0;
4865
+ scale: 0.86;
4866
+ transition:
4867
+ opacity 160ms ease,
4868
+ scale 340ms cubic-bezier(0.3, 1.35, 0.5, 1);
4869
+ }
4870
+
4871
+ .lq-popover-card[data-state="open"] {
4872
+ opacity: 1;
4873
+ scale: 1;
4874
+ }
4875
+
4876
+ .lq-popover-card[data-state="closed"] {
4877
+ transition-duration: 160ms, 180ms;
4878
+ transition-timing-function: ease;
4879
+ }
4880
+
4881
+ /* Tooltip */
4882
+
4883
+ .lq-tooltip-anchor {
4884
+ display: inline-flex;
4885
+ }
4886
+
4887
+ .lq-tooltip {
4888
+ position: fixed;
4889
+ inset: auto;
4890
+ margin: 0;
4891
+ box-sizing: border-box;
4892
+ max-width: min(280px, calc(100vw - 16px));
4893
+ padding: 5px 10px;
4894
+ border: 0;
4895
+ border-radius: 999px;
4896
+ color: var(--lq-foreground);
4897
+ font-size: 12px;
4898
+ line-height: 1.35;
4899
+ pointer-events: none;
4900
+ box-shadow:
4901
+ inset 0 0 0 0.5px var(--lq-edge),
4902
+ 0 4px 14px rgb(0 0 0 / 0.14);
4903
+ opacity: 0;
4904
+ translate: 0 2px;
4905
+ transition:
4906
+ opacity 120ms ease,
4907
+ translate 160ms ease;
4908
+ }
4909
+
4910
+ .lq-tooltip[data-state="open"] {
4911
+ opacity: 1;
4912
+ translate: 0 0;
4913
+ }
4914
+
4915
+ /* Toast */
4916
+
4917
+ /* Where toasts show: across the top of the window, the newest last, as iOS
4918
+ drops a notification in from the top. */
4919
+ .lq-toaster {
4920
+ position: fixed;
4921
+ inset: 12px 12px auto;
4922
+ z-index: 2147483000;
4923
+ display: flex;
4924
+ flex-direction: column;
4925
+ align-items: center;
4926
+ gap: 8px;
4927
+ pointer-events: none;
4928
+ }
4929
+
4930
+ .lq-toast {
4931
+ display: flex;
4932
+ align-items: center;
4933
+ gap: 12px;
4934
+ box-sizing: border-box;
4935
+ width: min(420px, 100%);
4936
+ min-height: 56px;
4937
+ padding: 10px 10px 10px 16px;
4938
+ padding-inline: 16px 10px;
4939
+ border-radius: 28px;
4940
+ color: var(--lq-foreground);
4941
+ font-size: 14px;
4942
+ pointer-events: auto;
4943
+ touch-action: none;
4944
+ user-select: none;
4945
+ -webkit-user-select: none;
4946
+ box-shadow:
4947
+ inset 0 0 0 0.5px var(--lq-edge),
4948
+ 0 12px 32px rgb(0 0 0 / 0.16);
4949
+ animation: lq-toast-in 520ms cubic-bezier(0.3, 1.3, 0.5, 1) both;
4950
+ }
4951
+
4952
+ .lq-toast[data-leaving] {
4953
+ animation: lq-toast-out 260ms ease-in both;
4954
+ }
4955
+
4956
+ @keyframes lq-toast-in {
4957
+ from {
4958
+ opacity: 0;
4959
+ transform: translateY(-120%) scale(0.92);
4960
+ }
4961
+ }
4962
+
4963
+ @keyframes lq-toast-out {
4964
+ to {
4965
+ opacity: 0;
4966
+ transform: translateY(-110%) scale(0.94);
4967
+ }
4968
+ }
4969
+
4970
+ .lq-toast-icon {
4971
+ display: flex;
4972
+ flex: none;
4973
+ }
4974
+
4975
+ .lq-toast-icon > svg {
4976
+ width: 22px;
4977
+ height: 22px;
4978
+ }
4979
+
4980
+ .lq-toast-text {
4981
+ flex: 1;
4982
+ min-width: 0;
4983
+ }
4984
+
4985
+ .lq-toast-title {
4986
+ font-weight: 600;
4987
+ }
4988
+
4989
+ .lq-toast-description {
4990
+ margin-top: 1px;
4991
+ color: var(--lq-muted);
4992
+ font-size: 13px;
4993
+ }
4994
+
4995
+ .lq-toast-action,
4996
+ .lq-toast-close {
4997
+ flex: none;
4998
+ border: 0;
4999
+ background: none;
5000
+ color: inherit;
5001
+ font: inherit;
5002
+ cursor: pointer;
5003
+ }
5004
+
5005
+ .lq-toast-action {
5006
+ padding: 6px 12px;
5007
+ border-radius: 999px;
5008
+ background: var(--lq-hover);
5009
+ font-weight: 600;
5010
+ }
5011
+
5012
+ .lq-toast-close {
5013
+ display: grid;
5014
+ place-items: center;
5015
+ width: 28px;
5016
+ height: 28px;
5017
+ padding: 0;
5018
+ border-radius: 50%;
5019
+ color: var(--lq-muted);
5020
+ }
5021
+
5022
+ .lq-toast-close svg {
5023
+ width: 14px;
5024
+ height: 14px;
5025
+ fill: none;
5026
+ stroke: currentColor;
5027
+ stroke-width: 1.8;
5028
+ stroke-linecap: round;
5029
+ }
5030
+
5031
+ .lq-toast-close:hover,
5032
+ .lq-toast-action:hover {
5033
+ background: var(--lq-hover);
5034
+ }
5035
+
5036
+ @media (prefers-reduced-motion: reduce) {
5037
+ .lq-toast,
5038
+ .lq-toast[data-leaving] {
5039
+ animation-name: lq-toast-fade;
5040
+ animation-duration: 160ms;
5041
+ }
5042
+
5043
+ .lq-popover-card,
5044
+ .lq-tooltip {
5045
+ scale: 1;
5046
+ translate: none;
5047
+ }
5048
+ }
5049
+
5050
+ @keyframes lq-toast-fade {
5051
+ from {
5052
+ opacity: 0;
5053
+ }
5054
+ }
5055
+
5056
+ /* Page control */
5057
+
5058
+ /* iOS's page dots, on a capsule of glass: the current one lit, the rest a
5059
+ third as bright. */
5060
+ .lq-page-control {
5061
+ display: inline-flex;
5062
+ align-items: center;
5063
+ gap: 2px;
5064
+ padding: 6px 8px;
5065
+ border-radius: 999px;
5066
+ }
5067
+
5068
+ .lq-page-dot {
5069
+ position: relative;
5070
+ width: 16px;
5071
+ height: 16px;
5072
+ padding: 0;
5073
+ border: 0;
5074
+ border-radius: 50%;
5075
+ background: none;
5076
+ cursor: pointer;
5077
+ }
5078
+
5079
+ .lq-page-dot::before {
5080
+ content: "";
5081
+ position: absolute;
5082
+ inset: 4.5px;
5083
+ border-radius: 50%;
5084
+ background: var(--lq-foreground);
5085
+ opacity: 0.3;
5086
+ transition: opacity 200ms ease;
5087
+ }
5088
+
5089
+ .lq-page-dot[aria-current="page"]::before {
5090
+ opacity: 1;
5091
+ }
5092
+
5093
+ .lq-page-dot:focus-visible {
5094
+ outline: 2px solid var(--lq-ring);
5095
+ outline-offset: -1px;
5096
+ }
5097
+
5098
+ /* Badge */
5099
+
5100
+ .lq-badge {
5101
+ display: inline-flex;
5102
+ align-items: center;
5103
+ justify-content: center;
5104
+ box-sizing: border-box;
5105
+ min-width: 20px;
5106
+ height: 20px;
5107
+ padding: 0 7px;
5108
+ border-radius: 999px;
5109
+ font-size: 12px;
5110
+ font-weight: 600;
5111
+ font-variant-numeric: tabular-nums;
5112
+ line-height: 1;
5113
+ white-space: nowrap;
5114
+ }
5115
+
5116
+ .lq-badge[data-variant="glass"] {
5117
+ color: var(--lq-badge-tint, var(--lq-foreground));
5118
+ background: var(--lq-glass);
5119
+ box-shadow: inset 0 0 0 0.5px var(--lq-edge);
5120
+ -webkit-backdrop-filter: blur(12px) saturate(1.6);
5121
+ backdrop-filter: blur(12px) saturate(1.6);
5122
+ }
5123
+
5124
+ .lq-badge[data-variant="filled"] {
5125
+ color: #fff;
5126
+ background: var(--lq-badge-tint, var(--lq-fill));
5127
+ }
5128
+
5129
+ /* An icon that points along the text, as a back or forward arrow, is
5130
+ mirrored right to left, as iOS mirrors its directional symbols. Mark it
5131
+ with data-lq-mirror. */
5132
+ :dir(rtl) [data-lq-mirror] {
5133
+ scale: -1 1;
5134
+ }
5135
+
5136
+ @supports not selector(:dir(rtl)) {
5137
+ :is([dir="rtl"], [dir="rtl"] *) [data-lq-mirror] {
5138
+ scale: -1 1;
5139
+ }
4242
5140
  }