shinkansen-cogs 1.6.93 → 1.6.95
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/babel.config.cjs +32 -32
- package/package.json +47 -47
- package/src/{components/field/password → cogs/checkbox/description}/index.cjs +1 -1
- package/src/{components/description/text → cogs/checkbox/error-message}/index.cjs +1 -1
- package/src/{components/title/text → cogs/checkbox/field}/index.cjs +1 -1
- package/src/{components/field/checkbox → cogs/checkbox/field}/index.jsx +4 -2
- package/src/cogs/checkbox/index.cjs +1 -1
- package/src/cogs/checkbox/index.jsx +8 -9
- package/src/{components/field/text → cogs/checkbox/title}/index.cjs +1 -1
- package/src/{components/field/email → cogs/email/description}/index.cjs +1 -1
- package/src/cogs/email/error-message/index.cjs +17 -0
- package/src/{components/field/radio → cogs/email/field}/index.cjs +1 -1
- package/src/{components/field/email → cogs/email/field}/index.jsx +4 -2
- package/src/cogs/email/index.jsx +8 -9
- package/src/{components/title/email → cogs/email/title}/index.cjs +1 -1
- package/src/cogs/index.jsx +7 -17
- package/src/{components/field/number → cogs/number/description}/index.cjs +1 -1
- package/src/{components/field/checkbox → cogs/number/error-message}/index.cjs +1 -1
- package/src/cogs/number/field/index.cjs +17 -0
- package/src/{components/field/number → cogs/number/field}/index.jsx +4 -2
- package/src/cogs/number/index.jsx +8 -9
- package/src/cogs/number/title/index.cjs +17 -0
- package/src/cogs/password/description/index.cjs +17 -0
- package/src/cogs/password/error-message/index.cjs +17 -0
- package/src/cogs/password/field/index.cjs +17 -0
- package/src/{components/field/password → cogs/password/field}/index.jsx +4 -2
- package/src/cogs/password/index.jsx +8 -9
- package/src/cogs/password/title/index.cjs +17 -0
- package/src/cogs/radio/description/index.cjs +17 -0
- package/src/cogs/radio/error-message/index.cjs +17 -0
- package/src/cogs/radio/field/index.cjs +17 -0
- package/src/{components/field/radio → cogs/radio/field}/index.jsx +4 -2
- package/src/cogs/radio/index.jsx +8 -9
- package/src/cogs/radio/title/index.cjs +17 -0
- package/src/{components/field/select → cogs/select/description}/index.cjs +1 -1
- package/src/cogs/select/error-message/index.cjs +17 -0
- package/src/cogs/select/field/index.cjs +17 -0
- package/src/{components/field/select → cogs/select/field}/index.jsx +11 -2
- package/src/cogs/select/index.jsx +22 -9
- package/src/cogs/select/title/index.cjs +17 -0
- package/src/cogs/text/description/index.cjs +17 -0
- package/src/cogs/text/error-message/index.cjs +17 -0
- package/src/cogs/text/field/index.cjs +17 -0
- package/src/{components/field/text → cogs/text/field}/index.jsx +4 -2
- package/src/cogs/text/index.jsx +8 -9
- package/src/cogs/text/title/index.cjs +17 -0
- package/src/cogs/textarea/description/index.cjs +17 -0
- package/src/cogs/textarea/error-message/index.cjs +17 -0
- package/src/cogs/textarea/field/index.cjs +17 -0
- package/src/{components/field/textarea → cogs/textarea/field}/index.jsx +4 -2
- package/src/cogs/textarea/index.jsx +8 -9
- package/src/cogs/textarea/title/index.cjs +17 -0
- package/src/components/description/index.jsx +1 -25
- package/src/components/field/index.jsx +7 -26
- package/src/components/title/index.jsx +1 -25
- package/src/index.d.cts +32 -32
- package/src/components/description/checkbox/index.cjs +0 -17
- package/src/components/description/email/index.cjs +0 -17
- package/src/components/description/number/index.cjs +0 -17
- package/src/components/description/password/index.cjs +0 -17
- package/src/components/description/radio/index.cjs +0 -17
- package/src/components/description/select/index.cjs +0 -17
- package/src/components/description/textarea/index.cjs +0 -17
- package/src/components/error-message/checkbox/index.cjs +0 -17
- package/src/components/error-message/email/index.cjs +0 -17
- package/src/components/error-message/number/index.cjs +0 -17
- package/src/components/error-message/password/index.cjs +0 -17
- package/src/components/error-message/radio/index.cjs +0 -17
- package/src/components/error-message/select/index.cjs +0 -17
- package/src/components/error-message/text/index.cjs +0 -17
- package/src/components/error-message/textarea/index.cjs +0 -17
- package/src/components/field/textarea/index.cjs +0 -17
- package/src/components/title/checkbox/index.cjs +0 -17
- package/src/components/title/number/index.cjs +0 -17
- package/src/components/title/password/index.cjs +0 -17
- package/src/components/title/radio/index.cjs +0 -17
- package/src/components/title/select/index.cjs +0 -17
- package/src/components/title/textarea/index.cjs +0 -17
- /package/src/{components/description/checkbox → cogs/checkbox/description}/index.jsx +0 -0
- /package/src/{components/error-message/checkbox → cogs/checkbox/error-message}/index.jsx +0 -0
- /package/src/{components/title/checkbox → cogs/checkbox/title}/index.jsx +0 -0
- /package/src/{components/description/email → cogs/email/description}/index.jsx +0 -0
- /package/src/{components/error-message/email → cogs/email/error-message}/index.jsx +0 -0
- /package/src/{components/title/email → cogs/email/title}/index.jsx +0 -0
- /package/src/{components/description/number → cogs/number/description}/index.jsx +0 -0
- /package/src/{components/error-message/number → cogs/number/error-message}/index.jsx +0 -0
- /package/src/{components/title/number → cogs/number/title}/index.jsx +0 -0
- /package/src/{components/description/password → cogs/password/description}/index.jsx +0 -0
- /package/src/{components/error-message/password → cogs/password/error-message}/index.jsx +0 -0
- /package/src/{components/title/password → cogs/password/title}/index.jsx +0 -0
- /package/src/{components/description/radio → cogs/radio/description}/index.jsx +0 -0
- /package/src/{components/error-message/radio → cogs/radio/error-message}/index.jsx +0 -0
- /package/src/{components/title/radio → cogs/radio/title}/index.jsx +0 -0
- /package/src/{components/description/select → cogs/select/description}/index.jsx +0 -0
- /package/src/{components/error-message/select → cogs/select/error-message}/index.jsx +0 -0
- /package/src/{components/title/select → cogs/select/title}/index.jsx +0 -0
- /package/src/{components/description/text → cogs/text/description}/index.jsx +0 -0
- /package/src/{components/error-message/text → cogs/text/error-message}/index.jsx +0 -0
- /package/src/{components/title/text → cogs/text/title}/index.jsx +0 -0
- /package/src/{components/description/textarea → cogs/textarea/description}/index.jsx +0 -0
- /package/src/{components/error-message/textarea → cogs/textarea/error-message}/index.jsx +0 -0
- /package/src/{components/title/textarea → cogs/textarea/title}/index.jsx +0 -0
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import React from 'react'
|
|
5
5
|
import PropTypes from 'prop-types'
|
|
6
6
|
import classnames from 'classnames'
|
|
7
|
+
|
|
7
8
|
import { ValueField } from 'shinkansen-cogs/components/field'
|
|
8
9
|
|
|
9
10
|
export default class NumberField extends ValueField {
|
|
@@ -22,7 +23,8 @@ export default class NumberField extends ValueField {
|
|
|
22
23
|
readOnly,
|
|
23
24
|
tabIndex,
|
|
24
25
|
accessKey,
|
|
25
|
-
placeholder
|
|
26
|
+
placeholder,
|
|
27
|
+
fieldRef
|
|
26
28
|
} = this.props
|
|
27
29
|
|
|
28
30
|
const className = this.getClassName()
|
|
@@ -42,7 +44,7 @@ export default class NumberField extends ValueField {
|
|
|
42
44
|
onChange={this.handleChange}
|
|
43
45
|
className={className}
|
|
44
46
|
type='number'
|
|
45
|
-
ref={
|
|
47
|
+
ref={fieldRef}
|
|
46
48
|
/>
|
|
47
49
|
)
|
|
48
50
|
}
|
|
@@ -6,10 +6,11 @@ import PropTypes from 'prop-types'
|
|
|
6
6
|
import classnames from 'classnames'
|
|
7
7
|
|
|
8
8
|
import { ValueCog } from 'shinkansen-cogs/cogs'
|
|
9
|
-
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
9
|
+
|
|
10
|
+
import Title from './title/index.jsx'
|
|
11
|
+
import Description from './description/index.jsx'
|
|
12
|
+
import ErrorMessage from './error-message/index.jsx'
|
|
13
|
+
import Field from './field/index.jsx'
|
|
13
14
|
|
|
14
15
|
export default class NumberCog extends ValueCog {
|
|
15
16
|
getClassName () {
|
|
@@ -42,7 +43,6 @@ export default class NumberCog extends ValueCog {
|
|
|
42
43
|
required={required}
|
|
43
44
|
disabled={disabled}
|
|
44
45
|
readOnly={readOnly}
|
|
45
|
-
ref={this.setTitle}
|
|
46
46
|
/>
|
|
47
47
|
)
|
|
48
48
|
}
|
|
@@ -55,7 +55,6 @@ export default class NumberCog extends ValueCog {
|
|
|
55
55
|
return (
|
|
56
56
|
<Description
|
|
57
57
|
description={description}
|
|
58
|
-
ref={this.setDescription}
|
|
59
58
|
/>
|
|
60
59
|
)
|
|
61
60
|
}
|
|
@@ -68,7 +67,6 @@ export default class NumberCog extends ValueCog {
|
|
|
68
67
|
return (
|
|
69
68
|
<ErrorMessage
|
|
70
69
|
errorMessage={errorMessage}
|
|
71
|
-
ref={this.setErrorMessage}
|
|
72
70
|
/>
|
|
73
71
|
)
|
|
74
72
|
}
|
|
@@ -85,7 +83,8 @@ export default class NumberCog extends ValueCog {
|
|
|
85
83
|
readOnly,
|
|
86
84
|
tabIndex,
|
|
87
85
|
accessKey,
|
|
88
|
-
placeholder
|
|
86
|
+
placeholder,
|
|
87
|
+
fieldRef
|
|
89
88
|
} = this.props
|
|
90
89
|
|
|
91
90
|
return (
|
|
@@ -101,7 +100,7 @@ export default class NumberCog extends ValueCog {
|
|
|
101
100
|
accessKey={accessKey}
|
|
102
101
|
placeholder={placeholder}
|
|
103
102
|
onChange={this.handleChange}
|
|
104
|
-
|
|
103
|
+
fieldRef={fieldRef}
|
|
105
104
|
/>
|
|
106
105
|
)
|
|
107
106
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
require('@babel/register')({
|
|
2
|
+
ignore: [
|
|
3
|
+
/node_modules\/(?!shinkansen|@modernpoacher)/
|
|
4
|
+
]
|
|
5
|
+
})
|
|
6
|
+
|
|
7
|
+
const debug = require('debug')
|
|
8
|
+
|
|
9
|
+
const log = debug('shinkansen-cogs/cogs/number/title')
|
|
10
|
+
|
|
11
|
+
log('`shinkansen` is awake')
|
|
12
|
+
|
|
13
|
+
const {
|
|
14
|
+
default: component
|
|
15
|
+
} = require('./index.jsx')
|
|
16
|
+
|
|
17
|
+
module.exports = component
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
require('@babel/register')({
|
|
2
|
+
ignore: [
|
|
3
|
+
/node_modules\/(?!shinkansen|@modernpoacher)/
|
|
4
|
+
]
|
|
5
|
+
})
|
|
6
|
+
|
|
7
|
+
const debug = require('debug')
|
|
8
|
+
|
|
9
|
+
const log = debug('shinkansen-cogs/cogs/password/description')
|
|
10
|
+
|
|
11
|
+
log('`shinkansen` is awake')
|
|
12
|
+
|
|
13
|
+
const {
|
|
14
|
+
default: component
|
|
15
|
+
} = require('./index.jsx')
|
|
16
|
+
|
|
17
|
+
module.exports = component
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
require('@babel/register')({
|
|
2
|
+
ignore: [
|
|
3
|
+
/node_modules\/(?!shinkansen|@modernpoacher)/
|
|
4
|
+
]
|
|
5
|
+
})
|
|
6
|
+
|
|
7
|
+
const debug = require('debug')
|
|
8
|
+
|
|
9
|
+
const log = debug('shinkansen-cogs/cogs/password/error-message')
|
|
10
|
+
|
|
11
|
+
log('`shinkansen` is awake')
|
|
12
|
+
|
|
13
|
+
const {
|
|
14
|
+
default: component
|
|
15
|
+
} = require('./index.jsx')
|
|
16
|
+
|
|
17
|
+
module.exports = component
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
require('@babel/register')({
|
|
2
|
+
ignore: [
|
|
3
|
+
/node_modules\/(?!shinkansen|@modernpoacher)/
|
|
4
|
+
]
|
|
5
|
+
})
|
|
6
|
+
|
|
7
|
+
const debug = require('debug')
|
|
8
|
+
|
|
9
|
+
const log = debug('shinkansen-cogs/cogs/password/field')
|
|
10
|
+
|
|
11
|
+
log('`shinkansen` is awake')
|
|
12
|
+
|
|
13
|
+
const {
|
|
14
|
+
default: component
|
|
15
|
+
} = require('./index.jsx')
|
|
16
|
+
|
|
17
|
+
module.exports = component
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import React from 'react'
|
|
5
5
|
import classnames from 'classnames'
|
|
6
|
+
|
|
6
7
|
import { ValueField } from 'shinkansen-cogs/components/field'
|
|
7
8
|
|
|
8
9
|
export default class PasswordField extends ValueField {
|
|
@@ -21,7 +22,8 @@ export default class PasswordField extends ValueField {
|
|
|
21
22
|
readOnly,
|
|
22
23
|
tabIndex,
|
|
23
24
|
accessKey,
|
|
24
|
-
placeholder
|
|
25
|
+
placeholder,
|
|
26
|
+
fieldRef
|
|
25
27
|
} = this.props
|
|
26
28
|
|
|
27
29
|
const className = this.getClassName()
|
|
@@ -41,7 +43,7 @@ export default class PasswordField extends ValueField {
|
|
|
41
43
|
onChange={this.handleChange}
|
|
42
44
|
className={className}
|
|
43
45
|
type='password'
|
|
44
|
-
ref={
|
|
46
|
+
ref={fieldRef}
|
|
45
47
|
/>
|
|
46
48
|
)
|
|
47
49
|
}
|
|
@@ -5,10 +5,11 @@ import React from 'react'
|
|
|
5
5
|
import classnames from 'classnames'
|
|
6
6
|
|
|
7
7
|
import { ValueCog } from 'shinkansen-cogs/cogs'
|
|
8
|
-
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
8
|
+
|
|
9
|
+
import Title from './title/index.jsx'
|
|
10
|
+
import Description from './description/index.jsx'
|
|
11
|
+
import ErrorMessage from './error-message/index.jsx'
|
|
12
|
+
import Field from './field/index.jsx'
|
|
12
13
|
|
|
13
14
|
export default class PasswordCog extends ValueCog {
|
|
14
15
|
getClassName () {
|
|
@@ -41,7 +42,6 @@ export default class PasswordCog extends ValueCog {
|
|
|
41
42
|
required={required}
|
|
42
43
|
disabled={disabled}
|
|
43
44
|
readOnly={readOnly}
|
|
44
|
-
ref={this.setTitle}
|
|
45
45
|
/>
|
|
46
46
|
)
|
|
47
47
|
}
|
|
@@ -54,7 +54,6 @@ export default class PasswordCog extends ValueCog {
|
|
|
54
54
|
return (
|
|
55
55
|
<Description
|
|
56
56
|
description={description}
|
|
57
|
-
ref={this.setDescription}
|
|
58
57
|
/>
|
|
59
58
|
)
|
|
60
59
|
}
|
|
@@ -67,7 +66,6 @@ export default class PasswordCog extends ValueCog {
|
|
|
67
66
|
return (
|
|
68
67
|
<ErrorMessage
|
|
69
68
|
errorMessage={errorMessage}
|
|
70
|
-
ref={this.setErrorMessage}
|
|
71
69
|
/>
|
|
72
70
|
)
|
|
73
71
|
}
|
|
@@ -84,7 +82,8 @@ export default class PasswordCog extends ValueCog {
|
|
|
84
82
|
readOnly,
|
|
85
83
|
tabIndex,
|
|
86
84
|
accessKey,
|
|
87
|
-
placeholder
|
|
85
|
+
placeholder,
|
|
86
|
+
fieldRef
|
|
88
87
|
} = this.props
|
|
89
88
|
|
|
90
89
|
return (
|
|
@@ -100,7 +99,7 @@ export default class PasswordCog extends ValueCog {
|
|
|
100
99
|
accessKey={accessKey}
|
|
101
100
|
placeholder={placeholder}
|
|
102
101
|
onChange={this.handleChange}
|
|
103
|
-
|
|
102
|
+
fieldRef={fieldRef}
|
|
104
103
|
/>
|
|
105
104
|
)
|
|
106
105
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
require('@babel/register')({
|
|
2
|
+
ignore: [
|
|
3
|
+
/node_modules\/(?!shinkansen|@modernpoacher)/
|
|
4
|
+
]
|
|
5
|
+
})
|
|
6
|
+
|
|
7
|
+
const debug = require('debug')
|
|
8
|
+
|
|
9
|
+
const log = debug('shinkansen-cogs/cogs/password/title')
|
|
10
|
+
|
|
11
|
+
log('`shinkansen` is awake')
|
|
12
|
+
|
|
13
|
+
const {
|
|
14
|
+
default: component
|
|
15
|
+
} = require('./index.jsx')
|
|
16
|
+
|
|
17
|
+
module.exports = component
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
require('@babel/register')({
|
|
2
|
+
ignore: [
|
|
3
|
+
/node_modules\/(?!shinkansen|@modernpoacher)/
|
|
4
|
+
]
|
|
5
|
+
})
|
|
6
|
+
|
|
7
|
+
const debug = require('debug')
|
|
8
|
+
|
|
9
|
+
const log = debug('shinkansen-cogs/cogs/radio/description')
|
|
10
|
+
|
|
11
|
+
log('`shinkansen` is awake')
|
|
12
|
+
|
|
13
|
+
const {
|
|
14
|
+
default: component
|
|
15
|
+
} = require('./index.jsx')
|
|
16
|
+
|
|
17
|
+
module.exports = component
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
require('@babel/register')({
|
|
2
|
+
ignore: [
|
|
3
|
+
/node_modules\/(?!shinkansen|@modernpoacher)/
|
|
4
|
+
]
|
|
5
|
+
})
|
|
6
|
+
|
|
7
|
+
const debug = require('debug')
|
|
8
|
+
|
|
9
|
+
const log = debug('shinkansen-cogs/cogs/radio/error-message')
|
|
10
|
+
|
|
11
|
+
log('`shinkansen` is awake')
|
|
12
|
+
|
|
13
|
+
const {
|
|
14
|
+
default: component
|
|
15
|
+
} = require('./index.jsx')
|
|
16
|
+
|
|
17
|
+
module.exports = component
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
require('@babel/register')({
|
|
2
|
+
ignore: [
|
|
3
|
+
/node_modules\/(?!shinkansen|@modernpoacher)/
|
|
4
|
+
]
|
|
5
|
+
})
|
|
6
|
+
|
|
7
|
+
const debug = require('debug')
|
|
8
|
+
|
|
9
|
+
const log = debug('shinkansen-cogs/cogs/radio/field')
|
|
10
|
+
|
|
11
|
+
log('`shinkansen` is awake')
|
|
12
|
+
|
|
13
|
+
const {
|
|
14
|
+
default: component
|
|
15
|
+
} = require('./index.jsx')
|
|
16
|
+
|
|
17
|
+
module.exports = component
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import React from 'react'
|
|
5
5
|
import PropTypes from 'prop-types'
|
|
6
6
|
import classnames from 'classnames'
|
|
7
|
+
|
|
7
8
|
import { CheckField } from 'shinkansen-cogs/components/field'
|
|
8
9
|
|
|
9
10
|
export default class RadioField extends CheckField {
|
|
@@ -34,7 +35,8 @@ export default class RadioField extends CheckField {
|
|
|
34
35
|
disabled,
|
|
35
36
|
readOnly,
|
|
36
37
|
tabIndex,
|
|
37
|
-
accessKey
|
|
38
|
+
accessKey,
|
|
39
|
+
fieldRef
|
|
38
40
|
} = this.props
|
|
39
41
|
|
|
40
42
|
const className = this.getClassName()
|
|
@@ -55,7 +57,7 @@ export default class RadioField extends CheckField {
|
|
|
55
57
|
onChange={this.handleChange}
|
|
56
58
|
className={className}
|
|
57
59
|
type='radio'
|
|
58
|
-
ref={
|
|
60
|
+
ref={fieldRef}
|
|
59
61
|
/>
|
|
60
62
|
)
|
|
61
63
|
}
|
package/src/cogs/radio/index.jsx
CHANGED
|
@@ -6,10 +6,11 @@ import PropTypes from 'prop-types'
|
|
|
6
6
|
import classnames from 'classnames'
|
|
7
7
|
|
|
8
8
|
import { CheckCog } from 'shinkansen-cogs/cogs'
|
|
9
|
-
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
9
|
+
|
|
10
|
+
import Title from './title/index.jsx'
|
|
11
|
+
import Description from './description/index.jsx'
|
|
12
|
+
import ErrorMessage from './error-message/index.jsx'
|
|
13
|
+
import Field from './field/index.jsx'
|
|
13
14
|
|
|
14
15
|
export default class Radio extends CheckCog {
|
|
15
16
|
getClassName () {
|
|
@@ -58,7 +59,6 @@ export default class Radio extends CheckCog {
|
|
|
58
59
|
required={required}
|
|
59
60
|
disabled={disabled}
|
|
60
61
|
readOnly={readOnly}
|
|
61
|
-
ref={this.setTitle}
|
|
62
62
|
/>
|
|
63
63
|
)
|
|
64
64
|
}
|
|
@@ -71,7 +71,6 @@ export default class Radio extends CheckCog {
|
|
|
71
71
|
return (
|
|
72
72
|
<Description
|
|
73
73
|
description={description}
|
|
74
|
-
ref={this.setDescription}
|
|
75
74
|
/>
|
|
76
75
|
)
|
|
77
76
|
}
|
|
@@ -84,7 +83,6 @@ export default class Radio extends CheckCog {
|
|
|
84
83
|
return (
|
|
85
84
|
<ErrorMessage
|
|
86
85
|
errorMessage={errorMessage}
|
|
87
|
-
ref={this.setErrorMessage}
|
|
88
86
|
/>
|
|
89
87
|
)
|
|
90
88
|
}
|
|
@@ -102,7 +100,8 @@ export default class Radio extends CheckCog {
|
|
|
102
100
|
readOnly,
|
|
103
101
|
tabIndex,
|
|
104
102
|
accessKey,
|
|
105
|
-
placeholder
|
|
103
|
+
placeholder,
|
|
104
|
+
fieldRef
|
|
106
105
|
} = this.props
|
|
107
106
|
|
|
108
107
|
return (
|
|
@@ -120,7 +119,7 @@ export default class Radio extends CheckCog {
|
|
|
120
119
|
placeholder={placeholder}
|
|
121
120
|
onClick={this.handleClick}
|
|
122
121
|
onChange={this.handleChange}
|
|
123
|
-
|
|
122
|
+
fieldRef={fieldRef}
|
|
124
123
|
/>
|
|
125
124
|
)
|
|
126
125
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
require('@babel/register')({
|
|
2
|
+
ignore: [
|
|
3
|
+
/node_modules\/(?!shinkansen|@modernpoacher)/
|
|
4
|
+
]
|
|
5
|
+
})
|
|
6
|
+
|
|
7
|
+
const debug = require('debug')
|
|
8
|
+
|
|
9
|
+
const log = debug('shinkansen-cogs/cogs/radio/title')
|
|
10
|
+
|
|
11
|
+
log('`shinkansen` is awake')
|
|
12
|
+
|
|
13
|
+
const {
|
|
14
|
+
default: component
|
|
15
|
+
} = require('./index.jsx')
|
|
16
|
+
|
|
17
|
+
module.exports = component
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
require('@babel/register')({
|
|
2
|
+
ignore: [
|
|
3
|
+
/node_modules\/(?!shinkansen|@modernpoacher)/
|
|
4
|
+
]
|
|
5
|
+
})
|
|
6
|
+
|
|
7
|
+
const debug = require('debug')
|
|
8
|
+
|
|
9
|
+
const log = debug('shinkansen-cogs/cogs/select/error-message')
|
|
10
|
+
|
|
11
|
+
log('`shinkansen` is awake')
|
|
12
|
+
|
|
13
|
+
const {
|
|
14
|
+
default: component
|
|
15
|
+
} = require('./index.jsx')
|
|
16
|
+
|
|
17
|
+
module.exports = component
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
require('@babel/register')({
|
|
2
|
+
ignore: [
|
|
3
|
+
/node_modules\/(?!shinkansen|@modernpoacher)/
|
|
4
|
+
]
|
|
5
|
+
})
|
|
6
|
+
|
|
7
|
+
const debug = require('debug')
|
|
8
|
+
|
|
9
|
+
const log = debug('shinkansen-cogs/cogs/select/field')
|
|
10
|
+
|
|
11
|
+
log('`shinkansen` is awake')
|
|
12
|
+
|
|
13
|
+
const {
|
|
14
|
+
default: component
|
|
15
|
+
} = require('./index.jsx')
|
|
16
|
+
|
|
17
|
+
module.exports = component
|
|
@@ -4,9 +4,17 @@
|
|
|
4
4
|
import React from 'react'
|
|
5
5
|
import PropTypes from 'prop-types'
|
|
6
6
|
import classnames from 'classnames'
|
|
7
|
+
|
|
7
8
|
import { ValueField } from 'shinkansen-cogs/components/field'
|
|
8
9
|
|
|
9
10
|
export default class SelectField extends ValueField {
|
|
11
|
+
shouldComponentUpdate (props) {
|
|
12
|
+
return (
|
|
13
|
+
super.shouldComponentUpdate(props) ||
|
|
14
|
+
(props.children !== this.props.children)
|
|
15
|
+
)
|
|
16
|
+
}
|
|
17
|
+
|
|
10
18
|
getClassName () {
|
|
11
19
|
return classnames(super.getClassName(), 'select')
|
|
12
20
|
}
|
|
@@ -22,7 +30,8 @@ export default class SelectField extends ValueField {
|
|
|
22
30
|
readOnly,
|
|
23
31
|
tabIndex,
|
|
24
32
|
accessKey,
|
|
25
|
-
children
|
|
33
|
+
children,
|
|
34
|
+
fieldRef
|
|
26
35
|
} = this.props
|
|
27
36
|
|
|
28
37
|
const className = this.getClassName()
|
|
@@ -40,7 +49,7 @@ export default class SelectField extends ValueField {
|
|
|
40
49
|
accessKey={accessKey}
|
|
41
50
|
onChange={this.handleChange}
|
|
42
51
|
className={className}
|
|
43
|
-
ref={
|
|
52
|
+
ref={fieldRef}>
|
|
44
53
|
{children}
|
|
45
54
|
</select>
|
|
46
55
|
)
|
|
@@ -2,15 +2,24 @@
|
|
|
2
2
|
* SelectCog component
|
|
3
3
|
*/
|
|
4
4
|
import React from 'react'
|
|
5
|
+
import PropTypes from 'prop-types'
|
|
5
6
|
import classnames from 'classnames'
|
|
6
7
|
|
|
7
8
|
import { ValueCog } from 'shinkansen-cogs/cogs'
|
|
8
|
-
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
9
|
+
|
|
10
|
+
import Title from './title/index.jsx'
|
|
11
|
+
import Description from './description/index.jsx'
|
|
12
|
+
import ErrorMessage from './error-message/index.jsx'
|
|
13
|
+
import Field from './field/index.jsx'
|
|
12
14
|
|
|
13
15
|
export default class SelectCog extends ValueCog {
|
|
16
|
+
shouldComponentUpdate (props) {
|
|
17
|
+
return (
|
|
18
|
+
super.shouldComponentUpdate(props) ||
|
|
19
|
+
(props.children !== this.props.children)
|
|
20
|
+
)
|
|
21
|
+
}
|
|
22
|
+
|
|
14
23
|
getClassName () {
|
|
15
24
|
return classnames(super.getClassName(), 'select')
|
|
16
25
|
}
|
|
@@ -41,7 +50,6 @@ export default class SelectCog extends ValueCog {
|
|
|
41
50
|
required={required}
|
|
42
51
|
disabled={disabled}
|
|
43
52
|
readOnly={readOnly}
|
|
44
|
-
ref={this.setTitle}
|
|
45
53
|
/>
|
|
46
54
|
)
|
|
47
55
|
}
|
|
@@ -54,7 +62,6 @@ export default class SelectCog extends ValueCog {
|
|
|
54
62
|
return (
|
|
55
63
|
<Description
|
|
56
64
|
description={description}
|
|
57
|
-
ref={this.setDescription}
|
|
58
65
|
/>
|
|
59
66
|
)
|
|
60
67
|
}
|
|
@@ -67,7 +74,6 @@ export default class SelectCog extends ValueCog {
|
|
|
67
74
|
return (
|
|
68
75
|
<ErrorMessage
|
|
69
76
|
errorMessage={errorMessage}
|
|
70
|
-
ref={this.setErrorMessage}
|
|
71
77
|
/>
|
|
72
78
|
)
|
|
73
79
|
}
|
|
@@ -85,6 +91,7 @@ export default class SelectCog extends ValueCog {
|
|
|
85
91
|
tabIndex,
|
|
86
92
|
accessKey,
|
|
87
93
|
placeholder,
|
|
94
|
+
fieldRef,
|
|
88
95
|
children
|
|
89
96
|
} = this.props
|
|
90
97
|
|
|
@@ -101,7 +108,7 @@ export default class SelectCog extends ValueCog {
|
|
|
101
108
|
accessKey={accessKey}
|
|
102
109
|
placeholder={placeholder}
|
|
103
110
|
onChange={this.handleChange}
|
|
104
|
-
|
|
111
|
+
fieldRef={fieldRef}>
|
|
105
112
|
{children}
|
|
106
113
|
</Field>
|
|
107
114
|
)
|
|
@@ -109,7 +116,13 @@ export default class SelectCog extends ValueCog {
|
|
|
109
116
|
}
|
|
110
117
|
|
|
111
118
|
SelectCog.propTypes = {
|
|
112
|
-
...ValueCog.propTypes
|
|
119
|
+
...ValueCog.propTypes,
|
|
120
|
+
children: PropTypes.oneOfType([
|
|
121
|
+
PropTypes.node,
|
|
122
|
+
PropTypes.arrayOf(
|
|
123
|
+
PropTypes.node
|
|
124
|
+
)
|
|
125
|
+
])
|
|
113
126
|
}
|
|
114
127
|
|
|
115
128
|
SelectCog.defaultProps = {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
require('@babel/register')({
|
|
2
|
+
ignore: [
|
|
3
|
+
/node_modules\/(?!shinkansen|@modernpoacher)/
|
|
4
|
+
]
|
|
5
|
+
})
|
|
6
|
+
|
|
7
|
+
const debug = require('debug')
|
|
8
|
+
|
|
9
|
+
const log = debug('shinkansen-cogs/cogs/select/title')
|
|
10
|
+
|
|
11
|
+
log('`shinkansen` is awake')
|
|
12
|
+
|
|
13
|
+
const {
|
|
14
|
+
default: component
|
|
15
|
+
} = require('./index.jsx')
|
|
16
|
+
|
|
17
|
+
module.exports = component
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
require('@babel/register')({
|
|
2
|
+
ignore: [
|
|
3
|
+
/node_modules\/(?!shinkansen|@modernpoacher)/
|
|
4
|
+
]
|
|
5
|
+
})
|
|
6
|
+
|
|
7
|
+
const debug = require('debug')
|
|
8
|
+
|
|
9
|
+
const log = debug('shinkansen-cogs/cogs/text/description')
|
|
10
|
+
|
|
11
|
+
log('`shinkansen` is awake')
|
|
12
|
+
|
|
13
|
+
const {
|
|
14
|
+
default: component
|
|
15
|
+
} = require('./index.jsx')
|
|
16
|
+
|
|
17
|
+
module.exports = component
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
require('@babel/register')({
|
|
2
|
+
ignore: [
|
|
3
|
+
/node_modules\/(?!shinkansen|@modernpoacher)/
|
|
4
|
+
]
|
|
5
|
+
})
|
|
6
|
+
|
|
7
|
+
const debug = require('debug')
|
|
8
|
+
|
|
9
|
+
const log = debug('shinkansen-cogs/cogs/text/error-message')
|
|
10
|
+
|
|
11
|
+
log('`shinkansen` is awake')
|
|
12
|
+
|
|
13
|
+
const {
|
|
14
|
+
default: component
|
|
15
|
+
} = require('./index.jsx')
|
|
16
|
+
|
|
17
|
+
module.exports = component
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
require('@babel/register')({
|
|
2
|
+
ignore: [
|
|
3
|
+
/node_modules\/(?!shinkansen|@modernpoacher)/
|
|
4
|
+
]
|
|
5
|
+
})
|
|
6
|
+
|
|
7
|
+
const debug = require('debug')
|
|
8
|
+
|
|
9
|
+
const log = debug('shinkansen-cogs/cogs/text/field')
|
|
10
|
+
|
|
11
|
+
log('`shinkansen` is awake')
|
|
12
|
+
|
|
13
|
+
const {
|
|
14
|
+
default: component
|
|
15
|
+
} = require('./index.jsx')
|
|
16
|
+
|
|
17
|
+
module.exports = component
|