@jobber/components 8.27.0 → 8.27.1
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/BottomSheet-cjs.js +8 -7
- package/dist/BottomSheet-es.js +9 -8
- package/dist/ComboboxChipRemove-es.js +2 -2
- package/dist/DrawerDescription-cjs.js +4 -97
- package/dist/DrawerDescription-es.js +6 -98
- package/dist/MenuSubmenuTrigger-es.js +3 -3
- package/dist/Modal/index.cjs +12 -2
- package/dist/Modal/index.mjs +13 -3
- package/dist/ScrollAreaViewport-cjs.js +2122 -12
- package/dist/ScrollAreaViewport-es.js +2118 -13
- package/dist/dialogReturnFocus-cjs.js +8 -5
- package/dist/dialogReturnFocus-es.js +9 -6
- package/dist/styles.css +66 -10
- package/dist/unstyledPrimitives/index.cjs +218 -2230
- package/dist/unstyledPrimitives/index.mjs +224 -2236
- package/dist/useButton-es.js +1 -1
- package/dist/useScrollLock-es.js +2 -2
- package/package.json +2 -2
|
@@ -133,11 +133,11 @@ function useInsideDialogScrollArea() {
|
|
|
133
133
|
* backed by the BottomSheet primitive's scroll area, for its fade.)
|
|
134
134
|
*/
|
|
135
135
|
function DialogScrollArea$1({ children, className, style, }) {
|
|
136
|
-
return (React.createElement(ScrollAreaViewport.ScrollAreaRoot, { className: classnames(styles.scrollRegion, className), style: style },
|
|
136
|
+
return (React.createElement(ScrollAreaViewport.ScrollAreaRoot, { className: classnames(styles.scrollRegion, className), style: style, "data-testid": "ATL-Dialog-ScrollRegion" },
|
|
137
137
|
React.createElement(ScrollAreaViewport.ScrollAreaViewport, { className: styles.scrollViewport,
|
|
138
138
|
// BaseUI defaults the viewport to `overflow: scroll`; `auto` so the
|
|
139
139
|
// native scrollbar only shows when the content overflows.
|
|
140
|
-
style: { overflow: "auto" } },
|
|
140
|
+
style: { overflow: "auto" }, "data-testid": "ATL-Dialog-ScrollViewport" },
|
|
141
141
|
React.createElement(DialogScrollAreaContext.Provider, { value: true }, children))));
|
|
142
142
|
}
|
|
143
143
|
/** Layout-only header row; sticky unless nested inside a `Dialog.ScrollArea`. */
|
|
@@ -195,7 +195,9 @@ function DialogBottomSheetContent(_a) {
|
|
|
195
195
|
React.createElement(BottomSheet.BottomSheet.Popup, Object.assign({}, rest, {
|
|
196
196
|
// The bottom sheet is backed by a drawer popup, so re-shape its state
|
|
197
197
|
// into the dialog popup state the consumer's `render` is typed against.
|
|
198
|
-
render: resolveBottomSheetContentRender(render), className: classnames(styles.sheetSurface, className), style: style, role: type, finalFocus: finalFocus, "data-dialog-variant": "sheet", "data-size": size }),
|
|
198
|
+
render: resolveBottomSheetContentRender(render), className: classnames(styles.sheetSurface, className), style: style, role: type, finalFocus: finalFocus, "data-dialog-variant": "sheet", "data-size": size }),
|
|
199
|
+
React.createElement(ScrollAreaViewport.DrawerContent, { "data-base-ui-swipe-ignore": true },
|
|
200
|
+
React.createElement(DialogScrollAreaContext.Provider, { value: false }, children)))));
|
|
199
201
|
}
|
|
200
202
|
function DialogBottomSheetTitle(_a) {
|
|
201
203
|
var { children } = _a, rest = tslib_es6.__rest(_a, ["children"]);
|
|
@@ -247,8 +249,9 @@ function DialogModalContent(_a) {
|
|
|
247
249
|
const { type, size, finalFocus } = useDialogContext();
|
|
248
250
|
return (React.createElement(ScrollAreaViewport.DialogPortal, null,
|
|
249
251
|
React.createElement(DrawerDescription.DialogBackdrop, { forceRender: true, className: styles.backdrop, "data-testid": "ATL-Dialog-Backdrop" }),
|
|
250
|
-
React.createElement(
|
|
251
|
-
React.createElement(DrawerDescription.DialogPopup, Object.assign({}, rest, { className: classnames(styles.popup, styles[size], className), style: style, role: type, finalFocus: finalFocus, "data-dialog-variant": "modal" }),
|
|
252
|
+
React.createElement(ScrollAreaViewport.DialogViewport, { className: styles.viewport },
|
|
253
|
+
React.createElement(DrawerDescription.DialogPopup, Object.assign({}, rest, { className: classnames(styles.popup, styles[size], className), style: style, role: type, finalFocus: finalFocus, "data-dialog-variant": "modal" }),
|
|
254
|
+
React.createElement(DialogScrollAreaContext.Provider, { value: false }, children)))));
|
|
252
255
|
}
|
|
253
256
|
function DialogModalTitle(_a) {
|
|
254
257
|
var { children } = _a, rest = tslib_es6.__rest(_a, ["children"]);
|
|
@@ -4,12 +4,12 @@ import { useWindowDimensions } from '@jobber/hooks';
|
|
|
4
4
|
import classnames from 'classnames';
|
|
5
5
|
import { n as normalizeBaseUiButtonProps, i as isAtlantisButtonRenderTarget, s as stripNativeTypeFromButtonRenderTarget, r as renderAtlantisButtonTarget } from './buttonRenderAdapter-es.js';
|
|
6
6
|
import { B as Button } from './Button-es.js';
|
|
7
|
-
import { S as ScrollAreaRoot,
|
|
7
|
+
import { S as ScrollAreaRoot, f as ScrollAreaViewport, g as DrawerContent, j as DialogRoot, k as DialogTrigger$1, l as DialogPortal, m as DialogViewport } from './ScrollAreaViewport-es.js';
|
|
8
8
|
import { m as mergeProps } from './useRenderElement-es.js';
|
|
9
9
|
import { H as Heading } from './Heading-es.js';
|
|
10
10
|
import { a as BottomSheet, B as BottomSheetScrollAreaContext } from './BottomSheet-es.js';
|
|
11
11
|
import { D as DrawerTitle, a as DrawerClose, b as DialogTitle$1, c as DialogClose$1 } from './DrawerTitle-es.js';
|
|
12
|
-
import { D as DrawerDescription, a as DialogBackdrop, b as
|
|
12
|
+
import { D as DrawerDescription, a as DialogBackdrop, b as DialogPopup, c as DialogDescription, d as createDialogHandle } from './DrawerDescription-es.js';
|
|
13
13
|
|
|
14
14
|
// Copied from Menu's constant so the two surfaces agree on what "mobile" means.
|
|
15
15
|
// (The proposal calls for copying shared Menu values into the component first
|
|
@@ -131,11 +131,11 @@ function useInsideDialogScrollArea() {
|
|
|
131
131
|
* backed by the BottomSheet primitive's scroll area, for its fade.)
|
|
132
132
|
*/
|
|
133
133
|
function DialogScrollArea$1({ children, className, style, }) {
|
|
134
|
-
return (React__default.createElement(ScrollAreaRoot, { className: classnames(styles.scrollRegion, className), style: style },
|
|
134
|
+
return (React__default.createElement(ScrollAreaRoot, { className: classnames(styles.scrollRegion, className), style: style, "data-testid": "ATL-Dialog-ScrollRegion" },
|
|
135
135
|
React__default.createElement(ScrollAreaViewport, { className: styles.scrollViewport,
|
|
136
136
|
// BaseUI defaults the viewport to `overflow: scroll`; `auto` so the
|
|
137
137
|
// native scrollbar only shows when the content overflows.
|
|
138
|
-
style: { overflow: "auto" } },
|
|
138
|
+
style: { overflow: "auto" }, "data-testid": "ATL-Dialog-ScrollViewport" },
|
|
139
139
|
React__default.createElement(DialogScrollAreaContext.Provider, { value: true }, children))));
|
|
140
140
|
}
|
|
141
141
|
/** Layout-only header row; sticky unless nested inside a `Dialog.ScrollArea`. */
|
|
@@ -193,7 +193,9 @@ function DialogBottomSheetContent(_a) {
|
|
|
193
193
|
React__default.createElement(BottomSheet.Popup, Object.assign({}, rest, {
|
|
194
194
|
// The bottom sheet is backed by a drawer popup, so re-shape its state
|
|
195
195
|
// into the dialog popup state the consumer's `render` is typed against.
|
|
196
|
-
render: resolveBottomSheetContentRender(render), className: classnames(styles.sheetSurface, className), style: style, role: type, finalFocus: finalFocus, "data-dialog-variant": "sheet", "data-size": size }),
|
|
196
|
+
render: resolveBottomSheetContentRender(render), className: classnames(styles.sheetSurface, className), style: style, role: type, finalFocus: finalFocus, "data-dialog-variant": "sheet", "data-size": size }),
|
|
197
|
+
React__default.createElement(DrawerContent, { "data-base-ui-swipe-ignore": true },
|
|
198
|
+
React__default.createElement(DialogScrollAreaContext.Provider, { value: false }, children)))));
|
|
197
199
|
}
|
|
198
200
|
function DialogBottomSheetTitle(_a) {
|
|
199
201
|
var { children } = _a, rest = __rest(_a, ["children"]);
|
|
@@ -246,7 +248,8 @@ function DialogModalContent(_a) {
|
|
|
246
248
|
return (React__default.createElement(DialogPortal, null,
|
|
247
249
|
React__default.createElement(DialogBackdrop, { forceRender: true, className: styles.backdrop, "data-testid": "ATL-Dialog-Backdrop" }),
|
|
248
250
|
React__default.createElement(DialogViewport, { className: styles.viewport },
|
|
249
|
-
React__default.createElement(DialogPopup, Object.assign({}, rest, { className: classnames(styles.popup, styles[size], className), style: style, role: type, finalFocus: finalFocus, "data-dialog-variant": "modal" }),
|
|
251
|
+
React__default.createElement(DialogPopup, Object.assign({}, rest, { className: classnames(styles.popup, styles[size], className), style: style, role: type, finalFocus: finalFocus, "data-dialog-variant": "modal" }),
|
|
252
|
+
React__default.createElement(DialogScrollAreaContext.Provider, { value: false }, children)))));
|
|
250
253
|
}
|
|
251
254
|
function DialogModalTitle(_a) {
|
|
252
255
|
var { children } = _a, rest = __rest(_a, ["children"]);
|
package/dist/styles.css
CHANGED
|
@@ -4055,7 +4055,7 @@ a._7BLGtYNuJOU-.zgRx3ehZ2z8-:hover {
|
|
|
4055
4055
|
*/
|
|
4056
4056
|
}
|
|
4057
4057
|
|
|
4058
|
-
.Qf3IFhKJwQ0-:has(~ ._868PDAA3U2M-[data-nested-drawer-open]) {
|
|
4058
|
+
.Qf3IFhKJwQ0-:has(~ .U069n8h0urk- ._868PDAA3U2M-[data-nested-drawer-open]) {
|
|
4059
4059
|
background-color: transparent;
|
|
4060
4060
|
}
|
|
4061
4061
|
|
|
@@ -4154,6 +4154,24 @@ a._7BLGtYNuJOU-.zgRx3ehZ2z8-:hover {
|
|
|
4154
4154
|
}
|
|
4155
4155
|
}
|
|
4156
4156
|
|
|
4157
|
+
/*
|
|
4158
|
+
* Positioning container for the popup, spanning the whole screen. Base UI's
|
|
4159
|
+
* Drawer expects the popup to render within a viewport (it enables swipe
|
|
4160
|
+
* handling and touch scroll locking). The popup positions itself (fixed, pinned
|
|
4161
|
+
* to the bottom); the viewport only establishes the full-screen area above the
|
|
4162
|
+
* backdrop.
|
|
4163
|
+
*/
|
|
4164
|
+
|
|
4165
|
+
.U069n8h0urk- {
|
|
4166
|
+
position: fixed;
|
|
4167
|
+
top: 0;
|
|
4168
|
+
right: 0;
|
|
4169
|
+
bottom: 0;
|
|
4170
|
+
left: 0;
|
|
4171
|
+
z-index: 1001;
|
|
4172
|
+
z-index: var(--elevation-modal);
|
|
4173
|
+
}
|
|
4174
|
+
|
|
4157
4175
|
.yL7--3ni8BM- {
|
|
4158
4176
|
display: -ms-flexbox;
|
|
4159
4177
|
display: flex;
|
|
@@ -10381,8 +10399,14 @@ h2.react-datepicker__current-month {
|
|
|
10381
10399
|
--dialog-popup-max-width: 1032px;
|
|
10382
10400
|
}
|
|
10383
10401
|
.nJoCr8oWJ7w- {
|
|
10384
|
-
|
|
10385
|
-
|
|
10402
|
+
/* Use 100% (not 100vw) so the popup fills the viewport's scrollable content
|
|
10403
|
+
box rather than the full vw since the vertical scrollbar takes up layout space */
|
|
10404
|
+
--dialog-popup-width: 100%;
|
|
10405
|
+
--dialog-popup-max-width: 100%;
|
|
10406
|
+
/* Always cap the popup to the viewport height for full-screen, regardless of
|
|
10407
|
+
whether any region is sticky. Without this, the "nothing-sticky" scroll
|
|
10408
|
+
composition will not be able to scroll. */
|
|
10409
|
+
--dialog-popup-max-height: 100dvh;
|
|
10386
10410
|
--dialog-popup-min-height: 100dvh;
|
|
10387
10411
|
/* No margins full screen — the viewport also drops its padding-block for
|
|
10388
10412
|
fullScreen (below) so the popup sits flush against every edge. Zeroing the
|
|
@@ -10456,12 +10480,8 @@ h2.react-datepicker__current-month {
|
|
|
10456
10480
|
padding: 0 24px 24px;
|
|
10457
10481
|
padding: 0 var(--space-large) var(--space-large);
|
|
10458
10482
|
}
|
|
10459
|
-
/* Slide the
|
|
10483
|
+
/* Slide the sheet up on open, down on close. */
|
|
10460
10484
|
.vmcZRwOcNMo- {
|
|
10461
|
-
-webkit-transform: translateY(0px);
|
|
10462
|
-
-webkit-transform: translateY(var(--drawer-swipe-movement-y, 0px));
|
|
10463
|
-
transform: translateY(0px);
|
|
10464
|
-
transform: translateY(var(--drawer-swipe-movement-y, 0px));
|
|
10465
10485
|
transition: -webkit-transform 200ms ease;
|
|
10466
10486
|
transition: -webkit-transform var(--timing-base) ease;
|
|
10467
10487
|
transition: transform 200ms ease;
|
|
@@ -10474,12 +10494,44 @@ h2.react-datepicker__current-month {
|
|
|
10474
10494
|
-webkit-transform: translateY(100%);
|
|
10475
10495
|
transform: translateY(100%);
|
|
10476
10496
|
}
|
|
10497
|
+
/*
|
|
10498
|
+
* Only transform the sheet mid-swipe, never while it's just sitting open.
|
|
10499
|
+
* Why it matters: any transform on this element makes its `position: fixed`
|
|
10500
|
+
* children size themselves to the sheet instead of the screen. FilterPicker's
|
|
10501
|
+
* click-away layer is one of those fixed, full-screen children — with a
|
|
10502
|
+
* transform here it shrinks to the sheet's box, so tapping the backdrop misses
|
|
10503
|
+
* it, hits the sheet, and closes the whole sheet instead of just the picker.
|
|
10504
|
+
* A swipe is the one time we need the transform, and there's no open picker to
|
|
10505
|
+
* break then. base-ui adds `data-swiping` and updates the movement variable
|
|
10506
|
+
* while a swipe is happening.
|
|
10507
|
+
*/
|
|
10508
|
+
.vmcZRwOcNMo-[data-swiping] {
|
|
10509
|
+
-webkit-transform: translateY(0px);
|
|
10510
|
+
-webkit-transform: translateY(var(--drawer-swipe-movement-y, 0px));
|
|
10511
|
+
transform: translateY(0px);
|
|
10512
|
+
transform: translateY(var(--drawer-swipe-movement-y, 0px));
|
|
10513
|
+
}
|
|
10477
10514
|
/* Full-screen bottom sheet */
|
|
10478
10515
|
.vmcZRwOcNMo-[data-size="fullScreen"] {
|
|
10479
10516
|
height: 100dvh;
|
|
10480
10517
|
max-height: 100dvh;
|
|
10481
10518
|
border-radius: 0;
|
|
10482
10519
|
}
|
|
10520
|
+
/* The sheet content renders inside a `Drawer.Content` region (`data-drawer-content`,
|
|
10521
|
+
swipe-ignored so a nested floater can catch an outside press). It's a direct
|
|
10522
|
+
child of the popup, so pass the popup's flex column through it — otherwise the
|
|
10523
|
+
Header/ScrollArea/Footer no longer flex against the popup and the scroll region
|
|
10524
|
+
can't fill/scroll (most visibly on fullScreen at 100dvh). */
|
|
10525
|
+
.vmcZRwOcNMo- > [data-drawer-content] {
|
|
10526
|
+
display: -ms-flexbox;
|
|
10527
|
+
display: flex;
|
|
10528
|
+
-ms-flex: 1 1 auto;
|
|
10529
|
+
flex: 1 1 auto;
|
|
10530
|
+
min-height: 0;
|
|
10531
|
+
-ms-flex-direction: column;
|
|
10532
|
+
flex-direction: column;
|
|
10533
|
+
overflow: hidden;
|
|
10534
|
+
}
|
|
10483
10535
|
/* Scroll divider — shown on a sticky Header/Footer only while the scroll region
|
|
10484
10536
|
actually overflows (BaseUI sets `data-has-overflow-y` on the ScrollArea root
|
|
10485
10537
|
when its content overflows). */
|
|
@@ -10548,8 +10600,12 @@ h2.react-datepicker__current-month {
|
|
|
10548
10600
|
background-color: transparent;
|
|
10549
10601
|
backdrop-filter: none;
|
|
10550
10602
|
}
|
|
10551
|
-
/* Bottom sheet backdrop
|
|
10552
|
-
|
|
10603
|
+
/* Bottom sheet backdrop. The sheet popup (`data-dialog-variant="sheet"`) renders
|
|
10604
|
+
inside the drawer viewport, which is the backdrop's following sibling, so
|
|
10605
|
+
target the viewport by its testid then match the sheet popup within it. */
|
|
10606
|
+
[data-testid="ATL-BottomSheet-Backdrop"]:has(
|
|
10607
|
+
~ [data-testid="ATL-BottomSheet-Viewport"] [data-dialog-variant="sheet"]
|
|
10608
|
+
) {
|
|
10553
10609
|
background-color: rgba(121, 119, 114, 0.48);
|
|
10554
10610
|
backdrop-filter: blur(2px);
|
|
10555
10611
|
}
|