@coorpacademy/components 11.13.7-alpha.9 → 11.14.1-alpha.2

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.
Files changed (67) hide show
  1. package/es/atom/button/index.d.ts.map +1 -1
  2. package/es/atom/button/index.js +18 -13
  3. package/es/atom/button/index.js.map +1 -1
  4. package/es/molecule/cm-popin/index.d.ts.map +1 -1
  5. package/es/molecule/cm-popin/index.js +5 -4
  6. package/es/molecule/cm-popin/index.js.map +1 -1
  7. package/es/molecule/cm-popin/style.css +61 -40
  8. package/es/molecule/discipline-header/index.d.ts +1 -0
  9. package/es/molecule/discipline-header/index.d.ts.map +1 -1
  10. package/es/molecule/discipline-header/index.js +24 -9
  11. package/es/molecule/discipline-header/index.js.map +1 -1
  12. package/es/molecule/discipline-header/style.css +34 -7
  13. package/es/template/common/discipline/index.d.ts.map +1 -1
  14. package/es/template/common/discipline/index.js +4 -2
  15. package/es/template/common/discipline/index.js.map +1 -1
  16. package/es/template/external-course/index.d.ts +69 -21
  17. package/es/template/external-course/index.d.ts.map +1 -1
  18. package/es/template/external-course/index.js +73 -56
  19. package/es/template/external-course/index.js.map +1 -1
  20. package/es/template/external-course/style.css +1 -1
  21. package/es/template/mobile-login/welcome/index.native.d.ts +18 -0
  22. package/es/template/mobile-login/welcome/index.native.d.ts.map +1 -0
  23. package/es/template/mobile-login/welcome/index.native.js +195 -0
  24. package/es/template/mobile-login/welcome/index.native.js.map +1 -0
  25. package/lib/atom/button/index.d.ts.map +1 -1
  26. package/lib/atom/button/index.js +18 -13
  27. package/lib/atom/button/index.js.map +1 -1
  28. package/lib/molecule/cm-popin/index.d.ts.map +1 -1
  29. package/lib/molecule/cm-popin/index.js +4 -3
  30. package/lib/molecule/cm-popin/index.js.map +1 -1
  31. package/lib/molecule/cm-popin/style.css +61 -40
  32. package/lib/molecule/discipline-header/index.d.ts +1 -0
  33. package/lib/molecule/discipline-header/index.d.ts.map +1 -1
  34. package/lib/molecule/discipline-header/index.js +25 -9
  35. package/lib/molecule/discipline-header/index.js.map +1 -1
  36. package/lib/molecule/discipline-header/style.css +34 -7
  37. package/lib/template/common/discipline/index.d.ts.map +1 -1
  38. package/lib/template/common/discipline/index.js +4 -2
  39. package/lib/template/common/discipline/index.js.map +1 -1
  40. package/lib/template/external-course/index.d.ts +69 -21
  41. package/lib/template/external-course/index.d.ts.map +1 -1
  42. package/lib/template/external-course/index.js +76 -54
  43. package/lib/template/external-course/index.js.map +1 -1
  44. package/lib/template/external-course/style.css +1 -1
  45. package/lib/template/mobile-login/welcome/index.native.d.ts +18 -0
  46. package/lib/template/mobile-login/welcome/index.native.d.ts.map +1 -0
  47. package/lib/template/mobile-login/welcome/index.native.js +212 -0
  48. package/lib/template/mobile-login/welcome/index.native.js.map +1 -0
  49. package/package.json +3 -3
  50. package/es/atom/form-text-input/index.d.ts +0 -27
  51. package/es/atom/form-text-input/index.d.ts.map +0 -1
  52. package/es/atom/form-text-input/index.js +0 -96
  53. package/es/atom/form-text-input/index.js.map +0 -1
  54. package/es/atom/form-text-input/prop-types.d.ts +0 -56
  55. package/es/atom/form-text-input/prop-types.d.ts.map +0 -1
  56. package/es/atom/form-text-input/prop-types.js +0 -35
  57. package/es/atom/form-text-input/prop-types.js.map +0 -1
  58. package/es/atom/form-text-input/style.css +0 -53
  59. package/lib/atom/form-text-input/index.d.ts +0 -27
  60. package/lib/atom/form-text-input/index.d.ts.map +0 -1
  61. package/lib/atom/form-text-input/index.js +0 -114
  62. package/lib/atom/form-text-input/index.js.map +0 -1
  63. package/lib/atom/form-text-input/prop-types.d.ts +0 -56
  64. package/lib/atom/form-text-input/prop-types.d.ts.map +0 -1
  65. package/lib/atom/form-text-input/prop-types.js +0 -46
  66. package/lib/atom/form-text-input/prop-types.js.map +0 -1
  67. package/lib/atom/form-text-input/style.css +0 -53
@@ -1,53 +0,0 @@
1
- @value colors: "../../variables/colors.css";
2
- @value dark from colors;
3
- @value cm_grey_400 from colors;
4
- @value cm_grey_450 from colors;
5
- @value white from colors;
6
-
7
- .wrapper {
8
- margin: 10px 0;
9
- position: relative;
10
- font-family: 'Gilroy';
11
- }
12
-
13
- .formLabel {
14
- font-size: 13px;
15
- text-align: left;
16
- /* temporal */
17
- color: dark;
18
- display: block;
19
- margin-bottom: 7px;
20
- width: 100%;
21
- }
22
-
23
- .textInput {
24
- width: 100%;
25
- height: 59px;
26
- background-color: white;
27
- border: solid 1px cm_grey_450;
28
- text-align: left;
29
- margin-bottom: 26px;
30
-
31
- appearance: none;
32
- padding: 0 8px 0 15px;
33
- border-radius: 0;
34
-
35
- box-sizing: border-box;
36
- cursor: text;
37
-
38
- color: inherit;
39
- font: inherit;
40
- overflow: visible;
41
- }
42
-
43
- .hintWrapper {
44
- font-size: 12px;
45
- margin-top: -20px;
46
- margin-bottom: 20px;
47
- }
48
-
49
- .hint {
50
- color: cm_grey_400;
51
- text-align: left;
52
- font-style: italic;
53
- }
@@ -1,27 +0,0 @@
1
- /// <reference types="react" />
2
- import { FormTextInputProps } from './prop-types';
3
- declare const FormTextInput: {
4
- ({ "aria-label": ariaLabel, autocomplete, "data-testid": dataTestid, disabled, hint, inputClassName, isRequired, isValid, label, maxlength, name, onChange, passwordValidator, placeholder, type, value, equals, wrapperClassName }: FormTextInputProps): JSX.Element;
5
- propTypes: {
6
- 'aria-label': import("prop-types").Requireable<string>;
7
- autocomplete: import("prop-types").Requireable<string>;
8
- 'data-testid': import("prop-types").Requireable<string>;
9
- disabled: import("prop-types").Requireable<boolean>;
10
- equals: import("prop-types").Requireable<NonNullable<string | number | null | undefined>>;
11
- hint: import("prop-types").Requireable<string>;
12
- inputClassName: import("prop-types").Requireable<string>;
13
- isRequired: import("prop-types").Requireable<boolean>;
14
- isValid: import("prop-types").Requireable<boolean>;
15
- label: import("prop-types").Requireable<string>;
16
- maxlength: import("prop-types").Requireable<number>;
17
- name: import("prop-types").Requireable<string>;
18
- onChange: import("prop-types").Requireable<(...args: any[]) => any>;
19
- passwordValidator: import("prop-types").Requireable<(...args: any[]) => any>;
20
- placeholder: import("prop-types").Requireable<string>;
21
- type: import("prop-types").Requireable<string>;
22
- value: import("prop-types").Requireable<NonNullable<string | number | null | undefined>>;
23
- wrapperClassName: import("prop-types").Requireable<string>;
24
- };
25
- };
26
- export default FormTextInput;
27
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/form-text-input/index.tsx"],"names":[],"mappings":";AAKA,OAAkB,EAAa,kBAAkB,EAAY,MAAM,cAAc,CAAC;AAkBlF,QAAA,MAAM,aAAa;yOAmBhB,kBAAkB;;;;;;;;;;;;;;;;;;;;;CA4DpB,CAAC;AAIF,eAAe,aAAa,CAAC"}
@@ -1,114 +0,0 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports.default = void 0;
5
-
6
- var _react = _interopRequireWildcard(require("react"));
7
-
8
- var _classnames = _interopRequireDefault(require("classnames"));
9
-
10
- var _isEmpty = _interopRequireDefault(require("lodash/fp/isEmpty"));
11
-
12
- var _isEqual = _interopRequireDefault(require("lodash/fp/isEqual"));
13
-
14
- var _noop = _interopRequireDefault(require("lodash/fp/noop"));
15
-
16
- var _propTypes = _interopRequireWildcard(require("./prop-types"));
17
-
18
- var _style = _interopRequireDefault(require("./style.css"));
19
-
20
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
-
22
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
23
-
24
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
25
-
26
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
27
-
28
- const validate = (fieldValue, fieldEqualsValue) => {
29
- return (0, _isEqual.default)(fieldValue, fieldEqualsValue);
30
- };
31
-
32
- const VALID_EMAIL_PATTERN = /[a-z0-9!#$%&'*+=?^_`{|}~-]+(?:.[a-z0-9!#$%&'*+=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?/;
33
-
34
- const validatePattern = (fieldValue, pattern) => {
35
- return pattern.test(fieldValue);
36
- };
37
-
38
- const DEFAULT_MAX_LENGTH = 150;
39
-
40
- const isEqualsDefined = equals => !(0, _isEmpty.default)(equals);
41
-
42
- const FormTextInput = ({
43
- 'aria-label': ariaLabel,
44
- autocomplete,
45
- 'data-testid': dataTestid = 'form-text-input',
46
- disabled,
47
- hint,
48
- inputClassName,
49
- isRequired,
50
- isValid,
51
- label,
52
- maxlength = DEFAULT_MAX_LENGTH,
53
- name,
54
- onChange = _noop.default,
55
- passwordValidator = () => false,
56
- placeholder,
57
- type = 'default',
58
- value,
59
- equals,
60
- wrapperClassName
61
- }) => {
62
- const isDefaultType = (0, _react.useMemo)(() => !type || type === _propTypes.TextInput.default, [type]);
63
- const isPasswordInput = (0, _react.useMemo)(() => type === _propTypes.TextInput.password || type === _propTypes.TextInput.passwordConfirmation, [type]);
64
- const isEmailInput = (0, _react.useMemo)(() => type === _propTypes.TextInput.email, [type]);
65
- const handleInputChange = (0, _react.useCallback)(event => {
66
- const newInput = event.target.value;
67
- const isNewValueValid = !isEqualsDefined(equals) || validate(newInput, equals);
68
- const validPattern = !isEmailInput || validatePattern(newInput, VALID_EMAIL_PATTERN);
69
- const isPasswordCompliant = !isPasswordInput || passwordValidator(newInput);
70
- const checkResult = isPasswordCompliant && isNewValueValid && validPattern;
71
- onChange(newInput, checkResult);
72
- }, [equals, isEmailInput, isPasswordInput, onChange, passwordValidator]);
73
- const fieldLabel = (0, _react.useMemo)(() => `${label} ${isRequired ? '*' : ''}`, [isRequired, label]);
74
- const errorStyle = (0, _react.useMemo)(() => isValid ? undefined : {
75
- border: '2px solid rgb(247, 63, 82)'
76
- }, [isValid]);
77
- return /*#__PURE__*/_react.default.createElement("div", {
78
- className: (0, _classnames.default)(_style.default.wrapper, wrapperClassName)
79
- }, /*#__PURE__*/_react.default.createElement("label", {
80
- className: _style.default.formLabel,
81
- htmlFor: name
82
- }, fieldLabel), /*#__PURE__*/_react.default.createElement("input", _extends({}, !isPasswordInput && !isEmailInput && {
83
- maxLength: maxlength
84
- }, isEmailInput && {
85
- autoCapitalize: 'none'
86
- }, isRequired && {
87
- required: true
88
- }, !isValid && {
89
- 'aria-invalid': true
90
- }, {
91
- type: isDefaultType ? 'text' : type,
92
- "aria-label": ariaLabel,
93
- autoComplete: isDefaultType ? 'on' : autocomplete,
94
- autoCorrect: 'off',
95
- className: (0, _classnames.default)(_style.default.textInput, inputClassName),
96
- "data-testid": dataTestid,
97
- disabled: disabled,
98
- id: name,
99
- name: name,
100
- onInput: handleInputChange,
101
- placeholder: placeholder,
102
- value: value,
103
- style: errorStyle
104
- })), /*#__PURE__*/_react.default.createElement("div", {
105
- className: _style.default.hintWrapper
106
- }, /*#__PURE__*/_react.default.createElement("span", {
107
- className: _style.default.hint
108
- }, hint)));
109
- };
110
-
111
- FormTextInput.propTypes = process.env.NODE_ENV !== "production" ? _propTypes.default : {};
112
- var _default = FormTextInput;
113
- exports.default = _default;
114
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":["validate","fieldValue","fieldEqualsValue","isEqual","VALID_EMAIL_PATTERN","validatePattern","pattern","test","DEFAULT_MAX_LENGTH","isEqualsDefined","equals","isEmpty","FormTextInput","ariaLabel","autocomplete","dataTestid","disabled","hint","inputClassName","isRequired","isValid","label","maxlength","name","onChange","noop","passwordValidator","placeholder","type","value","wrapperClassName","isDefaultType","useMemo","TextInput","default","isPasswordInput","password","passwordConfirmation","isEmailInput","email","handleInputChange","useCallback","event","newInput","target","isNewValueValid","validPattern","isPasswordCompliant","checkResult","fieldLabel","errorStyle","undefined","border","classnames","style","wrapper","formLabel","maxLength","autoCapitalize","required","textInput","hintWrapper","propTypes"],"sources":["../../../src/atom/form-text-input/index.tsx"],"sourcesContent":["import React, {useCallback, useMemo, FormEvent} from 'react';\nimport classnames from 'classnames';\nimport isEmpty from 'lodash/fp/isEmpty';\nimport isEqual from 'lodash/fp/isEqual';\nimport noop from 'lodash/fp/noop';\nimport propTypes, {FieldValue, FormTextInputProps, TextInput} from './prop-types';\nimport style from './style.css';\n\nconst validate = (fieldValue: FieldValue, fieldEqualsValue: FieldValue) => {\n return isEqual(fieldValue, fieldEqualsValue);\n};\n\nconst VALID_EMAIL_PATTERN =\n /[a-z0-9!#$%&'*+=?^_`{|}~-]+(?:.[a-z0-9!#$%&'*+=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?/;\n\nconst validatePattern = (fieldValue: string, pattern: RegExp) => {\n return pattern.test(fieldValue);\n};\n\nconst DEFAULT_MAX_LENGTH = 150;\n\nconst isEqualsDefined = (equals: FieldValue | undefined): equals is FieldValue => !isEmpty(equals);\n\nconst FormTextInput = ({\n 'aria-label': ariaLabel,\n autocomplete,\n 'data-testid': dataTestid = 'form-text-input',\n disabled,\n hint,\n inputClassName,\n isRequired,\n isValid,\n label,\n maxlength = DEFAULT_MAX_LENGTH,\n name,\n onChange = noop,\n passwordValidator = () => false,\n placeholder,\n type = 'default',\n value,\n equals,\n wrapperClassName\n}: FormTextInputProps) => {\n const isDefaultType = useMemo(() => !type || type === TextInput.default, [type]);\n\n const isPasswordInput = useMemo(\n () => type === TextInput.password || type === TextInput.passwordConfirmation,\n [type]\n );\n\n const isEmailInput = useMemo(() => type === TextInput.email, [type]);\n\n const handleInputChange = useCallback(\n (event: FormEvent<HTMLInputElement>) => {\n const newInput: FieldValue = (event.target as HTMLInputElement).value;\n const isNewValueValid = !isEqualsDefined(equals) || validate(newInput, equals);\n const validPattern = !isEmailInput || validatePattern(newInput, VALID_EMAIL_PATTERN);\n const isPasswordCompliant = !isPasswordInput || passwordValidator(newInput);\n\n const checkResult = isPasswordCompliant && isNewValueValid && validPattern;\n\n onChange(newInput, checkResult);\n },\n [equals, isEmailInput, isPasswordInput, onChange, passwordValidator]\n );\n\n const fieldLabel = useMemo(() => `${label} ${isRequired ? '*' : ''}`, [isRequired, label]);\n\n const errorStyle = useMemo(\n () => (isValid ? undefined : {border: '2px solid rgb(247, 63, 82)'}),\n [isValid]\n );\n\n return (\n <div className={classnames(style.wrapper, wrapperClassName)}>\n <label className={style.formLabel} htmlFor={name}>\n {fieldLabel}\n </label>\n <input\n {...(!isPasswordInput && !isEmailInput && {maxLength: maxlength})}\n {...(isEmailInput && {autoCapitalize: 'none'})}\n {...(isRequired && {required: true})}\n {...(!isValid && {'aria-invalid': true})}\n type={isDefaultType ? 'text' : type}\n aria-label={ariaLabel}\n autoComplete={isDefaultType ? 'on' : autocomplete}\n autoCorrect={'off'}\n className={classnames(style.textInput, inputClassName)}\n data-testid={dataTestid}\n disabled={disabled}\n id={name}\n name={name}\n onInput={handleInputChange}\n placeholder={placeholder}\n value={value}\n style={errorStyle}\n />\n <div className={style.hintWrapper}>\n <span className={style.hint}>{hint}</span>\n </div>\n </div>\n );\n};\n\nFormTextInput.propTypes = propTypes;\n\nexport default FormTextInput;\n"],"mappings":"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"}
@@ -1,56 +0,0 @@
1
- import PropTypes from 'prop-types';
2
- export declare const TextInput: {
3
- readonly country: "country";
4
- readonly email: "email";
5
- readonly firstName: "firstName";
6
- readonly lastName: "lastName";
7
- readonly language: "language";
8
- readonly login: "login";
9
- readonly password: "password";
10
- readonly passwordConfirmation: "passwordConfirmation";
11
- readonly default: "default";
12
- };
13
- declare const propTypes: {
14
- 'aria-label': PropTypes.Requireable<string>;
15
- autocomplete: PropTypes.Requireable<string>;
16
- 'data-testid': PropTypes.Requireable<string>;
17
- disabled: PropTypes.Requireable<boolean>;
18
- equals: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
19
- hint: PropTypes.Requireable<string>;
20
- inputClassName: PropTypes.Requireable<string>;
21
- isRequired: PropTypes.Requireable<boolean>;
22
- isValid: PropTypes.Requireable<boolean>;
23
- label: PropTypes.Requireable<string>;
24
- maxlength: PropTypes.Requireable<number>;
25
- name: PropTypes.Requireable<string>;
26
- onChange: PropTypes.Requireable<(...args: any[]) => any>;
27
- passwordValidator: PropTypes.Requireable<(...args: any[]) => any>;
28
- placeholder: PropTypes.Requireable<string>;
29
- type: PropTypes.Requireable<string>;
30
- value: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
31
- wrapperClassName: PropTypes.Requireable<string>;
32
- };
33
- declare type TextInputType = keyof typeof TextInput;
34
- export declare type FieldValue = string | number;
35
- export declare type FormTextInputProps = {
36
- 'aria-label'?: string;
37
- autocomplete?: string;
38
- 'data-testid'?: string;
39
- disabled?: boolean;
40
- equals?: FieldValue;
41
- hint?: string;
42
- inputClassName?: string | null;
43
- isRequired?: boolean;
44
- isValid?: boolean;
45
- label: string;
46
- maxlength?: number;
47
- name: string;
48
- onChange?: (value: FieldValue, isValid?: boolean) => void;
49
- passwordValidator?: (password: string) => boolean;
50
- placeholder?: string;
51
- type?: TextInputType;
52
- value: FieldValue;
53
- wrapperClassName?: string | null;
54
- };
55
- export default propTypes;
56
- //# sourceMappingURL=prop-types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/atom/form-text-input/prop-types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAGnC,eAAO,MAAM,SAAS;;;;;;;;;;CAUZ,CAAC;AAEX,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;CAmBd,CAAC;AAEF,aAAK,aAAa,GAAG,MAAM,OAAO,SAAS,CAAC;AAE5C,oBAAY,UAAU,GAAG,MAAM,GAAG,MAAM,CAAC;AAEzC,oBAAY,kBAAkB,GAAG;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1D,iBAAiB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC;IAClD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,KAAK,EAAE,UAAU,CAAC;IAClB,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -1,46 +0,0 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports.default = exports.TextInput = void 0;
5
-
6
- var _propTypes = _interopRequireDefault(require("prop-types"));
7
-
8
- var _keys = _interopRequireDefault(require("lodash/fp/keys"));
9
-
10
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
-
12
- const TextInput = {
13
- country: 'country',
14
- email: 'email',
15
- firstName: 'firstName',
16
- lastName: 'lastName',
17
- language: 'language',
18
- login: 'login',
19
- password: 'password',
20
- passwordConfirmation: 'passwordConfirmation',
21
- default: 'default'
22
- };
23
- exports.TextInput = TextInput;
24
- const propTypes = {
25
- 'aria-label': _propTypes.default.string,
26
- autocomplete: _propTypes.default.string,
27
- 'data-testid': _propTypes.default.string,
28
- disabled: _propTypes.default.bool,
29
- equals: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
30
- hint: _propTypes.default.string,
31
- inputClassName: _propTypes.default.string,
32
- isRequired: _propTypes.default.bool,
33
- isValid: _propTypes.default.bool,
34
- label: _propTypes.default.string,
35
- maxlength: _propTypes.default.number,
36
- name: _propTypes.default.string,
37
- onChange: _propTypes.default.func,
38
- passwordValidator: _propTypes.default.func,
39
- placeholder: _propTypes.default.string,
40
- type: _propTypes.default.oneOf((0, _keys.default)(TextInput)),
41
- value: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
42
- wrapperClassName: _propTypes.default.string
43
- };
44
- var _default = propTypes;
45
- exports.default = _default;
46
- //# sourceMappingURL=prop-types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"prop-types.js","names":["TextInput","country","email","firstName","lastName","language","login","password","passwordConfirmation","default","propTypes","PropTypes","string","autocomplete","disabled","bool","equals","oneOfType","number","hint","inputClassName","isRequired","isValid","label","maxlength","name","onChange","func","passwordValidator","placeholder","type","oneOf","keys","value","wrapperClassName"],"sources":["../../../src/atom/form-text-input/prop-types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport keys from 'lodash/fp/keys';\n\nexport const TextInput = {\n country: 'country',\n email: 'email',\n firstName: 'firstName',\n lastName: 'lastName',\n language: 'language',\n login: 'login',\n password: 'password',\n passwordConfirmation: 'passwordConfirmation',\n default: 'default'\n} as const;\n\nconst propTypes = {\n 'aria-label': PropTypes.string,\n autocomplete: PropTypes.string,\n 'data-testid': PropTypes.string,\n disabled: PropTypes.bool,\n equals: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n hint: PropTypes.string,\n inputClassName: PropTypes.string,\n isRequired: PropTypes.bool,\n isValid: PropTypes.bool,\n label: PropTypes.string,\n maxlength: PropTypes.number,\n name: PropTypes.string,\n onChange: PropTypes.func,\n passwordValidator: PropTypes.func,\n placeholder: PropTypes.string,\n type: PropTypes.oneOf(keys(TextInput)),\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n wrapperClassName: PropTypes.string\n};\n\ntype TextInputType = keyof typeof TextInput;\n\nexport type FieldValue = string | number;\n\nexport type FormTextInputProps = {\n 'aria-label'?: string;\n autocomplete?: string;\n 'data-testid'?: string;\n disabled?: boolean;\n equals?: FieldValue;\n hint?: string;\n inputClassName?: string | null;\n isRequired?: boolean;\n isValid?: boolean;\n label: string;\n maxlength?: number;\n name: string;\n onChange?: (value: FieldValue, isValid?: boolean) => void;\n passwordValidator?: (password: string) => boolean;\n placeholder?: string;\n type?: TextInputType;\n value: FieldValue;\n wrapperClassName?: string | null;\n};\n\nexport default propTypes;\n"],"mappings":";;;;;AAAA;;AACA;;;;AAEO,MAAMA,SAAS,GAAG;EACvBC,OAAO,EAAE,SADc;EAEvBC,KAAK,EAAE,OAFgB;EAGvBC,SAAS,EAAE,WAHY;EAIvBC,QAAQ,EAAE,UAJa;EAKvBC,QAAQ,EAAE,UALa;EAMvBC,KAAK,EAAE,OANgB;EAOvBC,QAAQ,EAAE,UAPa;EAQvBC,oBAAoB,EAAE,sBARC;EASvBC,OAAO,EAAE;AATc,CAAlB;;AAYP,MAAMC,SAAS,GAAG;EAChB,cAAcC,kBAAA,CAAUC,MADR;EAEhBC,YAAY,EAAEF,kBAAA,CAAUC,MAFR;EAGhB,eAAeD,kBAAA,CAAUC,MAHT;EAIhBE,QAAQ,EAAEH,kBAAA,CAAUI,IAJJ;EAKhBC,MAAM,EAAEL,kBAAA,CAAUM,SAAV,CAAoB,CAACN,kBAAA,CAAUC,MAAX,EAAmBD,kBAAA,CAAUO,MAA7B,CAApB,CALQ;EAMhBC,IAAI,EAAER,kBAAA,CAAUC,MANA;EAOhBQ,cAAc,EAAET,kBAAA,CAAUC,MAPV;EAQhBS,UAAU,EAAEV,kBAAA,CAAUI,IARN;EAShBO,OAAO,EAAEX,kBAAA,CAAUI,IATH;EAUhBQ,KAAK,EAAEZ,kBAAA,CAAUC,MAVD;EAWhBY,SAAS,EAAEb,kBAAA,CAAUO,MAXL;EAYhBO,IAAI,EAAEd,kBAAA,CAAUC,MAZA;EAahBc,QAAQ,EAAEf,kBAAA,CAAUgB,IAbJ;EAchBC,iBAAiB,EAAEjB,kBAAA,CAAUgB,IAdb;EAehBE,WAAW,EAAElB,kBAAA,CAAUC,MAfP;EAgBhBkB,IAAI,EAAEnB,kBAAA,CAAUoB,KAAV,CAAgB,IAAAC,aAAA,EAAKhC,SAAL,CAAhB,CAhBU;EAiBhBiC,KAAK,EAAEtB,kBAAA,CAAUM,SAAV,CAAoB,CAACN,kBAAA,CAAUC,MAAX,EAAmBD,kBAAA,CAAUO,MAA7B,CAApB,CAjBS;EAkBhBgB,gBAAgB,EAAEvB,kBAAA,CAAUC;AAlBZ,CAAlB;eA8CeF,S"}
@@ -1,53 +0,0 @@
1
- @value colors: "../../variables/colors.css";
2
- @value dark from colors;
3
- @value cm_grey_400 from colors;
4
- @value cm_grey_450 from colors;
5
- @value white from colors;
6
-
7
- .wrapper {
8
- margin: 10px 0;
9
- position: relative;
10
- font-family: 'Gilroy';
11
- }
12
-
13
- .formLabel {
14
- font-size: 13px;
15
- text-align: left;
16
- /* temporal */
17
- color: dark;
18
- display: block;
19
- margin-bottom: 7px;
20
- width: 100%;
21
- }
22
-
23
- .textInput {
24
- width: 100%;
25
- height: 59px;
26
- background-color: white;
27
- border: solid 1px cm_grey_450;
28
- text-align: left;
29
- margin-bottom: 26px;
30
-
31
- appearance: none;
32
- padding: 0 8px 0 15px;
33
- border-radius: 0;
34
-
35
- box-sizing: border-box;
36
- cursor: text;
37
-
38
- color: inherit;
39
- font: inherit;
40
- overflow: visible;
41
- }
42
-
43
- .hintWrapper {
44
- font-size: 12px;
45
- margin-top: -20px;
46
- margin-bottom: 20px;
47
- }
48
-
49
- .hint {
50
- color: cm_grey_400;
51
- text-align: left;
52
- font-style: italic;
53
- }