@skeletonlabs/skeleton 0.92.2 → 0.99.5
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/components/Accordion/AccordionGroup.svelte +22 -35
- package/components/Accordion/AccordionItem.svelte +24 -40
- package/components/AppBar/AppBar.svelte +22 -38
- package/components/AppRail/AppRail.svelte +18 -39
- package/components/AppRail/AppRailTile.svelte +23 -37
- package/components/AppShell/AppShell.svelte +28 -38
- package/components/Avatar/Avatar.svelte +16 -33
- package/components/ConicGradient/ConicGradient.svelte +28 -44
- package/components/FileButton/FileButton.svelte +14 -11
- package/components/FileDropzone/FileDropzone.svelte +26 -46
- package/components/InputChip/InputChip.svelte +39 -69
- package/components/InputChip/InputChip.svelte.d.ts +0 -1
- package/components/ListBox/ListBox.svelte +27 -47
- package/components/ListBox/ListBoxItem.svelte +36 -52
- package/components/Paginator/Paginator.svelte +25 -41
- package/components/ProgressBar/ProgressBar.svelte +18 -30
- package/components/ProgressRadial/ProgressRadial.svelte +18 -36
- package/components/Radio/RadioGroup.svelte +23 -42
- package/components/Radio/RadioItem.svelte +24 -36
- package/components/RangeSlider/RangeSlider.svelte +17 -40
- package/components/SlideToggle/SlideToggle.svelte +42 -54
- package/components/Stepper/Step.svelte +57 -65
- package/components/Stepper/Stepper.svelte +30 -51
- package/components/SvgIcon/SvgIcon.svelte +11 -23
- package/components/Tab/Tab.svelte +30 -45
- package/components/Tab/TabGroup.svelte +30 -48
- package/components/Table/Table.svelte +20 -36
- package/components/TableOfContents/TableOfContents.svelte +62 -94
- package/index.d.ts +0 -5
- package/index.js +0 -5
- package/package.json +26 -25
- package/styles/all.css +3 -0
- package/styles/core.css +11 -2
- package/styles/elements/alerts.css +2 -28
- package/styles/elements/badges.css +0 -25
- package/styles/elements/breadcrumbs.css +3 -3
- package/styles/elements/buttons.css +32 -117
- package/styles/elements/cards.css +2 -29
- package/styles/elements/chips.css +9 -58
- package/styles/elements/lists.css +4 -3
- package/styles/elements/logo-clouds.css +2 -4
- package/styles/elements/tables.css +14 -10
- package/styles/forms.css +130 -113
- package/styles/tailwind.css +7 -3
- package/styles/typography.css +46 -62
- package/styles/variants.css +154 -0
- package/tailwind/core.cjs +37 -0
- package/tailwind/core.d.cts +5 -0
- package/tailwind/generated/intellisense-classes.cjs +1 -0
- package/tailwind/generated/{allComponents.d.cts → intellisense-classes.d.cts} +731 -931
- package/tailwind/intellisense.cjs +21 -0
- package/tailwind/intellisense.d.cts +5 -0
- package/tailwind/settings.cjs +16 -16
- package/tailwind/skeleton.cjs +13 -44
- package/tailwind/skeleton.d.cts +4 -2
- package/tailwind/theme/colors.cjs +7 -7
- package/tailwind/tokens/backgrounds.cjs +28 -30
- package/tailwind/tokens/border-radius.cjs +15 -15
- package/tailwind/tokens/borders.cjs +14 -14
- package/tailwind/tokens/fills.cjs +14 -14
- package/tailwind/tokens/rings.cjs +40 -32
- package/tailwind/tokens/rings.d.cts +5 -0
- package/tailwind/tokens/text.cjs +24 -26
- package/themes/theme-skeleton.css +6 -6
- package/utilities/CodeBlock/CodeBlock.svelte +26 -40
- package/utilities/DataTable/DataTable.js +1 -1
- package/utilities/Drawer/Drawer.svelte +82 -105
- package/utilities/LightSwitch/LightSwitch.svelte +32 -50
- package/utilities/LightSwitch/LightSwitch.svelte.d.ts +1 -1
- package/utilities/Modal/Modal.svelte +57 -92
- package/utilities/Modal/examples/ModalExampleEmbed.svelte +3 -6
- package/utilities/Modal/examples/ModalExampleForm.svelte +13 -19
- package/utilities/Modal/examples/ModalExampleImage.svelte +19 -0
- package/utilities/Modal/examples/ModalExampleImage.svelte.d.ts +16 -0
- package/utilities/Modal/examples/ModalExampleList.svelte +7 -10
- package/utilities/Toast/Toast.svelte +64 -86
- package/utilities/Toast/stores.js +13 -4
- package/components/Alert/Alert.svelte +0 -65
- package/components/Alert/Alert.svelte.d.ts +0 -30
- package/components/Breadcrumb/Breadcrumb.svelte +0 -24
- package/components/Breadcrumb/Breadcrumb.svelte.d.ts +0 -21
- package/components/Breadcrumb/Crumb.svelte +0 -37
- package/components/Breadcrumb/Crumb.svelte.d.ts +0 -26
- package/components/Divider/Divider.svelte +0 -21
- package/components/Divider/Divider.svelte.d.ts +0 -22
- package/components/GradientHeading/GradientHeading.svelte +0 -21
- package/components/GradientHeading/GradientHeading.svelte.d.ts +0 -22
- package/tailwind/generated/allComponents.cjs +0 -1
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
<script>import { writable } from
|
|
2
|
-
import { ListBox, ListBoxItem, modalStore } from
|
|
3
|
-
// Props
|
|
4
|
-
/** Exposes parent props to this component. */
|
|
1
|
+
<script>import { writable } from "svelte/store";
|
|
2
|
+
import { ListBox, ListBoxItem, modalStore } from "../../../index.ts";
|
|
5
3
|
export let parent;
|
|
6
|
-
const storeFlavor = writable(
|
|
4
|
+
const storeFlavor = writable("chocolate");
|
|
7
5
|
function onFormSubmit() {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
if ($modalStore[0].response)
|
|
7
|
+
$modalStore[0].response($storeFlavor);
|
|
8
|
+
modalStore.close();
|
|
11
9
|
}
|
|
12
|
-
|
|
13
|
-
const cBase = 'space-y-4';
|
|
10
|
+
const cBase = "space-y-4";
|
|
14
11
|
</script>
|
|
15
12
|
|
|
16
13
|
<!-- @component This example creates a simple form modal. -->
|
|
@@ -1,97 +1,75 @@
|
|
|
1
|
-
<script>import { fly } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
// Props
|
|
5
|
-
/** Set the toast position.
|
|
6
|
-
* @type {'t' | 'b' | 'l' | 'r' | 'tl' | 'tr' | 'bl' | 'br'}
|
|
7
|
-
*/
|
|
8
|
-
export let position = 'b';
|
|
9
|
-
/** Maximum toasts that can show at once. */
|
|
1
|
+
<script>import { fly } from "svelte/transition";
|
|
2
|
+
import { toastStore } from "./stores";
|
|
3
|
+
export let position = "b";
|
|
10
4
|
export let max = 3;
|
|
11
|
-
/** The duration of the fly in/out animation. */
|
|
12
5
|
export let duration = 150;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export let
|
|
16
|
-
|
|
17
|
-
export let
|
|
18
|
-
|
|
19
|
-
export let
|
|
20
|
-
|
|
21
|
-
export let
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
export let rounded = 'rounded-container-token';
|
|
26
|
-
/** Provide classes to set the border box shadow. */
|
|
27
|
-
export let shadow = 'shadow-lg';
|
|
28
|
-
// Props (buttons)
|
|
29
|
-
/** Provide action button styles. */
|
|
30
|
-
export let buttonAction = 'btn-filled';
|
|
31
|
-
/** Provide dismiss button styles. */
|
|
32
|
-
export let buttonDismiss = 'btn-filled';
|
|
33
|
-
// Base Classes
|
|
34
|
-
const cWrapper = 'flex fixed top-0 left-0 right-0 bottom-0 z-[888] pointer-events-none';
|
|
35
|
-
const cSnackbar = 'flex flex-col space-y-2';
|
|
36
|
-
const cToast = 'flex justify-between items-center pointer-events-auto';
|
|
37
|
-
// Local
|
|
6
|
+
export let background = "bg-secondary-500";
|
|
7
|
+
export let width = "max-w-[640px]";
|
|
8
|
+
export let color = "text-on-secondary-token";
|
|
9
|
+
export let padding = "p-4";
|
|
10
|
+
export let spacing = "space-x-4";
|
|
11
|
+
export let rounded = "rounded-container-token";
|
|
12
|
+
export let shadow = "shadow-lg";
|
|
13
|
+
export let buttonAction = "variant-filled";
|
|
14
|
+
export let buttonDismiss = "variant-filled";
|
|
15
|
+
const cWrapper = "flex fixed top-0 left-0 right-0 bottom-0 z-[888] pointer-events-none";
|
|
16
|
+
const cSnackbar = "flex flex-col space-y-2";
|
|
17
|
+
const cToast = "flex justify-between items-center pointer-events-auto";
|
|
38
18
|
let cPosition;
|
|
39
|
-
let cAlign;
|
|
19
|
+
let cAlign;
|
|
40
20
|
let animAxis = { x: 0, y: 0 };
|
|
41
|
-
// Set Position
|
|
42
|
-
// prettier-ignore
|
|
43
21
|
switch (position) {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
animAxis = { x: 100, y: 0 };
|
|
85
|
-
break;
|
|
22
|
+
case "t":
|
|
23
|
+
cPosition = "justify-center items-start";
|
|
24
|
+
cAlign = "items-center";
|
|
25
|
+
animAxis = { x: 0, y: -100 };
|
|
26
|
+
break;
|
|
27
|
+
case "b":
|
|
28
|
+
cPosition = "justify-center items-end";
|
|
29
|
+
cAlign = "items-center";
|
|
30
|
+
animAxis = { x: 0, y: 100 };
|
|
31
|
+
break;
|
|
32
|
+
case "l":
|
|
33
|
+
cPosition = "justify-start items-center";
|
|
34
|
+
cAlign = "items-start";
|
|
35
|
+
animAxis = { x: -100, y: 0 };
|
|
36
|
+
break;
|
|
37
|
+
case "r":
|
|
38
|
+
cPosition = "justify-end items-center";
|
|
39
|
+
cAlign = "items-end";
|
|
40
|
+
animAxis = { x: 100, y: 0 };
|
|
41
|
+
break;
|
|
42
|
+
case "tl":
|
|
43
|
+
cPosition = "justify-start items-start";
|
|
44
|
+
cAlign = "items-start";
|
|
45
|
+
animAxis = { x: -100, y: 0 };
|
|
46
|
+
break;
|
|
47
|
+
case "tr":
|
|
48
|
+
cPosition = "justify-end items-start";
|
|
49
|
+
cAlign = "items-end";
|
|
50
|
+
animAxis = { x: 100, y: 0 };
|
|
51
|
+
break;
|
|
52
|
+
case "bl":
|
|
53
|
+
cPosition = "justify-start items-end";
|
|
54
|
+
cAlign = "items-start";
|
|
55
|
+
animAxis = { x: -100, y: 0 };
|
|
56
|
+
break;
|
|
57
|
+
case "br":
|
|
58
|
+
cPosition = "justify-end items-end";
|
|
59
|
+
cAlign = "items-end";
|
|
60
|
+
animAxis = { x: 100, y: 0 };
|
|
61
|
+
break;
|
|
86
62
|
}
|
|
87
63
|
function onAction(index) {
|
|
88
|
-
|
|
89
|
-
|
|
64
|
+
$toastStore[index]?.action?.response();
|
|
65
|
+
toastStore.close($toastStore[index].id);
|
|
90
66
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
$:
|
|
94
|
-
|
|
67
|
+
$:
|
|
68
|
+
classesWrapper = `${cWrapper} ${cPosition} ${$$props.class || ""}`;
|
|
69
|
+
$:
|
|
70
|
+
classesSnackbar = `${cSnackbar} ${cAlign} ${padding}`;
|
|
71
|
+
$:
|
|
72
|
+
classesBase = `${cToast} ${background} ${width} ${color} ${padding} ${spacing} ${rounded} ${shadow}`;
|
|
95
73
|
</script>
|
|
96
74
|
|
|
97
75
|
{#if $toastStore.length}
|
|
@@ -26,16 +26,25 @@ function toastService() {
|
|
|
26
26
|
// prettier-ignore
|
|
27
27
|
switch (toast.preset) {
|
|
28
28
|
// Success/Error
|
|
29
|
+
// IMPORTANT: use full class names here. Do not construct the classes.
|
|
30
|
+
case ('primary'):
|
|
31
|
+
classes += '!bg-primary-500 text-on-primary-token';
|
|
32
|
+
break;
|
|
33
|
+
case ('secondary'):
|
|
34
|
+
classes += '!bg-secondary-500 text-on-secondary-token';
|
|
35
|
+
break;
|
|
36
|
+
case ('tertiary'):
|
|
37
|
+
classes += '!bg-tertiary-500 text-on-tertiary-token';
|
|
38
|
+
break;
|
|
29
39
|
case ('success'):
|
|
30
40
|
classes += '!bg-success-500 text-on-success-token';
|
|
31
41
|
break;
|
|
42
|
+
case ('warning'):
|
|
43
|
+
classes += '!bg-warning-500 text-on-warning-token';
|
|
44
|
+
break;
|
|
32
45
|
case ('error'):
|
|
33
46
|
classes += '!bg-error-500 text-on-error-token';
|
|
34
47
|
break;
|
|
35
|
-
// Theme
|
|
36
|
-
default:
|
|
37
|
-
classes += `!bg-${toast.preset}-500 text-on-${toast.preset}-token`;
|
|
38
|
-
break;
|
|
39
48
|
}
|
|
40
49
|
// Merge into store
|
|
41
50
|
const tMerged = { ...toastDefaults, ...toast, id, classes };
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
<script>//Slots
|
|
2
|
-
/**
|
|
3
|
-
* @slot lead - Provide a leading element, such as an icon.
|
|
4
|
-
* @slot content - Provide the alert message text.
|
|
5
|
-
* @slot trail - Provide a trailing element, such as a call to action.
|
|
6
|
-
* @slot title - Provide the alert title text.
|
|
7
|
-
*/
|
|
8
|
-
import { fade } from 'svelte/transition';
|
|
9
|
-
// Props
|
|
10
|
-
/** Control visibility of the alert. */
|
|
11
|
-
export let visible = true;
|
|
12
|
-
/** Provide classes to set background color. */
|
|
13
|
-
export let background = 'bg-warning-500/20';
|
|
14
|
-
/** Provide classes to set the border styles. */
|
|
15
|
-
export let border = 'border border-warning-500';
|
|
16
|
-
/** Provide classes to set text color. */
|
|
17
|
-
export let color = '';
|
|
18
|
-
/** Provide classes to set border radius. */
|
|
19
|
-
export let rounded = 'rounded-container-token';
|
|
20
|
-
/** Svelte fade transition duration. Set 0 to disable. */
|
|
21
|
-
export let duration = 200; // ms
|
|
22
|
-
// Props (regions)
|
|
23
|
-
/** Classes to be applied to the lead slot region. */
|
|
24
|
-
export let slotLead = '';
|
|
25
|
-
/** Classes to be applied to the content slot region. */
|
|
26
|
-
export let slotContent = '';
|
|
27
|
-
/** Classes to be applied to the trail slot region. */
|
|
28
|
-
export let slotTrail = '';
|
|
29
|
-
// Base Classes
|
|
30
|
-
let cBaseCard = 'flex flex-col items-start lg:items-center lg:flex-row p-5 space-y-4 lg:space-y-0 lg:space-x-4';
|
|
31
|
-
let cLead = 'flex justify-center items-center';
|
|
32
|
-
let cContent = 'flex flex-col w-full justify-center space-y-2';
|
|
33
|
-
let cTrail = 'flex items-center space-x-4';
|
|
34
|
-
// Reactive Classes
|
|
35
|
-
$: classesCard = `${cBaseCard} ${background} ${border} ${color} ${rounded} ${$$props.class ?? ''}`;
|
|
36
|
-
$: classesLead = `${cLead} ${slotLead}`;
|
|
37
|
-
$: classesContent = `${cContent} ${slotContent}`;
|
|
38
|
-
$: classesTrail = `${cTrail} ${slotTrail}`;
|
|
39
|
-
</script>
|
|
40
|
-
|
|
41
|
-
{#if visible}
|
|
42
|
-
<div class="alert {classesCard}" transition:fade|local={{ duration }} data-testid="alert" role="alert" aria-live="polite">
|
|
43
|
-
<!-- Slot: Lead -->
|
|
44
|
-
{#if $$slots.lead}
|
|
45
|
-
<section class="alert-lead {classesLead}">
|
|
46
|
-
<slot name="lead" />
|
|
47
|
-
</section>
|
|
48
|
-
{/if}
|
|
49
|
-
|
|
50
|
-
<!-- Content -->
|
|
51
|
-
<section class="alert-content {classesContent}">
|
|
52
|
-
<!-- Slot: Title -->
|
|
53
|
-
{#if $$slots.title}<h3 class="alert-title"><slot name="title" /></h3>{/if}
|
|
54
|
-
<!-- Slot: Default -->
|
|
55
|
-
{#if $$slots.default}<div class="alert-message {color}"><slot /></div>{/if}
|
|
56
|
-
</section>
|
|
57
|
-
|
|
58
|
-
<!-- Slot: Trail -->
|
|
59
|
-
{#if $$slots.trail}
|
|
60
|
-
<section class="alert-trail {classesTrail}">
|
|
61
|
-
<slot name="trail" />
|
|
62
|
-
</section>
|
|
63
|
-
{/if}
|
|
64
|
-
</div>
|
|
65
|
-
{/if}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
declare const __propDef: {
|
|
3
|
-
props: {
|
|
4
|
-
[x: string]: any;
|
|
5
|
-
visible?: boolean | undefined;
|
|
6
|
-
background?: string | undefined;
|
|
7
|
-
border?: string | undefined;
|
|
8
|
-
color?: string | undefined;
|
|
9
|
-
rounded?: string | undefined;
|
|
10
|
-
duration?: number | undefined;
|
|
11
|
-
slotLead?: string | undefined;
|
|
12
|
-
slotContent?: string | undefined;
|
|
13
|
-
slotTrail?: string | undefined;
|
|
14
|
-
};
|
|
15
|
-
events: {
|
|
16
|
-
[evt: string]: CustomEvent<any>;
|
|
17
|
-
};
|
|
18
|
-
slots: {
|
|
19
|
-
lead: {};
|
|
20
|
-
title: {};
|
|
21
|
-
default: {};
|
|
22
|
-
trail: {};
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
export type AlertProps = typeof __propDef.props;
|
|
26
|
-
export type AlertEvents = typeof __propDef.events;
|
|
27
|
-
export type AlertSlots = typeof __propDef.slots;
|
|
28
|
-
export default class Alert extends SvelteComponentTyped<AlertProps, AlertEvents, AlertSlots> {
|
|
29
|
-
}
|
|
30
|
-
export {};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
<script>import { setContext } from 'svelte';
|
|
2
|
-
// Props
|
|
3
|
-
/** Accepts text or HTML and defines the crumb seperator. */
|
|
4
|
-
export let separator = '›';
|
|
5
|
-
/** Provide classes to set text size. */
|
|
6
|
-
export let text = '';
|
|
7
|
-
// Props (A11y)
|
|
8
|
-
/** A semantic ARIA label. */
|
|
9
|
-
export let label = 'breadcrumb';
|
|
10
|
-
// Context
|
|
11
|
-
setContext('separator', separator);
|
|
12
|
-
// Base Classes
|
|
13
|
-
const cBase = '';
|
|
14
|
-
const cList = 'flex align-center space-x-4';
|
|
15
|
-
// Reactive Classes
|
|
16
|
-
$: classesBase = `${cBase} ${$$props.class ?? ''}`;
|
|
17
|
-
$: classesList = `${cList} ${text}`;
|
|
18
|
-
</script>
|
|
19
|
-
|
|
20
|
-
<nav class="breadcrumb {classesBase}" data-testid="breadcrumb" aria-label={label}>
|
|
21
|
-
<ol class="breadcrumb-list {classesList}">
|
|
22
|
-
<slot />
|
|
23
|
-
</ol>
|
|
24
|
-
</nav>
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
declare const __propDef: {
|
|
3
|
-
props: {
|
|
4
|
-
[x: string]: any;
|
|
5
|
-
separator?: string | undefined;
|
|
6
|
-
text?: string | undefined;
|
|
7
|
-
label?: string | undefined;
|
|
8
|
-
};
|
|
9
|
-
events: {
|
|
10
|
-
[evt: string]: CustomEvent<any>;
|
|
11
|
-
};
|
|
12
|
-
slots: {
|
|
13
|
-
default: {};
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
export type BreadcrumbProps = typeof __propDef.props;
|
|
17
|
-
export type BreadcrumbEvents = typeof __propDef.events;
|
|
18
|
-
export type BreadcrumbSlots = typeof __propDef.slots;
|
|
19
|
-
export default class Breadcrumb extends SvelteComponentTyped<BreadcrumbProps, BreadcrumbEvents, BreadcrumbSlots> {
|
|
20
|
-
}
|
|
21
|
-
export {};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
<script>// Slots
|
|
2
|
-
/** @slot lead - A leading slot intended for icons. */
|
|
3
|
-
import { getContext } from 'svelte';
|
|
4
|
-
// Props
|
|
5
|
-
/** Provide classes set the current page text color. */
|
|
6
|
-
export let color = '';
|
|
7
|
-
// Context
|
|
8
|
-
export let separator = getContext('separator');
|
|
9
|
-
// Local
|
|
10
|
-
const tag = $$props.href ? 'a' : 'span';
|
|
11
|
-
// Base Classes
|
|
12
|
-
const cBase = 'flex items-center space-x-4';
|
|
13
|
-
const cAnchor = 'flex justify-center items-center space-x-2';
|
|
14
|
-
const cSeperator = 'font-bold flex fill-surface-500 text-surface-500 w-2';
|
|
15
|
-
// Reactive Classes
|
|
16
|
-
$: classesBase = `${cBase} ${color} ${$$props.class ?? ''}`;
|
|
17
|
-
</script>
|
|
18
|
-
|
|
19
|
-
<!-- NOTE: avoid forwarding events on <svelte:element> tags -->
|
|
20
|
-
<!-- https://github.com/skeletonlabs/skeleton/issues/727#issuecomment-1356859261 -->
|
|
21
|
-
<li class="crumb {classesBase}" data-testid="crumb" on:click on:keydown on:keyup on:keypress>
|
|
22
|
-
<!-- Anchor -->
|
|
23
|
-
<svelte:element
|
|
24
|
-
this={tag}
|
|
25
|
-
href={$$props.href}
|
|
26
|
-
class="crumb-anchor {cAnchor}"
|
|
27
|
-
data-testid="crumb-anchor"
|
|
28
|
-
aria-current={!$$props.href ? 'page' : undefined}
|
|
29
|
-
>
|
|
30
|
-
{#if $$slots.lead}<span class="crumb-lead"><slot name="lead" /></span>{/if}
|
|
31
|
-
<span class="crumb-text"><slot /></span>
|
|
32
|
-
</svelte:element>
|
|
33
|
-
<!-- Seperator -->
|
|
34
|
-
{#if $$props.href}
|
|
35
|
-
<div class="crumb-seperator {cSeperator}">{@html separator}</div>
|
|
36
|
-
{/if}
|
|
37
|
-
</li>
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
declare const __propDef: {
|
|
3
|
-
props: {
|
|
4
|
-
[x: string]: any;
|
|
5
|
-
color?: string | undefined;
|
|
6
|
-
separator?: string | undefined;
|
|
7
|
-
};
|
|
8
|
-
events: {
|
|
9
|
-
click: MouseEvent;
|
|
10
|
-
keydown: KeyboardEvent;
|
|
11
|
-
keyup: KeyboardEvent;
|
|
12
|
-
keypress: KeyboardEvent;
|
|
13
|
-
} & {
|
|
14
|
-
[evt: string]: CustomEvent<any>;
|
|
15
|
-
};
|
|
16
|
-
slots: {
|
|
17
|
-
lead: {};
|
|
18
|
-
default: {};
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
export type CrumbProps = typeof __propDef.props;
|
|
22
|
-
export type CrumbEvents = typeof __propDef.events;
|
|
23
|
-
export type CrumbSlots = typeof __propDef.slots;
|
|
24
|
-
export default class Crumb extends SvelteComponentTyped<CrumbProps, CrumbEvents, CrumbSlots> {
|
|
25
|
-
}
|
|
26
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
<script>// Props
|
|
2
|
-
/** When enabled, sets the width to zero and height to full. */
|
|
3
|
-
export let vertical = false;
|
|
4
|
-
/** Provide classes to set the border width. */
|
|
5
|
-
export let borderWidth = 'border-t';
|
|
6
|
-
/** Provide classes to set the border style. */
|
|
7
|
-
export let borderStyle = 'border-solid';
|
|
8
|
-
/** Provide classes to set the border color. */
|
|
9
|
-
export let borderColor = 'border-surface-300-600-token';
|
|
10
|
-
/** Provide classes to set the margin. */
|
|
11
|
-
export let margin = 'm-0';
|
|
12
|
-
/** Provide classes to set opacity. */
|
|
13
|
-
export let opacity = 'opacity-full';
|
|
14
|
-
// Base Classes
|
|
15
|
-
const cBaseDivider = `block`;
|
|
16
|
-
// Reactive Classes
|
|
17
|
-
$: classesOrientation = vertical === true ? 'w-0 h-full min-h-[24px]' : 'w-full h-0';
|
|
18
|
-
$: classesDivider = `${cBaseDivider} ${classesOrientation} ${borderWidth} ${borderStyle} ${borderColor} ${margin} ${opacity} ${$$props.class ?? ''}`;
|
|
19
|
-
</script>
|
|
20
|
-
|
|
21
|
-
<hr class="divider {classesDivider}" data-testid="divider" />
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
declare const __propDef: {
|
|
3
|
-
props: {
|
|
4
|
-
[x: string]: any;
|
|
5
|
-
vertical?: boolean | undefined;
|
|
6
|
-
borderWidth?: string | undefined;
|
|
7
|
-
borderStyle?: string | undefined;
|
|
8
|
-
borderColor?: string | undefined;
|
|
9
|
-
margin?: string | undefined;
|
|
10
|
-
opacity?: string | undefined;
|
|
11
|
-
};
|
|
12
|
-
events: {
|
|
13
|
-
[evt: string]: CustomEvent<any>;
|
|
14
|
-
};
|
|
15
|
-
slots: {};
|
|
16
|
-
};
|
|
17
|
-
export type DividerProps = typeof __propDef.props;
|
|
18
|
-
export type DividerEvents = typeof __propDef.events;
|
|
19
|
-
export type DividerSlots = typeof __propDef.slots;
|
|
20
|
-
export default class Divider extends SvelteComponentTyped<DividerProps, DividerEvents, DividerSlots> {
|
|
21
|
-
}
|
|
22
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
<script>/** Define the semantic element tag. */
|
|
2
|
-
export let tag = 'h1';
|
|
3
|
-
/** Provide classes to set gradient direction. */
|
|
4
|
-
export let direction = 'bg-gradient-to-r';
|
|
5
|
-
/** Provide classes to set "from" gradient color. */
|
|
6
|
-
export let from = 'from-primary-500';
|
|
7
|
-
/** Provide classes to set "to" gradient color. */
|
|
8
|
-
export let to = 'to-secondary-500';
|
|
9
|
-
// Base Clases
|
|
10
|
-
let cBaseHeading = 'bg-clip-text text-transparent box-decoration-clone';
|
|
11
|
-
// Reactive
|
|
12
|
-
$: classesBase = `${$$props.class ?? ''}`;
|
|
13
|
-
$: clasesText = `${cBaseHeading} ${direction} ${from} ${to}`;
|
|
14
|
-
</script>
|
|
15
|
-
|
|
16
|
-
<!-- svelte-ignore a11y-role-has-required-aria-props-->
|
|
17
|
-
<svelte:element this={tag} class="gradient-heading {classesBase}" data-testid="gradient-heading" role="heading">
|
|
18
|
-
<span class="gradient-heading-text {clasesText}">
|
|
19
|
-
<slot />
|
|
20
|
-
</span>
|
|
21
|
-
</svelte:element>
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
declare const __propDef: {
|
|
3
|
-
props: {
|
|
4
|
-
[x: string]: any;
|
|
5
|
-
tag?: string | undefined;
|
|
6
|
-
direction?: string | undefined;
|
|
7
|
-
from?: string | undefined;
|
|
8
|
-
to?: string | undefined;
|
|
9
|
-
};
|
|
10
|
-
events: {
|
|
11
|
-
[evt: string]: CustomEvent<any>;
|
|
12
|
-
};
|
|
13
|
-
slots: {
|
|
14
|
-
default: {};
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
export type GradientHeadingProps = typeof __propDef.props;
|
|
18
|
-
export type GradientHeadingEvents = typeof __propDef.events;
|
|
19
|
-
export type GradientHeadingSlots = typeof __propDef.slots;
|
|
20
|
-
export default class GradientHeading extends SvelteComponentTyped<GradientHeadingProps, GradientHeadingEvents, GradientHeadingSlots> {
|
|
21
|
-
}
|
|
22
|
-
export {};
|