-
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.
* fix utils path hotfix * fix paths * update paths * ... --------- Co-authored-by: Claire Olmstead <[email protected]>
- Loading branch information
1 parent
7c62ed4
commit 6d6dfd7
Showing
28 changed files
with
146 additions
and
163 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
<script lang="ts"> | ||
import { cn } from '../../utils/utils'; | ||
import {cn} from '../utils/utils'; | ||
export let label: string = ''; | ||
export let href: string = ''; | ||
export let isRound = false; | ||
export let label: string = ''; | ||
export let href: string = ''; | ||
export let isRound = false; | ||
</script> | ||
|
||
<a | ||
aria-label={label} | ||
class={cn( | ||
aria-label={label} | ||
class={cn( | ||
`flex h-f32 w-f32 items-center justify-center bg-black p-1 transition-colors duration-[0.3s] hover:bg-brightBlue`, | ||
isRound ? 'rounded-full' : 'rounded', | ||
$$restProps.class | ||
)} | ||
{href} | ||
target="_blank" | ||
{href} | ||
target="_blank" | ||
> | ||
<div class="h-auto w-full text-white"> | ||
<slot /> | ||
</div> | ||
<div class="h-auto w-full text-white"> | ||
<slot/> | ||
</div> | ||
</a> |
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,24 +1,24 @@ | ||
<script lang="ts"> | ||
import { cn } from '../../utils/utils'; | ||
import FormElement from './FormElement.svelte'; | ||
import {cn} from '../utils/utils'; | ||
import FormElement from './FormElement.svelte'; | ||
export let label = ''; | ||
export let isRequired = false; | ||
export let description = ''; | ||
export let value = ''; | ||
export let placeholder = 'Enter some text...'; | ||
export let error: string | undefined; | ||
export let label = ''; | ||
export let isRequired = false; | ||
export let description = ''; | ||
export let value = ''; | ||
export let placeholder = 'Enter some text...'; | ||
export let error: string | undefined; | ||
</script> | ||
|
||
<FormElement {label} {isRequired} {description} {value} {placeholder} {error}> | ||
<input | ||
class={cn( | ||
<input | ||
class={cn( | ||
'border-input aria-[invalid]:border-destructive data-[placeholder]:[&>span]:text-muted-foreground sm flex h-10 w-full max-w-[388px] items-center justify-between rounded-md border bg-cream px-3 py-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1', | ||
error ? 'border-2 border-error' : 'border border-gray3', | ||
$$restProps.class | ||
)} | ||
type="text" | ||
{placeholder} | ||
bind:value | ||
/> | ||
type="text" | ||
{placeholder} | ||
bind:value | ||
/> | ||
</FormElement> |
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,22 +1,22 @@ | ||
<script lang="ts"> | ||
import { cn } from '../../utils/utils'; | ||
import FormElement from './FormElement.svelte'; | ||
import {cn} from '../utils/utils'; | ||
import FormElement from './FormElement.svelte'; | ||
export let label = ''; | ||
export let isRequired = false; | ||
export let description = ''; | ||
export let value: string = ''; | ||
export let placeholder = 'Enter some text...'; | ||
export let error: string | undefined; | ||
export let label = ''; | ||
export let isRequired = false; | ||
export let description = ''; | ||
export let value: string = ''; | ||
export let placeholder = 'Enter some text...'; | ||
export let error: string | undefined; | ||
</script> | ||
|
||
<FormElement {label} {isRequired} {description} {value} {placeholder} {error}> | ||
<textarea | ||
class={cn( | ||
class={cn( | ||
'border-input aria-[invalid]:border-destructive data-[placeholder]:[&>span]:text-muted-foreground sm flex h-10 w-full max-w-[388px] items-center justify-between rounded-md border bg-cream px-3 py-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1', | ||
error ? 'border-2 border-error' : 'border border-gray3' | ||
)} | ||
{placeholder} | ||
bind:value | ||
{placeholder} | ||
bind:value | ||
></textarea> | ||
</FormElement> |
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
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
34 changes: 17 additions & 17 deletions
34
src/lib/shadcnComponents/ui/accordion/accordion-content.svelte
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,25 +1,25 @@ | ||
<script lang="ts"> | ||
import { Accordion as AccordionPrimitive } from 'bits-ui'; | ||
import { slide } from 'svelte/transition'; | ||
import { cn } from '../../../../utils/utils'; | ||
import {Accordion as AccordionPrimitive} from 'bits-ui'; | ||
import {slide} from 'svelte/transition'; | ||
import {cn} from '../../../utils/utils'; | ||
type $$Props = AccordionPrimitive.ContentProps; | ||
type $$Props = AccordionPrimitive.ContentProps; | ||
let className: $$Props['class'] = undefined; | ||
export let transition: $$Props['transition'] = slide; | ||
export let transitionConfig: $$Props['transitionConfig'] = { | ||
duration: 200, | ||
}; | ||
export { className as class }; | ||
let className: $$Props['class'] = undefined; | ||
export let transition: $$Props['transition'] = slide; | ||
export let transitionConfig: $$Props['transitionConfig'] = { | ||
duration: 200, | ||
}; | ||
export {className as class}; | ||
</script> | ||
|
||
<AccordionPrimitive.Content | ||
class={cn('sm overflow-hidden transition-all', className)} | ||
{transition} | ||
{transitionConfig} | ||
{...$$restProps} | ||
class={cn('sm overflow-hidden transition-all', className)} | ||
{transition} | ||
{transitionConfig} | ||
{...$$restProps} | ||
> | ||
<div class="pb-4 pt-0 text-normal"> | ||
<slot /> | ||
</div> | ||
<div class="pb-4 pt-0 text-normal"> | ||
<slot/> | ||
</div> | ||
</AccordionPrimitive.Content> |
14 changes: 7 additions & 7 deletions
14
src/lib/shadcnComponents/ui/accordion/accordion-item.svelte
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,14 +1,14 @@ | ||
<script lang="ts"> | ||
import { Accordion as AccordionPrimitive } from 'bits-ui'; | ||
import { cn } from '../../../../utils/utils'; | ||
import {Accordion as AccordionPrimitive} from 'bits-ui'; | ||
import {cn} from '../../../utils/utils'; | ||
type $$Props = AccordionPrimitive.ItemProps; | ||
type $$Props = AccordionPrimitive.ItemProps; | ||
let className: $$Props['class'] = undefined; | ||
export let value: $$Props['value']; | ||
export { className as class }; | ||
let className: $$Props['class'] = undefined; | ||
export let value: $$Props['value']; | ||
export {className as class}; | ||
</script> | ||
|
||
<AccordionPrimitive.Item {value} class={cn('border-b', className)} {...$$restProps}> | ||
<slot /> | ||
<slot/> | ||
</AccordionPrimitive.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
<script lang="ts"> | ||
import { Dialog as DialogPrimitive } from 'bits-ui'; | ||
import { Exit } from '../../../assets/index'; | ||
import * as Dialog from './index.js'; | ||
import { cn, flyAndScale } from '../../../../utils/utils'; | ||
import {Dialog as DialogPrimitive} from 'bits-ui'; | ||
import {Exit} from '../../../assets/index'; | ||
import * as Dialog from './index.js'; | ||
import {cn, flyAndScale} from '../../../utils/utils'; | ||
type $$Props = DialogPrimitive.ContentProps; | ||
type $$Props = DialogPrimitive.ContentProps; | ||
let className: $$Props['class'] = undefined; | ||
export let transition: $$Props['transition'] = flyAndScale; | ||
export let transitionConfig: $$Props['transitionConfig'] = { | ||
duration: 200, | ||
}; | ||
export { className as class }; | ||
let className: $$Props['class'] = undefined; | ||
export let transition: $$Props['transition'] = flyAndScale; | ||
export let transitionConfig: $$Props['transitionConfig'] = { | ||
duration: 200, | ||
}; | ||
export {className as class}; | ||
</script> | ||
|
||
<Dialog.Portal> | ||
<Dialog.Overlay /> | ||
<DialogPrimitive.Content | ||
{transition} | ||
{transitionConfig} | ||
class={cn( | ||
<Dialog.Overlay/> | ||
<DialogPrimitive.Content | ||
{transition} | ||
{transitionConfig} | ||
class={cn( | ||
'normal fixed left-[50%] top-[50%] z-50 grid w-full max-w-[500px] translate-x-[-50%] translate-y-[-50%] gap-f24 rounded-lg bg-cream p-f48 shadow-lg md:w-full', | ||
className | ||
)} | ||
{...$$restProps} | ||
> | ||
<slot /> | ||
<DialogPrimitive.Close class="absolute right-f24 top-f24 disabled:pointer-events-none"> | ||
<Exit class="h-4 w-4 text-navy" /> | ||
<span class="sr-only">Close</span> | ||
</DialogPrimitive.Close> | ||
</DialogPrimitive.Content> | ||
{...$$restProps} | ||
> | ||
<slot/> | ||
<DialogPrimitive.Close class="absolute right-f24 top-f24 disabled:pointer-events-none"> | ||
<Exit class="h-4 w-4 text-navy"/> | ||
<span class="sr-only">Close</span> | ||
</DialogPrimitive.Close> | ||
</DialogPrimitive.Content> | ||
</Dialog.Portal> |
12 changes: 6 additions & 6 deletions
12
src/lib/shadcnComponents/ui/dialog/dialog-description.svelte
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,13 +1,13 @@ | ||
<script lang="ts"> | ||
import { Dialog as DialogPrimitive } from 'bits-ui'; | ||
import { cn } from '../../../../utils/utils.js'; | ||
import {Dialog as DialogPrimitive} from 'bits-ui'; | ||
import {cn} from '../../../utils/utils.js'; | ||
type $$Props = DialogPrimitive.DescriptionProps; | ||
type $$Props = DialogPrimitive.DescriptionProps; | ||
let className: $$Props['class'] = undefined; | ||
export { className as class }; | ||
let className: $$Props['class'] = undefined; | ||
export {className as class}; | ||
</script> | ||
|
||
<DialogPrimitive.Description class={cn('sm', className)} {...$$restProps}> | ||
<slot /> | ||
<slot/> | ||
</DialogPrimitive.Description> |
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,13 +1,13 @@ | ||
<script lang="ts"> | ||
import type { HTMLAttributes } from 'svelte/elements'; | ||
import { cn } from '../../../../utils/utils.js'; | ||
import type {HTMLAttributes} from 'svelte/elements'; | ||
import {cn} from '../../../utils/utils.js'; | ||
type $$Props = HTMLAttributes<HTMLDivElement>; | ||
type $$Props = HTMLAttributes<HTMLDivElement>; | ||
let className: $$Props['class'] = undefined; | ||
export { className as class }; | ||
let className: $$Props['class'] = undefined; | ||
export {className as class}; | ||
</script> | ||
|
||
<div class={cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className)} {...$$restProps}> | ||
<slot /> | ||
<slot/> | ||
</div> |
Oops, something went wrong.