@ims360/svelte-ivory 0.0.17 → 0.0.20
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/basic/toggle/Toggle.svelte +0 -3
- package/dist/components/basic/toggle/Toggle.svelte.d.ts.map +1 -1
- package/dist/components/layout/index.d.ts +1 -1
- package/dist/components/layout/index.d.ts.map +1 -1
- package/dist/components/layout/index.js +1 -1
- package/dist/components/layout/portal/Portal.svelte +17 -2
- package/dist/components/layout/portal/Portal.svelte.d.ts +4 -0
- package/dist/components/layout/portal/Portal.svelte.d.ts.map +1 -1
- package/dist/components/table/controller.svelte.js +1 -1
- package/package.json +13 -15
- package/src/lib/components/basic/toggle/Toggle.svelte +0 -3
- package/src/lib/components/layout/index.ts +1 -1
- package/src/lib/components/layout/portal/Portal.svelte +17 -2
- package/src/lib/components/table/controller.svelte.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toggle.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/basic/toggle/Toggle.svelte.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAI9C,KAAK,KAAK,GAAG;IACT,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;
|
|
1
|
+
{"version":3,"file":"Toggle.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/basic/toggle/Toggle.svelte.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAI9C,KAAK,KAAK,GAAG;IACT,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAmCN,QAAA,MAAM,MAAM,2CAAwC,CAAC;AACrD,KAAK,MAAM,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC;AACxC,eAAe,MAAM,CAAC"}
|
|
@@ -3,7 +3,7 @@ export { default as Heading } from './heading/index';
|
|
|
3
3
|
export { default as HiddenBackground } from './hiddenBackground/index';
|
|
4
4
|
export { default as Modal, type ModalProps } from './modal/Modal.svelte';
|
|
5
5
|
export { default as Popover } from './popover/Popover.svelte';
|
|
6
|
-
export { default as Portal } from './portal/Portal.svelte';
|
|
6
|
+
export { default as Portal, setConfig, type PortalConfig } from './portal/Portal.svelte';
|
|
7
7
|
export { default as Tabs } from './tabs/index';
|
|
8
8
|
export { default as Tooltip } 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,MAAM,wBAAwB,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,MAAM,0BAA0B,CAAC"}
|
|
@@ -3,6 +3,6 @@ export { default as Heading } from './heading/index';
|
|
|
3
3
|
export { default as HiddenBackground } from './hiddenBackground/index';
|
|
4
4
|
export { default as Modal } from './modal/Modal.svelte';
|
|
5
5
|
export { default as Popover } from './popover/Popover.svelte';
|
|
6
|
-
export { default as Portal } from './portal/Portal.svelte';
|
|
6
|
+
export { default as Portal, setConfig } from './portal/Portal.svelte';
|
|
7
7
|
export { default as Tabs } from './tabs/index';
|
|
8
8
|
export { default as Tooltip } from './tooltip/Tooltip.svelte';
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
export interface PortalConfig {
|
|
3
|
+
defaultTarget: string;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
const defaultConfig: PortalConfig = {
|
|
7
|
+
defaultTarget: 'body'
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
let config = $state<PortalConfig>(defaultConfig);
|
|
11
|
+
export function setConfig(newConfig: Partial<PortalConfig>) {
|
|
12
|
+
config = { ...defaultConfig, ...newConfig };
|
|
13
|
+
}
|
|
14
|
+
</script>
|
|
15
|
+
|
|
1
16
|
<script lang="ts">
|
|
2
17
|
import type { Snippet } from 'svelte';
|
|
3
18
|
import { portal } from '../../../utils/actions/index';
|
|
@@ -7,7 +22,7 @@
|
|
|
7
22
|
target?: string | HTMLElement;
|
|
8
23
|
}
|
|
9
24
|
|
|
10
|
-
let { children, target
|
|
25
|
+
let { children, target }: Props = $props();
|
|
11
26
|
</script>
|
|
12
27
|
|
|
13
28
|
<!--
|
|
@@ -18,6 +33,6 @@
|
|
|
18
33
|
|
|
19
34
|
**Use sparingy as it can make the DOM structure confusing**
|
|
20
35
|
-->
|
|
21
|
-
<div use:portal={target} hidden>
|
|
36
|
+
<div use:portal={target ?? config.defaultTarget} hidden>
|
|
22
37
|
{@render children()}
|
|
23
38
|
</div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Portal.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/layout/portal/Portal.svelte.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Portal.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/layout/portal/Portal.svelte.ts"],"names":[],"mappings":"AAGI,MAAM,WAAW,YAAY;IACzB,aAAa,EAAE,MAAM,CAAC;CACzB;AAOD,wBAAgB,SAAS,CAAC,SAAS,EAAE,OAAO,CAAC,YAAY,CAAC,QAEzD;AAGL,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAIlC,UAAU,KAAK;IACX,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC;CACjC;AAkBL;;;;;;GAMG;AACH,QAAA,MAAM,MAAM,2CAAwC,CAAC;AACrD,KAAK,MAAM,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC;AACxC,eAAe,MAAM,CAAC"}
|
|
@@ -8,7 +8,7 @@ export class TableController {
|
|
|
8
8
|
results = $derived(treeWalker(this.data, this.expanded));
|
|
9
9
|
refresh(conf) {
|
|
10
10
|
let intitalState = {
|
|
11
|
-
data:
|
|
11
|
+
data: [...(conf.data ?? [])],
|
|
12
12
|
expanded: this.expanded
|
|
13
13
|
};
|
|
14
14
|
for (const plugin of conf.plugins ?? []) {
|
package/package.json
CHANGED
|
@@ -1,20 +1,14 @@
|
|
|
1
1
|
{
|
|
2
|
-
"dependencies": {
|
|
3
|
-
"@floating-ui/dom": "^1.6.13",
|
|
4
|
-
"@lucide/svelte": "^0.503.0",
|
|
5
|
-
"@tailwindcss/forms": "^0.5.10",
|
|
6
|
-
"@tailwindcss/typography": "^0.5.16",
|
|
7
|
-
"dompurify": "^3.2.5",
|
|
8
|
-
"marked": "^15.0.11",
|
|
9
|
-
"tailwind-merge": "^3.2.0",
|
|
10
|
-
"tailwindcss": "^4.0.0"
|
|
11
|
-
},
|
|
12
2
|
"devDependencies": {
|
|
13
3
|
"@eslint/compat": "^1.2.5",
|
|
14
4
|
"@eslint/js": "^9.18.0",
|
|
5
|
+
"@floating-ui/dom": "^1.6.13",
|
|
6
|
+
"@lucide/svelte": "^0.503.0",
|
|
15
7
|
"@sveltejs/adapter-auto": "^4.0.0",
|
|
16
8
|
"@sveltejs/package": "^2.0.0",
|
|
17
9
|
"@sveltejs/vite-plugin-svelte": "^5.0.0",
|
|
10
|
+
"@tailwindcss/forms": "^0.5.10",
|
|
11
|
+
"@tailwindcss/typography": "^0.5.16",
|
|
18
12
|
"@tailwindcss/vite": "^4.1.4",
|
|
19
13
|
"@testing-library/jest-dom": "^6.6.3",
|
|
20
14
|
"@testing-library/svelte": "^5.2.4",
|
|
@@ -22,17 +16,21 @@
|
|
|
22
16
|
"@vitest/browser": "^3.1.1",
|
|
23
17
|
"@vitest/coverage-v8": "^3.1.1",
|
|
24
18
|
"@vitest/spy": "^3.1.2",
|
|
19
|
+
"dompurify": "^3.2.5",
|
|
25
20
|
"eslint": "^9.18.0",
|
|
26
21
|
"eslint-config-prettier": "^10.0.1",
|
|
27
22
|
"eslint-plugin-svelte": "^3.0.0",
|
|
28
23
|
"globals": "^16.0.0",
|
|
29
24
|
"jsdom": "^26.0.0",
|
|
25
|
+
"marked": "^15.0.11",
|
|
30
26
|
"playwright": "^1.51.1",
|
|
31
27
|
"prettier": "^3.4.2",
|
|
32
28
|
"prettier-plugin-svelte": "^3.3.3",
|
|
33
29
|
"prettier-plugin-tailwindcss": "^0.6.11",
|
|
34
30
|
"publint": "^0.3.2",
|
|
35
31
|
"svelte-check": "^4.0.0",
|
|
32
|
+
"tailwind-merge": "^3.2.0",
|
|
33
|
+
"tailwindcss": "^4.0.0",
|
|
36
34
|
"typescript": "^5.0.0",
|
|
37
35
|
"typescript-eslint": "^8.20.0",
|
|
38
36
|
"vite": "^6.0.0",
|
|
@@ -55,14 +53,14 @@
|
|
|
55
53
|
"types": "./dist/components/layout/index.d.ts",
|
|
56
54
|
"svelte": "./dist/components/layout/index.js"
|
|
57
55
|
},
|
|
58
|
-
"./components/toast": {
|
|
59
|
-
"types": "./dist/components/toast/index.d.ts",
|
|
60
|
-
"svelte": "./dist/components/toast/index.js"
|
|
61
|
-
},
|
|
62
56
|
"./components/table": {
|
|
63
57
|
"types": "./dist/components/table/index.d.ts",
|
|
64
58
|
"svelte": "./dist/components/table/index.js"
|
|
65
59
|
},
|
|
60
|
+
"./components/toast": {
|
|
61
|
+
"types": "./dist/components/toast/index.d.ts",
|
|
62
|
+
"svelte": "./dist/components/toast/index.js"
|
|
63
|
+
},
|
|
66
64
|
"./utils/actions": {
|
|
67
65
|
"types": "./dist/utils/actions/index.d.ts",
|
|
68
66
|
"svelte": "./dist/utils/actions/index.js"
|
|
@@ -109,5 +107,5 @@
|
|
|
109
107
|
"svelte": "./dist/index.js",
|
|
110
108
|
"type": "module",
|
|
111
109
|
"types": "./dist/index.d.ts",
|
|
112
|
-
"version": "0.0.
|
|
110
|
+
"version": "0.0.20"
|
|
113
111
|
}
|
|
@@ -3,6 +3,6 @@ export { default as Heading } from './heading/index';
|
|
|
3
3
|
export { default as HiddenBackground } from './hiddenBackground/index';
|
|
4
4
|
export { default as Modal, type ModalProps } from './modal/Modal.svelte';
|
|
5
5
|
export { default as Popover } from './popover/Popover.svelte';
|
|
6
|
-
export { default as Portal } from './portal/Portal.svelte';
|
|
6
|
+
export { default as Portal, setConfig, type PortalConfig } from './portal/Portal.svelte';
|
|
7
7
|
export { default as Tabs } from './tabs/index';
|
|
8
8
|
export { default as Tooltip } from './tooltip/Tooltip.svelte';
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
export interface PortalConfig {
|
|
3
|
+
defaultTarget: string;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
const defaultConfig: PortalConfig = {
|
|
7
|
+
defaultTarget: 'body'
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
let config = $state<PortalConfig>(defaultConfig);
|
|
11
|
+
export function setConfig(newConfig: Partial<PortalConfig>) {
|
|
12
|
+
config = { ...defaultConfig, ...newConfig };
|
|
13
|
+
}
|
|
14
|
+
</script>
|
|
15
|
+
|
|
1
16
|
<script lang="ts">
|
|
2
17
|
import type { Snippet } from 'svelte';
|
|
3
18
|
import { portal } from '../../../utils/actions/index';
|
|
@@ -7,7 +22,7 @@
|
|
|
7
22
|
target?: string | HTMLElement;
|
|
8
23
|
}
|
|
9
24
|
|
|
10
|
-
let { children, target
|
|
25
|
+
let { children, target }: Props = $props();
|
|
11
26
|
</script>
|
|
12
27
|
|
|
13
28
|
<!--
|
|
@@ -18,6 +33,6 @@
|
|
|
18
33
|
|
|
19
34
|
**Use sparingy as it can make the DOM structure confusing**
|
|
20
35
|
-->
|
|
21
|
-
<div use:portal={target} hidden>
|
|
36
|
+
<div use:portal={target ?? config.defaultTarget} hidden>
|
|
22
37
|
{@render children()}
|
|
23
38
|
</div>
|