@txstate-mws/svelte-components 1.3.9 → 1.4.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/dist/components/Lottie.svelte +35 -0
- package/dist/components/Lottie.svelte.d.ts +24 -0
- package/package.json +28 -40
- /package/{actions → dist/actions}/buttonify.d.ts +0 -0
- /package/{actions → dist/actions}/buttonify.js +0 -0
- /package/{actions → dist/actions}/elementqueries.d.ts +0 -0
- /package/{actions → dist/actions}/elementqueries.js +0 -0
- /package/{actions → dist/actions}/glue.d.ts +0 -0
- /package/{actions → dist/actions}/glue.js +0 -0
- /package/{actions → dist/actions}/index.d.ts +0 -0
- /package/{actions → dist/actions}/index.js +0 -0
- /package/{actions → dist/actions}/offset.d.ts +0 -0
- /package/{actions → dist/actions}/offset.js +0 -0
- /package/{actions → dist/actions}/passactions.d.ts +0 -0
- /package/{actions → dist/actions}/passactions.js +0 -0
- /package/{actions → dist/actions}/portal.d.ts +0 -0
- /package/{actions → dist/actions}/portal.js +0 -0
- /package/{actions → dist/actions}/resize.d.ts +0 -0
- /package/{actions → dist/actions}/resize.js +0 -0
- /package/{actions → dist/actions}/sticky.d.ts +0 -0
- /package/{actions → dist/actions}/sticky.js +0 -0
- /package/{actions → dist/actions}/stickyfixed.d.ts +0 -0
- /package/{actions → dist/actions}/stickyfixed.js +0 -0
- /package/{components → dist/components}/Card.svelte +0 -0
- /package/{components → dist/components}/Card.svelte.d.ts +0 -0
- /package/{components → dist/components}/CardLayout.svelte +0 -0
- /package/{components → dist/components}/CardLayout.svelte.d.ts +0 -0
- /package/{components → dist/components}/CollapsingTable.svelte +0 -0
- /package/{components → dist/components}/CollapsingTable.svelte.d.ts +0 -0
- /package/{components → dist/components}/ConditionalWrapper.svelte +0 -0
- /package/{components → dist/components}/ConditionalWrapper.svelte.d.ts +0 -0
- /package/{components → dist/components}/FocusLock.svelte +0 -0
- /package/{components → dist/components}/FocusLock.svelte.d.ts +0 -0
- /package/{components → dist/components}/Loading.svelte +0 -0
- /package/{components → dist/components}/Loading.svelte.d.ts +0 -0
- /package/{components → dist/components}/Modal.svelte +0 -0
- /package/{components → dist/components}/Modal.svelte.d.ts +0 -0
- /package/{components → dist/components}/MultiSelect.svelte +0 -0
- /package/{components → dist/components}/MultiSelect.svelte.d.ts +0 -0
- /package/{components → dist/components}/PopupMenu.svelte +0 -0
- /package/{components → dist/components}/PopupMenu.svelte.d.ts +0 -0
- /package/{components → dist/components}/ScreenReaderOnly.svelte +0 -0
- /package/{components → dist/components}/ScreenReaderOnly.svelte.d.ts +0 -0
- /package/{components → dist/components}/index.d.ts +0 -0
- /package/{components → dist/components}/index.js +0 -0
- /package/{index.d.ts → dist/index.d.ts} +0 -0
- /package/{index.js → dist/index.js} +0 -0
- /package/{types → dist/types}/CardLayout.d.ts +0 -0
- /package/{types → dist/types}/CardLayout.js +0 -0
- /package/{types → dist/types}/CollapsingTable.d.ts +0 -0
- /package/{types → dist/types}/CollapsingTable.js +0 -0
- /package/{types → dist/types}/PopupMenu.d.ts +0 -0
- /package/{types → dist/types}/PopupMenu.js +0 -0
- /package/{types → dist/types}/index.d.ts +0 -0
- /package/{types → dist/types}/index.js +0 -0
- /package/{util → dist/util}/bodyoffset.d.ts +0 -0
- /package/{util → dist/util}/bodyoffset.js +0 -0
- /package/{util → dist/util}/index.d.ts +0 -0
- /package/{util → dist/util}/index.js +0 -0
- /package/{util → dist/util}/repositioned.d.ts +0 -0
- /package/{util → dist/util}/repositioned.js +0 -0
- /package/{util → dist/util}/util.d.ts +0 -0
- /package/{util → dist/util}/util.js +0 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<script>import { onMount } from 'svelte';
|
|
2
|
+
import { isBlank } from 'txstate-utils';
|
|
3
|
+
import ScreenReaderOnly from './ScreenReaderOnly.svelte';
|
|
4
|
+
export let animationData;
|
|
5
|
+
export let loop = true;
|
|
6
|
+
export let name = undefined;
|
|
7
|
+
export let speed = 1;
|
|
8
|
+
export let direction = 1;
|
|
9
|
+
export let paused = false;
|
|
10
|
+
export let width = undefined;
|
|
11
|
+
export let height = undefined;
|
|
12
|
+
export let alt = '';
|
|
13
|
+
let container;
|
|
14
|
+
let animation;
|
|
15
|
+
$: animation?.setSpeed(speed);
|
|
16
|
+
$: animation?.setDirection(direction);
|
|
17
|
+
$: paused ? animation?.pause() : animation?.play();
|
|
18
|
+
onMount(async () => {
|
|
19
|
+
const lottie = (await import('lottie-web/build/player/lottie_light')).default;
|
|
20
|
+
animation = lottie.loadAnimation({
|
|
21
|
+
container,
|
|
22
|
+
animationData,
|
|
23
|
+
renderer: 'svg',
|
|
24
|
+
loop,
|
|
25
|
+
autoplay: !paused,
|
|
26
|
+
name
|
|
27
|
+
});
|
|
28
|
+
animation.addEventListener('DOMLoaded', () => {
|
|
29
|
+
animation.setSpeed(speed);
|
|
30
|
+
animation.setDirection(direction);
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
</script>
|
|
34
|
+
|
|
35
|
+
<div bind:this={container} style:width style:height aria-hidden={isBlank(alt)}><ScreenReaderOnly>{alt}</ScreenReaderOnly></div>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
animationData: any;
|
|
5
|
+
loop?: boolean;
|
|
6
|
+
name?: string | undefined;
|
|
7
|
+
speed?: number;
|
|
8
|
+
direction?: 1 | -1;
|
|
9
|
+
paused?: boolean;
|
|
10
|
+
width?: string | undefined;
|
|
11
|
+
height?: string | undefined;
|
|
12
|
+
alt?: string;
|
|
13
|
+
};
|
|
14
|
+
events: {
|
|
15
|
+
[evt: string]: CustomEvent<any>;
|
|
16
|
+
};
|
|
17
|
+
slots: {};
|
|
18
|
+
};
|
|
19
|
+
export type LottieProps = typeof __propDef.props;
|
|
20
|
+
export type LottieEvents = typeof __propDef.events;
|
|
21
|
+
export type LottieSlots = typeof __propDef.slots;
|
|
22
|
+
export default class Lottie extends SvelteComponentTyped<LottieProps, LottieEvents, LottieSlots> {
|
|
23
|
+
}
|
|
24
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@txstate-mws/svelte-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"description": "Svelte components that are generically useful.",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"prepublishOnly": "svelte-package",
|
|
7
|
+
"dev": "vite dev",
|
|
8
|
+
"build": "vite build",
|
|
9
|
+
"package": "svelte-package",
|
|
10
|
+
"preview": "vite preview",
|
|
11
|
+
"check": "svelte-check --tsconfig ./tsconfig.json",
|
|
12
|
+
"check:watch": "svelte-check --tsconfig ./tsconfig.json --watch",
|
|
13
|
+
"lint": "eslint --ignore-path .gitignore .",
|
|
14
|
+
"test": "playwright test tests"
|
|
15
|
+
},
|
|
5
16
|
"dependencies": {
|
|
6
17
|
"@txstate-mws/svelte-store": "^1.0.3",
|
|
18
|
+
"lottie-web": "^5.10.2",
|
|
7
19
|
"tabbable": "^6.0.0",
|
|
8
20
|
"txstate-utils": "^1.7.12"
|
|
9
21
|
},
|
|
@@ -11,56 +23,32 @@
|
|
|
11
23
|
"@playwright/test": "^1.18.1",
|
|
12
24
|
"@sveltejs/adapter-auto": "^2.0.0",
|
|
13
25
|
"@sveltejs/kit": "^1.0.1",
|
|
14
|
-
"@sveltejs/package": "^
|
|
26
|
+
"@sveltejs/package": "^2.0.2",
|
|
15
27
|
"@types/tabbable": "^3.1.2",
|
|
16
|
-
"eslint-config-standard-with-typescript": "^
|
|
28
|
+
"eslint-config-standard-with-typescript": "^34.0.0",
|
|
17
29
|
"eslint-plugin-svelte3": "^4.0.0",
|
|
18
|
-
"svelte": "^3.44.0",
|
|
19
30
|
"svelte-check": "^3.0.1",
|
|
20
31
|
"svelte-preprocess": "^5.0.0",
|
|
21
32
|
"svelte2tsx": "^0.6.0",
|
|
22
33
|
"tslib": "^2.3.1",
|
|
23
34
|
"typescript": "^4.4.3"
|
|
24
35
|
},
|
|
36
|
+
"peerDependencies": {
|
|
37
|
+
"svelte": "^3.44.0"
|
|
38
|
+
},
|
|
25
39
|
"type": "module",
|
|
40
|
+
"exports": {
|
|
41
|
+
".": {
|
|
42
|
+
"types": "./dist/index.d.ts",
|
|
43
|
+
"svelte": "./dist/index.js"
|
|
44
|
+
},
|
|
45
|
+
"./package.json": "./package.json"
|
|
46
|
+
},
|
|
47
|
+
"files": ["dist"],
|
|
26
48
|
"repository": {
|
|
27
49
|
"type": "git",
|
|
28
50
|
"url": "git@github.com:txstate-etc/svelte-components.git"
|
|
29
51
|
},
|
|
30
52
|
"author": "Nick Wing",
|
|
31
|
-
"license": "MIT"
|
|
32
|
-
|
|
33
|
-
"./package.json": "./package.json",
|
|
34
|
-
"./actions/buttonify": "./actions/buttonify.js",
|
|
35
|
-
"./actions/elementqueries": "./actions/elementqueries.js",
|
|
36
|
-
"./actions/glue": "./actions/glue.js",
|
|
37
|
-
"./actions": "./actions/index.js",
|
|
38
|
-
"./actions/offset": "./actions/offset.js",
|
|
39
|
-
"./actions/passactions": "./actions/passactions.js",
|
|
40
|
-
"./actions/portal": "./actions/portal.js",
|
|
41
|
-
"./actions/resize": "./actions/resize.js",
|
|
42
|
-
"./actions/sticky": "./actions/sticky.js",
|
|
43
|
-
"./actions/stickyfixed": "./actions/stickyfixed.js",
|
|
44
|
-
"./components/Card.svelte": "./components/Card.svelte",
|
|
45
|
-
"./components/CardLayout.svelte": "./components/CardLayout.svelte",
|
|
46
|
-
"./components/CollapsingTable.svelte": "./components/CollapsingTable.svelte",
|
|
47
|
-
"./components/ConditionalWrapper.svelte": "./components/ConditionalWrapper.svelte",
|
|
48
|
-
"./components/FocusLock.svelte": "./components/FocusLock.svelte",
|
|
49
|
-
"./components/Loading.svelte": "./components/Loading.svelte",
|
|
50
|
-
"./components/Modal.svelte": "./components/Modal.svelte",
|
|
51
|
-
"./components/MultiSelect.svelte": "./components/MultiSelect.svelte",
|
|
52
|
-
"./components/PopupMenu.svelte": "./components/PopupMenu.svelte",
|
|
53
|
-
"./components/ScreenReaderOnly.svelte": "./components/ScreenReaderOnly.svelte",
|
|
54
|
-
"./components": "./components/index.js",
|
|
55
|
-
".": "./index.js",
|
|
56
|
-
"./types/CardLayout": "./types/CardLayout.js",
|
|
57
|
-
"./types/CollapsingTable": "./types/CollapsingTable.js",
|
|
58
|
-
"./types/PopupMenu": "./types/PopupMenu.js",
|
|
59
|
-
"./types": "./types/index.js",
|
|
60
|
-
"./util/bodyoffset": "./util/bodyoffset.js",
|
|
61
|
-
"./util": "./util/index.js",
|
|
62
|
-
"./util/repositioned": "./util/repositioned.js",
|
|
63
|
-
"./util/util": "./util/util.js"
|
|
64
|
-
},
|
|
65
|
-
"svelte": "./index.js"
|
|
66
|
-
}
|
|
53
|
+
"license": "MIT"
|
|
54
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|