-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #316 from helxplatform/develop
Adding Develop changes to main
- Loading branch information
Showing
74 changed files
with
8,131 additions
and
3,780 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { Slider } from 'antd' | ||
import { useEffect, useState } from 'react' | ||
import { useDebounce } from 'use-debounce' | ||
|
||
export const DebouncedRangeSlider = ({ value, onChange, onInternalChange=() => {}, debounce=500, ...props }) => { | ||
const [_internalValue, setInternalValue] = useState(undefined) | ||
const [internalValue] = useDebounce(_internalValue, debounce) | ||
|
||
const internalOnChange = (range) => { | ||
setInternalValue(range) | ||
} | ||
|
||
useEffect(() => { | ||
setInternalValue(value) | ||
}, [value]) | ||
|
||
useEffect(() => { | ||
onChange(internalValue) | ||
}, [internalValue]) | ||
|
||
useEffect(() => { | ||
onInternalChange(_internalValue) | ||
}, [_internalValue]) | ||
|
||
return ( | ||
<Slider | ||
range | ||
value={ _internalValue } | ||
onChange={ internalOnChange } | ||
{ ...props } | ||
/> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { useMemo } from 'react' | ||
import { Button } from 'antd' | ||
import { useEnvironment, useTourContext } from '../../contexts' | ||
import classNames from 'classnames' | ||
import './guided-tour.css' | ||
|
||
export const GuidedTourButton = ({ }) => { | ||
const { tour, tourStarted } = useTourContext()! | ||
const { context } = useEnvironment() as any | ||
|
||
return ( | ||
<div className="guided-tour-button-container"> | ||
<Button | ||
className={ classNames("guided-tour-button", context.brand) } | ||
disabled={ tourStarted } | ||
onClick={ () => !tourStarted && tour.start() } | ||
> | ||
Take a Tour | ||
</Button> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
.guided-tour-button-container { | ||
display: flex; | ||
position: fixed; | ||
top: 60%; | ||
right: 0; | ||
z-index: 99; | ||
transform: rotate(-90deg) translateY(-100%); | ||
transform-origin: top right; | ||
} | ||
|
||
button.guided-tour-button { | ||
padding: 8px 32px; | ||
height: 40px; | ||
font-weight: 600; | ||
font-size: 16px; | ||
/* Improves readability when rotated */ | ||
letter-spacing: .8px; | ||
border-bottom-left-radius: 0; | ||
border-bottom-right-radius: 0; | ||
border-bottom-width: 0; | ||
|
||
} | ||
|
||
.guided-tour-button.heal { | ||
background-color: #982465; | ||
color: white; | ||
border-color: #982465; | ||
} | ||
.guided-tour-button.heal:hover { | ||
color: #c41d7f; | ||
border-color: #c41d7f; | ||
} | ||
.guided-tour-button.heal:active, .guided-tour-button.heal:focus { | ||
color: #982465; | ||
border-color: #982465; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './guided-tour-button' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export * from './info-tooltip' | ||
export * from './info-popover' | ||
export * from './info-button' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { ReactNode } from 'react' | ||
import { Popover, PopoverProps } from 'antd' | ||
import { InfoCircleFilled } from '@ant-design/icons' | ||
import { AntdIconProps } from '@ant-design/icons/lib/components/AntdIcon' | ||
import { InfoIcon, InfoIconProps } from './info-icon' | ||
|
||
type InfoPopoverProps = PopoverProps & { | ||
iconProps?: InfoIconProps | ||
} | ||
|
||
export const InfoPopover = ({ | ||
iconProps={}, | ||
...popoverProps | ||
}: InfoPopoverProps) => { | ||
return ( | ||
<Popover | ||
className="info-popover" | ||
trigger="click" | ||
{...popoverProps } | ||
> | ||
<InfoIcon { ...iconProps } /> | ||
</Popover> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.