Skip to content

Commit 781e9d0

Browse files
authored
feat(numberinput): add type='text' and locale-based formatting (#19471)
* fix(numberinput): add type of text, updated styles, example localization * wip * wip * feat(numberinput): add type='text' and locale-based formatting * chore: remove test stories * chore: yarn dedupe * docs(numberinput): update type prop comments * fix(numberinput): make inputMode optional * docs(numberinput): clean up stories * fix(numberinput): revert min/max on story for avt tests * chore: min/max arg types for default story * fix(fluidnumberinput): remove duplicate style selector, correct invalid selector * feat(utilities): add documentLang utilities to track html lang updates
1 parent 3449595 commit 781e9d0

33 files changed

+2159
-71
lines changed
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

e2e/components/NumberInput/NumberInput-test.avt.e2e.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,19 @@ test.describe('@avt NumberInput', () => {
3333
await expect(page).toHaveNoACViolations('components-numberinput--skeleton');
3434
});
3535

36+
test('@avt-advanced-states type of text', async ({ page }) => {
37+
await visitStory(page, {
38+
component: 'NumberInput',
39+
id: 'components-numberinput--with-type-of-text',
40+
globals: {
41+
theme: 'white',
42+
},
43+
});
44+
await expect(page).toHaveNoACViolations(
45+
'components-numberinput--with-type-of-text'
46+
);
47+
});
48+
3649
test('@avt-keyboard-nav', async ({ page }) => {
3750
await visitStory(page, {
3851
component: 'NumberInput',

e2e/components/NumberInput/NumberInput-test.e2e.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ test.describe('NumberInput', () => {
2121
theme,
2222
});
2323
});
24+
test('with type="text" @vrt', async ({ page }) => {
25+
await snapshotStory(page, {
26+
component: 'NumberInput',
27+
id: 'components-numberinput--with-type-of-text',
28+
theme,
29+
});
30+
});
2431
});
2532
});
2633
});

packages/react/.storybook/preview.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,12 @@ const globalTypes = {
7474
{
7575
right: '🇺🇸',
7676
title: 'English',
77-
value: 'en',
77+
value: 'en-US',
78+
},
79+
{
80+
right: '🇩🇪',
81+
title: 'German',
82+
value: 'de-DE',
7883
},
7984
{
8085
right: '🇵🇸',

0 commit comments

Comments
 (0)