intelicoreact 1.2.6 → 1.2.8

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.
@@ -395,6 +395,7 @@ function InputMask() {
395
395
 
396
396
  var charCenterX = charX + charWidth / 2; // If Char X-Coord Out Of Range
397
397
 
398
+ // If Char X-Coord Out Of Range
398
399
  if (!charX || minX > charCenterX || maxX < charCenterX) return resObj;
399
400
  if (resObj.index === null || minX <= charCenterX && charCenterX >= maxX && charCenterX < resObj.charX) return {
400
401
  index: index,
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ var _typeof = require("@babel/runtime/helpers/typeof");
6
+
7
+ Object.defineProperty(exports, "__esModule", {
8
+ value: true
9
+ });
10
+ exports.default = void 0;
11
+
12
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
13
+
14
+ var _react = _interopRequireWildcard(require("react"));
15
+
16
+ var _classnames = _interopRequireDefault(require("classnames"));
17
+
18
+ var _reactFeather = require("react-feather");
19
+
20
+ require("./AccordionText.scss");
21
+
22
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(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
+ var AccordionText = function AccordionText(_ref) {
27
+ var _ref$isDefaultOpen = _ref.isDefaultOpen,
28
+ isDefaultOpen = _ref$isDefaultOpen === void 0 ? false : _ref$isDefaultOpen,
29
+ className = _ref.className,
30
+ _ref$text = _ref.text,
31
+ text = _ref$text === void 0 ? 'Default Accordion Text. Lorem ipsum dolor sit amettttttttttttttt, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.' : _ref$text;
32
+
33
+ var _useState = (0, _react.useState)(isDefaultOpen),
34
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
35
+ isOpen = _useState2[0],
36
+ setIsOpen = _useState2[1];
37
+
38
+ return /*#__PURE__*/_react.default.createElement("div", {
39
+ className: (0, _classnames.default)('accordion-text', className, {
40
+ 'accordion-text--open': isOpen
41
+ }),
42
+ onClick: function onClick() {
43
+ return setIsOpen(function (isOpen) {
44
+ return !isOpen;
45
+ });
46
+ }
47
+ }, /*#__PURE__*/_react.default.createElement("div", {
48
+ className: "accordion-text__body"
49
+ }, text), /*#__PURE__*/_react.default.createElement("div", {
50
+ className: "accordion-text__toggle"
51
+ }, isOpen ? /*#__PURE__*/_react.default.createElement(_reactFeather.ChevronUp, null) : /*#__PURE__*/_react.default.createElement(_reactFeather.ChevronDown, null)));
52
+ };
53
+
54
+ var _default = AccordionText;
55
+ exports.default = _default;
@@ -0,0 +1,45 @@
1
+ .accordion-text {
2
+ position: relative;
3
+ padding: 4px 24px 4px 8px;
4
+ border-radius: 4px;
5
+ background-color: rgba(48, 57, 91, 0.05);
6
+ cursor: pointer;
7
+
8
+ overflow: hidden;
9
+
10
+ height: 100%;
11
+ max-height: 18px;
12
+
13
+ font-size: 12px;
14
+ font-weight: 400;
15
+ line-height: 18px;
16
+
17
+ &--open {
18
+ max-height: none;
19
+ }
20
+
21
+ &--open &__body {
22
+ overflow: visible;
23
+ white-space: wrap;
24
+ }
25
+
26
+ &__body {
27
+ overflow: hidden;
28
+ text-overflow: ellipsis;
29
+ white-space: nowrap;
30
+ }
31
+
32
+ &__toggle {
33
+ position: absolute;
34
+ right: 0;
35
+ top: 0;
36
+ width: 16px;
37
+ height: 16px;
38
+ margin: 4px;
39
+ display: flex;
40
+ align-items: center;
41
+ justify-content: center;
42
+ padding: 2px;
43
+ color: #A0A4B0;
44
+ }
45
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intelicoreact",
3
- "version": "1.2.6",
3
+ "version": "1.2.8",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "files": [
@@ -1,176 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', {
4
- value: true,
5
- });
6
- exports.MASK_PRESET = void 0;
7
-
8
- /**
9
- * @param type: 'inputMask',
10
- * @param maskPattern: 'DD.DD.DDDD',
11
- * @param maskPatternPlaceholder: 'MM.DD.YYYY',
12
- * @param usePatternPlaceholder: true,
13
- * @param isNumericMobileKeyboard: true,
14
- * @param blinkErrors: true,
15
- * @param showErrors: false,
16
- * @param autocomplete: 'bday',
17
- * @param focusSelector: 'input',
18
- */
19
- var DATE_PRESET = {
20
- type: 'inputMask',
21
- maskPattern: 'DD.DD.DDDD',
22
- maskPatternPlaceholder: 'MM.DD.YYYY',
23
- usePatternPlaceholder: true,
24
- isNumericMobileKeyboard: true,
25
- blinkErrors: true,
26
- showErrors: false,
27
- autocomplete: 'bday',
28
- focusSelector: 'input',
29
- };
30
- /**
31
- * @param type: 'inputMask',
32
- * @param maskPattern: 'DDDDD',
33
- * @param maskPlaceholder: 'X',
34
- * @param isNumericMobileKeyboard: true,
35
- * @param blinkErrors: true,
36
- * @param showErrors: false,
37
- * @param focusSelector: 'input',
38
- * @param autocomplete: 'postal-code',
39
- * @param rules: 'fieldZip'
40
- */
41
-
42
- var ZIP_PRESET = {
43
- type: 'inputMask',
44
- focusSelector: 'input',
45
- maskPattern: 'DDDDD',
46
- maskPlaceholder: 'X',
47
- isNumericMobileKeyboard: true,
48
- blinkErrors: true,
49
- showErrors: false,
50
- autocomplete: 'postal-code',
51
- rules: 'fieldZip',
52
- };
53
- /**
54
- * @param type: 'inputMask',
55
- * @param maskPattern: 'DDDDDDDDD',
56
- * @param maskPlaceholder: 'X',
57
- * @param isNumericMobileKeyboard: true,
58
- * @param blinkErrors: true,
59
- * @param showErrors: false,
60
- * @param focusSelector: 'input',
61
- */
62
-
63
- var SSN_PRESET = {
64
- type: 'inputMask',
65
- maskPattern: 'DDDDDDDDD',
66
- maskPlaceholder: 'X',
67
- focusSelector: 'input',
68
- isNumericMobileKeyboard: true,
69
- blinkErrors: true,
70
- showErrors: false,
71
- };
72
- /**
73
- * @param type: 'inputMask',
74
- * @param maskPattern: 'DDD-DDD-DDDD',
75
- * @param maskPlaceholder: 'X',
76
- * @param isNumericMobileKeyboard: true,
77
- * @param blinkErrors: true,
78
- * @param showErrors: false,
79
- * @param focusSelector: 'input',
80
- * @param autocomplete: 'tel-national',
81
- */
82
-
83
- var MOBILE_PHONE_PRESET = {
84
- type: 'inputMask',
85
- maskPattern: 'DDD-DDD-DDDD',
86
- maskPlaceholder: 'X',
87
- focusSelector: 'input',
88
- isNumericMobileKeyboard: true,
89
- blinkErrors: true,
90
- showErrors: false,
91
- autocomplete: 'tel-national',
92
- };
93
- /**
94
- * @param type: 'inputMask3',
95
- * @param maskPattern: 'DDDD',
96
- * @param maskPlaceholder: 'X',
97
- * @param isNumericMobileKeyboard: true,
98
- * @param blinkErrors: true,
99
- * @param showErrors: false,
100
- */
101
-
102
- var SHORT_SSN_PRESET = {
103
- type: 'inputMask3',
104
- maskPattern: 'DDDD',
105
- maskPlaceholder: 'X',
106
- focusSelector: 'input',
107
- isNumericMobileKeyboard: true,
108
- blinkErrors: true,
109
- showErrors: false,
110
- };
111
- /**
112
- * @param type: 'inputMask',
113
- * @param maskPattern: 'DDDDDDDDD',
114
- * @param maskPlaceholder: 'X',
115
- * @param isNumericMobileKeyboard: true,
116
- * @param blinkErrors: true,
117
- * @param showErrors: false,
118
- */
119
-
120
- var ABA_PRESET = {
121
- type: 'inputMask',
122
- maskPattern: 'DDDDDDDDD',
123
- maskPlaceholder: 'X',
124
- isNumericMobileKeyboard: true,
125
- blinkErrors: true,
126
- showErrors: false,
127
- };
128
- /**
129
- * @param type: 'inputMask',
130
- * @param maskPattern: 'MM/YY',
131
- * @param maskPatternPlaceholder: 'MM/YY',
132
- * @param usePatternPlaceholder: true,
133
- * @param isNumericMobileKeyboard: true,
134
- * @param blinkErrors: true,
135
- * @param showErrors: false,
136
- * @param focusSelector: 'input',
137
- */
138
-
139
- var CC_EXPIRATION_DATE = {
140
- type: 'inputMask',
141
- maskPattern: 'MM/YY',
142
- maskPatternPlaceholder: 'MM/YY',
143
- usePatternPlaceholder: true,
144
- isNumericMobileKeyboard: true,
145
- blinkErrors: true,
146
- showErrors: false,
147
- focusSelector: 'input',
148
- };
149
- /**
150
- * @param type: 'inputMask',
151
- * @param maskPattern: 'DDDDDDDDDD',
152
- * @param maskPlaceholder: 'X',
153
- * @param isNumericMobileKeyboard: true,
154
- * @param blinkErrors: true,
155
- * @param showErrors: false,
156
- */
157
-
158
- var BANK_ACCOUNT = {
159
- type: 'inputMask',
160
- maskPattern: 'DDDDDDDDDD',
161
- maskPlaceholder: 'X',
162
- isNumericMobileKeyboard: true,
163
- blinkErrors: true,
164
- showErrors: false,
165
- };
166
- var MASK_PRESET = {
167
- BANK_ACCOUNT: BANK_ACCOUNT,
168
- CC_EXPIRATION_DATE: CC_EXPIRATION_DATE,
169
- DATE_PRESET: DATE_PRESET,
170
- ZIP_PRESET: ZIP_PRESET,
171
- SSN_PRESET: SSN_PRESET,
172
- MOBILE_PHONE_PRESET: MOBILE_PHONE_PRESET,
173
- SHORT_SSN_PRESET: SHORT_SSN_PRESET,
174
- ABA_PRESET: ABA_PRESET,
175
- };
176
- exports.MASK_PRESET = MASK_PRESET;