-
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.
Merge pull request #5 from calvo-jp/tests
test: initial component tests
- Loading branch information
Showing
93 changed files
with
1,420 additions
and
84 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
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 |
---|---|---|
|
@@ -5,7 +5,9 @@ | |
"packageManager": "[email protected]", | ||
"scripts": { | ||
"ui-ingredients": "pnpm --filter ui-ingredients", | ||
"ui-ingredients-tailwindcss-plugin": "pnpm --filter ui-ingredients-tailwindcss-plugin", | ||
"website": "pnpm --filter website", | ||
"test": "pnpm ui-ingredients test && pnpm ui-ingredients-tailwindcss-plugin test", | ||
"lint": "eslint .", | ||
"format": "prettier --write ." | ||
}, | ||
|
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
36 changes: 36 additions & 0 deletions
36
packages/ui-ingredients/src/lib/number-input/number-input-value-text.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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<script lang="ts" module> | ||
import type {HtmlIngredientProps} from '$lib/types.js'; | ||
export interface NumberInputValueTextProps | ||
extends HtmlIngredientProps<'span', HTMLSpanElement> {} | ||
</script> | ||
|
||
<script lang="ts"> | ||
import {mergeProps} from '$lib/merge-props.js'; | ||
import {getNumberInputContext} from './number-input-context.svelte.js'; | ||
let { | ||
ref = $bindable(null), | ||
asChild, | ||
children, | ||
...props | ||
}: NumberInputValueTextProps = $props(); | ||
let numberInput = getNumberInputContext(); | ||
let mergedProps = $derived( | ||
mergeProps(numberInput.getValueTextProps(), props), | ||
); | ||
</script> | ||
|
||
{#if asChild} | ||
{@render asChild(mergedProps)} | ||
{:else} | ||
<span bind:this={ref} {...mergedProps}> | ||
{#if children} | ||
{@render children?.()} | ||
{:else} | ||
{numberInput.valueAsNumber} | ||
{/if} | ||
</span> | ||
{/if} |
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
30 changes: 30 additions & 0 deletions
30
packages/ui-ingredients/src/lib/pin-input/pin-input-control.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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<script lang="ts" module> | ||
import type {HtmlIngredientProps} from '$lib/types.js'; | ||
export interface PinInputControlProps | ||
extends HtmlIngredientProps<'div', HTMLDivElement> {} | ||
</script> | ||
|
||
<script lang="ts"> | ||
import {mergeProps} from '$lib/merge-props.js'; | ||
import {getPinInputContext} from './pin-input-context.svelte.js'; | ||
let { | ||
ref = $bindable(null), | ||
asChild, | ||
children, | ||
...props | ||
}: PinInputControlProps = $props(); | ||
let pinInput = getPinInputContext(); | ||
let mergedProps = $derived(mergeProps(pinInput.getControlProps(), props)); | ||
</script> | ||
|
||
{#if asChild} | ||
{@render asChild(mergedProps)} | ||
{:else} | ||
<div bind:this={ref} {...mergedProps}> | ||
{@render children?.()} | ||
</div> | ||
{/if} |
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
30 changes: 30 additions & 0 deletions
30
packages/ui-ingredients/src/lib/popover/popover-anchor.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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<script lang="ts" module> | ||
import type {HtmlIngredientProps} from '$lib/types.js'; | ||
export interface PopoverAnchorProps | ||
extends HtmlIngredientProps<'div', HTMLDivElement> {} | ||
</script> | ||
|
||
<script lang="ts"> | ||
import {mergeProps} from '$lib/merge-props.js'; | ||
import {getPopoverContext} from './popover-context.svelte.js'; | ||
let { | ||
ref = $bindable(null), | ||
asChild, | ||
children, | ||
...props | ||
}: PopoverAnchorProps = $props(); | ||
let popover = getPopoverContext(); | ||
let mergedProps = $derived(mergeProps(popover.getAnchorProps(), props)); | ||
</script> | ||
|
||
{#if asChild} | ||
{@render asChild(mergedProps)} | ||
{:else} | ||
<div bind:this={ref} {...mergedProps}> | ||
{@render children?.()} | ||
</div> | ||
{/if} |
30 changes: 30 additions & 0 deletions
30
packages/ui-ingredients/src/lib/popover/popover-indicator.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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<script lang="ts" module> | ||
import type {HtmlIngredientProps} from '$lib/types.js'; | ||
export interface PopoverIndicatorProps | ||
extends HtmlIngredientProps<'span', HTMLSpanElement> {} | ||
</script> | ||
|
||
<script lang="ts"> | ||
import {mergeProps} from '$lib/merge-props.js'; | ||
import {getPopoverContext} from './popover-context.svelte.js'; | ||
let { | ||
ref = $bindable(null), | ||
asChild, | ||
children, | ||
...props | ||
}: PopoverIndicatorProps = $props(); | ||
let popover = getPopoverContext(); | ||
let mergedProps = $derived(mergeProps(popover.getIndicatorProps(), props)); | ||
</script> | ||
|
||
{#if asChild} | ||
{@render asChild(mergedProps)} | ||
{:else} | ||
<span bind:this={ref} {...mergedProps}> | ||
{@render children?.()} | ||
</span> | ||
{/if} |
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
30 changes: 30 additions & 0 deletions
30
packages/ui-ingredients/src/lib/tabs/tabs-indicator.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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<script lang="ts" module> | ||
import type {HtmlIngredientProps} from '$lib/types.js'; | ||
export interface TabsIndicatorProps | ||
extends HtmlIngredientProps<'span', HTMLSpanElement> {} | ||
</script> | ||
|
||
<script lang="ts"> | ||
import {mergeProps} from '$lib/merge-props.js'; | ||
import {getTabsContext} from './tabs-context.svelte.js'; | ||
let { | ||
ref = $bindable(null), | ||
asChild, | ||
children, | ||
...props | ||
}: TabsIndicatorProps = $props(); | ||
let tabs = getTabsContext(); | ||
let mergedProps = $derived(mergeProps(tabs.getIndicatorProps(), props)); | ||
</script> | ||
|
||
{#if asChild} | ||
{@render asChild(mergedProps)} | ||
{:else} | ||
<span bind:this={ref} {...mergedProps}> | ||
{@render children?.()} | ||
</span> | ||
{/if} |
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,4 +1,5 @@ | ||
export {default as Content} from './tabs-content.svelte'; | ||
export {default as Indicator} from './tabs-indicator.svelte'; | ||
export {default as List} from './tabs-list.svelte'; | ||
export {default as Root} from './tabs-root.svelte'; | ||
export {default as Trigger} from './tabs-trigger.svelte'; |
Oops, something went wrong.