@medyll/idae-slotui-svelte 0.109.0 → 0.111.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/dist/base/alert/Alert.svelte +30 -9
- package/dist/base/alert/Alert.svelte.d.ts +19 -22
- package/dist/base/avatar/Avatar.svelte +25 -3
- package/dist/base/avatar/Avatar.svelte.d.ts +19 -16
- package/dist/base/avatar/types.d.ts +1 -18
- package/dist/base/box/Box.svelte.d.ts +1 -1
- package/dist/base/cartouche/Cartouche.svelte.d.ts +1 -1
- package/dist/base/icon/Icon.svelte +70 -2
- package/dist/base/icon/Icon.svelte.d.ts +57 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/navigation/drawer/Drawer.svelte.d.ts +1 -1
- package/dist/ui/popper/Popper.svelte.d.ts +1 -1
- package/package.json +4 -3
|
@@ -1,18 +1,33 @@
|
|
|
1
|
+
<script module lang="ts">
|
|
2
|
+
import type { Snippet } from "svelte";
|
|
3
|
+
import type { ElementProps, CommonProps } from '../../types/index.js';
|
|
4
|
+
|
|
5
|
+
export interface AlertProps extends CommonProps {
|
|
6
|
+
/** alert level */
|
|
7
|
+
level?: ElementProps["levels"];
|
|
8
|
+
/** message to be shown */
|
|
9
|
+
message?: string;
|
|
10
|
+
/** make the alert draggable */
|
|
11
|
+
draggable?: boolean;
|
|
12
|
+
/** show or hide the alert */
|
|
13
|
+
isOpen?: boolean;
|
|
14
|
+
children?: Snippet;
|
|
15
|
+
alertTopButton?: Snippet;
|
|
16
|
+
alertMessage?: Snippet;
|
|
17
|
+
alertButtonZone?: Snippet;
|
|
18
|
+
alertButtonClose?: Snippet;
|
|
19
|
+
}
|
|
20
|
+
</script>
|
|
21
|
+
|
|
1
22
|
<script lang="ts">
|
|
2
23
|
import { fade } from 'svelte/transition';
|
|
3
24
|
import Divider from '../divider/Divider.svelte';
|
|
4
25
|
import Button from '../../controls/button/Button.svelte';
|
|
5
|
-
import type {
|
|
6
|
-
import type { AlertProps } from './types.js';
|
|
26
|
+
import type { ExpandProps } from '../../types/index.js';
|
|
27
|
+
// import type { AlertProps } from './types.js';
|
|
7
28
|
import Slotted from '../../utils/slotted/Slotted.svelte';
|
|
8
29
|
import IconButton from '../../controls/button/IconButton.svelte';
|
|
9
30
|
|
|
10
|
-
export const actions: Record<'open' | 'toggle' | 'close', Function> = {
|
|
11
|
-
open,
|
|
12
|
-
toggle,
|
|
13
|
-
close
|
|
14
|
-
};
|
|
15
|
-
|
|
16
31
|
let {
|
|
17
32
|
class: className,
|
|
18
33
|
message,
|
|
@@ -25,7 +40,13 @@
|
|
|
25
40
|
alertMessage,
|
|
26
41
|
alertButtonZone,
|
|
27
42
|
alertButtonClose
|
|
28
|
-
}:
|
|
43
|
+
}: AlertProps = $props();
|
|
44
|
+
|
|
45
|
+
export const actions: Record<'open' | 'toggle' | 'close', Function> = {
|
|
46
|
+
open,
|
|
47
|
+
toggle,
|
|
48
|
+
close
|
|
49
|
+
};
|
|
29
50
|
|
|
30
51
|
const handleClick = (event: Event) => {
|
|
31
52
|
if ((event?.target as Element)?.getAttribute('data-close')) {
|
|
@@ -1,25 +1,22 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
hideMinWidth?: string | undefined;
|
|
20
|
-
hideMinHeight?: string | undefined;
|
|
21
|
-
}, {
|
|
1
|
+
import type { Snippet } from "svelte";
|
|
2
|
+
import type { ElementProps, CommonProps } from '../../types/index.js';
|
|
3
|
+
export interface AlertProps extends CommonProps {
|
|
4
|
+
/** alert level */
|
|
5
|
+
level?: ElementProps["levels"];
|
|
6
|
+
/** message to be shown */
|
|
7
|
+
message?: string;
|
|
8
|
+
/** make the alert draggable */
|
|
9
|
+
draggable?: boolean;
|
|
10
|
+
/** show or hide the alert */
|
|
11
|
+
isOpen?: boolean;
|
|
12
|
+
children?: Snippet;
|
|
13
|
+
alertTopButton?: Snippet;
|
|
14
|
+
alertMessage?: Snippet;
|
|
15
|
+
alertButtonZone?: Snippet;
|
|
16
|
+
alertButtonClose?: Snippet;
|
|
17
|
+
}
|
|
18
|
+
declare const Alert: import("svelte").Component<AlertProps, {
|
|
22
19
|
actions: Record<"open" | "toggle" | "close", Function>;
|
|
23
|
-
}, "
|
|
20
|
+
}, "element" | "isOpen" | "level">;
|
|
24
21
|
type Alert = ReturnType<typeof Alert>;
|
|
25
22
|
export default Alert;
|
|
@@ -1,7 +1,29 @@
|
|
|
1
|
+
<script module lang="ts" >
|
|
2
|
+
import type { Snippet } from "svelte";
|
|
3
|
+
import type { CommonProps,ElementProps } from '../../types/index.js';
|
|
4
|
+
|
|
5
|
+
export interface AvatarProps {
|
|
6
|
+
/** icon name */
|
|
7
|
+
icon?: string;
|
|
8
|
+
/**
|
|
9
|
+
* size of the avatar
|
|
10
|
+
*/
|
|
11
|
+
size?: ElementProps["width"];
|
|
12
|
+
/**
|
|
13
|
+
* size of the icon
|
|
14
|
+
*/
|
|
15
|
+
iconSize?: ElementProps["iconSize"];
|
|
16
|
+
element?: HTMLElement;
|
|
17
|
+
class?: string;
|
|
18
|
+
children?: Snippet;
|
|
19
|
+
avatarBadge?: Snippet;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
</script>
|
|
23
|
+
|
|
1
24
|
<script lang="ts">
|
|
2
25
|
import Icon from '../icon/Icon.svelte';
|
|
3
|
-
import type { ExpandProps } from '../../types/index.js';
|
|
4
|
-
import type { AvatarProps } from './types.js';
|
|
26
|
+
import type { ExpandProps } from '../../types/index.js';
|
|
5
27
|
import Content from '../../utils/content/Content.svelte';
|
|
6
28
|
|
|
7
29
|
let {
|
|
@@ -13,7 +35,7 @@
|
|
|
13
35
|
children,
|
|
14
36
|
avatarBadge,
|
|
15
37
|
...rest
|
|
16
|
-
}:
|
|
38
|
+
}: AvatarProps = $props();
|
|
17
39
|
|
|
18
40
|
const sizes = {
|
|
19
41
|
tiny: '2rem',
|
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
import type { Snippet } from "svelte";
|
|
2
|
+
import type { ElementProps } from '../../types/index.js';
|
|
3
|
+
export interface AvatarProps {
|
|
4
|
+
/** icon name */
|
|
5
|
+
icon?: string;
|
|
6
|
+
/**
|
|
7
|
+
* size of the avatar
|
|
8
|
+
*/
|
|
9
|
+
size?: ElementProps["width"];
|
|
10
|
+
/**
|
|
11
|
+
* size of the icon
|
|
12
|
+
*/
|
|
13
|
+
iconSize?: ElementProps["iconSize"];
|
|
14
|
+
element?: HTMLElement;
|
|
15
|
+
class?: string;
|
|
16
|
+
children?: Snippet;
|
|
17
|
+
avatarBadge?: Snippet;
|
|
18
|
+
}
|
|
19
|
+
declare const Avatar: import("svelte").Component<AvatarProps, {}, "element">;
|
|
17
20
|
type Avatar = ReturnType<typeof Avatar>;
|
|
18
21
|
export default Avatar;
|
|
@@ -7,23 +7,6 @@ export declare enum statusPreset {
|
|
|
7
7
|
info = "info",
|
|
8
8
|
discrete = "discrete"
|
|
9
9
|
}
|
|
10
|
-
import type {
|
|
11
|
-
import type { Snippet } from "svelte";
|
|
12
|
-
export type AvatarProps = CommonProps & {
|
|
13
|
-
/** icon name */
|
|
14
|
-
icon?: string;
|
|
15
|
-
/**
|
|
16
|
-
* size of the avatar
|
|
17
|
-
*/
|
|
18
|
-
size?: ElementProps["width"];
|
|
19
|
-
/**
|
|
20
|
-
* size of the icon
|
|
21
|
-
*/
|
|
22
|
-
iconSize?: ElementProps["iconSize"];
|
|
23
|
-
element?: HTMLElement;
|
|
24
|
-
class?: string;
|
|
25
|
-
children?: Snippet;
|
|
26
|
-
avatarBadge?: Snippet;
|
|
27
|
-
};
|
|
10
|
+
import type { AvatarProps } from "./Avatar.svelte";
|
|
28
11
|
export declare const AvatarDemoValues: DemoerStoryProps<AvatarProps>;
|
|
29
12
|
export declare let parameters: DemoerStoryProps<AvatarProps>, componentArgs: AvatarProps;
|
|
@@ -1,6 +1,74 @@
|
|
|
1
|
+
<script module lang="ts">
|
|
2
|
+
import type { ElementProps, IconObj } from "../../types/index.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Properties for the IconApp component.
|
|
6
|
+
*/
|
|
7
|
+
export type IconAppProps = {
|
|
8
|
+
/**
|
|
9
|
+
* Icon name for Iconify.
|
|
10
|
+
* @param icon
|
|
11
|
+
*/
|
|
12
|
+
icon?: ElementProps["icon"];
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Class name of the root component.
|
|
16
|
+
* @param class
|
|
17
|
+
*/
|
|
18
|
+
class?: string;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* CSS style of the root component.
|
|
22
|
+
* @param style
|
|
23
|
+
*/
|
|
24
|
+
style?: string;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Root HTMLDivElement properties.
|
|
28
|
+
* @param element
|
|
29
|
+
*/
|
|
30
|
+
element?: HTMLDivElement | null | any;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Icon object for Iconify, replaces and invalidates `icon` prop.
|
|
34
|
+
* @param ico
|
|
35
|
+
*/
|
|
36
|
+
ico?: IconObj;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Icon size.
|
|
40
|
+
* @param iconSize
|
|
41
|
+
*/
|
|
42
|
+
iconSize?: ElementProps["iconSize"];
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Rotate icon.
|
|
46
|
+
* @param rotate
|
|
47
|
+
*/
|
|
48
|
+
rotate?: boolean;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Icon color.
|
|
52
|
+
* @param color
|
|
53
|
+
*/
|
|
54
|
+
color?: string;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Icon rotation.
|
|
58
|
+
* @param rotation
|
|
59
|
+
*/
|
|
60
|
+
rotation?: number;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Display property for the icon.
|
|
64
|
+
* @param display
|
|
65
|
+
*/
|
|
66
|
+
display?: "block" | "inline-block" | "inline";
|
|
67
|
+
};
|
|
68
|
+
</script>
|
|
69
|
+
|
|
1
70
|
<script lang="ts">
|
|
2
|
-
import { iconFontSize,
|
|
3
|
-
import type { IconAppProps } from './types.js';
|
|
71
|
+
import { iconFontSize, type ExpandProps } from '../../types/index.js';
|
|
4
72
|
import Iconify from '@iconify/svelte';
|
|
5
73
|
|
|
6
74
|
let {
|
|
@@ -1,10 +1,65 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ElementProps, IconObj } from "../../types/index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Properties for the IconApp component.
|
|
4
|
+
*/
|
|
5
|
+
export type IconAppProps = {
|
|
6
|
+
/**
|
|
7
|
+
* Icon name for Iconify.
|
|
8
|
+
* @param icon
|
|
9
|
+
*/
|
|
10
|
+
icon?: ElementProps["icon"];
|
|
11
|
+
/**
|
|
12
|
+
* Class name of the root component.
|
|
13
|
+
* @param class
|
|
14
|
+
*/
|
|
15
|
+
class?: string;
|
|
16
|
+
/**
|
|
17
|
+
* CSS style of the root component.
|
|
18
|
+
* @param style
|
|
19
|
+
*/
|
|
20
|
+
style?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Root HTMLDivElement properties.
|
|
23
|
+
* @param element
|
|
24
|
+
*/
|
|
25
|
+
element?: HTMLDivElement | null | any;
|
|
26
|
+
/**
|
|
27
|
+
* Icon object for Iconify, replaces and invalidates `icon` prop.
|
|
28
|
+
* @param ico
|
|
29
|
+
*/
|
|
30
|
+
ico?: IconObj;
|
|
31
|
+
/**
|
|
32
|
+
* Icon size.
|
|
33
|
+
* @param iconSize
|
|
34
|
+
*/
|
|
35
|
+
iconSize?: ElementProps["iconSize"];
|
|
36
|
+
/**
|
|
37
|
+
* Rotate icon.
|
|
38
|
+
* @param rotate
|
|
39
|
+
*/
|
|
40
|
+
rotate?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Icon color.
|
|
43
|
+
* @param color
|
|
44
|
+
*/
|
|
45
|
+
color?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Icon rotation.
|
|
48
|
+
* @param rotation
|
|
49
|
+
*/
|
|
50
|
+
rotation?: number;
|
|
51
|
+
/**
|
|
52
|
+
* Display property for the icon.
|
|
53
|
+
* @param display
|
|
54
|
+
*/
|
|
55
|
+
display?: "block" | "inline-block" | "inline";
|
|
56
|
+
};
|
|
2
57
|
declare const Icon: import("svelte").Component<{
|
|
3
58
|
icon?: ElementProps["icon"] | undefined;
|
|
4
59
|
class?: string | undefined;
|
|
5
60
|
style?: string | undefined;
|
|
6
61
|
element?: HTMLDivElement | null | any;
|
|
7
|
-
ico?:
|
|
62
|
+
ico?: IconObj | undefined;
|
|
8
63
|
iconSize?: ElementProps["iconSize"] | undefined;
|
|
9
64
|
rotate?: boolean | undefined;
|
|
10
65
|
color?: string | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -253,12 +253,12 @@ export { default as DemoerCode } from './base/demoer/DemoerCode.svelte';
|
|
|
253
253
|
export { default as Demoer } from './base/demoer/Demoer.svelte';
|
|
254
254
|
export { default as DemoPage } from './base/demoer/DemoPage.svelte';
|
|
255
255
|
export { default as Debug } from './base/debug/Debug.svelte';
|
|
256
|
-
export * from './base/contentSwitcher/useContentSwitcher.js';
|
|
257
|
-
export * from './base/contentSwitcher/types.js';
|
|
258
|
-
export { default as ContentSwitcher } from './base/contentSwitcher/ContentSwitcher.svelte';
|
|
259
256
|
export * from './base/columner/types.js';
|
|
260
257
|
export { default as Columner } from './base/columner/Columner.svelte';
|
|
261
258
|
export { default as Column } from './base/columner/Column.svelte';
|
|
259
|
+
export * from './base/contentSwitcher/useContentSwitcher.js';
|
|
260
|
+
export * from './base/contentSwitcher/types.js';
|
|
261
|
+
export { default as ContentSwitcher } from './base/contentSwitcher/ContentSwitcher.svelte';
|
|
262
262
|
export * from './base/chipper/types.js';
|
|
263
263
|
export { default as Chipper } from './base/chipper/Chipper.svelte';
|
|
264
264
|
export * from './base/cartouche/types.js';
|
package/dist/index.js
CHANGED
|
@@ -254,12 +254,12 @@ export { default as DemoerCode } from './base/demoer/DemoerCode.svelte';
|
|
|
254
254
|
export { default as Demoer } from './base/demoer/Demoer.svelte';
|
|
255
255
|
export { default as DemoPage } from './base/demoer/DemoPage.svelte';
|
|
256
256
|
export { default as Debug } from './base/debug/Debug.svelte';
|
|
257
|
-
export * from './base/contentSwitcher/useContentSwitcher.js';
|
|
258
|
-
export * from './base/contentSwitcher/types.js';
|
|
259
|
-
export { default as ContentSwitcher } from './base/contentSwitcher/ContentSwitcher.svelte';
|
|
260
257
|
export * from './base/columner/types.js';
|
|
261
258
|
export { default as Columner } from './base/columner/Columner.svelte';
|
|
262
259
|
export { default as Column } from './base/columner/Column.svelte';
|
|
260
|
+
export * from './base/contentSwitcher/useContentSwitcher.js';
|
|
261
|
+
export * from './base/contentSwitcher/types.js';
|
|
262
|
+
export { default as ContentSwitcher } from './base/contentSwitcher/ContentSwitcher.svelte';
|
|
263
263
|
export * from './base/chipper/types.js';
|
|
264
264
|
export { default as Chipper } from './base/chipper/Chipper.svelte';
|
|
265
265
|
export * from './base/cartouche/types.js';
|
|
@@ -36,7 +36,7 @@ declare class __sveltets_Render<T> {
|
|
|
36
36
|
};
|
|
37
37
|
events(): {};
|
|
38
38
|
slots(): {};
|
|
39
|
-
bindings(): "flow" | "
|
|
39
|
+
bindings(): "flow" | "element" | "isOpen" | "hideCloseIcon" | "stickTo";
|
|
40
40
|
exports(): {
|
|
41
41
|
/** @deprecated use actions.toggle */ actions: {
|
|
42
42
|
toggle: (visibleSate?: boolean) => void;
|
|
@@ -10,6 +10,6 @@ declare const Popper: import("svelte").Component<PopperProps, {
|
|
|
10
10
|
};
|
|
11
11
|
clickedAway: () => void;
|
|
12
12
|
useStickTo: (node: HTMLElement) => void;
|
|
13
|
-
}, "
|
|
13
|
+
}, "element" | "autoClose" | "isOpen">;
|
|
14
14
|
type Popper = ReturnType<typeof Popper>;
|
|
15
15
|
export default Popper;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medyll/idae-slotui-svelte",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.111.0",
|
|
4
4
|
"scope": "@medyll",
|
|
5
5
|
"description": "A Svelte 5 component library for building modular and reactive user interfaces.",
|
|
6
6
|
"scripts": {
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"format": "prettier --write .",
|
|
18
18
|
"test:integration": "playwright test",
|
|
19
19
|
"test:unit": "vitest",
|
|
20
|
+
"test:unit:docs": "vitest src/tests/docs.test.js",
|
|
20
21
|
"publish": "npm run package",
|
|
21
22
|
"build-docs:watch": "nodemon --watch ./src/lib --watch ./build-docs.js --ignore **/docs/** --ignore ./src/lib/svelte.index.js --ext svelte --ext scss --delay 2.5 build-docs.js",
|
|
22
23
|
"rename-scss": "node scripts/rename-scss-files.js",
|
|
@@ -88,8 +89,8 @@
|
|
|
88
89
|
"dependencies": {
|
|
89
90
|
"@iconify/svelte": "^4.2.0",
|
|
90
91
|
"@medyll/cssfabric": "^0.4.2",
|
|
91
|
-
"@medyll/idae-be": "^1.
|
|
92
|
-
"@medyll/idae-engine": "^1.
|
|
92
|
+
"@medyll/idae-be": "^1.19.0",
|
|
93
|
+
"@medyll/idae-engine": "^1.108.0",
|
|
93
94
|
"d3": "^7.9.0",
|
|
94
95
|
"lerna": "^8.2.1",
|
|
95
96
|
"npm-check-updates": "^17.1.16",
|