-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
58 changed files
with
433 additions
and
355 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
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,7 @@ | ||
const SVGDoubleChevron = () => ( | ||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" viewBox="0 0 24 24"> | ||
<path d="M7.5 18.234a.988.988 0 0 1-.648-.242l-6-5.25A.995.995 0 0 1 .516 12c0-.285.125-.555.336-.742l6-5.25a.988.988 0 0 1 1.39.094.988.988 0 0 1-.094 1.39L2.996 12l5.152 4.508a.985.985 0 0 1-.648 1.727Zm9 0a.985.985 0 0 1-.648-1.726L21.004 12l-5.152-4.508a.988.988 0 0 1-.094-1.39c.36-.41.98-.45 1.39-.094l6 5.25a.982.982 0 0 1 .336.742.982.982 0 0 1-.336.742l-6 5.25a.988.988 0 0 1-.648.242Zm0 0" /> | ||
</svg> | ||
); | ||
|
||
export default SVGDoubleChevron; |
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 { default as SVGDoubleChevron } from './SVGDoubleChevron'; |
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
34 changes: 34 additions & 0 deletions
34
src/components/molecules/DateOutputFromTo/DateOutputFromTo.style.tsx
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,34 @@ | ||
import { styled } from 'styled-components'; | ||
|
||
import { TLayer } from '@/interface/TLayer'; | ||
import { TThemeTypes } from '@/interface/TThemeTypes'; | ||
import { TTheme } from '@/interface/TTheme'; | ||
|
||
// Define the styled component for the DateOutputFromTo component | ||
export const StyledDateOutputFromTo = styled.div<{ theme: TTheme; $themeType?: TThemeTypes; $layer?: TLayer }>` | ||
position: relative; | ||
display: flex; | ||
width: 100%; | ||
height: auto; | ||
justify-content: space-around; | ||
align-items: stretch; | ||
button:nth-child(1) { | ||
border-radius: 50px 0 0 50px; | ||
padding: ${({ theme }) => theme.spacing.sm}; | ||
} | ||
button:nth-child(3) { | ||
border-radius: 0 50px 50px 0; | ||
padding: ${({ theme }) => theme.spacing.sm}; | ||
} | ||
`; | ||
|
||
// Define the styled component for the VRWrapper | ||
export const VRWrapper = styled.div` | ||
position: absolute; | ||
height: 100%; | ||
flex: 1; | ||
display: flex; | ||
align-items: center; // this center the FancyVR vertically | ||
`; |
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
11 changes: 6 additions & 5 deletions
11
src/components/molecules/DynamicBottomScrollBar/DynamicBottomScrollBar.tsx
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
50 changes: 7 additions & 43 deletions
50
src/components/molecules/FancyColorArea/FancyColorArea.tsx
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
38 changes: 38 additions & 0 deletions
38
src/components/molecules/FancyColorArea/utils/calcPosition.ts
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,38 @@ | ||
//this function calculates the current color to a position using the HSV Color Type | ||
|
||
import Color from 'color'; | ||
|
||
//HSV can be better used for merging Lightness and Saturation (L: 100 and S:100) = Full Color | ||
export const positionToColor = (hue: number, clientX: number, clientY: number, rect: DOMRect) => { | ||
//calculate the position of the mouse in the color area(rect) | ||
const x = Math.max(0, Math.min(clientX - rect.left, rect.width)); | ||
const y = Math.max(0, Math.min(clientY - rect.top, rect.height)); | ||
|
||
//calculate the saturation and lightness(value) from the position | ||
const saturation = (x / rect.width) * 100; | ||
const value = 100 - (y / rect.height) * 100; | ||
|
||
return { | ||
h: hue ?? 0, | ||
s: saturation, | ||
v: value, | ||
}; | ||
}; | ||
|
||
//this function calculates the color to the position on the area using the HSV Color Type | ||
export const colorToPosition = (color: Color, rect: DOMRect) => { | ||
//get the saturation and lightness(value) from the color | ||
const hsvColor = color.hsv().object(); | ||
const saturation = hsvColor.s; | ||
const value = hsvColor.v; | ||
|
||
//calculate the x and y position from the saturation and lightness(value) | ||
const x = (saturation * rect.width) / 100; | ||
const y = (1 - value / 100) * rect.height; | ||
|
||
//calculate the percentage of the position | ||
const xPercent = (x / rect.width) * 100; | ||
const yPercent = (y / rect.height) * 100; | ||
|
||
return { x: Math.max(0, xPercent), y: Math.max(0, yPercent) }; | ||
}; |
Oops, something went wrong.