Skip to content

Commit 6a61bef

Browse files
committed
Merge branch 'main' into v11-major
2 parents 4da3517 + ff70ab3 commit 6a61bef

File tree

5 files changed

+25
-8
lines changed

5 files changed

+25
-8
lines changed

.changeset/gold-deers-tan.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@shopify/polaris': minor
3+
---
4+
5+
Made hiding the stepper arrows for inputs of type "number" and revealing them on hover and focus the default `TextField` behaviour to mimic the default browser experience

.changeset/grumpy-donuts-vanish.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@shopify/polaris': patch
3+
---
4+
5+
Fix border radius on active/pressed navigation items

polaris-react/src/components/Navigation/Navigation.scss

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,14 @@ $disabled-fade: 0.6;
113113
@include nav-item-attributes;
114114
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
115115
position: relative;
116+
117+
border-radius: var(--p-border-radius-1);
118+
119+
&:is(:hover, :focus-visible) {
120+
background: var(--p-background-hovered);
121+
color: var(--p-text);
122+
text-decoration: none;
123+
}
116124
}
117125

118126
.Item-selected {
@@ -236,13 +244,6 @@ $disabled-fade: 0.6;
236244
flex-wrap: nowrap;
237245
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
238246
width: 100%;
239-
border-radius: var(--p-border-radius-1);
240-
241-
&:hover {
242-
background: var(--p-background-hovered);
243-
color: var(--p-text);
244-
text-decoration: none;
245-
}
246247

247248
&.ItemInnerDisabled {
248249
pointer-events: none;

polaris-react/src/components/TextField/TextField.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,11 +300,17 @@ $spinner-icon-size: 12px;
300300
color: var(--p-icon);
301301
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
302302
display: flex;
303+
visibility: hidden;
303304
align-self: stretch;
304305
flex-direction: column;
305306
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
306307
width: 22px;
307308
cursor: pointer;
309+
310+
.focus &,
311+
.TextField:hover & {
312+
visibility: visible;
313+
}
308314
}
309315

310316
.SpinnerIcon {

polaris.shopify.com/content/components/selection-and-input/text-field.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ Use the placeholder to provide information that’s required to use the text fie
214214
Text fields have standard keyboard support.
215215

216216
- Merchants who rely on the keyboard expect to move focus to each text field using the <kbd>tab</kbd> key (or <kbd>shift</kbd> + <kbd>tab</kbd> when tabbing backwards)
217-
- If the `type` is set to `number`, then merchants can use the up and down arrow keys to adjust the value typed into the field
217+
- If the `type` is set to `number`, then merchants can use the up and down arrow keys to adjust the value typed into the field when hovering over or focusing the field to make the arrows appear
218218
- Using the `disabled` prop will prevent the text field from receive keyboard focus or inputs
219219
- The `readOnly` prop allows focus on the text field but prevents input or editing
220220
- The `inputMode` prop can be used to bring up a relevant keyboard for merchants on mobile; it’s passed down to the input as an [`inputmode` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode)

0 commit comments

Comments
 (0)