@valerius_petrini/corekit-ui 0.1.63 → 0.1.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Analytics.svelte +4 -0
- package/dist/components/Button.svelte +10 -5
- package/dist/components/Card.svelte +1 -1
- package/dist/components/Combobox.svelte +207 -0
- package/dist/components/Combobox.svelte.d.ts +4 -0
- package/dist/components/Input.svelte +46 -148
- package/dist/components/KBD.svelte +23 -0
- package/dist/components/KBD.svelte.d.ts +3 -0
- package/dist/components/Loader.svelte +35 -0
- package/dist/components/Loader.svelte.d.ts +4 -0
- package/dist/components/SEO.svelte +27 -17
- package/dist/components/Select.svelte +63 -23
- package/dist/components/Select.svelte.d.ts +1 -1
- package/dist/components/Skeleton.svelte +63 -0
- package/dist/components/Skeleton.svelte.d.ts +4 -0
- package/dist/components/Table.svelte +1 -1
- package/dist/components/helper/BaseInput.svelte +105 -0
- package/dist/components/helper/BaseInput.svelte.d.ts +4 -0
- package/dist/components/helper/NumberInput.svelte +79 -0
- package/dist/components/helper/NumberInput.svelte.d.ts +11 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/styles/color.d.ts +1 -1
- package/dist/styles/color.js +56 -28
- package/dist/styles/layout.css +6 -0
- package/dist/styles/size.d.ts +1 -1
- package/dist/styles/size.js +36 -12
- package/dist/types/Button.d.ts +1 -0
- package/dist/types/Input.d.ts +20 -5
- package/dist/types/Input.js +1 -0
- package/dist/types/Loader.d.ts +5 -0
- package/dist/types/{Select.js → Loader.js} +0 -1
- package/dist/types/SEO.d.ts +1 -1
- package/dist/types/Skeleton.d.ts +6 -0
- package/dist/types/Skeleton.js +1 -0
- package/dist/utils/debounce.d.ts +1 -0
- package/dist/utils/debounce.js +7 -0
- package/dist/utils/link.d.ts +2 -2
- package/dist/utils/link.js +2 -2
- package/package.json +2 -1
- package/dist/types/Select.d.ts +0 -12
|
@@ -7,37 +7,47 @@
|
|
|
7
7
|
const DEFAULT_IMAGE = "/favicon.png";
|
|
8
8
|
|
|
9
9
|
let {
|
|
10
|
-
websiteName,
|
|
11
10
|
title = DEFAULT_TITLE,
|
|
12
11
|
description = DEFAULT_DESCRIPTION,
|
|
13
|
-
image = DEFAULT_IMAGE
|
|
12
|
+
image = DEFAULT_IMAGE,
|
|
13
|
+
noindex = false,
|
|
14
14
|
}: SEOProps = $props();
|
|
15
15
|
|
|
16
|
-
let
|
|
16
|
+
let origin = $derived(page.url.origin);
|
|
17
|
+
let fullUrl = $derived(page.url.href);
|
|
18
|
+
let fullImage = $derived(image.startsWith("http") ? image : `${origin}${image}`);
|
|
19
|
+
|
|
20
|
+
let jsonLd = $derived(JSON.stringify({
|
|
21
|
+
"@context": "https://schema.org",
|
|
22
|
+
"@type": "WebSite",
|
|
23
|
+
"name": title,
|
|
24
|
+
"url": fullUrl,
|
|
25
|
+
"logo": fullImage
|
|
26
|
+
}));
|
|
17
27
|
</script>
|
|
18
28
|
|
|
19
29
|
<svelte:head>
|
|
20
30
|
<title>{title}</title>
|
|
31
|
+
<link rel="canonical" href={fullUrl}>
|
|
21
32
|
<meta name="description" content={description}>
|
|
22
|
-
|
|
33
|
+
{#if noindex}
|
|
34
|
+
<meta name="robots" content="noindex,nofollow">
|
|
35
|
+
{/if}
|
|
36
|
+
|
|
37
|
+
<meta property="og:site_name" content={title}>
|
|
23
38
|
<meta property="og:url" content={fullUrl}>
|
|
24
39
|
<meta property="og:type" content="website">
|
|
25
|
-
<meta property="og:title" content=
|
|
40
|
+
<meta property="og:title" content={title}>
|
|
26
41
|
<meta property="og:description" content={description}>
|
|
27
|
-
<meta property="og:image" content={
|
|
28
|
-
|
|
42
|
+
<meta property="og:image" content={fullImage}>
|
|
43
|
+
<meta property="og:locale" content="en_US">
|
|
44
|
+
|
|
29
45
|
<meta name="twitter:card" content="summary_large_image">
|
|
30
|
-
<meta property="twitter:domain" content={
|
|
46
|
+
<meta property="twitter:domain" content={page.url.hostname}>
|
|
31
47
|
<meta property="twitter:url" content={fullUrl}>
|
|
32
|
-
<meta name="twitter:title" content=
|
|
48
|
+
<meta name="twitter:title" content={title}>
|
|
33
49
|
<meta name="twitter:description" content={description}>
|
|
34
|
-
<meta name="twitter:image" content={
|
|
35
|
-
{@html ` <script type="application/ld+json">{
|
|
36
|
-
"@context": "https://schema.org",
|
|
37
|
-
"@type": "Website",
|
|
38
|
-
"name": "${title}",
|
|
39
|
-
"url": "${fullUrl}",
|
|
40
|
-
"logo": "${websiteName}${image}" }</script>`}
|
|
50
|
+
<meta name="twitter:image" content={fullImage}>
|
|
41
51
|
|
|
42
|
-
|
|
52
|
+
{@html `<script type="application/ld+json">${jsonLd}</script>`}
|
|
43
53
|
</svelte:head>
|
|
@@ -1,40 +1,80 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import type { SelectProps } from "../types/Select.js";
|
|
3
2
|
import { twMerge } from "tailwind-merge";
|
|
4
3
|
import Text from "./Text.svelte";
|
|
4
|
+
import { getSizeStyleClass } from "../styles/size.js";
|
|
5
|
+
|
|
6
|
+
import type { SelectProps } from "../types/Input.js";
|
|
7
|
+
import BaseInput from "./helper/BaseInput.svelte";
|
|
5
8
|
|
|
6
9
|
let {
|
|
7
10
|
children = undefined,
|
|
8
11
|
class: className = "",
|
|
9
12
|
label = "",
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
+
labelClass = "",
|
|
14
|
+
divClass = "",
|
|
15
|
+
outerDivClass = "",
|
|
13
16
|
options = [],
|
|
17
|
+
variant = "default",
|
|
18
|
+
value = $bindable(),
|
|
19
|
+
required = false,
|
|
20
|
+
disabled = false,
|
|
21
|
+
size = "md",
|
|
22
|
+
radius = "md",
|
|
14
23
|
id = crypto.randomUUID(),
|
|
15
24
|
...restProps
|
|
16
25
|
}: SelectProps = $props();
|
|
17
26
|
|
|
18
|
-
let defaultSelectClass = "cursor-pointer bg-form-background border-[1px] border-form-border text-main-text z-20 w-full rounded px-1 pt-4 pb-1 text-xs outline-none focus:ring-2 focus:ring-blue-500 transition-all";
|
|
19
|
-
let defaultLabelClass = "block text-sub-text rounded-md text-sm font-medium mb-1 absolute transition-all duration-100 pointer-events-none";
|
|
20
|
-
let defaultDivClass = "relative w-fit";
|
|
21
27
|
|
|
22
|
-
|
|
28
|
+
const sizeClasses = $derived(getSizeStyleClass(size, "form"));
|
|
29
|
+
const labelSizeClass = $derived(getSizeStyleClass(size, "formLabel"));
|
|
30
|
+
|
|
31
|
+
const customStyle = $derived.by(() => {
|
|
32
|
+
const styles: string[] = [];
|
|
33
|
+
|
|
34
|
+
if (typeof size === "number")
|
|
35
|
+
styles.push(`width: ${size}px`);
|
|
36
|
+
|
|
37
|
+
if (typeof radius === "number")
|
|
38
|
+
styles.push(`border-radius: ${radius}px`);
|
|
39
|
+
|
|
40
|
+
return styles.join("; ");
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
let isFocused = $state(true);
|
|
44
|
+
|
|
45
|
+
let defaultClass = "text-main-text w-full outline-none px-0.5 w-full bg-inherit border-0 focus:ring-0 focus-visible:ring-0 rounded-full";
|
|
23
46
|
|
|
24
|
-
let
|
|
25
|
-
let
|
|
26
|
-
let combinedDivClass = $derived(twMerge(defaultDivClass, divClass));
|
|
47
|
+
let defaultInputClassCheck = $derived(variant !== "floating" ? "py-0" : "");
|
|
48
|
+
let combinedClass = $derived(twMerge(defaultClass, sizeClasses, defaultInputClassCheck, labelSizeClass, className));
|
|
27
49
|
</script>
|
|
28
50
|
|
|
29
|
-
<
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
51
|
+
<BaseInput
|
|
52
|
+
{children}
|
|
53
|
+
{className}
|
|
54
|
+
{label}
|
|
55
|
+
{labelClass}
|
|
56
|
+
{divClass}
|
|
57
|
+
{outerDivClass}
|
|
58
|
+
{value}
|
|
59
|
+
{required}
|
|
60
|
+
{disabled}
|
|
61
|
+
{variant}
|
|
62
|
+
{size}
|
|
63
|
+
{radius}
|
|
64
|
+
{isFocused}
|
|
65
|
+
{id}
|
|
66
|
+
{...restProps}>
|
|
67
|
+
{#snippet innerDivElement()}
|
|
68
|
+
<select
|
|
69
|
+
id={id}
|
|
70
|
+
class={combinedClass}
|
|
71
|
+
disabled={disabled}
|
|
72
|
+
bind:value={value}
|
|
73
|
+
style={customStyle}
|
|
74
|
+
{...restProps}>
|
|
75
|
+
{#each options as option}
|
|
76
|
+
<option value={option.value}>{option.label}</option>
|
|
77
|
+
{/each}
|
|
78
|
+
</select>
|
|
79
|
+
{/snippet}
|
|
80
|
+
</BaseInput>
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { getSizeStyleClass } from "../styles/size.js";
|
|
3
|
+
import type { SkeletonProps } from "../types/Skeleton.js";
|
|
4
|
+
import Image from "@lucide/svelte/icons/image";
|
|
5
|
+
import Play from "@lucide/svelte/icons/play";
|
|
6
|
+
import { twMerge } from "tailwind-merge";
|
|
7
|
+
|
|
8
|
+
let {
|
|
9
|
+
variant = "text",
|
|
10
|
+
class: className = "",
|
|
11
|
+
count = 19,
|
|
12
|
+
size = "md"
|
|
13
|
+
}: SkeletonProps = $props();
|
|
14
|
+
|
|
15
|
+
const defaultWidths = [21, 19, 24, 15, 10, 30, 22, 17, 26, 20, 28, 10, 22, 45, 16, 23, 37, 25, 25];
|
|
16
|
+
const widths = $derived(Array.from({ length: count }, (_, i) => defaultWidths[i % defaultWidths.length]));
|
|
17
|
+
|
|
18
|
+
const defaultContainerClass = "animate-pulse duration-100 w-lg flex flex-col gap-2";
|
|
19
|
+
const combinedContainerClass = $derived(twMerge(
|
|
20
|
+
defaultContainerClass,
|
|
21
|
+
getSizeStyleClass(size, "card"),
|
|
22
|
+
className
|
|
23
|
+
));
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
{#snippet image()}
|
|
27
|
+
<div class="h-48 bg-sub-background rounded w-full flex-center">
|
|
28
|
+
<Image size={48} class="text-form-border"/>
|
|
29
|
+
</div>
|
|
30
|
+
{/snippet}
|
|
31
|
+
|
|
32
|
+
{#snippet text()}
|
|
33
|
+
<div class="pt-4 flex flex-wrap gap-2">
|
|
34
|
+
{#each widths as width}
|
|
35
|
+
<div class="h-4 rounded even:bg-sub-background odd:bg-sub-background-hover"
|
|
36
|
+
style="width: {width}%;"></div>
|
|
37
|
+
{/each}
|
|
38
|
+
</div>
|
|
39
|
+
{/snippet}
|
|
40
|
+
|
|
41
|
+
<div class={combinedContainerClass}>
|
|
42
|
+
{#if variant === "default"}
|
|
43
|
+
<div class="h-4 bg-sub-background rounded w-3/4"></div>
|
|
44
|
+
<div class="h-4 bg-sub-background rounded w-full"></div>
|
|
45
|
+
<div class="h-4 bg-sub-background rounded w-5/6"></div>
|
|
46
|
+
<div class="h-4 bg-sub-background rounded w-2/3"></div>
|
|
47
|
+
<div class="h-4 bg-sub-background rounded w-5/6"></div>
|
|
48
|
+
<div class="h-4 bg-sub-background rounded w-11/12"></div>
|
|
49
|
+
{:else if variant === "text"}
|
|
50
|
+
{@render text()}
|
|
51
|
+
{:else if variant === "image"}
|
|
52
|
+
{@render image()}
|
|
53
|
+
{:else if variant === "video"}
|
|
54
|
+
<div class="h-48 bg-sub-background rounded w-full flex-center">
|
|
55
|
+
<Play size={48} class="text-form-border"/>
|
|
56
|
+
</div>
|
|
57
|
+
{:else if variant === "card"}
|
|
58
|
+
<div class="w-full h-full border-sub-background border-2 rounded p-4 gap-2">
|
|
59
|
+
{@render image()}
|
|
60
|
+
{@render text()}
|
|
61
|
+
</div>
|
|
62
|
+
{/if}
|
|
63
|
+
</div>
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
const defaultTableClass = "w-full border-collapse text-main-text border border-form-border border-l-0";
|
|
16
16
|
const defaultTableHeaderClass = "text-left border-b border-b-1 border-b-form-border bg-sub-background font-medium";
|
|
17
17
|
const defaultTableCellClass = "p-2 text-sm border-l border-l-[1px] border-l-form-border";
|
|
18
|
-
const defaultTableBodyClass = "even:bg-sub-background odd:bg-
|
|
18
|
+
const defaultTableBodyClass = "even:bg-sub-background odd:bg-sub-background-hover";
|
|
19
19
|
|
|
20
20
|
const combinedTableClass = $derived(twMerge(
|
|
21
21
|
defaultTableClass,
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { twMerge } from "tailwind-merge";
|
|
3
|
+
import type { BaseInputProps } from "../../types/Input.js";
|
|
4
|
+
import Text from "../Text.svelte";
|
|
5
|
+
import { getSizeStyleClass } from "../../styles/size.js";
|
|
6
|
+
|
|
7
|
+
let {
|
|
8
|
+
children = undefined,
|
|
9
|
+
class: className = "",
|
|
10
|
+
label = "",
|
|
11
|
+
labelClass = "",
|
|
12
|
+
divClass = "",
|
|
13
|
+
outerDivClass = "",
|
|
14
|
+
value = $bindable(),
|
|
15
|
+
required = false,
|
|
16
|
+
disabled = false,
|
|
17
|
+
variant = "default",
|
|
18
|
+
size = "md",
|
|
19
|
+
radius = "md",
|
|
20
|
+
isFocused = false,
|
|
21
|
+
icon = undefined,
|
|
22
|
+
id = crypto.randomUUID(),
|
|
23
|
+
|
|
24
|
+
isHovered = $bindable(false),
|
|
25
|
+
|
|
26
|
+
innerDivElement = undefined,
|
|
27
|
+
outerDivElementAfter = undefined,
|
|
28
|
+
|
|
29
|
+
...restProps
|
|
30
|
+
}: BaseInputProps = $props();
|
|
31
|
+
|
|
32
|
+
const hasContent = $derived(value !== undefined && value !== null && value.toString().length > 0);
|
|
33
|
+
|
|
34
|
+
const customLabelStyle = $derived.by(() => {
|
|
35
|
+
const styles: string[] = [];
|
|
36
|
+
|
|
37
|
+
if (typeof size === "number")
|
|
38
|
+
styles.push(`font-size: ${size / 4}px`);
|
|
39
|
+
|
|
40
|
+
return styles.join("; ");
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
let labelClassIcon = $derived(icon != null && variant === "floating" ? "pl-[32px] pr-2" : "");
|
|
44
|
+
|
|
45
|
+
const defaultLabelClass = "block text-sub-text font-medium mb-1 duration-100 pointer-events-none truncate w-fit";
|
|
46
|
+
const floatingLabelClass = "absolute w-full z-30 top-1/2 transform -translate-y-1/2 px-1.5";
|
|
47
|
+
|
|
48
|
+
const combinedLabelClass = $derived(twMerge(
|
|
49
|
+
defaultLabelClass,
|
|
50
|
+
(variant === "floating") ? floatingLabelClass : "px-0",
|
|
51
|
+
labelClassIcon,
|
|
52
|
+
getSizeStyleClass(size, "formLabel"),
|
|
53
|
+
((isFocused || hasContent) && variant === "floating") && getSizeStyleClass(size, "formLabelSelected"),
|
|
54
|
+
labelClass
|
|
55
|
+
));
|
|
56
|
+
|
|
57
|
+
const combinedOuterDivClass = $derived(twMerge(
|
|
58
|
+
"relative flex flex-col bg-transparent border-0 p-0",
|
|
59
|
+
getSizeStyleClass(radius, "radius"),
|
|
60
|
+
size === "full" ? "w-full" : "",
|
|
61
|
+
outerDivClass,
|
|
62
|
+
disabled ? "opacity-50 pointer-events-none" : ""
|
|
63
|
+
));
|
|
64
|
+
|
|
65
|
+
const combinedDivClass = $derived(twMerge(
|
|
66
|
+
"relative *:transition-all transition-colors flex-center bg-form-background border-[1px] border-form-border focus-within:ring-1 focus-within:ring-blue-500 overflow-hidden",
|
|
67
|
+
getSizeStyleClass(radius, "radius"),
|
|
68
|
+
size === "full" ? "w-full" : "",
|
|
69
|
+
divClass,
|
|
70
|
+
disabled ? "opacity-50 pointer-events-none" : ""
|
|
71
|
+
));
|
|
72
|
+
</script>
|
|
73
|
+
|
|
74
|
+
{#snippet labelElement()}
|
|
75
|
+
<Text tag="label" for={id} class={combinedLabelClass} style={customLabelStyle}>
|
|
76
|
+
{label}
|
|
77
|
+
{#if required}
|
|
78
|
+
<span class="text-[#E05555]">*</span>
|
|
79
|
+
{/if}
|
|
80
|
+
</Text>
|
|
81
|
+
{/snippet}
|
|
82
|
+
|
|
83
|
+
{#snippet innerDivElementWrapper()}
|
|
84
|
+
<div role="button" tabindex="0" class={combinedDivClass} onmouseenter={() => isHovered = true} onmouseleave={() => isHovered = false}>
|
|
85
|
+
{#if variant === "floating"}
|
|
86
|
+
{@render labelElement()}
|
|
87
|
+
{/if}
|
|
88
|
+
{#if icon}
|
|
89
|
+
{@const Icon = icon}
|
|
90
|
+
<div class="h-5 aspect-square px-1 py-0!">
|
|
91
|
+
<Icon class="h-full aspect-square text-sub-text"></Icon>
|
|
92
|
+
</div>
|
|
93
|
+
{/if}
|
|
94
|
+
{@render innerDivElement?.()}
|
|
95
|
+
</div>
|
|
96
|
+
{/snippet}
|
|
97
|
+
|
|
98
|
+
<div class={combinedOuterDivClass}>
|
|
99
|
+
{#if variant !== "floating"}
|
|
100
|
+
{@render labelElement()}
|
|
101
|
+
{/if}
|
|
102
|
+
{@render innerDivElementWrapper()}
|
|
103
|
+
|
|
104
|
+
{@render outerDivElementAfter?.()}
|
|
105
|
+
</div>
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import Button from "../Button.svelte";
|
|
3
|
+
import ChevronUp from "@lucide/svelte/icons/chevron-up";
|
|
4
|
+
import ChevronDown from "@lucide/svelte/icons/chevron-down";
|
|
5
|
+
import { twMerge } from "tailwind-merge";
|
|
6
|
+
import { getSizeStyleClass, type SizeStyle } from "../../styles/size.js";
|
|
7
|
+
|
|
8
|
+
let {
|
|
9
|
+
max = undefined,
|
|
10
|
+
min = undefined,
|
|
11
|
+
step = undefined,
|
|
12
|
+
value = $bindable(),
|
|
13
|
+
isHovered = false,
|
|
14
|
+
size = "md" as SizeStyle,
|
|
15
|
+
...restProps
|
|
16
|
+
} = $props();
|
|
17
|
+
|
|
18
|
+
function increment() {
|
|
19
|
+
if (max === undefined || value < max) value = (value || 0) + (step || 1);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function decrement() {
|
|
23
|
+
if (min === undefined || value > min) value = (value || 0) - (step || 1);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
let incrementInterval: ReturnType<typeof setInterval> | null = null;
|
|
27
|
+
let decrementInterval: ReturnType<typeof setInterval> | null = null;
|
|
28
|
+
|
|
29
|
+
function startIncrement() {
|
|
30
|
+
increment();
|
|
31
|
+
incrementInterval = setInterval(increment, 100);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function stopIncrement() {
|
|
35
|
+
if (incrementInterval) {
|
|
36
|
+
clearInterval(incrementInterval);
|
|
37
|
+
incrementInterval = null;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function startDecrement() {
|
|
42
|
+
decrement();
|
|
43
|
+
decrementInterval = setInterval(decrement, 100);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function stopDecrement() {
|
|
47
|
+
if (decrementInterval) {
|
|
48
|
+
clearInterval(decrementInterval);
|
|
49
|
+
decrementInterval = null;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const numberIconClass = $derived(twMerge(
|
|
54
|
+
getSizeStyleClass(size, "form"),
|
|
55
|
+
"text-sub-text/70 w-fit aspect-auto p-0 flex-center flex-col transition-all duration-150"
|
|
56
|
+
));
|
|
57
|
+
const numberButtonClass = "py-0! h-1/2 gap-0 px-0.5 hover:bg-form-border aspect-square rounded-none";
|
|
58
|
+
</script>
|
|
59
|
+
|
|
60
|
+
<div class={twMerge(numberIconClass, isHovered ? "opacity-100 scale-100" : "opacity-0 scale-75")}>
|
|
61
|
+
<Button
|
|
62
|
+
size="none" radius="none"
|
|
63
|
+
class={numberButtonClass}
|
|
64
|
+
onmousedown={startIncrement}
|
|
65
|
+
onmouseup={stopIncrement}
|
|
66
|
+
onmouseleave={stopIncrement}
|
|
67
|
+
disabled={max !== undefined && value >= max}>
|
|
68
|
+
<ChevronUp class="w-full h-full"/>
|
|
69
|
+
</Button>
|
|
70
|
+
<Button
|
|
71
|
+
size="none" radius="none"
|
|
72
|
+
class={numberButtonClass}
|
|
73
|
+
onmousedown={startDecrement}
|
|
74
|
+
onmouseup={stopDecrement}
|
|
75
|
+
onmouseleave={stopDecrement}
|
|
76
|
+
disabled={min !== undefined && value <= min}>
|
|
77
|
+
<ChevronDown class="w-full h-full"/>
|
|
78
|
+
</Button>
|
|
79
|
+
</div>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type SizeStyle } from "../../styles/size.js";
|
|
2
|
+
declare const NumberInput: import("svelte").Component<{
|
|
3
|
+
max?: any;
|
|
4
|
+
min?: any;
|
|
5
|
+
step?: any;
|
|
6
|
+
value?: any;
|
|
7
|
+
isHovered?: boolean;
|
|
8
|
+
size?: SizeStyle;
|
|
9
|
+
} & Record<string, any>, {}, "value">;
|
|
10
|
+
type NumberInput = ReturnType<typeof NumberInput>;
|
|
11
|
+
export default NumberInput;
|
package/dist/index.d.ts
CHANGED
|
@@ -19,6 +19,9 @@ export { default as Toast } from "./components/Toast.svelte";
|
|
|
19
19
|
export { default as Toaster } from "./components/Toaster.svelte";
|
|
20
20
|
export { default as SideNavbar } from "./components/SideNavbar.svelte";
|
|
21
21
|
export { default as Tooltip } from "./components/Tooltip.svelte";
|
|
22
|
+
export { default as Loader } from "./components/Loader.svelte";
|
|
23
|
+
export { default as Skeleton } from "./components/Skeleton.svelte";
|
|
24
|
+
export { default as Combobox } from "./components/Combobox.svelte";
|
|
22
25
|
export { fbmBackground } from "./actions/fbm.ts";
|
|
23
26
|
export { toast } from "./actions/toast.svelte.ts";
|
|
24
27
|
export type { TypewriterAction, DisplaySegment } from "./types/Typewriter.ts";
|
package/dist/index.js
CHANGED
|
@@ -19,5 +19,8 @@ export { default as Toast } from "./components/Toast.svelte";
|
|
|
19
19
|
export { default as Toaster } from "./components/Toaster.svelte";
|
|
20
20
|
export { default as SideNavbar } from "./components/SideNavbar.svelte";
|
|
21
21
|
export { default as Tooltip } from "./components/Tooltip.svelte";
|
|
22
|
+
export { default as Loader } from "./components/Loader.svelte";
|
|
23
|
+
export { default as Skeleton } from "./components/Skeleton.svelte";
|
|
24
|
+
export { default as Combobox } from "./components/Combobox.svelte";
|
|
22
25
|
export { fbmBackground } from "./actions/fbm.js";
|
|
23
26
|
export { toast } from "./actions/toast.svelte.js";
|
package/dist/styles/color.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export type ColorStyle = "rose" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "gray" | "sub" | "none" | "white" | "black" | "primary" | "secondary" | "accent" | "error" | "warning" | "success" | "info";
|
|
2
|
-
export type ColorStyleType = "base" | "text" | "full" | "light" | "outline" | "ghost";
|
|
2
|
+
export type ColorStyleType = "base" | "text" | "full" | "light" | "outline" | "ghost" | "loader";
|
|
3
3
|
export declare const colorStyleParts: Record<ColorStyle, Record<ColorStyleType, string>>;
|
|
4
4
|
export declare function generateColorStyle(color: ColorStyle, variant: ColorStyleType): string;
|