@ims360/svelte-ivory 0.0.20 → 0.0.22
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/layout/index.d.ts +1 -1
- package/dist/components/layout/index.d.ts.map +1 -1
- package/dist/components/layout/tooltip/Tooltip.svelte +6 -13
- package/dist/components/layout/tooltip/Tooltip.svelte.d.ts +2 -5
- package/dist/components/layout/tooltip/Tooltip.svelte.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/types.d.ts +4 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +1 -0
- package/package.json +56 -54
- package/src/lib/components/layout/index.ts +1 -1
- package/src/lib/components/layout/tooltip/Tooltip.svelte +6 -13
- package/src/lib/index.ts +1 -0
- package/src/lib/types.ts +5 -0
|
@@ -5,5 +5,5 @@ export { default as Modal, type ModalProps } from './modal/Modal.svelte';
|
|
|
5
5
|
export { default as Popover } from './popover/Popover.svelte';
|
|
6
6
|
export { default as Portal, setConfig, type PortalConfig } from './portal/Portal.svelte';
|
|
7
7
|
export { default as Tabs } from './tabs/index';
|
|
8
|
-
export { default as Tooltip } from './tooltip/Tooltip.svelte';
|
|
8
|
+
export { default as Tooltip, type Props as TooltipProps } from './tooltip/Tooltip.svelte';
|
|
9
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/components/layout/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,SAAS,EAAE,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACzF,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,0BAA0B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/components/layout/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,SAAS,EAAE,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACzF,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,KAAK,KAAK,IAAI,YAAY,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<script lang="ts" module>
|
|
2
|
+
import type { IvoryComponent } from '../../../types';
|
|
2
3
|
import clsx from 'clsx';
|
|
3
4
|
import type { Snippet } from 'svelte';
|
|
4
5
|
import type { ClassValue } from 'svelte/elements';
|
|
@@ -6,16 +7,12 @@
|
|
|
6
7
|
import Popover, { type PopoverPlacement } from '../popover/Popover.svelte';
|
|
7
8
|
import Portal from '../portal/Portal.svelte';
|
|
8
9
|
|
|
9
|
-
export interface Props {
|
|
10
|
+
export interface Props extends IvoryComponent<HTMLElement> {
|
|
10
11
|
children?: Snippet;
|
|
11
12
|
/** The content of the tooltip */
|
|
12
13
|
tooltip: string | Snippet;
|
|
13
|
-
/** The class of the element that triggers the tooltip */
|
|
14
|
-
class?: ClassValue;
|
|
15
14
|
/** The class of the tooltip itself */
|
|
16
15
|
tooltipClass?: ClassValue;
|
|
17
|
-
style?: string;
|
|
18
|
-
onclick?: (e: Event) => void;
|
|
19
16
|
/** If the href is set, the resulting element will be a link to the href */
|
|
20
17
|
href?: string;
|
|
21
18
|
/**
|
|
@@ -37,13 +34,11 @@
|
|
|
37
34
|
let {
|
|
38
35
|
children,
|
|
39
36
|
tooltip,
|
|
40
|
-
class: clazz,
|
|
41
|
-
style,
|
|
42
|
-
onclick,
|
|
43
37
|
href,
|
|
44
38
|
timeout = 500,
|
|
45
39
|
tooltipClass,
|
|
46
|
-
placement = 'top'
|
|
40
|
+
placement = 'top',
|
|
41
|
+
...rest
|
|
47
42
|
}: Props = $props();
|
|
48
43
|
|
|
49
44
|
let target = $state<HTMLElement>();
|
|
@@ -77,14 +72,12 @@
|
|
|
77
72
|
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
78
73
|
<svelte:element
|
|
79
74
|
this={href ? 'a' : onclick ? 'button' : 'div'}
|
|
80
|
-
{href}
|
|
81
75
|
type={onclick ? 'button' : undefined}
|
|
82
|
-
|
|
76
|
+
{...rest}
|
|
77
|
+
{href}
|
|
83
78
|
bind:this={target}
|
|
84
79
|
{onmouseenter}
|
|
85
80
|
{onmouseleave}
|
|
86
|
-
{style}
|
|
87
|
-
{onclick}
|
|
88
81
|
>
|
|
89
82
|
{@render children?.()}
|
|
90
83
|
</svelte:element>
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
+
import type { IvoryComponent } from '../../../types';
|
|
1
2
|
import type { Snippet } from 'svelte';
|
|
2
3
|
import type { ClassValue } from 'svelte/elements';
|
|
3
4
|
import { type PopoverPlacement } from '../popover/Popover.svelte';
|
|
4
|
-
export interface Props {
|
|
5
|
+
export interface Props extends IvoryComponent<HTMLElement> {
|
|
5
6
|
children?: Snippet;
|
|
6
7
|
/** The content of the tooltip */
|
|
7
8
|
tooltip: string | Snippet;
|
|
8
|
-
/** The class of the element that triggers the tooltip */
|
|
9
|
-
class?: ClassValue;
|
|
10
9
|
/** The class of the tooltip itself */
|
|
11
10
|
tooltipClass?: ClassValue;
|
|
12
|
-
style?: string;
|
|
13
|
-
onclick?: (e: Event) => void;
|
|
14
11
|
/** If the href is set, the resulting element will be a link to the href */
|
|
15
12
|
href?: string;
|
|
16
13
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/layout/tooltip/Tooltip.svelte.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Tooltip.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/layout/tooltip/Tooltip.svelte.ts"],"names":[],"mappings":"AAGI,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAgB,EAAE,KAAK,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAG3E,MAAM,WAAW,KAAM,SAAQ,cAAc,CAAC,WAAW,CAAC;IACtD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iCAAiC;IACjC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;IAC1B,sCAAsC;IACtC,YAAY,CAAC,EAAE,UAAU,CAAC;IAC1B,2EAA2E;IAC3E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,SAAS,CAAC,EAAE,gBAAgB,CAAC;CAChC;AAgEL,kEAAkE;AAClE,QAAA,MAAM,OAAO,2CAAwC,CAAC;AACtD,KAAK,OAAO,GAAG,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC;AAC1C,eAAe,OAAO,CAAC"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/lib/index.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/lib/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,SAAS,CAAC"}
|
package/dist/index.js
CHANGED
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/lib/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGtD,MAAM,WAAW,cAAc,CAAC,WAAW,SAAS,WAAW,CAC3D,SAAQ,cAAc,CAAC,WAAW,CAAC;CAAG"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,41 +1,14 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"@tailwindcss/vite": "^4.1.4",
|
|
13
|
-
"@testing-library/jest-dom": "^6.6.3",
|
|
14
|
-
"@testing-library/svelte": "^5.2.4",
|
|
15
|
-
"@testing-library/user-event": "^14.6.1",
|
|
16
|
-
"@vitest/browser": "^3.1.1",
|
|
17
|
-
"@vitest/coverage-v8": "^3.1.1",
|
|
18
|
-
"@vitest/spy": "^3.1.2",
|
|
19
|
-
"dompurify": "^3.2.5",
|
|
20
|
-
"eslint": "^9.18.0",
|
|
21
|
-
"eslint-config-prettier": "^10.0.1",
|
|
22
|
-
"eslint-plugin-svelte": "^3.0.0",
|
|
23
|
-
"globals": "^16.0.0",
|
|
24
|
-
"jsdom": "^26.0.0",
|
|
25
|
-
"marked": "^15.0.11",
|
|
26
|
-
"playwright": "^1.51.1",
|
|
27
|
-
"prettier": "^3.4.2",
|
|
28
|
-
"prettier-plugin-svelte": "^3.3.3",
|
|
29
|
-
"prettier-plugin-tailwindcss": "^0.6.11",
|
|
30
|
-
"publint": "^0.3.2",
|
|
31
|
-
"svelte-check": "^4.0.0",
|
|
32
|
-
"tailwind-merge": "^3.2.0",
|
|
33
|
-
"tailwindcss": "^4.0.0",
|
|
34
|
-
"typescript": "^5.0.0",
|
|
35
|
-
"typescript-eslint": "^8.20.0",
|
|
36
|
-
"vite": "^6.0.0",
|
|
37
|
-
"vitest": "^3.0.0"
|
|
38
|
-
},
|
|
2
|
+
"name": "@ims360/svelte-ivory",
|
|
3
|
+
"version": "0.0.22",
|
|
4
|
+
"keywords": [
|
|
5
|
+
"svelte"
|
|
6
|
+
],
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"sideEffects": [
|
|
9
|
+
"**/*.css"
|
|
10
|
+
],
|
|
11
|
+
"type": "module",
|
|
39
12
|
"exports": {
|
|
40
13
|
".": {
|
|
41
14
|
"types": "./dist/index.d.ts",
|
|
@@ -70,6 +43,8 @@
|
|
|
70
43
|
"svelte": "./dist/utils/functions/index.js"
|
|
71
44
|
}
|
|
72
45
|
},
|
|
46
|
+
"svelte": "./dist/index.js",
|
|
47
|
+
"types": "./dist/index.d.ts",
|
|
73
48
|
"files": [
|
|
74
49
|
"dist",
|
|
75
50
|
"src/lib",
|
|
@@ -78,16 +53,6 @@
|
|
|
78
53
|
"!src/lib/**/*.test.*",
|
|
79
54
|
"!src/lib/**/*.spec.*"
|
|
80
55
|
],
|
|
81
|
-
"keywords": [
|
|
82
|
-
"svelte"
|
|
83
|
-
],
|
|
84
|
-
"license": "MIT",
|
|
85
|
-
"name": "@ims360/svelte-ivory",
|
|
86
|
-
"peerDependencies": {
|
|
87
|
-
"@skeletonlabs/skeleton": "^3.1.1",
|
|
88
|
-
"@sveltejs/kit": "^2.16.0",
|
|
89
|
-
"svelte": "^5.0.0"
|
|
90
|
-
},
|
|
91
56
|
"scripts": {
|
|
92
57
|
"build": "vite build && npm run prepack",
|
|
93
58
|
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
|
@@ -101,11 +66,48 @@
|
|
|
101
66
|
"test": "npm run test:unit -- --run",
|
|
102
67
|
"test:unit": "vitest"
|
|
103
68
|
},
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
69
|
+
"dependencies": {
|
|
70
|
+
"@floating-ui/dom": "^1.6.13",
|
|
71
|
+
"@lucide/svelte": "^0.503.0",
|
|
72
|
+
"@tailwindcss/forms": "^0.5.10",
|
|
73
|
+
"@tailwindcss/typography": "^0.5.16",
|
|
74
|
+
"@tailwindcss/vite": "^4.1.4",
|
|
75
|
+
"dompurify": "^3.2.5",
|
|
76
|
+
"jsdom": "^26.0.0",
|
|
77
|
+
"marked": "^15.0.11",
|
|
78
|
+
"tailwind-merge": "^3.2.0",
|
|
79
|
+
"tailwindcss": "^4.0.0"
|
|
80
|
+
},
|
|
81
|
+
"devDependencies": {
|
|
82
|
+
"@eslint/compat": "^1.2.5",
|
|
83
|
+
"@eslint/js": "^9.18.0",
|
|
84
|
+
"@sveltejs/adapter-auto": "^4.0.0",
|
|
85
|
+
"@sveltejs/package": "^2.0.0",
|
|
86
|
+
"@sveltejs/vite-plugin-svelte": "^5.0.0",
|
|
87
|
+
"@testing-library/jest-dom": "^6.6.3",
|
|
88
|
+
"@testing-library/svelte": "^5.2.4",
|
|
89
|
+
"@testing-library/user-event": "^14.6.1",
|
|
90
|
+
"@vitest/browser": "^3.1.1",
|
|
91
|
+
"@vitest/coverage-v8": "^3.1.1",
|
|
92
|
+
"@vitest/spy": "^3.1.2",
|
|
93
|
+
"eslint": "^9.18.0",
|
|
94
|
+
"eslint-config-prettier": "^10.0.1",
|
|
95
|
+
"eslint-plugin-svelte": "^3.0.0",
|
|
96
|
+
"globals": "^16.0.0",
|
|
97
|
+
"playwright": "^1.51.1",
|
|
98
|
+
"prettier": "^3.4.2",
|
|
99
|
+
"prettier-plugin-svelte": "^3.3.3",
|
|
100
|
+
"prettier-plugin-tailwindcss": "^0.6.11",
|
|
101
|
+
"publint": "^0.3.2",
|
|
102
|
+
"svelte-check": "^4.0.0",
|
|
103
|
+
"typescript": "^5.0.0",
|
|
104
|
+
"typescript-eslint": "^8.20.0",
|
|
105
|
+
"vite": "^6.0.0",
|
|
106
|
+
"vitest": "^3.0.0"
|
|
107
|
+
},
|
|
108
|
+
"peerDependencies": {
|
|
109
|
+
"@skeletonlabs/skeleton": "^3.1.1",
|
|
110
|
+
"@sveltejs/kit": "^2.16.0",
|
|
111
|
+
"svelte": "^5.0.0"
|
|
112
|
+
}
|
|
111
113
|
}
|
|
@@ -5,4 +5,4 @@ export { default as Modal, type ModalProps } from './modal/Modal.svelte';
|
|
|
5
5
|
export { default as Popover } from './popover/Popover.svelte';
|
|
6
6
|
export { default as Portal, setConfig, type PortalConfig } from './portal/Portal.svelte';
|
|
7
7
|
export { default as Tabs } from './tabs/index';
|
|
8
|
-
export { default as Tooltip } from './tooltip/Tooltip.svelte';
|
|
8
|
+
export { default as Tooltip, type Props as TooltipProps } from './tooltip/Tooltip.svelte';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<script lang="ts" module>
|
|
2
|
+
import type { IvoryComponent } from '$lib/types';
|
|
2
3
|
import clsx from 'clsx';
|
|
3
4
|
import type { Snippet } from 'svelte';
|
|
4
5
|
import type { ClassValue } from 'svelte/elements';
|
|
@@ -6,16 +7,12 @@
|
|
|
6
7
|
import Popover, { type PopoverPlacement } from '../popover/Popover.svelte';
|
|
7
8
|
import Portal from '../portal/Portal.svelte';
|
|
8
9
|
|
|
9
|
-
export interface Props {
|
|
10
|
+
export interface Props extends IvoryComponent<HTMLElement> {
|
|
10
11
|
children?: Snippet;
|
|
11
12
|
/** The content of the tooltip */
|
|
12
13
|
tooltip: string | Snippet;
|
|
13
|
-
/** The class of the element that triggers the tooltip */
|
|
14
|
-
class?: ClassValue;
|
|
15
14
|
/** The class of the tooltip itself */
|
|
16
15
|
tooltipClass?: ClassValue;
|
|
17
|
-
style?: string;
|
|
18
|
-
onclick?: (e: Event) => void;
|
|
19
16
|
/** If the href is set, the resulting element will be a link to the href */
|
|
20
17
|
href?: string;
|
|
21
18
|
/**
|
|
@@ -37,13 +34,11 @@
|
|
|
37
34
|
let {
|
|
38
35
|
children,
|
|
39
36
|
tooltip,
|
|
40
|
-
class: clazz,
|
|
41
|
-
style,
|
|
42
|
-
onclick,
|
|
43
37
|
href,
|
|
44
38
|
timeout = 500,
|
|
45
39
|
tooltipClass,
|
|
46
|
-
placement = 'top'
|
|
40
|
+
placement = 'top',
|
|
41
|
+
...rest
|
|
47
42
|
}: Props = $props();
|
|
48
43
|
|
|
49
44
|
let target = $state<HTMLElement>();
|
|
@@ -77,14 +72,12 @@
|
|
|
77
72
|
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
78
73
|
<svelte:element
|
|
79
74
|
this={href ? 'a' : onclick ? 'button' : 'div'}
|
|
80
|
-
{href}
|
|
81
75
|
type={onclick ? 'button' : undefined}
|
|
82
|
-
|
|
76
|
+
{...rest}
|
|
77
|
+
{href}
|
|
83
78
|
bind:this={target}
|
|
84
79
|
{onmouseenter}
|
|
85
80
|
{onmouseleave}
|
|
86
|
-
{style}
|
|
87
|
-
{onclick}
|
|
88
81
|
>
|
|
89
82
|
{@render children?.()}
|
|
90
83
|
</svelte:element>
|
package/src/lib/index.ts
CHANGED