File tree Expand file tree Collapse file tree 7 files changed +22
-7
lines changed
lumx-core/src/scss/components
lumx-react/src/stories/generated/TextField
site-demo/content/product/components/text-field Expand file tree Collapse file tree 7 files changed +22
-7
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
20
20
### Changed
21
21
22
22
- ` Tooltip ` : increment z-index making them appear above popovers.
23
+ - ` TextField ` : display browser native buttons when used with type="number", add "number" use case documentation.
23
24
24
25
## [ 3.9.1] [ ] - 2024-09-17
25
26
Original file line number Diff line number Diff line change 16
16
17
17
& __year {
18
18
input [type = " number" ] {
19
- width : 4 ch ;
19
+ width : 6 ch ;
20
20
}
21
21
}
22
22
Original file line number Diff line number Diff line change 89
89
border : none ;
90
90
outline : none ;
91
91
92
- & [type = " number" ] {
93
- appearance : textfield;
94
- }
92
+ // Always show the up/down arrow, not just on hover or focus
93
+ & [type = number ]::-webkit-inner-spin-button ,
94
+ & [type = number ]::-webkit-outer-spin-button {
95
+ opacity : 1 ;
95
96
96
- & [type = " number" ]::-webkit-inner-spin-button ,
97
- & [type = " number" ]::-webkit-outer-spin-button {
98
- appearance : none ;
99
97
}
100
98
101
99
@if $theme == lumx-base-const (" theme" , " LIGHT" ) {
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ export { App as Disabled } from './disabled';
10
10
export { App as Helper } from './helper' ;
11
11
export { App as Icon } from './icon' ;
12
12
export { App as Invalid } from './invalid' ;
13
+ export { App as Number } from './number' ;
13
14
export { App as Placeholder } from './placeholder' ;
14
15
export { App as Required } from './required' ;
15
16
export { App as TextAreaInvalid } from './text-area-invalid' ;
Original file line number Diff line number Diff line change
1
+ . . / . . / . . / . . / . . / site - demo / content / product / components / text - field / react / number . tsx
Original file line number Diff line number Diff line change @@ -86,6 +86,12 @@ Use Text areas when users are expected to enter more than one line of text.
86
86
87
87
<DemoBlock demo = " text-area-invalid" withThemeSwitcher />
88
88
89
+ ## Number
90
+
91
+ Use number input when users are expected to enter numeric values.
92
+
93
+ <DemoBlock demo = " number" withThemeSwitcher />
94
+
89
95
### Properties
90
96
91
97
<PropTable component = " TextField" />
Original file line number Diff line number Diff line change
1
+ import { TextField } from '@lumx/react' ;
2
+ import React , { useState } from 'react' ;
3
+
4
+ export const App = ( { theme } : any ) => {
5
+ const [ value , setValue ] = useState ( '' ) ;
6
+
7
+ return < TextField label = "Number" value = { value } type = "number" onChange = { setValue } theme = { theme } /> ;
8
+ } ;
You can’t perform that action at this time.
0 commit comments