generated from Blazity/next-enterprise
-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
4507b6b
commit 29dad6c
Showing
14 changed files
with
86,276 additions
and
26 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
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,35 @@ | ||
@import '@radix-ui/colors/black-alpha.css'; | ||
@import '@radix-ui/colors/mauve.css'; | ||
@import '@radix-ui/colors/violet.css'; | ||
|
||
/* reset */ | ||
button { | ||
all: unset; | ||
} | ||
|
||
.ColorLegend { | ||
background-color: white; | ||
border-radius: 6px; | ||
padding: 12px; | ||
box-shadow: 0px 10px 38px -10px rgba(22, 23, 24, 0.35), 0px 10px 20px -15px rgba(22, 23, 24, 0.2); | ||
animation-duration: 400ms; | ||
animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); | ||
will-change: transform, opacity; | ||
} | ||
|
||
.ColorLegend h3 { | ||
font-weight: bold; | ||
} | ||
|
||
.ColorRow { | ||
display: flex; | ||
flex-direction: row; | ||
} | ||
|
||
.ColorRow span { | ||
width: 20px; | ||
height: 20px; | ||
margin-right: 8px; | ||
margin-bottom:4px; | ||
border:1px solid rgba(0,0,0,0.5); | ||
} |
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 React from "react" | ||
import * as Select from "@radix-ui/react-select" | ||
import classnames from "classnames" | ||
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "@radix-ui/react-icons" | ||
import "./styles.css" | ||
|
||
type SelectProps = { | ||
title: string | ||
value: string | ||
children: React.ReactNode, | ||
onValueChange: (e: any) => void | ||
} | ||
export const SelectMenu: React.FC<SelectProps> = ({ title, value, children, onValueChange }) => ( | ||
<Select.Root onValueChange={onValueChange}> | ||
<Select.Trigger className="SelectTrigger" aria-label="Food"> | ||
<Select.Value placeholder={value || title} /> | ||
<Select.Icon className="SelectIcon"> | ||
<ChevronDownIcon /> | ||
</Select.Icon> | ||
</Select.Trigger> | ||
<Select.Portal> | ||
<Select.Content className="SelectContent"> | ||
<Select.ScrollUpButton className="SelectScrollButton"> | ||
<ChevronUpIcon /> | ||
</Select.ScrollUpButton> | ||
<Select.Viewport className="SelectViewport">{children}</Select.Viewport> | ||
<Select.ScrollDownButton className="SelectScrollButton"> | ||
<ChevronDownIcon /> | ||
</Select.ScrollDownButton> | ||
</Select.Content> | ||
</Select.Portal> | ||
</Select.Root> | ||
) |
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,101 @@ | ||
@import '@radix-ui/colors/black-alpha.css'; | ||
@import '@radix-ui/colors/mauve.css'; | ||
@import '@radix-ui/colors/violet.css'; | ||
|
||
/* reset */ | ||
button { | ||
all: unset; | ||
} | ||
|
||
.SelectTrigger { | ||
display: inline-flex; | ||
align-items: center; | ||
justify-content: center; | ||
border-radius: 4px; | ||
padding: 0 15px; | ||
font-size: 13px; | ||
line-height: 1; | ||
height: 35px; | ||
gap: 5px; | ||
background-color: white; | ||
color: var(--violet-11); | ||
/* box-shadow: 0 2px 10px var(--black-a7); */ | ||
} | ||
.SelectTrigger:hover { | ||
background-color: var(--mauve-3); | ||
} | ||
.SelectTrigger:focus { | ||
box-shadow: 0 0 0 2px black; | ||
} | ||
.SelectTrigger[data-placeholder] { | ||
color: var(--violet-9); | ||
} | ||
|
||
.SelectIcon { | ||
color: Var(--violet-11); | ||
} | ||
|
||
.SelectContent { | ||
overflow: hidden; | ||
background-color: white; | ||
border-radius: 6px; | ||
box-shadow: 0px 10px 38px -10px rgba(22, 23, 24, 0.35), 0px 10px 20px -15px rgba(22, 23, 24, 0.2); | ||
} | ||
|
||
.SelectViewport { | ||
padding: 5px; | ||
} | ||
|
||
.SelectItem { | ||
font-size: 13px; | ||
line-height: 1; | ||
color: var(--violet-11); | ||
border-radius: 3px; | ||
display: flex; | ||
align-items: center; | ||
height: 25px; | ||
padding: 0 35px 0 25px; | ||
position: relative; | ||
user-select: none; | ||
} | ||
.SelectItem[data-disabled] { | ||
color: var(--mauve-8); | ||
pointer-events: none; | ||
} | ||
.SelectItem[data-highlighted] { | ||
outline: none; | ||
background-color: var(--violet-9); | ||
color: var(--violet-1); | ||
} | ||
|
||
.SelectLabel { | ||
padding: 0 25px; | ||
font-size: 12px; | ||
line-height: 25px; | ||
color: var(--mauve-11); | ||
} | ||
|
||
.SelectSeparator { | ||
height: 1px; | ||
background-color: var(--violet-6); | ||
margin: 5px; | ||
} | ||
|
||
.SelectItemIndicator { | ||
position: absolute; | ||
left: 0; | ||
width: 25px; | ||
display: inline-flex; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
|
||
.SelectScrollButton { | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
height: 25px; | ||
background-color: white; | ||
color: var(--violet-11); | ||
cursor: default; | ||
} |
Oops, something went wrong.