@micromag/element-text-input 0.3.832 → 0.4.6

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.
@@ -1 +1 @@
1
- .micromag-element-text-input-container{font-family:Helvetica,Arial,sans-serif;font-size:16px;font-weight:400;line-height:1.1}.micromag-element-text-input-container em,.micromag-element-text-input-container i{font-style:italic}.micromag-element-text-input-container b,.micromag-element-text-input-container strong{font-weight:700}.micromag-element-text-input-container p{margin-bottom:.5em;margin-top:.5em}.micromag-element-text-input-container mark{-webkit-box-decoration-break:clone;box-decoration-break:clone;padding:0}.micromag-element-text-input-container{line-height:1.3}.micromag-element-text-input-container h2{font-size:2em}.micromag-element-text-input-container h3{font-size:1.75em}.micromag-element-text-input-container h4{font-size:1.5em}.micromag-element-text-input-container blockquote{padding:0 0 0 1em}.micromag-element-text-input-container img{display:block;height:auto;max-width:100%;width:auto}.micromag-element-text-input-container{margin:0;padding:0}.micromag-element-text-input-element{background-color:hsla(0,0%,100%,.1);border:0;outline:0}
1
+ .micromag-element-text-input-container{font-family:Helvetica,Arial,sans-serif;font-size:16px;font-weight:400;line-height:1.3;margin:0;padding:0}.micromag-element-text-input-container em,.micromag-element-text-input-container i{font-style:italic}.micromag-element-text-input-container b,.micromag-element-text-input-container strong{font-weight:700}.micromag-element-text-input-container p{margin-bottom:.5em;margin-top:.5em}.micromag-element-text-input-container mark{-webkit-box-decoration-break:clone;box-decoration-break:clone;padding:0}.micromag-element-text-input-container h2{font-size:2em}.micromag-element-text-input-container h3{font-size:1.75em}.micromag-element-text-input-container h4{font-size:1.5em}.micromag-element-text-input-container blockquote{padding:0 0 0 1em}.micromag-element-text-input-container img{display:block;height:auto;max-width:100%;width:auto}.micromag-element-text-input-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
9
  var styles = {"container":"micromag-element-text-input-container","element":"micromag-element-text-input-element"};
12
10
 
13
- var propTypes = {
14
- label: PropTypes.string,
15
- labelOutside: PropTypes.bool,
16
- labelClassName: PropTypes.string,
17
- textStyle: PropTypes$1.textStyle,
18
- placeholderTextStyle: PropTypes$1.textStyle,
19
- buttonStyle: PropTypes$1.boxStyle,
20
- labelOutsideStyle: PropTypes$1.textStyle,
21
- margin: PropTypes$1.margin,
22
- multiline: PropTypes.bool,
23
- value: PropTypes.string,
24
- onChange: PropTypes.func,
25
- onFocus: PropTypes.func,
26
- onBlur: PropTypes.func,
27
- required: PropTypes.bool,
28
- disabled: PropTypes.bool,
29
- focusable: PropTypes.bool,
30
- className: PropTypes.string
31
- };
32
- var defaultProps = {
33
- label: null,
34
- labelOutside: false,
35
- labelClassName: null,
36
- textStyle: null,
37
- placeholderTextStyle: null,
38
- buttonStyle: null,
39
- labelOutsideStyle: null,
40
- margin: null,
41
- multiline: false,
42
- value: '',
43
- onChange: null,
44
- onFocus: null,
45
- onBlur: null,
46
- required: false,
47
- disabled: false,
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
+ .micromag-element-text-input-container{font-family:Helvetica,Arial,sans-serif;font-size:16px;font-weight:400;line-height:1.3;margin:0;padding:0}.micromag-element-text-input-container em,.micromag-element-text-input-container i{font-style:italic}.micromag-element-text-input-container b,.micromag-element-text-input-container strong{font-weight:700}.micromag-element-text-input-container p{margin-bottom:.5em;margin-top:.5em}.micromag-element-text-input-container mark{-webkit-box-decoration-break:clone;box-decoration-break:clone;padding:0}.micromag-element-text-input-container h2{font-size:2em}.micromag-element-text-input-container h3{font-size:1.75em}.micromag-element-text-input-container h4{font-size:1.5em}.micromag-element-text-input-container blockquote{padding:0 0 0 1em}.micromag-element-text-input-container img{display:block;height:auto;max-width:100%;width:auto}.micromag-element-text-input-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.832",
3
+ "version": "0.4.6",
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": "^16.8.0 || ^17.0.0 || ^18.0.0",
54
- "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
54
+ "react": "^19.2.0",
55
+ "react-dom": "^18.3.0 || ^19.0.0"
55
56
  },
56
57
  "peerDependencies": {
57
- "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
58
- "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
58
+ "react": "^19.2.0",
59
+ "react-dom": "^18.3.0 || ^19.0.0"
59
60
  },
60
61
  "dependencies": {
61
- "@babel/runtime": "^7.13.10",
62
- "@micromag/core": "^0.3.832",
62
+ "@babel/runtime": "^7.28.6",
63
+ "@micromag/core": "^0.4.6",
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": "4969d64e304334cfd47321e624e5914e0694c55f"
71
+ "gitHead": "cf8440c2851b864167a1f545aa56551d55473263",
72
+ "types": "es/index.d.ts"
72
73
  }