qlu-20-ui-library 1.0.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/.eslintrc.js +36 -0
- package/.run/demo_start.run.xml +12 -0
- package/.run/storybook.run.xml +12 -0
- package/dist/assets/index-22ff84d5.js +44 -0
- package/dist/assets/index-655b6c8f.css +1 -0
- package/dist/index.html +15 -0
- package/index.html +13 -0
- package/package.json +38 -0
- package/src/App.scss +38 -0
- package/src/App.tsx +216 -0
- package/src/_colors.scss +248 -0
- package/src/_fonts.scss +60 -0
- package/src/_svg.scss +27 -0
- package/src/components/AddAdditionalIdealProfileCard/AddAdditionalIdealProfileCard.tsx +52 -0
- package/src/components/AddAdditionalIdealProfileCard/style.scss +42 -0
- package/src/components/CircularIcon/CircularIcon.tsx +24 -0
- package/src/components/CircularIcon/style.scss +3 -0
- package/src/components/CircularSvgButton/CircularSvgButton.tsx +54 -0
- package/src/components/CircularSvgButton/style.scss +105 -0
- package/src/components/ClickableText/ClickableText.tsx +50 -0
- package/src/components/ClickableText/style.scss +68 -0
- package/src/components/CompanyPillNotClicakble/CompanyPillNotClicakble.tsx +32 -0
- package/src/components/CompanyPillNotClicakble/style.scss +21 -0
- package/src/components/GetSvgIcon/GetSvgIcon.tsx +65 -0
- package/src/components/HiringCompanyConciseCard/HiringCompanyConciseCard.tsx +42 -0
- package/src/components/HiringCompanyConciseCard/style.scss +31 -0
- package/src/components/IdealProfileConciseCard/IdealProfileConciseCard.tsx +47 -0
- package/src/components/IdealProfileConciseCard/style.scss +31 -0
- package/src/components/IdealProfileSelectionCard/IdealProfileSelectionCard.tsx +83 -0
- package/src/components/IdealProfileSelectionCard/style.scss +58 -0
- package/src/components/InputField/InputField.tsx +28 -0
- package/src/components/InputField/style.scss +44 -0
- package/src/components/PrimaryButton/PrimaryButton.tsx +40 -0
- package/src/components/PrimaryButton/style.scss +65 -0
- package/src/components/RangeComponent/RangeComponent.tsx +40 -0
- package/src/components/RangeComponent/style.scss +4 -0
- package/src/components/SecondaryButton/SecondaryButton.tsx +41 -0
- package/src/components/SecondaryButton/style.scss +66 -0
- package/src/components/TertiaryButton/TertiaryButton.tsx +39 -0
- package/src/components/TertiaryButton/style.scss +55 -0
- package/src/components/TextButton/TextButton.tsx +34 -0
- package/src/components/TextButton/style.scss +91 -0
- package/src/components/TextPillNotClickable/TextPillNotClickable.tsx +25 -0
- package/src/components/TextPillNotClickable/style.scss +31 -0
- package/src/components/TruncateText/TruncateText.tsx +43 -0
- package/src/index.css +69 -0
- package/src/main.tsx +10 -0
- package/src/svg/Clock.tsx +25 -0
- package/src/svg/Cross.tsx +24 -0
- package/src/svg/LinkedinLogo.tsx +24 -0
- package/src/svg/Plus.tsx +20 -0
- package/src/svg/Thumb.tsx +25 -0
- package/src/svg/Tick.tsx +23 -0
- package/src/utils.ts +9 -0
- package/src/vite-env.d.ts +1 -0
- package/tsconfig.node.json +10 -0
- package/vite.config.ts +7 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
@import '../../colors';
|
|
2
|
+
@import '../../fonts';
|
|
3
|
+
@import '../../svg';
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
.idealProfileConciseCard{
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: row;
|
|
9
|
+
border: 1px solid $gray-800;
|
|
10
|
+
border-radius: 8px;
|
|
11
|
+
background: linear-gradient(212.26deg, rgba(73, 73, 73, 0.2) 0%, rgba(73, 73, 73, 0) 99.04%);
|
|
12
|
+
|
|
13
|
+
padding: 16px;
|
|
14
|
+
box-sizing: border-box;
|
|
15
|
+
gap: 12px;
|
|
16
|
+
|
|
17
|
+
width: 350px;
|
|
18
|
+
}
|
|
19
|
+
.idealProfileConciseCardProfileDetails{
|
|
20
|
+
|
|
21
|
+
display: flex;
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
|
|
24
|
+
>h3{
|
|
25
|
+
@include text-base($weight : 600 , $color: $gray-25);
|
|
26
|
+
}
|
|
27
|
+
span{
|
|
28
|
+
@include text-sm($weight : 400 , $color: $gray-100);
|
|
29
|
+
display: inline;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import './style.scss'
|
|
2
|
+
import { IconSize } from '../../utils';
|
|
3
|
+
import CircularIcon from '../CircularIcon/CircularIcon';
|
|
4
|
+
import ClickableText from '../ClickableText/ClickableText';
|
|
5
|
+
import GetSvgIcon from '../GetSvgIcon/GetSvgIcon';
|
|
6
|
+
import TertiaryButton from '../TertiaryButton/TertiaryButton';
|
|
7
|
+
import TruncateText from '../TruncateText/TruncateText';
|
|
8
|
+
|
|
9
|
+
interface IdealProfileSelectionCardProps{
|
|
10
|
+
iconUrl: string;
|
|
11
|
+
profileName: string;
|
|
12
|
+
profileCurrentRole: string;
|
|
13
|
+
profileCurrentCompany: string;
|
|
14
|
+
truncationLength?: number;
|
|
15
|
+
containerClassName?: string;
|
|
16
|
+
toolTipClassName?: string;
|
|
17
|
+
selected: boolean;
|
|
18
|
+
onSelectClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
19
|
+
onViewMoreClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
20
|
+
iconSize?: IconSize;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const IdealProfileSelectionCard = ({
|
|
24
|
+
iconUrl= '',
|
|
25
|
+
profileName= '',
|
|
26
|
+
profileCurrentRole= '',
|
|
27
|
+
profileCurrentCompany= '',
|
|
28
|
+
truncationLength = 14,
|
|
29
|
+
iconSize= '48',
|
|
30
|
+
containerClassName= '',
|
|
31
|
+
toolTipClassName = '',
|
|
32
|
+
selected = false,
|
|
33
|
+
onSelectClick,
|
|
34
|
+
onViewMoreClick,
|
|
35
|
+
}: IdealProfileSelectionCardProps) => {
|
|
36
|
+
return (
|
|
37
|
+
<div
|
|
38
|
+
className={`idealProfileSelectionCard ${containerClassName} ${selected ? 'idealProfileSelectionCardSelected' : 'idealProfileSelectionCardUnelected'}`}
|
|
39
|
+
>
|
|
40
|
+
<CircularIcon
|
|
41
|
+
iconPath={iconUrl}
|
|
42
|
+
iconSize={iconSize}
|
|
43
|
+
/>
|
|
44
|
+
<span
|
|
45
|
+
className='idealProfileSelectionCardProfileDetails'
|
|
46
|
+
>
|
|
47
|
+
<span
|
|
48
|
+
className='idealProfileSelectionCardProfileName'
|
|
49
|
+
>
|
|
50
|
+
<h3>{profileName}</h3>
|
|
51
|
+
<span>
|
|
52
|
+
<GetSvgIcon
|
|
53
|
+
iconType='linkedinLogo'
|
|
54
|
+
iconSize='12'
|
|
55
|
+
/>
|
|
56
|
+
</span>
|
|
57
|
+
</span>
|
|
58
|
+
<span
|
|
59
|
+
className='idealProfileSelectionCardProfileRole'
|
|
60
|
+
>
|
|
61
|
+
{profileCurrentRole} @ <TruncateText length={truncationLength} text={profileCurrentCompany} toolTipClassName={toolTipClassName}/>
|
|
62
|
+
<ClickableText
|
|
63
|
+
text = 'View More'
|
|
64
|
+
colorVariant='orange'
|
|
65
|
+
sizeVariant='xs'
|
|
66
|
+
onClick = {onViewMoreClick}
|
|
67
|
+
/>
|
|
68
|
+
</span>
|
|
69
|
+
<span
|
|
70
|
+
className='idealProfileSelectionCardButton'
|
|
71
|
+
>
|
|
72
|
+
<TertiaryButton
|
|
73
|
+
onClick={onSelectClick}
|
|
74
|
+
text={selected ? 'Unselect' : 'Select'}
|
|
75
|
+
sizeVariant='xs'
|
|
76
|
+
/>
|
|
77
|
+
</span>
|
|
78
|
+
</span>
|
|
79
|
+
</div>
|
|
80
|
+
)
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export default IdealProfileSelectionCard
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
@import '../../colors';
|
|
2
|
+
@import '../../fonts';
|
|
3
|
+
@import '../../svg';
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
.idealProfileSelectionCard{
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: row;
|
|
9
|
+
border-radius: 8px;
|
|
10
|
+
|
|
11
|
+
padding: 16px;
|
|
12
|
+
box-sizing: border-box;
|
|
13
|
+
gap: 12px;
|
|
14
|
+
width: 350px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.idealProfileSelectionCardSelected{
|
|
18
|
+
border: 1px solid $orange-500;
|
|
19
|
+
background: linear-gradient(212.26deg, rgba(255, 141, 78, 0.2) 0%, rgba(73, 73, 73, 0) 99.04%);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.idealProfileSelectionCardUnelected{
|
|
23
|
+
border: 1px solid $gray-800;
|
|
24
|
+
background: linear-gradient(212.26deg, rgba(73, 73, 73, 0.2) 0%, rgba(73, 73, 73, 0) 99.04%);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.idealProfileSelectionCardProfileDetails{
|
|
28
|
+
|
|
29
|
+
display: flex;
|
|
30
|
+
flex-direction: column;
|
|
31
|
+
gap: 4px;
|
|
32
|
+
width: 85%;
|
|
33
|
+
|
|
34
|
+
.idealProfileSelectionCardProfileName{
|
|
35
|
+
display: flex;
|
|
36
|
+
align-items: center;
|
|
37
|
+
gap: 4px;
|
|
38
|
+
>h3{
|
|
39
|
+
@include text-base($weight : 600 , $color: $gray-25);
|
|
40
|
+
}
|
|
41
|
+
>span{
|
|
42
|
+
@include svgFillStroke($color: $gray-400);
|
|
43
|
+
width: fit-content;
|
|
44
|
+
height: fit-content;
|
|
45
|
+
&:hover{
|
|
46
|
+
cursor: pointer;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
.idealProfileSelectionCardProfileRole{
|
|
51
|
+
@include text-sm($weight : 400 , $color: $gray-100);
|
|
52
|
+
display: inline;
|
|
53
|
+
}
|
|
54
|
+
.idealProfileSelectionCardButton{
|
|
55
|
+
width: fit-content;
|
|
56
|
+
align-self: flex-end;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import './style.scss'
|
|
2
|
+
|
|
3
|
+
interface InputFieldProps{
|
|
4
|
+
placeholder ?: string;
|
|
5
|
+
disabled ?: boolean;
|
|
6
|
+
textSize?: 'xs' | 'sm' | 'base';
|
|
7
|
+
style?: object;
|
|
8
|
+
errorState: boolean;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const InputField = ({
|
|
12
|
+
placeholder = '',
|
|
13
|
+
textSize = 'sm',
|
|
14
|
+
style = {},
|
|
15
|
+
errorState = false
|
|
16
|
+
} : InputFieldProps) => {
|
|
17
|
+
return (
|
|
18
|
+
<input
|
|
19
|
+
style={style}
|
|
20
|
+
className={`inputFieldGeneric ${errorState && 'errorInputField'} ${textSize}TextSize`}
|
|
21
|
+
placeholder={placeholder}
|
|
22
|
+
>
|
|
23
|
+
|
|
24
|
+
</input>
|
|
25
|
+
)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export default InputField
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
@import '../../colors';
|
|
2
|
+
@import '../../fonts';
|
|
3
|
+
@import '../../svg';
|
|
4
|
+
|
|
5
|
+
.inputFieldGeneric{
|
|
6
|
+
padding: 8px 12px;
|
|
7
|
+
border: 1px solid;
|
|
8
|
+
border-radius: 8px;
|
|
9
|
+
height: fit-content;
|
|
10
|
+
|
|
11
|
+
transition: background-color 300ms ease-in-out, color 300ms ease-in-out, border-color 300ms ease-in-out;
|
|
12
|
+
|
|
13
|
+
background-color: $gray-800;
|
|
14
|
+
border-color: $gray-600;
|
|
15
|
+
color: $white;
|
|
16
|
+
|
|
17
|
+
&::placeholder:not(:disabled){
|
|
18
|
+
color: $gray-200;
|
|
19
|
+
}
|
|
20
|
+
&:hover:not(:disabled){
|
|
21
|
+
border-color: $gray-300;
|
|
22
|
+
}
|
|
23
|
+
&:focus:not(:disabled){
|
|
24
|
+
outline: none;
|
|
25
|
+
border-color: $orange-500;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.errorInputField{
|
|
31
|
+
background-color: $gray-800;
|
|
32
|
+
border-color: $red-500;
|
|
33
|
+
color: $white;
|
|
34
|
+
|
|
35
|
+
&::placeholder:not(:disabled){
|
|
36
|
+
color: $red-500;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&:focus:not(:disabled){
|
|
40
|
+
outline: none;
|
|
41
|
+
border-color: $orange-500;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import clsx from 'clsx';
|
|
2
|
+
import './style.scss'
|
|
3
|
+
|
|
4
|
+
interface PrimaryButtonProps{
|
|
5
|
+
|
|
6
|
+
text: string;
|
|
7
|
+
primaryButtonClassName?: string;
|
|
8
|
+
sizeVariant?: 'xs' | 'sm' | 'base';
|
|
9
|
+
colorVariant: 'orange' | 'black' | 'gray' ;
|
|
10
|
+
isDisabled?: boolean;
|
|
11
|
+
onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const PrimaryButton = ({
|
|
15
|
+
text = 'Button text',
|
|
16
|
+
primaryButtonClassName = '',
|
|
17
|
+
sizeVariant = 'xs',
|
|
18
|
+
colorVariant = 'orange',
|
|
19
|
+
isDisabled = false,
|
|
20
|
+
onClick,
|
|
21
|
+
}: PrimaryButtonProps) => {
|
|
22
|
+
|
|
23
|
+
const className = clsx({
|
|
24
|
+
primaryButtonGeneric : true,
|
|
25
|
+
[`${sizeVariant}Size--PrimaryButton`]: true,
|
|
26
|
+
[`${colorVariant}--PrimaryButton`]: true
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<button
|
|
31
|
+
className={`${className} ${primaryButtonClassName}`}
|
|
32
|
+
disabled = {isDisabled}
|
|
33
|
+
onClick={onClick}
|
|
34
|
+
>
|
|
35
|
+
{text}
|
|
36
|
+
</button>
|
|
37
|
+
)
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export default PrimaryButton
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
@import '../../colors';
|
|
2
|
+
@import '../../fonts';
|
|
3
|
+
@import '../../svg';
|
|
4
|
+
|
|
5
|
+
@mixin mixin--PrimaryButton($tColor: $orange-990 , $bgColor:$orange-500 , $tColor-Hover: white , $bgColor-Hover : $orange-700 , $outlineColor: $orange-300){
|
|
6
|
+
color: $tColor;
|
|
7
|
+
background-color: $bgColor;
|
|
8
|
+
transition: color 300ms ease-in-out , background-color 300ms ease-in-out , border 300ms ease-in-out;
|
|
9
|
+
|
|
10
|
+
&:hover{
|
|
11
|
+
color: $tColor-Hover;
|
|
12
|
+
background-color: $bgColor-Hover;
|
|
13
|
+
}
|
|
14
|
+
&:active:not(:disabled){
|
|
15
|
+
outline: 2px solid $outlineColor;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.primaryButtonGeneric{
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
justify-content: center;
|
|
24
|
+
text-align: center;
|
|
25
|
+
border-radius: 8px;
|
|
26
|
+
min-width: 110px;
|
|
27
|
+
border: none;
|
|
28
|
+
outline: 0px;
|
|
29
|
+
height: fit-content;
|
|
30
|
+
&:hover{
|
|
31
|
+
cursor: pointer;
|
|
32
|
+
}
|
|
33
|
+
&:disabled{
|
|
34
|
+
cursor: not-allowed;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.orange--PrimaryButton{
|
|
39
|
+
@include mixin--PrimaryButton()
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.black--PrimaryButton{
|
|
43
|
+
@include mixin--PrimaryButton($tColor: white , $bgColor:$gray-800 , $tColor-Hover: white , $bgColor-Hover : $gray-700 , $outlineColor: $gray-200)
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.gray--PrimaryButton{
|
|
47
|
+
@include mixin--PrimaryButton($tColor: $gray-800 , $bgColor:$gray-200 , $tColor-Hover: $gray-800 , $bgColor-Hover : $gray-300 , $outlineColor: $gray-100)
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
.xsSize--PrimaryButton{
|
|
52
|
+
@include text-size-xs();
|
|
53
|
+
padding: 8px 12px;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.smSize--PrimaryButton{
|
|
57
|
+
@include text-size-sm();
|
|
58
|
+
padding: 8px 12px;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.baseSize--PrimaryButton{
|
|
62
|
+
@include text-size-base();
|
|
63
|
+
padding: 10px 20px;
|
|
64
|
+
}
|
|
65
|
+
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import InputRange from 'react-input-range'
|
|
2
|
+
import 'react-input-range/lib/css/index.css'
|
|
3
|
+
import './style.scss'
|
|
4
|
+
|
|
5
|
+
type range = {
|
|
6
|
+
min: number,
|
|
7
|
+
max: number
|
|
8
|
+
}
|
|
9
|
+
interface RangeComponentProps{
|
|
10
|
+
minValue : number;
|
|
11
|
+
maxValue : number;
|
|
12
|
+
value : {min: number , max: number};
|
|
13
|
+
step : number;
|
|
14
|
+
// staticMax : number;
|
|
15
|
+
onChange: (prop:range | number) => void;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const RangeComponent = ({
|
|
19
|
+
minValue,
|
|
20
|
+
maxValue,
|
|
21
|
+
value,
|
|
22
|
+
step,
|
|
23
|
+
onChange
|
|
24
|
+
}: RangeComponentProps) => {
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
<InputRange
|
|
29
|
+
minValue={minValue}
|
|
30
|
+
// maxValue={getMax()}
|
|
31
|
+
maxValue={maxValue}
|
|
32
|
+
value={value}
|
|
33
|
+
step={step}
|
|
34
|
+
onChange={onChange}
|
|
35
|
+
// formatLabel={(value) => disabled?'':getLabel ? getLabel(value) : `${value} ${label}`}
|
|
36
|
+
/>
|
|
37
|
+
)
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export default RangeComponent
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import './style.scss'
|
|
2
|
+
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import './style.scss'
|
|
5
|
+
interface SecondaryButtonProps{
|
|
6
|
+
|
|
7
|
+
text: string;
|
|
8
|
+
secondaryButtonClassName?: string;
|
|
9
|
+
sizeVariant?: 'xs' | 'sm' | 'base';
|
|
10
|
+
colorVariant: 'orange' | 'black' | 'gray' ;
|
|
11
|
+
isDisabled?: boolean;
|
|
12
|
+
onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const SecondaryButton = ({
|
|
16
|
+
text = 'Button text',
|
|
17
|
+
secondaryButtonClassName = '',
|
|
18
|
+
sizeVariant = 'xs',
|
|
19
|
+
colorVariant = 'orange',
|
|
20
|
+
isDisabled = false,
|
|
21
|
+
onClick,
|
|
22
|
+
}: SecondaryButtonProps) => {
|
|
23
|
+
|
|
24
|
+
const className = clsx({
|
|
25
|
+
secondaryButtonGeneric : true,
|
|
26
|
+
[`${sizeVariant}Size--SecondaryButton`]: true,
|
|
27
|
+
[`${colorVariant}--SecondaryButton`]: true
|
|
28
|
+
})
|
|
29
|
+
return (
|
|
30
|
+
|
|
31
|
+
<button
|
|
32
|
+
className={`${className} ${secondaryButtonClassName}`}
|
|
33
|
+
disabled = {isDisabled}
|
|
34
|
+
onClick={onClick}
|
|
35
|
+
>
|
|
36
|
+
{text}
|
|
37
|
+
</button>
|
|
38
|
+
)
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export default SecondaryButton
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
@import '../../colors';
|
|
2
|
+
@import '../../fonts';
|
|
3
|
+
@import '../../svg';
|
|
4
|
+
|
|
5
|
+
@mixin mixin--SecondaryButton($tColor: $orange-500 , $bgColor: transparent , $tColor-Hover: white , $bgColor-Hover : $orange-500 , $outlineColor: $orange-300){
|
|
6
|
+
color: $tColor;
|
|
7
|
+
background-color: $bgColor;
|
|
8
|
+
border: 1px solid $tColor;
|
|
9
|
+
transition: color 300ms ease-in-out , background-color 300ms ease-in-out;
|
|
10
|
+
|
|
11
|
+
&:hover{
|
|
12
|
+
color: $tColor-Hover;
|
|
13
|
+
background-color: $bgColor-Hover;
|
|
14
|
+
}
|
|
15
|
+
&:active:not(:disabled){
|
|
16
|
+
outline: 2px solid $outlineColor;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.secondaryButtonGeneric{
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
justify-content: center;
|
|
25
|
+
text-align: center;
|
|
26
|
+
border-radius: 8px;
|
|
27
|
+
min-width: 110px;
|
|
28
|
+
border: none;
|
|
29
|
+
outline: 0px;
|
|
30
|
+
height: fit-content;
|
|
31
|
+
&:hover{
|
|
32
|
+
cursor: pointer;
|
|
33
|
+
}
|
|
34
|
+
&:disabled{
|
|
35
|
+
cursor: not-allowed;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.orange--SecondaryButton{
|
|
40
|
+
@include mixin--SecondaryButton()
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.black--SecondaryButton{
|
|
44
|
+
@include mixin--SecondaryButton($tColor: $gray-800 , $bgColor: transparent , $tColor-Hover: white , $bgColor-Hover : $gray-700 , $outlineColor: $gray-200)
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.gray--SecondaryButton{
|
|
48
|
+
@include mixin--SecondaryButton($tColor: $gray-800 , $bgColor: transparent , $tColor-Hover: white , $bgColor-Hover : $gray-300 , $outlineColor: $gray-100)
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
.xsSize--SecondaryButton{
|
|
53
|
+
@include text-size-xs();
|
|
54
|
+
padding: 8px 12px;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.smSize--SecondaryButton{
|
|
58
|
+
@include text-size-sm();
|
|
59
|
+
padding: 8px 12px;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.baseSize--SecondaryButton{
|
|
63
|
+
@include text-size-base();
|
|
64
|
+
padding: 10px 20px;
|
|
65
|
+
}
|
|
66
|
+
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import clsx from 'clsx';
|
|
2
|
+
import './style.scss'
|
|
3
|
+
interface TertiaryButtonProps{
|
|
4
|
+
|
|
5
|
+
text: string;
|
|
6
|
+
tertiaryButtonClassName?: string;
|
|
7
|
+
sizeVariant?: 'xs' | 'sm' | 'base';
|
|
8
|
+
// colorVariant: 'orange' | 'black' | 'gray' ;
|
|
9
|
+
isDisabled?: boolean;
|
|
10
|
+
onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const TertiaryButton = ({
|
|
14
|
+
text = 'Button text',
|
|
15
|
+
tertiaryButtonClassName = '',
|
|
16
|
+
sizeVariant = 'xs',
|
|
17
|
+
// colorVariant = 'orange',
|
|
18
|
+
isDisabled = false,
|
|
19
|
+
onClick,
|
|
20
|
+
}: TertiaryButtonProps) => {
|
|
21
|
+
|
|
22
|
+
const className = clsx({
|
|
23
|
+
tertiaryButtonGeneric : true,
|
|
24
|
+
[`${sizeVariant}Size--TertiaryButton`]: true,
|
|
25
|
+
// [`${colorVariant}--TertiaryButton`]: true
|
|
26
|
+
})
|
|
27
|
+
return (
|
|
28
|
+
|
|
29
|
+
<button
|
|
30
|
+
className={`${className} ${tertiaryButtonClassName}`}
|
|
31
|
+
disabled = {isDisabled}
|
|
32
|
+
onClick={onClick}
|
|
33
|
+
>
|
|
34
|
+
{text}
|
|
35
|
+
</button>
|
|
36
|
+
)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export default TertiaryButton
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
@import '../../colors';
|
|
2
|
+
@import '../../fonts';
|
|
3
|
+
@import '../../svg';
|
|
4
|
+
|
|
5
|
+
@mixin mixin--TertiaryButton($tColor: $gray-100 , $bgColor: $gray-800 , $tColor-Hover: white , $bgColor-Hover : $gray-700 , $outlineColor: $gray-500){
|
|
6
|
+
color: $tColor;
|
|
7
|
+
background-color: $bgColor;
|
|
8
|
+
border: 1px solid $gray-500;
|
|
9
|
+
transition: color 300ms ease-in-out , background-color 300ms ease-in-out , border-color 300ms ease-in-out;
|
|
10
|
+
|
|
11
|
+
&:hover{
|
|
12
|
+
color: $tColor-Hover;
|
|
13
|
+
background-color: $bgColor-Hover;
|
|
14
|
+
border-color: $gray-600;
|
|
15
|
+
}
|
|
16
|
+
&:active:not(:disabled){
|
|
17
|
+
outline: 2px solid $outlineColor;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.tertiaryButtonGeneric{
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
justify-content: center;
|
|
26
|
+
text-align: center;
|
|
27
|
+
border-radius: 8px;
|
|
28
|
+
min-width: 110px;
|
|
29
|
+
border: none;
|
|
30
|
+
outline: 0px;
|
|
31
|
+
height: fit-content;
|
|
32
|
+
@include mixin--TertiaryButton();
|
|
33
|
+
&:hover{
|
|
34
|
+
cursor: pointer;
|
|
35
|
+
}
|
|
36
|
+
&:disabled{
|
|
37
|
+
cursor: not-allowed;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.xsSize--TertiaryButton{
|
|
42
|
+
@include text-size-xs();
|
|
43
|
+
padding: 8px 12px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.smSize--TertiaryButton{
|
|
47
|
+
@include text-size-sm();
|
|
48
|
+
padding: 8px 12px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.baseSize--TertiaryButton{
|
|
52
|
+
@include text-size-base();
|
|
53
|
+
padding: 10px 20px;
|
|
54
|
+
}
|
|
55
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import './style.scss'
|
|
2
|
+
|
|
3
|
+
interface TextButtonProps {
|
|
4
|
+
onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
5
|
+
isDisabled?: boolean;
|
|
6
|
+
text: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
sizeVariant?: 'xs' | 'sm' | 'base' | 'l' | 'xl' ;
|
|
9
|
+
colorVariant: 'primaryOrange' | 'primaryOrangeBorder' | 'alternativeDarkBorder' ;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
const TextButton = ({
|
|
14
|
+
onClick,
|
|
15
|
+
isDisabled = false,
|
|
16
|
+
text = 'Button Text',
|
|
17
|
+
// className = '',
|
|
18
|
+
sizeVariant = 'base',
|
|
19
|
+
colorVariant = 'primaryOrange',
|
|
20
|
+
}: TextButtonProps) => {
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
|
|
24
|
+
<button
|
|
25
|
+
className={`textButtonGeneric ${sizeVariant}Size ${colorVariant}`}
|
|
26
|
+
onClick={onClick}
|
|
27
|
+
disabled={isDisabled}
|
|
28
|
+
>
|
|
29
|
+
{text}
|
|
30
|
+
</button>
|
|
31
|
+
)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export default TextButton
|