@skeletonlabs/skeleton 2.9.2 → 3.0.0-next.0
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/core/index.d.ts +2 -0
- package/dist/core/index.js +1 -0
- package/dist/core/index.js.map +1 -0
- package/dist/plugin/index.cjs +419 -0
- package/dist/plugin/index.cjs.map +1 -0
- package/dist/plugin/index.d.ts +270 -0
- package/dist/themes/index.d.ts +1117 -0
- package/dist/themes/index.js +935 -0
- package/dist/themes/index.js.map +1 -0
- package/package.json +31 -50
- package/README.md +0 -38
- package/dist/actions/Clipboard/clipboard.d.ts +0 -11
- package/dist/actions/Clipboard/clipboard.js +0 -64
- package/dist/actions/Filters/filter.d.ts +0 -6
- package/dist/actions/Filters/filter.js +0 -16
- package/dist/actions/Filters/svg-filters/Apollo.svelte +0 -13
- package/dist/actions/Filters/svg-filters/Apollo.svelte.d.ts +0 -23
- package/dist/actions/Filters/svg-filters/BlueNight.svelte +0 -12
- package/dist/actions/Filters/svg-filters/BlueNight.svelte.d.ts +0 -23
- package/dist/actions/Filters/svg-filters/Emerald.svelte +0 -23
- package/dist/actions/Filters/svg-filters/Emerald.svelte.d.ts +0 -23
- package/dist/actions/Filters/svg-filters/GreenFall.svelte +0 -27
- package/dist/actions/Filters/svg-filters/GreenFall.svelte.d.ts +0 -23
- package/dist/actions/Filters/svg-filters/Noir.svelte +0 -17
- package/dist/actions/Filters/svg-filters/Noir.svelte.d.ts +0 -23
- package/dist/actions/Filters/svg-filters/NoirLight.svelte +0 -19
- package/dist/actions/Filters/svg-filters/NoirLight.svelte.d.ts +0 -23
- package/dist/actions/Filters/svg-filters/Rustic.svelte +0 -14
- package/dist/actions/Filters/svg-filters/Rustic.svelte.d.ts +0 -23
- package/dist/actions/Filters/svg-filters/Summer84.svelte +0 -12
- package/dist/actions/Filters/svg-filters/Summer84.svelte.d.ts +0 -23
- package/dist/actions/Filters/svg-filters/XPro.svelte +0 -12
- package/dist/actions/Filters/svg-filters/XPro.svelte.d.ts +0 -23
- package/dist/actions/FocusTrap/focusTrap.d.ts +0 -4
- package/dist/actions/FocusTrap/focusTrap.js +0 -89
- package/dist/components/Accordion/Accordion.svelte +0 -49
- package/dist/components/Accordion/Accordion.svelte.d.ts +0 -56
- package/dist/components/Accordion/AccordionItem.svelte +0 -126
- package/dist/components/Accordion/AccordionItem.svelte.d.ts +0 -73
- package/dist/components/AppBar/AppBar.svelte +0 -53
- package/dist/components/AppBar/AppBar.svelte.d.ts +0 -49
- package/dist/components/AppRail/AppRail.svelte +0 -41
- package/dist/components/AppRail/AppRail.svelte.d.ts +0 -45
- package/dist/components/AppRail/AppRailAnchor.svelte +0 -46
- package/dist/components/AppRail/AppRailAnchor.svelte.d.ts +0 -38
- package/dist/components/AppRail/AppRailTile.svelte +0 -60
- package/dist/components/AppRail/AppRailTile.svelte.d.ts +0 -45
- package/dist/components/AppShell/AppShell.svelte +0 -72
- package/dist/components/AppShell/AppShell.svelte.d.ts +0 -50
- package/dist/components/Autocomplete/Autocomplete.svelte +0 -98
- package/dist/components/Autocomplete/Autocomplete.svelte.d.ts +0 -58
- package/dist/components/Autocomplete/types.d.ts +0 -10
- package/dist/components/Autocomplete/types.js +0 -2
- package/dist/components/Avatar/Avatar.svelte +0 -54
- package/dist/components/Avatar/Avatar.svelte.d.ts +0 -50
- package/dist/components/ConicGradient/ConicGradient.svelte +0 -77
- package/dist/components/ConicGradient/ConicGradient.svelte.d.ts +0 -42
- package/dist/components/ConicGradient/settings.d.ts +0 -9
- package/dist/components/ConicGradient/settings.js +0 -334
- package/dist/components/ConicGradient/types.d.ts +0 -10
- package/dist/components/ConicGradient/types.js +0 -2
- package/dist/components/FileButton/FileButton.svelte +0 -37
- package/dist/components/FileButton/FileButton.svelte.d.ts +0 -33
- package/dist/components/FileDropzone/FileDropzone.svelte +0 -63
- package/dist/components/FileDropzone/FileDropzone.svelte.d.ts +0 -55
- package/dist/components/InputChip/InputChip.svelte +0 -203
- package/dist/components/InputChip/InputChip.svelte.d.ts +0 -114
- package/dist/components/ListBox/ListBox.svelte +0 -29
- package/dist/components/ListBox/ListBox.svelte.d.ts +0 -40
- package/dist/components/ListBox/ListBoxItem.svelte +0 -117
- package/dist/components/ListBox/ListBoxItem.svelte.d.ts +0 -41
- package/dist/components/Paginator/Paginator.svelte +0 -190
- package/dist/components/Paginator/Paginator.svelte.d.ts +0 -68
- package/dist/components/Paginator/icons.d.ts +0 -4
- package/dist/components/Paginator/icons.js +0 -4
- package/dist/components/Paginator/types.d.ts +0 -10
- package/dist/components/Paginator/types.js +0 -2
- package/dist/components/ProgressBar/ProgressBar.svelte +0 -50
- package/dist/components/ProgressBar/ProgressBar.svelte.d.ts +0 -36
- package/dist/components/ProgressRadial/ProgressRadial.svelte +0 -73
- package/dist/components/ProgressRadial/ProgressRadial.svelte.d.ts +0 -38
- package/dist/components/Radio/RadioGroup.svelte +0 -29
- package/dist/components/Radio/RadioGroup.svelte.d.ts +0 -44
- package/dist/components/Radio/RadioItem.svelte +0 -61
- package/dist/components/Radio/RadioItem.svelte.d.ts +0 -41
- package/dist/components/RangeSlider/RangeSlider.svelte +0 -72
- package/dist/components/RangeSlider/RangeSlider.svelte.d.ts +0 -41
- package/dist/components/Ratings/Ratings.svelte +0 -52
- package/dist/components/Ratings/Ratings.svelte.d.ts +0 -41
- package/dist/components/SlideToggle/SlideToggle.svelte +0 -91
- package/dist/components/SlideToggle/SlideToggle.svelte.d.ts +0 -44
- package/dist/components/Stepper/Step.svelte +0 -97
- package/dist/components/Stepper/Step.svelte.d.ts +0 -56
- package/dist/components/Stepper/Stepper.svelte +0 -107
- package/dist/components/Stepper/Stepper.svelte.d.ts +0 -85
- package/dist/components/Stepper/types.d.ts +0 -25
- package/dist/components/Stepper/types.js +0 -1
- package/dist/components/Tab/Tab.svelte +0 -95
- package/dist/components/Tab/Tab.svelte.d.ts +0 -49
- package/dist/components/Tab/TabAnchor.svelte +0 -44
- package/dist/components/Tab/TabAnchor.svelte.d.ts +0 -44
- package/dist/components/Tab/TabGroup.svelte +0 -44
- package/dist/components/Tab/TabGroup.svelte.d.ts +0 -48
- package/dist/components/Table/Table.svelte +0 -86
- package/dist/components/Table/Table.svelte.d.ts +0 -42
- package/dist/components/Table/actions.d.ts +0 -8
- package/dist/components/Table/actions.js +0 -114
- package/dist/components/Table/types.d.ts +0 -10
- package/dist/components/Table/types.js +0 -1
- package/dist/components/Table/utils.d.ts +0 -7
- package/dist/components/Table/utils.js +0 -33
- package/dist/components/TreeView/RecursiveTreeView.svelte +0 -64
- package/dist/components/TreeView/RecursiveTreeView.svelte.d.ts +0 -63
- package/dist/components/TreeView/RecursiveTreeViewItem.svelte +0 -141
- package/dist/components/TreeView/RecursiveTreeViewItem.svelte.d.ts +0 -38
- package/dist/components/TreeView/TreeView.svelte +0 -68
- package/dist/components/TreeView/TreeView.svelte.d.ts +0 -55
- package/dist/components/TreeView/TreeViewItem.svelte +0 -319
- package/dist/components/TreeView/TreeViewItem.svelte.d.ts +0 -145
- package/dist/components/TreeView/types.d.ts +0 -17
- package/dist/components/TreeView/types.js +0 -1
- package/dist/index.d.ts +0 -75
- package/dist/index.js +0 -79
- package/dist/internal/transitions.d.ts +0 -10
- package/dist/internal/transitions.js +0 -11
- package/dist/transitions/crossfade.d.ts +0 -1
- package/dist/transitions/crossfade.js +0 -21
- package/dist/types.d.ts +0 -8
- package/dist/types.js +0 -1
- package/dist/utilities/CodeBlock/CodeBlock.svelte +0 -70
- package/dist/utilities/CodeBlock/CodeBlock.svelte.d.ts +0 -43
- package/dist/utilities/CodeBlock/stores.d.ts +0 -2
- package/dist/utilities/CodeBlock/stores.js +0 -3
- package/dist/utilities/Drawer/Drawer.svelte +0 -182
- package/dist/utilities/Drawer/Drawer.svelte.d.ts +0 -62
- package/dist/utilities/Drawer/stores.d.ts +0 -34
- package/dist/utilities/Drawer/stores.js +0 -50
- package/dist/utilities/Drawer/types.d.ts +0 -42
- package/dist/utilities/Drawer/types.js +0 -2
- package/dist/utilities/LightSwitch/LightSwitch.svelte +0 -78
- package/dist/utilities/LightSwitch/LightSwitch.svelte.d.ts +0 -39
- package/dist/utilities/LightSwitch/lightswitch.d.ts +0 -21
- package/dist/utilities/LightSwitch/lightswitch.js +0 -72
- package/dist/utilities/LocalStorageStore/LocalStorageStore.d.ts +0 -12
- package/dist/utilities/LocalStorageStore/LocalStorageStore.js +0 -49
- package/dist/utilities/Modal/Modal.svelte +0 -247
- package/dist/utilities/Modal/Modal.svelte.d.ts +0 -72
- package/dist/utilities/Modal/ModalTest.svelte +0 -8
- package/dist/utilities/Modal/ModalTest.svelte.d.ts +0 -17
- package/dist/utilities/Modal/stores.d.ts +0 -36
- package/dist/utilities/Modal/stores.js +0 -54
- package/dist/utilities/Modal/types.d.ts +0 -41
- package/dist/utilities/Modal/types.js +0 -2
- package/dist/utilities/Popup/popup.d.ts +0 -7
- package/dist/utilities/Popup/popup.js +0 -240
- package/dist/utilities/Popup/types.d.ts +0 -40
- package/dist/utilities/Popup/types.js +0 -2
- package/dist/utilities/PrefersReducedMotion/PrefersReducedMotion.d.ts +0 -7
- package/dist/utilities/PrefersReducedMotion/PrefersReducedMotion.js +0 -26
- package/dist/utilities/TableOfContents/TableOfContents.svelte +0 -56
- package/dist/utilities/TableOfContents/TableOfContents.svelte.d.ts +0 -34
- package/dist/utilities/TableOfContents/crawler.d.ts +0 -16
- package/dist/utilities/TableOfContents/crawler.js +0 -78
- package/dist/utilities/TableOfContents/stores.d.ts +0 -6
- package/dist/utilities/TableOfContents/stores.js +0 -5
- package/dist/utilities/TableOfContents/types.d.ts +0 -5
- package/dist/utilities/TableOfContents/types.js +0 -2
- package/dist/utilities/Toast/Toast.svelte +0 -150
- package/dist/utilities/Toast/Toast.svelte.d.ts +0 -55
- package/dist/utilities/Toast/ToastTest.svelte +0 -16
- package/dist/utilities/Toast/ToastTest.svelte.d.ts +0 -20
- package/dist/utilities/Toast/stores.d.ts +0 -37
- package/dist/utilities/Toast/stores.js +0 -107
- package/dist/utilities/Toast/types.d.ts +0 -35
- package/dist/utilities/Toast/types.js +0 -2
- package/dist/utilities/index.d.ts +0 -18
- package/dist/utilities/index.js +0 -25
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
<script>export let initials = "";
|
|
2
|
-
export let fill = "fill-token";
|
|
3
|
-
export let fontSize = 150;
|
|
4
|
-
export let src = "";
|
|
5
|
-
export let fallback = "";
|
|
6
|
-
export let action = () => {
|
|
7
|
-
};
|
|
8
|
-
export let actionParams = "";
|
|
9
|
-
export let background = "bg-surface-400-500-token";
|
|
10
|
-
export let width = "w-16";
|
|
11
|
-
export let border = "";
|
|
12
|
-
export let rounded = "rounded-full";
|
|
13
|
-
export let shadow = "";
|
|
14
|
-
export let cursor = "";
|
|
15
|
-
let cBase = "flex aspect-square text-surface-50 font-semibold justify-center items-center overflow-hidden isolate";
|
|
16
|
-
let cImage = "w-full object-cover";
|
|
17
|
-
$:
|
|
18
|
-
classesBase = `${cBase} ${background} ${width} ${border} ${rounded} ${shadow} ${cursor} ${$$props.class ?? ""}`;
|
|
19
|
-
function prunedRestProps() {
|
|
20
|
-
delete $$restProps.class;
|
|
21
|
-
return $$restProps;
|
|
22
|
-
}
|
|
23
|
-
</script>
|
|
24
|
-
|
|
25
|
-
<!-- FIXME: resolve a11y warnings -->
|
|
26
|
-
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
|
|
27
|
-
<figure class="avatar {classesBase}" data-testid="avatar" {...prunedRestProps()} on:click on:keydown on:keyup on:keypress>
|
|
28
|
-
{#if src || fallback}
|
|
29
|
-
<img
|
|
30
|
-
class="avatar-image {cImage}"
|
|
31
|
-
style={$$props.style ?? ''}
|
|
32
|
-
{src}
|
|
33
|
-
alt={$$props.alt || ''}
|
|
34
|
-
use:action={actionParams}
|
|
35
|
-
on:error={() => (src = fallback)}
|
|
36
|
-
/>
|
|
37
|
-
{:else if initials}
|
|
38
|
-
<svg class="avatar-initials w-full h-full" viewBox="0 0 512 512">
|
|
39
|
-
<text
|
|
40
|
-
x="50%"
|
|
41
|
-
y="50%"
|
|
42
|
-
dominant-baseline="central"
|
|
43
|
-
text-anchor="middle"
|
|
44
|
-
font-weight="bold"
|
|
45
|
-
font-size={fontSize}
|
|
46
|
-
class="avatar-text {fill}"
|
|
47
|
-
>
|
|
48
|
-
{String(initials).substring(0, 2).toUpperCase()}
|
|
49
|
-
</text>
|
|
50
|
-
</svg>
|
|
51
|
-
{:else}
|
|
52
|
-
<slot />
|
|
53
|
-
{/if}
|
|
54
|
-
</figure>
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type { Action } from 'svelte/action';
|
|
3
|
-
declare const __propDef: {
|
|
4
|
-
props: {
|
|
5
|
-
[x: string]: any;
|
|
6
|
-
/** Initials only - Provide up to two text characters.*/
|
|
7
|
-
initials?: string | undefined;
|
|
8
|
-
/** Initials only - Provide classes to set the SVG text fill color.*/
|
|
9
|
-
fill?: string | undefined;
|
|
10
|
-
/** Initials only - Set the base font size for the scalable SVG text.*/
|
|
11
|
-
fontSize?: number | undefined;
|
|
12
|
-
/** Provide the avatar image element source.*/
|
|
13
|
-
src?: string | undefined;
|
|
14
|
-
/** Provide the fallback image element source.*/
|
|
15
|
-
fallback?: string | undefined;
|
|
16
|
-
/** Image only. Provide a Svelte action reference, such as `filter`.*/
|
|
17
|
-
action?: Action<HTMLElement, string, Record<never, any>> | undefined;
|
|
18
|
-
/** Image only. Provide Svelte action params, such as Apollo.*/
|
|
19
|
-
actionParams?: string | undefined;
|
|
20
|
-
/** Provide classes to set background styles.*/
|
|
21
|
-
background?: string | undefined;
|
|
22
|
-
/** Provide classes to set avatar width.*/
|
|
23
|
-
width?: string | undefined;
|
|
24
|
-
/** Provide classes to set border styles.*/
|
|
25
|
-
border?: string | undefined;
|
|
26
|
-
/** Provide classes to set rounded style.*/
|
|
27
|
-
rounded?: string | undefined;
|
|
28
|
-
/** Provide classes to set shadow styles.*/
|
|
29
|
-
shadow?: string | undefined;
|
|
30
|
-
/** Provide classes to set cursor styles.*/
|
|
31
|
-
cursor?: string | undefined;
|
|
32
|
-
};
|
|
33
|
-
events: {
|
|
34
|
-
click: MouseEvent;
|
|
35
|
-
keydown: KeyboardEvent;
|
|
36
|
-
keyup: KeyboardEvent;
|
|
37
|
-
keypress: KeyboardEvent;
|
|
38
|
-
} & {
|
|
39
|
-
[evt: string]: CustomEvent<any>;
|
|
40
|
-
};
|
|
41
|
-
slots: {
|
|
42
|
-
default: {};
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
export type AvatarProps = typeof __propDef.props;
|
|
46
|
-
export type AvatarEvents = typeof __propDef.events;
|
|
47
|
-
export type AvatarSlots = typeof __propDef.slots;
|
|
48
|
-
export default class Avatar extends SvelteComponentTyped<AvatarProps, AvatarEvents, AvatarSlots> {
|
|
49
|
-
}
|
|
50
|
-
export {};
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
<script>import { afterUpdate } from "svelte";
|
|
2
|
-
import { tailwindDefaultColors } from "./settings.js";
|
|
3
|
-
export let stops = [{ color: ["neutral", 500], start: 0, end: 100 }];
|
|
4
|
-
export let legend = false;
|
|
5
|
-
export let spin = false;
|
|
6
|
-
export let width = "w-24";
|
|
7
|
-
export let hover = "bg-primary-hover-token";
|
|
8
|
-
export let digits = 0;
|
|
9
|
-
export let regionCaption = "";
|
|
10
|
-
export let regionCone = "";
|
|
11
|
-
export let regionLegend = "";
|
|
12
|
-
let cone;
|
|
13
|
-
let generatedLegendList;
|
|
14
|
-
const cBase = "flex flex-col items-center space-y-4 w-";
|
|
15
|
-
const cCaption = "text-center";
|
|
16
|
-
const cCone = "block aspect-square rounded-full";
|
|
17
|
-
const cLegend = "text-sm w-full";
|
|
18
|
-
const cSwatch = "block aspect-square bg-black w-5 rounded-full mr-2";
|
|
19
|
-
function setColorValue(color) {
|
|
20
|
-
if (typeof color === "string")
|
|
21
|
-
return color;
|
|
22
|
-
const colorSet = tailwindDefaultColors.find((c) => c.label === color[0]);
|
|
23
|
-
return colorSet?.shades[color[1]].hex;
|
|
24
|
-
}
|
|
25
|
-
function genConicGradient() {
|
|
26
|
-
let d = stops.map((v) => `${setColorValue(v.color)} ${v.start}% ${v.end}%`);
|
|
27
|
-
cone = `conic-gradient(${d.join(", ")})`;
|
|
28
|
-
}
|
|
29
|
-
function genLegend() {
|
|
30
|
-
if (!legend)
|
|
31
|
-
return;
|
|
32
|
-
generatedLegendList = stops.map((v) => {
|
|
33
|
-
return {
|
|
34
|
-
label: v.label,
|
|
35
|
-
color: setColorValue(v.color),
|
|
36
|
-
value: (v.end - v.start).toFixed(digits)
|
|
37
|
-
};
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
afterUpdate(() => {
|
|
41
|
-
genConicGradient();
|
|
42
|
-
genLegend();
|
|
43
|
-
});
|
|
44
|
-
$:
|
|
45
|
-
classesBase = `${cBase} ${$$props.class ?? ""}`;
|
|
46
|
-
$:
|
|
47
|
-
classesCaption = `${cCaption} ${regionCaption}`;
|
|
48
|
-
$:
|
|
49
|
-
classesCone = `${cCone} ${width} ${regionCone}`;
|
|
50
|
-
$:
|
|
51
|
-
classesLegend = `${cLegend} ${regionLegend}`;
|
|
52
|
-
</script>
|
|
53
|
-
|
|
54
|
-
<figure class="conic-gradient {classesBase}" data-testid="conic-gradient">
|
|
55
|
-
<!-- Label -->
|
|
56
|
-
{#if $$slots.default}
|
|
57
|
-
<figcaption class="conic-caption {classesCaption}"><slot /></figcaption>
|
|
58
|
-
{/if}
|
|
59
|
-
<!-- Conic Gradient -->
|
|
60
|
-
{#if cone}
|
|
61
|
-
<div class="conic-cone {classesCone}" class:animate-spin={spin} style:background={cone} />
|
|
62
|
-
{/if}
|
|
63
|
-
<!-- Legend -->
|
|
64
|
-
{#if legend && generatedLegendList}
|
|
65
|
-
<ul class="conic-list list {classesLegend}">
|
|
66
|
-
{#each generatedLegendList as { color, label, value }}
|
|
67
|
-
<!-- FIXME: resolve a11y warnings -->
|
|
68
|
-
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
|
|
69
|
-
<li class="conic-item {hover}" on:click on:keydown on:keyup on:keypress>
|
|
70
|
-
<span class="conic-swatch {cSwatch}" style:background={color} />
|
|
71
|
-
<span class="conic-label flex-auto">{label}</span>
|
|
72
|
-
<strong class="conic-value">{value}%</strong>
|
|
73
|
-
</li>
|
|
74
|
-
{/each}
|
|
75
|
-
</ul>
|
|
76
|
-
{/if}
|
|
77
|
-
</figure>
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type { ConicStop } from './types.js';
|
|
3
|
-
declare const __propDef: {
|
|
4
|
-
props: {
|
|
5
|
-
[x: string]: any;
|
|
6
|
-
/** Provide a data set of color stops and labels.*/
|
|
7
|
-
stops?: ConicStop[] | undefined;
|
|
8
|
-
/** Enable a contextual legend.*/
|
|
9
|
-
legend?: boolean | undefined;
|
|
10
|
-
/** When enabled, the conic gradient will spin.*/
|
|
11
|
-
spin?: boolean | undefined;
|
|
12
|
-
/** Style the conic gradient width.*/
|
|
13
|
-
width?: string | undefined;
|
|
14
|
-
/** Style the legend hover effect.*/
|
|
15
|
-
hover?: string | undefined;
|
|
16
|
-
/** Set the number of digits on the legend values.*/
|
|
17
|
-
digits?: number | undefined;
|
|
18
|
-
/** Style the caption region above the gradient.*/
|
|
19
|
-
regionCaption?: string | undefined;
|
|
20
|
-
/** Style the conic gradient region.*/
|
|
21
|
-
regionCone?: string | undefined;
|
|
22
|
-
/** Style the legend region below the gradient.*/
|
|
23
|
-
regionLegend?: string | undefined;
|
|
24
|
-
};
|
|
25
|
-
events: {
|
|
26
|
-
click: MouseEvent;
|
|
27
|
-
keydown: KeyboardEvent;
|
|
28
|
-
keyup: KeyboardEvent;
|
|
29
|
-
keypress: KeyboardEvent;
|
|
30
|
-
} & {
|
|
31
|
-
[evt: string]: CustomEvent<any>;
|
|
32
|
-
};
|
|
33
|
-
slots: {
|
|
34
|
-
default: {};
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
export type ConicGradientProps = typeof __propDef.props;
|
|
38
|
-
export type ConicGradientEvents = typeof __propDef.events;
|
|
39
|
-
export type ConicGradientSlots = typeof __propDef.slots;
|
|
40
|
-
export default class ConicGradient extends SvelteComponentTyped<ConicGradientProps, ConicGradientEvents, ConicGradientSlots> {
|
|
41
|
-
}
|
|
42
|
-
export {};
|
|
@@ -1,334 +0,0 @@
|
|
|
1
|
-
// Provides the full set of Tailwind colors via Javascript
|
|
2
|
-
// https://tailwindcss.com/docs/customizing-colors#default-color-palette
|
|
3
|
-
export const tailwindDefaultColors = [
|
|
4
|
-
{
|
|
5
|
-
label: 'slate',
|
|
6
|
-
shades: {
|
|
7
|
-
'50': { hex: '#f8fafc', rgb: '248 250 252' },
|
|
8
|
-
'100': { hex: '#f1f5f9', rgb: '241 245 249' },
|
|
9
|
-
'200': { hex: '#e2e8f0', rgb: '226 232 240' },
|
|
10
|
-
'300': { hex: '#cbd5e1', rgb: '203 213 225' },
|
|
11
|
-
'400': { hex: '#94a3b8', rgb: '148 163 184' },
|
|
12
|
-
'500': { hex: '#64748b', rgb: '100 116 139' },
|
|
13
|
-
'600': { hex: '#475569', rgb: '71 85 105' },
|
|
14
|
-
'700': { hex: '#334155', rgb: '51 65 85' },
|
|
15
|
-
'800': { hex: '#1e293b', rgb: '30 41 59' },
|
|
16
|
-
'900': { hex: '#0f172a', rgb: '15 23 42' }
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
label: 'gray',
|
|
21
|
-
shades: {
|
|
22
|
-
'50': { hex: '#f9fafb', rgb: '249 250 251' },
|
|
23
|
-
'100': { hex: '#f3f4f6', rgb: '243 244 246' },
|
|
24
|
-
'200': { hex: '#e5e7eb', rgb: '229 231 235' },
|
|
25
|
-
'300': { hex: '#d1d5db', rgb: '209 213 219' },
|
|
26
|
-
'400': { hex: '#9ca3af', rgb: '156 163 175' },
|
|
27
|
-
'500': { hex: '#6b7280', rgb: '107 114 128' },
|
|
28
|
-
'600': { hex: '#4b5563', rgb: '75 85 99' },
|
|
29
|
-
'700': { hex: '#374151', rgb: '55 65 81' },
|
|
30
|
-
'800': { hex: '#1f2937', rgb: '31 41 55' },
|
|
31
|
-
'900': { hex: '#111827', rgb: '17 24 39' }
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
label: 'zinc',
|
|
36
|
-
shades: {
|
|
37
|
-
'50': { hex: '#fafafa', rgb: '250 250 250' },
|
|
38
|
-
'100': { hex: '#f4f4f5', rgb: '244 244 245' },
|
|
39
|
-
'200': { hex: '#e4e4e7', rgb: '228 228 231' },
|
|
40
|
-
'300': { hex: '#d4d4d8', rgb: '212 212 216' },
|
|
41
|
-
'400': { hex: '#a1a1aa', rgb: '161 161 170' },
|
|
42
|
-
'500': { hex: '#71717a', rgb: '113 113 122' },
|
|
43
|
-
'600': { hex: '#52525b', rgb: '82 82 91' },
|
|
44
|
-
'700': { hex: '#3f3f46', rgb: '63 63 70' },
|
|
45
|
-
'800': { hex: '#27272a', rgb: '39 39 42' },
|
|
46
|
-
'900': { hex: '#18181b', rgb: '24 24 27' }
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
label: 'neutral',
|
|
51
|
-
shades: {
|
|
52
|
-
'50': { hex: '#fafafa', rgb: '250 250 250' },
|
|
53
|
-
'100': { hex: '#f5f5f5', rgb: '245 245 245' },
|
|
54
|
-
'200': { hex: '#e5e5e5', rgb: '229 229 229' },
|
|
55
|
-
'300': { hex: '#d4d4d4', rgb: '212 212 212' },
|
|
56
|
-
'400': { hex: '#a3a3a3', rgb: '163 163 163' },
|
|
57
|
-
'500': { hex: '#737373', rgb: '115 115 115' },
|
|
58
|
-
'600': { hex: '#525252', rgb: '82 82 82' },
|
|
59
|
-
'700': { hex: '#404040', rgb: '64 64 64' },
|
|
60
|
-
'800': { hex: '#262626', rgb: '38 38 38' },
|
|
61
|
-
'900': { hex: '#171717', rgb: '23 23 23' }
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
label: 'stone',
|
|
66
|
-
shades: {
|
|
67
|
-
'50': { hex: '#fafaf9', rgb: '250 250 249' },
|
|
68
|
-
'100': { hex: '#f5f5f4', rgb: '245 245 244' },
|
|
69
|
-
'200': { hex: '#e7e5e4', rgb: '231 229 228' },
|
|
70
|
-
'300': { hex: '#d6d3d1', rgb: '214 211 209' },
|
|
71
|
-
'400': { hex: '#a8a29e', rgb: '168 162 158' },
|
|
72
|
-
'500': { hex: '#78716c', rgb: '120 113 108' },
|
|
73
|
-
'600': { hex: '#57534e', rgb: '87 83 78' },
|
|
74
|
-
'700': { hex: '#44403c', rgb: '68 64 60' },
|
|
75
|
-
'800': { hex: '#292524', rgb: '41 37 36' },
|
|
76
|
-
'900': { hex: '#1c1917', rgb: '28 25 23' }
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
label: 'red',
|
|
81
|
-
shades: {
|
|
82
|
-
'50': { hex: '#fef2f2', rgb: '254 242 242' },
|
|
83
|
-
'100': { hex: '#fee2e2', rgb: '254 226 226' },
|
|
84
|
-
'200': { hex: '#fecaca', rgb: '254 202 202' },
|
|
85
|
-
'300': { hex: '#fca5a5', rgb: '252 165 165' },
|
|
86
|
-
'400': { hex: '#f87171', rgb: '248 113 113' },
|
|
87
|
-
'500': { hex: '#ef4444', rgb: '239 68 68' },
|
|
88
|
-
'600': { hex: '#dc2626', rgb: '220 38 38' },
|
|
89
|
-
'700': { hex: '#b91c1c', rgb: '185 28 28' },
|
|
90
|
-
'800': { hex: '#991b1b', rgb: '153 27 27' },
|
|
91
|
-
'900': { hex: '#7f1d1d', rgb: '127 29 29' }
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
label: 'orange',
|
|
96
|
-
shades: {
|
|
97
|
-
'50': { hex: '#fff7ed', rgb: '255 247 237' },
|
|
98
|
-
'100': { hex: '#ffedd5', rgb: '255 237 213' },
|
|
99
|
-
'200': { hex: '#fed7aa', rgb: '254 215 170' },
|
|
100
|
-
'300': { hex: '#fdba74', rgb: '253 186 116' },
|
|
101
|
-
'400': { hex: '#fb923c', rgb: '251 146 60' },
|
|
102
|
-
'500': { hex: '#f97316', rgb: '249 115 22' },
|
|
103
|
-
'600': { hex: '#ea580c', rgb: '234 88 12' },
|
|
104
|
-
'700': { hex: '#c2410c', rgb: '194 65 12' },
|
|
105
|
-
'800': { hex: '#9a3412', rgb: '154 52 18' },
|
|
106
|
-
'900': { hex: '#7c2d12', rgb: '124 45 18' }
|
|
107
|
-
}
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
label: 'amber',
|
|
111
|
-
shades: {
|
|
112
|
-
'50': { hex: '#fffbeb', rgb: '255 251 235' },
|
|
113
|
-
'100': { hex: '#fef3c7', rgb: '254 243 199' },
|
|
114
|
-
'200': { hex: '#fde68a', rgb: '253 230 138' },
|
|
115
|
-
'300': { hex: '#fcd34d', rgb: '252 211 77' },
|
|
116
|
-
'400': { hex: '#fbbf24', rgb: '251 191 36' },
|
|
117
|
-
'500': { hex: '#f59e0b', rgb: '245 158 11' },
|
|
118
|
-
'600': { hex: '#d97706', rgb: '217 119 6' },
|
|
119
|
-
'700': { hex: '#b45309', rgb: '180 83 9' },
|
|
120
|
-
'800': { hex: '#92400e', rgb: '146 64 14' },
|
|
121
|
-
'900': { hex: '#78350f', rgb: '120 53 15' }
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
label: 'yellow',
|
|
126
|
-
shades: {
|
|
127
|
-
'50': { hex: '#fefce8', rgb: '254 252 232' },
|
|
128
|
-
'100': { hex: '#fef9c3', rgb: '254 249 195' },
|
|
129
|
-
'200': { hex: '#fef08a', rgb: '254 240 138' },
|
|
130
|
-
'300': { hex: '#fde047', rgb: '253 224 71' },
|
|
131
|
-
'400': { hex: '#facc15', rgb: '250 204 21' },
|
|
132
|
-
'500': { hex: '#eab308', rgb: '234 179 8' },
|
|
133
|
-
'600': { hex: '#ca8a04', rgb: '202 138 4' },
|
|
134
|
-
'700': { hex: '#a16207', rgb: '161 98 7' },
|
|
135
|
-
'800': { hex: '#854d0e', rgb: '133 77 14' },
|
|
136
|
-
'900': { hex: '#713f12', rgb: '113 63 18' }
|
|
137
|
-
}
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
label: 'lime',
|
|
141
|
-
shades: {
|
|
142
|
-
'50': { hex: '#f7fee7', rgb: '247 254 231' },
|
|
143
|
-
'100': { hex: '#ecfccb', rgb: '236 252 203' },
|
|
144
|
-
'200': { hex: '#d9f99d', rgb: '217 249 157' },
|
|
145
|
-
'300': { hex: '#bef264', rgb: '190 242 100' },
|
|
146
|
-
'400': { hex: '#a3e635', rgb: '163 230 53' },
|
|
147
|
-
'500': { hex: '#84cc16', rgb: '132 204 22' },
|
|
148
|
-
'600': { hex: '#65a30d', rgb: '101 163 13' },
|
|
149
|
-
'700': { hex: '#4d7c0f', rgb: '77 124 15' },
|
|
150
|
-
'800': { hex: '#3f6212', rgb: '63 98 18' },
|
|
151
|
-
'900': { hex: '#365314', rgb: '54 83 20' }
|
|
152
|
-
}
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
label: 'green',
|
|
156
|
-
shades: {
|
|
157
|
-
'50': { hex: '#f0fdf4', rgb: '240 253 244' },
|
|
158
|
-
'100': { hex: '#dcfce7', rgb: '220 252 231' },
|
|
159
|
-
'200': { hex: '#bbf7d0', rgb: '187 247 208' },
|
|
160
|
-
'300': { hex: '#86efac', rgb: '134 239 172' },
|
|
161
|
-
'400': { hex: '#4ade80', rgb: '74 222 128' },
|
|
162
|
-
'500': { hex: '#22c55e', rgb: '34 197 94' },
|
|
163
|
-
'600': { hex: '#16a34a', rgb: '22 163 74' },
|
|
164
|
-
'700': { hex: '#15803d', rgb: '21 128 61' },
|
|
165
|
-
'800': { hex: '#166534', rgb: '22 101 52' },
|
|
166
|
-
'900': { hex: '#14532d', rgb: '20 83 45' }
|
|
167
|
-
}
|
|
168
|
-
},
|
|
169
|
-
{
|
|
170
|
-
label: 'emerald',
|
|
171
|
-
shades: {
|
|
172
|
-
'50': { hex: '#ecfdf5', rgb: '236 253 245' },
|
|
173
|
-
'100': { hex: '#d1fae5', rgb: '209 250 229' },
|
|
174
|
-
'200': { hex: '#a7f3d0', rgb: '167 243 208' },
|
|
175
|
-
'300': { hex: '#6ee7b7', rgb: '110 231 183' },
|
|
176
|
-
'400': { hex: '#34d399', rgb: '52 211 153' },
|
|
177
|
-
'500': { hex: '#10b981', rgb: '16 185 129' },
|
|
178
|
-
'600': { hex: '#059669', rgb: '5 150 105' },
|
|
179
|
-
'700': { hex: '#047857', rgb: '4 120 87' },
|
|
180
|
-
'800': { hex: '#065f46', rgb: '6 95 70' },
|
|
181
|
-
'900': { hex: '#064e3b', rgb: '6 78 59' }
|
|
182
|
-
}
|
|
183
|
-
},
|
|
184
|
-
{
|
|
185
|
-
label: 'teal',
|
|
186
|
-
shades: {
|
|
187
|
-
'50': { hex: '#f0fdfa', rgb: '240 253 250' },
|
|
188
|
-
'100': { hex: '#ccfbf1', rgb: '204 251 241' },
|
|
189
|
-
'200': { hex: '#99f6e4', rgb: '153 246 228' },
|
|
190
|
-
'300': { hex: '#5eead4', rgb: '94 234 212' },
|
|
191
|
-
'400': { hex: '#2dd4bf', rgb: '45 212 191' },
|
|
192
|
-
'500': { hex: '#14b8a6', rgb: '20 184 166' },
|
|
193
|
-
'600': { hex: '#0d9488', rgb: '13 148 136' },
|
|
194
|
-
'700': { hex: '#0f766e', rgb: '15 118 110' },
|
|
195
|
-
'800': { hex: '#115e59', rgb: '17 94 89' },
|
|
196
|
-
'900': { hex: '#134e4a', rgb: '19 78 74' }
|
|
197
|
-
}
|
|
198
|
-
},
|
|
199
|
-
{
|
|
200
|
-
label: 'cyan',
|
|
201
|
-
shades: {
|
|
202
|
-
'50': { hex: '#ecfeff', rgb: '236 254 255' },
|
|
203
|
-
'100': { hex: '#cffafe', rgb: '207 250 254' },
|
|
204
|
-
'200': { hex: '#a5f3fc', rgb: '165 243 252' },
|
|
205
|
-
'300': { hex: '#67e8f9', rgb: '103 232 249' },
|
|
206
|
-
'400': { hex: '#22d3ee', rgb: '34 211 238' },
|
|
207
|
-
'500': { hex: '#06b6d4', rgb: '6 182 212' },
|
|
208
|
-
'600': { hex: '#0891b2', rgb: '8 145 178' },
|
|
209
|
-
'700': { hex: '#0e7490', rgb: '14 116 144' },
|
|
210
|
-
'800': { hex: '#155e75', rgb: '21 94 117' },
|
|
211
|
-
'900': { hex: '#164e63', rgb: '22 78 99' }
|
|
212
|
-
}
|
|
213
|
-
},
|
|
214
|
-
{
|
|
215
|
-
label: 'sky',
|
|
216
|
-
shades: {
|
|
217
|
-
'50': { hex: '#f0f9ff', rgb: '240 249 255' },
|
|
218
|
-
'100': { hex: '#e0f2fe', rgb: '224 242 254' },
|
|
219
|
-
'200': { hex: '#bae6fd', rgb: '186 230 253' },
|
|
220
|
-
'300': { hex: '#7dd3fc', rgb: '125 211 252' },
|
|
221
|
-
'400': { hex: '#38bdf8', rgb: '56 189 248' },
|
|
222
|
-
'500': { hex: '#0ea5e9', rgb: '14 165 233' },
|
|
223
|
-
'600': { hex: '#0284c7', rgb: '2 132 199' },
|
|
224
|
-
'700': { hex: '#0369a1', rgb: '3 105 161' },
|
|
225
|
-
'800': { hex: '#075985', rgb: '7 89 133' },
|
|
226
|
-
'900': { hex: '#0c4a6e', rgb: '12 74 110' }
|
|
227
|
-
}
|
|
228
|
-
},
|
|
229
|
-
{
|
|
230
|
-
label: 'blue',
|
|
231
|
-
shades: {
|
|
232
|
-
'50': { hex: '#eff6ff', rgb: '239 246 255' },
|
|
233
|
-
'100': { hex: '#dbeafe', rgb: '219 234 254' },
|
|
234
|
-
'200': { hex: '#bfdbfe', rgb: '191 219 254' },
|
|
235
|
-
'300': { hex: '#93c5fd', rgb: '147 197 253' },
|
|
236
|
-
'400': { hex: '#60a5fa', rgb: '96 165 250' },
|
|
237
|
-
'500': { hex: '#3b82f6', rgb: '59 130 246' },
|
|
238
|
-
'600': { hex: '#2563eb', rgb: '37 99 235' },
|
|
239
|
-
'700': { hex: '#1d4ed8', rgb: '29 78 216' },
|
|
240
|
-
'800': { hex: '#1e40af', rgb: '30 64 175' },
|
|
241
|
-
'900': { hex: '#1e3a8a', rgb: '30 58 138' }
|
|
242
|
-
}
|
|
243
|
-
},
|
|
244
|
-
{
|
|
245
|
-
label: 'indigo',
|
|
246
|
-
shades: {
|
|
247
|
-
'50': { hex: '#eef2ff', rgb: '238 242 255' },
|
|
248
|
-
'100': { hex: '#e0e7ff', rgb: '224 231 255' },
|
|
249
|
-
'200': { hex: '#c7d2fe', rgb: '199 210 254' },
|
|
250
|
-
'300': { hex: '#a5b4fc', rgb: '165 180 252' },
|
|
251
|
-
'400': { hex: '#818cf8', rgb: '129 140 248' },
|
|
252
|
-
'500': { hex: '#6366f1', rgb: '99 102 241' },
|
|
253
|
-
'600': { hex: '#4f46e5', rgb: '79 70 229' },
|
|
254
|
-
'700': { hex: '#4338ca', rgb: '67 56 202' },
|
|
255
|
-
'800': { hex: '#3730a3', rgb: '55 48 163' },
|
|
256
|
-
'900': { hex: '#312e81', rgb: '49 46 129' }
|
|
257
|
-
}
|
|
258
|
-
},
|
|
259
|
-
{
|
|
260
|
-
label: 'violet',
|
|
261
|
-
shades: {
|
|
262
|
-
'50': { hex: '#f5f3ff', rgb: '245 243 255' },
|
|
263
|
-
'100': { hex: '#ede9fe', rgb: '237 233 254' },
|
|
264
|
-
'200': { hex: '#ddd6fe', rgb: '221 214 254' },
|
|
265
|
-
'300': { hex: '#c4b5fd', rgb: '196 181 253' },
|
|
266
|
-
'400': { hex: '#a78bfa', rgb: '167 139 250' },
|
|
267
|
-
'500': { hex: '#8b5cf6', rgb: '139 92 246' },
|
|
268
|
-
'600': { hex: '#7c3aed', rgb: '124 58 237' },
|
|
269
|
-
'700': { hex: '#6d28d9', rgb: '109 40 217' },
|
|
270
|
-
'800': { hex: '#5b21b6', rgb: '91 33 182' },
|
|
271
|
-
'900': { hex: '#4c1d95', rgb: '76 29 149' }
|
|
272
|
-
}
|
|
273
|
-
},
|
|
274
|
-
{
|
|
275
|
-
label: 'purple',
|
|
276
|
-
shades: {
|
|
277
|
-
'50': { hex: '#faf5ff', rgb: '250 245 255' },
|
|
278
|
-
'100': { hex: '#f3e8ff', rgb: '243 232 255' },
|
|
279
|
-
'200': { hex: '#e9d5ff', rgb: '233 213 255' },
|
|
280
|
-
'300': { hex: '#d8b4fe', rgb: '216 180 254' },
|
|
281
|
-
'400': { hex: '#c084fc', rgb: '192 132 252' },
|
|
282
|
-
'500': { hex: '#a855f7', rgb: '168 85 247' },
|
|
283
|
-
'600': { hex: '#9333ea', rgb: '147 51 234' },
|
|
284
|
-
'700': { hex: '#7e22ce', rgb: '126 34 206' },
|
|
285
|
-
'800': { hex: '#6b21a8', rgb: '107 33 168' },
|
|
286
|
-
'900': { hex: '#581c87', rgb: '88 28 135' }
|
|
287
|
-
}
|
|
288
|
-
},
|
|
289
|
-
{
|
|
290
|
-
label: 'fuchsia',
|
|
291
|
-
shades: {
|
|
292
|
-
'50': { hex: '#fdf4ff', rgb: '253 244 255' },
|
|
293
|
-
'100': { hex: '#fae8ff', rgb: '250 232 255' },
|
|
294
|
-
'200': { hex: '#f5d0fe', rgb: '245 208 254' },
|
|
295
|
-
'300': { hex: '#f0abfc', rgb: '240 171 252' },
|
|
296
|
-
'400': { hex: '#e879f9', rgb: '232 121 249' },
|
|
297
|
-
'500': { hex: '#d946ef', rgb: '217 70 239' },
|
|
298
|
-
'600': { hex: '#c026d3', rgb: '192 38 211' },
|
|
299
|
-
'700': { hex: '#a21caf', rgb: '162 28 175' },
|
|
300
|
-
'800': { hex: '#86198f', rgb: '134 25 143' },
|
|
301
|
-
'900': { hex: '#701a75', rgb: '112 26 117' }
|
|
302
|
-
}
|
|
303
|
-
},
|
|
304
|
-
{
|
|
305
|
-
label: 'pink',
|
|
306
|
-
shades: {
|
|
307
|
-
'50': { hex: '#fdf2f8', rgb: '253 242 248' },
|
|
308
|
-
'100': { hex: '#fce7f3', rgb: '252 231 243' },
|
|
309
|
-
'200': { hex: '#fbcfe8', rgb: '251 207 232' },
|
|
310
|
-
'300': { hex: '#f9a8d4', rgb: '249 168 212' },
|
|
311
|
-
'400': { hex: '#f472b6', rgb: '244 114 182' },
|
|
312
|
-
'500': { hex: '#ec4899', rgb: '236 72 153' },
|
|
313
|
-
'600': { hex: '#db2777', rgb: '219 39 119' },
|
|
314
|
-
'700': { hex: '#be185d', rgb: '190 24 93' },
|
|
315
|
-
'800': { hex: '#9d174d', rgb: '157 23 77' },
|
|
316
|
-
'900': { hex: '#831843', rgb: '131 24 67' }
|
|
317
|
-
}
|
|
318
|
-
},
|
|
319
|
-
{
|
|
320
|
-
label: 'rose',
|
|
321
|
-
shades: {
|
|
322
|
-
'50': { hex: '#fff1f2', rgb: '255 241 242' },
|
|
323
|
-
'100': { hex: '#ffe4e6', rgb: '255 228 230' },
|
|
324
|
-
'200': { hex: '#fecdd3', rgb: '254 205 211' },
|
|
325
|
-
'300': { hex: '#fda4af', rgb: '253 164 175' },
|
|
326
|
-
'400': { hex: '#fb7185', rgb: '251 113 133' },
|
|
327
|
-
'500': { hex: '#f43f5e', rgb: '244 63 94' },
|
|
328
|
-
'600': { hex: '#e11d48', rgb: '225 29 72' },
|
|
329
|
-
'700': { hex: '#be123c', rgb: '190 18 60' },
|
|
330
|
-
'800': { hex: '#9f1239', rgb: '159 18 57' },
|
|
331
|
-
'900': { hex: '#881337', rgb: '136 19 55' }
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
];
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
<script>export let files = void 0;
|
|
2
|
-
export let fileInput = void 0;
|
|
3
|
-
export let name;
|
|
4
|
-
export let width = "";
|
|
5
|
-
export let button = "btn variant-filled";
|
|
6
|
-
function onButtonClick() {
|
|
7
|
-
if (fileInput)
|
|
8
|
-
fileInput.click();
|
|
9
|
-
}
|
|
10
|
-
function prunedRestProps() {
|
|
11
|
-
delete $$restProps.class;
|
|
12
|
-
return $$restProps;
|
|
13
|
-
}
|
|
14
|
-
$:
|
|
15
|
-
classesBase = `${$$props.class ?? ""}`;
|
|
16
|
-
$:
|
|
17
|
-
classesButton = `${button} ${width}`;
|
|
18
|
-
</script>
|
|
19
|
-
|
|
20
|
-
<div class="file-button {classesBase}" data-testid="file-button">
|
|
21
|
-
<!-- NOTE: Don't use `hidden` as it prevents `required` from operating -->
|
|
22
|
-
<div class="w-0 h-0 overflow-hidden">
|
|
23
|
-
<input type="file" bind:this={fileInput} bind:files {name} {...prunedRestProps()} on:change />
|
|
24
|
-
</div>
|
|
25
|
-
<!-- Button -->
|
|
26
|
-
<button
|
|
27
|
-
type="button"
|
|
28
|
-
class="file-button-btn {classesButton}"
|
|
29
|
-
disabled={$$restProps.disabled}
|
|
30
|
-
on:click={onButtonClick}
|
|
31
|
-
on:keydown
|
|
32
|
-
on:keyup
|
|
33
|
-
on:keypress
|
|
34
|
-
>
|
|
35
|
-
<slot>Select a File</slot>
|
|
36
|
-
</button>
|
|
37
|
-
</div>
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
declare const __propDef: {
|
|
3
|
-
props: {
|
|
4
|
-
[x: string]: any;
|
|
5
|
-
/** Bind FileList to the file input.*/
|
|
6
|
-
files?: FileList | undefined;
|
|
7
|
-
/** File input reference.*/
|
|
8
|
-
fileInput?: HTMLInputElement | undefined;
|
|
9
|
-
/** Required. Set a unique name for the file input.*/
|
|
10
|
-
name: string;
|
|
11
|
-
/** Provide classes to set the width.*/
|
|
12
|
-
width?: string | undefined;
|
|
13
|
-
/** Provide a button variant or other class styles.*/
|
|
14
|
-
button?: string | undefined;
|
|
15
|
-
};
|
|
16
|
-
events: {
|
|
17
|
-
change: Event;
|
|
18
|
-
keydown: KeyboardEvent;
|
|
19
|
-
keyup: KeyboardEvent;
|
|
20
|
-
keypress: KeyboardEvent;
|
|
21
|
-
} & {
|
|
22
|
-
[evt: string]: CustomEvent<any>;
|
|
23
|
-
};
|
|
24
|
-
slots: {
|
|
25
|
-
default: {};
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
export type FileButtonProps = typeof __propDef.props;
|
|
29
|
-
export type FileButtonEvents = typeof __propDef.events;
|
|
30
|
-
export type FileButtonSlots = typeof __propDef.slots;
|
|
31
|
-
export default class FileButton extends SvelteComponentTyped<FileButtonProps, FileButtonEvents, FileButtonSlots> {
|
|
32
|
-
}
|
|
33
|
-
export {};
|