@micromag/element-text-input 0.3.832 → 0.4.4
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/assets/css/styles.css +1 -1
- package/es/index.d.ts +25 -0
- package/es/index.js +37 -62
- package/es/styles.css +1 -0
- package/package.json +10 -9
package/assets/css/styles.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
.container{font-family:Helvetica,Arial,sans-serif;font-size:16px;font-weight:400;line-height:1.3;margin:0;padding:0}.container em,.container i{font-style:italic}.container b,.container strong{font-weight:700}.container p{margin-bottom:.5em;margin-top:.5em}.container mark{-webkit-box-decoration-break:clone;box-decoration-break:clone;padding:0}.container h2{font-size:2em}.container h3{font-size:1.75em}.container h4{font-size:1.5em}.container blockquote{padding:0 0 0 1em}.container img{display:block;height:auto;max-width:100%;width:auto}.element{background-color:hsla(0,0%,100%,.1);border:0;outline:0}
|
package/es/index.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { TextStyle, BoxStyle, Margin } from '@micromag/core';
|
|
3
|
+
|
|
4
|
+
interface TextInputProps {
|
|
5
|
+
label?: string | null;
|
|
6
|
+
labelOutside?: boolean;
|
|
7
|
+
labelClassName?: string | null;
|
|
8
|
+
textStyle?: TextStyle | null;
|
|
9
|
+
placeholderTextStyle?: TextStyle | null;
|
|
10
|
+
buttonStyle?: BoxStyle | null;
|
|
11
|
+
labelOutsideStyle?: TextStyle | null;
|
|
12
|
+
margin?: Margin | null;
|
|
13
|
+
multiline?: boolean;
|
|
14
|
+
value?: string;
|
|
15
|
+
onChange?: ((...args: unknown[]) => void) | null;
|
|
16
|
+
onFocus?: ((...args: unknown[]) => void) | null;
|
|
17
|
+
onBlur?: ((...args: unknown[]) => void) | null;
|
|
18
|
+
required?: boolean;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
focusable?: boolean;
|
|
21
|
+
className?: string | null;
|
|
22
|
+
}
|
|
23
|
+
declare function TextInput({ label, labelOutside, labelClassName, textStyle, placeholderTextStyle, buttonStyle, labelOutsideStyle, margin, multiline, value, onChange, onFocus, onBlur, required, disabled, focusable, className, }: TextInputProps): react_jsx_runtime.JSX.Element;
|
|
24
|
+
|
|
25
|
+
export { TextInput as default };
|
package/es/index.js
CHANGED
|
@@ -1,71 +1,48 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
2
|
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
5
4
|
import React from 'react';
|
|
6
5
|
import { Helmet } from 'react-helmet';
|
|
7
|
-
import { PropTypes as PropTypes$1 } from '@micromag/core';
|
|
8
6
|
import { usePlaceholderStyle } from '@micromag/core/hooks';
|
|
9
7
|
import { getStyleFromMargin, getStyleFromText, getStyleFromBox } from '@micromag/core/utils';
|
|
10
8
|
|
|
11
|
-
var styles = {"container":"
|
|
9
|
+
var styles = {"container":"container","element":"element"};
|
|
12
10
|
|
|
13
|
-
|
|
14
|
-
label
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
focusable: true,
|
|
49
|
-
className: null
|
|
50
|
-
};
|
|
51
|
-
var TextInput = function TextInput(_ref) {
|
|
52
|
-
var label = _ref.label,
|
|
53
|
-
labelOutside = _ref.labelOutside,
|
|
54
|
-
labelClassName = _ref.labelClassName,
|
|
55
|
-
textStyle = _ref.textStyle,
|
|
56
|
-
placeholderTextStyle = _ref.placeholderTextStyle,
|
|
57
|
-
buttonStyle = _ref.buttonStyle,
|
|
58
|
-
labelOutsideStyle = _ref.labelOutsideStyle,
|
|
59
|
-
margin = _ref.margin,
|
|
60
|
-
multiline = _ref.multiline,
|
|
61
|
-
value = _ref.value,
|
|
62
|
-
onChange = _ref.onChange,
|
|
63
|
-
onFocus = _ref.onFocus,
|
|
64
|
-
onBlur = _ref.onBlur,
|
|
65
|
-
required = _ref.required,
|
|
66
|
-
disabled = _ref.disabled,
|
|
67
|
-
focusable = _ref.focusable,
|
|
68
|
-
className = _ref.className;
|
|
11
|
+
function TextInput(_ref) {
|
|
12
|
+
var _ref$label = _ref.label,
|
|
13
|
+
label = _ref$label === void 0 ? null : _ref$label,
|
|
14
|
+
_ref$labelOutside = _ref.labelOutside,
|
|
15
|
+
labelOutside = _ref$labelOutside === void 0 ? false : _ref$labelOutside,
|
|
16
|
+
_ref$labelClassName = _ref.labelClassName,
|
|
17
|
+
labelClassName = _ref$labelClassName === void 0 ? null : _ref$labelClassName,
|
|
18
|
+
_ref$textStyle = _ref.textStyle,
|
|
19
|
+
textStyle = _ref$textStyle === void 0 ? null : _ref$textStyle,
|
|
20
|
+
_ref$placeholderTextS = _ref.placeholderTextStyle,
|
|
21
|
+
placeholderTextStyle = _ref$placeholderTextS === void 0 ? null : _ref$placeholderTextS,
|
|
22
|
+
_ref$buttonStyle = _ref.buttonStyle,
|
|
23
|
+
buttonStyle = _ref$buttonStyle === void 0 ? null : _ref$buttonStyle,
|
|
24
|
+
_ref$labelOutsideStyl = _ref.labelOutsideStyle,
|
|
25
|
+
labelOutsideStyle = _ref$labelOutsideStyl === void 0 ? null : _ref$labelOutsideStyl,
|
|
26
|
+
_ref$margin = _ref.margin,
|
|
27
|
+
margin = _ref$margin === void 0 ? null : _ref$margin,
|
|
28
|
+
_ref$multiline = _ref.multiline,
|
|
29
|
+
multiline = _ref$multiline === void 0 ? false : _ref$multiline,
|
|
30
|
+
_ref$value = _ref.value,
|
|
31
|
+
value = _ref$value === void 0 ? '' : _ref$value,
|
|
32
|
+
_ref$onChange = _ref.onChange,
|
|
33
|
+
onChange = _ref$onChange === void 0 ? null : _ref$onChange,
|
|
34
|
+
_ref$onFocus = _ref.onFocus,
|
|
35
|
+
onFocus = _ref$onFocus === void 0 ? null : _ref$onFocus,
|
|
36
|
+
_ref$onBlur = _ref.onBlur,
|
|
37
|
+
onBlur = _ref$onBlur === void 0 ? null : _ref$onBlur,
|
|
38
|
+
_ref$required = _ref.required,
|
|
39
|
+
required = _ref$required === void 0 ? false : _ref$required,
|
|
40
|
+
_ref$disabled = _ref.disabled,
|
|
41
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
42
|
+
_ref$focusable = _ref.focusable,
|
|
43
|
+
focusable = _ref$focusable === void 0 ? true : _ref$focusable,
|
|
44
|
+
_ref$className = _ref.className,
|
|
45
|
+
className = _ref$className === void 0 ? null : _ref$className;
|
|
69
46
|
var containerStyle = {};
|
|
70
47
|
var labelStyle = {};
|
|
71
48
|
var elementStyle = {};
|
|
@@ -116,8 +93,6 @@ var TextInput = function TextInput(_ref) {
|
|
|
116
93
|
className: labelClassName,
|
|
117
94
|
style: labelStyle
|
|
118
95
|
}, label), element, placeholderStyleElement);
|
|
119
|
-
}
|
|
120
|
-
TextInput.propTypes = propTypes;
|
|
121
|
-
TextInput.defaultProps = defaultProps;
|
|
96
|
+
}
|
|
122
97
|
|
|
123
98
|
export { TextInput as default };
|
package/es/styles.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.container{font-family:Helvetica,Arial,sans-serif;font-size:16px;font-weight:400;line-height:1.3;margin:0;padding:0}.container em,.container i{font-style:italic}.container b,.container strong{font-weight:700}.container p{margin-bottom:.5em;margin-top:.5em}.container mark{-webkit-box-decoration-break:clone;box-decoration-break:clone;padding:0}.container h2{font-size:2em}.container h3{font-size:1.75em}.container h4{font-size:1.5em}.container blockquote{padding:0 0 0 1em}.container img{display:block;height:auto;max-width:100%;width:auto}.element{background-color:hsla(0,0%,100%,.1);border:0;outline:0}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/element-text-input",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"module": "es/index.js",
|
|
35
35
|
"exports": {
|
|
36
36
|
".": {
|
|
37
|
+
"types": "./es/index.d.ts",
|
|
37
38
|
"import": "./es/index.js"
|
|
38
39
|
},
|
|
39
40
|
"./assets/css/styles": "./assets/css/styles.css",
|
|
@@ -47,26 +48,26 @@
|
|
|
47
48
|
"scripts": {
|
|
48
49
|
"clean": "rm -rf es && rm -rf lib && rm -rf assets",
|
|
49
50
|
"prepublishOnly": "npm run build",
|
|
50
|
-
"build": "../../scripts/prepare-package.sh"
|
|
51
|
+
"build": "../../scripts/prepare-package.sh --types"
|
|
51
52
|
},
|
|
52
53
|
"devDependencies": {
|
|
53
|
-
"react": "^
|
|
54
|
-
"react-dom": "^
|
|
54
|
+
"react": "^19.2.0",
|
|
55
|
+
"react-dom": "^18.3.0 || ^19.0.0"
|
|
55
56
|
},
|
|
56
57
|
"peerDependencies": {
|
|
57
|
-
"react": "^
|
|
58
|
-
"react-dom": "^
|
|
58
|
+
"react": "^19.2.0",
|
|
59
|
+
"react-dom": "^18.3.0 || ^19.0.0"
|
|
59
60
|
},
|
|
60
61
|
"dependencies": {
|
|
61
62
|
"@babel/runtime": "^7.13.10",
|
|
62
|
-
"@micromag/core": "^0.
|
|
63
|
+
"@micromag/core": "^0.4.4",
|
|
63
64
|
"classnames": "^2.2.6",
|
|
64
|
-
"prop-types": "^15.7.2",
|
|
65
65
|
"react-helmet": "^6.1.0"
|
|
66
66
|
},
|
|
67
67
|
"publishConfig": {
|
|
68
68
|
"access": "public",
|
|
69
69
|
"registry": "https://registry.npmjs.org/"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "04b8519c3a3ddace5a21497e22faa11865d57f6d",
|
|
72
|
+
"types": "es/index.d.ts"
|
|
72
73
|
}
|