-
-
Notifications
You must be signed in to change notification settings - Fork 94
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
8 changed files
with
59 additions
and
17 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,36 @@ | ||
<script lang="ts"> | ||
import * as RadioGroup from "@/components/ui/radio-group"; | ||
import * as Label from "@/components/ui/label"; | ||
import { RadioGroup, Label } from "$lib"; | ||
</script> | ||
|
||
<RadioGroup.Root value="comfortable"> | ||
<div class="flex items-center space-x-2"> | ||
<RadioGroup.Item value="default" id="r1" /> | ||
<Label.Root for="r1">Default</Label.Root> | ||
<RadioGroup.Root class="flex flex-col gap-3"> | ||
<div | ||
class="group select-none cursor-pointer flex items-center gap-3 text-primary/50 [&:has([data-state=checked])]:text-primary transition-colors" | ||
> | ||
<RadioGroup.Item | ||
id="amazing" | ||
value="amazing" | ||
class="shrink-0 sq-5 rounded-full border-2 border-primary/40 transition-all data-[state=checked]:group-hover:border-primary data-[state=checked]:border-6 data-[state=checked]:border-primary duration-200 focus:outline-none focus-visible:ring-2 focus-visible:ring-background/70 ring-offset-1" | ||
/> | ||
<Label.Root for="amazing" class="font-medium text-sm">Amazing</Label.Root> | ||
</div> | ||
<div class="flex items-center space-x-2"> | ||
<RadioGroup.Item value="comfortable" id="r2" /> | ||
<Label.Root for="r2">Comfortable</Label.Root> | ||
<div | ||
class="group select-none cursor-pointer flex items-center gap-3 text-primary/50 [&:has([data-state=checked])]:text-primary transition-colors" | ||
> | ||
<RadioGroup.Item | ||
id="average" | ||
value="average" | ||
class="shrink-0 sq-5 rounded-full border-2 border-primary/40 transition-all data-[state=checked]:group-hover:border-primary data-[state=checked]:border-6 data-[state=checked]:border-primary duration-200 focus:outline-none focus-visible:ring-2 focus-visible:ring-background/70 ring-offset-1 " | ||
/> | ||
<Label.Root for="average" class="font-medium text-sm">Average</Label.Root> | ||
</div> | ||
<div class="flex items-center space-x-2"> | ||
<RadioGroup.Item value="compact" id="r3" /> | ||
<Label.Root for="r3">Compact</Label.Root> | ||
<div | ||
class="group select-none cursor-pointer flex items-center gap-3 text-primary/50 [&:has([data-state=checked])]:text-primary transition-colors" | ||
> | ||
<RadioGroup.Item | ||
id="terrible" | ||
value="terrible" | ||
class="shrink-0 sq-5 rounded-full border-2 border-primary/40 transition-all data-[state=checked]:group-hover:border-primary data-[state=checked]:border-6 data-[state=checked]:border-primary duration-200 focus:outline-none focus-visible:ring-2 focus-visible:ring-background/70 ring-offset-1" | ||
/> | ||
<Label.Root for="terrible" class="font-medium text-sm">Terrible</Label.Root> | ||
</div> | ||
<RadioGroup.Input name="spacing" /> | ||
</RadioGroup.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,8 @@ | ||
export const ATTRS = { | ||
root: { | ||
"data-bits-radio-group-root": "" | ||
}, | ||
item: { | ||
"data-bits-radio-group-item": "" | ||
} | ||
}; |
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