Skip to content

Commit cc5baf2

Browse files
authored
chore: pulled latest carbon version for v10 (#4027)
1 parent 3e732c4 commit cc5baf2

3 files changed

Lines changed: 25 additions & 5 deletions

File tree

packages/react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@
183183
"@uiw/codemirror-themes": "4.23.3",
184184
"@uiw/react-codemirror": "4.23.3",
185185
"carbon-components": "10.59.2",
186-
"carbon-components-react": "7.60.4",
186+
"carbon-components-react": "7.60.5",
187187
"carbon-icons": "^7.0.7",
188188
"classnames": "^2.5.1",
189189
"core-js": "3.26.1",

packages/react/src/components/NumberInput/NumberInput.story.jsx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import React from 'react';
99
import { action } from '@storybook/addon-actions';
1010
import { withKnobs, boolean, number, text, object, select } from '@storybook/addon-knobs';
11+
import { validateNumberSeparators } from 'carbon-components-react/lib/components/NumberInputV2/NumberInputV2';
1112

1213
import { NumberInput, NumberInputSkeleton, NumberInputV2 } from '.';
1314

@@ -82,6 +83,25 @@ export const NumberInputTypeText = () => {
8283

8384
NumberInputTypeText.storyName = 'type text';
8485

86+
export const NumberInputcustomValidation = () => {
87+
const { numberInputArrowTranslationIds } = props();
88+
return (
89+
<NumberInputV2
90+
locale="en-US"
91+
type="text"
92+
max={10000000}
93+
min={-10000000}
94+
validate={validateNumberSeparators}
95+
defaultValue={50}
96+
invalidText={text('Form validation UI content (invalidText)', 'Number is not valid')}
97+
allowEmpty
98+
translateWithId={(id) => numberInputArrowTranslationIds[id]}
99+
/>
100+
);
101+
};
102+
103+
NumberInputcustomValidation.storyName = 'with validate method';
104+
85105
export const Skeleton = () => (
86106
<div
87107
aria-label="loading number input"

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10384,10 +10384,10 @@ carbon-components-angular@4.56.2:
1038410384
flatpickr "4.6.1"
1038510385
tslib "^1.9.0"
1038610386

10387-
carbon-components-react@7.60.4:
10388-
version "7.60.4"
10389-
resolved "https://registry.yarnpkg.com/carbon-components-react/-/carbon-components-react-7.60.4.tgz#55ca107f187813d6dc141546731896f864b3fd8b"
10390-
integrity sha512-F72VyUt11U524AVq5RzOZtyMYzy7VWAwRCs6+X/B36uaCTDWyrSq41x9sgvnADXxsjyOdUpgj4n7bKGfiDE31A==
10387+
carbon-components-react@7.60.5:
10388+
version "7.60.5"
10389+
resolved "https://registry.yarnpkg.com/carbon-components-react/-/carbon-components-react-7.60.5.tgz#c0799629422e5b506c09fdb4f3dc660c9890d5c4"
10390+
integrity sha512-oIuWkGSme4oNxYPhrSxopiaM0Fv2G9g/ZPSyOmFofFy8wpRUtBmCmKpyrDF6L5DsGGpleAsN7o+V8xqP1vegrw==
1039110391
dependencies:
1039210392
"@babel/runtime" "^7.16.7"
1039310393
"@carbon/feature-flags" "^0.7.3"

0 commit comments

Comments
 (0)