@plastic-js/tsumiki 0.1.43 → 0.1.44
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,6 +1,6 @@
|
|
|
1
1
|
import Portal_default from "./Portal.js";
|
|
2
2
|
import { insert, jsx, mergeProps, setProp, template } from "@plastic-js/plastic/jsx-runtime";
|
|
3
|
-
import { css } from "@emotion/css";
|
|
3
|
+
import { css, keyframes } from "@emotion/css";
|
|
4
4
|
import { Either, createEffect, createSignal, mergeProps as mergeProps$1, onCleanup, splitProps } from "@plastic-js/plastic";
|
|
5
5
|
//#region src/components/BottomSheet.jsx
|
|
6
6
|
var _tmpl3 = template("<div data-part=\"grabber\"><div></div></div>");
|
|
@@ -45,7 +45,11 @@ var sheetClass = css({
|
|
|
45
45
|
"&[data-open]": {
|
|
46
46
|
transform: "translateY(0)",
|
|
47
47
|
pointerEvents: "auto",
|
|
48
|
-
transition: "transform var(--tsu-transition-overlay-enter)"
|
|
48
|
+
transition: "transform var(--tsu-transition-overlay-enter)",
|
|
49
|
+
animation: `${keyframes({
|
|
50
|
+
from: { transform: "translateY(100%)" },
|
|
51
|
+
to: { transform: "translateY(0)" }
|
|
52
|
+
})} var(--tsu-duration-overlay-enter) var(--tsu-ease-out)`
|
|
49
53
|
},
|
|
50
54
|
"&::after": {
|
|
51
55
|
content: "\"\"",
|
|
@@ -57,7 +61,10 @@ var sheetClass = css({
|
|
|
57
61
|
background: "var(--tsu-surface)"
|
|
58
62
|
}
|
|
59
63
|
});
|
|
60
|
-
var draggingClass = css({
|
|
64
|
+
var draggingClass = css({
|
|
65
|
+
transition: "none",
|
|
66
|
+
animation: "none"
|
|
67
|
+
});
|
|
61
68
|
var grabberAreaClass = css({
|
|
62
69
|
display: "flex",
|
|
63
70
|
alignItems: "center",
|
|
@@ -3,8 +3,8 @@ import Button from "./Button.js";
|
|
|
3
3
|
import Icon from "./Icon.js";
|
|
4
4
|
import { insert, jsx, mergeProps, setProp, template } from "@plastic-js/plastic/jsx-runtime";
|
|
5
5
|
import { css, keyframes } from "@emotion/css";
|
|
6
|
-
import { Dialog } from "@plastic-js/ark";
|
|
7
|
-
import { mergeProps as mergeProps$2, splitProps } from "@plastic-js/plastic";
|
|
6
|
+
import { Dialog, useDialogContext } from "@plastic-js/ark";
|
|
7
|
+
import { Either, mergeProps as mergeProps$2, splitProps } from "@plastic-js/plastic";
|
|
8
8
|
//#region src/components/Dialog.jsx
|
|
9
9
|
var _tmpl4 = template("<div data-scope=\"dialog\" data-part=\"footer\"></div>");
|
|
10
10
|
var _tmpl3 = template("<div data-scope=\"dialog\" data-part=\"body\"></div>");
|
|
@@ -156,6 +156,14 @@ var positiveBtnClass = css({
|
|
|
156
156
|
});
|
|
157
157
|
var read = (v) => typeof v === "function" ? v() : v;
|
|
158
158
|
var warnedSheetNoTitle = false;
|
|
159
|
+
var DialogPortal = (props) => {
|
|
160
|
+
const dialog = useDialogContext();
|
|
161
|
+
return jsx(Either, mergeProps({
|
|
162
|
+
condition: () => !dialog()?.unmounted,
|
|
163
|
+
trueBranch: () => jsx(Portal_default, mergeProps({ children: () => props.children })),
|
|
164
|
+
falseBranch: () => null
|
|
165
|
+
}));
|
|
166
|
+
};
|
|
159
167
|
var Dialog$1 = (props) => {
|
|
160
168
|
const [local, rest] = splitProps(mergeProps$2({
|
|
161
169
|
mode: "sheet",
|
|
@@ -273,7 +281,7 @@ var Dialog$1 = (props) => {
|
|
|
273
281
|
return local.closeOnInteractOutside;
|
|
274
282
|
},
|
|
275
283
|
modal: true
|
|
276
|
-
}, rest, { children: jsx(
|
|
284
|
+
}, rest, { children: jsx(DialogPortal, mergeProps({ children: [jsx(Dialog.Backdrop, mergeProps({ className: isSheet ? backdropSheetClass : backdropModalClass })), jsx(Dialog.Positioner, mergeProps({
|
|
277
285
|
className: isSheet ? positionerSheetClass : positionerModalClass,
|
|
278
286
|
children: jsx(Dialog.Content, mergeProps({
|
|
279
287
|
get className() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plastic-js/tsumiki",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.44",
|
|
4
4
|
"description": "A UI component library for Plastic JS.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "tigre",
|
|
@@ -51,7 +51,9 @@
|
|
|
51
51
|
"preview": "vite preview",
|
|
52
52
|
"theme": "node scripts/theme.js",
|
|
53
53
|
"e2e:repro": "node e2e/dlgcbx-repro.mjs",
|
|
54
|
-
"e2e:bottomsheet": "node e2e/bottomsheet-presence-verify.mjs"
|
|
54
|
+
"e2e:bottomsheet": "node e2e/bottomsheet-presence-verify.mjs",
|
|
55
|
+
"e2e:dialog-portal": "node e2e/dialog-portal-verify.mjs",
|
|
56
|
+
"e2e:bottomsheet-animation": "node e2e/bottomsheet-animation-verify.mjs"
|
|
55
57
|
},
|
|
56
58
|
"dependencies": {
|
|
57
59
|
"@emotion/css": "^11.13.5",
|