@skeletonlabs/skeleton 0.80.9 → 0.92.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/README.md +1 -1
- package/components/Accordion/AccordionGroup.svelte +1 -2
- package/components/Accordion/AccordionItem.svelte +6 -3
- package/components/Accordion/AccordionItem.svelte.d.ts +1 -0
- package/components/Alert/Alert.svelte +3 -3
- package/components/AppRail/AppRailTile.svelte +8 -6
- package/components/AppShell/AppShell.svelte +3 -3
- package/components/Breadcrumb/Crumb.svelte +3 -1
- package/components/Breadcrumb/Crumb.svelte.d.ts +5 -0
- package/components/ConicGradient/ConicGradient.svelte +2 -2
- package/components/ConicGradient/ConicGradient.svelte.d.ts +5 -0
- package/{tailwind/colors.d.ts → components/ConicGradient/settings.d.ts} +1 -1
- package/{tailwind/colors.js → components/ConicGradient/settings.js} +1 -1
- package/components/FileButton/FileButton.svelte +2 -2
- package/components/FileButton/FileButton.svelte.d.ts +3 -0
- package/components/FileDropzone/FileDropzone.svelte +5 -4
- package/components/FileDropzone/FileDropzone.svelte.d.ts +4 -0
- package/components/GradientHeading/GradientHeading.svelte +1 -1
- package/components/InputChip/InputChip.svelte +107 -0
- package/components/InputChip/InputChip.svelte.d.ts +29 -0
- package/components/ListBox/ListBoxItem.svelte +6 -5
- package/components/ListBox/ListBoxItem.svelte.d.ts +2 -0
- package/components/Paginator/Paginator.svelte +21 -9
- package/components/Paginator/Paginator.svelte.d.ts +5 -1
- package/components/ProgressBar/ProgressBar.svelte +6 -4
- package/components/ProgressBar/ProgressBar.svelte.d.ts +1 -0
- package/components/ProgressRadial/ProgressRadial.svelte +1 -1
- package/components/Radio/RadioGroup.svelte +2 -2
- package/components/Radio/RadioItem.svelte +3 -1
- package/components/Radio/RadioItem.svelte.d.ts +2 -0
- package/components/RangeSlider/RangeSlider.svelte +1 -1
- package/components/SlideToggle/SlideToggle.svelte +9 -6
- package/components/SlideToggle/SlideToggle.svelte.d.ts +4 -1
- package/components/Stepper/Step.svelte +52 -13
- package/components/Stepper/Step.svelte.d.ts +11 -3
- package/components/Stepper/Stepper.svelte +32 -10
- package/components/Stepper/Stepper.svelte.d.ts +8 -3
- package/components/SvgIcon/SvgIcon.svelte +1 -1
- package/components/SvgIcon/icons.js +2 -148
- package/components/Tab/Tab.svelte +16 -4
- package/components/Tab/Tab.svelte.d.ts +5 -0
- package/components/Table/Table.svelte +3 -3
- package/components/TableOfContents/TableOfContents.svelte +132 -0
- package/components/TableOfContents/TableOfContents.svelte.d.ts +32 -0
- package/index.d.ts +2 -0
- package/index.js +2 -0
- package/package.json +37 -29
- package/styles/all.css +0 -3
- package/styles/core.css +3 -0
- package/styles/elements/alerts.css +43 -0
- package/styles/elements/badges.css +12 -6
- package/styles/elements/breadcrumbs.css +27 -0
- package/styles/elements/buttons.css +34 -10
- package/styles/elements/cards.css +23 -4
- package/styles/elements/chips.css +58 -5
- package/styles/elements/lists.css +1 -1
- package/styles/elements/logo-clouds.css +1 -1
- package/styles/elements/menus.css +1 -1
- package/styles/elements/placeholders.css +1 -1
- package/styles/elements/tables.css +1 -1
- package/styles/elements/tooltips.css +1 -1
- package/styles/elements.css +2 -0
- package/styles/forms.css +59 -41
- package/styles/typography.css +6 -6
- package/tailwind/generated/allComponents.cjs +1 -0
- package/tailwind/generated/allComponents.d.cts +5552 -0
- package/tailwind/settings.cjs +20 -0
- package/tailwind/settings.d.cts +6 -0
- package/tailwind/skeleton.cjs +54 -0
- package/tailwind/skeleton.d.cts +5 -0
- package/tailwind/theme/colors.cjs +18 -0
- package/tailwind/theme/colors.d.cts +2 -0
- package/tailwind/tokens/backgrounds.cjs +40 -0
- package/tailwind/tokens/backgrounds.d.cts +2 -0
- package/tailwind/tokens/border-radius.cjs +21 -0
- package/tailwind/tokens/border-radius.d.cts +33 -0
- package/tailwind/tokens/borders.cjs +20 -0
- package/tailwind/tokens/borders.d.cts +6 -0
- package/tailwind/tokens/fills.cjs +20 -0
- package/tailwind/tokens/fills.d.cts +15 -0
- package/tailwind/tokens/rings.cjs +42 -0
- package/tailwind/tokens/rings.d.cts +17 -0
- package/tailwind/tokens/text.cjs +33 -0
- package/tailwind/tokens/text.d.cts +21 -0
- package/themes/theme-crimson.css +88 -64
- package/themes/theme-gold-nouveau.css +108 -115
- package/themes/theme-hamlindigo.css +97 -74
- package/themes/theme-modern.css +107 -64
- package/themes/theme-rocket.css +96 -63
- package/themes/theme-sahara.css +104 -65
- package/themes/theme-seafoam.css +100 -66
- package/themes/theme-seasonal.css +111 -65
- package/themes/theme-skeleton.css +99 -75
- package/themes/theme-vintage.css +102 -63
- package/utilities/CodeBlock/CodeBlock.svelte +6 -1
- package/utilities/CodeBlock/CodeBlock.svelte.d.ts +2 -0
- package/utilities/DataTable/DataTable.js +3 -1
- package/utilities/Drawer/Drawer.svelte +11 -10
- package/utilities/Drawer/Drawer.svelte.d.ts +1 -2
- package/utilities/Drawer/stores.d.ts +1 -1
- package/utilities/LightSwitch/LightSwitch.svelte +42 -14
- package/utilities/LightSwitch/LightSwitch.svelte.d.ts +5 -0
- package/utilities/LightSwitch/stores.d.ts +2 -3
- package/utilities/LocalStorageStore/LocalStorageStore.d.ts +3 -1
- package/utilities/LocalStorageStore/LocalStorageStore.js +9 -4
- package/utilities/Menu/menu.js +11 -7
- package/utilities/Modal/Modal.svelte +25 -12
- package/utilities/Modal/Modal.svelte.d.ts +2 -0
- package/utilities/Modal/types.d.ts +12 -2
- package/utilities/Toast/Toast.svelte +2 -2
- package/utilities/Toast/stores.js +17 -1
- package/utilities/Toast/types.d.ts +5 -0
- package/styles/tokens/backgrounds.css +0 -239
- package/styles/tokens/border-radius.css +0 -41
- package/styles/tokens/borders.css +0 -185
- package/styles/tokens/fills.css +0 -29
- package/styles/tokens/misc.css +0 -22
- package/styles/tokens/rings.css +0 -185
- package/styles/tokens/text.css +0 -216
- package/styles/tokens.css +0 -11
- package/tailwind/theme.cjs +0 -37
- package/tailwind/theme.d.cts +0 -5
|
@@ -13,7 +13,7 @@ export let step = 1;
|
|
|
13
13
|
/** Enables tick marks. See browser support below. */
|
|
14
14
|
export let ticked = false;
|
|
15
15
|
/** Provide classes to set the input accent color. */
|
|
16
|
-
export let accent = 'accent-
|
|
16
|
+
export let accent = 'accent-secondary-500';
|
|
17
17
|
// Props (a11y)
|
|
18
18
|
/**
|
|
19
19
|
* Provide a unique input id. Auto generated by default
|
|
@@ -9,9 +9,9 @@ export let checked = false;
|
|
|
9
9
|
*/
|
|
10
10
|
export let size = 'md';
|
|
11
11
|
/** Provide classes to set the checked state color. */
|
|
12
|
-
export let accent = 'bg-
|
|
12
|
+
export let accent = 'bg-secondary-500';
|
|
13
13
|
/** Provide classes to set the border width styles. */
|
|
14
|
-
export let borderWidth = 'border-
|
|
14
|
+
export let borderWidth = 'border-0';
|
|
15
15
|
/** Provide classes to set the border color styles. */
|
|
16
16
|
export let borderColor = 'border-surface-300-600-token';
|
|
17
17
|
/** Provide classes to set border radius styles. */
|
|
@@ -21,9 +21,9 @@ export let rounded = 'rounded-full';
|
|
|
21
21
|
export let label = '';
|
|
22
22
|
// Base Styles
|
|
23
23
|
const cBase = 'inline-block';
|
|
24
|
-
const cLabel = 'flex items-center';
|
|
25
|
-
const cTrack = 'flex transition-all duration-[200ms]';
|
|
26
|
-
const cThumb = 'w-[50%] h-full scale-[0.7]
|
|
24
|
+
const cLabel = 'unstyled flex items-center';
|
|
25
|
+
const cTrack = 'flex transition-all duration-[200ms] cursor-pointer';
|
|
26
|
+
const cThumb = 'w-[50%] h-full scale-[0.7] transition-all duration-[200ms] shadow-lg';
|
|
27
27
|
// Set track size
|
|
28
28
|
let trackSize;
|
|
29
29
|
// prettier-ignore
|
|
@@ -80,8 +80,11 @@ function prunedRestProps() {
|
|
|
80
80
|
class="slide-toggle-input hidden"
|
|
81
81
|
bind:checked
|
|
82
82
|
on:click
|
|
83
|
-
on:
|
|
83
|
+
on:keydown
|
|
84
|
+
on:keyup
|
|
85
|
+
on:keypress
|
|
84
86
|
on:mouseover
|
|
87
|
+
on:change
|
|
85
88
|
on:focus
|
|
86
89
|
on:blur
|
|
87
90
|
{...prunedRestProps()}
|
|
@@ -12,8 +12,11 @@ declare const __propDef: {
|
|
|
12
12
|
};
|
|
13
13
|
events: {
|
|
14
14
|
click: MouseEvent;
|
|
15
|
-
|
|
15
|
+
keydown: KeyboardEvent;
|
|
16
|
+
keyup: KeyboardEvent;
|
|
17
|
+
keypress: KeyboardEvent;
|
|
16
18
|
mouseover: MouseEvent;
|
|
19
|
+
change: Event;
|
|
17
20
|
focus: FocusEvent;
|
|
18
21
|
blur: FocusEvent;
|
|
19
22
|
} & {
|
|
@@ -15,32 +15,51 @@ const cBase = 'grid grid-cols-[32px_1fr] gap-4';
|
|
|
15
15
|
const cLine = 'w-1 h-full';
|
|
16
16
|
const cLineBackground = 'bg-surface-300-600-token';
|
|
17
17
|
const cNumeral = 'font-bold text-base w-8 h-8 rounded-full flex justify-center items-center';
|
|
18
|
-
const
|
|
18
|
+
const cNumeralBackground = 'bg-surface-300-600-token';
|
|
19
19
|
const cDrawer = 'ml-1 space-y-4';
|
|
20
20
|
const cNav = 'flex items-center space-x-2';
|
|
21
21
|
// Context
|
|
22
22
|
export let dispatch = getContext('dispatch');
|
|
23
23
|
export let active = getContext('active');
|
|
24
24
|
export let length = getContext('length');
|
|
25
|
+
export let rounded = getContext('rounded');
|
|
25
26
|
export let duration = getContext('duration');
|
|
27
|
+
export let clickNavigation = getContext('clickNavigation');
|
|
28
|
+
export let highestStepReached = getContext('highestStepReached');
|
|
26
29
|
// Context (overrides)
|
|
27
30
|
export let color = getContext('color');
|
|
28
31
|
export let background = getContext('background');
|
|
29
|
-
export let
|
|
30
|
-
export let
|
|
31
|
-
export let
|
|
32
|
+
export let buttonClassesBack = getContext('buttonClassesBack');
|
|
33
|
+
export let buttonClassesNext = getContext('buttonClassesNext');
|
|
34
|
+
export let buttonClassesComplete = getContext('buttonClassesComplete');
|
|
35
|
+
export let buttonTextBack = getContext('buttonTextBack');
|
|
36
|
+
export let buttonTextNext = getContext('buttonTextNext');
|
|
37
|
+
export let buttonTextComplete = getContext('buttonTextComplete');
|
|
32
38
|
// Step Handlers
|
|
33
39
|
function stepPrev() {
|
|
34
40
|
active.set($active - 1);
|
|
41
|
+
/** @event {{ event }} previous - Fires when the component the Next step button is pressed. */
|
|
42
|
+
dispatch('previous', {});
|
|
35
43
|
}
|
|
36
44
|
function stepNext() {
|
|
37
45
|
active.set($active + 1);
|
|
46
|
+
/** @event {{ event }} next - Fires when the component the Previous step button is pressed. */
|
|
47
|
+
dispatch('next', {});
|
|
38
48
|
}
|
|
39
49
|
function onComplete() {
|
|
50
|
+
/** @event {{ event }} complete - Fires when the component the Complete button is pressed. */
|
|
40
51
|
dispatch('complete', {});
|
|
41
52
|
}
|
|
53
|
+
function stepToIndex() {
|
|
54
|
+
if (isClickable)
|
|
55
|
+
active.set(index);
|
|
56
|
+
}
|
|
42
57
|
// Reactive
|
|
43
58
|
$: isLastItem = index === length - 1;
|
|
59
|
+
// clickable & cursor logic
|
|
60
|
+
$: isClickable = clickNavigation && index <= $highestStepReached;
|
|
61
|
+
$: classCursor = isClickable ? 'cursor-pointer' : 'cursor-default';
|
|
62
|
+
$: btnTabindex = isClickable ? 0 : -1;
|
|
44
63
|
// Base
|
|
45
64
|
$: classesBase = `${cBase} ${$$props.class ?? ''}`;
|
|
46
65
|
// Timeline (line)
|
|
@@ -48,8 +67,8 @@ $: classesLineBackgroundColor = index < $active ? `${background}` : `${cLineBack
|
|
|
48
67
|
$: classesLineBackground = !isLastItem ? `${classesLineBackgroundColor}` : '';
|
|
49
68
|
$: classesLine = `${cLine} ${classesLineBackground}`;
|
|
50
69
|
// Timeline (numeral)
|
|
51
|
-
$: classesNumeralBackground = index <= $active ? `${color} ${background}` : `${
|
|
52
|
-
$: classesNumeral = `${cNumeral} ${classesNumeralBackground}`;
|
|
70
|
+
$: classesNumeralBackground = index <= $active ? `${color} ${background}` : `${cNumeralBackground}`;
|
|
71
|
+
$: classesNumeral = `${cNumeral} ${classesNumeralBackground} ${rounded} ${classCursor}`;
|
|
53
72
|
// Content Drawer
|
|
54
73
|
$: classesDrawerPadding = !isLastItem ? 'pb-10' : '0';
|
|
55
74
|
$: classesDrawer = `${cDrawer} ${classesDrawerPadding}`;
|
|
@@ -61,31 +80,51 @@ $: classesNav = `${cNav}`;
|
|
|
61
80
|
<!-- Timeline -->
|
|
62
81
|
<div class="step-timeline flex flex-col items-center">
|
|
63
82
|
<!-- Numeral -->
|
|
64
|
-
<
|
|
83
|
+
<button
|
|
84
|
+
class="step-numeral flex-none {classesNumeral}"
|
|
85
|
+
class:cursor-pointer={isClickable}
|
|
86
|
+
tabindex={btnTabindex}
|
|
87
|
+
on:click={stepToIndex}
|
|
88
|
+
on:keypress
|
|
89
|
+
>
|
|
65
90
|
{#if locked}
|
|
66
|
-
|
|
91
|
+
<svg class="fill-token w-3 aspect-square" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">
|
|
92
|
+
<path
|
|
93
|
+
d="M144 144v48H304V144c0-44.2-35.8-80-80-80s-80 35.8-80 80zM80 192V144C80 64.5 144.5 0 224 0s144 64.5 144 144v48h16c35.3 0 64 28.7 64 64V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V256c0-35.3 28.7-64 64-64H80z"
|
|
94
|
+
/>
|
|
95
|
+
</svg>
|
|
67
96
|
{:else}
|
|
68
97
|
{@html index < $active ? '✓' : index + 1}
|
|
69
98
|
{/if}
|
|
70
|
-
</
|
|
99
|
+
</button>
|
|
71
100
|
<!-- Line -->
|
|
72
101
|
{#if !isLastItem}<div class="step-line {classesLine}" />{/if}
|
|
73
102
|
</div>
|
|
74
103
|
<!-- Content -->
|
|
75
104
|
<div class="step-content {classesDrawer}">
|
|
76
105
|
<!-- Slot: Header -->
|
|
77
|
-
<header class="step-header"
|
|
106
|
+
<header class="step-header" class:cursor-pointer={isClickable} on:click={stepToIndex} on:keypress>
|
|
107
|
+
<slot name="header"><h4>Step {index + 1}</h4></slot>
|
|
108
|
+
</header>
|
|
78
109
|
{#if index === $active}
|
|
79
110
|
<div class="step-body space-y-4" transition:slide|local={{ duration }}>
|
|
80
111
|
<!-- Slot: Default -->
|
|
81
112
|
<slot />
|
|
82
113
|
<!-- Nav -->
|
|
83
114
|
<footer class="step-navigation {classesNav}">
|
|
84
|
-
{#if index !== 0}
|
|
115
|
+
{#if index !== 0}
|
|
116
|
+
<button class={buttonClassesBack} on:click={stepPrev}>
|
|
117
|
+
{@html buttonTextBack}
|
|
118
|
+
</button>
|
|
119
|
+
{/if}
|
|
85
120
|
{#if $active + 1 < length}
|
|
86
|
-
<button class=
|
|
121
|
+
<button class={buttonClassesNext} on:click={stepNext} disabled={locked}>
|
|
122
|
+
{@html buttonTextNext}
|
|
123
|
+
</button>
|
|
87
124
|
{:else}
|
|
88
|
-
<button class=
|
|
125
|
+
<button class={buttonClassesComplete} on:click={onComplete} disabled={locked}>
|
|
126
|
+
{@html buttonTextComplete}
|
|
127
|
+
</button>
|
|
89
128
|
{/if}
|
|
90
129
|
</footer>
|
|
91
130
|
</div>
|
|
@@ -8,14 +8,22 @@ declare const __propDef: {
|
|
|
8
8
|
dispatch?: any;
|
|
9
9
|
active?: Writable<number> | undefined;
|
|
10
10
|
length?: number | undefined;
|
|
11
|
+
rounded?: string | undefined;
|
|
11
12
|
duration?: number | undefined;
|
|
13
|
+
clickNavigation?: boolean | undefined;
|
|
14
|
+
highestStepReached?: Writable<number> | undefined;
|
|
12
15
|
color?: string | undefined;
|
|
13
16
|
background?: string | undefined;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
buttonClassesBack?: string | undefined;
|
|
18
|
+
buttonClassesNext?: string | undefined;
|
|
19
|
+
buttonClassesComplete?: string | undefined;
|
|
20
|
+
buttonTextBack?: string | undefined;
|
|
21
|
+
buttonTextNext?: string | undefined;
|
|
22
|
+
buttonTextComplete?: string | undefined;
|
|
17
23
|
};
|
|
18
24
|
events: {
|
|
25
|
+
keypress: KeyboardEvent;
|
|
26
|
+
} & {
|
|
19
27
|
[evt: string]: CustomEvent<any>;
|
|
20
28
|
};
|
|
21
29
|
slots: {
|
|
@@ -11,27 +11,49 @@ export let active = writable(0);
|
|
|
11
11
|
export let length = 0;
|
|
12
12
|
/** Set the Svelte transition duration. */
|
|
13
13
|
export let duration = 200;
|
|
14
|
+
/** Provide classes to set rounded style of the step index numbers. */
|
|
15
|
+
export let rounded = 'rounded-token';
|
|
16
|
+
/** Allow click navigation to any visited steps. */
|
|
17
|
+
export let clickNavigation = false;
|
|
14
18
|
// Props (timeline)
|
|
15
19
|
/** Provide classes to set the numeral text color. */
|
|
16
20
|
export let color = 'text-white';
|
|
17
21
|
/** Provide classes to set the timeline background color. */
|
|
18
|
-
export let background = 'bg-
|
|
22
|
+
export let background = 'bg-secondary-500';
|
|
19
23
|
// Props (buttons)
|
|
20
|
-
/** Provide
|
|
21
|
-
export let
|
|
22
|
-
/** Provide
|
|
23
|
-
export let
|
|
24
|
-
/** Provide
|
|
25
|
-
export let
|
|
24
|
+
/** Provide artibtary classes for the Back button. */
|
|
25
|
+
export let buttonClassesBack = 'btn-icon btn-ghost-surface';
|
|
26
|
+
/** Provide artibtary classes for the Next button. */
|
|
27
|
+
export let buttonClassesNext = 'btn btn-filled-surface';
|
|
28
|
+
/** Provide artibtary classes for the Complete button. */
|
|
29
|
+
export let buttonClassesComplete = 'btn btn-filled-primary';
|
|
30
|
+
/** Provide a text label for the Back button. */
|
|
31
|
+
export let buttonTextBack = '↑';
|
|
32
|
+
/** Provide a text label for the Next button. */
|
|
33
|
+
export let buttonTextNext = 'Next ↓';
|
|
34
|
+
/** Provide a text label for the Complete button. */
|
|
35
|
+
export let buttonTextComplete = 'Complete';
|
|
36
|
+
/** Used for deciding which steps should be clickable. */
|
|
37
|
+
let highestStepReached = writable(0);
|
|
38
|
+
active.subscribe((v) => {
|
|
39
|
+
if (v > $highestStepReached)
|
|
40
|
+
highestStepReached.set(v);
|
|
41
|
+
});
|
|
26
42
|
// Context
|
|
27
43
|
setContext('dispatch', dispatch);
|
|
28
44
|
setContext('active', active);
|
|
29
45
|
setContext('length', length);
|
|
46
|
+
setContext('rounded', rounded);
|
|
47
|
+
setContext('clickNavigation', clickNavigation);
|
|
48
|
+
setContext('highestStepReached', highestStepReached);
|
|
30
49
|
setContext('color', color);
|
|
31
50
|
setContext('background', background);
|
|
32
|
-
setContext('
|
|
33
|
-
setContext('
|
|
34
|
-
setContext('
|
|
51
|
+
setContext('buttonClassesBack', buttonClassesBack);
|
|
52
|
+
setContext('buttonClassesNext', buttonClassesNext);
|
|
53
|
+
setContext('buttonClassesComplete', buttonClassesComplete);
|
|
54
|
+
setContext('buttonTextBack', buttonTextBack);
|
|
55
|
+
setContext('buttonTextNext', buttonTextNext);
|
|
56
|
+
setContext('buttonTextComplete', buttonTextComplete);
|
|
35
57
|
setContext('duration', duration);
|
|
36
58
|
// Reactive Classes
|
|
37
59
|
$: classesStepper = `${$$props.class ?? ''}`;
|
|
@@ -6,11 +6,16 @@ declare const __propDef: {
|
|
|
6
6
|
active?: Writable<number> | undefined;
|
|
7
7
|
length?: number | undefined;
|
|
8
8
|
duration?: number | undefined;
|
|
9
|
+
rounded?: string | undefined;
|
|
10
|
+
clickNavigation?: boolean | undefined;
|
|
9
11
|
color?: string | undefined;
|
|
10
12
|
background?: string | undefined;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
buttonClassesBack?: string | undefined;
|
|
14
|
+
buttonClassesNext?: string | undefined;
|
|
15
|
+
buttonClassesComplete?: string | undefined;
|
|
16
|
+
buttonTextBack?: string | undefined;
|
|
17
|
+
buttonTextNext?: string | undefined;
|
|
18
|
+
buttonTextComplete?: string | undefined;
|
|
14
19
|
};
|
|
15
20
|
events: {
|
|
16
21
|
[evt: string]: CustomEvent<any>;
|
|
@@ -6,26 +6,10 @@
|
|
|
6
6
|
export const icons = {
|
|
7
7
|
// Default Placeholder
|
|
8
8
|
// Source: https://fontawesome.com/icons/image?s=solid
|
|
9
|
-
|
|
10
|
-
path: '
|
|
9
|
+
placeholder: {
|
|
10
|
+
path: 'M0 96C0 60.7 28.7 32 64 32H384c35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96z'
|
|
11
11
|
},
|
|
12
12
|
// ----------- Brand Logos -----------
|
|
13
|
-
// Github
|
|
14
|
-
// Source: https://fontawesome.com/icons/github?s=brands
|
|
15
|
-
github: {
|
|
16
|
-
path: 'M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z'
|
|
17
|
-
},
|
|
18
|
-
// Discord
|
|
19
|
-
// Source: https://fontawesome.com/icons/discord?s=brands
|
|
20
|
-
discord: {
|
|
21
|
-
viewBox: '0 0 640 512',
|
|
22
|
-
path: 'M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z'
|
|
23
|
-
},
|
|
24
|
-
// Twitter
|
|
25
|
-
// Source: https://fontawesome.com/icons/twitter?s=brands
|
|
26
|
-
twitter: {
|
|
27
|
-
path: 'M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z'
|
|
28
|
-
},
|
|
29
13
|
// Svelte
|
|
30
14
|
// Source: https://iconape.com/svelte-logo-by-gengns-logo-icon-svg-png.html
|
|
31
15
|
svelte: {
|
|
@@ -37,135 +21,5 @@ export const icons = {
|
|
|
37
21
|
tailwind: {
|
|
38
22
|
viewBox: `0.15 0.13 799.7 479.69`,
|
|
39
23
|
path: 'M400 .13c-106.63 0-173.27 53.3-199.93 159.89 39.99-53.3 86.64-73.28 139.95-59.96 30.42 7.6 52.16 29.67 76.23 54.09 39.2 39.78 84.57 85.82 183.68 85.82 106.62 0 173.27-53.3 199.92-159.9-39.98 53.3-86.63 73.29-139.95 59.97-30.41-7.6-52.15-29.67-76.22-54.09C544.48 46.17 499.1.13 400 .13zM200.07 239.97c-106.62 0-173.27 53.3-199.92 159.9 39.98-53.3 86.63-73.29 139.95-59.96 30.41 7.61 52.15 29.67 76.22 54.08 39.2 39.78 84.58 85.83 183.68 85.83 106.63 0 173.27-53.3 199.93-159.9-39.99 53.3-86.64 73.29-139.95 59.96-30.42-7.59-52.16-29.67-76.23-54.08-39.2-39.78-84.57-85.83-183.68-85.83z'
|
|
40
|
-
},
|
|
41
|
-
// Astro
|
|
42
|
-
// Source: https://astro.build/press/
|
|
43
|
-
astro: {
|
|
44
|
-
viewBox: '0 0 1280 1280',
|
|
45
|
-
path: 'M815 95c10 12 15 28 25 61l216 711c-80-42-167-72-259-88L656 303a18 18 0 0 0-35 0L482 779c-92 16-180 46-260 88l217-712c10-32 15-48 25-60 9-11 20-19 32-24 15-6 32-6 66-6h155c34 0 51 0 66 6 12 5 23 13 32 24Zm26 806c-36 30-107 51-189 51-101 0-185-31-208-73-8 24-9 51-9 69 0 0-6 87 55 147 0-31 25-57 56-57 54 0 54 47 54 85v4c0 57 35 107 85 128-7-16-11-33-11-51 0-55 32-76 70-100 29-19 63-40 86-82a155 155 0 0 0 11-121Z'
|
|
46
|
-
},
|
|
47
|
-
// LinkedIn
|
|
48
|
-
// Source: https://fontawesome.com/icons/linkedin?s=brands
|
|
49
|
-
linkedin: {
|
|
50
|
-
path: 'M416 32H31.9C14.3 32 0 46.5 0 64.3v383.4C0 465.5 14.3 480 31.9 480H416c17.6 0 32-14.5 32-32.3V64.3c0-17.8-14.4-32.3-32-32.3zM135.4 416H69V202.2h66.5V416zm-33.2-243c-21.3 0-38.5-17.3-38.5-38.5S80.9 96 102.2 96c21.2 0 38.5 17.3 38.5 38.5 0 21.3-17.2 38.5-38.5 38.5zm282.1 243h-66.4V312c0-24.8-.5-56.7-34.5-56.7-34.6 0-39.9 27-39.9 54.9V416h-66.4V202.2h63.7v29.2h.9c8.9-16.8 30.6-34.5 62.9-34.5 67.2 0 79.7 44.3 79.7 101.9V416z'
|
|
51
|
-
},
|
|
52
|
-
// NPM
|
|
53
|
-
// Source: https://fontawesome.com/icons/npm?s=&f=brands
|
|
54
|
-
npm: {
|
|
55
|
-
viewBox: `0 0 576 512`,
|
|
56
|
-
path: 'M288 288h-32v-64h32v64zm288-128v192H288v32H160v-32H0V160h576zm-416 32H32v128h64v-96h32v96h32V192zm160 0H192v160h64v-32h64V192zm224 0H352v128h64v-96h32v96h32v-96h32v96h32V192z'
|
|
57
|
-
},
|
|
58
|
-
// ----------- Components -----------
|
|
59
|
-
// Accordian
|
|
60
|
-
// Source: https://fontawesome.com/icons/angle-down?s=solid
|
|
61
|
-
'angle-down': {
|
|
62
|
-
viewBox: `0 0 384 512`,
|
|
63
|
-
path: 'M192 384c-8.188 0-16.38-3.125-22.62-9.375l-160-160c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L192 306.8l137.4-137.4c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25l-160 160C208.4 380.9 200.2 384 192 384z'
|
|
64
|
-
},
|
|
65
|
-
'copy-button': {
|
|
66
|
-
viewBox: '0 0 512 512',
|
|
67
|
-
path: 'M224 0c-35.3 0-64 28.7-64 64V288c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V64c0-35.3-28.7-64-64-64H224zM64 160c-35.3 0-64 28.7-64 64V448c0 35.3 28.7 64 64 64H288c35.3 0 64-28.7 64-64V384H288v64H64V224h64V160H64z'
|
|
68
|
-
},
|
|
69
|
-
// Lightswitch
|
|
70
|
-
// Source: https://fontawesome.com/icons/sun?s=solid
|
|
71
|
-
sun: {
|
|
72
|
-
path: 'M256 159.1c-53.02 0-95.1 42.98-95.1 95.1S202.1 351.1 256 351.1s95.1-42.98 95.1-95.1S309 159.1 256 159.1zM509.3 347L446.1 255.1l63.15-91.01c6.332-9.125 1.104-21.74-9.826-23.72l-109-19.7l-19.7-109c-1.975-10.93-14.59-16.16-23.72-9.824L256 65.89L164.1 2.736c-9.125-6.332-21.74-1.107-23.72 9.824L121.6 121.6L12.56 141.3C1.633 143.2-3.596 155.9 2.736 164.1L65.89 256l-63.15 91.01c-6.332 9.125-1.105 21.74 9.824 23.72l109 19.7l19.7 109c1.975 10.93 14.59 16.16 23.72 9.824L256 446.1l91.01 63.15c9.127 6.334 21.75 1.107 23.72-9.822l19.7-109l109-19.7C510.4 368.8 515.6 356.1 509.3 347zM256 383.1c-70.69 0-127.1-57.31-127.1-127.1c0-70.69 57.31-127.1 127.1-127.1s127.1 57.3 127.1 127.1C383.1 326.7 326.7 383.1 256 383.1z'
|
|
73
|
-
},
|
|
74
|
-
// Source: https://fontawesome.com/icons/moon?s=solid
|
|
75
|
-
moon: {
|
|
76
|
-
path: 'M32 256c0-123.8 100.3-224 223.8-224c11.36 0 29.7 1.668 40.9 3.746c9.616 1.777 11.75 14.63 3.279 19.44C245 86.5 211.2 144.6 211.2 207.8c0 109.7 99.71 193 208.3 172.3c9.561-1.805 16.28 9.324 10.11 16.95C387.9 448.6 324.8 480 255.8 480C132.1 480 32 379.6 32 256z'
|
|
77
|
-
},
|
|
78
|
-
// ----------- Documentation -----------
|
|
79
|
-
// Source: https://fontawesome.com/icons/bars?s=solid
|
|
80
|
-
bars: {
|
|
81
|
-
viewBox: '0 0 576 512',
|
|
82
|
-
path: 'M0 96C0 78.33 14.33 64 32 64H416C433.7 64 448 78.33 448 96C448 113.7 433.7 128 416 128H32C14.33 128 0 113.7 0 96zM0 256C0 238.3 14.33 224 32 224H416C433.7 224 448 238.3 448 256C448 273.7 433.7 288 416 288H32C14.33 288 0 273.7 0 256zM416 448H32C14.33 448 0 433.7 0 416C0 398.3 14.33 384 32 384H416C433.7 384 448 398.3 448 416C448 433.7 433.7 448 416 448z'
|
|
83
|
-
},
|
|
84
|
-
// Source: https://fontawesome.com/icons/house?s=solid
|
|
85
|
-
house: {
|
|
86
|
-
viewBox: '0 0 576 512',
|
|
87
|
-
path: 'M575.8 255.5C575.8 273.5 560.8 287.6 543.8 287.6H511.8L512.5 447.7C512.5 450.5 512.3 453.1 512 455.8V472C512 494.1 494.1 512 472 512H456C454.9 512 453.8 511.1 452.7 511.9C451.3 511.1 449.9 512 448.5 512H392C369.9 512 352 494.1 352 472V384C352 366.3 337.7 352 320 352H256C238.3 352 224 366.3 224 384V472C224 494.1 206.1 512 184 512H128.1C126.6 512 125.1 511.9 123.6 511.8C122.4 511.9 121.2 512 120 512H104C81.91 512 64 494.1 64 472V360C64 359.1 64.03 358.1 64.09 357.2V287.6H32.05C14.02 287.6 0 273.5 0 255.5C0 246.5 3.004 238.5 10.01 231.5L266.4 8.016C273.4 1.002 281.4 0 288.4 0C295.4 0 303.4 2.004 309.5 7.014L564.8 231.5C572.8 238.5 576.9 246.5 575.8 255.5L575.8 255.5z'
|
|
88
|
-
},
|
|
89
|
-
// Source: https://fontawesome.com/icons/circle-question?s=solid
|
|
90
|
-
'circle-question': {
|
|
91
|
-
path: 'M256 0C114.6 0 0 114.6 0 256s114.6 256 256 256s256-114.6 256-256S397.4 0 256 0zM256 400c-18 0-32-14-32-32s13.1-32 32-32c17.1 0 32 14 32 32S273.1 400 256 400zM325.1 258L280 286V288c0 13-11 24-24 24S232 301 232 288V272c0-8 4-16 12-21l57-34C308 213 312 206 312 198C312 186 301.1 176 289.1 176h-51.1C225.1 176 216 186 216 198c0 13-11 24-24 24s-24-11-24-24C168 159 199 128 237.1 128h51.1C329 128 360 159 360 198C360 222 347 245 325.1 258z'
|
|
92
|
-
},
|
|
93
|
-
// Source: https://fontawesome.com/icons/circle-check?s=solid
|
|
94
|
-
'circle-check': {
|
|
95
|
-
path: 'M0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256zM371.8 211.8C382.7 200.9 382.7 183.1 371.8 172.2C360.9 161.3 343.1 161.3 332.2 172.2L224 280.4L179.8 236.2C168.9 225.3 151.1 225.3 140.2 236.2C129.3 247.1 129.3 264.9 140.2 275.8L204.2 339.8C215.1 350.7 232.9 350.7 243.8 339.8L371.8 211.8z'
|
|
96
|
-
},
|
|
97
|
-
// Source: https://fontawesome.com/icons/heart?s=solid
|
|
98
|
-
heart: {
|
|
99
|
-
path: 'M0 190.9V185.1C0 115.2 50.52 55.58 119.4 44.1C164.1 36.51 211.4 51.37 244 84.02L256 96L267.1 84.02C300.6 51.37 347 36.51 392.6 44.1C461.5 55.58 512 115.2 512 185.1V190.9C512 232.4 494.8 272.1 464.4 300.4L283.7 469.1C276.2 476.1 266.3 480 256 480C245.7 480 235.8 476.1 228.3 469.1L47.59 300.4C17.23 272.1 .0003 232.4 .0003 190.9L0 190.9z'
|
|
100
|
-
},
|
|
101
|
-
// Source: https://fontawesome.com/icons/skull?s=solid
|
|
102
|
-
skull: {
|
|
103
|
-
path: 'M416 400V464C416 490.5 394.5 512 368 512H320V464C320 455.2 312.8 448 304 448C295.2 448 288 455.2 288 464V512H224V464C224 455.2 216.8 448 208 448C199.2 448 192 455.2 192 464V512H144C117.5 512 96 490.5 96 464V400C96 399.6 96 399.3 96.01 398.9C37.48 357.8 0 294.7 0 224C0 100.3 114.6 0 256 0C397.4 0 512 100.3 512 224C512 294.7 474.5 357.8 415.1 398.9C415.1 399.3 416 399.6 416 400V400zM160 192C124.7 192 96 220.7 96 256C96 291.3 124.7 320 160 320C195.3 320 224 291.3 224 256C224 220.7 195.3 192 160 192zM352 320C387.3 320 416 291.3 416 256C416 220.7 387.3 192 352 192C316.7 192 288 220.7 288 256C288 291.3 316.7 320 352 320z'
|
|
104
|
-
},
|
|
105
|
-
// Radio Group - Alignment
|
|
106
|
-
// Source: https://fontawesome.com/icons/align-left?s=solid
|
|
107
|
-
'align-left': {
|
|
108
|
-
viewBox: '0 0 448 512',
|
|
109
|
-
path: 'M256 96H32C14.33 96 0 81.67 0 64C0 46.33 14.33 32 32 32H256C273.7 32 288 46.33 288 64C288 81.67 273.7 96 256 96zM256 352H32C14.33 352 0 337.7 0 320C0 302.3 14.33 288 32 288H256C273.7 288 288 302.3 288 320C288 337.7 273.7 352 256 352zM0 192C0 174.3 14.33 160 32 160H416C433.7 160 448 174.3 448 192C448 209.7 433.7 224 416 224H32C14.33 224 0 209.7 0 192zM416 480H32C14.33 480 0 465.7 0 448C0 430.3 14.33 416 32 416H416C433.7 416 448 430.3 448 448C448 465.7 433.7 480 416 480z'
|
|
110
|
-
},
|
|
111
|
-
// Source: https://fontawesome.com/icons/align-justify?s=solid
|
|
112
|
-
'align-justify': {
|
|
113
|
-
viewBox: '0 0 448 512',
|
|
114
|
-
path: 'M416 96H32C14.33 96 0 81.67 0 64C0 46.33 14.33 32 32 32H416C433.7 32 448 46.33 448 64C448 81.67 433.7 96 416 96zM416 352H32C14.33 352 0 337.7 0 320C0 302.3 14.33 288 32 288H416C433.7 288 448 302.3 448 320C448 337.7 433.7 352 416 352zM0 192C0 174.3 14.33 160 32 160H416C433.7 160 448 174.3 448 192C448 209.7 433.7 224 416 224H32C14.33 224 0 209.7 0 192zM416 480H32C14.33 480 0 465.7 0 448C0 430.3 14.33 416 32 416H416C433.7 416 448 430.3 448 448C448 465.7 433.7 480 416 480z'
|
|
115
|
-
},
|
|
116
|
-
// Source: https://fontawesome.com/icons/align-right?s=solid
|
|
117
|
-
'align-right': {
|
|
118
|
-
viewBox: '0 0 448 512',
|
|
119
|
-
path: 'M416 96H192C174.3 96 160 81.67 160 64C160 46.33 174.3 32 192 32H416C433.7 32 448 46.33 448 64C448 81.67 433.7 96 416 96zM416 352H192C174.3 352 160 337.7 160 320C160 302.3 174.3 288 192 288H416C433.7 288 448 302.3 448 320C448 337.7 433.7 352 416 352zM0 192C0 174.3 14.33 160 32 160H416C433.7 160 448 174.3 448 192C448 209.7 433.7 224 416 224H32C14.33 224 0 209.7 0 192zM416 480H32C14.33 480 0 465.7 0 448C0 430.3 14.33 416 32 416H416C433.7 416 448 430.3 448 448C448 465.7 433.7 480 416 480z'
|
|
120
|
-
},
|
|
121
|
-
// Tabs - Mediums
|
|
122
|
-
// https://fontawesome.com/icons/book?s=solid
|
|
123
|
-
book: {
|
|
124
|
-
path: 'M448 336v-288C448 21.49 426.5 0 400 0H96C42.98 0 0 42.98 0 96v320c0 53.02 42.98 96 96 96h320c17.67 0 32-14.33 32-31.1c0-11.72-6.607-21.52-16-27.1v-81.36C441.8 362.8 448 350.2 448 336zM143.1 128h192C344.8 128 352 135.2 352 144C352 152.8 344.8 160 336 160H143.1C135.2 160 128 152.8 128 144C128 135.2 135.2 128 143.1 128zM143.1 192h192C344.8 192 352 199.2 352 208C352 216.8 344.8 224 336 224H143.1C135.2 224 128 216.8 128 208C128 199.2 135.2 192 143.1 192zM384 448H96c-17.67 0-32-14.33-32-32c0-17.67 14.33-32 32-32h288V448z'
|
|
125
|
-
},
|
|
126
|
-
// https://fontawesome.com/icons/clapperboard?s=solid
|
|
127
|
-
clapperboard: {
|
|
128
|
-
path: 'M326.1 160l127.4-127.4C451.7 32.39 449.9 32 448 32h-86.06l-128 128H326.1zM166.1 160l128-128H201.9l-128 128H166.1zM497.7 56.19L393.9 160H512V96C512 80.87 506.5 67.15 497.7 56.19zM134.1 32H64C28.65 32 0 60.65 0 96v64h6.062L134.1 32zM0 416c0 35.35 28.65 64 64 64h384c35.35 0 64-28.65 64-64V192H0V416z'
|
|
129
|
-
},
|
|
130
|
-
// https://fontawesome.com/icons/tv?s=solid
|
|
131
|
-
tv: {
|
|
132
|
-
viewBox: '0 0 640 512',
|
|
133
|
-
path: 'M463.1 32h-416C21.49 32-.0001 53.49-.0001 80v352c0 26.51 21.49 48 47.1 48h416c26.51 0 48-21.49 48-48v-352C511.1 53.49 490.5 32 463.1 32zM111.1 408c0 4.418-3.582 8-8 8H55.1c-4.418 0-8-3.582-8-8v-48c0-4.418 3.582-8 8-8h47.1c4.418 0 8 3.582 8 8L111.1 408zM111.1 280c0 4.418-3.582 8-8 8H55.1c-4.418 0-8-3.582-8-8v-48c0-4.418 3.582-8 8-8h47.1c4.418 0 8 3.582 8 8V280zM111.1 152c0 4.418-3.582 8-8 8H55.1c-4.418 0-8-3.582-8-8v-48c0-4.418 3.582-8 8-8h47.1c4.418 0 8 3.582 8 8L111.1 152zM351.1 400c0 8.836-7.164 16-16 16H175.1c-8.836 0-16-7.164-16-16v-96c0-8.838 7.164-16 16-16h160c8.836 0 16 7.162 16 16V400zM351.1 208c0 8.836-7.164 16-16 16H175.1c-8.836 0-16-7.164-16-16v-96c0-8.838 7.164-16 16-16h160c8.836 0 16 7.162 16 16V208zM463.1 408c0 4.418-3.582 8-8 8h-47.1c-4.418 0-7.1-3.582-7.1-8l0-48c0-4.418 3.582-8 8-8h47.1c4.418 0 8 3.582 8 8V408zM463.1 280c0 4.418-3.582 8-8 8h-47.1c-4.418 0-8-3.582-8-8v-48c0-4.418 3.582-8 8-8h47.1c4.418 0 8 3.582 8 8V280zM463.1 152c0 4.418-3.582 8-8 8h-47.1c-4.418 0-8-3.582-8-8l0-48c0-4.418 3.582-8 7.1-8h47.1c4.418 0 8 3.582 8 8V152z'
|
|
134
|
-
},
|
|
135
|
-
// Source: https://fontawesome.com/icons/swatchbook?s=solid
|
|
136
|
-
swatchbook: {
|
|
137
|
-
path: 'M0 32C0 14.33 14.33 0 32 0H160C177.7 0 192 14.33 192 32V416C192 469 149 512 96 512C42.98 512 0 469 0 416V32zM128 64H64V128H128V64zM64 256H128V192H64V256zM96 440C109.3 440 120 429.3 120 416C120 402.7 109.3 392 96 392C82.75 392 72 402.7 72 416C72 429.3 82.75 440 96 440zM224 416V154L299.4 78.63C311.9 66.13 332.2 66.13 344.7 78.63L435.2 169.1C447.7 181.6 447.7 201.9 435.2 214.4L223.6 425.9C223.9 422.7 224 419.3 224 416V416zM374.8 320H480C497.7 320 512 334.3 512 352V480C512 497.7 497.7 512 480 512H182.8L374.8 320z'
|
|
138
|
-
},
|
|
139
|
-
// Source: https://fontawesome.com/icons/screwdriver-wrench?s=solid
|
|
140
|
-
screwdriver: {
|
|
141
|
-
path: 'M331.8 224.1c28.29 0 54.88 10.99 74.86 30.97l19.59 19.59c40.01-17.74 71.25-53.3 81.62-96.65c5.725-23.92 5.34-47.08 .2148-68.4c-2.613-10.88-16.43-14.51-24.34-6.604l-68.9 68.9h-75.6V97.2l68.9-68.9c7.912-7.912 4.275-21.73-6.604-24.34c-21.32-5.125-44.48-5.51-68.4 .2148c-55.3 13.23-98.39 60.22-107.2 116.4C224.5 128.9 224.2 137 224.3 145l82.78 82.86C315.2 225.1 323.5 224.1 331.8 224.1zM384 278.6c-23.16-23.16-57.57-27.57-85.39-13.9L191.1 158L191.1 95.99l-127.1-95.99L0 63.1l96 127.1l62.04 .0077l106.7 106.6c-13.67 27.82-9.251 62.23 13.91 85.39l117 117.1c14.62 14.5 38.21 14.5 52.71-.0016l52.75-52.75c14.5-14.5 14.5-38.08-.0016-52.71L384 278.6zM227.9 307L168.7 247.9l-148.9 148.9c-26.37 26.37-26.37 69.08 0 95.45C32.96 505.4 50.21 512 67.5 512s34.54-6.592 47.72-19.78l119.1-119.1C225.5 352.3 222.6 329.4 227.9 307zM64 472c-13.25 0-24-10.75-24-24c0-13.26 10.75-24 24-24S88 434.7 88 448C88 461.3 77.25 472 64 472z'
|
|
142
|
-
},
|
|
143
|
-
// Source: https://fontawesome.com/icons/pen-ruler?s=solid&f=classic
|
|
144
|
-
'pen-ruler': {
|
|
145
|
-
path: 'M469.3 19.3l23.4 23.4c25 25 25 65.5 0 90.5l-56.4 56.4L322.3 75.7l56.4-56.4c25-25 65.5-25 90.5 0zM44.9 353.2L299.7 98.3 413.7 212.3 158.8 467.1c-6.7 6.7-15.1 11.6-24.2 14.2l-104 29.7c-8.4 2.4-17.4 .1-23.6-6.1s-8.5-15.2-6.1-23.6l29.7-104c2.6-9.2 7.5-17.5 14.2-24.2zM249.4 103.4L103.4 249.4 16 161.9c-18.7-18.7-18.7-49.1 0-67.9L94.1 16c18.7-18.7 49.1-18.7 67.9 0l19.8 19.8c-.3 .3-.7 .6-1 .9l-64 64c-6.2 6.2-6.2 16.4 0 22.6s16.4 6.2 22.6 0l64-64c.3-.3 .6-.7 .9-1l45.1 45.1zM408.6 262.6l45.1 45.1c-.3 .3-.7 .6-1 .9l-64 64c-6.2 6.2-6.2 16.4 0 22.6s16.4 6.2 22.6 0l64-64c.3-.3 .6-.7 .9-1L496 350.1c18.7 18.7 18.7 49.1 0 67.9L417.9 496c-18.7 18.7-49.1 18.7-67.9 0l-87.4-87.4L408.6 262.6z'
|
|
146
|
-
},
|
|
147
|
-
// Source: https://fontawesome.com/icons/keyboard?s=regular&f=classic
|
|
148
|
-
keyboard: {
|
|
149
|
-
viewBox: '0 0 576 512',
|
|
150
|
-
path: 'M512 64H64C28.65 64 0 92.65 0 128v256c0 35.35 28.65 64 64 64h448c35.35 0 64-28.65 64-64V128C576 92.65 547.3 64 512 64zM528 384c0 8.822-7.178 16-16 16H64c-8.822 0-16-7.178-16-16V128c0-8.822 7.178-16 16-16h448c8.822 0 16 7.178 16 16V384zM140 152h-24c-6.656 0-12 5.344-12 12v24c0 6.656 5.344 12 12 12h24c6.656 0 12-5.344 12-12v-24C152 157.3 146.7 152 140 152zM196 200h24c6.656 0 12-5.344 12-12v-24c0-6.656-5.344-12-12-12h-24c-6.656 0-12 5.344-12 12v24C184 194.7 189.3 200 196 200zM276 200h24c6.656 0 12-5.344 12-12v-24c0-6.656-5.344-12-12-12h-24c-6.656 0-12 5.344-12 12v24C264 194.7 269.3 200 276 200zM356 200h24c6.656 0 12-5.344 12-12v-24c0-6.656-5.344-12-12-12h-24c-6.656 0-12 5.344-12 12v24C344 194.7 349.3 200 356 200zM460 152h-24c-6.656 0-12 5.344-12 12v24c0 6.656 5.344 12 12 12h24c6.656 0 12-5.344 12-12v-24C472 157.3 466.7 152 460 152zM140 232h-24c-6.656 0-12 5.344-12 12v24c0 6.656 5.344 12 12 12h24c6.656 0 12-5.344 12-12v-24C152 237.3 146.7 232 140 232zM196 280h24c6.656 0 12-5.344 12-12v-24c0-6.656-5.344-12-12-12h-24c-6.656 0-12 5.344-12 12v24C184 274.7 189.3 280 196 280zM276 280h24c6.656 0 12-5.344 12-12v-24c0-6.656-5.344-12-12-12h-24c-6.656 0-12 5.344-12 12v24C264 274.7 269.3 280 276 280zM356 280h24c6.656 0 12-5.344 12-12v-24c0-6.656-5.344-12-12-12h-24c-6.656 0-12 5.344-12 12v24C344 274.7 349.3 280 356 280zM460 232h-24c-6.656 0-12 5.344-12 12v24c0 6.656 5.344 12 12 12h24c6.656 0 12-5.344 12-12v-24C472 237.3 466.7 232 460 232zM400 320h-224C167.1 320 160 327.1 160 336V352c0 8.875 7.125 16 16 16h224c8.875 0 16-7.125 16-16v-16C416 327.1 408.9 320 400 320z'
|
|
151
|
-
},
|
|
152
|
-
// Source: https://fontawesome.com/icons/rocket?s=solid&f=classic
|
|
153
|
-
rocket: {
|
|
154
|
-
path: 'M156.6 384.9L125.7 354c-8.5-8.5-11.5-20.8-7.7-32.2c3-8.9 7-20.5 11.8-33.8L24 288c-8.6 0-16.6-4.6-20.9-12.1s-4.2-16.7 .2-24.1l52.5-88.5c13-21.9 36.5-35.3 61.9-35.3l82.3 0c2.4-4 4.8-7.7 7.2-11.3C289.1-4.1 411.1-8.1 483.9 5.3c11.6 2.1 20.6 11.2 22.8 22.8c13.4 72.9 9.3 194.8-111.4 276.7c-3.5 2.4-7.3 4.8-11.3 7.2v82.3c0 25.4-13.4 49-35.3 61.9l-88.5 52.5c-7.4 4.4-16.6 4.5-24.1 .2s-12.1-12.2-12.1-20.9V380.8c-14.1 4.9-26.4 8.9-35.7 11.9c-11.2 3.6-23.4 .5-31.8-7.8zM384 168c22.1 0 40-17.9 40-40s-17.9-40-40-40s-40 17.9-40 40s17.9 40 40 40z'
|
|
155
|
-
},
|
|
156
|
-
// Source: https://fontawesome.com/icons/copy?s=solid&f=classic
|
|
157
|
-
copy: {
|
|
158
|
-
viewBox: '0 0 512 512',
|
|
159
|
-
path: 'M224 0c-35.3 0-64 28.7-64 64V288c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V64c0-35.3-28.7-64-64-64H224zM64 160c-35.3 0-64 28.7-64 64V448c0 35.3 28.7 64 64 64H288c35.3 0 64-28.7 64-64V384H288v64H64V224h64V160H64z'
|
|
160
|
-
},
|
|
161
|
-
// Source: https://fontawesome.com/icons/cubes?s=solid&f=classic
|
|
162
|
-
cubes: {
|
|
163
|
-
viewBox: '0 0 576 512',
|
|
164
|
-
path: 'M290.8 48.6l78.4 29.7L288 109.5 206.8 78.3l78.4-29.7c1.8-.7 3.8-.7 5.7 0zM136 92.5V204.7c-1.3 .4-2.6 .8-3.9 1.3l-96 36.4C14.4 250.6 0 271.5 0 294.7V413.9c0 22.2 13.1 42.3 33.5 51.3l96 42.2c14.4 6.3 30.7 6.3 45.1 0L288 457.5l113.5 49.9c14.4 6.3 30.7 6.3 45.1 0l96-42.2c20.3-8.9 33.5-29.1 33.5-51.3V294.7c0-23.3-14.4-44.1-36.1-52.4l-96-36.4c-1.3-.5-2.6-.9-3.9-1.3V92.5c0-23.3-14.4-44.1-36.1-52.4l-96-36.4c-12.8-4.8-26.9-4.8-39.7 0l-96 36.4C150.4 48.4 136 69.3 136 92.5zM392 210.6l-82.4 31.2V152.6L392 121v89.6zM154.8 250.9l78.4 29.7L152 311.7 70.8 280.6l78.4-29.7c1.8-.7 3.8-.7 5.7 0zm18.8 204.4V354.8L256 323.2v95.9l-82.4 36.2zM421.2 250.9c1.8-.7 3.8-.7 5.7 0l78.4 29.7L424 311.7l-81.2-31.1 78.4-29.7zM523.2 421.2l-77.6 34.1V354.8L528 323.2v90.7c0 3.2-1.9 6-4.8 7.3z'
|
|
165
|
-
},
|
|
166
|
-
// Source: https://fontawesome.com/icons/magnifying-glass?s=solid&f=classic
|
|
167
|
-
search: {
|
|
168
|
-
viewBox: '0 0 512 512',
|
|
169
|
-
path: 'M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352c79.5 0 144-64.5 144-144s-64.5-144-144-144S64 128.5 64 208s64.5 144 144 144z'
|
|
170
24
|
}
|
|
171
25
|
};
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* @slot lead - Provides a leading position, which can be used for icons.
|
|
4
4
|
*/
|
|
5
|
-
import { getContext } from 'svelte';
|
|
5
|
+
import { createEventDispatcher, getContext } from 'svelte';
|
|
6
|
+
// Event Handler
|
|
7
|
+
const dispatch = createEventDispatcher();
|
|
6
8
|
// Context
|
|
7
9
|
export let selected = getContext('selected');
|
|
8
10
|
export let borderWidth = getContext('borderWidth');
|
|
@@ -25,7 +27,15 @@ const cBase = 'font-bold list-none py-2.5 px-4 flex items-center space-x-2 curso
|
|
|
25
27
|
const cBorderColor = 'border-transparent';
|
|
26
28
|
const cBaseLabel = 'font-bold whitespace-nowrap';
|
|
27
29
|
// A11y Input Handlers
|
|
30
|
+
function onClickHandler(value) {
|
|
31
|
+
/** @event {{ value }} click - Fires on tab click event. */
|
|
32
|
+
dispatch('click', value);
|
|
33
|
+
// Update Selected
|
|
34
|
+
selected.set(value);
|
|
35
|
+
}
|
|
28
36
|
function onKeyDown(event) {
|
|
37
|
+
/** @event {{ event }} keydown - Fires on tab keydown event. */
|
|
38
|
+
dispatch('keydown', event);
|
|
29
39
|
// Enter/Space to toggle element
|
|
30
40
|
if (['Enter', 'Space'].includes(event.code)) {
|
|
31
41
|
event.preventDefault();
|
|
@@ -43,15 +53,17 @@ $: classesLabel = `${cBaseLabel}`;
|
|
|
43
53
|
<li
|
|
44
54
|
class="tab ${classesBase}"
|
|
45
55
|
on:click={() => {
|
|
46
|
-
|
|
56
|
+
onClickHandler(value);
|
|
47
57
|
}}
|
|
48
|
-
data-testid="tab"
|
|
49
58
|
on:keydown={onKeyDown}
|
|
59
|
+
on:keyup
|
|
60
|
+
on:keypress
|
|
50
61
|
role="tab"
|
|
51
62
|
tabindex="0"
|
|
63
|
+
data-testid="tab"
|
|
52
64
|
>
|
|
53
65
|
<!-- Slot: Lead -->
|
|
54
66
|
{#if $$slots.lead}<div class="tab-lead {classesLead}"><slot name="lead" /></div>{/if}
|
|
55
67
|
<!-- Slot: Default -->
|
|
56
|
-
{#if $$slots.default}<div class="tab-label {classesLabel}" {label}><slot /></div>{/if}
|
|
68
|
+
{#if $$slots.default}<div class="tab-label {classesLabel}" aria-label={label}><slot /></div>{/if}
|
|
57
69
|
</li>
|
|
@@ -29,9 +29,9 @@ function onRowClick(event, rowIndex) {
|
|
|
29
29
|
event.preventDefault();
|
|
30
30
|
event.stopPropagation();
|
|
31
31
|
// Prefer meta row info if available, else fallback to body row info
|
|
32
|
-
const
|
|
33
|
-
/** @event {
|
|
34
|
-
dispatch('selected',
|
|
32
|
+
const rowMetaData = source.meta ? source.meta[rowIndex] : source.body[rowIndex];
|
|
33
|
+
/** @event {rowMetaData} selected - Fires when a table row is clicked. */
|
|
34
|
+
dispatch('selected', rowMetaData);
|
|
35
35
|
}
|
|
36
36
|
// Row Keydown Handler
|
|
37
37
|
function onRowKeydown(event, rowIndex) {
|