@justfixnyc/component-library 0.29.2 → 0.30.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.
@@ -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
  }
@@ -14,9 +14,10 @@ const Button = /*#__PURE__*/React.forwardRef((_ref, ref) => {
14
14
  labelIcon: ButtonIcon,
15
15
  iconOnRight,
16
16
  iconOnly,
17
+ className,
17
18
  ...props
18
19
  } = _ref;
19
- const buttonClassNames = classNames('jfcl-button', "jfcl-variant-".concat(variant), "jfcl-size-".concat(size), "".concat(loading ? 'jfcl-is-loading' : ''), "".concat(iconOnly ? 'jfcl-btn-icon-only' : ''));
20
+ 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);
20
21
  const iconClassNames = classNames('jfcl-button__icon', "".concat(iconOnRight ? 'jfcl-button__icon_right' : ''));
21
22
  const arias = {};
22
23
  if (iconOnly) {
@@ -71,7 +72,27 @@ const IconHamburger$2 = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/Rea
71
72
  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
73
  })));
73
74
  IconHamburger$2.displayName = 'IconHamburger';
74
- var IconHamburger$3 = IconHamburger$2;
75
+ var IconLinkExternal = IconHamburger$2;
76
+
77
+ const IconLinkInternal = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/React.createElement("svg", _extends({
78
+ ref: ref
79
+ }, props, {
80
+ xmlns: "http://www.w3.org/2000/svg",
81
+ width: "17",
82
+ height: "17",
83
+ viewBox: "0 0 17 17",
84
+ fill: "none"
85
+ }), /*#__PURE__*/React.createElement("circle", {
86
+ cx: "8.31371",
87
+ cy: "8.01465",
88
+ r: "7.5",
89
+ stroke: "#242323"
90
+ }), /*#__PURE__*/React.createElement("path", {
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: "#242323"
93
+ })));
94
+ IconLinkInternal.displayName = 'IconLinkInternal';
95
+ var IconLinkInternal$1 = IconLinkInternal;
75
96
 
76
97
  const IconCheck = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/React.createElement("svg", _extends({
77
98
  ref: ref
@@ -253,4 +274,23 @@ const Alert = /*#__PURE__*/forwardRef((_ref, ref) => {
253
274
  });
254
275
  Alert.displayName = 'Alert';
255
276
 
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 };
277
+ const Link = /*#__PURE__*/forwardRef((_ref, ref) => {
278
+ let {
279
+ icon,
280
+ children,
281
+ className,
282
+ ...props
283
+ } = _ref;
284
+ const linkClassNames = classNames('jfcl-link', className);
285
+ return /*#__PURE__*/React.createElement("a", _extends({}, props, {
286
+ ref: ref,
287
+ className: linkClassNames
288
+ }), children, icon === 'internal' && /*#__PURE__*/React.createElement(IconLinkInternal$1, {
289
+ className: "jfcl-link__icon"
290
+ }), icon === 'external' && /*#__PURE__*/React.createElement(IconLinkExternal, {
291
+ className: "jfcl-link__icon"
292
+ }));
293
+ });
294
+ Link.displayName = 'Link';
295
+
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 };
package/dist/src/index.js CHANGED
@@ -24,9 +24,10 @@ const Button = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
24
24
  labelIcon: ButtonIcon,
25
25
  iconOnRight,
26
26
  iconOnly,
27
+ className,
27
28
  ...props
28
29
  } = _ref;
29
- const buttonClassNames = classNames__default["default"]('jfcl-button', "jfcl-variant-".concat(variant), "jfcl-size-".concat(size), "".concat(loading ? 'jfcl-is-loading' : ''), "".concat(iconOnly ? 'jfcl-btn-icon-only' : ''));
30
+ const buttonClassNames = classNames__default["default"]('jfcl-button', "jfcl-variant-".concat(variant), "jfcl-size-".concat(size), "".concat(loading ? 'jfcl-is-loading' : ''), "".concat(iconOnly ? 'jfcl-btn-icon-only' : ''), className);
30
31
  const iconClassNames = classNames__default["default"]('jfcl-button__icon', "".concat(iconOnRight ? 'jfcl-button__icon_right' : ''));
31
32
  const arias = {};
32
33
  if (iconOnly) {
@@ -81,7 +82,27 @@ const IconHamburger$2 = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE_
81
82
  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
83
  })));
83
84
  IconHamburger$2.displayName = 'IconHamburger';
84
- var IconHamburger$3 = IconHamburger$2;
85
+ var IconLinkExternal = IconHamburger$2;
86
+
87
+ const IconLinkInternal = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React__default["default"].createElement("svg", _extends__default["default"]({
88
+ ref: ref
89
+ }, props, {
90
+ xmlns: "http://www.w3.org/2000/svg",
91
+ width: "17",
92
+ height: "17",
93
+ viewBox: "0 0 17 17",
94
+ fill: "none"
95
+ }), /*#__PURE__*/React__default["default"].createElement("circle", {
96
+ cx: "8.31371",
97
+ cy: "8.01465",
98
+ r: "7.5",
99
+ stroke: "#242323"
100
+ }), /*#__PURE__*/React__default["default"].createElement("path", {
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: "#242323"
103
+ })));
104
+ IconLinkInternal.displayName = 'IconLinkInternal';
105
+ var IconLinkInternal$1 = IconLinkInternal;
85
106
 
86
107
  const IconCheck = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React__default["default"].createElement("svg", _extends__default["default"]({
87
108
  ref: ref
@@ -263,6 +284,25 @@ const Alert = /*#__PURE__*/React.forwardRef((_ref, ref) => {
263
284
  });
264
285
  Alert.displayName = 'Alert';
265
286
 
287
+ const Link = /*#__PURE__*/React.forwardRef((_ref, ref) => {
288
+ let {
289
+ icon,
290
+ children,
291
+ className,
292
+ ...props
293
+ } = _ref;
294
+ const linkClassNames = classNames__default["default"]('jfcl-link', className);
295
+ return /*#__PURE__*/React__default["default"].createElement("a", _extends__default["default"]({}, props, {
296
+ ref: ref,
297
+ className: linkClassNames
298
+ }), children, icon === 'internal' && /*#__PURE__*/React__default["default"].createElement(IconLinkInternal$1, {
299
+ className: "jfcl-link__icon"
300
+ }), icon === 'external' && /*#__PURE__*/React__default["default"].createElement(IconLinkExternal, {
301
+ className: "jfcl-link__icon"
302
+ }));
303
+ });
304
+ Link.displayName = 'Link';
305
+
266
306
  exports.Alert = Alert;
267
307
  exports.Button = Button;
268
308
  exports.IconCheck = IconCheck$1;
@@ -272,6 +312,8 @@ exports.IconError = IconError$1;
272
312
  exports.IconGlobe = IconGlobe$1;
273
313
  exports.IconHamburger = IconHamburger$1;
274
314
  exports.IconInternet = IconInternet$1;
275
- exports.IconLinkExternal = IconHamburger$3;
315
+ exports.IconLinkExternal = IconLinkExternal;
316
+ exports.IconLinkInternal = IconLinkInternal$1;
276
317
  exports.IconLoading = IconLoading$1;
277
318
  exports.IconPerson = IconPerson$1;
319
+ exports.Link = Link;
@@ -8,6 +8,7 @@ export interface ButtonProps extends React.ComponentPropsWithoutRef<'button'> {
8
8
  loading?: boolean;
9
9
  iconOnRight?: boolean;
10
10
  iconOnly?: boolean;
11
+ className?: string;
11
12
  }
12
13
  /**
13
14
  * Accepts all `ButtonHTMLAttributes`
@@ -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.1",
6
6
  "main": "dist/src/index.js",
7
7
  "module": "dist/src/index.es.js",
8
8
  "files": [