@plexui/styles 0.9.0 → 0.10.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.
@@ -118,7 +118,10 @@
118
118
  transition:
119
119
  opacity var(--dialog-exit-duration) var(--dialog-exit-easing),
120
120
  transform var(--dialog-exit-duration) var(--dialog-exit-easing);
121
- }/* Keep the native scroll indicator consistent even without the global stylesheet. */.Panel,
121
+ }/* The place of a large Toolbar title at the top of Dialog.Body. It holds the title's margins, so they never merge
122
+ with the margins of the content after it. */.LargeTitle {
123
+ display: flow-root;
124
+ }/* Keep the native scroll indicator consistent even without the global stylesheet. */.Panel,
122
125
  .Body {
123
126
  scrollbar-width: thin;
124
127
  scrollbar-color: var(--scrollbar-color) transparent;
@@ -905,6 +908,36 @@
905
908
  scroll-padding-bottom: calc(16px + var(--dialog-footer-height, 0px));
906
909
  }
907
910
 
911
+ /* A large Toolbar title starts the body, as it starts a page's content: the body starts 16 under the bar, as
912
+ Page.Content does, and the title stands --toolbar-large-title-gap under the row of controls, the content 16 under
913
+ its last baseline. It scrolls with the body and goes under the bar, which then shows it inline. */
914
+ .Content[data-mobile-variant="sheet"] .Panel > .Body:has(> .LargeTitle > *) {
915
+ padding-top: calc(16px + var(--dialog-header-height, 0px));
916
+ scroll-padding-top: calc(16px + var(--dialog-header-height, 0px));
917
+ }
918
+
919
+ /* The bar's rows under a large title (Toolbar.Row) stand under it in the body and, scrolled up to the bar, stay
920
+ under its controls, as on a page (Page.Content's rows): the body's padding ends 16 under the bar, as the page
921
+ content's does, and the sticky offset is counted from there. The bar's background reaches under them. */
922
+ .LargeTitleRows {
923
+ position: sticky;
924
+ z-index: 6;
925
+ top: calc(var(--toolbar-row-gap) - var(--toolbar-padding-bottom) - 16px);
926
+ display: flex;
927
+ flex-direction: column;
928
+ gap: var(--toolbar-row-gap);
929
+ margin-bottom: 16px;
930
+ }
931
+
932
+ .LargeTitleRows:empty {
933
+ display: none;
934
+ }
935
+
936
+ /* A target scrolled into view lands under the pinned rows, not behind them. */
937
+ .Content[data-mobile-variant="sheet"] .Panel > .Body:has(> .LargeTitleRows > *) {
938
+ scroll-padding-top: calc(16px + var(--dialog-header-height, 0px) + var(--toolbar-row-gap) + var(--page-toolbar-rows-height, 0px));
939
+ }
940
+
908
941
  /* A footer keeps its actions above the home indicator itself: the content ends 16px above the footer. */
909
942
  .Content[data-mobile-variant="sheet"] .Panel:has(> .Footer, > [data-toolbar][data-placement="bottom"]) > .Body {
910
943
  padding-bottom: calc(16px + var(--dialog-footer-height, 0px));
@@ -1457,6 +1490,36 @@
1457
1490
  scroll-padding-bottom: calc(16px + var(--dialog-footer-height, 0px));
1458
1491
  }
1459
1492
 
1493
+ /* A large Toolbar title starts the body, as it starts a page's content: the body starts 16 under the bar, as
1494
+ Page.Content does, and the title stands --toolbar-large-title-gap under the row of controls, the content 16 under
1495
+ its last baseline. It scrolls with the body and goes under the bar, which then shows it inline. */
1496
+ :where([data-plex-layout="phone"]) .Content[data-mobile-variant="sheet"] .Panel > .Body:has(> .LargeTitle > *) {
1497
+ padding-top: calc(16px + var(--dialog-header-height, 0px));
1498
+ scroll-padding-top: calc(16px + var(--dialog-header-height, 0px));
1499
+ }
1500
+
1501
+ /* The bar's rows under a large title (Toolbar.Row) stand under it in the body and, scrolled up to the bar, stay
1502
+ under its controls, as on a page (Page.Content's rows): the body's padding ends 16 under the bar, as the page
1503
+ content's does, and the sticky offset is counted from there. The bar's background reaches under them. */
1504
+ :where([data-plex-layout="phone"]) .LargeTitleRows {
1505
+ position: sticky;
1506
+ z-index: 6;
1507
+ top: calc(var(--toolbar-row-gap) - var(--toolbar-padding-bottom) - 16px);
1508
+ display: flex;
1509
+ flex-direction: column;
1510
+ gap: var(--toolbar-row-gap);
1511
+ margin-bottom: 16px;
1512
+ }
1513
+
1514
+ :where([data-plex-layout="phone"]) .LargeTitleRows:empty {
1515
+ display: none;
1516
+ }
1517
+
1518
+ /* A target scrolled into view lands under the pinned rows, not behind them. */
1519
+ :where([data-plex-layout="phone"]) .Content[data-mobile-variant="sheet"] .Panel > .Body:has(> .LargeTitleRows > *) {
1520
+ scroll-padding-top: calc(16px + var(--dialog-header-height, 0px) + var(--toolbar-row-gap) + var(--page-toolbar-rows-height, 0px));
1521
+ }
1522
+
1460
1523
  /* A footer keeps its actions above the home indicator itself: the content ends 16px above the footer. */
1461
1524
  :where([data-plex-layout="phone"]) .Content[data-mobile-variant="sheet"] .Panel:has(> .Footer, > [data-toolbar][data-placement="bottom"]) > .Body {
1462
1525
  padding-bottom: calc(16px + var(--dialog-footer-height, 0px));
@@ -687,8 +687,9 @@
687
687
  the list through the bounce). The bar keeps the row of controls. Once the title has gone under the bar, the row
688
688
  shows it inline: the two swap over --toolbar-large-title-swap-duration, not with the scroll, as iOS 27.2 does,
689
689
  and a hard or glass bar shows its line with the inline title: until then the large title is the content under
690
- the row. */
691
- .Toolbar[data-host="page"][data-title-style="large"] {
690
+ the row. A Sheet does the same with its body (Dialog.Body keeps the place); its bar keeps its padding, background
691
+ and radius. */
692
+ .Toolbar:is([data-host="page"], [data-host="dialog"])[data-title-style="large"] {
692
693
  --toolbar-edge-blur: var(--toolbar-edge-blur-small);
693
694
  grid-template-areas: "leading collapsed trailing";
694
695
  grid-template-columns: minmax(max-content, 1fr) minmax(0, auto) minmax(max-content, 1fr);
@@ -697,23 +698,23 @@
697
698
 
698
699
  /* Until the content has made its place (a server-rendered page before it hydrates), the title stands in the
699
700
  bar's second row, where it will stand in the content. */
700
- .Toolbar[data-host="page"][data-title-style="large"]:has(> .Heading) {
701
+ .Toolbar:is([data-host="page"], [data-host="dialog"])[data-title-style="large"]:has(> .Heading) {
701
702
  grid-template-areas:
702
703
  "leading collapsed trailing"
703
704
  "heading heading heading";
704
705
  grid-template-rows: minmax(var(--toolbar-item-size), auto) auto;
705
706
  }
706
707
 
707
- .Toolbar[data-host="page"][data-title-style="large"][data-background="hard"]::before,
708
- .Toolbar[data-host="page"][data-title-style="large"][data-background="glass"]::before {
708
+ .Toolbar:is([data-host="page"], [data-host="dialog"])[data-title-style="large"][data-background="hard"]::before,
709
+ .Toolbar:is([data-host="page"], [data-host="dialog"])[data-title-style="large"][data-background="glass"]::before {
709
710
  transition: opacity var(--toolbar-large-title-swap-duration), border-color var(--toolbar-large-title-swap-duration);
710
711
  }
711
712
 
712
- .Toolbar[data-host="page"][data-title-style="large"][data-scrolled]:not([data-title-collapsed])[data-background="hard"]::before {
713
+ .Toolbar:is([data-host="page"], [data-host="dialog"])[data-title-style="large"][data-scrolled]:not([data-title-collapsed])[data-background="hard"]::before {
713
714
  border-bottom-color: transparent;
714
715
  }
715
716
 
716
- .Toolbar[data-host="page"][data-title-style="large"][data-scrolled]:not([data-title-collapsed])[data-background="glass"]::before {
717
+ .Toolbar:is([data-host="page"], [data-host="dialog"])[data-title-style="large"][data-scrolled]:not([data-title-collapsed])[data-background="glass"]::before {
717
718
  opacity: 0;
718
719
  }
719
720
 
@@ -721,22 +722,28 @@
721
722
  13.11 «Да, закрепить»): the background, edge and line reach under them as under a row in the bar, the bar's
722
723
  bottom padding under the last one, as iOS 27.2 draws its edge under a pinned safeAreaBar (ref-app
723
724
  segrow-large-scrolled). */
724
- .Toolbar[data-host="page"][data-title-style="large"][data-rows-pinned]::before,
725
- .Toolbar[data-host="page"][data-title-style="large"][data-rows-pinned]::after {
725
+ .Toolbar:is([data-host="page"], [data-host="dialog"])[data-title-style="large"][data-rows-pinned]::before,
726
+ .Toolbar:is([data-host="page"], [data-host="dialog"])[data-title-style="large"][data-rows-pinned]::after {
726
727
  margin-bottom: calc(-1 * (var(--toolbar-row-gap) + var(--page-toolbar-rows-height, 0px)));
727
728
  }
728
729
 
729
730
  /* The bar ends at the title's last baseline: the content starts 16pt under it (iOS 27.2: baseline 152, content
730
731
  168, in Files, Settings, UIKit and SwiftUI; with a subtitle, 16.6 under the subtitle's). */
731
- .Toolbar[data-host="page"][data-title-style="large"] > .Heading {
732
+ .Toolbar:is([data-host="page"], [data-host="dialog"])[data-title-style="large"] > .Heading {
732
733
  margin-bottom: calc(-1 * (var(--toolbar-padding-bottom) + var(--toolbar-large-title-descent)));
733
734
  }
734
735
 
735
- .Toolbar[data-host="page"][data-title-style="large"] > .Heading:has(> .Subtitle) {
736
+ .Toolbar:is([data-host="page"], [data-host="dialog"])[data-title-style="large"] > .Heading:has(> .Subtitle) {
736
737
  margin-bottom: calc(-1 * (var(--toolbar-padding-bottom) + var(--toolbar-large-subtitle-descent)));
737
738
  }
738
739
 
739
- .Toolbar[data-host="page"][data-title-style="large"] > .CollapsedTitle {
740
+ /* A title kept in the bar with rows under it (a Sheet without Dialog.Body) keeps its line box: the rows stand
741
+ --toolbar-large-title-gap under it, not over its descent (Codex #70). */
742
+ .Toolbar:is([data-host="page"], [data-host="dialog"])[data-title-style="large"] > .Heading:has(~ .Row) {
743
+ margin-bottom: 0;
744
+ }
745
+
746
+ .Toolbar:is([data-host="page"], [data-host="dialog"])[data-title-style="large"] > .CollapsedTitle {
740
747
  grid-area: collapsed;
741
748
  min-width: 0;
742
749
  overflow: hidden;
@@ -751,13 +758,13 @@
751
758
  transition: opacity var(--toolbar-large-title-swap-duration);
752
759
  }
753
760
 
754
- .Toolbar[data-host="page"][data-title-style="large"][data-title-collapsed] > .CollapsedTitle {
761
+ .Toolbar:is([data-host="page"], [data-host="dialog"])[data-title-style="large"][data-title-collapsed] > .CollapsedTitle {
755
762
  opacity: 1;
756
763
  }
757
764
 
758
765
  /* With a subtitle the inline copy takes two lines, as the inline title does: 15/20 and 12/16 in the
759
766
  secondary label (iOS 26 kit Toolbar - Top - iPhone, Title 2 Line: 15 semibold over 12 medium). */
760
- .Toolbar[data-host="page"][data-title-style="large"] > .CollapsedTitle:has(> .CollapsedSubtitle) {
767
+ .Toolbar:is([data-host="page"], [data-host="dialog"])[data-title-style="large"] > .CollapsedTitle:has(> .CollapsedSubtitle) {
761
768
  display: flex;
762
769
  flex-direction: column;
763
770
  align-items: center;
@@ -767,14 +774,14 @@
767
774
  transform: translateY(-0.33px);
768
775
  }
769
776
 
770
- .Toolbar[data-host="page"][data-title-style="large"] > .CollapsedTitle > :is(.CollapsedLine, .CollapsedSubtitle) {
777
+ .Toolbar:is([data-host="page"], [data-host="dialog"])[data-title-style="large"] > .CollapsedTitle > :is(.CollapsedLine, .CollapsedSubtitle) {
771
778
  max-width: 100%;
772
779
  overflow: hidden;
773
780
  text-overflow: ellipsis;
774
781
  white-space: nowrap;
775
782
  }
776
783
 
777
- .Toolbar[data-host="page"][data-title-style="large"] > .CollapsedTitle > .CollapsedSubtitle {
784
+ .Toolbar:is([data-host="page"], [data-host="dialog"])[data-title-style="large"] > .CollapsedTitle > .CollapsedSubtitle {
778
785
  margin-top: -2px;
779
786
  color: var(--mobile-label-secondary, var(--color-text-secondary));
780
787
  font-size: var(--toolbar-subtitle-font-size);
@@ -1510,8 +1517,9 @@
1510
1517
  the list through the bounce). The bar keeps the row of controls. Once the title has gone under the bar, the row
1511
1518
  shows it inline: the two swap over --toolbar-large-title-swap-duration, not with the scroll, as iOS 27.2 does,
1512
1519
  and a hard or glass bar shows its line with the inline title: until then the large title is the content under
1513
- the row. */
1514
- :where([data-plex-layout="phone"]) .Toolbar[data-host="page"][data-title-style="large"] {
1520
+ the row. A Sheet does the same with its body (Dialog.Body keeps the place); its bar keeps its padding, background
1521
+ and radius. */
1522
+ :where([data-plex-layout="phone"]) .Toolbar:is([data-host="page"], [data-host="dialog"])[data-title-style="large"] {
1515
1523
  --toolbar-edge-blur: var(--toolbar-edge-blur-small);
1516
1524
  grid-template-areas: "leading collapsed trailing";
1517
1525
  grid-template-columns: minmax(max-content, 1fr) minmax(0, auto) minmax(max-content, 1fr);
@@ -1520,23 +1528,22 @@
1520
1528
 
1521
1529
  /* Until the content has made its place (a server-rendered page before it hydrates), the title stands in the
1522
1530
  bar's second row, where it will stand in the content. */
1523
- :where([data-plex-layout="phone"]) .Toolbar[data-host="page"][data-title-style="large"]:has(> .Heading) {
1531
+ :where([data-plex-layout="phone"]) .Toolbar:is([data-host="page"], [data-host="dialog"])[data-title-style="large"]:has(> .Heading) {
1524
1532
  grid-template-areas:
1525
1533
  "leading collapsed trailing"
1526
1534
  "heading heading heading";
1527
1535
  grid-template-rows: minmax(var(--toolbar-item-size), auto) auto;
1528
1536
  }
1529
1537
 
1530
- :where([data-plex-layout="phone"]) .Toolbar[data-host="page"][data-title-style="large"][data-background="hard"]::before,
1531
- :where([data-plex-layout="phone"]) .Toolbar[data-host="page"][data-title-style="large"][data-background="glass"]::before {
1538
+ :where([data-plex-layout="phone"]) .Toolbar:is([data-host="page"], [data-host="dialog"])[data-title-style="large"][data-background="hard"]::before, :where([data-plex-layout="phone"]) .Toolbar:is([data-host="page"], [data-host="dialog"])[data-title-style="large"][data-background="glass"]::before {
1532
1539
  transition: opacity var(--toolbar-large-title-swap-duration), border-color var(--toolbar-large-title-swap-duration);
1533
1540
  }
1534
1541
 
1535
- :where([data-plex-layout="phone"]) .Toolbar[data-host="page"][data-title-style="large"][data-scrolled]:not([data-title-collapsed])[data-background="hard"]::before {
1542
+ :where([data-plex-layout="phone"]) .Toolbar:is([data-host="page"], [data-host="dialog"])[data-title-style="large"][data-scrolled]:not([data-title-collapsed])[data-background="hard"]::before {
1536
1543
  border-bottom-color: transparent;
1537
1544
  }
1538
1545
 
1539
- :where([data-plex-layout="phone"]) .Toolbar[data-host="page"][data-title-style="large"][data-scrolled]:not([data-title-collapsed])[data-background="glass"]::before {
1546
+ :where([data-plex-layout="phone"]) .Toolbar:is([data-host="page"], [data-host="dialog"])[data-title-style="large"][data-scrolled]:not([data-title-collapsed])[data-background="glass"]::before {
1540
1547
  opacity: 0;
1541
1548
  }
1542
1549
 
@@ -1544,22 +1551,27 @@
1544
1551
  13.11 «Да, закрепить»): the background, edge and line reach under them as under a row in the bar, the bar's
1545
1552
  bottom padding under the last one, as iOS 27.2 draws its edge under a pinned safeAreaBar (ref-app
1546
1553
  segrow-large-scrolled). */
1547
- :where([data-plex-layout="phone"]) .Toolbar[data-host="page"][data-title-style="large"][data-rows-pinned]::before,
1548
- :where([data-plex-layout="phone"]) .Toolbar[data-host="page"][data-title-style="large"][data-rows-pinned]::after {
1554
+ :where([data-plex-layout="phone"]) .Toolbar:is([data-host="page"], [data-host="dialog"])[data-title-style="large"][data-rows-pinned]::before, :where([data-plex-layout="phone"]) .Toolbar:is([data-host="page"], [data-host="dialog"])[data-title-style="large"][data-rows-pinned]::after {
1549
1555
  margin-bottom: calc(-1 * (var(--toolbar-row-gap) + var(--page-toolbar-rows-height, 0px)));
1550
1556
  }
1551
1557
 
1552
1558
  /* The bar ends at the title's last baseline: the content starts 16pt under it (iOS 27.2: baseline 152, content
1553
1559
  168, in Files, Settings, UIKit and SwiftUI; with a subtitle, 16.6 under the subtitle's). */
1554
- :where([data-plex-layout="phone"]) .Toolbar[data-host="page"][data-title-style="large"] > .Heading {
1560
+ :where([data-plex-layout="phone"]) .Toolbar:is([data-host="page"], [data-host="dialog"])[data-title-style="large"] > .Heading {
1555
1561
  margin-bottom: calc(-1 * (var(--toolbar-padding-bottom) + var(--toolbar-large-title-descent)));
1556
1562
  }
1557
1563
 
1558
- :where([data-plex-layout="phone"]) .Toolbar[data-host="page"][data-title-style="large"] > .Heading:has(> .Subtitle) {
1564
+ :where([data-plex-layout="phone"]) .Toolbar:is([data-host="page"], [data-host="dialog"])[data-title-style="large"] > .Heading:has(> .Subtitle) {
1559
1565
  margin-bottom: calc(-1 * (var(--toolbar-padding-bottom) + var(--toolbar-large-subtitle-descent)));
1560
1566
  }
1561
1567
 
1562
- :where([data-plex-layout="phone"]) .Toolbar[data-host="page"][data-title-style="large"] > .CollapsedTitle {
1568
+ /* A title kept in the bar with rows under it (a Sheet without Dialog.Body) keeps its line box: the rows stand
1569
+ --toolbar-large-title-gap under it, not over its descent (Codex #70). */
1570
+ :where([data-plex-layout="phone"]) .Toolbar:is([data-host="page"], [data-host="dialog"])[data-title-style="large"] > .Heading:has(~ .Row) {
1571
+ margin-bottom: 0;
1572
+ }
1573
+
1574
+ :where([data-plex-layout="phone"]) .Toolbar:is([data-host="page"], [data-host="dialog"])[data-title-style="large"] > .CollapsedTitle {
1563
1575
  grid-area: collapsed;
1564
1576
  min-width: 0;
1565
1577
  overflow: hidden;
@@ -1574,13 +1586,13 @@
1574
1586
  transition: opacity var(--toolbar-large-title-swap-duration);
1575
1587
  }
1576
1588
 
1577
- :where([data-plex-layout="phone"]) .Toolbar[data-host="page"][data-title-style="large"][data-title-collapsed] > .CollapsedTitle {
1589
+ :where([data-plex-layout="phone"]) .Toolbar:is([data-host="page"], [data-host="dialog"])[data-title-style="large"][data-title-collapsed] > .CollapsedTitle {
1578
1590
  opacity: 1;
1579
1591
  }
1580
1592
 
1581
1593
  /* With a subtitle the inline copy takes two lines, as the inline title does: 15/20 and 12/16 in the
1582
1594
  secondary label (iOS 26 kit Toolbar - Top - iPhone, Title 2 Line: 15 semibold over 12 medium). */
1583
- :where([data-plex-layout="phone"]) .Toolbar[data-host="page"][data-title-style="large"] > .CollapsedTitle:has(> .CollapsedSubtitle) {
1595
+ :where([data-plex-layout="phone"]) .Toolbar:is([data-host="page"], [data-host="dialog"])[data-title-style="large"] > .CollapsedTitle:has(> .CollapsedSubtitle) {
1584
1596
  display: flex;
1585
1597
  flex-direction: column;
1586
1598
  align-items: center;
@@ -1590,14 +1602,14 @@
1590
1602
  transform: translateY(-0.33px);
1591
1603
  }
1592
1604
 
1593
- :where([data-plex-layout="phone"]) .Toolbar[data-host="page"][data-title-style="large"] > .CollapsedTitle > :is(.CollapsedLine, .CollapsedSubtitle) {
1605
+ :where([data-plex-layout="phone"]) .Toolbar:is([data-host="page"], [data-host="dialog"])[data-title-style="large"] > .CollapsedTitle > :is(.CollapsedLine, .CollapsedSubtitle) {
1594
1606
  max-width: 100%;
1595
1607
  overflow: hidden;
1596
1608
  text-overflow: ellipsis;
1597
1609
  white-space: nowrap;
1598
1610
  }
1599
1611
 
1600
- :where([data-plex-layout="phone"]) .Toolbar[data-host="page"][data-title-style="large"] > .CollapsedTitle > .CollapsedSubtitle {
1612
+ :where([data-plex-layout="phone"]) .Toolbar:is([data-host="page"], [data-host="dialog"])[data-title-style="large"] > .CollapsedTitle > .CollapsedSubtitle {
1601
1613
  margin-top: -2px;
1602
1614
  color: var(--mobile-label-secondary, var(--color-text-secondary));
1603
1615
  font-size: var(--toolbar-subtitle-font-size);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plexui/styles",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "description": "Framework-agnostic CSS for Plex UI: design tokens, globals and component styles",
5
5
  "type": "module",
6
6
  "license": "MIT",