@plexui/styles 0.1.38 → 0.1.40

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.
@@ -282,7 +282,8 @@
282
282
  display: none;
283
283
  }
284
284
 
285
- .Alert .Actions > :where(button, a, [role="link"]) {
285
+ /* `mobileActions="own"`: the buttons keep the size they are given, for an alert inside a block of its own buttons */
286
+ .Alert:where(:not([data-mobile-actions="own"])) .Actions > :where(button, a, [role="link"]) {
286
287
  --button-size: var(--button-size-xl, 50px);
287
288
  --button-font-size: var(--button-font-size-xl, 17px);
288
289
  --button-font-weight: var(--font-weight-semibold);
@@ -384,7 +385,8 @@
384
385
  display: none;
385
386
  }
386
387
 
387
- :where([data-plex-layout="phone"]) .Alert .Actions > :where(button, a, [role="link"]) {
388
+ /* `mobileActions="own"`: the buttons keep the size they are given, for an alert inside a block of its own buttons */
389
+ :where([data-plex-layout="phone"]) .Alert:where(:not([data-mobile-actions="own"])) .Actions > :where(button, a, [role="link"]) {
388
390
  --button-size: var(--button-size-xl, 50px);
389
391
  --button-font-size: var(--button-font-size-xl, 17px);
390
392
  --button-font-weight: var(--font-weight-semibold);
@@ -927,7 +927,9 @@
927
927
  --button-outline-context-background: var(--mobile-neutral-outline-background, var(--button-outline-background));
928
928
  }
929
929
 
930
- .Button[data-mobile-material="glass"]:where(:not([data-disabled])):where([data-color="primary"], [data-color="secondary"]):where([data-variant="soft"], [data-variant="ghost"]) {
930
+ /* A disabled glass button keeps its glass and dims its symbol or label (below), as a bar button does (iOS 26 kit
931
+ _Button - Symbol, Text and Back, State=Disabled; owner 09.11). Its hover and press stay off (Button states). */
932
+ .Button[data-mobile-material="glass"]:where([data-color="primary"], [data-color="secondary"]):where([data-variant="soft"], [data-variant="ghost"]) {
931
933
  --button-mobile-material-background: var(--mobile-glass-background);
932
934
  --button-mobile-material-hover: var(--mobile-glass-background-hover);
933
935
  --button-mobile-material-active: var(--mobile-glass-background-active);
@@ -958,7 +960,7 @@
958
960
  --button-text-color: var(--mobile-label-tertiary, var(--color-text-disabled));
959
961
  }
960
962
 
961
- .Button:is([data-mobile-material="flat"], [data-disabled]) {
963
+ .Button:is([data-mobile-material="flat"], [data-disabled]:where(:not([data-mobile-material="glass"]))) {
962
964
  --button-mobile-material-background: initial;
963
965
  --button-mobile-material-hover: initial;
964
966
  --button-mobile-material-active: initial;
@@ -968,12 +970,27 @@
968
970
  --button-mobile-material-opacity: initial;
969
971
  --button-mobile-material-scale: initial;
970
972
  }
973
+
974
+ /* A uniform button draws its 28 or 34px circle and takes touches 44px around its center, as the close button
975
+ of a phone Alert does (owner 09.11): the minimum target of Apple's guidelines. A larger one keeps its size. In a
976
+ ButtonGroup or beside the text of a field it keeps its own box, so it never takes the taps of a neighbor. */
977
+ .Button[data-uniform]:not(:is([data-slot="button-group"], [data-slot="input-group"], [data-slot="input"], [data-slot="textarea"]) *) > .ButtonInner::before {
978
+ position: absolute;
979
+ top: 50%;
980
+ left: 50%;
981
+ width: max(100%, 44px);
982
+ height: max(100%, 44px);
983
+ transform: translate(-50%, -50%);
984
+ content: "";
985
+ }
971
986
  }
972
987
  :where([data-plex-layout="phone"]) .Button[data-variant="outline"]:where([data-color="primary"], [data-color="secondary"]) {
973
988
  --button-outline-context-background: var(--mobile-neutral-outline-background, var(--button-outline-background));
974
989
  }
975
990
 
976
- :where([data-plex-layout="phone"]) .Button[data-mobile-material="glass"]:where(:not([data-disabled])):where([data-color="primary"], [data-color="secondary"]):where([data-variant="soft"], [data-variant="ghost"]) {
991
+ /* A disabled glass button keeps its glass and dims its symbol or label (below), as a bar button does (iOS 26 kit
992
+ _Button - Symbol, Text and Back, State=Disabled; owner 09.11). Its hover and press stay off (Button states). */
993
+ :where([data-plex-layout="phone"]) .Button[data-mobile-material="glass"]:where([data-color="primary"], [data-color="secondary"]):where([data-variant="soft"], [data-variant="ghost"]) {
977
994
  --button-mobile-material-background: var(--mobile-glass-background);
978
995
  --button-mobile-material-hover: var(--mobile-glass-background-hover);
979
996
  --button-mobile-material-active: var(--mobile-glass-background-active);
@@ -1004,7 +1021,7 @@
1004
1021
  --button-text-color: var(--mobile-label-tertiary, var(--color-text-disabled));
1005
1022
  }
1006
1023
 
1007
- :where([data-plex-layout="phone"]) .Button:is([data-mobile-material="flat"], [data-disabled]) {
1024
+ :where([data-plex-layout="phone"]) .Button:is([data-mobile-material="flat"], [data-disabled]:where(:not([data-mobile-material="glass"]))) {
1008
1025
  --button-mobile-material-background: initial;
1009
1026
  --button-mobile-material-hover: initial;
1010
1027
  --button-mobile-material-active: initial;
@@ -1014,4 +1031,17 @@
1014
1031
  --button-mobile-material-opacity: initial;
1015
1032
  --button-mobile-material-scale: initial;
1016
1033
  }
1034
+
1035
+ /* A uniform button draws its 28 or 34px circle and takes touches 44px around its center, as the close button
1036
+ of a phone Alert does (owner 09.11): the minimum target of Apple's guidelines. A larger one keeps its size. In a
1037
+ ButtonGroup or beside the text of a field it keeps its own box, so it never takes the taps of a neighbor. */
1038
+ :where([data-plex-layout="phone"]) .Button[data-uniform]:not(:is([data-slot="button-group"], [data-slot="input-group"], [data-slot="input"], [data-slot="textarea"]) *) > .ButtonInner::before {
1039
+ position: absolute;
1040
+ top: 50%;
1041
+ left: 50%;
1042
+ width: max(100%, 44px);
1043
+ height: max(100%, 44px);
1044
+ transform: translate(-50%, -50%);
1045
+ content: "";
1046
+ }
1017
1047
  }
@@ -185,6 +185,17 @@
185
185
  grid-template-columns: minmax(0, 1fr);
186
186
  }
187
187
 
188
+ /* Leading controls and nothing trailing: two columns. An empty trailing column and its gap took 12px from
189
+ the search field or the title. A large title keeps its own two rows. */
190
+ .Toolbar:not([data-title-style="large"]):has(> .Leading):not(:has(> .Trailing)):is([data-title-align="start"], [data-title-style="compact-large"], [data-title-style="compact-medium"], :has(> .Content[data-fill])) {
191
+ grid-template-areas: "leading heading";
192
+ grid-template-columns: max-content minmax(0, 1fr);
193
+ }
194
+
195
+ .Toolbar:not([data-title-style="large"]):has(> .Leading):not(:has(> .Trailing)):has(> .Content[data-fill]) {
196
+ grid-template-areas: "leading content";
197
+ }
198
+
188
199
  /* Large title: the controls stay in their own row and the title sits below it. */
189
200
  .Toolbar[data-title-style="large"] {
190
201
  --toolbar-edge-blur: var(--toolbar-edge-blur-large);
@@ -792,6 +803,17 @@
792
803
  grid-template-columns: minmax(0, 1fr);
793
804
  }
794
805
 
806
+ /* Leading controls and nothing trailing: two columns. An empty trailing column and its gap took 12px from
807
+ the search field or the title. A large title keeps its own two rows. */
808
+ :where([data-plex-layout="phone"]) .Toolbar:not([data-title-style="large"]):has(> .Leading):not(:has(> .Trailing)):is([data-title-align="start"], [data-title-style="compact-large"], [data-title-style="compact-medium"], :has(> .Content[data-fill])) {
809
+ grid-template-areas: "leading heading";
810
+ grid-template-columns: max-content minmax(0, 1fr);
811
+ }
812
+
813
+ :where([data-plex-layout="phone"]) .Toolbar:not([data-title-style="large"]):has(> .Leading):not(:has(> .Trailing)):has(> .Content[data-fill]) {
814
+ grid-template-areas: "leading content";
815
+ }
816
+
795
817
  /* Large title: the controls stay in their own row and the title sits below it. */
796
818
  :where([data-plex-layout="phone"]) .Toolbar[data-title-style="large"] {
797
819
  --toolbar-edge-blur: var(--toolbar-edge-blur-large);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plexui/styles",
3
- "version": "0.1.38",
3
+ "version": "0.1.40",
4
4
  "description": "Framework-agnostic CSS for Plex UI: design tokens, globals and component styles",
5
5
  "type": "module",
6
6
  "license": "MIT",