@awenovations/aura 0.0.31 → 0.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/alert/alert.stories.svelte +16 -12
- package/dist/alert/alert.stories.svelte.d.ts +20 -15
- package/dist/alert/alert.svelte +29 -21
- package/dist/alert/alert.svelte.d.ts +30 -21
- package/dist/button/button.stories.svelte +20 -16
- package/dist/button/button.stories.svelte.d.ts +20 -15
- package/dist/button/button.svelte +23 -12
- package/dist/button/button.svelte.d.ts +37 -27
- package/dist/container/container.stories.svelte +18 -14
- package/dist/container/container.stories.svelte.d.ts +20 -15
- package/dist/container/container.svelte +7 -4
- package/dist/container/container.svelte.d.ts +30 -21
- package/dist/dialog/dialog.stories.svelte +11 -8
- package/dist/dialog/dialog.stories.svelte.d.ts +20 -15
- package/dist/dialog/dialog.svelte +12 -10
- package/dist/dialog/dialog.svelte.d.ts +31 -22
- package/dist/divider/divider.stories.svelte +15 -12
- package/dist/divider/divider.stories.svelte.d.ts +20 -15
- package/dist/divider/divider.svelte +8 -4
- package/dist/divider/divider.svelte.d.ts +28 -19
- package/dist/dropdown/dropdown.stories.svelte +16 -11
- package/dist/dropdown/dropdown.stories.svelte.d.ts +20 -15
- package/dist/dropdown/dropdown.svelte +134 -97
- package/dist/dropdown/dropdown.svelte.d.ts +45 -33
- package/dist/error-state/error-state.stories.svelte +13 -9
- package/dist/error-state/error-state.stories.svelte.d.ts +20 -15
- package/dist/error-state/error-state.svelte +2 -1
- package/dist/error-state/error-state.svelte.d.ts +18 -16
- package/dist/float/float.svelte +56 -38
- package/dist/float/float.svelte.d.ts +36 -27
- package/dist/form-item/form-item.svelte +6 -5
- package/dist/form-item/form-item.svelte.d.ts +31 -22
- package/dist/icon/icon.stories.svelte +38 -27
- package/dist/icon/icon.stories.svelte.d.ts +20 -15
- package/dist/icon/icon.svelte +7 -4
- package/dist/icon/icon.svelte.d.ts +30 -21
- package/dist/icons/meta.json +1 -1
- package/dist/link/link.stories.svelte +15 -11
- package/dist/link/link.stories.svelte.d.ts +20 -15
- package/dist/link/link.svelte +18 -7
- package/dist/link/link.svelte.d.ts +31 -22
- package/dist/panel/panel.stories.svelte +19 -14
- package/dist/panel/panel.stories.svelte.d.ts +20 -15
- package/dist/panel/panel.svelte +8 -5
- package/dist/panel/panel.svelte.d.ts +31 -22
- package/dist/progress/progress-ring.stories.svelte +16 -12
- package/dist/progress/progress-ring.stories.svelte.d.ts +20 -15
- package/dist/progress/progress-ring.svelte +4 -1
- package/dist/progress/progress-ring.svelte.d.ts +18 -16
- package/dist/skeleton/skeleton.stories.svelte +16 -12
- package/dist/skeleton/skeleton.stories.svelte.d.ts +20 -15
- package/dist/skeleton/skeleton.svelte +3 -2
- package/dist/skeleton/skeleton.svelte.d.ts +19 -17
- package/dist/text-field/text-field.stories.svelte +13 -9
- package/dist/text-field/text-field.stories.svelte.d.ts +20 -15
- package/dist/text-field/text-field.svelte +79 -29
- package/dist/text-field/text-field.svelte.d.ts +110 -96
- package/dist/toast/toast.stories.svelte +19 -13
- package/dist/toast/toast.stories.svelte.d.ts +20 -15
- package/dist/toast/toast.svelte +4 -2
- package/dist/toast/toast.svelte.d.ts +16 -14
- package/dist/tokens/_variables.css +1 -1
- package/dist/tooltip/tooltip.stories.svelte +13 -9
- package/dist/tooltip/tooltip.stories.svelte.d.ts +20 -15
- package/dist/tooltip/tooltip.svelte +147 -118
- package/dist/tooltip/tooltip.svelte.d.ts +30 -21
- package/dist/zero-state/zero-state.stories.svelte +13 -9
- package/dist/zero-state/zero-state.stories.svelte.d.ts +20 -15
- package/dist/zero-state/zero-state.svelte +2 -1
- package/dist/zero-state/zero-state.svelte.d.ts +18 -16
- package/package.json +22 -23
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
<script context="module">
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
<script lang="ts" context="module">
|
|
2
|
+
import '../../app.scss';
|
|
3
|
+
|
|
4
|
+
import Alert from './alert.svelte';
|
|
5
|
+
import { alertSeverity } from './props.ts';
|
|
6
|
+
|
|
7
|
+
export const meta = {
|
|
8
|
+
title: 'AURA/Alert',
|
|
9
|
+
component: Alert,
|
|
10
|
+
tags: ['autodocs'],
|
|
11
|
+
argTypes: {
|
|
12
|
+
severity: { control: 'select', options: alertSeverity }
|
|
13
|
+
}
|
|
14
|
+
};
|
|
12
15
|
</script>
|
|
13
16
|
|
|
14
|
-
<script
|
|
17
|
+
<script lang="ts">
|
|
18
|
+
import { Story, Template } from '@storybook/addon-svelte-csf';
|
|
15
19
|
</script>
|
|
16
20
|
|
|
17
21
|
<Template let:args>
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
1
|
import '../../app.scss';
|
|
2
|
+
import Alert from './alert.svelte';
|
|
3
3
|
export declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component:
|
|
5
|
+
component: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
6
|
+
[evt: string]: CustomEvent<any>;
|
|
7
|
+
}, {}, {}, string>;
|
|
6
8
|
tags: string[];
|
|
7
9
|
argTypes: {
|
|
8
10
|
severity: {
|
|
@@ -11,18 +13,21 @@ export declare const meta: {
|
|
|
11
13
|
};
|
|
12
14
|
};
|
|
13
15
|
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
17
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
18
|
+
$$bindings?: Bindings;
|
|
19
|
+
} & Exports;
|
|
20
|
+
(internal: unknown, props: {
|
|
21
|
+
$$events?: Events;
|
|
22
|
+
$$slots?: Slots;
|
|
23
|
+
}): Exports & {
|
|
24
|
+
$set?: any;
|
|
25
|
+
$on?: any;
|
|
18
26
|
};
|
|
19
|
-
|
|
20
|
-
exports?: {} | undefined;
|
|
21
|
-
bindings?: string | undefined;
|
|
22
|
-
};
|
|
23
|
-
export type AlertProps = typeof __propDef.props;
|
|
24
|
-
export type AlertEvents = typeof __propDef.events;
|
|
25
|
-
export type AlertSlots = typeof __propDef.slots;
|
|
26
|
-
export default class Alert extends SvelteComponent<AlertProps, AlertEvents, AlertSlots> {
|
|
27
|
+
z_$$bindings?: Bindings;
|
|
27
28
|
}
|
|
28
|
-
|
|
29
|
+
declare const Alert: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
30
|
+
[evt: string]: CustomEvent<any>;
|
|
31
|
+
}, {}, {}, string>;
|
|
32
|
+
type Alert = InstanceType<typeof Alert>;
|
|
33
|
+
export default Alert;
|
package/dist/alert/alert.svelte
CHANGED
|
@@ -1,24 +1,32 @@
|
|
|
1
|
-
<script
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
let
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { onMount } from 'svelte';
|
|
3
|
+
import type * as Props from './props';
|
|
4
|
+
|
|
5
|
+
export let severity: Props.AlertSeverity = 'informational';
|
|
6
|
+
export let hide: boolean = false;
|
|
7
|
+
export let autoDismissTime: number;
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
let hideAlert = false;
|
|
11
|
+
|
|
12
|
+
$: {
|
|
13
|
+
if (hide) {
|
|
14
|
+
setTimeout(() => {
|
|
15
|
+
hideAlert = true;
|
|
16
|
+
}, 300);
|
|
17
|
+
} else {
|
|
18
|
+
hideAlert = false;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
onMount(() => {
|
|
23
|
+
if(autoDismissTime) {
|
|
24
|
+
setTimeout(() => {
|
|
25
|
+
hide = true;
|
|
26
|
+
}, autoDismissTime);
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
|
|
22
30
|
</script>
|
|
23
31
|
|
|
24
32
|
<div
|
|
@@ -1,24 +1,33 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
1
|
import type * as Props from './props';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
3
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
4
|
+
$$bindings?: Bindings;
|
|
5
|
+
} & Exports;
|
|
6
|
+
(internal: unknown, props: Props & {
|
|
7
|
+
$$events?: Events;
|
|
8
|
+
$$slots?: Slots;
|
|
9
|
+
}): Exports & {
|
|
10
|
+
$set?: any;
|
|
11
|
+
$on?: any;
|
|
9
12
|
};
|
|
10
|
-
|
|
11
|
-
[evt: string]: CustomEvent<any>;
|
|
12
|
-
};
|
|
13
|
-
slots: {
|
|
14
|
-
default: {};
|
|
15
|
-
};
|
|
16
|
-
exports?: undefined;
|
|
17
|
-
bindings?: undefined;
|
|
18
|
-
};
|
|
19
|
-
export type AlertProps = typeof __propDef.props;
|
|
20
|
-
export type AlertEvents = typeof __propDef.events;
|
|
21
|
-
export type AlertSlots = typeof __propDef.slots;
|
|
22
|
-
export default class Alert extends SvelteComponent<AlertProps, AlertEvents, AlertSlots> {
|
|
13
|
+
z_$$bindings?: Bindings;
|
|
23
14
|
}
|
|
24
|
-
|
|
15
|
+
type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
|
|
16
|
+
default: any;
|
|
17
|
+
} ? Props extends Record<string, never> ? any : {
|
|
18
|
+
children?: any;
|
|
19
|
+
} : {});
|
|
20
|
+
declare const Alert: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
|
|
21
|
+
[x: string]: any;
|
|
22
|
+
severity?: Props.AlertSeverity;
|
|
23
|
+
hide?: boolean;
|
|
24
|
+
autoDismissTime: number;
|
|
25
|
+
}, {
|
|
26
|
+
default: {};
|
|
27
|
+
}>, {
|
|
28
|
+
[evt: string]: CustomEvent<any>;
|
|
29
|
+
}, {
|
|
30
|
+
default: {};
|
|
31
|
+
}, {}, string>;
|
|
32
|
+
type Alert = InstanceType<typeof Alert>;
|
|
33
|
+
export default Alert;
|
|
@@ -1,21 +1,25 @@
|
|
|
1
|
-
<script context="module">
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
1
|
+
<script lang="ts" context="module">
|
|
2
|
+
import '../../app.scss';
|
|
3
|
+
|
|
4
|
+
import Button from './button.svelte';
|
|
5
|
+
import Icon from '../icon/icon.svelte';
|
|
6
|
+
import { buttonKinds, buttonVariants, buttonSizes } from './props.ts';
|
|
7
|
+
|
|
8
|
+
export const meta = {
|
|
9
|
+
title: 'AURA/Button',
|
|
10
|
+
component: Button,
|
|
11
|
+
tags: ['autodocs'],
|
|
12
|
+
argTypes: {
|
|
13
|
+
kind: { control: 'select', options: buttonKinds },
|
|
14
|
+
variant: { control: 'select', options: buttonVariants },
|
|
15
|
+
size: { control: 'select', options: buttonSizes },
|
|
16
|
+
loading: { control: 'boolean' }
|
|
17
|
+
}
|
|
18
|
+
};
|
|
16
19
|
</script>
|
|
17
20
|
|
|
18
|
-
<script
|
|
21
|
+
<script lang="ts">
|
|
22
|
+
import { Story, Template } from '@storybook/addon-svelte-csf';
|
|
19
23
|
</script>
|
|
20
24
|
|
|
21
25
|
<Template let:args>
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
1
|
import '../../app.scss';
|
|
2
|
+
import Button from './button.svelte';
|
|
3
3
|
export declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component:
|
|
5
|
+
component: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
6
|
+
[evt: string]: CustomEvent<any>;
|
|
7
|
+
}, {}, {}, string>;
|
|
6
8
|
tags: string[];
|
|
7
9
|
argTypes: {
|
|
8
10
|
kind: {
|
|
@@ -22,18 +24,21 @@ export declare const meta: {
|
|
|
22
24
|
};
|
|
23
25
|
};
|
|
24
26
|
};
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
28
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
29
|
+
$$bindings?: Bindings;
|
|
30
|
+
} & Exports;
|
|
31
|
+
(internal: unknown, props: {
|
|
32
|
+
$$events?: Events;
|
|
33
|
+
$$slots?: Slots;
|
|
34
|
+
}): Exports & {
|
|
35
|
+
$set?: any;
|
|
36
|
+
$on?: any;
|
|
29
37
|
};
|
|
30
|
-
|
|
31
|
-
exports?: {} | undefined;
|
|
32
|
-
bindings?: string | undefined;
|
|
33
|
-
};
|
|
34
|
-
export type ButtonProps = typeof __propDef.props;
|
|
35
|
-
export type ButtonEvents = typeof __propDef.events;
|
|
36
|
-
export type ButtonSlots = typeof __propDef.slots;
|
|
37
|
-
export default class Button extends SvelteComponent<ButtonProps, ButtonEvents, ButtonSlots> {
|
|
38
|
+
z_$$bindings?: Bindings;
|
|
38
39
|
}
|
|
39
|
-
|
|
40
|
+
declare const Button: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
41
|
+
[evt: string]: CustomEvent<any>;
|
|
42
|
+
}, {}, {}, string>;
|
|
43
|
+
type Button = InstanceType<typeof Button>;
|
|
44
|
+
export default Button;
|
|
@@ -1,15 +1,26 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export let
|
|
8
|
-
export let
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { createEventDispatcher } from 'svelte';
|
|
3
|
+
import type * as Props from './props';
|
|
4
|
+
|
|
5
|
+
import ProgressRing from '../progress/progress-ring.svelte';
|
|
6
|
+
|
|
7
|
+
export let kind: Props.ButtonKind = 'filled';
|
|
8
|
+
export let variant: Props.ButtonVariant = 'primary';
|
|
9
|
+
export let size: Props.ButtonSize = 'default';
|
|
10
|
+
export let fullWidth: boolean = false;
|
|
11
|
+
export let loading: boolean = false;
|
|
12
|
+
export let left: boolean = false;
|
|
13
|
+
|
|
14
|
+
const dispatch = createEventDispatcher<{
|
|
15
|
+
click: NonNullable<unknown>;
|
|
16
|
+
}>();
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Optional click handler
|
|
20
|
+
*/
|
|
21
|
+
function onClick(event) {
|
|
22
|
+
dispatch('click', event);
|
|
23
|
+
}
|
|
13
24
|
</script>
|
|
14
25
|
|
|
15
26
|
<button
|
|
@@ -1,30 +1,40 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
1
|
import type * as Props from './props';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
3
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
4
|
+
$$bindings?: Bindings;
|
|
5
|
+
} & Exports;
|
|
6
|
+
(internal: unknown, props: Props & {
|
|
7
|
+
$$events?: Events;
|
|
8
|
+
$$slots?: Slots;
|
|
9
|
+
}): Exports & {
|
|
10
|
+
$set?: any;
|
|
11
|
+
$on?: any;
|
|
12
12
|
};
|
|
13
|
-
|
|
14
|
-
click: CustomEvent<{}>;
|
|
15
|
-
} & {
|
|
16
|
-
[evt: string]: CustomEvent<any>;
|
|
17
|
-
};
|
|
18
|
-
slots: {
|
|
19
|
-
'icon-before': {};
|
|
20
|
-
default: {};
|
|
21
|
-
};
|
|
22
|
-
exports?: undefined;
|
|
23
|
-
bindings?: undefined;
|
|
24
|
-
};
|
|
25
|
-
export type ButtonProps = typeof __propDef.props;
|
|
26
|
-
export type ButtonEvents = typeof __propDef.events;
|
|
27
|
-
export type ButtonSlots = typeof __propDef.slots;
|
|
28
|
-
export default class Button extends SvelteComponent<ButtonProps, ButtonEvents, ButtonSlots> {
|
|
13
|
+
z_$$bindings?: Bindings;
|
|
29
14
|
}
|
|
30
|
-
|
|
15
|
+
type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
|
|
16
|
+
default: any;
|
|
17
|
+
} ? Props extends Record<string, never> ? any : {
|
|
18
|
+
children?: any;
|
|
19
|
+
} : {});
|
|
20
|
+
declare const Button: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
|
|
21
|
+
[x: string]: any;
|
|
22
|
+
kind?: Props.ButtonKind;
|
|
23
|
+
variant?: any;
|
|
24
|
+
size?: any;
|
|
25
|
+
fullWidth?: boolean;
|
|
26
|
+
loading?: boolean;
|
|
27
|
+
left?: boolean;
|
|
28
|
+
}, {
|
|
29
|
+
'icon-before': {};
|
|
30
|
+
default: {};
|
|
31
|
+
}>, {
|
|
32
|
+
click: CustomEvent<{}>;
|
|
33
|
+
} & {
|
|
34
|
+
[evt: string]: CustomEvent<any>;
|
|
35
|
+
}, {
|
|
36
|
+
'icon-before': {};
|
|
37
|
+
default: {};
|
|
38
|
+
}, {}, string>;
|
|
39
|
+
type Button = InstanceType<typeof Button>;
|
|
40
|
+
export default Button;
|
|
@@ -1,19 +1,23 @@
|
|
|
1
|
-
<script context="module">
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
1
|
+
<script lang="ts" context="module">
|
|
2
|
+
import '../../app.scss';
|
|
3
|
+
|
|
4
|
+
import Divider from '../divider/divider.svelte';
|
|
5
|
+
import Container from './container.svelte';
|
|
6
|
+
import { containerKinds, containerVariants } from './props.ts';
|
|
7
|
+
|
|
8
|
+
export const meta = {
|
|
9
|
+
title: 'AURA/Container',
|
|
10
|
+
component: Container,
|
|
11
|
+
tags: ['autodocs'],
|
|
12
|
+
argTypes: {
|
|
13
|
+
kind: { control: 'select', options: containerKinds },
|
|
14
|
+
variant: { control: 'select', options: containerVariants }
|
|
15
|
+
}
|
|
16
|
+
};
|
|
14
17
|
</script>
|
|
15
18
|
|
|
16
|
-
<script
|
|
19
|
+
<script lang="ts">
|
|
20
|
+
import { Story, Template } from '@storybook/addon-svelte-csf';
|
|
17
21
|
</script>
|
|
18
22
|
|
|
19
23
|
<Template let:args>
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
1
|
import '../../app.scss';
|
|
2
|
+
import Container from './container.svelte';
|
|
3
3
|
export declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component:
|
|
5
|
+
component: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
6
|
+
[evt: string]: CustomEvent<any>;
|
|
7
|
+
}, {}, {}, string>;
|
|
6
8
|
tags: string[];
|
|
7
9
|
argTypes: {
|
|
8
10
|
kind: {
|
|
@@ -15,18 +17,21 @@ export declare const meta: {
|
|
|
15
17
|
};
|
|
16
18
|
};
|
|
17
19
|
};
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
21
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
22
|
+
$$bindings?: Bindings;
|
|
23
|
+
} & Exports;
|
|
24
|
+
(internal: unknown, props: {
|
|
25
|
+
$$events?: Events;
|
|
26
|
+
$$slots?: Slots;
|
|
27
|
+
}): Exports & {
|
|
28
|
+
$set?: any;
|
|
29
|
+
$on?: any;
|
|
22
30
|
};
|
|
23
|
-
|
|
24
|
-
exports?: {} | undefined;
|
|
25
|
-
bindings?: string | undefined;
|
|
26
|
-
};
|
|
27
|
-
export type ContainerProps = typeof __propDef.props;
|
|
28
|
-
export type ContainerEvents = typeof __propDef.events;
|
|
29
|
-
export type ContainerSlots = typeof __propDef.slots;
|
|
30
|
-
export default class Container extends SvelteComponent<ContainerProps, ContainerEvents, ContainerSlots> {
|
|
31
|
+
z_$$bindings?: Bindings;
|
|
31
32
|
}
|
|
32
|
-
|
|
33
|
+
declare const Container: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
34
|
+
[evt: string]: CustomEvent<any>;
|
|
35
|
+
}, {}, {}, string>;
|
|
36
|
+
type Container = InstanceType<typeof Container>;
|
|
37
|
+
export default Container;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
<script
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type * as Props from './props';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
|
|
5
|
+
export let clearPadding: boolean = false;
|
|
6
|
+
export let kind: Props.ContainerKind = 'filled';
|
|
7
|
+
export let variant: Props.ContainerVariants = 'flat';
|
|
5
8
|
</script>
|
|
6
9
|
|
|
7
10
|
<div
|
|
@@ -1,24 +1,33 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
1
|
import type * as Props from './props';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
3
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
4
|
+
$$bindings?: Bindings;
|
|
5
|
+
} & Exports;
|
|
6
|
+
(internal: unknown, props: Props & {
|
|
7
|
+
$$events?: Events;
|
|
8
|
+
$$slots?: Slots;
|
|
9
|
+
}): Exports & {
|
|
10
|
+
$set?: any;
|
|
11
|
+
$on?: any;
|
|
9
12
|
};
|
|
10
|
-
|
|
11
|
-
[evt: string]: CustomEvent<any>;
|
|
12
|
-
};
|
|
13
|
-
slots: {
|
|
14
|
-
default: {};
|
|
15
|
-
};
|
|
16
|
-
exports?: undefined;
|
|
17
|
-
bindings?: undefined;
|
|
18
|
-
};
|
|
19
|
-
export type ContainerProps = typeof __propDef.props;
|
|
20
|
-
export type ContainerEvents = typeof __propDef.events;
|
|
21
|
-
export type ContainerSlots = typeof __propDef.slots;
|
|
22
|
-
export default class Container extends SvelteComponent<ContainerProps, ContainerEvents, ContainerSlots> {
|
|
13
|
+
z_$$bindings?: Bindings;
|
|
23
14
|
}
|
|
24
|
-
|
|
15
|
+
type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
|
|
16
|
+
default: any;
|
|
17
|
+
} ? Props extends Record<string, never> ? any : {
|
|
18
|
+
children?: any;
|
|
19
|
+
} : {});
|
|
20
|
+
declare const Container: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
|
|
21
|
+
[x: string]: any;
|
|
22
|
+
clearPadding?: boolean;
|
|
23
|
+
kind?: Props.ContainerKind;
|
|
24
|
+
variant?: Props.ContainerVariants;
|
|
25
|
+
}, {
|
|
26
|
+
default: {};
|
|
27
|
+
}>, {
|
|
28
|
+
[evt: string]: CustomEvent<any>;
|
|
29
|
+
}, {
|
|
30
|
+
default: {};
|
|
31
|
+
}, {}, string>;
|
|
32
|
+
type Container = InstanceType<typeof Container>;
|
|
33
|
+
export default Container;
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
<script context="module">
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
<script lang="ts" context="module">
|
|
2
|
+
import '../../app.scss';
|
|
3
|
+
import Dialog from './dialog.svelte';
|
|
4
|
+
|
|
5
|
+
export const meta = {
|
|
6
|
+
title: 'AURA/Dialog',
|
|
7
|
+
component: Dialog,
|
|
8
|
+
tags: ['autodocs'],
|
|
9
|
+
};
|
|
8
10
|
</script>
|
|
9
11
|
|
|
10
|
-
<script
|
|
12
|
+
<script lang="ts">
|
|
13
|
+
import { Story, Template } from '@storybook/addon-svelte-csf';
|
|
11
14
|
</script>
|
|
12
15
|
|
|
13
16
|
|
|
@@ -1,22 +1,27 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
1
|
import '../../app.scss';
|
|
2
|
+
import Dialog from './dialog.svelte';
|
|
3
3
|
export declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component:
|
|
5
|
+
component: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
6
|
+
[evt: string]: CustomEvent<any>;
|
|
7
|
+
}, {}, {}, string>;
|
|
6
8
|
tags: string[];
|
|
7
9
|
};
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
11
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
12
|
+
$$bindings?: Bindings;
|
|
13
|
+
} & Exports;
|
|
14
|
+
(internal: unknown, props: {
|
|
15
|
+
$$events?: Events;
|
|
16
|
+
$$slots?: Slots;
|
|
17
|
+
}): Exports & {
|
|
18
|
+
$set?: any;
|
|
19
|
+
$on?: any;
|
|
12
20
|
};
|
|
13
|
-
|
|
14
|
-
exports?: {} | undefined;
|
|
15
|
-
bindings?: string | undefined;
|
|
16
|
-
};
|
|
17
|
-
export type DialogProps = typeof __propDef.props;
|
|
18
|
-
export type DialogEvents = typeof __propDef.events;
|
|
19
|
-
export type DialogSlots = typeof __propDef.slots;
|
|
20
|
-
export default class Dialog extends SvelteComponent<DialogProps, DialogEvents, DialogSlots> {
|
|
21
|
+
z_$$bindings?: Bindings;
|
|
21
22
|
}
|
|
22
|
-
|
|
23
|
+
declare const Dialog: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
24
|
+
[evt: string]: CustomEvent<any>;
|
|
25
|
+
}, {}, {}, string>;
|
|
26
|
+
type Dialog = InstanceType<typeof Dialog>;
|
|
27
|
+
export default Dialog;
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export let
|
|
9
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
|
|
4
|
+
import Button from '../button/button.svelte';
|
|
5
|
+
import Container from '../container/container.svelte';
|
|
6
|
+
|
|
7
|
+
export let cancelText = 'Cancel';
|
|
8
|
+
export let confirmText = 'Confirm';
|
|
9
|
+
|
|
10
|
+
export let onConfirm: () => void = () => {};
|
|
11
|
+
export let onCancel: () => void = () => {};
|
|
10
12
|
</script>
|
|
11
13
|
|
|
12
|
-
<Container clearPadding variant="elevated" class={classNames('dialog', $$restProps.class)}>
|
|
14
|
+
<Container {...$$restProps} clearPadding variant="elevated" class={classNames('dialog', $$restProps.class)}>
|
|
13
15
|
<slot>Are you sure you wish to take this action?</slot>
|
|
14
16
|
<div class="action-buttons">
|
|
15
17
|
<Button size="small" on:click={onCancel}>{cancelText}</Button>
|