@justfixnyc/component-library 0.34.0 → 0.36.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/assets/index.css +403 -60
- package/dist/src/assets/index.es.css +403 -60
- package/dist/src/index.es.js +404 -322
- package/dist/src/index.js +410 -336
- package/dist/typings/{buttons → Components/Button}/Button.d.ts +2 -1
- package/dist/typings/Components/Dropdown/Dropdown.d.ts +17 -0
- package/dist/typings/Components/Icon/Icon.d.ts +8 -0
- package/dist/typings/index.d.ts +9 -4
- package/package.json +6 -4
- package/dist/typings/icons/Check.d.ts +0 -3
- package/dist/typings/icons/Check2.d.ts +0 -3
- package/dist/typings/icons/Chevron.d.ts +0 -3
- package/dist/typings/icons/Close.d.ts +0 -3
- package/dist/typings/icons/Error.d.ts +0 -3
- package/dist/typings/icons/Facebook.d.ts +0 -3
- package/dist/typings/icons/Globe.d.ts +0 -3
- package/dist/typings/icons/Hamburger.d.ts +0 -3
- package/dist/typings/icons/Icons.d.ts +0 -16
- package/dist/typings/icons/Internet.d.ts +0 -3
- package/dist/typings/icons/LinkExternal.d.ts +0 -3
- package/dist/typings/icons/LinkInternal.d.ts +0 -3
- package/dist/typings/icons/Loading.d.ts +0 -3
- package/dist/typings/icons/Mail.d.ts +0 -3
- package/dist/typings/icons/Person.d.ts +0 -3
- package/dist/typings/icons/Twitter.d.ts +0 -3
- /package/dist/typings/{alerts → Components/Alert}/Alert.d.ts +0 -0
- /package/dist/typings/{Checkbox → Components/Checkbox}/Checkbox.d.ts +0 -0
- /package/dist/typings/{FormGroup → Components/FormGroup}/FormGroup.d.ts +0 -0
- /package/dist/typings/{InputHeader → Components/InputHeader}/InputHeader.d.ts +0 -0
- /package/dist/typings/{link → Components/Link}/Link.d.ts +0 -0
- /package/dist/typings/{RadioButton → Components/RadioButton}/RadioButton.d.ts +0 -0
- /package/dist/typings/{textInput → Components/TextInput}/TextInput.d.ts +0 -0
package/dist/src/index.es.js
CHANGED
|
@@ -1,323 +1,85 @@
|
|
|
1
1
|
import _extends from '@babel/runtime/helpers/extends';
|
|
2
|
-
import React, { forwardRef } from 'react';
|
|
3
2
|
import classNames from 'classnames';
|
|
4
|
-
import {
|
|
3
|
+
import React, { forwardRef, useId } from 'react';
|
|
4
|
+
import { faXmark, faDownload, faGlobe, faUser, faSpinner, faBars, faEnvelope, faCirclePlus, faCircleExclamation, faChevronRight, faChevronLeft, faChevronDown, faChevronUp, faCheck, faSquareArrowUpRight, faArrowRight, faArrowLeft } from '@fortawesome/free-solid-svg-icons';
|
|
5
|
+
import { faTwitter, faFacebookF } from '@fortawesome/free-brands-svg-icons';
|
|
5
6
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
7
|
+
import Select, { components } from 'react-select';
|
|
6
8
|
|
|
7
|
-
|
|
8
|
-
* Accepts all `ButtonHTMLAttributes`
|
|
9
|
-
*/
|
|
10
|
-
const Button = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
9
|
+
const Icon = _ref => {
|
|
11
10
|
let {
|
|
12
|
-
labelText,
|
|
13
|
-
variant = 'primary',
|
|
14
|
-
size = 'large',
|
|
15
|
-
loading,
|
|
16
|
-
labelIcon: ButtonIcon,
|
|
17
|
-
iconOnRight,
|
|
18
|
-
iconOnly,
|
|
19
11
|
className,
|
|
20
|
-
|
|
12
|
+
icon
|
|
21
13
|
} = _ref;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
14
|
+
let faIcon;
|
|
15
|
+
switch (icon) {
|
|
16
|
+
case 'arrowLeft':
|
|
17
|
+
faIcon = faArrowLeft;
|
|
18
|
+
break;
|
|
19
|
+
case 'arrowRight':
|
|
20
|
+
faIcon = faArrowRight;
|
|
21
|
+
break;
|
|
22
|
+
case 'squareArrowUpRight':
|
|
23
|
+
faIcon = faSquareArrowUpRight;
|
|
24
|
+
break;
|
|
25
|
+
case 'check':
|
|
26
|
+
faIcon = faCheck;
|
|
27
|
+
break;
|
|
28
|
+
case 'chevronUp':
|
|
29
|
+
faIcon = faChevronUp;
|
|
30
|
+
break;
|
|
31
|
+
case 'chevronDown':
|
|
32
|
+
faIcon = faChevronDown;
|
|
33
|
+
break;
|
|
34
|
+
case 'chevronLeft':
|
|
35
|
+
faIcon = faChevronLeft;
|
|
36
|
+
break;
|
|
37
|
+
case 'chevronRight':
|
|
38
|
+
faIcon = faChevronRight;
|
|
39
|
+
break;
|
|
40
|
+
case 'circleExclamation':
|
|
41
|
+
faIcon = faCircleExclamation;
|
|
42
|
+
break;
|
|
43
|
+
case 'circlePlus':
|
|
44
|
+
faIcon = faCirclePlus;
|
|
45
|
+
break;
|
|
46
|
+
case 'facebook':
|
|
47
|
+
faIcon = faFacebookF;
|
|
48
|
+
break;
|
|
49
|
+
case 'twitter':
|
|
50
|
+
faIcon = faTwitter;
|
|
51
|
+
break;
|
|
52
|
+
case 'envelope':
|
|
53
|
+
faIcon = faEnvelope;
|
|
54
|
+
break;
|
|
55
|
+
case 'bars':
|
|
56
|
+
faIcon = faBars;
|
|
57
|
+
break;
|
|
58
|
+
case 'spinner':
|
|
59
|
+
faIcon = faSpinner;
|
|
60
|
+
break;
|
|
61
|
+
case 'user':
|
|
62
|
+
faIcon = faUser;
|
|
63
|
+
break;
|
|
64
|
+
case 'globe':
|
|
65
|
+
faIcon = faGlobe;
|
|
66
|
+
break;
|
|
67
|
+
case 'download':
|
|
68
|
+
faIcon = faDownload;
|
|
69
|
+
break;
|
|
70
|
+
case 'xmark':
|
|
71
|
+
faIcon = faXmark;
|
|
72
|
+
break;
|
|
73
|
+
default:
|
|
74
|
+
console.warn("".concat(icon, " is not a supported icon name."));
|
|
75
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
27
76
|
}
|
|
28
|
-
return /*#__PURE__*/React.createElement(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
className: "jfcl-button__label"
|
|
35
|
-
}, loading && /*#__PURE__*/React.createElement("span", {
|
|
36
|
-
className: iconClassNames
|
|
37
|
-
}), !loading && ButtonIcon ? /*#__PURE__*/React.createElement("span", {
|
|
38
|
-
className: iconClassNames
|
|
39
|
-
}, /*#__PURE__*/React.createElement(ButtonIcon, {
|
|
40
|
-
"aria-hidden": "true"
|
|
41
|
-
})) : null, !iconOnly && /*#__PURE__*/React.createElement("span", {
|
|
42
|
-
className: "jfcl-button__text"
|
|
43
|
-
}, labelText)));
|
|
44
|
-
});
|
|
45
|
-
Button.displayName = 'Button';
|
|
46
|
-
|
|
47
|
-
const IconLoading = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
48
|
-
ref: ref
|
|
49
|
-
}, props, {
|
|
50
|
-
width: "16",
|
|
51
|
-
height: "16",
|
|
52
|
-
viewBox: "0 0 16 16",
|
|
53
|
-
fill: "none",
|
|
54
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
55
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
56
|
-
fill: "currentcolor",
|
|
57
|
-
fillRule: "evenodd",
|
|
58
|
-
clipRule: "evenodd",
|
|
59
|
-
d: "M8.04665 0.42435V1.72792C8.04665 2.29372 7.19133 2.29372 7.19133 1.72792V0.42435C7.19133 -0.14145 8.04665 -0.14145 8.04665 0.42435ZM9.26952 1.94354L9.71551 0.718589C9.90902 0.186994 10.7127 0.479531 10.5192 1.01113L10.0734 2.23608C9.87992 2.76768 9.0762 2.47514 9.26952 1.94354ZM11.1489 2.85706L11.9868 1.8585C12.3504 1.42499 13.0056 1.97491 12.642 2.40824L11.8041 3.4068C11.4405 3.84031 10.7851 3.29039 11.1489 2.85706ZM12.6023 4.35811L13.7313 3.70633C14.2213 3.42343 14.649 4.16422 14.1589 4.44712L13.03 5.09891C12.54 5.38181 12.1123 4.64101 12.6023 4.35811ZM13.4548 6.26585L14.7385 6.03945C15.2956 5.94118 15.4442 6.78365 14.8871 6.88191L13.6034 7.10812C13.0461 7.20639 12.8975 6.36412 13.4548 6.26585ZM13.6034 8.35008L14.8871 8.57629C15.4442 8.67456 15.2956 9.51702 14.7385 9.41875L13.4548 9.19236C12.8975 9.09409 13.0461 8.25182 13.6034 8.35008ZM13.03 10.3593L14.1589 11.0111C14.649 11.294 14.2213 12.0348 13.7313 11.7519L12.6023 11.1001C12.1123 10.8172 12.54 10.0764 13.03 10.3593ZM11.8041 12.0514L12.642 13.05C13.0056 13.4833 12.3504 14.0332 11.9868 13.5997L11.1489 12.6011C10.7851 12.1678 11.4405 11.6179 11.8041 12.0514ZM10.0734 13.2221L10.5192 14.4471C10.7127 14.9787 9.90902 15.2712 9.71551 14.7396L9.26952 13.5147C9.0762 12.9831 9.87992 12.6905 10.0734 13.2221ZM8.04665 13.7303V15.0339C8.04665 15.5997 7.19133 15.5997 7.19133 15.0339V13.7303C7.19133 13.1645 8.04665 13.1645 8.04665 13.7303ZM4.71875 14.4471L5.16455 13.2221C5.35806 12.6905 6.16178 12.9831 5.96846 13.5147L5.52247 14.7396C5.32896 15.2712 4.52523 14.9787 4.71875 14.4471ZM0.350902 8.57629L1.63463 8.35008C2.19192 8.25182 2.34046 9.09409 1.78316 9.19236L0.499438 9.41875C-0.0576685 9.51702 -0.206205 8.67456 0.350902 8.57629ZM0.499438 6.03945L1.78316 6.26585C2.34046 6.36412 2.19192 7.20639 1.63463 7.10812L0.350902 6.88191C-0.206205 6.78365 -0.0576685 5.94118 0.499438 6.03945ZM1.50669 3.70633L2.63564 4.35811C3.12566 4.64101 2.69801 5.38181 2.20799 5.09891L1.07903 4.44712C0.589014 4.16422 1.01667 3.42343 1.50669 3.70633ZM3.25114 1.8585L4.08907 2.85706C4.45285 3.29039 3.79748 3.84031 3.43389 3.4068L2.59596 2.40824C2.23236 1.97491 2.88755 1.42499 3.25114 1.8585ZM5.52247 0.718589L5.96846 1.94354C6.16178 2.47514 5.35806 2.76768 5.16455 2.23608L4.71875 1.01113C4.52523 0.479531 5.32896 0.186994 5.52247 0.718589Z"
|
|
60
|
-
})));
|
|
61
|
-
IconLoading.displayName = 'IconLoading';
|
|
62
|
-
var IconLoading$1 = IconLoading;
|
|
63
|
-
|
|
64
|
-
const IconHamburger$2 = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
65
|
-
ref: ref
|
|
66
|
-
}, props, {
|
|
67
|
-
width: "17",
|
|
68
|
-
height: "16",
|
|
69
|
-
viewBox: "0 0 17 16",
|
|
70
|
-
fill: "none",
|
|
71
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
72
|
-
}), /*#__PURE__*/React.createElement("g", {
|
|
73
|
-
clipPath: "url(#clip0_1296_533)"
|
|
74
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
75
|
-
d: "M13.3105 0.993011C14.4136 0.993011 15.3105 1.88989 15.3105 2.99301V12.993C15.3105 14.0961 14.4136 14.993 13.3105 14.993H3.31046C2.20733 14.993 1.31046 14.0961 1.31046 12.993V2.99301C1.31046 1.88989 2.20733 0.993011 3.31046 0.993011H13.3105ZM6.31046 4.49301C5.89483 4.49301 5.56046 4.82739 5.56046 5.24301C5.56046 5.65864 5.89483 5.99301 6.31046 5.99301H9.25108L5.02921 10.2118C4.73546 10.5055 4.73546 10.9805 5.02921 11.2711C5.32296 11.5618 5.79796 11.5649 6.08858 11.2711L10.3073 7.05239V10.243C10.3073 10.6586 10.6417 10.993 11.0573 10.993C11.473 10.993 11.8073 10.6586 11.8073 10.243V5.24301C11.8073 4.82739 11.473 4.49301 11.0573 4.49301H6.31046Z",
|
|
76
|
-
fill: "#242323"
|
|
77
|
-
})), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
|
|
78
|
-
id: "clip0_1296_533"
|
|
79
|
-
}, /*#__PURE__*/React.createElement("rect", {
|
|
80
|
-
width: "14",
|
|
81
|
-
height: "16",
|
|
82
|
-
fill: "white",
|
|
83
|
-
transform: "translate(1.31046 -0.00698853)"
|
|
84
|
-
})))));
|
|
85
|
-
IconHamburger$2.displayName = 'IconHamburger';
|
|
86
|
-
var IconHamburger$3 = IconHamburger$2;
|
|
87
|
-
|
|
88
|
-
const IconLinkInternal = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
89
|
-
ref: ref
|
|
90
|
-
}, props, {
|
|
91
|
-
width: "17",
|
|
92
|
-
height: "17",
|
|
93
|
-
viewBox: "0 0 17 17",
|
|
94
|
-
fill: "none",
|
|
95
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
96
|
-
}), /*#__PURE__*/React.createElement("g", {
|
|
97
|
-
clipPath: "url(#clip0_2628_44)"
|
|
98
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
99
|
-
d: "M14.9253 9.17158C15.3159 8.78095 15.3159 8.14658 14.9253 7.75595L9.92527 2.75595C9.53465 2.36533 8.90027 2.36533 8.50965 2.75595C8.11902 3.14658 8.11902 3.78095 8.50965 4.17158L11.8065 7.46533H2.21902C1.6659 7.46533 1.21902 7.9122 1.21902 8.46533C1.21902 9.01845 1.6659 9.46533 2.21902 9.46533H11.8034L8.51277 12.7591C8.12215 13.1497 8.12215 13.7841 8.51277 14.1747C8.9034 14.5653 9.53778 14.5653 9.9284 14.1747L14.9284 9.1747L14.9253 9.17158Z",
|
|
100
|
-
fill: "#242323"
|
|
101
|
-
})), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
|
|
102
|
-
id: "clip0_2628_44"
|
|
103
|
-
}, /*#__PURE__*/React.createElement("rect", {
|
|
104
|
-
width: "14",
|
|
105
|
-
height: "16",
|
|
106
|
-
fill: "white",
|
|
107
|
-
transform: "translate(1.21902 0.465332)"
|
|
108
|
-
})))));
|
|
109
|
-
IconLinkInternal.displayName = 'IconLinkInternal';
|
|
110
|
-
var IconLinkInternal$1 = IconLinkInternal;
|
|
111
|
-
|
|
112
|
-
const IconCheck = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
113
|
-
ref: ref
|
|
114
|
-
}, props, {
|
|
115
|
-
width: "18",
|
|
116
|
-
height: "12",
|
|
117
|
-
viewBox: "0 0 18 12",
|
|
118
|
-
fill: "none",
|
|
119
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
120
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
121
|
-
d: "M1.66666 6.33333L6.33332 11L16.3333 1",
|
|
122
|
-
stroke: "currentcolor",
|
|
123
|
-
strokeWidth: "2",
|
|
124
|
-
strokeLinecap: "round",
|
|
125
|
-
strokeLinejoin: "round"
|
|
126
|
-
})));
|
|
127
|
-
IconCheck.displayName = 'IconCheck';
|
|
128
|
-
var IconCheck$1 = IconCheck;
|
|
129
|
-
|
|
130
|
-
const IconCheck2 = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
131
|
-
ref: ref
|
|
132
|
-
}, props, {
|
|
133
|
-
width: "18",
|
|
134
|
-
height: "13",
|
|
135
|
-
viewBox: "0 0 18 13",
|
|
136
|
-
fill: "none",
|
|
137
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
138
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
139
|
-
d: "M1.66663 6.66671L6.33329 11.3334L16.3333 1.33337",
|
|
140
|
-
stroke: "#F4F8F4",
|
|
141
|
-
strokeWidth: "2"
|
|
142
|
-
})));
|
|
143
|
-
IconCheck2.displayName = 'IconCheck';
|
|
144
|
-
var IconCheck2$1 = IconCheck2;
|
|
145
|
-
|
|
146
|
-
const IconError = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
147
|
-
ref: ref
|
|
148
|
-
}, props, {
|
|
149
|
-
width: "20",
|
|
150
|
-
height: "20",
|
|
151
|
-
viewBox: "0 0 20 20",
|
|
152
|
-
fill: "none",
|
|
153
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
154
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
155
|
-
d: "M10 18C5.58857 18 2 14.4113 2 10C2 5.58865 5.58865 2 10 2C14.4113 2 18 5.58865 18 10C18 14.3886 14.4113 18 10 18ZM10 3.34857C6.34278 3.34857 3.37143 6.32004 3.37143 9.97714C3.37143 13.6344 6.3429 16.6057 10 16.6057C13.6572 16.6057 16.6286 13.6342 16.6286 9.97714C16.6286 6.32004 13.6573 3.34857 10 3.34857Z",
|
|
156
|
-
fill: "currentcolor"
|
|
157
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
158
|
-
d: "M9.99996 11.1657C9.61141 11.1657 9.31421 10.8685 9.31421 10.48V6.98281C9.31421 6.59426 9.6114 6.29706 9.99996 6.29706C10.3885 6.29706 10.6857 6.59425 10.6857 6.98281V10.48C10.6857 10.8687 10.3885 11.1657 9.99996 11.1657Z",
|
|
159
|
-
fill: "currentcolor"
|
|
160
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
161
|
-
d: "M9.99997 13.68C9.81709 13.68 9.63422 13.6114 9.51989 13.4743C9.38277 13.3372 9.31421 13.1771 9.31421 12.9942C9.31421 12.9485 9.31421 12.9029 9.33701 12.8571C9.33701 12.8114 9.35981 12.7658 9.38277 12.72C9.40557 12.6743 9.42853 12.6514 9.45133 12.6057C9.47413 12.5599 9.49709 12.5371 9.54269 12.4914C9.79412 12.2399 10.2512 12.2399 10.5027 12.4914C10.5255 12.5142 10.5712 12.5599 10.594 12.6057C10.6168 12.6514 10.6398 12.6743 10.6626 12.72C10.6854 12.7658 10.6854 12.8114 10.7084 12.8571C10.7084 12.9029 10.7312 12.9485 10.7312 12.9942C10.7312 13.1771 10.6626 13.36 10.5255 13.4743C10.3657 13.6114 10.1829 13.68 9.99998 13.68H9.99997Z",
|
|
162
|
-
fill: "currentcolor"
|
|
163
|
-
})));
|
|
164
|
-
IconError.displayName = 'IconError';
|
|
165
|
-
var IconError$1 = IconError;
|
|
166
|
-
|
|
167
|
-
const IconChevron = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
168
|
-
ref: ref
|
|
169
|
-
}, props, {
|
|
170
|
-
width: "14",
|
|
171
|
-
height: "8",
|
|
172
|
-
viewBox: "0 0 14 8",
|
|
173
|
-
fill: "none",
|
|
174
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
175
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
176
|
-
d: "M1 1L7 7L13 1",
|
|
177
|
-
stroke: "currentcolor"
|
|
178
|
-
})));
|
|
179
|
-
IconChevron.displayName = 'IconChevron';
|
|
180
|
-
var IconChevron$1 = IconChevron;
|
|
181
|
-
|
|
182
|
-
const IconClose = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
183
|
-
ref: ref
|
|
184
|
-
}, props, {
|
|
185
|
-
width: "16",
|
|
186
|
-
height: "16",
|
|
187
|
-
viewBox: "0 0 16 16",
|
|
188
|
-
fill: "none",
|
|
189
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
190
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
191
|
-
d: "M2 2L14 14",
|
|
192
|
-
stroke: "currentcolor",
|
|
193
|
-
strokeWidth: "2",
|
|
194
|
-
strokeLinecap: "square"
|
|
195
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
196
|
-
d: "M14 2L2 14",
|
|
197
|
-
stroke: "currentcolor",
|
|
198
|
-
strokeWidth: "2",
|
|
199
|
-
strokeLinecap: "square"
|
|
200
|
-
})));
|
|
201
|
-
IconClose.displayName = 'IconClose';
|
|
202
|
-
var IconClose$1 = IconClose;
|
|
203
|
-
|
|
204
|
-
const IconGlobe = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
205
|
-
ref: ref
|
|
206
|
-
}, props, {
|
|
207
|
-
width: "20",
|
|
208
|
-
height: "20",
|
|
209
|
-
viewBox: "0 0 20 20",
|
|
210
|
-
fill: "none",
|
|
211
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
212
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
213
|
-
d: "M10 1.2C14.8553 1.2 18.8 5.14466 18.8 10C18.8 14.8553 14.8553 18.8 10 18.8C5.14468 18.8 1.20001 14.8553 1.20001 10C1.20001 5.14466 5.14468 1.2 10 1.2ZM10.4 2.05V5.8H13.2313C13.0625 5.22735 12.8606 4.69966 12.6313 4.2375C12.013 2.99081 11.2278 2.23616 10.4 2.05ZM9.60001 2.05C8.77235 2.23613 7.98706 2.99081 7.36868 4.2375C7.13945 4.69966 6.9375 5.22735 6.76868 5.8H9.60001V2.05ZM12.3125 2.34375C12.7029 2.76725 13.0488 3.28658 13.3438 3.88125C13.6274 4.45318 13.869 5.09973 14.0625 5.79991H16.8125C15.7974 4.15565 14.2027 2.91225 12.3125 2.34358V2.34375ZM7.68751 2.34375C5.79735 2.9123 4.20268 4.15575 3.18751 5.80008H5.93751C6.131 5.09981 6.3726 4.45326 6.65626 3.88141C6.95118 3.28675 7.29708 2.76741 7.68751 2.34391V2.34375ZM17.2438 6.60008H14.2563C14.4535 7.52996 14.57 8.54175 14.5938 9.60008H17.9875C17.935 8.52996 17.6753 7.51858 17.2438 6.60008H17.2438ZM13.4375 6.60008H10.4V9.60008H13.7937C13.7683 8.53171 13.6431 7.51708 13.4374 6.60008H13.4375ZM9.60001 6.60008H6.56251C6.35685 7.51701 6.23165 8.53175 6.20626 9.60008H9.59993L9.60001 6.60008ZM5.74368 6.60008H2.75618C2.3246 7.51863 2.0649 8.52991 2.01243 9.60008H5.4061C5.42992 8.54181 5.54646 7.52991 5.7436 6.60008H5.74368ZM17.9873 10.4001H14.5937C14.5702 11.4601 14.4536 12.4699 14.2562 13.4001H17.2437C17.6738 12.4829 17.935 11.4682 17.9874 10.4001H17.9873ZM13.7937 10.4001H10.4V13.4001H13.4375C13.6432 12.4821 13.7687 11.4696 13.7938 10.4001H13.7937ZM9.60001 10.4001H6.20635C6.23141 11.4696 6.35693 12.4821 6.5626 13.4001H9.6001L9.60001 10.4001ZM5.40635 10.4001H2.01268C2.06509 11.4682 2.32628 12.4829 2.75643 13.4001H5.74393C5.5464 12.4699 5.42993 11.4601 5.40643 10.4001H5.40635ZM16.8127 14.2001H14.0627C13.8692 14.8993 13.6276 15.5406 13.3439 16.1126C13.0489 16.7072 12.7031 17.238 12.3127 17.6626C14.2028 17.094 15.7975 15.8444 16.8127 14.2001ZM13.2313 14.2001H10.4V17.9564C11.2277 17.7703 12.013 17.0093 12.6313 15.7627C12.8614 15.299 13.0621 14.7751 13.2313 14.2002V14.2001ZM9.60001 14.2001H6.76868C6.93788 14.7749 7.13866 15.2988 7.36868 15.7626C7.98698 17.0093 8.77226 17.7702 9.60001 17.9562V14.2001ZM5.93751 14.2001H3.18751C4.20261 15.8443 5.79735 17.0941 7.68751 17.6626C7.29708 17.238 6.95118 16.7072 6.65626 16.1126C6.3726 15.5406 6.13106 14.8993 5.93751 14.2001Z",
|
|
214
|
-
fill: "currentcolor"
|
|
215
|
-
})));
|
|
216
|
-
IconGlobe.displayName = 'IconGlobe';
|
|
217
|
-
var IconGlobe$1 = IconGlobe;
|
|
218
|
-
|
|
219
|
-
const IconHamburger = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
220
|
-
ref: ref
|
|
221
|
-
}, props, {
|
|
222
|
-
width: "16",
|
|
223
|
-
height: "14",
|
|
224
|
-
viewBox: "0 0 16 14",
|
|
225
|
-
fill: "none",
|
|
226
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
227
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
228
|
-
d: "M0 1H16",
|
|
229
|
-
stroke: "currentcolor",
|
|
230
|
-
strokeWidth: "2"
|
|
231
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
232
|
-
d: "M0 7H16",
|
|
233
|
-
stroke: "currentcolor",
|
|
234
|
-
strokeWidth: "2"
|
|
235
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
236
|
-
d: "M0 13H16",
|
|
237
|
-
stroke: "currentcolor",
|
|
238
|
-
strokeWidth: "2"
|
|
239
|
-
})));
|
|
240
|
-
IconHamburger.displayName = 'IconHamburger';
|
|
241
|
-
var IconHamburger$1 = IconHamburger;
|
|
242
|
-
|
|
243
|
-
const IconInternet = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
244
|
-
ref: ref
|
|
245
|
-
}, props, {
|
|
246
|
-
width: "20",
|
|
247
|
-
height: "20",
|
|
248
|
-
viewBox: "0 0 20 20",
|
|
249
|
-
fill: "none",
|
|
250
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
251
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
252
|
-
fillRule: "evenodd",
|
|
253
|
-
clipRule: "evenodd",
|
|
254
|
-
d: "M10 20C15.5228 20 20 15.5228 20 10C20 4.47715 15.5228 0 10 0C4.47715 0 0 4.47715 0 10C0 15.5228 4.47715 20 10 20ZM5.19705 8.25847H6.46474L7.44936 12.7631L8.11397 5.53847H9.2832L8.38474 14.4615H6.87089L5.83705 9.80924L4.8032 14.4615H3.27705L2.39089 5.53847H3.56013L4.21243 12.7631L5.19705 8.25847ZM13.523 8.25847H14.7907L15.7753 12.7631L16.4399 5.53847H17.6092L16.7107 14.4615H15.1969L14.163 9.80924L13.1292 14.4615H11.603L10.7169 5.53847H11.8861L12.5384 12.7631L13.523 8.25847Z",
|
|
255
|
-
fill: "currentcolor"
|
|
256
|
-
})));
|
|
257
|
-
IconInternet.displayName = 'IconInternet';
|
|
258
|
-
var IconInternet$1 = IconInternet;
|
|
259
|
-
|
|
260
|
-
const IconPerson = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
261
|
-
ref: ref
|
|
262
|
-
}, props, {
|
|
263
|
-
width: "18",
|
|
264
|
-
height: "20",
|
|
265
|
-
viewBox: "0 0 18 20",
|
|
266
|
-
fill: "none",
|
|
267
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
268
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
269
|
-
d: "M17.1395 18.8372C17.1395 19.476 16.6212 20 15.98 20H2.0199C1.38172 20 0.860443 19.4778 0.860443 18.8372C0.860443 14.3419 4.50463 10.6977 8.99999 10.6977C13.4953 10.6977 17.1395 14.3419 17.1395 18.8372ZM8.99991 12.093C5.35301 12.093 2.38246 14.9876 2.25959 18.6047H15.7402C15.6176 14.9876 12.6469 12.093 8.99991 12.093ZM8.99991 9.76744C6.30277 9.76744 4.11618 7.58085 4.11618 4.88372C4.11618 2.18659 6.30277 0 8.99991 0C11.697 0 13.8836 2.18659 13.8836 4.88372C13.8836 7.58085 11.697 9.76744 8.99991 9.76744ZM8.99991 8.37209C10.9265 8.37209 12.4883 6.81035 12.4883 4.88372C12.4883 2.95709 10.9265 1.39535 8.99991 1.39535C7.07328 1.39535 5.51153 2.95709 5.51153 4.88372C5.51153 6.81035 7.07328 8.37209 8.99991 8.37209Z",
|
|
270
|
-
fill: "currentcolor"
|
|
271
|
-
})));
|
|
272
|
-
IconPerson.displayName = 'IconPerson';
|
|
273
|
-
var IconPerson$1 = IconPerson;
|
|
274
|
-
|
|
275
|
-
const IconTwitter = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
276
|
-
ref: ref
|
|
277
|
-
}, props, {
|
|
278
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
279
|
-
width: "17",
|
|
280
|
-
height: "16",
|
|
281
|
-
viewBox: "0 0 17 16",
|
|
282
|
-
fill: "none"
|
|
283
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
284
|
-
d: "M16.3219 2.63826C15.7321 2.92194 15.0999 3.11242 14.4352 3.19888C15.1136 2.75849 15.6348 2.06142 15.8793 1.23198C15.2458 1.63859 14.5412 1.93444 13.7943 2.09385C13.1958 1.40219 12.3428 0.971252 11.3989 0.971252C9.58574 0.971252 8.11555 2.56261 8.11555 4.52681C8.11555 4.80509 8.14548 5.07662 8.2016 5.33735C5.4732 5.18875 3.05531 3.77301 1.43548 1.62103C1.15242 2.14788 0.991558 2.75849 0.991558 3.40962C0.991558 4.64298 1.57016 5.73181 2.45177 6.37078C1.91308 6.35187 1.4068 6.19111 0.964125 5.92498C0.964125 5.93984 0.964125 5.9547 0.964125 5.96956C0.964125 7.69331 2.09638 9.12931 3.5965 9.45757C3.32216 9.53863 3.03162 9.58186 2.73234 9.58186C2.52036 9.58186 2.3146 9.56024 2.11384 9.51701C2.53283 10.9287 3.74489 11.9594 5.18016 11.9878C4.05788 12.9415 2.64256 13.5089 1.10379 13.5089C0.83818 13.5089 0.577561 13.4927 0.32193 13.4589C1.77341 14.4694 3.49923 15.057 5.35349 15.057C11.3914 15.057 14.6934 9.6386 14.6934 4.94018C14.6934 4.78618 14.6896 4.63083 14.6846 4.47953C15.3256 3.97834 15.8817 3.35153 16.3219 2.63826Z",
|
|
285
|
-
fill: "currentColor"
|
|
286
|
-
})));
|
|
287
|
-
IconTwitter.displayName = 'IconTwitter';
|
|
288
|
-
var IconTwitter$1 = IconTwitter;
|
|
289
|
-
|
|
290
|
-
const IconMail = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
291
|
-
ref: ref
|
|
292
|
-
}, props, {
|
|
293
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
294
|
-
width: "17",
|
|
295
|
-
height: "12",
|
|
296
|
-
viewBox: "0 0 17 12",
|
|
297
|
-
fill: "none"
|
|
298
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
299
|
-
fillRule: "evenodd",
|
|
300
|
-
clipRule: "evenodd",
|
|
301
|
-
d: "M16.3219 0.206634V0.0570068H0.32193V0.147015L8.33971 6.46405L16.3219 0.206634ZM0.32193 2.69319V11.6751H16.3219V2.74792L8.9551 8.52292L8.3366 9.00778L7.71928 8.52141L0.32193 2.69319Z",
|
|
302
|
-
fill: "currentColor"
|
|
303
|
-
})));
|
|
304
|
-
IconMail.displayName = 'IconMail';
|
|
305
|
-
var IconMail$1 = IconMail;
|
|
306
|
-
|
|
307
|
-
const IconFacebook = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
308
|
-
ref: ref
|
|
309
|
-
}, props, {
|
|
310
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
311
|
-
width: "21",
|
|
312
|
-
height: "20",
|
|
313
|
-
viewBox: "0 0 21 20",
|
|
314
|
-
fill: "none"
|
|
315
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
316
|
-
d: "M14.5765 7.66901H11.8795V5.90018C11.8795 5.2359 12.3198 5.08103 12.6299 5.08103C12.9393 5.08103 14.5331 5.08103 14.5331 5.08103V2.16074L11.912 2.15051C9.00226 2.15051 8.3401 4.32856 8.3401 5.72238V7.66901H6.65735V10.6782H8.3401C8.3401 14.54 8.3401 19.1932 8.3401 19.1932H11.8795C11.8795 19.1932 11.8795 14.4942 11.8795 10.6782H14.2678L14.5765 7.66901Z",
|
|
317
|
-
fill: "currentColor"
|
|
318
|
-
})));
|
|
319
|
-
IconFacebook.displayName = 'IconFacebook';
|
|
320
|
-
var IconFacebook$1 = IconFacebook;
|
|
77
|
+
return /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
78
|
+
className: className,
|
|
79
|
+
icon: faIcon
|
|
80
|
+
});
|
|
81
|
+
};
|
|
82
|
+
Icon.displayName = 'Icon';
|
|
321
83
|
|
|
322
84
|
const Link = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
323
85
|
let {
|
|
@@ -340,11 +102,11 @@ const Link = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
340
102
|
return /*#__PURE__*/React.createElement("a", _extends({}, props, {
|
|
341
103
|
ref: ref,
|
|
342
104
|
className: linkClassNames
|
|
343
|
-
}), children, icon === 'internal' && /*#__PURE__*/React.createElement(
|
|
344
|
-
icon:
|
|
105
|
+
}), children, icon === 'internal' && /*#__PURE__*/React.createElement(Icon, {
|
|
106
|
+
icon: "arrowRight",
|
|
345
107
|
className: "jfcl-link__icon"
|
|
346
|
-
}), icon === 'external' && /*#__PURE__*/React.createElement(
|
|
347
|
-
icon:
|
|
108
|
+
}), icon === 'external' && /*#__PURE__*/React.createElement(Icon, {
|
|
109
|
+
icon: "squareArrowUpRight",
|
|
348
110
|
className: "jfcl-link__icon"
|
|
349
111
|
}), opensInNewTab && /*#__PURE__*/React.createElement("span", {
|
|
350
112
|
className: "jfcl-sr-only"
|
|
@@ -373,17 +135,20 @@ const Alert = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
373
135
|
className: alertClassNames
|
|
374
136
|
}, props), /*#__PURE__*/React.createElement("div", {
|
|
375
137
|
className: "jfcl-alert__content"
|
|
376
|
-
}, type === 'error' && /*#__PURE__*/React.createElement(
|
|
377
|
-
|
|
138
|
+
}, type === 'error' && /*#__PURE__*/React.createElement(Icon, {
|
|
139
|
+
icon: "circleExclamation",
|
|
140
|
+
className: "jfcl-alert__icon jfcl-alert__icon-error",
|
|
378
141
|
"data-testid": "jfcl-alert__icon"
|
|
379
|
-
}
|
|
142
|
+
}), type === 'success' && /*#__PURE__*/React.createElement(Icon, {
|
|
143
|
+
icon: "check",
|
|
380
144
|
className: "jfcl-alert__icon",
|
|
381
145
|
"data-testid": "jfcl-alert__icon"
|
|
382
|
-
}
|
|
146
|
+
}), text), showButton && /*#__PURE__*/React.createElement("button", {
|
|
383
147
|
className: actionLabel ? 'jfcl-alert__btn jfcl-alert__btn_text' : 'jfcl-alert__btn',
|
|
384
148
|
"data-testid": "jfcl-alert__btn",
|
|
385
149
|
onClick: action
|
|
386
|
-
}, actionLabel || /*#__PURE__*/React.createElement(
|
|
150
|
+
}, actionLabel || /*#__PURE__*/React.createElement(Icon, {
|
|
151
|
+
icon: "xmark",
|
|
387
152
|
"aria-label": "Dismiss"
|
|
388
153
|
})), showLink && /*#__PURE__*/React.createElement(Link, _extends({
|
|
389
154
|
href: actionHref,
|
|
@@ -395,4 +160,321 @@ const Alert = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
395
160
|
});
|
|
396
161
|
Alert.displayName = 'Alert';
|
|
397
162
|
|
|
398
|
-
|
|
163
|
+
/**
|
|
164
|
+
* Accepts all `ButtonHTMLAttributes`
|
|
165
|
+
*/
|
|
166
|
+
const Button = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
167
|
+
let {
|
|
168
|
+
labelText,
|
|
169
|
+
variant = 'primary',
|
|
170
|
+
size = 'large',
|
|
171
|
+
loading,
|
|
172
|
+
labelIcon,
|
|
173
|
+
iconOnRight,
|
|
174
|
+
iconOnly,
|
|
175
|
+
className,
|
|
176
|
+
...props
|
|
177
|
+
} = _ref;
|
|
178
|
+
const buttonClassNames = classNames('jfcl-button', "jfcl-variant-".concat(variant), "jfcl-size-".concat(size), "".concat(loading ? 'jfcl-is-loading' : ''), "".concat(iconOnly ? 'jfcl-btn-icon-only' : ''), className);
|
|
179
|
+
const iconClassNames = classNames('jfcl-button__icon', "".concat(iconOnRight ? 'jfcl-button__icon_right' : ''));
|
|
180
|
+
const arias = {};
|
|
181
|
+
if (iconOnly) {
|
|
182
|
+
arias['aria-label'] = labelText;
|
|
183
|
+
}
|
|
184
|
+
return /*#__PURE__*/React.createElement("button", _extends({
|
|
185
|
+
ref: ref,
|
|
186
|
+
type: "button",
|
|
187
|
+
className: buttonClassNames,
|
|
188
|
+
"data-testid": "jfcl-button"
|
|
189
|
+
}, arias, props), /*#__PURE__*/React.createElement("div", {
|
|
190
|
+
className: "jfcl-button__label"
|
|
191
|
+
}, loading && /*#__PURE__*/React.createElement("span", {
|
|
192
|
+
className: iconClassNames
|
|
193
|
+
}), !loading && labelIcon ? /*#__PURE__*/React.createElement("span", {
|
|
194
|
+
className: iconClassNames
|
|
195
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
196
|
+
icon: labelIcon
|
|
197
|
+
})) : null, !iconOnly && /*#__PURE__*/React.createElement("span", {
|
|
198
|
+
className: "jfcl-button__text"
|
|
199
|
+
}, labelText)));
|
|
200
|
+
});
|
|
201
|
+
Button.displayName = 'Button';
|
|
202
|
+
|
|
203
|
+
const HeaderLabel = _ref => {
|
|
204
|
+
let {
|
|
205
|
+
labelFor,
|
|
206
|
+
isLegend,
|
|
207
|
+
hasHelperText,
|
|
208
|
+
headerText
|
|
209
|
+
} = _ref;
|
|
210
|
+
const headerLabelClassName = classNames('jfcl-input-header__label', {
|
|
211
|
+
['jfcl-input-header__label--has-helper']: hasHelperText
|
|
212
|
+
});
|
|
213
|
+
if (labelFor) {
|
|
214
|
+
return /*#__PURE__*/React.createElement("label", {
|
|
215
|
+
htmlFor: labelFor,
|
|
216
|
+
className: headerLabelClassName,
|
|
217
|
+
"data-testid": "header-label"
|
|
218
|
+
}, headerText);
|
|
219
|
+
} else if (isLegend) {
|
|
220
|
+
return /*#__PURE__*/React.createElement("legend", {
|
|
221
|
+
className: headerLabelClassName,
|
|
222
|
+
"data-testid": "header-legend"
|
|
223
|
+
}, headerText);
|
|
224
|
+
} else {
|
|
225
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
226
|
+
className: headerLabelClassName,
|
|
227
|
+
"data-testid": "header-div"
|
|
228
|
+
}, headerText);
|
|
229
|
+
}
|
|
230
|
+
};
|
|
231
|
+
const InputHeader = _ref2 => {
|
|
232
|
+
let {
|
|
233
|
+
labelFor,
|
|
234
|
+
isLegend,
|
|
235
|
+
headerText,
|
|
236
|
+
helperText,
|
|
237
|
+
invalid,
|
|
238
|
+
invalidText
|
|
239
|
+
} = _ref2;
|
|
240
|
+
const showHeader = headerText || helperText || invalid && invalidText;
|
|
241
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, showHeader && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(HeaderLabel, {
|
|
242
|
+
labelFor: labelFor,
|
|
243
|
+
isLegend: isLegend,
|
|
244
|
+
headerText: headerText,
|
|
245
|
+
hasHelperText: !!helperText
|
|
246
|
+
}), helperText && /*#__PURE__*/React.createElement("div", {
|
|
247
|
+
className: "jfcl-input-header__helper_text",
|
|
248
|
+
"data-testid": "helper-text"
|
|
249
|
+
}, helperText), invalid && invalidText && /*#__PURE__*/React.createElement("div", {
|
|
250
|
+
className: "jfcl-input-header__invalid_text",
|
|
251
|
+
"data-testid": "error"
|
|
252
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
253
|
+
icon: "circleExclamation",
|
|
254
|
+
className: "jfcl-input-header__invalid_icon"
|
|
255
|
+
}), invalidText)));
|
|
256
|
+
};
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Accepts all `InputHTMLAttributes`
|
|
260
|
+
*/
|
|
261
|
+
const Checkbox = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
262
|
+
let {
|
|
263
|
+
className,
|
|
264
|
+
invalidText,
|
|
265
|
+
invalid,
|
|
266
|
+
headerText,
|
|
267
|
+
helperText,
|
|
268
|
+
labelText,
|
|
269
|
+
disabled,
|
|
270
|
+
id,
|
|
271
|
+
...props
|
|
272
|
+
} = _ref;
|
|
273
|
+
const checkboxClassNames = classNames('jfcl-checkbox', {
|
|
274
|
+
['jfcl-checkbox--is-disabled']: disabled
|
|
275
|
+
}, className);
|
|
276
|
+
const checkmarkClassNames = classNames('jfcl-checkbox__checkmark', {
|
|
277
|
+
['jfcl-checkbox__checkmark--is-invalid']: invalid
|
|
278
|
+
}, className);
|
|
279
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
280
|
+
className: checkboxClassNames,
|
|
281
|
+
"data-testid": "jfcl-checkbox"
|
|
282
|
+
}, /*#__PURE__*/React.createElement(InputHeader, {
|
|
283
|
+
headerText: headerText,
|
|
284
|
+
helperText: helperText,
|
|
285
|
+
invalid: invalid,
|
|
286
|
+
invalidText: invalidText
|
|
287
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
288
|
+
className: "jfcl-checkbox__checkmark-label-wrapper"
|
|
289
|
+
}, /*#__PURE__*/React.createElement("input", _extends({
|
|
290
|
+
ref: ref
|
|
291
|
+
}, props, {
|
|
292
|
+
id: id,
|
|
293
|
+
className: "jfcl-checkbox__input",
|
|
294
|
+
type: "checkbox"
|
|
295
|
+
})), /*#__PURE__*/React.createElement("label", {
|
|
296
|
+
htmlFor: id,
|
|
297
|
+
className: "jfcl-checkbox__label",
|
|
298
|
+
"data-testid": "jfcl-checkbox__label"
|
|
299
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
300
|
+
className: checkmarkClassNames,
|
|
301
|
+
"data-testid": "jfcl-checkbox__checkmark",
|
|
302
|
+
"aria-hidden": true
|
|
303
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
304
|
+
icon: "check",
|
|
305
|
+
className: "jfcl-checkbox__check_icon"
|
|
306
|
+
})), labelText)));
|
|
307
|
+
});
|
|
308
|
+
Checkbox.displayName = 'Checkbox';
|
|
309
|
+
|
|
310
|
+
const DropdownIndicator = props => {
|
|
311
|
+
return /*#__PURE__*/React.createElement(components.DropdownIndicator, props, /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
312
|
+
icon: faChevronDown
|
|
313
|
+
}));
|
|
314
|
+
};
|
|
315
|
+
const Dropdown = _ref => {
|
|
316
|
+
let {
|
|
317
|
+
className,
|
|
318
|
+
helperText,
|
|
319
|
+
invalid,
|
|
320
|
+
invalidText,
|
|
321
|
+
disabled,
|
|
322
|
+
labelText,
|
|
323
|
+
onChange,
|
|
324
|
+
options,
|
|
325
|
+
...props
|
|
326
|
+
} = _ref;
|
|
327
|
+
const hasOnChange = !!onChange;
|
|
328
|
+
|
|
329
|
+
// Randomly generated id
|
|
330
|
+
const instanceId = useId();
|
|
331
|
+
|
|
332
|
+
// format of the id on the actual <input /> element created by react-select
|
|
333
|
+
// using the instanceID prop
|
|
334
|
+
const inputId = "react-select-".concat(instanceId, "-input");
|
|
335
|
+
const dropdownClassNames = classNames('jfcl-dropdown', {
|
|
336
|
+
['jfcl-dropdown--is-invalid']: invalid
|
|
337
|
+
}, className);
|
|
338
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(InputHeader, {
|
|
339
|
+
headerText: labelText,
|
|
340
|
+
labelFor: inputId,
|
|
341
|
+
helperText: helperText,
|
|
342
|
+
invalid: invalid,
|
|
343
|
+
invalidText: invalidText
|
|
344
|
+
}), /*#__PURE__*/React.createElement(Select, _extends({}, props, {
|
|
345
|
+
instanceId: instanceId,
|
|
346
|
+
className: dropdownClassNames,
|
|
347
|
+
classNamePrefix: "jfcl-dropdown",
|
|
348
|
+
placeholder: null,
|
|
349
|
+
isDisabled: disabled,
|
|
350
|
+
options: options
|
|
351
|
+
}, hasOnChange && {
|
|
352
|
+
onChange: onChange
|
|
353
|
+
}, {
|
|
354
|
+
components: {
|
|
355
|
+
DropdownIndicator
|
|
356
|
+
}
|
|
357
|
+
})));
|
|
358
|
+
};
|
|
359
|
+
Dropdown.displayName = 'Dropdown';
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* Accepts all `HTMLFieldSetElement`
|
|
363
|
+
*/
|
|
364
|
+
const FormGroup = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
365
|
+
let {
|
|
366
|
+
className,
|
|
367
|
+
children,
|
|
368
|
+
invalidText,
|
|
369
|
+
invalid,
|
|
370
|
+
helperText,
|
|
371
|
+
legendText,
|
|
372
|
+
...props
|
|
373
|
+
} = _ref;
|
|
374
|
+
const fieldsetClassNames = classNames('jfcl-form-group', {
|
|
375
|
+
['jfcl-form-group-is-invalid']: invalid
|
|
376
|
+
}, className);
|
|
377
|
+
return /*#__PURE__*/React.createElement("fieldset", _extends({
|
|
378
|
+
ref: ref
|
|
379
|
+
}, props, {
|
|
380
|
+
className: fieldsetClassNames
|
|
381
|
+
}), /*#__PURE__*/React.createElement(InputHeader, {
|
|
382
|
+
headerText: legendText,
|
|
383
|
+
helperText: helperText,
|
|
384
|
+
invalid: invalid,
|
|
385
|
+
invalidText: invalidText,
|
|
386
|
+
isLegend: true
|
|
387
|
+
}), children);
|
|
388
|
+
});
|
|
389
|
+
FormGroup.displayName = 'FormGroup';
|
|
390
|
+
|
|
391
|
+
/**
|
|
392
|
+
* Accepts all `InputHTMLAttributes`
|
|
393
|
+
*/
|
|
394
|
+
const RadioButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
395
|
+
let {
|
|
396
|
+
className,
|
|
397
|
+
invalidText,
|
|
398
|
+
invalid,
|
|
399
|
+
headerText,
|
|
400
|
+
helperText,
|
|
401
|
+
labelText,
|
|
402
|
+
disabled,
|
|
403
|
+
id,
|
|
404
|
+
...props
|
|
405
|
+
} = _ref;
|
|
406
|
+
const radioButtonClassNames = classNames('jfcl-radio-button', {
|
|
407
|
+
['jfcl-radio-button--is-invalid']: invalid,
|
|
408
|
+
['jfcl-radio-button--is-disabled']: disabled
|
|
409
|
+
}, className);
|
|
410
|
+
const checkmarkClassNames = classNames('jfcl-radio-button__checkmark', {
|
|
411
|
+
['jfcl-radio-button__checkmark--is-invalid']: invalid
|
|
412
|
+
}, className);
|
|
413
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
414
|
+
className: radioButtonClassNames,
|
|
415
|
+
"data-testid": "jfcl-radio-button"
|
|
416
|
+
}, /*#__PURE__*/React.createElement(InputHeader, {
|
|
417
|
+
headerText: headerText,
|
|
418
|
+
helperText: helperText,
|
|
419
|
+
invalid: invalid,
|
|
420
|
+
invalidText: invalidText
|
|
421
|
+
}), /*#__PURE__*/React.createElement("input", _extends({
|
|
422
|
+
ref: ref
|
|
423
|
+
}, props, {
|
|
424
|
+
id: id,
|
|
425
|
+
className: "jfcl-radio-button__input",
|
|
426
|
+
type: "radio"
|
|
427
|
+
})), /*#__PURE__*/React.createElement("label", {
|
|
428
|
+
htmlFor: id,
|
|
429
|
+
className: "jfcl-radio-button__label",
|
|
430
|
+
"data-testid": "jfcl-radio-button__label"
|
|
431
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
432
|
+
className: checkmarkClassNames,
|
|
433
|
+
"data-testid": "jfcl-radio-button__checkmark"
|
|
434
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
435
|
+
className: "jfcl-radio-button__checkmark-checked"
|
|
436
|
+
})), labelText));
|
|
437
|
+
});
|
|
438
|
+
RadioButton.displayName = 'RadioButton';
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* Accepts all `InputHTMLAttributes`
|
|
442
|
+
*/
|
|
443
|
+
const TextInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
444
|
+
let {
|
|
445
|
+
className,
|
|
446
|
+
invalidText,
|
|
447
|
+
invalid,
|
|
448
|
+
helperText,
|
|
449
|
+
labelText,
|
|
450
|
+
size,
|
|
451
|
+
id,
|
|
452
|
+
type = 'text',
|
|
453
|
+
...props
|
|
454
|
+
} = _ref;
|
|
455
|
+
const textInputWrapperClassNames = classNames('jfcl-text-input', {
|
|
456
|
+
['jfcl-text-input--is-invalid']: invalid
|
|
457
|
+
}, className);
|
|
458
|
+
const textInputClassNames = classNames('jfcl-text-input__input', {
|
|
459
|
+
["jfcl-text-input--size-".concat(size)]: size
|
|
460
|
+
});
|
|
461
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
462
|
+
className: textInputWrapperClassNames,
|
|
463
|
+
"data-testid": "jfcl-text-input"
|
|
464
|
+
}, /*#__PURE__*/React.createElement(InputHeader, {
|
|
465
|
+
headerText: labelText,
|
|
466
|
+
helperText: helperText,
|
|
467
|
+
invalidText: invalidText,
|
|
468
|
+
invalid: invalid,
|
|
469
|
+
labelFor: id
|
|
470
|
+
}), /*#__PURE__*/React.createElement("input", _extends({
|
|
471
|
+
ref: ref
|
|
472
|
+
}, props, {
|
|
473
|
+
id: id,
|
|
474
|
+
className: textInputClassNames,
|
|
475
|
+
type: type
|
|
476
|
+
})));
|
|
477
|
+
});
|
|
478
|
+
TextInput.displayName = 'TextInput';
|
|
479
|
+
|
|
480
|
+
export { Alert, Button, Checkbox, Dropdown, FormGroup, Icon, Link, RadioButton, TextInput };
|