@servicetitan/anvil2 1.28.0 → 1.29.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.
- package/CHANGELOG.md +30 -0
- package/dist/{Combobox-JAm3x-tw.js → Combobox-DCrEfyl2.js} +235 -124
- package/dist/Combobox-DCrEfyl2.js.map +1 -0
- package/dist/Combobox.css +100 -68
- package/dist/Combobox.js +1 -1
- package/dist/{DateField-5mNXaJ7q.js → DateField-4jR9NvbC.js} +327 -320
- package/dist/DateField-4jR9NvbC.js.map +1 -0
- package/dist/DateField.js +1 -1
- package/dist/{Dialog-B4M0DXxG.js → Dialog-CL3bfZuB.js} +2 -2
- package/dist/{Dialog-B4M0DXxG.js.map → Dialog-CL3bfZuB.js.map} +1 -1
- package/dist/{Dialog-CUK5YvVY-Dv5edacC.js → Dialog-CYBt_JdP-CmF0MUHL.js} +77 -48
- package/dist/Dialog-CYBt_JdP-CmF0MUHL.js.map +1 -0
- package/dist/Dialog.js +1 -1
- package/dist/{Drawer-BqqZB3Sn.js → Drawer-8nHrKktU.js} +2 -2
- package/dist/{Drawer-BqqZB3Sn.js.map → Drawer-8nHrKktU.js.map} +1 -1
- package/dist/{Drawer-CrXiK2w0-BMzKuNFt.js → Drawer-UQlX-LQG-BSCnMRad.js} +84 -57
- package/dist/Drawer-UQlX-LQG-BSCnMRad.js.map +1 -0
- package/dist/{Drawer-CrXiK2w0.css → Drawer-UQlX-LQG.css} +26 -25
- package/dist/Drawer.js +1 -1
- package/dist/InputMask-B8N8PP1W-DlUKpMR4.js +323 -0
- package/dist/InputMask-B8N8PP1W-DlUKpMR4.js.map +1 -0
- package/dist/{InputMask-BmXj5mob.js → InputMask-jsL7rSOk.js} +2 -2
- package/dist/{InputMask-BmXj5mob.js.map → InputMask-jsL7rSOk.js.map} +1 -1
- package/dist/InputMask.js +1 -1
- package/dist/{Label-CbYy5kwu-BCTOKxOk.js → Label-CUVr-jvI-BXhER5eQ.js} +3 -3
- package/dist/{Label-CbYy5kwu-BCTOKxOk.js.map → Label-CUVr-jvI-BXhER5eQ.js.map} +1 -1
- package/dist/{Menu-IEBrkdoN.js → Menu-CsfX8-_z.js} +4 -3
- package/dist/Menu-CsfX8-_z.js.map +1 -0
- package/dist/Menu.js +1 -1
- package/dist/{Page-qlpHVAMH.js → Page-vKi5JkDS.js} +5 -5
- package/dist/{Page-qlpHVAMH.js.map → Page-vKi5JkDS.js.map} +1 -1
- package/dist/Page.js +1 -1
- package/dist/{Popover-B7K3o_l4.js → Popover-OFlyW8gN.js} +2 -2
- package/dist/{Popover-B7K3o_l4.js.map → Popover-OFlyW8gN.js.map} +1 -1
- package/dist/{Popover-C1B3UJXp-B5obSIvA.js → Popover-tu_N1aS6-CSLR1Xzc.js} +5 -5
- package/dist/Popover-tu_N1aS6-CSLR1Xzc.js.map +1 -0
- package/dist/Popover.js +1 -1
- package/dist/{ProgressBar-BLg29adn-CMz5eu5f.js → ProgressBar-DQ1lsFk2-Ci4eqzM0.js} +3 -3
- package/dist/{ProgressBar-BLg29adn-CMz5eu5f.js.map → ProgressBar-DQ1lsFk2-Ci4eqzM0.js.map} +1 -1
- package/dist/{ProgressBar-_DyYSgfx.js → ProgressBar-gVRLaKPz.js} +2 -2
- package/dist/{ProgressBar-_DyYSgfx.js.map → ProgressBar-gVRLaKPz.js.map} +1 -1
- package/dist/ProgressBar.js +1 -1
- package/dist/{TextField-Lwe9XAou-tH8gcQTq.js → TextField-B8LHWOoC-DSV9zY-z.js} +2 -2
- package/dist/{TextField-Lwe9XAou-tH8gcQTq.js.map → TextField-B8LHWOoC-DSV9zY-z.js.map} +1 -1
- package/dist/{TextField-tF-ERwA8.js → TextField-DgxJO1a7.js} +2 -2
- package/dist/{TextField-tF-ERwA8.js.map → TextField-DgxJO1a7.js.map} +1 -1
- package/dist/TextField.js +1 -1
- package/dist/{Textarea-BrzxOEx3.js → Textarea-B-Dv2RXs.js} +2 -2
- package/dist/Textarea-B-Dv2RXs.js.map +1 -0
- package/dist/Textarea.js +1 -1
- package/dist/Toast.js +1 -1
- package/dist/{Toolbar-D9fMSiGU.js → Toolbar-7BeCY61H.js} +2 -2
- package/dist/{Toolbar-D9fMSiGU.js.map → Toolbar-7BeCY61H.js.map} +1 -1
- package/dist/Toolbar.js +1 -1
- package/dist/{Tooltip-BEo0IRDf.js → Tooltip-BVBq-KxK.js} +2 -2
- package/dist/{Tooltip-BEo0IRDf.js.map → Tooltip-BVBq-KxK.js.map} +1 -1
- package/dist/{Tooltip-36nMbVT3-DMkvo60s.js → Tooltip-C8sCGmKM-CLrDofvy.js} +4 -4
- package/dist/{Tooltip-36nMbVT3-DMkvo60s.js.map → Tooltip-C8sCGmKM-CLrDofvy.js.map} +1 -1
- package/dist/Tooltip.js +1 -1
- package/dist/components/Dialog/Dialog.d.ts +1 -0
- package/dist/components/Drawer/Drawer.d.ts +1 -0
- package/dist/index.js +14 -14
- package/dist/{toast-DkO9HWpH.js → toast-CbokOkfo.js} +6 -2
- package/dist/toast-CbokOkfo.js.map +1 -0
- package/package.json +3 -3
- package/dist/Combobox-JAm3x-tw.js.map +0 -1
- package/dist/DateField-5mNXaJ7q.js.map +0 -1
- package/dist/Dialog-CUK5YvVY-Dv5edacC.js.map +0 -1
- package/dist/Drawer-CrXiK2w0-BMzKuNFt.js.map +0 -1
- package/dist/InputMask-CQzrMoEy-CLNvXsm7.js +0 -195
- package/dist/InputMask-CQzrMoEy-CLNvXsm7.js.map +0 -1
- package/dist/Menu-IEBrkdoN.js.map +0 -1
- package/dist/Popover-C1B3UJXp-B5obSIvA.js.map +0 -1
- package/dist/Textarea-BrzxOEx3.js.map +0 -1
- package/dist/toast-DkO9HWpH.js.map +0 -1
- /package/dist/{Dialog-CUK5YvVY.css → Dialog-CYBt_JdP.css} +0 -0
- /package/dist/{Label-CbYy5kwu.css → Label-CUVr-jvI.css} +0 -0
- /package/dist/{Popover-C1B3UJXp.css → Popover-tu_N1aS6.css} +0 -0
- /package/dist/{ProgressBar-BLg29adn.css → ProgressBar-DQ1lsFk2.css} +0 -0
- /package/dist/{Tooltip-36nMbVT3.css → Tooltip-C8sCGmKM.css} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
-
import { forwardRef, createContext, useRef, useState,
|
|
2
|
+
import { forwardRef, createContext, useRef, useState, useEffect, useMemo, useContext } from 'react';
|
|
3
3
|
import { c as cx } from './index-tZvMCc77.js';
|
|
4
4
|
import { S as SvgClose } from './close-DZj38AEh.js';
|
|
5
5
|
import { T as Text } from './Text-C2n3GDdC-rz_AelM0.js';
|
|
@@ -7,29 +7,29 @@ import { B as Button } from './Button-Ce--YZ9L-Csh0Zzuf.js';
|
|
|
7
7
|
import { u as useMergeRefs } from './useMergeRefs-Bde85AWI-Bde85AWI.js';
|
|
8
8
|
import { u as useKeyboardFocusables } from './useKeyboardFocusables-CwVMAe5C-DtjYOAmt.js';
|
|
9
9
|
|
|
10
|
-
import './Drawer-
|
|
11
|
-
const container = "
|
|
12
|
-
const content = "
|
|
13
|
-
const header = "
|
|
14
|
-
const footer = "
|
|
15
|
-
const remove = "
|
|
16
|
-
const large = "
|
|
17
|
-
const sticky = "
|
|
10
|
+
import './Drawer-UQlX-LQG.css';const drawer = "_drawer_pysn1_3";
|
|
11
|
+
const container = "_container_pysn1_29";
|
|
12
|
+
const content = "_content_pysn1_42";
|
|
13
|
+
const header = "_header_pysn1_49";
|
|
14
|
+
const footer = "_footer_pysn1_73";
|
|
15
|
+
const remove = "_remove_pysn1_91";
|
|
16
|
+
const large = "_large_pysn1_100";
|
|
17
|
+
const sticky = "_sticky_pysn1_103";
|
|
18
18
|
const styles = {
|
|
19
19
|
drawer: drawer,
|
|
20
|
-
"close-drawer": "_close-
|
|
21
|
-
"open-drawer": "_open-
|
|
22
|
-
"open-backdrop": "_open-
|
|
20
|
+
"close-drawer": "_close-drawer_pysn1_1",
|
|
21
|
+
"open-drawer": "_open-drawer_pysn1_1",
|
|
22
|
+
"open-backdrop": "_open-backdrop_pysn1_1",
|
|
23
23
|
container: container,
|
|
24
24
|
content: content,
|
|
25
25
|
header: header,
|
|
26
|
-
"close-container": "_close-
|
|
26
|
+
"close-container": "_close-container_pysn1_66",
|
|
27
27
|
footer: footer,
|
|
28
28
|
remove: remove,
|
|
29
|
-
"close-backdrop": "_close-
|
|
29
|
+
"close-backdrop": "_close-backdrop_pysn1_1",
|
|
30
30
|
large: large,
|
|
31
31
|
sticky: sticky,
|
|
32
|
-
"close-button": "_close-
|
|
32
|
+
"close-button": "_close-button_pysn1_109"
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
const DrawerCancelButton = forwardRef((props, ref) => {
|
|
@@ -126,70 +126,90 @@ const DrawerElement = forwardRef(
|
|
|
126
126
|
disableCloseOnEscape = false,
|
|
127
127
|
disableCloseOnClickOutside = false,
|
|
128
128
|
size = "medium",
|
|
129
|
+
enableScrollChaining,
|
|
129
130
|
...rest
|
|
130
131
|
} = props;
|
|
131
132
|
const elRef = useRef(null);
|
|
132
133
|
const contentRef = useRef(null);
|
|
133
|
-
const bodyRef = useRef(null);
|
|
134
134
|
const combinedRef = useMergeRefs([elRef, ref]);
|
|
135
135
|
const [remove, setRemove] = useState(false);
|
|
136
|
-
const id = useId();
|
|
137
136
|
const DrawerClassNames = cx([styles.drawer], className, {
|
|
138
137
|
[styles.remove]: remove,
|
|
139
138
|
[styles.large]: size === "large"
|
|
140
139
|
});
|
|
141
|
-
const { focusables
|
|
140
|
+
const { focusables } = useKeyboardFocusables(contentRef, {
|
|
142
141
|
observeChange: false
|
|
143
142
|
});
|
|
144
143
|
const firstFocusable = focusables?.[0];
|
|
145
144
|
const lastFocusable = focusables?.[focusables.length - 1];
|
|
146
|
-
const removeBodyClass = useCallback(() => {
|
|
147
|
-
if (bodyRef.current) {
|
|
148
|
-
const drawersOpen = bodyRef.current.dataset.drawersOpen ? bodyRef.current.dataset.drawersOpen.split(" ") : [];
|
|
149
|
-
const newDrawersOpen = drawersOpen.filter((item) => item !== id);
|
|
150
|
-
if (newDrawersOpen.length === 0) {
|
|
151
|
-
bodyRef.current.removeAttribute("data-drawers-open");
|
|
152
|
-
bodyRef.current?.classList.remove("drawer-open");
|
|
153
|
-
} else {
|
|
154
|
-
bodyRef.current.dataset.drawersOpen = newDrawersOpen.join(" ");
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
}, [id]);
|
|
158
145
|
useEffect(() => {
|
|
159
146
|
if (open) {
|
|
160
147
|
onOpen?.();
|
|
161
148
|
elRef.current?.showModal();
|
|
162
|
-
if (!bodyRef.current) {
|
|
163
|
-
const body = elRef.current?.closest("body");
|
|
164
|
-
body && (bodyRef.current = body);
|
|
165
|
-
}
|
|
166
|
-
updateFocusables();
|
|
167
|
-
if (focusables) {
|
|
168
|
-
if (focusables[0]?.dataset.anv === "drawer-header-close-button" && focusables[1]) {
|
|
169
|
-
focusables[1].focus();
|
|
170
|
-
} else {
|
|
171
|
-
focusables[0]?.focus();
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
bodyRef.current?.classList.add("drawer-open");
|
|
175
|
-
if (bodyRef.current) {
|
|
176
|
-
const drawersOpen = bodyRef.current.dataset.drawersOpen ? bodyRef.current.dataset.drawersOpen.split(" ") : [];
|
|
177
|
-
if (drawersOpen.includes(id)) return;
|
|
178
|
-
drawersOpen.push(id);
|
|
179
|
-
bodyRef.current.dataset.drawersOpen = drawersOpen.join(" ");
|
|
180
|
-
}
|
|
181
149
|
return;
|
|
182
150
|
}
|
|
183
151
|
setRemove(true);
|
|
184
152
|
setTimeout(() => {
|
|
185
153
|
elRef.current?.close();
|
|
186
|
-
removeBodyClass();
|
|
187
154
|
setRemove(false);
|
|
188
155
|
}, 200);
|
|
189
|
-
}, [
|
|
156
|
+
}, [onOpen, open]);
|
|
190
157
|
useEffect(() => {
|
|
191
|
-
|
|
192
|
-
|
|
158
|
+
if (!open) return;
|
|
159
|
+
if (!focusables) return;
|
|
160
|
+
if (focusables[0]?.dataset.anv === "drawer-header-close-button" && focusables[1]) {
|
|
161
|
+
focusables[1].focus();
|
|
162
|
+
} else {
|
|
163
|
+
focusables[0]?.focus();
|
|
164
|
+
}
|
|
165
|
+
}, [open, focusables]);
|
|
166
|
+
useEffect(() => {
|
|
167
|
+
if (!open || enableScrollChaining) return;
|
|
168
|
+
let blockDocumentScroll = false;
|
|
169
|
+
const content = contentRef.current;
|
|
170
|
+
const scrollHandler = (e) => {
|
|
171
|
+
const target = e.target;
|
|
172
|
+
const isShadow2 = contentRef.current?.getRootNode() instanceof ShadowRoot;
|
|
173
|
+
const isOverflowing = elRef.current && elRef.current.scrollHeight > elRef.current.clientHeight;
|
|
174
|
+
if (isShadow2) {
|
|
175
|
+
if (blockDocumentScroll) {
|
|
176
|
+
e.preventDefault();
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
if (!isOverflowing || !content?.contains(target)) {
|
|
182
|
+
e.preventDefault();
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
return;
|
|
186
|
+
};
|
|
187
|
+
const shadowScrollHandler = (e) => {
|
|
188
|
+
const target = e.target;
|
|
189
|
+
const isTargetInsideContent = content?.contains(target);
|
|
190
|
+
const isOverflowing = elRef.current && elRef.current.scrollHeight > elRef.current.clientHeight;
|
|
191
|
+
blockDocumentScroll = !isTargetInsideContent;
|
|
192
|
+
if (!isOverflowing || !content?.contains(target)) {
|
|
193
|
+
e.preventDefault();
|
|
194
|
+
}
|
|
195
|
+
return;
|
|
196
|
+
};
|
|
197
|
+
const isShadow = content?.getRootNode() instanceof ShadowRoot;
|
|
198
|
+
document.addEventListener("wheel", scrollHandler, {
|
|
199
|
+
passive: false
|
|
200
|
+
});
|
|
201
|
+
if (isShadow) {
|
|
202
|
+
content?.getRootNode().addEventListener("wheel", shadowScrollHandler, {
|
|
203
|
+
passive: false
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
return () => {
|
|
207
|
+
document.getRootNode().removeEventListener("wheel", scrollHandler);
|
|
208
|
+
if (isShadow) {
|
|
209
|
+
content?.getRootNode().removeEventListener("wheel", shadowScrollHandler);
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
}, [enableScrollChaining, open]);
|
|
193
213
|
const onCancelHandler = (e) => {
|
|
194
214
|
e.preventDefault();
|
|
195
215
|
if (disableCloseOnEscape) return;
|
|
@@ -223,13 +243,12 @@ const DrawerElement = forwardRef(
|
|
|
223
243
|
const close = () => {
|
|
224
244
|
setRemove(true);
|
|
225
245
|
setTimeout(() => {
|
|
226
|
-
removeBodyClass();
|
|
227
246
|
elRef.current?.close();
|
|
228
247
|
onClose?.();
|
|
229
248
|
}, 200);
|
|
230
249
|
};
|
|
231
250
|
return { close };
|
|
232
|
-
}, [onClose
|
|
251
|
+
}, [onClose]);
|
|
233
252
|
return (
|
|
234
253
|
// dialog element does seem to be interactive on MDN guideline
|
|
235
254
|
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
@@ -243,7 +262,15 @@ const DrawerElement = forwardRef(
|
|
|
243
262
|
onClick: onClickHandler,
|
|
244
263
|
onKeyDown: onKeyDownHandler,
|
|
245
264
|
...rest,
|
|
246
|
-
children: /* @__PURE__ */ jsx(DrawerContext.Provider, { value, children: /* @__PURE__ */ jsx(
|
|
265
|
+
children: /* @__PURE__ */ jsx(DrawerContext.Provider, { value, children: /* @__PURE__ */ jsx(
|
|
266
|
+
"section",
|
|
267
|
+
{
|
|
268
|
+
ref: contentRef,
|
|
269
|
+
className: styles.container,
|
|
270
|
+
"data-open": open,
|
|
271
|
+
children
|
|
272
|
+
}
|
|
273
|
+
) })
|
|
247
274
|
}
|
|
248
275
|
)
|
|
249
276
|
);
|
|
@@ -267,4 +294,4 @@ const Drawer = Object.assign(DrawerElement, {
|
|
|
267
294
|
});
|
|
268
295
|
|
|
269
296
|
export { Drawer as D, DrawerCancelButton as a, DrawerFooter as b, DrawerHeader as c, DrawerContent as d, DrawerContext as e };
|
|
270
|
-
//# sourceMappingURL=Drawer-
|
|
297
|
+
//# sourceMappingURL=Drawer-UQlX-LQG-BSCnMRad.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Drawer-UQlX-LQG-BSCnMRad.js","sources":["../../hammer-react/dist/Drawer-UQlX-LQG.js"],"sourcesContent":["import { jsx, jsxs } from 'react/jsx-runtime';\nimport { forwardRef, createContext, useRef, useState, useEffect, useMemo, useContext } from 'react';\nimport cx from 'classnames';\nimport Close from '@servicetitan/hammer-icon/mdi/round/close.svg';\nimport { T as Text } from './Text-C2n3GDdC.js';\nimport { B as Button } from './Button-Ce--YZ9L.js';\nimport { u as useMergeRefs } from './useMergeRefs-Bde85AWI.js';\nimport { u as useKeyboardFocusables } from './useKeyboardFocusables-CwVMAe5C.js';\n\nimport './Drawer.css';const drawer = \"_drawer_pysn1_3\";\nconst container = \"_container_pysn1_29\";\nconst content = \"_content_pysn1_42\";\nconst header = \"_header_pysn1_49\";\nconst footer = \"_footer_pysn1_73\";\nconst remove = \"_remove_pysn1_91\";\nconst large = \"_large_pysn1_100\";\nconst sticky = \"_sticky_pysn1_103\";\nconst styles = {\n\tdrawer: drawer,\n\t\"close-drawer\": \"_close-drawer_pysn1_1\",\n\t\"open-drawer\": \"_open-drawer_pysn1_1\",\n\t\"open-backdrop\": \"_open-backdrop_pysn1_1\",\n\tcontainer: container,\n\tcontent: content,\n\theader: header,\n\t\"close-container\": \"_close-container_pysn1_66\",\n\tfooter: footer,\n\tremove: remove,\n\t\"close-backdrop\": \"_close-backdrop_pysn1_1\",\n\tlarge: large,\n\tsticky: sticky,\n\t\"close-button\": \"_close-button_pysn1_109\"\n};\n\nconst DrawerCancelButton = forwardRef((props, ref) => {\n const { onClick, ...rest } = props;\n const { close } = useDrawerContext();\n const onClickHandler = (e) => {\n onClick?.(e);\n close();\n };\n return /* @__PURE__ */ jsx(\n Button,\n {\n \"aria-label\": \"Close drawer\",\n \"data-anv\": \"drawer-cancel-button\",\n onClick: onClickHandler,\n ref,\n ...rest\n }\n );\n});\nDrawerCancelButton.displayName = \"DrawerCancelButton\";\n\nconst DrawerHeader = forwardRef(\n (props, ref) => {\n const { children } = props;\n return /* @__PURE__ */ jsxs(\"header\", { className: styles.header, \"data-anv\": \"drawer-header\", ref, children: [\n /* @__PURE__ */ jsx(Text, { variant: \"headline\", el: \"h1\", children }),\n /* @__PURE__ */ jsx(\"span\", { className: styles[\"close-container\"], children: /* @__PURE__ */ jsx(\n DrawerCancelButton,\n {\n className: styles[\"close-button\"],\n size: \"small\",\n appearance: \"ghost\",\n \"aria-label\": \"Close drawer\",\n \"data-anv\": \"drawer-header-close-button\",\n icon: Close\n }\n ) })\n ] });\n }\n);\nDrawerHeader.displayName = \"DrawerHeader\";\n\nconst DrawerFooter = forwardRef(\n (props, ref) => {\n const { children, sticky = false, ...rest } = props;\n const DrawerFooterCX = cx(styles.footer, {\n [styles[\"sticky\"]]: sticky\n });\n return /* @__PURE__ */ jsx(\n \"footer\",\n {\n className: DrawerFooterCX,\n \"data-anv\": \"drawer-footer\",\n ref,\n ...rest,\n children\n }\n );\n }\n);\nDrawerFooter.displayName = \"DrawerFooter\";\n\nconst DrawerContent = forwardRef(\n (props, ref) => {\n const { children, ...rest } = props;\n const DrawerContentCX = cx(styles.content, {});\n return /* @__PURE__ */ jsx(\n \"div\",\n {\n className: DrawerContentCX,\n \"data-anv\": \"drawer-content\",\n ref,\n ...rest,\n children\n }\n );\n }\n);\nDrawerContent.displayName = \"DrawerContent\";\n\nconst DrawerContext = createContext(null);\nconst DrawerElement = forwardRef(\n (props, ref) => {\n const {\n className,\n open = false,\n children,\n onOpen,\n onClose,\n onCancel,\n onClick,\n onKeyDown,\n disableCloseOnEscape = false,\n disableCloseOnClickOutside = false,\n size = \"medium\",\n enableScrollChaining,\n ...rest\n } = props;\n const elRef = useRef(null);\n const contentRef = useRef(null);\n const combinedRef = useMergeRefs([elRef, ref]);\n const [remove, setRemove] = useState(false);\n const DrawerClassNames = cx([styles.drawer], className, {\n [styles.remove]: remove,\n [styles.large]: size === \"large\"\n });\n const { focusables } = useKeyboardFocusables(contentRef, {\n observeChange: false\n });\n const firstFocusable = focusables?.[0];\n const lastFocusable = focusables?.[focusables.length - 1];\n useEffect(() => {\n if (open) {\n onOpen?.();\n elRef.current?.showModal();\n return;\n }\n setRemove(true);\n setTimeout(() => {\n elRef.current?.close();\n setRemove(false);\n }, 200);\n }, [onOpen, open]);\n useEffect(() => {\n if (!open) return;\n if (!focusables) return;\n if (focusables[0]?.dataset.anv === \"drawer-header-close-button\" && focusables[1]) {\n focusables[1].focus();\n } else {\n focusables[0]?.focus();\n }\n }, [open, focusables]);\n useEffect(() => {\n if (!open || enableScrollChaining) return;\n let blockDocumentScroll = false;\n const content = contentRef.current;\n const scrollHandler = (e) => {\n const target = e.target;\n const isShadow2 = contentRef.current?.getRootNode() instanceof ShadowRoot;\n const isOverflowing = elRef.current && elRef.current.scrollHeight > elRef.current.clientHeight;\n if (isShadow2) {\n if (blockDocumentScroll) {\n e.preventDefault();\n return;\n }\n return;\n }\n if (!isOverflowing || !content?.contains(target)) {\n e.preventDefault();\n return;\n }\n return;\n };\n const shadowScrollHandler = (e) => {\n const target = e.target;\n const isTargetInsideContent = content?.contains(target);\n const isOverflowing = elRef.current && elRef.current.scrollHeight > elRef.current.clientHeight;\n blockDocumentScroll = !isTargetInsideContent;\n if (!isOverflowing || !content?.contains(target)) {\n e.preventDefault();\n }\n return;\n };\n const isShadow = content?.getRootNode() instanceof ShadowRoot;\n document.addEventListener(\"wheel\", scrollHandler, {\n passive: false\n });\n if (isShadow) {\n content?.getRootNode().addEventListener(\"wheel\", shadowScrollHandler, {\n passive: false\n });\n }\n return () => {\n document.getRootNode().removeEventListener(\"wheel\", scrollHandler);\n if (isShadow) {\n content?.getRootNode().removeEventListener(\"wheel\", shadowScrollHandler);\n }\n };\n }, [enableScrollChaining, open]);\n const onCancelHandler = (e) => {\n e.preventDefault();\n if (disableCloseOnEscape) return;\n onClose?.();\n };\n const onClickHandler = (e) => {\n onClick?.(e);\n const target = e.target;\n if (!contentRef.current?.contains(target)) {\n e.preventDefault();\n if (disableCloseOnClickOutside) return;\n onClose?.();\n }\n };\n const onKeyDownHandler = (e) => {\n onKeyDown?.(e);\n if (e.code === \"Tab\") {\n if (e.shiftKey && e.target === firstFocusable) {\n e.preventDefault();\n lastFocusable?.focus();\n return;\n }\n if (e.target === lastFocusable && !e.shiftKey) {\n e.preventDefault();\n firstFocusable?.focus();\n return;\n }\n }\n };\n const value = useMemo(() => {\n const close = () => {\n setRemove(true);\n setTimeout(() => {\n elRef.current?.close();\n onClose?.();\n }, 200);\n };\n return { close };\n }, [onClose]);\n return (\n // dialog element does seem to be interactive on MDN guideline\n // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions\n /* @__PURE__ */ jsx(\n \"dialog\",\n {\n className: DrawerClassNames,\n \"data-anv\": \"drawer\",\n ref: combinedRef,\n onCancel: onCancelHandler,\n onClick: onClickHandler,\n onKeyDown: onKeyDownHandler,\n ...rest,\n children: /* @__PURE__ */ jsx(DrawerContext.Provider, { value, children: /* @__PURE__ */ jsx(\n \"section\",\n {\n ref: contentRef,\n className: styles.container,\n \"data-open\": open,\n children\n }\n ) })\n }\n )\n );\n }\n);\nfunction useDrawerContext() {\n const context = useContext(DrawerContext);\n if (!context) {\n throw new Error(\n \"useDrawerContext must be used within a DrawerContextProvider\"\n );\n }\n return context;\n}\nDrawerElement.displayName = \"Drawer\";\nconst Drawer = Object.assign(DrawerElement, {\n Header: DrawerHeader,\n Footer: DrawerFooter,\n Content: DrawerContent,\n CancelButton: DrawerCancelButton\n});\n\nexport { Drawer as D, DrawerContext as a, DrawerCancelButton as b, DrawerFooter as c, DrawerHeader as d, DrawerContent as e };\n//# sourceMappingURL=Drawer-UQlX-LQG.js.map\n"],"names":["Close"],"mappings":";;;;;;;;;AASsB,MAAM,MAAM,GAAG,iBAAiB;AACtD,MAAM,SAAS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SAAS;AACrB,YAAY;AACZ,cAAc,GAAG,EAAE,UAAU;AAC7B,cAAc,SAAS,EAAE,MAAM,CAAC,SAAS;AACzC,cAAc,WAAW,EAAE,IAAI;AAC/B,cAAc;AACd;AACA,WAAW,EAAE;AACb;AACA;AACA;AACA;AACA,CAAC;AACD,SAAS,gBAAgB,GAAG;AAC5B,EAAE,MAAM,OAAO,GAAG,UAAU,CAAC,aAAa,CAAC;AAC3C,EAAE,IAAI,CAAC,OAAO,EAAE;AAChB,IAAI,MAAM,IAAI,KAAK;AACnB,MAAM;AACN,KAAK;AACL;AACA,EAAE,OAAO,OAAO;AAChB;AACA,aAAa,CAAC,WAAW,GAAG,QAAQ;AAC/B,MAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE;AAC5C,EAAE,MAAM,EAAE,YAAY;AACtB,EAAE,MAAM,EAAE,YAAY;AACtB,EAAE,OAAO,EAAE,aAAa;AACxB,EAAE,YAAY,EAAE;AAChB,CAAC;;;;"}
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
@layer starter, reset, base, state, application;
|
|
4
4
|
@layer base {
|
|
5
|
-
.
|
|
5
|
+
._drawer_pysn1_3 {
|
|
6
6
|
border: none;
|
|
7
7
|
background: transparent;
|
|
8
8
|
padding-block: 0;
|
|
9
9
|
padding-inline: 0;
|
|
10
10
|
outline: none;
|
|
11
|
-
animation: _close-
|
|
11
|
+
animation: _close-drawer_pysn1_1 2s forwards;
|
|
12
12
|
transition: width 200ms;
|
|
13
13
|
width: 35rem;
|
|
14
14
|
height: 100%;
|
|
@@ -19,15 +19,16 @@
|
|
|
19
19
|
margin-block-end: 0;
|
|
20
20
|
max-height: 100dvh;
|
|
21
21
|
margin-inline-end: 0;
|
|
22
|
+
overscroll-behavior: contain;
|
|
22
23
|
--xpos: 10rem;
|
|
23
24
|
}
|
|
24
|
-
.
|
|
25
|
-
animation: _open-
|
|
25
|
+
._drawer_pysn1_3[open] {
|
|
26
|
+
animation: _open-drawer_pysn1_1 300ms forwards;
|
|
26
27
|
}
|
|
27
|
-
.
|
|
28
|
-
animation: _open-
|
|
28
|
+
._drawer_pysn1_3[open]::backdrop {
|
|
29
|
+
animation: _open-backdrop_pysn1_1 200ms forwards;
|
|
29
30
|
}
|
|
30
|
-
.
|
|
31
|
+
._drawer_pysn1_3 ._container_pysn1_29 {
|
|
31
32
|
font-family: var(--font-family-base, "Nunito Sans", sans-serif);
|
|
32
33
|
font-size: 100%;
|
|
33
34
|
color: var(--foreground-color, #141414);
|
|
@@ -40,14 +41,14 @@
|
|
|
40
41
|
gap: 1.5rem;
|
|
41
42
|
min-height: 100%;
|
|
42
43
|
}
|
|
43
|
-
.
|
|
44
|
+
._drawer_pysn1_3 ._container_pysn1_29 ._content_pysn1_42 {
|
|
44
45
|
flex-grow: 1;
|
|
45
46
|
padding-block-start: 0.25rem;
|
|
46
47
|
padding-block-end: 0.25rem;
|
|
47
48
|
font-size: 1rem;
|
|
48
49
|
isolation: isolate;
|
|
49
50
|
}
|
|
50
|
-
.
|
|
51
|
+
._header_pysn1_49 {
|
|
51
52
|
position: sticky;
|
|
52
53
|
inset-block-start: 0;
|
|
53
54
|
display: flex;
|
|
@@ -60,18 +61,18 @@
|
|
|
60
61
|
font-size: 1rem;
|
|
61
62
|
z-index: 1;
|
|
62
63
|
}
|
|
63
|
-
.
|
|
64
|
+
._header_pysn1_49 h1 {
|
|
64
65
|
margin-block: 0;
|
|
65
66
|
margin-inline: 0;
|
|
66
67
|
}
|
|
67
|
-
.
|
|
68
|
+
._header_pysn1_49 ._close-container_pysn1_66 {
|
|
68
69
|
display: flex;
|
|
69
70
|
justify-content: center;
|
|
70
71
|
align-items: center;
|
|
71
72
|
width: 1.5625rem;
|
|
72
73
|
height: 1.5625rem;
|
|
73
74
|
}
|
|
74
|
-
.
|
|
75
|
+
._footer_pysn1_73 {
|
|
75
76
|
display: flex;
|
|
76
77
|
gap: 0.75rem;
|
|
77
78
|
justify-content: flex-end;
|
|
@@ -85,36 +86,36 @@
|
|
|
85
86
|
}
|
|
86
87
|
@layer state {
|
|
87
88
|
@media (prefers-reduced-motion: reduce) {
|
|
88
|
-
.
|
|
89
|
+
._drawer_pysn1_3 {
|
|
89
90
|
--xpos: 0;
|
|
90
91
|
}
|
|
91
92
|
}
|
|
92
|
-
.
|
|
93
|
-
animation: _close-
|
|
93
|
+
._drawer_pysn1_3._remove_pysn1_91[open] {
|
|
94
|
+
animation: _close-drawer_pysn1_1 300ms forwards;
|
|
94
95
|
}
|
|
95
|
-
.
|
|
96
|
-
animation: _close-
|
|
96
|
+
._drawer_pysn1_3._remove_pysn1_91[open]::backdrop {
|
|
97
|
+
animation: _close-backdrop_pysn1_1 200ms forwards;
|
|
97
98
|
}
|
|
98
|
-
.
|
|
99
|
+
._drawer_pysn1_3::backdrop {
|
|
99
100
|
background: #040404;
|
|
100
101
|
}
|
|
101
|
-
.
|
|
102
|
+
._drawer_pysn1_3._large_pysn1_100 {
|
|
102
103
|
width: 48rem;
|
|
103
104
|
}
|
|
104
|
-
.
|
|
105
|
+
._drawer_pysn1_3 ._footer_pysn1_73._sticky_pysn1_103 {
|
|
105
106
|
position: sticky;
|
|
106
107
|
inset-block-end: 0;
|
|
107
108
|
}
|
|
108
109
|
}
|
|
109
110
|
@layer application {
|
|
110
|
-
.
|
|
111
|
+
._drawer_pysn1_3 ._header_pysn1_49 ._close-button_pysn1_109 {
|
|
111
112
|
color: var(--foreground-color, #141414);
|
|
112
113
|
}
|
|
113
114
|
}
|
|
114
115
|
.drawer-open {
|
|
115
116
|
overflow: hidden;
|
|
116
117
|
}
|
|
117
|
-
@keyframes _open-
|
|
118
|
+
@keyframes _open-drawer_pysn1_1 {
|
|
118
119
|
from {
|
|
119
120
|
opacity: 0;
|
|
120
121
|
transform: translateX(var(--xpos));
|
|
@@ -124,7 +125,7 @@
|
|
|
124
125
|
transform: translateX(0%);
|
|
125
126
|
}
|
|
126
127
|
}
|
|
127
|
-
@keyframes _close-
|
|
128
|
+
@keyframes _close-drawer_pysn1_1 {
|
|
128
129
|
from {
|
|
129
130
|
opacity: 1;
|
|
130
131
|
transform: translateX(0%);
|
|
@@ -134,7 +135,7 @@
|
|
|
134
135
|
transform: translateX(var(--xpos));
|
|
135
136
|
}
|
|
136
137
|
}
|
|
137
|
-
@keyframes _open-
|
|
138
|
+
@keyframes _open-backdrop_pysn1_1 {
|
|
138
139
|
from {
|
|
139
140
|
opacity: 0;
|
|
140
141
|
}
|
|
@@ -142,7 +143,7 @@
|
|
|
142
143
|
opacity: 0.6;
|
|
143
144
|
}
|
|
144
145
|
}
|
|
145
|
-
@keyframes _close-
|
|
146
|
+
@keyframes _close-backdrop_pysn1_1 {
|
|
146
147
|
from {
|
|
147
148
|
opacity: 0.6;
|
|
148
149
|
}
|
package/dist/Drawer.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { D as Drawer, a as DrawerCancelButton, d as DrawerContent, b as DrawerFooter, c as DrawerHeader, D as default } from './Drawer-
|
|
1
|
+
export { D as Drawer, a as DrawerCancelButton, d as DrawerContent, b as DrawerFooter, c as DrawerHeader, D as default } from './Drawer-8nHrKktU.js';
|
|
2
2
|
//# sourceMappingURL=Drawer.js.map
|