@justfixnyc/component-library 0.51.7 → 0.53.0
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/dist/src/index.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _extends from '@babel/runtime/helpers/extends';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
import React, { forwardRef, useId } from 'react';
|
|
4
|
-
import { faBan, faXmark, faDownload as faDownload$1, faBuildingColumns, faAddressCard, faBuilding, faMapLocationDot, faMemoPad, faHouse, faGlobe, faUser, faSpinner, faBars, faEnvelope, faCommentSms, faCirclePlus, faCircleInfo, faCircleExclamation, faChevronRight, faChevronLeft, faChevronDown, faChevronUp, faCheck, faCaretDown, faCaretRight, faSquareArrowUpRight, faArrowDownWideShort, faArrowUpShortWide, faArrowUpArrowDown, faArrowDownLong, faArrowUpLong, faArrowDown, faArrowUp, faArrowRight, faArrowLeft } from '@awesome.me/kit-dd32553919/icons/classic/solid';
|
|
5
|
-
import { faEyeSlash, faDownload } from '@awesome.me/kit-dd32553919/icons/classic/regular';
|
|
4
|
+
import { faBan, faXmark, faDownload as faDownload$1, faBuildingColumns, faAddressCard, faBuilding, faMapLocationDot, faMemoPad, faHouse, faGlobe, faUser, faSpinner, faBars, faEnvelope, faCommentSms, faCirclePlus, faCircleInfo, faCircleExclamation as faCircleExclamation$1, faChevronRight, faChevronLeft, faChevronDown, faChevronUp, faCheck, faCaretDown, faCaretRight, faSquareArrowUpRight, faArrowsRotateReverse, faArrowDownWideShort, faArrowUpShortWide, faArrowUpArrowDown, faArrowDownLong, faArrowUpLong, faArrowDown, faArrowUp, faArrowRight, faArrowLeft } from '@awesome.me/kit-dd32553919/icons/classic/solid';
|
|
5
|
+
import { faPrint, faEyeSlash, faEye, faDownload, faCircleExclamation } from '@awesome.me/kit-dd32553919/icons/classic/regular';
|
|
6
6
|
import { faXTwitter, faTwitter, faFacebookF } from '@awesome.me/kit-dd32553919/icons/classic/brands';
|
|
7
7
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
8
8
|
import Select, { components } from 'react-select';
|
|
@@ -43,6 +43,9 @@ const Icon = _ref => {
|
|
|
43
43
|
case 'arrowDownWideShort':
|
|
44
44
|
faIcon = faArrowDownWideShort;
|
|
45
45
|
break;
|
|
46
|
+
case 'arrowsRotateReverse':
|
|
47
|
+
faIcon = faArrowsRotateReverse;
|
|
48
|
+
break;
|
|
46
49
|
case 'squareArrowUpRight':
|
|
47
50
|
faIcon = faSquareArrowUpRight;
|
|
48
51
|
break;
|
|
@@ -68,7 +71,7 @@ const Icon = _ref => {
|
|
|
68
71
|
faIcon = faChevronRight;
|
|
69
72
|
break;
|
|
70
73
|
case 'circleExclamation':
|
|
71
|
-
faIcon = faCircleExclamation;
|
|
74
|
+
if (type === 'regular') faIcon = faCircleExclamation;else faIcon = faCircleExclamation$1;
|
|
72
75
|
break;
|
|
73
76
|
case 'circleInfo':
|
|
74
77
|
faIcon = faCircleInfo;
|
|
@@ -130,9 +133,15 @@ const Icon = _ref => {
|
|
|
130
133
|
case 'ban':
|
|
131
134
|
faIcon = faBan;
|
|
132
135
|
break;
|
|
136
|
+
case 'eye':
|
|
137
|
+
faIcon = faEye;
|
|
138
|
+
break;
|
|
133
139
|
case 'eyeSlash':
|
|
134
140
|
faIcon = faEyeSlash;
|
|
135
141
|
break;
|
|
142
|
+
case 'print':
|
|
143
|
+
faIcon = faPrint;
|
|
144
|
+
break;
|
|
136
145
|
default:
|
|
137
146
|
console.warn("".concat(icon, " is not a supported icon name."));
|
|
138
147
|
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
@@ -296,6 +305,7 @@ const InputHeader = _ref2 => {
|
|
|
296
305
|
isLegend,
|
|
297
306
|
headerText,
|
|
298
307
|
helperText,
|
|
308
|
+
helperElement,
|
|
299
309
|
invalid,
|
|
300
310
|
invalidText
|
|
301
311
|
} = _ref2;
|
|
@@ -304,11 +314,11 @@ const InputHeader = _ref2 => {
|
|
|
304
314
|
labelFor: labelFor,
|
|
305
315
|
isLegend: isLegend,
|
|
306
316
|
headerText: headerText,
|
|
307
|
-
hasHelperText: !!helperText
|
|
308
|
-
}), helperText && /*#__PURE__*/React.createElement("div", {
|
|
317
|
+
hasHelperText: !!helperText && !helperElement
|
|
318
|
+
}), helperText && !helperElement && /*#__PURE__*/React.createElement("div", {
|
|
309
319
|
className: "jfcl-input-header__helper_text",
|
|
310
320
|
"data-testid": "helper-text"
|
|
311
|
-
}, helperText), invalid && invalidText && /*#__PURE__*/React.createElement("div", {
|
|
321
|
+
}, helperText), helperElement, invalid && invalidText && /*#__PURE__*/React.createElement("div", {
|
|
312
322
|
className: "jfcl-input-header__invalid_text",
|
|
313
323
|
"data-testid": "error"
|
|
314
324
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
@@ -430,6 +440,7 @@ const FormGroup = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
430
440
|
invalidText,
|
|
431
441
|
invalid,
|
|
432
442
|
helperText,
|
|
443
|
+
helperElement,
|
|
433
444
|
legendText,
|
|
434
445
|
...props
|
|
435
446
|
} = _ref;
|
|
@@ -443,6 +454,7 @@ const FormGroup = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
443
454
|
}), /*#__PURE__*/React.createElement(InputHeader, {
|
|
444
455
|
headerText: legendText,
|
|
445
456
|
helperText: helperText,
|
|
457
|
+
helperElement: helperElement,
|
|
446
458
|
invalid: invalid,
|
|
447
459
|
invalidText: invalidText,
|
|
448
460
|
isLegend: true
|
package/dist/src/index.js
CHANGED
|
@@ -54,6 +54,9 @@ const Icon = _ref => {
|
|
|
54
54
|
case 'arrowDownWideShort':
|
|
55
55
|
faIcon = solid.faArrowDownWideShort;
|
|
56
56
|
break;
|
|
57
|
+
case 'arrowsRotateReverse':
|
|
58
|
+
faIcon = solid.faArrowsRotateReverse;
|
|
59
|
+
break;
|
|
57
60
|
case 'squareArrowUpRight':
|
|
58
61
|
faIcon = solid.faSquareArrowUpRight;
|
|
59
62
|
break;
|
|
@@ -79,7 +82,7 @@ const Icon = _ref => {
|
|
|
79
82
|
faIcon = solid.faChevronRight;
|
|
80
83
|
break;
|
|
81
84
|
case 'circleExclamation':
|
|
82
|
-
faIcon = solid.faCircleExclamation;
|
|
85
|
+
if (type === 'regular') faIcon = regular.faCircleExclamation;else faIcon = solid.faCircleExclamation;
|
|
83
86
|
break;
|
|
84
87
|
case 'circleInfo':
|
|
85
88
|
faIcon = solid.faCircleInfo;
|
|
@@ -141,9 +144,15 @@ const Icon = _ref => {
|
|
|
141
144
|
case 'ban':
|
|
142
145
|
faIcon = solid.faBan;
|
|
143
146
|
break;
|
|
147
|
+
case 'eye':
|
|
148
|
+
faIcon = regular.faEye;
|
|
149
|
+
break;
|
|
144
150
|
case 'eyeSlash':
|
|
145
151
|
faIcon = regular.faEyeSlash;
|
|
146
152
|
break;
|
|
153
|
+
case 'print':
|
|
154
|
+
faIcon = regular.faPrint;
|
|
155
|
+
break;
|
|
147
156
|
default:
|
|
148
157
|
console.warn("".concat(icon, " is not a supported icon name."));
|
|
149
158
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null);
|
|
@@ -307,6 +316,7 @@ const InputHeader = _ref2 => {
|
|
|
307
316
|
isLegend,
|
|
308
317
|
headerText,
|
|
309
318
|
helperText,
|
|
319
|
+
helperElement,
|
|
310
320
|
invalid,
|
|
311
321
|
invalidText
|
|
312
322
|
} = _ref2;
|
|
@@ -315,11 +325,11 @@ const InputHeader = _ref2 => {
|
|
|
315
325
|
labelFor: labelFor,
|
|
316
326
|
isLegend: isLegend,
|
|
317
327
|
headerText: headerText,
|
|
318
|
-
hasHelperText: !!helperText
|
|
319
|
-
}), helperText && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
328
|
+
hasHelperText: !!helperText && !helperElement
|
|
329
|
+
}), helperText && !helperElement && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
320
330
|
className: "jfcl-input-header__helper_text",
|
|
321
331
|
"data-testid": "helper-text"
|
|
322
|
-
}, helperText), invalid && invalidText && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
332
|
+
}, helperText), helperElement, invalid && invalidText && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
323
333
|
className: "jfcl-input-header__invalid_text",
|
|
324
334
|
"data-testid": "error"
|
|
325
335
|
}, /*#__PURE__*/React__default["default"].createElement(Icon, {
|
|
@@ -441,6 +451,7 @@ const FormGroup = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref)
|
|
|
441
451
|
invalidText,
|
|
442
452
|
invalid,
|
|
443
453
|
helperText,
|
|
454
|
+
helperElement,
|
|
444
455
|
legendText,
|
|
445
456
|
...props
|
|
446
457
|
} = _ref;
|
|
@@ -454,6 +465,7 @@ const FormGroup = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref)
|
|
|
454
465
|
}), /*#__PURE__*/React__default["default"].createElement(InputHeader, {
|
|
455
466
|
headerText: legendText,
|
|
456
467
|
helperText: helperText,
|
|
468
|
+
helperElement: helperElement,
|
|
457
469
|
invalid: invalid,
|
|
458
470
|
invalidText: invalidText,
|
|
459
471
|
isLegend: true
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { FontAwesomeIconProps } from '@fortawesome/react-fontawesome';
|
|
3
|
-
export type IconNames = 'arrowLeft' | 'arrowRight' | 'arrowUp' | 'arrowDown' | 'arrowUpLong' | 'arrowDownLong' | 'arrowUpArrowDown' | 'arrowUpShortWide' | 'arrowDownWideShort' | 'squareArrowUpRight' | 'caretRight' | 'caretDown' | 'check' | 'chevronUp' | 'chevronDown' | 'chevronLeft' | 'chevronRight' | 'circleExclamation' | 'circleInfo' | 'circlePlus' | 'facebook' | 'twitter' | 'xTwitter' | 'sms' | 'envelope' | 'bars' | 'spinner' | 'user' | 'globe' | 'house' | 'memoPad' | 'mapLocationDot' | 'building' | 'addressCard' | 'buildingColumns' | 'download' | 'downloadRegular' | 'xmark' | 'ban' | 'eyeSlash';
|
|
3
|
+
export type IconNames = 'arrowLeft' | 'arrowRight' | 'arrowUp' | 'arrowDown' | 'arrowUpLong' | 'arrowDownLong' | 'arrowUpArrowDown' | 'arrowUpShortWide' | 'arrowDownWideShort' | 'arrowsRotateReverse' | 'squareArrowUpRight' | 'caretRight' | 'caretDown' | 'check' | 'chevronUp' | 'chevronDown' | 'chevronLeft' | 'chevronRight' | 'circleExclamation' | 'circleExclamationRegular' | 'circleInfo' | 'circlePlus' | 'facebook' | 'twitter' | 'xTwitter' | 'sms' | 'envelope' | 'bars' | 'spinner' | 'user' | 'globe' | 'house' | 'memoPad' | 'mapLocationDot' | 'building' | 'addressCard' | 'buildingColumns' | 'download' | 'downloadRegular' | 'xmark' | 'ban' | 'eye' | 'eyeSlash' | 'print';
|
|
4
4
|
export interface IconProps extends Omit<FontAwesomeIconProps, 'icon'> {
|
|
5
5
|
className?: string;
|
|
6
6
|
icon?: IconNames;
|