Skip to content

Commit

Permalink
refactor!: move ui component to atom/molecule folder
Browse files Browse the repository at this point in the history
  • Loading branch information
leomotors committed Dec 24, 2024
1 parent 2300dd9 commit 4ee12a9
Show file tree
Hide file tree
Showing 53 changed files with 43 additions and 39 deletions.
16 changes: 8 additions & 8 deletions apps/web/src/routes/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<script lang="ts">
import * as Accordion from '@repo/ui/accordion'
import { Button } from '@repo/ui/button'
import { Chip } from '@repo/ui/chip'
import { CourseCard } from '@repo/ui/course-card'
import { DayChip } from '@repo/ui/day-chip'
import { GenedChip } from '@repo/ui/gened-chip'
import { Input } from '@repo/ui/input'
import { RecommendedTag } from '@repo/ui/recommended-tag'
import * as Accordion from '@repo/ui/atom/accordion'
import { Button } from '@repo/ui/atom/button'
import { Chip } from '@repo/ui/atom/chip'
import { DayChip } from '@repo/ui/atom/day-chip'
import { GenedChip } from '@repo/ui/atom/gened-chip'
import { Input } from '@repo/ui/atom/input'
import { RecommendedTag } from '@repo/ui/atom/recommended-tag'
import { CourseCard } from '@repo/ui/molecule/course-card'
let counter = $state(0)
Expand Down
6 changes: 5 additions & 1 deletion apps/web/src/routes/dbdemo/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
<script lang="ts">
import type { PageData } from './$types'
export let data: PageData
interface Props {
data: PageData
}
let { data }: Props = $props()
</script>

<h1 class="text-h1">DB Demo</h1>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import type { Snippet } from 'svelte'
import { slide } from 'svelte/transition'
import { cn } from '../../utils'
import { cn } from '../../../utils.js'
type $$Props = AccordionPrimitive.ContentProps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { Accordion as AccordionPrimitive } from 'bits-ui'
import type { Snippet } from 'svelte'
import { cn } from '../../utils'
import { cn } from '../../../utils.js'
type $$Props = AccordionPrimitive.ItemProps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { ChevronDown } from 'lucide-svelte'
import type { Snippet } from 'svelte'
import { cn } from '../../utils'
import { cn } from '../../../utils.js'
type $$Props = AccordionPrimitive.TriggerProps
type $$Events = AccordionPrimitive.TriggerEvents
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { Button as ButtonPrimitive } from 'bits-ui'
import type { Snippet } from 'svelte'
import { cn } from '../../utils'
import { cn } from '../../../utils.js'
import { buttonVariants, type Events, type Props } from './index.js'
type $$Props = Props
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { Checkbox as CheckboxPrimitive, Label } from 'bits-ui'
import { Check } from 'lucide-svelte'
import { cn } from '../../utils'
import { cn } from '../../../utils.js'
type $$Props = CheckboxPrimitive.Props & {
label?: string | undefined | null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { X } from 'lucide-svelte'
import type { Snippet } from 'svelte'
import { cn } from '../../utils.js'
import { cn } from '../../../utils.js'
import { chipVariants } from './index.js'
interface Props {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import { cn } from '../../utils'
import { Chip } from '../chip'
import { cn } from '../../../utils.js'
import { Chip } from '../chip/index.js'
import { chipVariants, type Day } from './index.js'
interface Props {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import { cn } from '../../utils'
import { Chip } from '../chip'
import { cn } from '../../../utils.js'
import { Chip } from '../chip/index.js'
import { chipVariants, type Type } from './index.js'
interface Props {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { Button as ButtonPrimitive } from 'bits-ui'
import type { Snippet } from 'svelte'
import { cn } from '../../utils'
import { cn } from '../../../utils.js'
import { buttonVariants, type Events, type Props } from './index.js'
type $$Props = Props
type $$Events = Events
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
const bubble = createBubbler()
import type { HTMLInputAttributes } from 'svelte/elements'
import { cn } from '../../utils'
import type { InputEvents } from '.'
import { cn } from '../../../utils.js'
import type { InputEvents } from './index.js'
type $$Props = HTMLInputAttributes
type $$Events = InputEvents
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { Label, RadioGroup as RadioGroupPrimitive } from 'bits-ui'
import { Circle } from 'lucide-svelte'
import { cn } from '../../utils'
import { cn } from '../../../utils.js'
type $$Props = RadioGroupPrimitive.ItemProps & {
id: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { RadioGroup as RadioGroupPrimitive } from 'bits-ui'
import type { Snippet } from 'svelte'
import { cn } from '../../utils'
import { cn } from '../../../utils.js'
type $$Props = RadioGroupPrimitive.Props
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import { Sparkles } from 'lucide-svelte'
import { cn } from '../../utils'
import { cn } from '../../../utils.js'
interface Props {
class?: string | undefined | null
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import { Label, Switch as SwitchPrimitive } from 'bits-ui'
import { cn } from '../../utils'
import { cn } from '../../../utils.js'
type $$Props = SwitchPrimitive.Props & {
label?: string | undefined | null
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import type { Snippet } from 'svelte'
import type { HTMLAttributes } from 'svelte/elements'
import { cn } from '../../utils'
import { cn } from '../../../utils.js'
type $$Props = HTMLAttributes<HTMLTableSectionElement>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import type { Snippet } from 'svelte'
import type { HTMLAttributes } from 'svelte/elements'
import { cn } from '../../utils'
import { cn } from '../../../utils.js'
type $$Props = HTMLAttributes<HTMLTableCaptionElement>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
const bubble = createBubbler()
import type { HTMLTdAttributes } from 'svelte/elements'
import { cn } from '../../utils'
import { cn } from '../../../utils.js'
type $$Props = HTMLTdAttributes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import type { Snippet } from 'svelte'
import type { HTMLAttributes } from 'svelte/elements'
import { cn } from '../../utils'
import { cn } from '../../../utils.js'
type $$Props = HTMLAttributes<HTMLTableSectionElement>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import type { Snippet } from 'svelte'
import type { HTMLThAttributes } from 'svelte/elements'
import { cn } from '../../utils'
import { cn } from '../../../utils.js'
type $$Props = HTMLThAttributes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
const bubble = createBubbler()
import type { HTMLAttributes } from 'svelte/elements'
import { cn } from '../../utils'
import { cn } from '../../../utils.js'
type $$Props = HTMLAttributes<HTMLTableSectionElement>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
const bubble = createBubbler()
import type { HTMLAttributes } from 'svelte/elements'
import { cn } from '../../utils'
import { cn } from '../../../utils.js'
type $$Props = HTMLAttributes<HTMLTableRowElement> & {
'data-state'?: unknown
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import type { Snippet } from 'svelte'
import type { HTMLTableAttributes } from 'svelte/elements'
import { cn } from '../../utils'
import { cn } from '../../../utils.js'
type $$Props = HTMLTableAttributes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<script lang="ts">
import { Check, Dot, Plus } from 'lucide-svelte'
import { cn } from '../../utils'
import { Button } from '../button'
import { DayChip } from '../day-chip'
import { GenedChip } from '../gened-chip'
import { RecommendedTag } from '../recommended-tag'
import { cn } from '../../../utils.js'
import { Button } from '../../atom/button/index.js'
import { DayChip } from '../../atom/day-chip/index.js'
import { GenedChip } from '../../atom/gened-chip/index.js'
import { RecommendedTag } from '../../atom/recommended-tag/index.js'
interface Props {
class?: string | undefined | null
Expand Down

0 comments on commit 4ee12a9

Please sign in to comment.