@awenovations/aura 0.0.1
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 +13 -0
- package/dist/alert/alert.stories.svelte +27 -0
- package/dist/alert/alert.stories.svelte.d.ts +28 -0
- package/dist/alert/alert.svelte +65 -0
- package/dist/alert/alert.svelte.d.ts +23 -0
- package/dist/alert/props.d.ts +2 -0
- package/dist/alert/props.js +1 -0
- package/dist/button/button.stories.svelte +456 -0
- package/dist/button/button.stories.svelte.d.ts +39 -0
- package/dist/button/button.svelte +143 -0
- package/dist/button/button.svelte.d.ts +29 -0
- package/dist/button/props.d.ts +6 -0
- package/dist/button/props.js +3 -0
- package/dist/container/container.stories.svelte +52 -0
- package/dist/container/container.stories.svelte.d.ts +32 -0
- package/dist/container/container.svelte +35 -0
- package/dist/container/container.svelte.d.ts +23 -0
- package/dist/container/props.d.ts +4 -0
- package/dist/container/props.js +2 -0
- package/dist/directives/click-outside.d.ts +6 -0
- package/dist/directives/click-outside.js +24 -0
- package/dist/dropdown/dropdown.stories.svelte +56 -0
- package/dist/dropdown/dropdown.stories.svelte.d.ts +23 -0
- package/dist/dropdown/dropdown.svelte +171 -0
- package/dist/dropdown/dropdown.svelte.d.ts +28 -0
- package/dist/error-state/error-state.stories.svelte +18 -0
- package/dist/error-state/error-state.stories.svelte.d.ts +23 -0
- package/dist/error-state/error-state.svelte +33 -0
- package/dist/error-state/error-state.svelte.d.ts +18 -0
- package/dist/float/float.svelte +34 -0
- package/dist/float/float.svelte.d.ts +22 -0
- package/dist/form-item/form-item.svelte +42 -0
- package/dist/form-item/form-item.svelte.d.ts +24 -0
- package/dist/icon/icon.stories.d.ts +25 -0
- package/dist/icon/icon.stories.js +49 -0
- package/dist/icon/icon.svelte +67 -0
- package/dist/icon/icon.svelte.d.ts +22 -0
- package/dist/icon/props.d.ts +2 -0
- package/dist/icon/props.js +1 -0
- package/dist/icons/arrow-circle-left-large.svg +10 -0
- package/dist/icons/arrow-circle-left-medium.svg +3 -0
- package/dist/icons/arrow-circle-left-small.svg +10 -0
- package/dist/icons/bug-large.svg +3 -0
- package/dist/icons/bug-medium.svg +3 -0
- package/dist/icons/bug-small.svg +3 -0
- package/dist/icons/caret-down-large.svg +0 -0
- package/dist/icons/caret-down-medium.svg +3 -0
- package/dist/icons/caret-down-small.svg +3 -0
- package/dist/icons/microsoft-color-large.svg +6 -0
- package/dist/icons/microsoft-color-medium.svg +6 -0
- package/dist/icons/microsoft-color-small.svg +6 -0
- package/dist/icons/user-story-large.svg +8 -0
- package/dist/icons/user-story-medium.svg +8 -0
- package/dist/icons/user-story-small.svg +8 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -0
- package/dist/input/input.stories.svelte +28 -0
- package/dist/input/input.stories.svelte.d.ts +23 -0
- package/dist/input/input.svelte +112 -0
- package/dist/input/input.svelte.d.ts +108 -0
- package/dist/progress/progress-ring.stories.svelte +27 -0
- package/dist/progress/progress-ring.stories.svelte.d.ts +28 -0
- package/dist/progress/progress-ring.svelte +78 -0
- package/dist/progress/progress-ring.svelte.d.ts +19 -0
- package/dist/progress/props.d.ts +2 -0
- package/dist/progress/props.js +1 -0
- package/dist/skeleton/skeleton.stories.svelte +22 -0
- package/dist/skeleton/skeleton.stories.svelte.d.ts +30 -0
- package/dist/skeleton/skeleton.svelte +23 -0
- package/dist/skeleton/skeleton.svelte.d.ts +19 -0
- package/dist/svgs/error-state-dark.svg +26 -0
- package/dist/svgs/error-state-light.svg +26 -0
- package/dist/svgs/zero-state-dark.svg +9 -0
- package/dist/svgs/zero-state-light.svg +9 -0
- package/dist/tokens/_variables.css +422 -0
- package/dist/utilities/wait-for-elm.d.ts +1 -0
- package/dist/utilities/wait-for-elm.js +17 -0
- package/dist/zero-state/zero-state.stories.svelte +18 -0
- package/dist/zero-state/zero-state.stories.svelte.d.ts +23 -0
- package/dist/zero-state/zero-state.svelte +34 -0
- package/dist/zero-state/zero-state.svelte.d.ts +18 -0
- package/package.json +97 -0
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
<script>import Button from "../button/button.svelte";
|
|
2
|
+
import FormItem, {} from "../form-item/form-item.svelte";
|
|
3
|
+
import Icon from "../icon/icon.svelte";
|
|
4
|
+
import { createEventDispatcher } from "svelte";
|
|
5
|
+
export let type = "text";
|
|
6
|
+
export let value = "";
|
|
7
|
+
export let required = false;
|
|
8
|
+
export let disabled = false;
|
|
9
|
+
export let size = "normal";
|
|
10
|
+
export let showErrors = false;
|
|
11
|
+
export let mode = void 0;
|
|
12
|
+
export let width = void 0;
|
|
13
|
+
export let height = void 0;
|
|
14
|
+
const dispatch = createEventDispatcher();
|
|
15
|
+
function forwardEvent(e) {
|
|
16
|
+
const event = e;
|
|
17
|
+
dispatch(e.type, {
|
|
18
|
+
value,
|
|
19
|
+
valueAsDate: event.target.valueAsDate,
|
|
20
|
+
valueAsNumber: event.target.valueAsNumber,
|
|
21
|
+
innerEvent: event
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
const pickerIcons = {
|
|
25
|
+
date: "calendar",
|
|
26
|
+
time: "clock"
|
|
27
|
+
};
|
|
28
|
+
let input = void 0;
|
|
29
|
+
let hasErrorsInternal = false;
|
|
30
|
+
function onInput(e) {
|
|
31
|
+
value = e.currentTarget["value"];
|
|
32
|
+
hasErrorsInternal = required && !value || !input?.checkValidity();
|
|
33
|
+
}
|
|
34
|
+
</script>
|
|
35
|
+
|
|
36
|
+
<FormItem
|
|
37
|
+
bind:required
|
|
38
|
+
bind:disabled
|
|
39
|
+
{width}
|
|
40
|
+
{height}
|
|
41
|
+
{size}
|
|
42
|
+
{mode}
|
|
43
|
+
error={($$slots.errors || hasErrorsInternal) && showErrors}
|
|
44
|
+
>
|
|
45
|
+
<slot name="left-icon" slot="left-icon" />
|
|
46
|
+
<div class="input-container">
|
|
47
|
+
<input
|
|
48
|
+
{...$$restProps}
|
|
49
|
+
class={`aura-input ${$$restProps.class}`}
|
|
50
|
+
{disabled}
|
|
51
|
+
{type}
|
|
52
|
+
{value}
|
|
53
|
+
bind:this={input}
|
|
54
|
+
on:change={forwardEvent}
|
|
55
|
+
on:input={onInput}
|
|
56
|
+
on:input={forwardEvent}
|
|
57
|
+
on:focus={forwardEvent}
|
|
58
|
+
on:blur={forwardEvent}
|
|
59
|
+
on:keydown={forwardEvent}
|
|
60
|
+
on:keypress={forwardEvent}
|
|
61
|
+
on:keyup={forwardEvent}
|
|
62
|
+
on:focusin={forwardEvent}
|
|
63
|
+
on:focusout={forwardEvent}
|
|
64
|
+
/>
|
|
65
|
+
<div class="extra">
|
|
66
|
+
<slot name="extra" />
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
<slot name="right-icon" slot="right-icon">
|
|
70
|
+
{#if pickerIcons[type]}
|
|
71
|
+
<Button kind="plain-faint" on:click={() => input?.showPicker()}>
|
|
72
|
+
<Icon name={pickerIcons[type]} />
|
|
73
|
+
</Button>
|
|
74
|
+
{/if}
|
|
75
|
+
</slot>
|
|
76
|
+
<slot slot="label" />
|
|
77
|
+
</FormItem>
|
|
78
|
+
{#if showErrors}
|
|
79
|
+
<div class="errors-text">
|
|
80
|
+
<slot name="errors" />
|
|
81
|
+
</div>
|
|
82
|
+
{/if}
|
|
83
|
+
|
|
84
|
+
<style>.aura-input {
|
|
85
|
+
all: unset;
|
|
86
|
+
width: 100%;
|
|
87
|
+
text-align: initial;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.aura-input::-webkit-calendar-picker-indicator {
|
|
91
|
+
opacity: 0;
|
|
92
|
+
flex: 1;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.input-container {
|
|
96
|
+
flex: 1;
|
|
97
|
+
display: flex;
|
|
98
|
+
flex-direction: column;
|
|
99
|
+
justify-content: stretch;
|
|
100
|
+
cursor: text;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.extra {
|
|
104
|
+
color: var(--aura-color-text-secondary);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.errors-text {
|
|
108
|
+
font: var(--aura-button-small);
|
|
109
|
+
color: var(--aura-form-item-error-text-color);
|
|
110
|
+
font-weight: 300;
|
|
111
|
+
margin-top: 3px;
|
|
112
|
+
}</style>
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import { type Mode } from '../form-item/form-item.svelte';
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: Omit<import("svelte/elements").HTMLInputAttributes, "size" | "class" | "value" | `on:${string}` | "type"> & {
|
|
5
|
+
type?: "number" | "search" | "time" | "text" | "range" | "file" | "color" | "date" | "datetime-local" | "email" | "hidden" | "month" | "password" | "tel" | "url" | "week";
|
|
6
|
+
value?: string | number | boolean;
|
|
7
|
+
size?: any;
|
|
8
|
+
showErrors?: boolean;
|
|
9
|
+
mode?: Mode | undefined;
|
|
10
|
+
};
|
|
11
|
+
events: {
|
|
12
|
+
change: CustomEvent<{
|
|
13
|
+
innerEvent: Event & {
|
|
14
|
+
target: HTMLInputElement;
|
|
15
|
+
};
|
|
16
|
+
value: string;
|
|
17
|
+
valueAsNumber: number;
|
|
18
|
+
valueAsDate: number;
|
|
19
|
+
}>;
|
|
20
|
+
input: CustomEvent<{
|
|
21
|
+
innerEvent: Event & {
|
|
22
|
+
target: HTMLInputElement;
|
|
23
|
+
};
|
|
24
|
+
value: string;
|
|
25
|
+
valueAsNumber: number;
|
|
26
|
+
valueAsDate: number;
|
|
27
|
+
}>;
|
|
28
|
+
focus: CustomEvent<{
|
|
29
|
+
innerEvent: Event & {
|
|
30
|
+
target: HTMLInputElement;
|
|
31
|
+
};
|
|
32
|
+
value: string;
|
|
33
|
+
valueAsNumber: number;
|
|
34
|
+
valueAsDate: number;
|
|
35
|
+
}>;
|
|
36
|
+
blur: CustomEvent<{
|
|
37
|
+
innerEvent: Event & {
|
|
38
|
+
target: HTMLInputElement;
|
|
39
|
+
};
|
|
40
|
+
value: string;
|
|
41
|
+
valueAsNumber: number;
|
|
42
|
+
valueAsDate: number;
|
|
43
|
+
}>;
|
|
44
|
+
keydown: CustomEvent<{
|
|
45
|
+
innerEvent: Event & {
|
|
46
|
+
target: HTMLInputElement;
|
|
47
|
+
};
|
|
48
|
+
value: string;
|
|
49
|
+
valueAsNumber: number;
|
|
50
|
+
valueAsDate: number;
|
|
51
|
+
}>;
|
|
52
|
+
keyup: CustomEvent<{
|
|
53
|
+
innerEvent: Event & {
|
|
54
|
+
target: HTMLInputElement;
|
|
55
|
+
};
|
|
56
|
+
value: string;
|
|
57
|
+
valueAsNumber: number;
|
|
58
|
+
valueAsDate: number;
|
|
59
|
+
}>;
|
|
60
|
+
keypress: CustomEvent<{
|
|
61
|
+
innerEvent: Event & {
|
|
62
|
+
target: HTMLInputElement;
|
|
63
|
+
};
|
|
64
|
+
value: string;
|
|
65
|
+
valueAsNumber: number;
|
|
66
|
+
valueAsDate: number;
|
|
67
|
+
}>;
|
|
68
|
+
focusin: CustomEvent<{
|
|
69
|
+
innerEvent: Event & {
|
|
70
|
+
target: HTMLInputElement;
|
|
71
|
+
};
|
|
72
|
+
value: string;
|
|
73
|
+
valueAsNumber: number;
|
|
74
|
+
valueAsDate: number;
|
|
75
|
+
}>;
|
|
76
|
+
focusout: CustomEvent<{
|
|
77
|
+
innerEvent: Event & {
|
|
78
|
+
target: HTMLInputElement;
|
|
79
|
+
};
|
|
80
|
+
value: string;
|
|
81
|
+
valueAsNumber: number;
|
|
82
|
+
valueAsDate: number;
|
|
83
|
+
}>;
|
|
84
|
+
} & {
|
|
85
|
+
[evt: string]: CustomEvent<any>;
|
|
86
|
+
};
|
|
87
|
+
slots: {
|
|
88
|
+
'left-icon': {
|
|
89
|
+
slot: string;
|
|
90
|
+
};
|
|
91
|
+
extra: {};
|
|
92
|
+
'right-icon': {
|
|
93
|
+
slot: string;
|
|
94
|
+
};
|
|
95
|
+
default: {
|
|
96
|
+
slot: string;
|
|
97
|
+
};
|
|
98
|
+
errors: {};
|
|
99
|
+
};
|
|
100
|
+
exports?: {} | undefined;
|
|
101
|
+
bindings?: string | undefined;
|
|
102
|
+
};
|
|
103
|
+
export type InputProps = typeof __propDef.props;
|
|
104
|
+
export type InputEvents = typeof __propDef.events;
|
|
105
|
+
export type InputSlots = typeof __propDef.slots;
|
|
106
|
+
export default class Input extends SvelteComponent<InputProps, InputEvents, InputSlots> {
|
|
107
|
+
}
|
|
108
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<script context="module">import "../../app.scss";
|
|
2
|
+
import { progressVariants } from "./props.ts";
|
|
3
|
+
import ProgressRing from "./progress-ring.svelte";
|
|
4
|
+
export const meta = {
|
|
5
|
+
title: "AURA/Progress Ring",
|
|
6
|
+
component: ProgressRing,
|
|
7
|
+
tags: ["autodocs"],
|
|
8
|
+
argTypes: {
|
|
9
|
+
variant: { control: "select", options: progressVariants }
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<script>import { Story, Template } from "@storybook/addon-svelte-csf";
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<Template let:args>
|
|
18
|
+
<ProgressRing {...args} />
|
|
19
|
+
</Template>
|
|
20
|
+
|
|
21
|
+
<Story name="Default Progress Ring" />
|
|
22
|
+
|
|
23
|
+
<Story name="Primary Progress Ring" args={{ variant: 'primary' }} />
|
|
24
|
+
|
|
25
|
+
<Story name="Secondary Progress Ring" args={{ variant: 'secondary' }} />
|
|
26
|
+
|
|
27
|
+
<Story name="Tertiary Progress Ring" args={{ variant: 'tertiary' }} />
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import '../../app.scss';
|
|
3
|
+
export declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof ProgressRing;
|
|
6
|
+
tags: string[];
|
|
7
|
+
argTypes: {
|
|
8
|
+
variant: {
|
|
9
|
+
control: string;
|
|
10
|
+
options: readonly ["primary", "secondary", "tertiary"];
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
declare const __propDef: {
|
|
15
|
+
props: Record<string, never>;
|
|
16
|
+
events: {
|
|
17
|
+
[evt: string]: CustomEvent<any>;
|
|
18
|
+
};
|
|
19
|
+
slots: {};
|
|
20
|
+
exports?: {} | undefined;
|
|
21
|
+
bindings?: string | undefined;
|
|
22
|
+
};
|
|
23
|
+
export type ProgressRingProps = typeof __propDef.props;
|
|
24
|
+
export type ProgressRingEvents = typeof __propDef.events;
|
|
25
|
+
export type ProgressRingSlots = typeof __propDef.slots;
|
|
26
|
+
export default class ProgressRing extends SvelteComponent<ProgressRingProps, ProgressRingEvents, ProgressRingSlots> {
|
|
27
|
+
}
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
<script>export let variant;
|
|
2
|
+
</script>
|
|
3
|
+
|
|
4
|
+
<div
|
|
5
|
+
class="aura-progress-ring"
|
|
6
|
+
class:isPrimary={variant === 'primary'}
|
|
7
|
+
class:isSecondary={variant === 'secondary'}
|
|
8
|
+
class:isTertiary={variant === 'tertiary'}
|
|
9
|
+
>
|
|
10
|
+
<svg viewBox="0 0 48 48">
|
|
11
|
+
<circle class="aura-progress-ring__arc" />
|
|
12
|
+
<circle class="aura-progress-ring__circle" />
|
|
13
|
+
</svg>
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
<style>@keyframes spin {
|
|
17
|
+
from {
|
|
18
|
+
transform: rotate(0deg);
|
|
19
|
+
}
|
|
20
|
+
to {
|
|
21
|
+
transform: rotate(360deg);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
.aura-progress-ring {
|
|
25
|
+
--diameter: var(--aura-progress-ring-diameter);
|
|
26
|
+
--stroke: var(--aura-progress-ring-stroke);
|
|
27
|
+
--circle-radius: 24px;
|
|
28
|
+
--radius-plus-border: calc(var(--circle-radius) - var(--stroke));
|
|
29
|
+
--circumference: calc(var(--radius-plus-border) * 2 * 3.141592);
|
|
30
|
+
--arc-size: calc(1 - var(--aura-progress-ring-arc-size));
|
|
31
|
+
--spin-rate: var(--aura-progress-ring-spin-rate);
|
|
32
|
+
--transition-time: var(--aura-progress-ring-transition-time);
|
|
33
|
+
position: relative;
|
|
34
|
+
width: var(--diameter);
|
|
35
|
+
height: var(--diameter);
|
|
36
|
+
}
|
|
37
|
+
.aura-progress-ring.isPrimary {
|
|
38
|
+
--arc-border-color: var(--aura-primary-20);
|
|
39
|
+
--circle-border-color: var(--aura-primary-50);
|
|
40
|
+
}
|
|
41
|
+
.aura-progress-ring.isSecondary {
|
|
42
|
+
--arc-border-color: var(--aura-secondary-20);
|
|
43
|
+
--circle-border-color: var(--aura-secondary-50);
|
|
44
|
+
}
|
|
45
|
+
.aura-progress-ring, .aura-progress-ring.isTertiary {
|
|
46
|
+
--arc-border-color: var(--aura-tertiary-20);
|
|
47
|
+
--circle-border-color: var(--aura-tertiary-50);
|
|
48
|
+
}
|
|
49
|
+
.aura-progress-ring svg {
|
|
50
|
+
position: absolute;
|
|
51
|
+
left: 0;
|
|
52
|
+
top: 0;
|
|
53
|
+
right: 0;
|
|
54
|
+
bottom: 0;
|
|
55
|
+
animation-duration: var(--spin-rate);
|
|
56
|
+
animation-name: spin;
|
|
57
|
+
animation-iteration-count: infinite;
|
|
58
|
+
animation-timing-function: cubic-bezier(0.17, 0.67, 0.83, 0.67);
|
|
59
|
+
}
|
|
60
|
+
.aura-progress-ring circle {
|
|
61
|
+
transform: rotate(270deg);
|
|
62
|
+
transform-origin: 50% 50%;
|
|
63
|
+
transition: stroke-dashoffset var(--transition-time);
|
|
64
|
+
stroke-linecap: round;
|
|
65
|
+
r: var(--radius-plus-border);
|
|
66
|
+
cx: var(--circle-radius);
|
|
67
|
+
cy: var(--circle-radius);
|
|
68
|
+
stroke-width: var(--stroke);
|
|
69
|
+
fill: transparent;
|
|
70
|
+
}
|
|
71
|
+
.aura-progress-ring__arc {
|
|
72
|
+
stroke: var(--arc-border-color);
|
|
73
|
+
}
|
|
74
|
+
.aura-progress-ring__circle {
|
|
75
|
+
stroke-dasharray: var(--circumference) var(--circumference);
|
|
76
|
+
stroke-dashoffset: calc(var(--circumference) * var(--arc-size));
|
|
77
|
+
stroke: var(--circle-border-color);
|
|
78
|
+
}</style>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import type * as Props from './props';
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
variant: Props.ProgressVariant | undefined;
|
|
6
|
+
};
|
|
7
|
+
events: {
|
|
8
|
+
[evt: string]: CustomEvent<any>;
|
|
9
|
+
};
|
|
10
|
+
slots: {};
|
|
11
|
+
exports?: {} | undefined;
|
|
12
|
+
bindings?: string | undefined;
|
|
13
|
+
};
|
|
14
|
+
export type ProgressRingProps = typeof __propDef.props;
|
|
15
|
+
export type ProgressRingEvents = typeof __propDef.events;
|
|
16
|
+
export type ProgressRingSlots = typeof __propDef.slots;
|
|
17
|
+
export default class ProgressRing extends SvelteComponent<ProgressRingProps, ProgressRingEvents, ProgressRingSlots> {
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const progressVariants = ['primary', 'secondary', 'tertiary'];
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script context="module">import "../../app.scss";
|
|
2
|
+
import Skeleton from "./skeleton.svelte";
|
|
3
|
+
export const meta = {
|
|
4
|
+
title: "AURA/Skeleton",
|
|
5
|
+
component: Skeleton,
|
|
6
|
+
tags: ["autodocs"],
|
|
7
|
+
argTypes: {
|
|
8
|
+
width: { control: "input:number" },
|
|
9
|
+
height: { control: "input:number" }
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<script>import { Story, Template } from "@storybook/addon-svelte-csf";
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<Template let:args>
|
|
18
|
+
<Skeleton {...args} />
|
|
19
|
+
</Template>
|
|
20
|
+
|
|
21
|
+
<Story name="Default Skeleton" />
|
|
22
|
+
<Story name="Custom Skeleton" args={{ width: '800px', height: '300px' }} />
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import '../../app.scss';
|
|
3
|
+
export declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Skeleton;
|
|
6
|
+
tags: string[];
|
|
7
|
+
argTypes: {
|
|
8
|
+
width: {
|
|
9
|
+
control: string;
|
|
10
|
+
};
|
|
11
|
+
height: {
|
|
12
|
+
control: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
declare const __propDef: {
|
|
17
|
+
props: Record<string, never>;
|
|
18
|
+
events: {
|
|
19
|
+
[evt: string]: CustomEvent<any>;
|
|
20
|
+
};
|
|
21
|
+
slots: {};
|
|
22
|
+
exports?: {} | undefined;
|
|
23
|
+
bindings?: string | undefined;
|
|
24
|
+
};
|
|
25
|
+
export type SkeletonProps = typeof __propDef.props;
|
|
26
|
+
export type SkeletonEvents = typeof __propDef.events;
|
|
27
|
+
export type SkeletonSlots = typeof __propDef.slots;
|
|
28
|
+
export default class Skeleton extends SvelteComponent<SkeletonProps, SkeletonEvents, SkeletonSlots> {
|
|
29
|
+
}
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script>export let width = "200px";
|
|
2
|
+
export let height = "200px";
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<div class="aura-skeleton" style={`--width:${width}; --height: ${height};`} />
|
|
6
|
+
|
|
7
|
+
<style>.aura-skeleton {
|
|
8
|
+
width: var(--width);
|
|
9
|
+
height: var(--height);
|
|
10
|
+
border-radius: var(--aura-container-border-radius);
|
|
11
|
+
background-color: var(--aura-tertiary-40);
|
|
12
|
+
background-image: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0));
|
|
13
|
+
background-size: 40px 100%;
|
|
14
|
+
background-repeat: no-repeat;
|
|
15
|
+
background-position: left -40px top 0;
|
|
16
|
+
animation: shine 1s ease infinite;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@keyframes shine {
|
|
20
|
+
to {
|
|
21
|
+
background-position: right -40px top 0;
|
|
22
|
+
}
|
|
23
|
+
}</style>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
width?: string;
|
|
5
|
+
height?: string;
|
|
6
|
+
};
|
|
7
|
+
events: {
|
|
8
|
+
[evt: string]: CustomEvent<any>;
|
|
9
|
+
};
|
|
10
|
+
slots: {};
|
|
11
|
+
exports?: {} | undefined;
|
|
12
|
+
bindings?: string | undefined;
|
|
13
|
+
};
|
|
14
|
+
export type SkeletonProps = typeof __propDef.props;
|
|
15
|
+
export type SkeletonEvents = typeof __propDef.events;
|
|
16
|
+
export type SkeletonSlots = typeof __propDef.slots;
|
|
17
|
+
export default class Skeleton extends SvelteComponent<SkeletonProps, SkeletonEvents, SkeletonSlots> {
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<svg width="250" height="200" viewBox="0 0 250 200" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M63 134H154C154.515 134 155.017 133.944 155.5 133.839C155.983 133.944 156.485 134 157 134H209C212.866 134 216 130.866 216 127C216 123.134 212.866 120 209 120H203C199.134 120 196 116.866 196 113C196 109.134 199.134 106 203 106H222C225.866 106 229 102.866 229 99C229 95.134 225.866 92 222 92H200C203.866 92 207 88.866 207 85C207 81.134 203.866 78 200 78H136C139.866 78 143 74.866 143 71C143 67.134 139.866 64 136 64H79C75.134 64 72 67.134 72 71C72 74.866 75.134 78 79 78H39C35.134 78 32 81.134 32 85C32 88.866 35.134 92 39 92H64C67.866 92 71 95.134 71 99C71 102.866 67.866 106 64 106H24C20.134 106 17 109.134 17 113C17 116.866 20.134 120 24 120H63C59.134 120 56 123.134 56 127C56 130.866 59.134 134 63 134ZM226 134C229.866 134 233 130.866 233 127C233 123.134 229.866 120 226 120C222.134 120 219 123.134 219 127C219 130.866 222.134 134 226 134Z" fill="#474A50"/>
|
|
3
|
+
<path d="M76.25 44.25H156.75V88.5C156.75 89.1904 156.19 89.75 155.5 89.75H77.5C76.8096 89.75 76.25 89.1904 76.25 88.5V44.25Z" fill="#A3A4A7" stroke="black" stroke-width="2.5"/>
|
|
4
|
+
<mask id="path-3-inside-1_441_74" fill="white">
|
|
5
|
+
<path d="M75 32C75 30.3431 76.3431 29 78 29H155C156.657 29 158 30.3431 158 32V43H75V32Z"/>
|
|
6
|
+
</mask>
|
|
7
|
+
<path d="M75 32C75 30.3431 76.3431 29 78 29H155C156.657 29 158 30.3431 158 32V43H75V32Z" fill="#DFE0E1"/>
|
|
8
|
+
<path d="M72.5 32C72.5 28.9624 74.9624 26.5 78 26.5H155C158.038 26.5 160.5 28.9624 160.5 32H155.5C155.5 31.7239 155.276 31.5 155 31.5H78C77.7239 31.5 77.5 31.7239 77.5 32H72.5ZM158 43H75H158ZM72.5 43V32C72.5 28.9624 74.9624 26.5 78 26.5V31.5C77.7239 31.5 77.5 31.7239 77.5 32V43H72.5ZM155 26.5C158.038 26.5 160.5 28.9624 160.5 32V43H155.5V32C155.5 31.7239 155.276 31.5 155 31.5V26.5Z" fill="black" mask="url(#path-3-inside-1_441_74)"/>
|
|
9
|
+
<circle cx="83" cy="37" r="2.75" stroke="black" stroke-width="2.5"/>
|
|
10
|
+
<circle cx="93" cy="37" r="2.75" stroke="black" stroke-width="2.5"/>
|
|
11
|
+
<circle cx="103" cy="37" r="2.75" stroke="black" stroke-width="2.5"/>
|
|
12
|
+
<path d="M97.25 74.25H177.75V118.5C177.75 119.19 177.19 119.75 176.5 119.75H98.5C97.8096 119.75 97.25 119.19 97.25 118.5V74.25Z" fill="#FF9797" stroke="black" stroke-width="2.5"/>
|
|
13
|
+
<mask id="path-9-inside-2_441_74" fill="white">
|
|
14
|
+
<path d="M96 62C96 60.3431 97.3431 59 99 59H176C177.657 59 179 60.3431 179 62V73H96V62Z"/>
|
|
15
|
+
</mask>
|
|
16
|
+
<path d="M96 62C96 60.3431 97.3431 59 99 59H176C177.657 59 179 60.3431 179 62V73H96V62Z" fill="#DFE0E1"/>
|
|
17
|
+
<path d="M93.5 62C93.5 58.9624 95.9624 56.5 99 56.5H176C179.038 56.5 181.5 58.9624 181.5 62H176.5C176.5 61.7239 176.276 61.5 176 61.5H99C98.7239 61.5 98.5 61.7239 98.5 62H93.5ZM179 73H96H179ZM93.5 73V62C93.5 58.9624 95.9624 56.5 99 56.5V61.5C98.7239 61.5 98.5 61.7239 98.5 62V73H93.5ZM176 56.5C179.038 56.5 181.5 58.9624 181.5 62V73H176.5V62C176.5 61.7239 176.276 61.5 176 61.5V56.5Z" fill="black" mask="url(#path-9-inside-2_441_74)"/>
|
|
18
|
+
<circle cx="104" cy="67" r="2.75" stroke="black" stroke-width="2.5"/>
|
|
19
|
+
<circle cx="114" cy="67" r="2.75" stroke="black" stroke-width="2.5"/>
|
|
20
|
+
<circle cx="124" cy="67" r="2.75" stroke="black" stroke-width="2.5"/>
|
|
21
|
+
<path d="M114 85L122 93" stroke="black" stroke-width="2.5" stroke-linecap="round"/>
|
|
22
|
+
<path d="M114 93L122 85" stroke="black" stroke-width="2.5" stroke-linecap="round"/>
|
|
23
|
+
<path d="M154 85L162 93" stroke="black" stroke-width="2.5" stroke-linecap="round"/>
|
|
24
|
+
<path d="M154 93L162 85" stroke="black" stroke-width="2.5" stroke-linecap="round"/>
|
|
25
|
+
<path d="M131 109H145" stroke="black" stroke-width="2.5" stroke-linecap="round"/>
|
|
26
|
+
</svg>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<svg width="250" height="200" viewBox="0 0 250 200" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M63 134H154C154.515 134 155.017 133.944 155.5 133.839C155.983 133.944 156.485 134 157 134H209C212.866 134 216 130.866 216 127C216 123.134 212.866 120 209 120H203C199.134 120 196 116.866 196 113C196 109.134 199.134 106 203 106H222C225.866 106 229 102.866 229 99C229 95.134 225.866 92 222 92H200C203.866 92 207 88.866 207 85C207 81.134 203.866 78 200 78H136C139.866 78 143 74.866 143 71C143 67.134 139.866 64 136 64H79C75.134 64 72 67.134 72 71C72 74.866 75.134 78 79 78H39C35.134 78 32 81.134 32 85C32 88.866 35.134 92 39 92H64C67.866 92 71 95.134 71 99C71 102.866 67.866 106 64 106H24C20.134 106 17 109.134 17 113C17 116.866 20.134 120 24 120H63C59.134 120 56 123.134 56 127C56 130.866 59.134 134 63 134ZM226 134C229.866 134 233 130.866 233 127C233 123.134 229.866 120 226 120C222.134 120 219 123.134 219 127C219 130.866 222.134 134 226 134Z" fill="#C3CBCF"/>
|
|
3
|
+
<path d="M76.25 44.25H156.75V88.5C156.75 89.1904 156.19 89.75 155.5 89.75H77.5C76.8096 89.75 76.25 89.1904 76.25 88.5V44.25Z" fill="#DFE0E1" stroke="#2D4B59" stroke-width="2.5"/>
|
|
4
|
+
<mask id="path-3-inside-1_441_16" fill="white">
|
|
5
|
+
<path d="M75 32C75 30.3431 76.3431 29 78 29H155C156.657 29 158 30.3431 158 32V43H75V32Z"/>
|
|
6
|
+
</mask>
|
|
7
|
+
<path d="M75 32C75 30.3431 76.3431 29 78 29H155C156.657 29 158 30.3431 158 32V43H75V32Z" fill="white"/>
|
|
8
|
+
<path d="M72.5 32C72.5 28.9624 74.9624 26.5 78 26.5H155C158.038 26.5 160.5 28.9624 160.5 32H155.5C155.5 31.7239 155.276 31.5 155 31.5H78C77.7239 31.5 77.5 31.7239 77.5 32H72.5ZM158 43H75H158ZM72.5 43V32C72.5 28.9624 74.9624 26.5 78 26.5V31.5C77.7239 31.5 77.5 31.7239 77.5 32V43H72.5ZM155 26.5C158.038 26.5 160.5 28.9624 160.5 32V43H155.5V32C155.5 31.7239 155.276 31.5 155 31.5V26.5Z" fill="#2D4B59" mask="url(#path-3-inside-1_441_16)"/>
|
|
9
|
+
<circle cx="83" cy="37" r="2.75" stroke="#2D4B59" stroke-width="2.5"/>
|
|
10
|
+
<circle cx="93" cy="37" r="2.75" stroke="#2D4B59" stroke-width="2.5"/>
|
|
11
|
+
<circle cx="103" cy="37" r="2.75" stroke="#2D4B59" stroke-width="2.5"/>
|
|
12
|
+
<path d="M97.25 74.25H177.75V118.5C177.75 119.19 177.19 119.75 176.5 119.75H98.5C97.8096 119.75 97.25 119.19 97.25 118.5V74.25Z" fill="#FFC4C4" stroke="#2D4B59" stroke-width="2.5"/>
|
|
13
|
+
<mask id="path-9-inside-2_441_16" fill="white">
|
|
14
|
+
<path d="M96 62C96 60.3431 97.3431 59 99 59H176C177.657 59 179 60.3431 179 62V73H96V62Z"/>
|
|
15
|
+
</mask>
|
|
16
|
+
<path d="M96 62C96 60.3431 97.3431 59 99 59H176C177.657 59 179 60.3431 179 62V73H96V62Z" fill="white"/>
|
|
17
|
+
<path d="M93.5 62C93.5 58.9624 95.9624 56.5 99 56.5H176C179.038 56.5 181.5 58.9624 181.5 62H176.5C176.5 61.7239 176.276 61.5 176 61.5H99C98.7239 61.5 98.5 61.7239 98.5 62H93.5ZM179 73H96H179ZM93.5 73V62C93.5 58.9624 95.9624 56.5 99 56.5V61.5C98.7239 61.5 98.5 61.7239 98.5 62V73H93.5ZM176 56.5C179.038 56.5 181.5 58.9624 181.5 62V73H176.5V62C176.5 61.7239 176.276 61.5 176 61.5V56.5Z" fill="#2D4B59" mask="url(#path-9-inside-2_441_16)"/>
|
|
18
|
+
<circle cx="104" cy="67" r="2.75" stroke="#2D4B59" stroke-width="2.5"/>
|
|
19
|
+
<circle cx="114" cy="67" r="2.75" stroke="#2D4B59" stroke-width="2.5"/>
|
|
20
|
+
<circle cx="124" cy="67" r="2.75" stroke="#2D4B59" stroke-width="2.5"/>
|
|
21
|
+
<path d="M114 85L122 93" stroke="#2D4B59" stroke-width="2.5" stroke-linecap="round"/>
|
|
22
|
+
<path d="M114 93L122 85" stroke="#2D4B59" stroke-width="2.5" stroke-linecap="round"/>
|
|
23
|
+
<path d="M154 85L162 93" stroke="#2D4B59" stroke-width="2.5" stroke-linecap="round"/>
|
|
24
|
+
<path d="M154 93L162 85" stroke="#2D4B59" stroke-width="2.5" stroke-linecap="round"/>
|
|
25
|
+
<path d="M131 109H145" stroke="#2D4B59" stroke-width="2.5" stroke-linecap="round"/>
|
|
26
|
+
</svg>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<svg width="250" height="200" viewBox="0 0 250 200" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M63 134H154C154.515 134 155.017 133.944 155.5 133.839C155.983 133.944 156.485 134 157 134H209C212.866 134 216 130.866 216 127C216 123.134 212.866 120 209 120H203C199.134 120 196 116.866 196 113C196 109.134 199.134 106 203 106H222C225.866 106 229 102.866 229 99C229 95.134 225.866 92 222 92H200C203.866 92 207 88.866 207 85C207 81.134 203.866 78 200 78H136C139.866 78 143 74.866 143 71C143 67.134 139.866 64 136 64H79C75.134 64 72 67.134 72 71C72 74.866 75.134 78 79 78H39C35.134 78 32 81.134 32 85C32 88.866 35.134 92 39 92H64C67.866 92 71 95.134 71 99C71 102.866 67.866 106 64 106H24C20.134 106 17 109.134 17 113C17 116.866 20.134 120 24 120H63C59.134 120 56 123.134 56 127C56 130.866 59.134 134 63 134ZM226 134C229.866 134 233 130.866 233 127C233 123.134 229.866 120 226 120C222.134 120 219 123.134 219 127C219 130.866 222.134 134 226 134Z" fill="#474A50"/>
|
|
3
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M113.119 111.307C113.04 111.86 113 112.425 113 113C113 119.627 118.373 125 125 125C131.627 125 137 119.627 137 113C137 112.425 136.96 111.86 136.881 111.307H166V138C166 139.657 164.657 141 163 141H87C85.3431 141 84 139.657 84 138V111.307H113.119Z" fill="#DFE0E1"/>
|
|
4
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M138 112C138 119.18 132.18 125 125 125C117.82 125 112 119.18 112 112C112 111.767 112.006 111.536 112.018 111.307H84L93.5604 83.0389C93.9726 81.8202 95.1159 81 96.4023 81H153.598C154.884 81 156.027 81.8202 156.44 83.0389L166 111.307H137.982C137.994 111.536 138 111.767 138 112Z" fill="#DFE0E1"/>
|
|
5
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M137.098 112.955C137.098 118.502 131.129 124 125 124C118.871 124 112.902 118.502 112.902 112.955C112.902 112.775 112.918 112 112.918 111.419H93L101.161 91.5755C101.513 90.6338 102.489 90 103.587 90H146.413C147.511 90 148.487 90.6338 148.839 91.5755L157 111.419H137.082C137.092 111.596 137.098 112.775 137.098 112.955Z" fill="#84868A"/>
|
|
6
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M85.25 111.512V138C85.25 138.966 86.0335 139.75 87 139.75H163C163.966 139.75 164.75 138.966 164.75 138V111.512L155.255 83.4393C155.015 82.7285 154.348 82.25 153.598 82.25H96.4023C95.6519 82.25 94.985 82.7285 94.7446 83.4393L85.25 111.512Z" stroke="black" stroke-width="2.5"/>
|
|
7
|
+
<path d="M98 111C101.937 111 106.185 111 110.745 111C112.621 111 112.621 112.319 112.621 113C112.621 119.627 118.117 125 124.897 125C131.677 125 137.173 119.627 137.173 113C137.173 112.319 137.173 111 139.05 111H164M90.5737 111H93H90.5737Z" stroke="black" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
8
|
+
<path d="M150.1 58.3027L139 70.7559M124.1 54V70.7559V54ZM98 58.3027L109.1 70.7559L98 58.3027Z" stroke="black" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
9
|
+
</svg>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<svg width="250" height="200" viewBox="0 0 250 200" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M63 134H154C154.515 134 155.017 133.944 155.5 133.839C155.983 133.944 156.485 134 157 134H209C212.866 134 216 130.866 216 127C216 123.134 212.866 120 209 120H203C199.134 120 196 116.866 196 113C196 109.134 199.134 106 203 106H222C225.866 106 229 102.866 229 99C229 95.134 225.866 92 222 92H200C203.866 92 207 88.866 207 85C207 81.134 203.866 78 200 78H136C139.866 78 143 74.866 143 71C143 67.134 139.866 64 136 64H79C75.134 64 72 67.134 72 71C72 74.866 75.134 78 79 78H39C35.134 78 32 81.134 32 85C32 88.866 35.134 92 39 92H64C67.866 92 71 95.134 71 99C71 102.866 67.866 106 64 106H24C20.134 106 17 109.134 17 113C17 116.866 20.134 120 24 120H63C59.134 120 56 123.134 56 127C56 130.866 59.134 134 63 134ZM226 134C229.866 134 233 130.866 233 127C233 123.134 229.866 120 226 120C222.134 120 219 123.134 219 127C219 130.866 222.134 134 226 134Z" fill="#C3CBCF"/>
|
|
3
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M113.119 111.307C113.04 111.86 113 112.425 113 113C113 119.627 118.373 125 125 125C131.627 125 137 119.627 137 113C137 112.425 136.96 111.86 136.881 111.307H166V138C166 139.657 164.657 141 163 141H87C85.3431 141 84 139.657 84 138V111.307H113.119Z" fill="white"/>
|
|
4
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M138 112C138 119.18 132.18 125 125 125C117.82 125 112 119.18 112 112C112 111.767 112.006 111.536 112.018 111.307H84L93.5604 83.0389C93.9726 81.8202 95.1159 81 96.4023 81H153.598C154.884 81 156.027 81.8202 156.44 83.0389L166 111.307H137.982C137.994 111.536 138 111.767 138 112Z" fill="white"/>
|
|
5
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M137.098 112.955C137.098 118.502 131.129 124 125 124C118.871 124 112.902 118.502 112.902 112.955C112.902 112.775 112.908 111.596 112.918 111.419H93L101.161 91.5755C101.513 90.6338 102.489 90 103.587 90H146.413C147.511 90 148.487 90.6338 148.839 91.5755L157 111.419H137.082C137.092 111.596 137.098 112.775 137.098 112.955Z" fill="#C3CBCF"/>
|
|
6
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M85.25 111.512V138C85.25 138.966 86.0335 139.75 87 139.75H163C163.966 139.75 164.75 138.966 164.75 138V111.512L155.255 83.4393C155.015 82.7285 154.348 82.25 153.598 82.25H96.4023C95.6519 82.25 94.985 82.7285 94.7446 83.4393L85.25 111.512Z" stroke="#2D4B59" stroke-width="2.5"/>
|
|
7
|
+
<path d="M98 111C101.937 111 106.185 111 110.745 111C112.621 111 112.621 112.319 112.621 113C112.621 119.627 118.117 125 124.897 125C131.677 125 137.173 119.627 137.173 113C137.173 112.319 137.173 111 139.05 111H164M90.5737 111H93H90.5737Z" stroke="#2D4B59" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
8
|
+
<path d="M150.1 58.3027L139 70.7559M124.1 54V70.7559V54ZM98 58.3027L109.1 70.7559L98 58.3027Z" stroke="#2D4B59" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
9
|
+
</svg>
|