react-input-material 0.0.433 → 0.0.435
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/components/FileInput.js +1 -1
- package/components/FileInput.styles.css +3 -3
- package/components/GenericAnimate.d.ts +5 -3
- package/components/GenericAnimate.js +1 -1
- package/components/GenericInput.js +1 -1
- package/components/GenericInput.styles.css +1 -1
- package/components/Inputs.js +1 -1
- package/components/Inputs.styles.css +2 -2
- package/components/Interval.js +1 -1
- package/components/Interval.styles.css +2 -2
- package/components/RequireableCheckbox.styles.css +1 -1
- package/index.js +1 -1
- package/index.styles.css +6 -6
- package/package.json +4 -2
- package/type.d.ts +5 -0
- package/components/Dummy.tsx +0 -58
- package/components/FileInput.tsx +0 -1010
- package/components/GenericAnimate.tsx +0 -88
- package/components/GenericInput.tsx +0 -2875
- package/components/Inputs.tsx +0 -585
- package/components/Interval.tsx +0 -436
- package/components/RequireableCheckbox.tsx +0 -520
- package/components/WrapConfigurations.tsx +0 -127
- package/components/WrapStrict.tsx +0 -43
- package/components/WrapThemeProvider.tsx +0 -48
- package/components/WrapTooltip.tsx +0 -67
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
// #!/usr/bin/env babel-node
|
|
2
|
-
// -*- coding: utf-8 -*-
|
|
3
|
-
/** @module WrapThemeProvider */
|
|
4
|
-
'use strict'
|
|
5
|
-
/* !
|
|
6
|
-
region header
|
|
7
|
-
[Project page](https://torben.website/react-material-input)
|
|
8
|
-
|
|
9
|
-
Copyright Torben Sickert (info["~at~"]torben.website) 16.12.2012
|
|
10
|
-
|
|
11
|
-
License
|
|
12
|
-
-------
|
|
13
|
-
|
|
14
|
-
This library written by Torben Sickert stand under a creative commons
|
|
15
|
-
naming 3.0 unported license.
|
|
16
|
-
See https://creativecommons.org/licenses/by/3.0/deed.de
|
|
17
|
-
endregion
|
|
18
|
-
*/
|
|
19
|
-
// region imports
|
|
20
|
-
import {FunctionComponent, ReactElement} from 'react'
|
|
21
|
-
import {ThemeProvider, ThemeProviderProps} from '@rmwc/theme'
|
|
22
|
-
// endregion
|
|
23
|
-
/**
|
|
24
|
-
* Wraps a theme provider to given element if a configuration is provided.
|
|
25
|
-
* @param properties - Component provided properties.
|
|
26
|
-
* @param properties.children - Component or string to wrap.
|
|
27
|
-
* @param properties.configuration - Potential theme provider configuration.
|
|
28
|
-
* @param properties.wrap - Instead of injecting a div tag, wrap a child
|
|
29
|
-
* component by merging the theme styles directly onto it. Useful when you
|
|
30
|
-
* don't want to mess with layout.
|
|
31
|
-
*
|
|
32
|
-
* @returns Wrapped content.
|
|
33
|
-
*/
|
|
34
|
-
export const WrapThemeProvider:FunctionComponent<{
|
|
35
|
-
children:ReactElement
|
|
36
|
-
configuration?:ThemeProviderProps['options']
|
|
37
|
-
wrap?:boolean
|
|
38
|
-
}> = ({children, configuration, wrap}):ReactElement => configuration ?
|
|
39
|
-
<ThemeProvider options={configuration} wrap={wrap !== false}>
|
|
40
|
-
{children}
|
|
41
|
-
</ThemeProvider> :
|
|
42
|
-
children
|
|
43
|
-
|
|
44
|
-
export default WrapThemeProvider
|
|
45
|
-
// region vim modline
|
|
46
|
-
// vim: set tabstop=4 shiftwidth=4 expandtab:
|
|
47
|
-
// vim: foldmethod=marker foldmarker=region,endregion:
|
|
48
|
-
// endregion
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
// #!/usr/bin/env babel-node
|
|
2
|
-
// -*- coding: utf-8 -*-
|
|
3
|
-
/** @module WrapTooltip */
|
|
4
|
-
'use strict'
|
|
5
|
-
/* !
|
|
6
|
-
region header
|
|
7
|
-
[Project page](https://torben.website/react-material-input)
|
|
8
|
-
|
|
9
|
-
Copyright Torben Sickert (info["~at~"]torben.website) 16.12.2012
|
|
10
|
-
|
|
11
|
-
License
|
|
12
|
-
-------
|
|
13
|
-
|
|
14
|
-
This library written by Torben Sickert stand under a creative commons
|
|
15
|
-
naming 3.0 unported license.
|
|
16
|
-
See https://creativecommons.org/licenses/by/3.0/deed.de
|
|
17
|
-
endregion
|
|
18
|
-
*/
|
|
19
|
-
// region imports
|
|
20
|
-
import {FunctionComponent, ReactElement} from 'react'
|
|
21
|
-
import {Typography} from '@rmwc/typography'
|
|
22
|
-
import {Tooltip} from '@rmwc/tooltip'
|
|
23
|
-
|
|
24
|
-
import {Properties} from '../type'
|
|
25
|
-
// endregion
|
|
26
|
-
/**
|
|
27
|
-
* Wraps given component with a tooltip component with given tooltip
|
|
28
|
-
* configuration.
|
|
29
|
-
* @param properties - Component provided properties.
|
|
30
|
-
* @param properties.children - Component or string to wrap.
|
|
31
|
-
* @param properties.options - Tooltip options.
|
|
32
|
-
*
|
|
33
|
-
* @returns Wrapped given content.
|
|
34
|
-
*/
|
|
35
|
-
export const WrapTooltip:FunctionComponent<{
|
|
36
|
-
children:ReactElement
|
|
37
|
-
options?:Properties['tooltip']
|
|
38
|
-
}> = ({children, options}):ReactElement => {
|
|
39
|
-
if (typeof options === 'string')
|
|
40
|
-
return <Tooltip
|
|
41
|
-
content={<Typography use="caption">{options}</Typography>}
|
|
42
|
-
>
|
|
43
|
-
<div className="generic-tooltip">{children}</div>
|
|
44
|
-
</Tooltip>
|
|
45
|
-
|
|
46
|
-
if (options !== null && typeof options === 'object') {
|
|
47
|
-
if (typeof options.content === 'string')
|
|
48
|
-
options = {
|
|
49
|
-
...options,
|
|
50
|
-
content: <Typography use="caption">
|
|
51
|
-
{options.content}
|
|
52
|
-
</Typography>
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
return <Tooltip {...options}>
|
|
56
|
-
<div className="generic-tooltip">{children}</div>
|
|
57
|
-
</Tooltip>
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
return <>{children}</>
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export default WrapTooltip
|
|
64
|
-
// region vim modline
|
|
65
|
-
// vim: set tabstop=4 shiftwidth=4 expandtab:
|
|
66
|
-
// vim: foldmethod=marker foldmarker=region,endregion:
|
|
67
|
-
// endregion
|