Skip to content

Commit 5d313e7

Browse files
Aziz RamosAziz Ramos
authored andcommitted
feat: update popover utility and extend to other components
1 parent fbc95ca commit 5d313e7

File tree

7 files changed

+13
-6
lines changed

7 files changed

+13
-6
lines changed

.changeset/yellow-ghosts-allow.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@spectrum-css/popover": minor
3+
"@spectrum-css/picker": minor
4+
---
5+
6+
Adding max block size utility in popover so that other components such as picker can use it

components/picker/index.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
@import "./themes/express.css";
1515
@import "@spectrum-css/commons/basebutton.css";
16-
@import "../components/popover/index.css";
1716

1817
.spectrum-Picker {
1918
/* font */
@@ -496,6 +495,6 @@
496495
/* Fixed menu height */
497496
.spectrum-Picker--menu-height-fixed {
498497
& + .spectrum-Popover.is-open {
499-
--spectrum-popover-max-block-size: var(--mod-picker-popover-max-block-size, 200px);
498+
--mod-popover-max-block-size: 200px;
500499
}
501500
}

components/picker/metadata/metadata.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@
125125
"--mod-picker-icon-color-key-focus",
126126
"--mod-picker-inline-size",
127127
"--mod-picker-line-height",
128-
"--mod-picker-menu-height-fixed",
129128
"--mod-picker-placeholder-font-style",
130129
"--mod-picker-placeholder-font-weight",
131130
"--mod-picker-spacing-bottom-to-text",
@@ -322,7 +321,8 @@
322321
"passthroughs": [
323322
"--mod-button-animation-duration",
324323
"--mod-button-font-family",
325-
"--mod-button-line-height"
324+
"--mod-button-line-height",
325+
"--mod-popover-max-block-size"
326326
],
327327
"high-contrast": [
328328
"--highcontrast-picker-background-color",

components/picker/metadata/mods.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
| `--mod-picker-icon-color-key-focus` |
4848
| `--mod-picker-inline-size` |
4949
| `--mod-picker-line-height` |
50-
| `--mod-picker-menu-height-fixed` |
5150
| `--mod-picker-placeholder-font-style` |
5251
| `--mod-picker-placeholder-font-weight` |
5352
| `--mod-picker-spacing-bottom-to-text` |

components/popover/index.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
/* Max menu block size */
4747
--spectrum-popover-max-block-size: 300px;
4848

49-
max-block-size: var(--spectrum-popover-max-block-size);
49+
max-block-size: var(--mod-popover-max-block-size, --spectrum-popover-max-block-size);
5050
}
5151

5252
/* windows high contrast mode */

components/popover/metadata/metadata.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@
107107
"--mod-popover-content-area-spacing-vertical",
108108
"--mod-popover-corner-radius",
109109
"--mod-popover-filter",
110+
"--mod-popover-max-block-size",
110111
"--mod-popover-pointer-edge-spacing",
111112
"--mod-popover-pointer-height",
112113
"--mod-popover-pointer-width",
@@ -123,6 +124,7 @@
123124
"--spectrum-popover-content-area-spacing-vertical",
124125
"--spectrum-popover-corner-radius",
125126
"--spectrum-popover-filter",
127+
"--spectrum-popover-max-block-size",
126128
"--spectrum-popover-pointer-edge-offset",
127129
"--spectrum-popover-pointer-edge-spacing",
128130
"--spectrum-popover-pointer-height",

components/popover/metadata/mods.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
| `--mod-popover-content-area-spacing-vertical` |
1010
| `--mod-popover-corner-radius` |
1111
| `--mod-popover-filter` |
12+
| `--mod-popover-max-block-size` |
1213
| `--mod-popover-pointer-edge-spacing` |
1314
| `--mod-popover-pointer-height` |
1415
| `--mod-popover-pointer-width` |

0 commit comments

Comments
 (0)