@medyll/idae-slotui-svelte 0.109.0 → 0.110.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.
@@ -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 { ElementProps, ExpandProps } from '../../types/index.js';
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
- }: ExpandProps<AlertProps> = $props();
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 { ElementProps } from '../../types/index.js';
2
- declare const Alert: import("svelte").Component<{
3
- level?: ElementProps["levels"] | undefined;
4
- message?: string | undefined;
5
- draggable?: boolean | undefined;
6
- isOpen?: boolean | undefined;
7
- children?: import("svelte").Snippet | undefined;
8
- alertTopButton?: import("svelte").Snippet | undefined;
9
- alertMessage?: import("svelte").Snippet | undefined;
10
- alertButtonZone?: import("svelte").Snippet | undefined;
11
- alertButtonClose?: import("svelte").Snippet | undefined;
12
- 'anchor-for'?: string | undefined;
13
- element?: HTMLElement | undefined;
14
- class?: string | undefined;
15
- style?: string | undefined;
16
- container?: `inline` | `size` | `normal` | undefined;
17
- hideMaxWidth?: string | undefined;
18
- hideMaxHeight?: string | undefined;
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
- }, "level" | "isOpen" | "element">;
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
- }: ExpandProps<AvatarProps> = $props();
38
+ }: AvatarProps = $props();
17
39
 
18
40
  const sizes = {
19
41
  tiny: '2rem',
@@ -1,18 +1,21 @@
1
- declare const Avatar: import("svelte").Component<{
2
- 'anchor-for'?: string | undefined;
3
- element?: HTMLElement | undefined;
4
- class?: string | undefined;
5
- style?: string | undefined;
6
- container?: `inline` | `size` | `normal` | undefined;
7
- hideMaxWidth?: string | undefined;
8
- hideMaxHeight?: string | undefined;
9
- hideMinWidth?: string | undefined;
10
- hideMinHeight?: string | undefined;
11
- children?: (import("svelte").Snippet<[any]> & import("svelte").Snippet<[]>) | undefined;
12
- icon?: string | undefined;
13
- size?: import("../../types/index.js").ElementProps["width"] | undefined;
14
- iconSize?: import("../../types/index.js").ElementProps["iconSize"] | undefined;
15
- avatarBadge?: import("svelte").Snippet | undefined;
16
- }, {}, "element">;
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 { CommonProps, ElementProps } from "../../types/index.js";
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;
@@ -25,6 +25,6 @@ declare const Box: import("svelte").Component<{
25
25
  toggle: () => void;
26
26
  close: () => void;
27
27
  };
28
- }, "isOpen" | "element">;
28
+ }, "element" | "isOpen">;
29
29
  type Box = ReturnType<typeof Box>;
30
30
  export default Box;
@@ -35,6 +35,6 @@ declare const Cartouche: import("svelte").Component<{
35
35
  toggle: (event: Event) => void;
36
36
  close: () => void;
37
37
  };
38
- }, "isOpen" | "element">;
38
+ }, "element" | "isOpen">;
39
39
  type Cartouche = ReturnType<typeof Cartouche>;
40
40
  export default Cartouche;
@@ -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, type ElementProps, type ExpandProps } from '../../types/index.js';
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 { type ElementProps } from '../../types/index.js';
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?: import("../../types/index.js").IconObj | undefined;
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
@@ -1,4 +1,5 @@
1
1
  export * from './componentCite.js';
2
+ export * from './csss/csss.js';
2
3
  export * as windowMinCss from './slotui-css/window.min.css';
3
4
  export * as windowCss from './slotui-css/window.css';
4
5
  export * as treeMinCss from './slotui-css/tree.min.css';
@@ -107,7 +108,6 @@ export * as autoCompleteMinCss from './slotui-css/auto-complete.min.css';
107
108
  export * as autoCompleteCss from './slotui-css/auto-complete.css';
108
109
  export * as alertMinCss from './slotui-css/alert.min.css';
109
110
  export * as alertCss from './slotui-css/alert.css';
110
- export * from './csss/csss.js';
111
111
  export * from './utils/uses/toggler.js';
112
112
  export * from './utils/uses/positioner.js';
113
113
  export * from './utils/uses/navigation.js';
@@ -189,10 +189,6 @@ export { default as BootStrApp } from './ui/bootstrapp/BootStrApp.svelte';
189
189
  export * from './styles/slotuisheet/utils.js';
190
190
  export * from './styles/slotuisheet/types.js';
191
191
  export { default as SlotuiSheet } from './styles/slotuisheet/SlotuiSheet.svelte';
192
- export * from './navigation/tabs/types.js';
193
- export { default as Tabs } from './navigation/tabs/Tabs.svelte';
194
- export * from './navigation/drawer/types.js';
195
- export { default as Drawer } from './navigation/drawer/Drawer.svelte';
196
192
  export * from './data/sorter/types.js';
197
193
  export { default as Sorterer } from './data/sorter/Sorterer.svelte';
198
194
  export { default as Sorter } from './data/sorter/Sorter.svelte';
@@ -212,6 +208,10 @@ export { default as DataListRow } from './data/dataList/DataListRow.svelte';
212
208
  export { default as DataListHead } from './data/dataList/DataListHead.svelte';
213
209
  export { default as DataListCell } from './data/dataList/DataListCell.svelte';
214
210
  export { default as DataList } from './data/dataList/DataList.svelte';
211
+ export * from './navigation/tabs/types.js';
212
+ export { default as Tabs } from './navigation/tabs/Tabs.svelte';
213
+ export * from './navigation/drawer/types.js';
214
+ export { default as Drawer } from './navigation/drawer/Drawer.svelte';
215
215
  export * from './controls/textfield/types.js';
216
216
  export { default as TextField } from './controls/textfield/TextField.svelte';
217
217
  export * from './controls/switch/types.js';
package/dist/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  // auto exports of entry components
2
2
  export * from './componentCite.js';
3
+ export * from './csss/csss.js';
3
4
  export * as windowMinCss from './slotui-css/window.min.css';
4
5
  export * as windowCss from './slotui-css/window.css';
5
6
  export * as treeMinCss from './slotui-css/tree.min.css';
@@ -108,7 +109,6 @@ export * as autoCompleteMinCss from './slotui-css/auto-complete.min.css';
108
109
  export * as autoCompleteCss from './slotui-css/auto-complete.css';
109
110
  export * as alertMinCss from './slotui-css/alert.min.css';
110
111
  export * as alertCss from './slotui-css/alert.css';
111
- export * from './csss/csss.js';
112
112
  export * from './utils/uses/toggler.js';
113
113
  export * from './utils/uses/positioner.js';
114
114
  export * from './utils/uses/navigation.js';
@@ -190,10 +190,6 @@ export { default as BootStrApp } from './ui/bootstrapp/BootStrApp.svelte';
190
190
  export * from './styles/slotuisheet/utils.js';
191
191
  export * from './styles/slotuisheet/types.js';
192
192
  export { default as SlotuiSheet } from './styles/slotuisheet/SlotuiSheet.svelte';
193
- export * from './navigation/tabs/types.js';
194
- export { default as Tabs } from './navigation/tabs/Tabs.svelte';
195
- export * from './navigation/drawer/types.js';
196
- export { default as Drawer } from './navigation/drawer/Drawer.svelte';
197
193
  export * from './data/sorter/types.js';
198
194
  export { default as Sorterer } from './data/sorter/Sorterer.svelte';
199
195
  export { default as Sorter } from './data/sorter/Sorter.svelte';
@@ -213,6 +209,10 @@ export { default as DataListRow } from './data/dataList/DataListRow.svelte';
213
209
  export { default as DataListHead } from './data/dataList/DataListHead.svelte';
214
210
  export { default as DataListCell } from './data/dataList/DataListCell.svelte';
215
211
  export { default as DataList } from './data/dataList/DataList.svelte';
212
+ export * from './navigation/tabs/types.js';
213
+ export { default as Tabs } from './navigation/tabs/Tabs.svelte';
214
+ export * from './navigation/drawer/types.js';
215
+ export { default as Drawer } from './navigation/drawer/Drawer.svelte';
216
216
  export * from './controls/textfield/types.js';
217
217
  export { default as TextField } from './controls/textfield/TextField.svelte';
218
218
  export * from './controls/switch/types.js';
@@ -36,7 +36,7 @@ declare class __sveltets_Render<T> {
36
36
  };
37
37
  events(): {};
38
38
  slots(): {};
39
- bindings(): "flow" | "isOpen" | "element" | "hideCloseIcon" | "stickTo";
39
+ bindings(): "flow" | "element" | "isOpen" | "hideCloseIcon" | "stickTo";
40
40
  exports(): {
41
41
  /** @deprecated use actions.toggle */ actions: {
42
42
  toggle: (visibleSate?: boolean) => void;
@@ -3004,6 +3004,19 @@ label {
3004
3004
  color: var(--stepper-active-color);
3005
3005
  }
3006
3006
 
3007
+ /** select.scss ----------------*/
3008
+ :root {
3009
+ --select-background-color: var(--sld-color-background);
3010
+ --select-radius: var(--sld-radius-small);
3011
+ }
3012
+
3013
+ .select {
3014
+ background-color: var(--select-background-color);
3015
+ height: 160px;
3016
+ width: 160px;
3017
+ border-radius: var(--select-radius);
3018
+ }
3019
+
3007
3020
  /** slider.scss ----------------*/
3008
3021
  :root {
3009
3022
  --slider-background-color: var(--sld-color-background);
@@ -3080,19 +3093,6 @@ label {
3080
3093
  outline: 4px solid var(--slider-thumb-hover-outline);
3081
3094
  }
3082
3095
 
3083
- /** select.scss ----------------*/
3084
- :root {
3085
- --select-background-color: var(--sld-color-background);
3086
- --select-radius: var(--sld-radius-small);
3087
- }
3088
-
3089
- .select {
3090
- background-color: var(--select-background-color);
3091
- height: 160px;
3092
- width: 160px;
3093
- border-radius: var(--select-radius);
3094
- }
3095
-
3096
3096
  /** rating.scss ----------------*/
3097
3097
  :root {
3098
3098
  --rating-gap: var(--sld-gap-small);
@@ -3004,6 +3004,19 @@ label {
3004
3004
  color: var(--stepper-active-color);
3005
3005
  }
3006
3006
 
3007
+ /** select.scss ----------------*/
3008
+ :root {
3009
+ --select-background-color: var(--sld-color-background);
3010
+ --select-radius: var(--sld-radius-small);
3011
+ }
3012
+
3013
+ .select {
3014
+ background-color: var(--select-background-color);
3015
+ height: 160px;
3016
+ width: 160px;
3017
+ border-radius: var(--select-radius);
3018
+ }
3019
+
3007
3020
  /** slider.scss ----------------*/
3008
3021
  :root {
3009
3022
  --slider-background-color: var(--sld-color-background);
@@ -3080,19 +3093,6 @@ label {
3080
3093
  outline: 4px solid var(--slider-thumb-hover-outline);
3081
3094
  }
3082
3095
 
3083
- /** select.scss ----------------*/
3084
- :root {
3085
- --select-background-color: var(--sld-color-background);
3086
- --select-radius: var(--sld-radius-small);
3087
- }
3088
-
3089
- .select {
3090
- background-color: var(--select-background-color);
3091
- height: 160px;
3092
- width: 160px;
3093
- border-radius: var(--select-radius);
3094
- }
3095
-
3096
3096
  /** rating.scss ----------------*/
3097
3097
  :root {
3098
3098
  --rating-gap: var(--sld-gap-small);
@@ -10,6 +10,6 @@ declare const Popper: import("svelte").Component<PopperProps, {
10
10
  };
11
11
  clickedAway: () => void;
12
12
  useStickTo: (node: HTMLElement) => void;
13
- }, "isOpen" | "element" | "autoClose">;
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.109.0",
3
+ "version": "0.110.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.17.0",
92
- "@medyll/idae-engine": "^1.106.0",
92
+ "@medyll/idae-be": "^1.18.0",
93
+ "@medyll/idae-engine": "^1.107.0",
93
94
  "d3": "^7.9.0",
94
95
  "lerna": "^8.2.1",
95
96
  "npm-check-updates": "^17.1.16",