mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
feat: classic styled components
This commit is contained in:
1 parent
83aeca2e5e
commit
a66c6ebb27
29 files changed
+41
-19
No files matched your search
@@ -36,6 +36,7 @@ export function ArmorPlateDisplay() {
|
|||||||
style={{ pointerEvents: highlightArmor.editingPlate ? 'auto' : 'none' }}
|
style={{ pointerEvents: highlightArmor.editingPlate ? 'auto' : 'none' }}
|
||||||
>
|
>
|
||||||
<Card
|
<Card
|
||||||
|
variant="classic"
|
||||||
mb="4"
|
mb="4"
|
||||||
style={{
|
style={{
|
||||||
whiteSpace: 'nowrap',
|
whiteSpace: 'nowrap',
|
||||||
@@ -72,6 +73,7 @@ export function ArmorPlateDisplay() {
|
|||||||
{highlightArmor.editingPlate && (
|
{highlightArmor.editingPlate && (
|
||||||
<Flex gap="2" align="center">
|
<Flex gap="2" align="center">
|
||||||
<TextField.Root
|
<TextField.Root
|
||||||
|
variant="classic"
|
||||||
style={{ width: 96 }}
|
style={{ width: 96 }}
|
||||||
mt="2"
|
mt="2"
|
||||||
ref={input}
|
ref={input}
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ export function ShotDisplayCard({ shot, ...props }: ShotDisplayCardProps) {
|
|||||||
const inTitleColor = shotStatusColors[shot.in.status];
|
const inTitleColor = shotStatusColors[shot.in.status];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card style={{ width: 300 }} {...props}>
|
<Card variant="classic" style={{ width: 300 }} {...props}>
|
||||||
<Flex direction="column" gap="2">
|
<Flex direction="column" gap="2">
|
||||||
<Flex direction="column" gap="1">
|
<Flex direction="column" gap="1">
|
||||||
<Text color={inTitleColor} weight="bold">
|
<Text color={inTitleColor} weight="bold">
|
||||||
|
|||||||
@@ -107,6 +107,7 @@ export function Controls({
|
|||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<SegmentedControl.Root
|
<SegmentedControl.Root
|
||||||
|
variant="classic"
|
||||||
value={deltaMode}
|
value={deltaMode}
|
||||||
onValueChange={(value) => {
|
onValueChange={(value) => {
|
||||||
mutateComparePersistent((draft) => {
|
mutateComparePersistent((draft) => {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ export function Boolean({ configKey }: EmbedPreviewControllerProps) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Switch
|
<Switch
|
||||||
variant="soft"
|
variant="classic"
|
||||||
checked={EmbedState.use((state) => state[configKey] as boolean)}
|
checked={EmbedState.use((state) => state[configKey] as boolean)}
|
||||||
onCheckedChange={() => {
|
onCheckedChange={() => {
|
||||||
mutateEmbedState((draft) => {
|
mutateEmbedState((draft) => {
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ export function ColorControllerRaw({
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Slider
|
<Slider
|
||||||
variant="soft"
|
variant="classic"
|
||||||
min={0}
|
min={0}
|
||||||
max={255}
|
max={255}
|
||||||
value={[alpha]}
|
value={[alpha]}
|
||||||
|
|||||||
@@ -25,7 +25,8 @@ export function Enum({
|
|||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Select.Trigger />
|
<Select.Trigger variant="classic" />
|
||||||
|
|
||||||
<Select.Content>
|
<Select.Content>
|
||||||
{config.options.map((option) => (
|
{config.options.map((option) => (
|
||||||
<Select.Item key={option.value} value={option.value}>
|
<Select.Item key={option.value} value={option.value}>
|
||||||
|
|||||||
@@ -92,6 +92,7 @@ export function GenerateURL({ embed }: GenerateURLProps) {
|
|||||||
</Flex>
|
</Flex>
|
||||||
|
|
||||||
<TextField.Root
|
<TextField.Root
|
||||||
|
variant="classic"
|
||||||
mt="4"
|
mt="4"
|
||||||
style={{ width: '20rem' }}
|
style={{ width: '20rem' }}
|
||||||
placeholder={strings.website.common.player_search.hint}
|
placeholder={strings.website.common.player_search.hint}
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ export function Import() {
|
|||||||
|
|
||||||
<Flex gap="2" mb="6">
|
<Flex gap="2" mb="6">
|
||||||
<TextField.Root
|
<TextField.Root
|
||||||
|
variant="classic"
|
||||||
ref={importInput}
|
ref={importInput}
|
||||||
placeholder={strings.website.tools.embed.configuration.import.hint}
|
placeholder={strings.website.tools.embed.configuration.import.hint}
|
||||||
style={{ flex: 1 }}
|
style={{ flex: 1 }}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ export function Radius({ configKey }: EmbedPreviewControllerProps) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Slider
|
<Slider
|
||||||
variant="soft"
|
variant="classic"
|
||||||
min={0}
|
min={0}
|
||||||
max={5}
|
max={5}
|
||||||
value={[
|
value={[
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ export function RichText({ configKey }: EmbedPreviewControllerProps) {
|
|||||||
<FontSizeIcon width="1em" height="1em" />
|
<FontSizeIcon width="1em" height="1em" />
|
||||||
</Text>
|
</Text>
|
||||||
<Slider
|
<Slider
|
||||||
variant="soft"
|
variant="classic"
|
||||||
min={1}
|
min={1}
|
||||||
max={9}
|
max={9}
|
||||||
value={[Number(state.size)]}
|
value={[Number(state.size)]}
|
||||||
@@ -61,7 +61,7 @@ export function RichText({ configKey }: EmbedPreviewControllerProps) {
|
|||||||
<FontBoldIcon width="1em" height="1em" />
|
<FontBoldIcon width="1em" height="1em" />
|
||||||
</Text>
|
</Text>
|
||||||
<Slider
|
<Slider
|
||||||
variant="soft"
|
variant="classic"
|
||||||
min={0}
|
min={0}
|
||||||
max={radixTextWeights.length - 1}
|
max={radixTextWeights.length - 1}
|
||||||
value={[radixTextWeights.indexOf(state.weight)]}
|
value={[radixTextWeights.indexOf(state.weight)]}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ export function Size({ configKey }: EmbedPreviewControllerProps) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Slider
|
<Slider
|
||||||
variant="soft"
|
variant="classic"
|
||||||
min={0}
|
min={0}
|
||||||
max={9}
|
max={9}
|
||||||
value={[
|
value={[
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ export function SizeWithout0({ configKey }: EmbedPreviewControllerProps) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Slider
|
<Slider
|
||||||
variant="soft"
|
variant="classic"
|
||||||
min={1}
|
min={1}
|
||||||
max={9}
|
max={9}
|
||||||
value={[
|
value={[
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ export function Slider({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<RadixSlider
|
<RadixSlider
|
||||||
variant="soft"
|
variant="classic"
|
||||||
min={config.min}
|
min={config.min}
|
||||||
max={config.max}
|
max={config.max}
|
||||||
value={[
|
value={[
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ export function TextController({ configKey }: EmbedPreviewControllerProps) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<TextField.Root
|
<TextField.Root
|
||||||
|
variant="classic"
|
||||||
placeholder="Empty"
|
placeholder="Empty"
|
||||||
value={EmbedState.use((state) => state[configKey] as string)}
|
value={EmbedState.use((state) => state[configKey] as string)}
|
||||||
onChange={(event) => {
|
onChange={(event) => {
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ export function GallerySearch({ skeleton }: MaybeSkeletonComponentProps) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<TextField.Root
|
<TextField.Root
|
||||||
|
variant="classic"
|
||||||
disabled={skeleton}
|
disabled={skeleton}
|
||||||
placeholder={strings.website.tools.gallery.search.hint}
|
placeholder={strings.website.tools.gallery.search.hint}
|
||||||
ref={input}
|
ref={input}
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ export function LocaleSwitcher({ locale }: LocaleAcceptorProps) {
|
|||||||
}${rawPath}`;
|
}${rawPath}`;
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Select.Trigger />
|
<Select.Trigger variant="classic" />
|
||||||
|
|
||||||
<Select.Content>
|
<Select.Content>
|
||||||
{SUPPORTED_LOCALES.map((locale) => (
|
{SUPPORTED_LOCALES.map((locale) => (
|
||||||
|
|||||||
@@ -31,8 +31,7 @@ const PUBLIC_GOOGLE_TAG_MANAGER_ID = assertSecret(
|
|||||||
src="https://tracking.tomato.gg/api/script.js"
|
src="https://tracking.tomato.gg/api/script.js"
|
||||||
site-id="14"
|
site-id="14"
|
||||||
defer
|
defer
|
||||||
type="text/partytown"
|
type="text/partytown"></script>
|
||||||
/>
|
|
||||||
|
|
||||||
{/* nitro ads */}
|
{/* nitro ads */}
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ export function PlayerCountControl() {
|
|||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Select.Trigger />
|
<Select.Trigger variant="classic" />
|
||||||
<Select.Content>
|
<Select.Content>
|
||||||
<Select.Item value="total">
|
<Select.Item value="total">
|
||||||
{strings.common.player_count_period.total}
|
{strings.common.player_count_period.total}
|
||||||
|
|||||||
@@ -67,6 +67,7 @@ export function SearchBar({ topResult, skeleton, onSelect }: SearchBarProps) {
|
|||||||
<Flex justify="center">
|
<Flex justify="center">
|
||||||
<Flex gap="2" flexGrow="1">
|
<Flex gap="2" flexGrow="1">
|
||||||
<TextField.Root
|
<TextField.Root
|
||||||
|
variant="classic"
|
||||||
disabled={skeleton}
|
disabled={skeleton}
|
||||||
defaultValue={tankFilters.search}
|
defaultValue={tankFilters.search}
|
||||||
style={{ flex: 1 }}
|
style={{ flex: 1 }}
|
||||||
|
|||||||
+1
@@ -29,6 +29,7 @@ export function CompareOptions(props: FlexProps) {
|
|||||||
</Text>
|
</Text>
|
||||||
|
|
||||||
<SegmentedControl.Root
|
<SegmentedControl.Root
|
||||||
|
variant="classic"
|
||||||
size="1"
|
size="1"
|
||||||
value={`${relativeAgainst}`}
|
value={`${relativeAgainst}`}
|
||||||
onValueChange={(value) => {
|
onValueChange={(value) => {
|
||||||
|
|||||||
+2
-2
@@ -105,7 +105,7 @@ export function HullTraverseVisualizer({ stats }: HullTraverseVisualizerProps) {
|
|||||||
onClick={() => setRotateHull((state) => !state)}
|
onClick={() => setRotateHull((state) => !state)}
|
||||||
style={{ cursor: 'pointer' }}
|
style={{ cursor: 'pointer' }}
|
||||||
>
|
>
|
||||||
<Checkbox checked={rotateHull} />
|
<Checkbox variant="classic" checked={rotateHull} />
|
||||||
<Text size="2">
|
<Text size="2">
|
||||||
{strings.website.tools.tankopedia.visualizers.rotator.hull}
|
{strings.website.tools.tankopedia.visualizers.rotator.hull}
|
||||||
</Text>
|
</Text>
|
||||||
@@ -117,7 +117,7 @@ export function HullTraverseVisualizer({ stats }: HullTraverseVisualizerProps) {
|
|||||||
onClick={() => setRotateTurret((state) => !state)}
|
onClick={() => setRotateTurret((state) => !state)}
|
||||||
style={{ cursor: 'pointer' }}
|
style={{ cursor: 'pointer' }}
|
||||||
>
|
>
|
||||||
<Checkbox checked={rotateTurret} />
|
<Checkbox variant="classic" checked={rotateTurret} />
|
||||||
<Text size="2">
|
<Text size="2">
|
||||||
{strings.website.tools.tankopedia.visualizers.rotator.turret}
|
{strings.website.tools.tankopedia.visualizers.rotator.turret}
|
||||||
</Text>
|
</Text>
|
||||||
|
|||||||
+2
@@ -305,6 +305,7 @@ export function Characteristics() {
|
|||||||
}
|
}
|
||||||
</Text>
|
</Text>
|
||||||
<Slider
|
<Slider
|
||||||
|
variant="classic"
|
||||||
key={penetrationDistance}
|
key={penetrationDistance}
|
||||||
min={0}
|
min={0}
|
||||||
max={500}
|
max={500}
|
||||||
@@ -319,6 +320,7 @@ export function Characteristics() {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<TextField.Root
|
<TextField.Root
|
||||||
|
variant="classic"
|
||||||
style={{ width: 64 }}
|
style={{ width: 64 }}
|
||||||
ref={penetrationDistanceInput}
|
ref={penetrationDistanceInput}
|
||||||
defaultValue={penetrationDistance}
|
defaultValue={penetrationDistance}
|
||||||
|
|||||||
+6
-1
@@ -102,7 +102,7 @@ export function CustomShellButton() {
|
|||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Select.Trigger />
|
<Select.Trigger variant="classic" />
|
||||||
|
|
||||||
<Select.Content>
|
<Select.Content>
|
||||||
<Select.Item value={`${ShellType.AP}`}>
|
<Select.Item value={`${ShellType.AP}`}>
|
||||||
@@ -129,6 +129,7 @@ export function CustomShellButton() {
|
|||||||
}
|
}
|
||||||
</Text>
|
</Text>
|
||||||
<TextField.Root
|
<TextField.Root
|
||||||
|
variant="classic"
|
||||||
style={{ maxWidth: '6rem' }}
|
style={{ maxWidth: '6rem' }}
|
||||||
defaultValue={customShell.caliber}
|
defaultValue={customShell.caliber}
|
||||||
type="number"
|
type="number"
|
||||||
@@ -164,6 +165,7 @@ export function CustomShellButton() {
|
|||||||
}
|
}
|
||||||
</Text>
|
</Text>
|
||||||
<TextField.Root
|
<TextField.Root
|
||||||
|
variant="classic"
|
||||||
style={{ maxWidth: '6rem' }}
|
style={{ maxWidth: '6rem' }}
|
||||||
defaultValue={customShell.penetration.near}
|
defaultValue={customShell.penetration.near}
|
||||||
type="number"
|
type="number"
|
||||||
@@ -216,6 +218,7 @@ export function CustomShellButton() {
|
|||||||
])}
|
])}
|
||||||
</Text>
|
</Text>
|
||||||
<Slider
|
<Slider
|
||||||
|
variant="classic"
|
||||||
min={0}
|
min={0}
|
||||||
max={90}
|
max={90}
|
||||||
step={Number.EPSILON}
|
step={Number.EPSILON}
|
||||||
@@ -246,6 +249,7 @@ export function CustomShellButton() {
|
|||||||
])}
|
])}
|
||||||
</Text>
|
</Text>
|
||||||
<Slider
|
<Slider
|
||||||
|
variant="classic"
|
||||||
min={0}
|
min={0}
|
||||||
max={90}
|
max={90}
|
||||||
step={Number.EPSILON}
|
step={Number.EPSILON}
|
||||||
@@ -265,6 +269,7 @@ export function CustomShellButton() {
|
|||||||
<Flex align="center" justify="between" gap="4">
|
<Flex align="center" justify="between" gap="4">
|
||||||
<Text>Explosion radius</Text>
|
<Text>Explosion radius</Text>
|
||||||
<TextField.Root
|
<TextField.Root
|
||||||
|
variant="classic"
|
||||||
style={{ maxWidth: '6rem' }}
|
style={{ maxWidth: '6rem' }}
|
||||||
defaultValue={customShell.explosion_radius ?? 0}
|
defaultValue={customShell.explosion_radius ?? 0}
|
||||||
type="number"
|
type="number"
|
||||||
|
|||||||
+2
@@ -77,6 +77,7 @@ export function QuickInputs() {
|
|||||||
className="quick-inputs"
|
className="quick-inputs"
|
||||||
>
|
>
|
||||||
<TextField.Root
|
<TextField.Root
|
||||||
|
variant="classic"
|
||||||
size="1"
|
size="1"
|
||||||
radius="full"
|
radius="full"
|
||||||
style={{ flex: 1, textAlign: 'right' }}
|
style={{ flex: 1, textAlign: 'right' }}
|
||||||
@@ -117,6 +118,7 @@ export function QuickInputs() {
|
|||||||
</TextField.Root>
|
</TextField.Root>
|
||||||
|
|
||||||
<TextField.Root
|
<TextField.Root
|
||||||
|
variant="classic"
|
||||||
size="1"
|
size="1"
|
||||||
radius="full"
|
radius="full"
|
||||||
style={{ flex: 1, textAlign: 'right' }}
|
style={{ flex: 1, textAlign: 'right' }}
|
||||||
|
|||||||
+1
-1
@@ -177,7 +177,7 @@ export function Thicknesses({ thicknessRange, skeleton }: ThicknessesProps) {
|
|||||||
<Text size="1">
|
<Text size="1">
|
||||||
{strings.website.tools.tankopedia.sandbox.static.edit.label}
|
{strings.website.tools.tankopedia.sandbox.static.edit.label}
|
||||||
</Text>
|
</Text>
|
||||||
<Checkbox size="2" checked={editStatic} />
|
<Checkbox variant="classic" size="2" checked={editStatic} />
|
||||||
</Flex>
|
</Flex>
|
||||||
</Flex>
|
</Flex>
|
||||||
|
|
||||||
|
|||||||
@@ -345,7 +345,7 @@ export function Options({ thicknessRange, canvas, skeleton }: OptionsProps) {
|
|||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Checkbox checked={advancedHighlighting} />
|
<Checkbox variant="classic" checked={advancedHighlighting} />
|
||||||
<Text color="gray" size="2">
|
<Text color="gray" size="2">
|
||||||
{strings.website.tools.tankopedia.sandbox.dynamic.advanced}
|
{strings.website.tools.tankopedia.sandbox.dynamic.advanced}
|
||||||
</Text>
|
</Text>
|
||||||
@@ -400,6 +400,7 @@ export function Options({ thicknessRange, canvas, skeleton }: OptionsProps) {
|
|||||||
|
|
||||||
<Flex gap="3" align="center" mt="2">
|
<Flex gap="3" align="center" mt="2">
|
||||||
<SegmentedControl.Root
|
<SegmentedControl.Root
|
||||||
|
variant="classic"
|
||||||
value={`${display}`}
|
value={`${display}`}
|
||||||
onValueChange={(value) => {
|
onValueChange={(value) => {
|
||||||
mutateTankopediaEphemeral((draft) => {
|
mutateTankopediaEphemeral((draft) => {
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ export function Header({ index }: HeaderProps) {
|
|||||||
<Popover.Content>
|
<Popover.Content>
|
||||||
<Flex direction="column" gap="2">
|
<Flex direction="column" gap="2">
|
||||||
<TextField.Root
|
<TextField.Root
|
||||||
|
variant="classic"
|
||||||
placeholder="Tier name"
|
placeholder="Tier name"
|
||||||
ref={input}
|
ref={input}
|
||||||
defaultValue={name}
|
defaultValue={name}
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ function Content({ locale }: LocaleAcceptorProps) {
|
|||||||
<Flex align="center" gap="2" justify="between">
|
<Flex align="center" gap="2" justify="between">
|
||||||
<Text>{strings.website.settings.dev_mode}</Text>
|
<Text>{strings.website.settings.dev_mode}</Text>
|
||||||
<Switch
|
<Switch
|
||||||
|
variant="classic"
|
||||||
checked={developerMode}
|
checked={developerMode}
|
||||||
onCheckedChange={(checked) =>
|
onCheckedChange={(checked) =>
|
||||||
appStore.setState({ developerMode: checked })
|
appStore.setState({ developerMode: checked })
|
||||||
|
|||||||
@@ -203,6 +203,7 @@ function Content() {
|
|||||||
</Flex>
|
</Flex>
|
||||||
|
|
||||||
<TextField.Root
|
<TextField.Root
|
||||||
|
variant="classic"
|
||||||
size="3"
|
size="3"
|
||||||
style={{
|
style={{
|
||||||
position: 'relative',
|
position: 'relative',
|
||||||
|
|||||||
Reference in new issue
Block a user