@justfixnyc/component-library 0.57.0 → 0.58.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 +10 -1
- package/dist/src/index.js +9 -0
- package/dist/typings/Components/Icon/Icon.d.ts +1 -1
- package/dist/typings/stories/Button.d.ts +28 -0
- package/dist/typings/stories/Header.d.ts +12 -0
- package/dist/typings/stories/Page.d.ts +3 -0
- package/jfcl.scss +101 -0
- package/package.json +7 -5
- package/src/styles/colors.scss +0 -30
- package/src/styles/mixins.scss +0 -47
- package/src/styles/spacing.scss +0 -13
package/dist/src/index.es.js
CHANGED
|
@@ -2,7 +2,7 @@ import _extends from '@babel/runtime/helpers/extends';
|
|
|
2
2
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import React, { forwardRef, useId } from 'react';
|
|
5
|
-
import { faPlus, faBan, faXmark, faDownload as faDownload$1, faBuildingColumns, faAddressCard, faBuilding, faMapLocationDot, faMemoPad, faLocationDot, faHouse, faGlobe, faUser, faSpinner, faBars, faEnvelope as faEnvelope$2, faCommentSms, faCopy, faCirclePlus, faCircleInfo, faCircleExclamation as faCircleExclamation$1, faChevronRight, faChevronLeft, faChevronDown, faChevronUp, faCheckDouble, faCheck, faCaretDown, faCaretRight, faBookmark as faBookmark$1, faSquareArrowUpRight, faArrowsRotateReverse, faArrowDownWideShort, faArrowUpShortWide, faArrowUpArrowDown, faArrowDownLong, faArrowUpLong, faArrowDown, faArrowUpRight, faArrowUp, faArrowRight, faArrowLeft } from '@awesome.me/kit-6863e5a21e/icons/classic/solid';
|
|
5
|
+
import { faShieldCheck, faCalculatorSimple, faPlus, faBan, faXmark, faDownload as faDownload$1, faBuildingColumns, faAddressCard, faBuilding, faMapLocationDot, faMemoPad, faLocationDot, faHouse, faGlobe, faUser, faSpinner, faBars, faMailboxOpenLetter as faMailboxOpenLetter$1, faEnvelope as faEnvelope$2, faCommentSms, faCopy, faCirclePlus, faCircleInfo, faCircleExclamation as faCircleExclamation$1, faChevronRight, faChevronLeft, faChevronDown, faChevronUp, faCheckDouble, faCheck, faCaretDown, faCaretRight, faBookmark as faBookmark$1, faSquareArrowUpRight, faArrowsRotateReverse, faArrowDownWideShort, faArrowUpShortWide, faArrowUpArrowDown, faArrowDownLong, faArrowUpLong, faArrowDown, faArrowUpRight, faArrowUp, faArrowRight, faArrowLeft } from '@awesome.me/kit-6863e5a21e/icons/classic/solid';
|
|
6
6
|
import { faMailboxOpenLetter, faPaperPlane, faEnvelopeCircleCheck, faEnvelope } from '@awesome.me/kit-6863e5a21e/icons/classic/light';
|
|
7
7
|
import { faPrint, faEyeSlash, faEye, faDownload, faEnvelope as faEnvelope$1, faCircleExclamation, faBookmark } from '@awesome.me/kit-6863e5a21e/icons/classic/regular';
|
|
8
8
|
import { faXTwitter, faTwitter, faFacebookF } from '@awesome.me/kit-6863e5a21e/icons/classic/brands';
|
|
@@ -131,6 +131,9 @@ const Icon = _ref => {
|
|
|
131
131
|
faIcon = faPaperPlane;
|
|
132
132
|
break;
|
|
133
133
|
case 'mailboxOpenLetter':
|
|
134
|
+
faIcon = faMailboxOpenLetter$1;
|
|
135
|
+
break;
|
|
136
|
+
case 'mailboxOpenLetterLight':
|
|
134
137
|
faIcon = faMailboxOpenLetter;
|
|
135
138
|
break;
|
|
136
139
|
case 'bars':
|
|
@@ -190,6 +193,12 @@ const Icon = _ref => {
|
|
|
190
193
|
case 'plus':
|
|
191
194
|
faIcon = faPlus;
|
|
192
195
|
break;
|
|
196
|
+
case 'calculatorSimple':
|
|
197
|
+
faIcon = faCalculatorSimple;
|
|
198
|
+
break;
|
|
199
|
+
case 'shieldCheck':
|
|
200
|
+
faIcon = faShieldCheck;
|
|
201
|
+
break;
|
|
193
202
|
default:
|
|
194
203
|
console.warn("".concat(icon, " is not a supported icon name."));
|
|
195
204
|
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
package/dist/src/index.js
CHANGED
|
@@ -143,6 +143,9 @@ const Icon = _ref => {
|
|
|
143
143
|
faIcon = light.faPaperPlane;
|
|
144
144
|
break;
|
|
145
145
|
case 'mailboxOpenLetter':
|
|
146
|
+
faIcon = solid.faMailboxOpenLetter;
|
|
147
|
+
break;
|
|
148
|
+
case 'mailboxOpenLetterLight':
|
|
146
149
|
faIcon = light.faMailboxOpenLetter;
|
|
147
150
|
break;
|
|
148
151
|
case 'bars':
|
|
@@ -202,6 +205,12 @@ const Icon = _ref => {
|
|
|
202
205
|
case 'plus':
|
|
203
206
|
faIcon = solid.faPlus;
|
|
204
207
|
break;
|
|
208
|
+
case 'calculatorSimple':
|
|
209
|
+
faIcon = solid.faCalculatorSimple;
|
|
210
|
+
break;
|
|
211
|
+
case 'shieldCheck':
|
|
212
|
+
faIcon = solid.faShieldCheck;
|
|
213
|
+
break;
|
|
205
214
|
default:
|
|
206
215
|
console.warn("".concat(icon, " is not a supported icon name."));
|
|
207
216
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { FontAwesomeIconProps } from '@fortawesome/react-fontawesome';
|
|
3
|
-
export type IconNames = 'addressCard' | 'arrowDown' | 'arrowDownLong' | 'arrowDownWideShort' | 'arrowLeft' | 'arrowRight' | 'arrowsRotateReverse' | 'arrowUp' | 'arrowUpArrowDown' | 'arrowUpLong' | 'arrowUpRight' | 'arrowUpShortWide' | 'ban' | 'bars' | 'bookmark' | 'bookmarkRegular' | 'building' | 'buildingColumns' | 'caretDown' | 'caretRight' | 'check' | 'checkDouble' | 'chevronDown' | 'chevronLeft' | 'chevronRight' | 'chevronUp' | 'circleExclamation' | 'circleExclamationRegular' | 'circleInfo' | 'circlePlus' | 'copy' | 'download' | 'downloadRegular' | 'envelope' | 'envelopeCircleCheck' | 'envelopeCircleExclamationLight' | 'envelopeLight' | 'envelopeRegular' | 'eye' | 'eyeSlash' | 'facebook' | 'globe' | 'house' | 'locationDot' | 'mailboxOpenLetter' | 'mapLocationDot' | 'memoPad' | 'paperPlaneLight' | 'plus' | 'print' | 'sms' | 'spinner' | 'squareArrowUpRight' | 'twitter' | 'user' | 'xmark' | 'xTwitter';
|
|
3
|
+
export type IconNames = 'addressCard' | 'arrowDown' | 'arrowDownLong' | 'arrowDownWideShort' | 'arrowLeft' | 'arrowRight' | 'arrowsRotateReverse' | 'arrowUp' | 'arrowUpArrowDown' | 'arrowUpLong' | 'arrowUpRight' | 'arrowUpShortWide' | 'ban' | 'bars' | 'bookmark' | 'bookmarkRegular' | 'building' | 'buildingColumns' | 'calculatorSimple' | 'caretDown' | 'caretRight' | 'check' | 'checkDouble' | 'chevronDown' | 'chevronLeft' | 'chevronRight' | 'chevronUp' | 'circleExclamation' | 'circleExclamationRegular' | 'circleInfo' | 'circlePlus' | 'copy' | 'download' | 'downloadRegular' | 'envelope' | 'envelopeCircleCheck' | 'envelopeCircleExclamationLight' | 'envelopeLight' | 'envelopeRegular' | 'eye' | 'eyeSlash' | 'facebook' | 'globe' | 'house' | 'locationDot' | 'mailboxOpenLetter' | 'mailboxOpenLetterLight' | 'mapLocationDot' | 'memoPad' | 'paperPlaneLight' | 'plus' | 'print' | 'shieldCheck' | 'sms' | 'spinner' | 'squareArrowUpRight' | 'twitter' | 'user' | 'xmark' | 'xTwitter';
|
|
4
4
|
export interface IconProps extends Omit<FontAwesomeIconProps, 'icon'> {
|
|
5
5
|
className?: string;
|
|
6
6
|
icon?: IconNames;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import './button.css';
|
|
2
|
+
interface ButtonProps {
|
|
3
|
+
/**
|
|
4
|
+
* Is this the principal call to action on the page?
|
|
5
|
+
*/
|
|
6
|
+
primary?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* What background color to use
|
|
9
|
+
*/
|
|
10
|
+
backgroundColor?: string;
|
|
11
|
+
/**
|
|
12
|
+
* How large should the button be?
|
|
13
|
+
*/
|
|
14
|
+
size?: 'small' | 'medium' | 'large';
|
|
15
|
+
/**
|
|
16
|
+
* Button contents
|
|
17
|
+
*/
|
|
18
|
+
label: string;
|
|
19
|
+
/**
|
|
20
|
+
* Optional click handler
|
|
21
|
+
*/
|
|
22
|
+
onClick?: () => void;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Primary UI component for user interaction
|
|
26
|
+
*/
|
|
27
|
+
export declare const Button: ({ primary, size, backgroundColor, label, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import './header.css';
|
|
2
|
+
type User = {
|
|
3
|
+
name: string;
|
|
4
|
+
};
|
|
5
|
+
interface HeaderProps {
|
|
6
|
+
user?: User;
|
|
7
|
+
onLogin: () => void;
|
|
8
|
+
onLogout: () => void;
|
|
9
|
+
onCreateAccount: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const Header: ({ user, onLogin, onLogout, onCreateAccount, }: HeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
package/jfcl.scss
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
// COLORS
|
|
2
|
+
// ------
|
|
3
|
+
|
|
4
|
+
$WHITE: #ffffff;
|
|
5
|
+
$OFF_WHITE_100: #faf8f4;
|
|
6
|
+
$OFF_WHITE_150: #ebece8;
|
|
7
|
+
$OFF_WHITE_200: #efe9dc;
|
|
8
|
+
$OFF_BLACK: #242323;
|
|
9
|
+
$GREY_700: #4e4b4b;
|
|
10
|
+
$GREY_600: #676565;
|
|
11
|
+
$GREY_400: #9a9898;
|
|
12
|
+
$GREY_50: #f2f2f2;
|
|
13
|
+
$GREEN: #1aa551;
|
|
14
|
+
$PINK: #ffa0c7;
|
|
15
|
+
$YELLOW: #ffba33;
|
|
16
|
+
$ORANGE: #ff813a;
|
|
17
|
+
$BLUE: #5188ff;
|
|
18
|
+
$BLUE_50: #edf3ff;
|
|
19
|
+
$BLUE_100: #c6d8ff;
|
|
20
|
+
$BLUE_150: #9fbdff;
|
|
21
|
+
$GREY_SHADOW: #d4d5d0;
|
|
22
|
+
$GREY_DISABLED: #ebece8;
|
|
23
|
+
$GREY_NEW: #c5ccd1;
|
|
24
|
+
|
|
25
|
+
$FOCUS_OUTLINE_COLOR: $BLUE;
|
|
26
|
+
$INVALID_COLOR: $ORANGE;
|
|
27
|
+
|
|
28
|
+
$ORANGE: #ff813a;
|
|
29
|
+
$RED: #ba4300;
|
|
30
|
+
|
|
31
|
+
$TEXT_DISABLED: $GREY_600;
|
|
32
|
+
$BACKGROUND_DISABLED: $GREY_50;
|
|
33
|
+
$BORDER_DISABLED: $GREY_400;
|
|
34
|
+
|
|
35
|
+
// SPACING
|
|
36
|
+
// -------
|
|
37
|
+
|
|
38
|
+
$JF_SPACING_01: 0.125rem; // 2px
|
|
39
|
+
$JF_SPACING_02: 0.25rem; // 4px
|
|
40
|
+
$JF_SPACING_03: 0.5rem; // 8px
|
|
41
|
+
$JF_SPACING_04: 0.75rem; // 12px
|
|
42
|
+
$JF_SPACING_05: 1rem; // 16px
|
|
43
|
+
$JF_SPACING_06: 1.5rem; // 24px
|
|
44
|
+
$JF_SPACING_07: 2rem; // 32px
|
|
45
|
+
$JF_SPACING_08: 2.5rem; // 40px
|
|
46
|
+
$JF_SPACING_09: 3rem; // 48px
|
|
47
|
+
$JF_SPACING_10: 4rem; // 64px
|
|
48
|
+
$JF_SPACING_11: 5rem; // 80px
|
|
49
|
+
$JF_SPACING_12: 6rem; // 96px
|
|
50
|
+
$JF_SPACING_13: 10rem; // 160px
|
|
51
|
+
|
|
52
|
+
// MIXINS
|
|
53
|
+
// ------
|
|
54
|
+
|
|
55
|
+
@mixin body_standard_desktop {
|
|
56
|
+
font-family: 'Degular', Arial, Helvetica, sans-serif;
|
|
57
|
+
font-style: normal;
|
|
58
|
+
font-weight: 500;
|
|
59
|
+
font-size: 1.125rem; // 18px
|
|
60
|
+
line-height: 120%; // 21.6px
|
|
61
|
+
letter-spacing: 0.54px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@mixin eyebrow_mobile {
|
|
65
|
+
font-family: "Suisse Int'l Mono";
|
|
66
|
+
font-size: 0.875rem; // 14px
|
|
67
|
+
font-style: normal;
|
|
68
|
+
font-weight: 400;
|
|
69
|
+
line-height: 115%; // 16.1px
|
|
70
|
+
letter-spacing: 0.42px;
|
|
71
|
+
text-transform: uppercase;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
@mixin small_text_mobile {
|
|
75
|
+
font-family: 'Degular', Arial, Helvetica, sans-serif;
|
|
76
|
+
font-size: 0.875rem; // 14px
|
|
77
|
+
font-style: normal;
|
|
78
|
+
font-weight: 500;
|
|
79
|
+
line-height: 130%; // 18.2px
|
|
80
|
+
letter-spacing: 0.42px;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@keyframes spin {
|
|
84
|
+
from {
|
|
85
|
+
transform: rotate(0deg);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
to {
|
|
89
|
+
transform: rotate(360deg);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
@mixin loading-spinner($color: $WHITE) {
|
|
94
|
+
display: block;
|
|
95
|
+
animation: spin 500ms infinite linear;
|
|
96
|
+
position: relative;
|
|
97
|
+
border: 2px solid $color;
|
|
98
|
+
border-radius: $iconWidth;
|
|
99
|
+
border-right-color: transparent;
|
|
100
|
+
border-top-color: transparent;
|
|
101
|
+
}
|
package/package.json
CHANGED
|
@@ -2,17 +2,15 @@
|
|
|
2
2
|
"name": "@justfixnyc/component-library",
|
|
3
3
|
"description": "JustFix Component Library",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.58.0",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
7
7
|
"module": "dist/src/index.es.js",
|
|
8
8
|
"files": [
|
|
9
9
|
"dist",
|
|
10
|
-
"
|
|
11
|
-
"src/styles/mixins.scss",
|
|
12
|
-
"src/styles/spacing.scss"
|
|
10
|
+
"jfcl.scss"
|
|
13
11
|
],
|
|
14
12
|
"scripts": {
|
|
15
|
-
"build": "npm run build:js && npm run build:types",
|
|
13
|
+
"build": "npm run build:js && npm run build:types && npm run merge-scss",
|
|
16
14
|
"build:js": "rollup -c rollup.config.js",
|
|
17
15
|
"build:types": "tsc -p tsconfig.build.json",
|
|
18
16
|
"test": "npm run test:ts && npm run test:jest",
|
|
@@ -22,6 +20,7 @@
|
|
|
22
20
|
"lint:format": "prettier --check --ignore-unknown \"src/**/*\"",
|
|
23
21
|
"lint:js": "eslint --no-error-on-unmatched-pattern src/**",
|
|
24
22
|
"format": "prettier --write --ignore-unknown \"src/**/*\"",
|
|
23
|
+
"merge-scss": "gulp",
|
|
25
24
|
"storybook": "storybook dev -p 6006",
|
|
26
25
|
"build-storybook": "storybook build",
|
|
27
26
|
"deploy-storybook": "storybook-to-ghpages"
|
|
@@ -77,6 +76,9 @@
|
|
|
77
76
|
"eslint-plugin-prettier": "^4.0.0",
|
|
78
77
|
"eslint-plugin-react": "^7.22.0",
|
|
79
78
|
"eslint-plugin-react-hooks": "^4.2.0",
|
|
79
|
+
"gulp": "^5.0.1",
|
|
80
|
+
"gulp-concat": "^2.6.1",
|
|
81
|
+
"gulp-scss-combine": "^1.0.0",
|
|
80
82
|
"identity-obj-proxy": "^3.0.0",
|
|
81
83
|
"jest": "^26.6.3",
|
|
82
84
|
"prettier": "^2.2.1",
|
package/src/styles/colors.scss
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
$WHITE: #ffffff;
|
|
2
|
-
$OFF_WHITE_100: #faf8f4;
|
|
3
|
-
$OFF_WHITE_150: #ebece8;
|
|
4
|
-
$OFF_WHITE_200: #efe9dc;
|
|
5
|
-
$OFF_BLACK: #242323;
|
|
6
|
-
$GREY_700: #4e4b4b;
|
|
7
|
-
$GREY_600: #676565;
|
|
8
|
-
$GREY_400: #9a9898;
|
|
9
|
-
$GREY_50: #f2f2f2;
|
|
10
|
-
$GREEN: #1aa551;
|
|
11
|
-
$PINK: #ffa0c7;
|
|
12
|
-
$YELLOW: #ffba33;
|
|
13
|
-
$ORANGE: #ff813a;
|
|
14
|
-
$BLUE: #5188ff;
|
|
15
|
-
$BLUE_50: #edf3ff;
|
|
16
|
-
$BLUE_100: #c6d8ff;
|
|
17
|
-
$BLUE_150: #9fbdff;
|
|
18
|
-
$GREY_SHADOW: #d4d5d0;
|
|
19
|
-
$GREY_DISABLED: #ebece8;
|
|
20
|
-
$GREY_NEW: #c5ccd1;
|
|
21
|
-
|
|
22
|
-
$FOCUS_OUTLINE_COLOR: $BLUE;
|
|
23
|
-
$INVALID_COLOR: $ORANGE;
|
|
24
|
-
|
|
25
|
-
$ORANGE: #ff813a;
|
|
26
|
-
$RED: #ba4300;
|
|
27
|
-
|
|
28
|
-
$TEXT_DISABLED: $GREY_600;
|
|
29
|
-
$BACKGROUND_DISABLED: $GREY_50;
|
|
30
|
-
$BORDER_DISABLED: $GREY_400;
|
package/src/styles/mixins.scss
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
@mixin body_standard_desktop {
|
|
2
|
-
font-family: 'Degular', Arial, Helvetica, sans-serif;
|
|
3
|
-
font-style: normal;
|
|
4
|
-
font-weight: 500;
|
|
5
|
-
font-size: 1.125rem; // 18px
|
|
6
|
-
line-height: 120%; // 21.6px
|
|
7
|
-
letter-spacing: 0.54px;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
@mixin eyebrow_mobile {
|
|
11
|
-
font-family: "Suisse Int'l Mono";
|
|
12
|
-
font-size: 0.875rem; // 14px
|
|
13
|
-
font-style: normal;
|
|
14
|
-
font-weight: 400;
|
|
15
|
-
line-height: 115%; // 16.1px
|
|
16
|
-
letter-spacing: 0.42px;
|
|
17
|
-
text-transform: uppercase;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
@mixin small_text_mobile {
|
|
21
|
-
font-family: 'Degular', Arial, Helvetica, sans-serif;
|
|
22
|
-
font-size: 0.875rem; // 14px
|
|
23
|
-
font-style: normal;
|
|
24
|
-
font-weight: 500;
|
|
25
|
-
line-height: 130%; // 18.2px
|
|
26
|
-
letter-spacing: 0.42px;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
@keyframes spin {
|
|
30
|
-
from {
|
|
31
|
-
transform: rotate(0deg);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
to {
|
|
35
|
-
transform: rotate(360deg);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
@mixin loading-spinner($color: $WHITE) {
|
|
40
|
-
display: block;
|
|
41
|
-
animation: spin 500ms infinite linear;
|
|
42
|
-
position: relative;
|
|
43
|
-
border: 2px solid $color;
|
|
44
|
-
border-radius: $iconWidth;
|
|
45
|
-
border-right-color: transparent;
|
|
46
|
-
border-top-color: transparent;
|
|
47
|
-
}
|
package/src/styles/spacing.scss
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
$JF_SPACING_01: 0.125rem; // 2px
|
|
2
|
-
$JF_SPACING_02: 0.25rem; // 4px
|
|
3
|
-
$JF_SPACING_03: 0.5rem; // 8px
|
|
4
|
-
$JF_SPACING_04: 0.75rem; // 12px
|
|
5
|
-
$JF_SPACING_05: 1rem; // 16px
|
|
6
|
-
$JF_SPACING_06: 1.5rem; // 24px
|
|
7
|
-
$JF_SPACING_07: 2rem; // 32px
|
|
8
|
-
$JF_SPACING_08: 2.5rem; // 40px
|
|
9
|
-
$JF_SPACING_09: 3rem; // 48px
|
|
10
|
-
$JF_SPACING_10: 4rem; // 64px
|
|
11
|
-
$JF_SPACING_11: 5rem; // 80px
|
|
12
|
-
$JF_SPACING_12: 6rem; // 96px
|
|
13
|
-
$JF_SPACING_13: 10rem; // 160px
|