@justfixnyc/component-library 0.29.2 → 0.30.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.
@@ -252,4 +252,33 @@
252
252
  .jf-alert.jfcl-variant-secondary .jf-alert__btn {
253
253
  color: #242323;
254
254
  border-color: #242323;
255
+ }
256
+ @keyframes spin {
257
+ from {
258
+ transform: rotate(0deg);
259
+ }
260
+ to {
261
+ transform: rotate(360deg);
262
+ }
263
+ }
264
+ .jfcl-link {
265
+ font-family: "Degular", Arial, Helvetica, sans-serif;
266
+ font-style: normal;
267
+ font-weight: 500;
268
+ font-size: 1.13rem;
269
+ line-height: 120%;
270
+ text-align: center;
271
+ letter-spacing: 0.54px;
272
+ color: #242323;
273
+ text-underline-position: from-font;
274
+ display: inline-flex;
275
+ align-items: center;
276
+ }
277
+ .jfcl-link:hover {
278
+ color: #676565;
279
+ }
280
+ .jfcl-link .jfcl-link__icon {
281
+ margin-left: 10px;
282
+ width: 16px;
283
+ height: 16px;
255
284
  }
@@ -252,4 +252,33 @@
252
252
  .jf-alert.jfcl-variant-secondary .jf-alert__btn {
253
253
  color: #242323;
254
254
  border-color: #242323;
255
+ }
256
+ @keyframes spin {
257
+ from {
258
+ transform: rotate(0deg);
259
+ }
260
+ to {
261
+ transform: rotate(360deg);
262
+ }
263
+ }
264
+ .jfcl-link {
265
+ font-family: "Degular", Arial, Helvetica, sans-serif;
266
+ font-style: normal;
267
+ font-weight: 500;
268
+ font-size: 1.13rem;
269
+ line-height: 120%;
270
+ text-align: center;
271
+ letter-spacing: 0.54px;
272
+ color: #242323;
273
+ text-underline-position: from-font;
274
+ display: inline-flex;
275
+ align-items: center;
276
+ }
277
+ .jfcl-link:hover {
278
+ color: #676565;
279
+ }
280
+ .jfcl-link .jfcl-link__icon {
281
+ margin-left: 10px;
282
+ width: 16px;
283
+ height: 16px;
255
284
  }
@@ -71,7 +71,27 @@ const IconHamburger$2 = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/Rea
71
71
  d: "M11.9895 0C11.987 0 11.9845 0 11.9815 0C11.666 0 11.4105 0.256 11.4105 0.571C11.4105 0.886 11.666 1.142 11.9815 1.142C11.9845 1.142 11.987 1.142 11.99 1.142H14.037L4.735 10.444C4.6315 10.5475 4.5675 10.69 4.5675 10.848C4.5675 11.1635 4.8235 11.419 5.1385 11.419C5.296 11.419 5.439 11.355 5.542 11.252L14.844 1.95V3.997C14.844 3.9995 14.844 4.002 14.844 4.005C14.844 4.3205 15.0995 4.576 15.415 4.576C15.7305 4.576 15.986 4.3205 15.986 4.005C15.986 4.002 15.986 3.9995 15.986 3.9965V3.997V0.664C15.991 0.6365 15.9935 0.604 15.9935 0.5715C15.9935 0.256 15.738 0.0005 15.4225 0.0005C15.42 0.0005 15.4175 0.0005 15.4145 0.0005H11.989L11.9895 0ZM0.571 3.4255C0.256 3.4255 0 3.681 0 3.9965V15.415C0 15.7305 0.256 15.986 0.571 15.986H11.9895C12.305 15.986 12.5605 15.7305 12.5605 15.415V6.8C12.5605 6.7975 12.5605 6.795 12.5605 6.792C12.5605 6.4765 12.305 6.221 11.9895 6.221C11.674 6.221 11.4185 6.4765 11.4185 6.792C11.4185 6.795 11.4185 6.7975 11.4185 6.8005V6.8V14.844H1.1415V4.567H9.22C9.2225 4.567 9.225 4.567 9.228 4.567C9.5435 4.567 9.799 4.3115 9.799 3.996C9.799 3.6805 9.5435 3.425 9.228 3.425C9.225 3.425 9.2225 3.425 9.2195 3.425L0.571 3.4255Z"
72
72
  })));
73
73
  IconHamburger$2.displayName = 'IconHamburger';
74
- var IconHamburger$3 = IconHamburger$2;
74
+ var IconLinkExternal = IconHamburger$2;
75
+
76
+ const IconLinkInternal = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/React.createElement("svg", _extends({
77
+ ref: ref
78
+ }, props, {
79
+ xmlns: "http://www.w3.org/2000/svg",
80
+ width: "17",
81
+ height: "17",
82
+ viewBox: "0 0 17 17",
83
+ fill: "none"
84
+ }), /*#__PURE__*/React.createElement("circle", {
85
+ cx: "8.31371",
86
+ cy: "8.01465",
87
+ r: "7.5",
88
+ stroke: "#242323"
89
+ }), /*#__PURE__*/React.createElement("path", {
90
+ 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",
91
+ fill: "#242323"
92
+ })));
93
+ IconLinkInternal.displayName = 'IconLinkInternal';
94
+ var IconLinkInternal$1 = IconLinkInternal;
75
95
 
76
96
  const IconCheck = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/React.createElement("svg", _extends({
77
97
  ref: ref
@@ -253,4 +273,23 @@ const Alert = /*#__PURE__*/forwardRef((_ref, ref) => {
253
273
  });
254
274
  Alert.displayName = 'Alert';
255
275
 
256
- 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, IconHamburger$3 as IconLinkExternal, IconLoading$1 as IconLoading, IconPerson$1 as IconPerson };
276
+ const Link = /*#__PURE__*/forwardRef((_ref, ref) => {
277
+ let {
278
+ icon,
279
+ children,
280
+ className,
281
+ ...props
282
+ } = _ref;
283
+ const linkClassNames = classNames('jfcl-link', className);
284
+ return /*#__PURE__*/React.createElement("a", _extends({}, props, {
285
+ ref: ref,
286
+ className: linkClassNames
287
+ }), children, icon === 'internal' && /*#__PURE__*/React.createElement(IconLinkInternal$1, {
288
+ className: "jfcl-link__icon"
289
+ }), icon === 'external' && /*#__PURE__*/React.createElement(IconLinkExternal, {
290
+ className: "jfcl-link__icon"
291
+ }));
292
+ });
293
+ Link.displayName = 'Link';
294
+
295
+ 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 };
package/dist/src/index.js CHANGED
@@ -81,7 +81,27 @@ const IconHamburger$2 = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE_
81
81
  d: "M11.9895 0C11.987 0 11.9845 0 11.9815 0C11.666 0 11.4105 0.256 11.4105 0.571C11.4105 0.886 11.666 1.142 11.9815 1.142C11.9845 1.142 11.987 1.142 11.99 1.142H14.037L4.735 10.444C4.6315 10.5475 4.5675 10.69 4.5675 10.848C4.5675 11.1635 4.8235 11.419 5.1385 11.419C5.296 11.419 5.439 11.355 5.542 11.252L14.844 1.95V3.997C14.844 3.9995 14.844 4.002 14.844 4.005C14.844 4.3205 15.0995 4.576 15.415 4.576C15.7305 4.576 15.986 4.3205 15.986 4.005C15.986 4.002 15.986 3.9995 15.986 3.9965V3.997V0.664C15.991 0.6365 15.9935 0.604 15.9935 0.5715C15.9935 0.256 15.738 0.0005 15.4225 0.0005C15.42 0.0005 15.4175 0.0005 15.4145 0.0005H11.989L11.9895 0ZM0.571 3.4255C0.256 3.4255 0 3.681 0 3.9965V15.415C0 15.7305 0.256 15.986 0.571 15.986H11.9895C12.305 15.986 12.5605 15.7305 12.5605 15.415V6.8C12.5605 6.7975 12.5605 6.795 12.5605 6.792C12.5605 6.4765 12.305 6.221 11.9895 6.221C11.674 6.221 11.4185 6.4765 11.4185 6.792C11.4185 6.795 11.4185 6.7975 11.4185 6.8005V6.8V14.844H1.1415V4.567H9.22C9.2225 4.567 9.225 4.567 9.228 4.567C9.5435 4.567 9.799 4.3115 9.799 3.996C9.799 3.6805 9.5435 3.425 9.228 3.425C9.225 3.425 9.2225 3.425 9.2195 3.425L0.571 3.4255Z"
82
82
  })));
83
83
  IconHamburger$2.displayName = 'IconHamburger';
84
- var IconHamburger$3 = IconHamburger$2;
84
+ var IconLinkExternal = IconHamburger$2;
85
+
86
+ const IconLinkInternal = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React__default["default"].createElement("svg", _extends__default["default"]({
87
+ ref: ref
88
+ }, props, {
89
+ xmlns: "http://www.w3.org/2000/svg",
90
+ width: "17",
91
+ height: "17",
92
+ viewBox: "0 0 17 17",
93
+ fill: "none"
94
+ }), /*#__PURE__*/React__default["default"].createElement("circle", {
95
+ cx: "8.31371",
96
+ cy: "8.01465",
97
+ r: "7.5",
98
+ stroke: "#242323"
99
+ }), /*#__PURE__*/React__default["default"].createElement("path", {
100
+ 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",
101
+ fill: "#242323"
102
+ })));
103
+ IconLinkInternal.displayName = 'IconLinkInternal';
104
+ var IconLinkInternal$1 = IconLinkInternal;
85
105
 
86
106
  const IconCheck = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React__default["default"].createElement("svg", _extends__default["default"]({
87
107
  ref: ref
@@ -263,6 +283,25 @@ const Alert = /*#__PURE__*/React.forwardRef((_ref, ref) => {
263
283
  });
264
284
  Alert.displayName = 'Alert';
265
285
 
286
+ const Link = /*#__PURE__*/React.forwardRef((_ref, ref) => {
287
+ let {
288
+ icon,
289
+ children,
290
+ className,
291
+ ...props
292
+ } = _ref;
293
+ const linkClassNames = classNames__default["default"]('jfcl-link', className);
294
+ return /*#__PURE__*/React__default["default"].createElement("a", _extends__default["default"]({}, props, {
295
+ ref: ref,
296
+ className: linkClassNames
297
+ }), children, icon === 'internal' && /*#__PURE__*/React__default["default"].createElement(IconLinkInternal$1, {
298
+ className: "jfcl-link__icon"
299
+ }), icon === 'external' && /*#__PURE__*/React__default["default"].createElement(IconLinkExternal, {
300
+ className: "jfcl-link__icon"
301
+ }));
302
+ });
303
+ Link.displayName = 'Link';
304
+
266
305
  exports.Alert = Alert;
267
306
  exports.Button = Button;
268
307
  exports.IconCheck = IconCheck$1;
@@ -272,6 +311,8 @@ exports.IconError = IconError$1;
272
311
  exports.IconGlobe = IconGlobe$1;
273
312
  exports.IconHamburger = IconHamburger$1;
274
313
  exports.IconInternet = IconInternet$1;
275
- exports.IconLinkExternal = IconHamburger$3;
314
+ exports.IconLinkExternal = IconLinkExternal;
315
+ exports.IconLinkInternal = IconLinkInternal$1;
276
316
  exports.IconLoading = IconLoading$1;
277
317
  exports.IconPerson = IconPerson$1;
318
+ exports.Link = Link;
@@ -1,5 +1,6 @@
1
1
  import IconLoading from './Loading';
2
2
  import IconLinkExternal from './LinkExternal';
3
+ import IconLinkInternal from './LinkInternal';
3
4
  import IconCheck from './Check';
4
5
  import IconError from './Error';
5
6
  import IconChevron from './Chevron';
@@ -8,4 +9,4 @@ import IconGlobe from './Globe';
8
9
  import IconHamburger from './Hamburger';
9
10
  import IconInternet from './Internet';
10
11
  import IconPerson from './Person';
11
- export { IconLoading, IconLinkExternal, IconCheck, IconError, IconChevron, IconClose, IconGlobe, IconHamburger, IconInternet, IconPerson, };
12
+ export { IconLoading, IconLinkExternal, IconLinkInternal, IconCheck, IconError, IconChevron, IconClose, IconGlobe, IconHamburger, IconInternet, IconPerson, };
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const IconLinkInternal: React.ForwardRefExoticComponent<React.SVGAttributes<SVGSVGElement> & React.RefAttributes<SVGSVGElement>>;
3
+ export default IconLinkInternal;
@@ -1,4 +1,5 @@
1
1
  import './styles/global.scss';
2
2
  export * from './buttons/Button';
3
3
  export * from './alerts/Alert';
4
+ export * from './link/Link';
4
5
  export * from './icons/Icons';
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import './styles.scss';
3
+ export type LinkIcon = 'internal' | 'external';
4
+ export interface LinkProps extends React.HTMLAttributes<HTMLAnchorElement> {
5
+ icon?: LinkIcon;
6
+ className?: string;
7
+ children: React.ReactNode;
8
+ }
9
+ export declare const Link: React.ForwardRefExoticComponent<LinkProps & React.RefAttributes<HTMLAnchorElement>>;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@justfixnyc/component-library",
3
3
  "description": "JustFix Component Library",
4
4
  "license": "MIT",
5
- "version": "0.29.2",
5
+ "version": "0.30.0",
6
6
  "main": "dist/src/index.js",
7
7
  "module": "dist/src/index.es.js",
8
8
  "files": [