@cloudparker/moldex.js 0.0.16 → 0.0.17
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.
|
@@ -53,7 +53,7 @@ function maybeRipple(node, options) {
|
|
|
53
53
|
{id}
|
|
54
54
|
{type}
|
|
55
55
|
{form}
|
|
56
|
-
class="flex items-center justify-center gap-2 hover:bg-gray-100 p-1 px-
|
|
56
|
+
class="flex items-center justify-center gap-2 hover:bg-gray-100 p-1 px-3 outline-none focus:bg-gray-200 disabled:bg-white disabled:text-gray-400 rounded {className}"
|
|
57
57
|
{onclick}
|
|
58
58
|
{disabled}
|
|
59
59
|
use:maybeRipple
|
|
@@ -42,7 +42,7 @@ let {
|
|
|
42
42
|
submitButtonFormId = void 0,
|
|
43
43
|
size = "sm",
|
|
44
44
|
bodyClassName = "",
|
|
45
|
-
|
|
45
|
+
component,
|
|
46
46
|
props = {},
|
|
47
47
|
children,
|
|
48
48
|
headerChildren,
|
|
@@ -54,6 +54,7 @@ let {
|
|
|
54
54
|
let dialogExports = { closeDialog, setResult, setOkSpinner, setOkDisabled };
|
|
55
55
|
let isPlaced = $state(false);
|
|
56
56
|
let isOpened = $state(false);
|
|
57
|
+
let CustomComponent = $state(null);
|
|
57
58
|
let result;
|
|
58
59
|
let smSizeClassName = "w-11/12 sm:w-3/4 md:w-1/2 lg:w-1/3 xl:w-1/4";
|
|
59
60
|
let mdSizeClassName = "w-11/12 sm:w-3/4 md:w-2/3 lg:w-1/2 xl:w-1/3";
|
|
@@ -114,6 +115,9 @@ function handleKeyDown(event) {
|
|
|
114
115
|
}
|
|
115
116
|
}
|
|
116
117
|
}
|
|
118
|
+
$effect(() => {
|
|
119
|
+
CustomComponent = component;
|
|
120
|
+
});
|
|
117
121
|
</script>
|
|
118
122
|
|
|
119
123
|
{#snippet dialogContent()}
|
|
@@ -178,9 +182,8 @@ function handleKeyDown(event) {
|
|
|
178
182
|
{@render children()}
|
|
179
183
|
{:else if bodyChildren}
|
|
180
184
|
{@render bodyChildren(dialogExports)}
|
|
181
|
-
{:else if
|
|
182
|
-
|
|
183
|
-
<Component {...{ ...props }} {...{ ...dialogExports }} />
|
|
185
|
+
{:else if CustomComponent?.length == 2}
|
|
186
|
+
<CustomComponent {...{ ...props }} {...{ ...dialogExports }} />
|
|
184
187
|
{/if}
|
|
185
188
|
</div>
|
|
186
189
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts">import "../../../tailwind.css";
|
|
2
2
|
let {
|
|
3
3
|
path,
|
|
4
|
-
className = "
|
|
4
|
+
className = "",
|
|
5
5
|
size = 24,
|
|
6
6
|
fill = "currentColor",
|
|
7
7
|
viewBox = ""
|
|
@@ -11,6 +11,6 @@ $effect(() => {
|
|
|
11
11
|
});
|
|
12
12
|
</script>
|
|
13
13
|
|
|
14
|
-
<svg class=" align-middle {className}" {viewBox} fill="currentColor">
|
|
14
|
+
<svg class="w-6 h-6 align-middle {className}" {viewBox} fill="currentColor">
|
|
15
15
|
<path d={path} />
|
|
16
16
|
</svg>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudparker/moldex.js",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.17",
|
|
4
4
|
"author": "cloudparker.com",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
@@ -30,5 +30,8 @@
|
|
|
30
30
|
"@cloudparker/easy-script-loader-svelte": "^3.0.3",
|
|
31
31
|
"esm-env": "^1.0.0",
|
|
32
32
|
"moment": "^2.30.1"
|
|
33
|
+
},
|
|
34
|
+
"peerDependencies": {
|
|
35
|
+
"svelte": "^5.0.0-next.1"
|
|
33
36
|
}
|
|
34
37
|
}
|