-
Notifications
You must be signed in to change notification settings - Fork 18
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
7 changed files
with
391 additions
and
89 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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,19 @@ | ||
import type { Component, ComponentProps } from "solid-js" | ||
import { splitProps } from "solid-js" | ||
|
||
import { cn } from "~/lib/utils" | ||
|
||
const Label: Component<ComponentProps<"label">> = (props) => { | ||
const [local, others] = splitProps(props, ["class"]) | ||
return ( | ||
<label | ||
class={cn( | ||
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", | ||
local.class | ||
)} | ||
{...others} | ||
/> | ||
) | ||
} | ||
|
||
export { Label } |
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,73 @@ | ||
import type { JSX, ValidComponent } from "solid-js" | ||
import { splitProps } from "solid-js" | ||
|
||
import type { PolymorphicProps } from "@kobalte/core/polymorphic" | ||
import * as RadioGroupPrimitive from "@kobalte/core/radio-group" | ||
|
||
import { cn } from "~/lib/utils" | ||
|
||
type RadioGroupRootProps<T extends ValidComponent = "div"> = | ||
RadioGroupPrimitive.RadioGroupRootProps<T> & { class?: string | undefined } | ||
|
||
const RadioGroup = <T extends ValidComponent = "div">( | ||
props: PolymorphicProps<T, RadioGroupRootProps<T>> | ||
) => { | ||
const [local, others] = splitProps(props as RadioGroupRootProps, ["class"]) | ||
return <RadioGroupPrimitive.Root class={cn("grid gap-2", local.class)} {...others} /> | ||
} | ||
|
||
type RadioGroupItemProps<T extends ValidComponent = "div"> = | ||
RadioGroupPrimitive.RadioGroupItemProps<T> & { | ||
class?: string | undefined | ||
children?: JSX.Element | ||
} | ||
|
||
const RadioGroupItem = <T extends ValidComponent = "div">( | ||
props: PolymorphicProps<T, RadioGroupItemProps<T>> | ||
) => { | ||
const [local, others] = splitProps(props as RadioGroupItemProps, ["class", "children"]) | ||
return ( | ||
<RadioGroupPrimitive.Item class={cn("flex items-center space-x-2", local.class)} {...others}> | ||
<RadioGroupPrimitive.ItemInput /> | ||
<RadioGroupPrimitive.ItemControl class="aspect-square size-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"> | ||
<RadioGroupPrimitive.ItemIndicator class="flex h-full items-center justify-center "> | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
viewBox="0 0 24 24" | ||
fill="none" | ||
stroke="currentColor" | ||
stroke-width="2" | ||
stroke-linecap="round" | ||
stroke-linejoin="round" | ||
class="size-2.5 fill-current text-current" | ||
> | ||
<path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" /> | ||
</svg> | ||
</RadioGroupPrimitive.ItemIndicator> | ||
</RadioGroupPrimitive.ItemControl> | ||
{local.children} | ||
</RadioGroupPrimitive.Item> | ||
) | ||
} | ||
|
||
type RadioGroupLabelProps<T extends ValidComponent = "label"> = | ||
RadioGroupPrimitive.RadioGroupLabelProps<T> & { | ||
class?: string | undefined | ||
} | ||
|
||
const RadioGroupItemLabel = <T extends ValidComponent = "label">( | ||
props: PolymorphicProps<T, RadioGroupLabelProps<T>> | ||
) => { | ||
const [local, others] = splitProps(props as RadioGroupLabelProps, ["class"]) | ||
return ( | ||
<RadioGroupPrimitive.ItemLabel | ||
class={cn( | ||
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", | ||
local.class | ||
)} | ||
{...others} | ||
/> | ||
) | ||
} | ||
|
||
export { RadioGroup, RadioGroupItem, RadioGroupItemLabel } |
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,72 @@ | ||
|
||
|
||
export const TEAM_NAME_ABBRV_MAP: Record<string, string> = { | ||
'Atlanta Hawks': 'ATL', | ||
'Brooklyn Nets': 'BKN', | ||
'Boston Celtics': 'BOS', | ||
'Charlotte Hornets': 'CHA', | ||
'Chicago Bulls': 'CHI', | ||
'Cleveland Cavaliers': 'CLE', | ||
'Dallas Mavericks': 'DAL', | ||
'Denver Nuggets': 'DEN', | ||
'Detroit Pistons': 'DET', | ||
'Golden State Warriors': 'GSW', | ||
'Houston Rockets': 'HOU', | ||
'Indiana Pacers': 'IND', | ||
'Los Angeles Clippers': 'LAC', | ||
'Los Angeles Lakers': 'LAL', | ||
'Memphis Grizzlies': 'MEM', | ||
'Miami Heat': 'MIA', | ||
'Milwaukee Bucks': 'MIL', | ||
'Minnesota Timberwolves': 'MIN', | ||
'New Orleans Pelicans': 'NOP', | ||
'New York Knicks': 'NYK', | ||
'Oklahoma City Thunder': 'OKC', | ||
'Orlando Magic': 'ORL', | ||
'Philadelphia 76ers': 'PHI', | ||
'Phoenix Suns': 'PHX', | ||
'Portland Trail Blazers': 'POR', | ||
'Sacramento Kings': 'SAC', | ||
'San Antonio Spurs': 'SAS', | ||
'Toronto Raptors': 'TOR', | ||
'Utah Jazz': 'UTA', | ||
'Washington Wizards': 'WAS', | ||
}; | ||
interface LocationData { | ||
name: string; | ||
city: string; | ||
state: string; | ||
|
||
} | ||
export const LOCATION_DATA: Record<string, LocationData> = { | ||
"ATL": {"name": "State Farm Arena", "city": "Atlanta", "state": "GA"}, | ||
"BOS": {"name": "TD Garden", "city": "Boston", "state": "MA"}, | ||
"BRK": {"name": "Barclays Center", "city": "Brooklyn", "state": "NY"}, | ||
"CHA": {"name": "Spectrum Center", "city": "Charlotte", "state": "NC"}, | ||
"CHI": {"name": "United Center", "city": "Chicago", "state": "IL"}, | ||
"CLE": {"name": "Rocket Mortgage FieldHouse", "city": "Cleveland", "state": "OH"}, | ||
"DAL": {"name": "American Airlines Center", "city": "Dallas", "state": "TX"}, | ||
"DEN": {"name": "Ball Arena", "city": "Denver", "state": "CO"}, | ||
"DET": {"name": "Little Caesars Arena", "city": "Detroit", "state": "MI"}, | ||
"GSW": {"name": "Chase Center", "city": "San Francisco", "state": "CA"}, | ||
"HOU": {"name": "Toyota Center", "city": "Houston", "state": "TX"}, | ||
"IND": {"name": "Gainbridge Fieldhouse", "city": "Indianapolis", "state": "IN"}, | ||
"LAC": {"name": "Crypto.com Arena", "city": "Los Angeles", "state": "CA"}, | ||
"LAL": {"name": "Crypto.com Arena", "city": "Los Angeles", "state": "CA"}, | ||
"MEM": {"name": "FedExForum", "city": "Memphis", "state": "TN"}, | ||
"MIA": {"name": "FTX Arena", "city": "Miami", "state": "FL"}, | ||
"MIL": {"name": "Fiserv Forum", "city": "Milwaukee", "state": "WI"}, | ||
"MIN": {"name": "Target Center", "city": "Minneapolis", "state": "MN"}, | ||
"NOP": {"name": "Smoothie King Center", "city": "New Orleans", "state": "LA"}, | ||
"NYK": {"name": "Madison Square Garden", "city": "New York", "state": "NY"}, | ||
"OKC": {"name": "Paycom Center", "city": "Oklahoma City", "state": "OK"}, | ||
"ORL": {"name": "Amway Center", "city": "Orlando", "state": "FL"}, | ||
"PHI": {"name": "Wells Fargo Center", "city": "Philadelphia", "state": "PA"}, | ||
"PHX": {"name": "Footprint Center", "city": "Phoenix", "state": "AZ"}, | ||
"POR": {"name": "Moda Center", "city": "Portland", "state": "OR"}, | ||
"SAC": {"name": "Golden 1 Center", "city": "Sacramento", "state": "CA"}, | ||
"SAS": {"name": "AT&T Center", "city": "San Antonio", "state": "TX"}, | ||
"TOR": {"name": "Scotiabank Arena", "city": "Toronto", "state": "ON"}, | ||
"UTA": {"name": "Vivint Arena", "city": "Salt Lake City", "state": "UT"}, | ||
"WAS": {"name": "Capital One Arena", "city": "Washington D.C.", "state": "DC"}, | ||
} |
Oops, something went wrong.