Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dhis2-ui/input

Package Overview
Dependencies
Maintainers
2
Versions
320
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dhis2-ui/input - npm Package Compare versions

Comparing version 9.12.0-alpha.4 to 9.12.0

build/cjs/input/inputTypes.js

11

build/cjs/input-field/input-field.js

@@ -14,2 +14,5 @@ "use strict";

function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
class InputField extends _react.default.Component {

@@ -45,3 +48,3 @@ render() {

autoComplete,
dataTest
dataTest = 'dhis2-uiwidgets-inputfield'
} = this.props;

@@ -89,5 +92,5 @@ return /*#__PURE__*/_react.default.createElement(_field.Field, {

exports.InputField = InputField;
InputField.defaultProps = {
_defineProperty(InputField, "defaultProps", {
dataTest: 'dhis2-uiwidgets-inputfield'
};
});
const InputFieldProps = exports.InputFieldProps = {

@@ -130,3 +133,3 @@ /** The [native `autocomplete` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-autocomplete) */

/** Type of input */
type: _index.Input.propTypes.type,
type: _propTypes.default.oneOf(_index.inputTypes),
/** Applies 'valid' appearance for validation feedback. Mutually exclusive with `error` and `warning` props */

@@ -133,0 +136,0 @@ valid: _uiConstants.sharedPropTypes.statusPropType,

@@ -12,2 +12,9 @@ "use strict";

});
var _input = require("./input.js");
Object.defineProperty(exports, "inputTypes", {
enumerable: true,
get: function () {
return _inputTypes.inputTypes;
}
});
var _input = require("./input.js");
var _inputTypes = require("./inputTypes.js");

@@ -13,2 +13,3 @@ "use strict";

var _react = _interopRequireWildcard(require("react"));
var _inputTypes = require("./inputTypes.js");
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }

@@ -62,3 +63,3 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }

className,
type,
type = 'text',
dense,

@@ -79,3 +80,3 @@ disabled,

autoComplete,
dataTest
dataTest = 'dhis2-uicore-input'
} = this.props;

@@ -125,6 +126,6 @@ return /*#__PURE__*/_react.default.createElement("div", {

exports.Input = Input;
Input.defaultProps = {
_defineProperty(Input, "defaultProps", {
type: 'text',
dataTest: 'dhis2-uicore-input'
};
});
Input.propTypes = {

@@ -161,3 +162,3 @@ /** The [native `autocomplete` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-autocomplete) */

/** The native input `type` attribute */
type: _propTypes.default.oneOf(['text', 'number', 'password', 'email', 'url', 'tel', 'date', 'datetime', 'datetime-local', 'month', 'week', 'time', 'search']),
type: _propTypes.default.oneOf(_inputTypes.inputTypes),
/** Applies 'valid' appearance for validation feedback. Mutually exclusive with `error` and `warning` props */

@@ -164,0 +165,0 @@ valid: _uiConstants.sharedPropTypes.statusPropType,

@@ -0,1 +1,4 @@

function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
import { sharedPropTypes } from '@dhis2/ui-constants';

@@ -6,3 +9,3 @@ import { Box } from '@dhis2-ui/box';

import React from 'react';
import { Input } from '../input/index.js';
import { Input, inputTypes } from '../input/index.js';
class InputField extends React.Component {

@@ -38,3 +41,3 @@ render() {

autoComplete,
dataTest
dataTest = 'dhis2-uiwidgets-inputfield'
} = this.props;

@@ -81,5 +84,5 @@ return /*#__PURE__*/React.createElement(Field, {

}
InputField.defaultProps = {
_defineProperty(InputField, "defaultProps", {
dataTest: 'dhis2-uiwidgets-inputfield'
};
});
const InputFieldProps = {

@@ -122,3 +125,3 @@ /** The [native `autocomplete` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-autocomplete) */

/** Type of input */
type: Input.propTypes.type,
type: PropTypes.oneOf(inputTypes),
/** Applies 'valid' appearance for validation feedback. Mutually exclusive with `error` and `warning` props */

@@ -125,0 +128,0 @@ valid: sharedPropTypes.statusPropType,

@@ -1,1 +0,2 @@

export { Input } from './input.js';
export { Input } from './input.js';
export { inputTypes } from './inputTypes.js';

@@ -10,2 +10,3 @@ import _JSXStyle from "styled-jsx/style";

import React, { Component } from 'react';
import { inputTypes } from './inputTypes.js';
const styles = [`.input.jsx-31445346{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:${spacers.dp8};}`, `input.jsx-31445346{box-sizing:border-box;font-size:14px;line-height:16px;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;color:${colors.grey900};background-color:white;padding:11px 12px;max-height:40px;outline:0;border:1px solid ${colors.grey500};border-radius:3px;box-shadow:inset 0 0 1px 0 rgba(48,54,60,0.1);text-overflow:ellipsis;}`, "input.dense.jsx-31445346{max-height:32px;padding:7px 8px;}", `input.jsx-31445346:focus{outline:none;box-shadow:inset 0 0 0 2px ${theme.focus};border-color:${theme.focus};}`, `input.jsx-31445346::-webkit-input-placeholder{color:${colors.grey600};opacity:1;}`, `input.jsx-31445346::-moz-placeholder{color:${colors.grey600};opacity:1;}`, `input.jsx-31445346:-ms-input-placeholder{color:${colors.grey600};opacity:1;}`, `input.jsx-31445346::placeholder{color:${colors.grey600};opacity:1;}`, "input[type='date'].jsx-31445346::-webkit-inner-spin-button,input[type='date'].jsx-31445346::-webkit-calendar-picker-indicator,input[type='time'].jsx-31445346::-webkit-inner-spin-button,input[type='time'].jsx-31445346::-webkit-calendar-picker-indicator,input[type='datetime-local'].jsx-31445346::-webkit-inner-spin-button,input[type='datetime-local'].jsx-31445346::-webkit-calendar-picker-indicator{height:14px;padding-top:1px;padding-bottom:1px;}", "input[type='date'].jsx-31445346::-webkit-datetime-edit-fields-wrapper,input[type='datetime-local'].jsx-31445346::-webkit-datetime-edit-fields-wrapper,input[type='time'].jsx-31445346::-webkit-datetime-edit-fields-wrapper{padding:0;}", `input.warning.jsx-31445346{border-color:${theme.warning};}`, `input.error.jsx-31445346{border-color:${theme.error};}`, `input.read-only.jsx-31445346{background-color:${colors.grey050};border-color:${colors.grey300};box-shadow:none;cursor:text;}`, `input.disabled.jsx-31445346{background-color:${colors.grey100};border-color:${colors.grey500};color:${theme.disabled};cursor:not-allowed;}`];

@@ -53,3 +54,3 @@ styles.__hash = "31445346";

className,
type,
type = 'text',
dense,

@@ -70,3 +71,3 @@ disabled,

autoComplete,
dataTest
dataTest = 'dhis2-uicore-input'
} = this.props;

@@ -115,6 +116,6 @@ return /*#__PURE__*/React.createElement("div", {

}
Input.defaultProps = {
_defineProperty(Input, "defaultProps", {
type: 'text',
dataTest: 'dhis2-uicore-input'
};
});
Input.propTypes = {

@@ -151,3 +152,3 @@ /** The [native `autocomplete` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-autocomplete) */

/** The native input `type` attribute */
type: PropTypes.oneOf(['text', 'number', 'password', 'email', 'url', 'tel', 'date', 'datetime', 'datetime-local', 'month', 'week', 'time', 'search']),
type: PropTypes.oneOf(inputTypes),
/** Applies 'valid' appearance for validation feedback. Mutually exclusive with `error` and `warning` props */

@@ -154,0 +155,0 @@ valid: sharedPropTypes.statusPropType,

{
"name": "@dhis2-ui/input",
"version": "9.12.0-alpha.4",
"version": "9.12.0",
"description": "UI Input",

@@ -36,9 +36,9 @@ "repository": {

"@dhis2/prop-types": "^3.1.2",
"@dhis2-ui/box": "9.12.0-alpha.4",
"@dhis2-ui/field": "9.12.0-alpha.4",
"@dhis2-ui/input": "9.12.0-alpha.4",
"@dhis2-ui/loader": "9.12.0-alpha.4",
"@dhis2-ui/status-icon": "9.12.0-alpha.4",
"@dhis2/ui-constants": "9.12.0-alpha.4",
"@dhis2/ui-icons": "9.12.0-alpha.4",
"@dhis2-ui/box": "9.12.0",
"@dhis2-ui/field": "9.12.0",
"@dhis2-ui/input": "9.12.0",
"@dhis2-ui/loader": "9.12.0",
"@dhis2-ui/status-icon": "9.12.0",
"@dhis2/ui-constants": "9.12.0",
"@dhis2/ui-icons": "9.12.0",
"classnames": "^2.3.1",

@@ -45,0 +45,0 @@ "prop-types": "^15.7.2"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc