@justfixnyc/component-library 0.30.1 → 0.31.1
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
|
@@ -86,10 +86,10 @@ const IconLinkInternal = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/Re
|
|
|
86
86
|
cx: "8.31371",
|
|
87
87
|
cy: "8.01465",
|
|
88
88
|
r: "7.5",
|
|
89
|
-
stroke: "
|
|
89
|
+
stroke: "currentcolor"
|
|
90
90
|
}), /*#__PURE__*/React.createElement("path", {
|
|
91
91
|
d: "M4.62639 7.70676C4.35025 7.70676 4.12639 7.93061 4.12639 8.20676C4.12639 8.4829 4.35025 8.70676 4.62639 8.70676V7.70676ZM11.9344 8.56031C12.1297 8.36505 12.1297 8.04847 11.9344 7.8532L8.75241 4.67122C8.55715 4.47596 8.24056 4.47596 8.0453 4.67122C7.85004 4.86648 7.85004 5.18307 8.0453 5.37833L10.8737 8.20676L8.0453 11.0352C7.85004 11.2304 7.85004 11.547 8.0453 11.7423C8.24056 11.9376 8.55715 11.9376 8.75241 11.7423L11.9344 8.56031ZM4.62639 8.70676H11.5808V7.70676H4.62639V8.70676Z",
|
|
92
|
-
fill: "
|
|
92
|
+
fill: "currentcolor"
|
|
93
93
|
})));
|
|
94
94
|
IconLinkInternal.displayName = 'IconLinkInternal';
|
|
95
95
|
var IconLinkInternal$1 = IconLinkInternal;
|
|
@@ -241,6 +241,38 @@ const IconPerson = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/React.cr
|
|
|
241
241
|
IconPerson.displayName = 'IconPerson';
|
|
242
242
|
var IconPerson$1 = IconPerson;
|
|
243
243
|
|
|
244
|
+
const IconTwitter = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
245
|
+
ref: ref
|
|
246
|
+
}, props, {
|
|
247
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
248
|
+
width: "17",
|
|
249
|
+
height: "16",
|
|
250
|
+
viewBox: "0 0 17 16",
|
|
251
|
+
fill: "none"
|
|
252
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
253
|
+
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",
|
|
254
|
+
fill: "currentColor"
|
|
255
|
+
})));
|
|
256
|
+
IconTwitter.displayName = 'IconTwitter';
|
|
257
|
+
var IconTwitter$1 = IconTwitter;
|
|
258
|
+
|
|
259
|
+
const IconMail = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
260
|
+
ref: ref
|
|
261
|
+
}, props, {
|
|
262
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
263
|
+
width: "17",
|
|
264
|
+
height: "12",
|
|
265
|
+
viewBox: "0 0 17 12",
|
|
266
|
+
fill: "none"
|
|
267
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
268
|
+
fillRule: "evenodd",
|
|
269
|
+
clipRule: "evenodd",
|
|
270
|
+
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",
|
|
271
|
+
fill: "currentColor"
|
|
272
|
+
})));
|
|
273
|
+
IconMail.displayName = 'IconMail';
|
|
274
|
+
var IconMail$1 = IconMail;
|
|
275
|
+
|
|
244
276
|
const Alert = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
245
277
|
let {
|
|
246
278
|
type = 'info',
|
|
@@ -282,6 +314,15 @@ const Link = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
282
314
|
...props
|
|
283
315
|
} = _ref;
|
|
284
316
|
const linkClassNames = classNames('jfcl-link', className);
|
|
317
|
+
|
|
318
|
+
// When using this component within a react-router-dom <Link />, a navigate function is passed through the props us here.
|
|
319
|
+
// Since this navigate function is not a normal anchor element attribute we want to remove it before applying the rest of
|
|
320
|
+
// the props to avoid browser errors.
|
|
321
|
+
// Github issue talking about what's happening:
|
|
322
|
+
// https://github.com/remix-run/react-router/issues/6962
|
|
323
|
+
// Reference to react-router-dom Link component code to see what it's doing:
|
|
324
|
+
// https://github.com/remix-run/react-router/blob/0c058adc5b56c6d9b409af5e4d8330c645fac00c/packages/react-router-dom/modules/Link.js
|
|
325
|
+
delete props.navigate;
|
|
285
326
|
return /*#__PURE__*/React.createElement("a", _extends({}, props, {
|
|
286
327
|
ref: ref,
|
|
287
328
|
className: linkClassNames
|
|
@@ -293,4 +334,4 @@ const Link = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
293
334
|
});
|
|
294
335
|
Link.displayName = 'Link';
|
|
295
336
|
|
|
296
|
-
export { Alert, Button, IconCheck$1 as IconCheck, IconChevron$1 as IconChevron, IconClose$1 as IconClose, IconError$1 as IconError, IconGlobe$1 as IconGlobe, IconHamburger$1 as IconHamburger, IconInternet$1 as IconInternet, IconLinkExternal, IconLinkInternal$1 as IconLinkInternal, IconLoading$1 as IconLoading, IconPerson$1 as IconPerson, Link };
|
|
337
|
+
export { Alert, Button, IconCheck$1 as IconCheck, IconChevron$1 as IconChevron, IconClose$1 as IconClose, IconError$1 as IconError, IconGlobe$1 as IconGlobe, IconHamburger$1 as IconHamburger, IconInternet$1 as IconInternet, IconLinkExternal, IconLinkInternal$1 as IconLinkInternal, IconLoading$1 as IconLoading, IconMail$1 as IconMail, IconPerson$1 as IconPerson, IconTwitter$1 as IconTwitter, Link };
|
package/dist/src/index.js
CHANGED
|
@@ -96,10 +96,10 @@ const IconLinkInternal = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE
|
|
|
96
96
|
cx: "8.31371",
|
|
97
97
|
cy: "8.01465",
|
|
98
98
|
r: "7.5",
|
|
99
|
-
stroke: "
|
|
99
|
+
stroke: "currentcolor"
|
|
100
100
|
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
101
101
|
d: "M4.62639 7.70676C4.35025 7.70676 4.12639 7.93061 4.12639 8.20676C4.12639 8.4829 4.35025 8.70676 4.62639 8.70676V7.70676ZM11.9344 8.56031C12.1297 8.36505 12.1297 8.04847 11.9344 7.8532L8.75241 4.67122C8.55715 4.47596 8.24056 4.47596 8.0453 4.67122C7.85004 4.86648 7.85004 5.18307 8.0453 5.37833L10.8737 8.20676L8.0453 11.0352C7.85004 11.2304 7.85004 11.547 8.0453 11.7423C8.24056 11.9376 8.55715 11.9376 8.75241 11.7423L11.9344 8.56031ZM4.62639 8.70676H11.5808V7.70676H4.62639V8.70676Z",
|
|
102
|
-
fill: "
|
|
102
|
+
fill: "currentcolor"
|
|
103
103
|
})));
|
|
104
104
|
IconLinkInternal.displayName = 'IconLinkInternal';
|
|
105
105
|
var IconLinkInternal$1 = IconLinkInternal;
|
|
@@ -251,6 +251,38 @@ const IconPerson = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/Re
|
|
|
251
251
|
IconPerson.displayName = 'IconPerson';
|
|
252
252
|
var IconPerson$1 = IconPerson;
|
|
253
253
|
|
|
254
|
+
const IconTwitter = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React__default["default"].createElement("svg", _extends__default["default"]({
|
|
255
|
+
ref: ref
|
|
256
|
+
}, props, {
|
|
257
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
258
|
+
width: "17",
|
|
259
|
+
height: "16",
|
|
260
|
+
viewBox: "0 0 17 16",
|
|
261
|
+
fill: "none"
|
|
262
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
263
|
+
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",
|
|
264
|
+
fill: "currentColor"
|
|
265
|
+
})));
|
|
266
|
+
IconTwitter.displayName = 'IconTwitter';
|
|
267
|
+
var IconTwitter$1 = IconTwitter;
|
|
268
|
+
|
|
269
|
+
const IconMail = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React__default["default"].createElement("svg", _extends__default["default"]({
|
|
270
|
+
ref: ref
|
|
271
|
+
}, props, {
|
|
272
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
273
|
+
width: "17",
|
|
274
|
+
height: "12",
|
|
275
|
+
viewBox: "0 0 17 12",
|
|
276
|
+
fill: "none"
|
|
277
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
278
|
+
fillRule: "evenodd",
|
|
279
|
+
clipRule: "evenodd",
|
|
280
|
+
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",
|
|
281
|
+
fill: "currentColor"
|
|
282
|
+
})));
|
|
283
|
+
IconMail.displayName = 'IconMail';
|
|
284
|
+
var IconMail$1 = IconMail;
|
|
285
|
+
|
|
254
286
|
const Alert = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
255
287
|
let {
|
|
256
288
|
type = 'info',
|
|
@@ -292,6 +324,15 @@ const Link = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
292
324
|
...props
|
|
293
325
|
} = _ref;
|
|
294
326
|
const linkClassNames = classNames__default["default"]('jfcl-link', className);
|
|
327
|
+
|
|
328
|
+
// When using this component within a react-router-dom <Link />, a navigate function is passed through the props us here.
|
|
329
|
+
// Since this navigate function is not a normal anchor element attribute we want to remove it before applying the rest of
|
|
330
|
+
// the props to avoid browser errors.
|
|
331
|
+
// Github issue talking about what's happening:
|
|
332
|
+
// https://github.com/remix-run/react-router/issues/6962
|
|
333
|
+
// Reference to react-router-dom Link component code to see what it's doing:
|
|
334
|
+
// https://github.com/remix-run/react-router/blob/0c058adc5b56c6d9b409af5e4d8330c645fac00c/packages/react-router-dom/modules/Link.js
|
|
335
|
+
delete props.navigate;
|
|
295
336
|
return /*#__PURE__*/React__default["default"].createElement("a", _extends__default["default"]({}, props, {
|
|
296
337
|
ref: ref,
|
|
297
338
|
className: linkClassNames
|
|
@@ -315,5 +356,7 @@ exports.IconInternet = IconInternet$1;
|
|
|
315
356
|
exports.IconLinkExternal = IconLinkExternal;
|
|
316
357
|
exports.IconLinkInternal = IconLinkInternal$1;
|
|
317
358
|
exports.IconLoading = IconLoading$1;
|
|
359
|
+
exports.IconMail = IconMail$1;
|
|
318
360
|
exports.IconPerson = IconPerson$1;
|
|
361
|
+
exports.IconTwitter = IconTwitter$1;
|
|
319
362
|
exports.Link = Link;
|
|
@@ -9,4 +9,6 @@ import IconGlobe from './Globe';
|
|
|
9
9
|
import IconHamburger from './Hamburger';
|
|
10
10
|
import IconInternet from './Internet';
|
|
11
11
|
import IconPerson from './Person';
|
|
12
|
-
|
|
12
|
+
import IconTwitter from './Twitter';
|
|
13
|
+
import IconMail from './Mail';
|
|
14
|
+
export { IconLoading, IconLinkExternal, IconLinkInternal, IconCheck, IconError, IconTwitter, IconChevron, IconClose, IconGlobe, IconHamburger, IconInternet, IconPerson, IconMail, };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './styles.scss';
|
|
3
3
|
export type LinkIcon = 'internal' | 'external';
|
|
4
|
-
export interface LinkProps extends React.
|
|
4
|
+
export interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
5
5
|
icon?: LinkIcon;
|
|
6
6
|
className?: string;
|
|
7
7
|
children: React.ReactNode;
|
|
8
|
+
navigate?: () => void;
|
|
8
9
|
}
|
|
9
10
|
export declare const Link: React.ForwardRefExoticComponent<LinkProps & React.RefAttributes<HTMLAnchorElement>>;
|