@jobber/components 8.21.0 → 8.22.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/Dialog.d.ts +1 -0
- package/Dialog.js +17 -0
- package/dist/BottomSheet-cjs.js +34 -7
- package/dist/BottomSheet-es.js +34 -8
- package/dist/Card/index.cjs +1 -0
- package/dist/Card/index.mjs +1 -0
- package/dist/ComboboxChipRemove-es.js +3 -3
- package/dist/DataDump/index.cjs +1 -0
- package/dist/DataDump/index.mjs +1 -0
- package/dist/Dialog/Dialog.d.ts +3 -0
- package/dist/Dialog/Dialog.types.d.ts +205 -0
- package/dist/Dialog/DialogBottomSheet.d.ts +28 -0
- package/dist/Dialog/DialogModal.d.ts +20 -0
- package/dist/Dialog/constants.d.ts +1 -0
- package/dist/Dialog/dialogComposableShared.d.ts +53 -0
- package/dist/Dialog/dialogReturnFocus.d.ts +43 -0
- package/dist/Dialog/index.cjs +32 -0
- package/dist/Dialog/index.d.ts +4 -0
- package/dist/Dialog/index.mjs +24 -0
- package/dist/DrawerDescription-cjs.js +409 -0
- package/dist/DrawerDescription-es.js +382 -0
- package/dist/DrawerTitle-cjs.js +116 -0
- package/dist/DrawerTitle-es.js +92 -0
- package/dist/InputNumberExperimental-es.js +1 -1
- package/dist/InternalBackdrop-es.js +2 -2
- package/dist/Menu/index.cjs +1 -0
- package/dist/Menu/index.mjs +1 -0
- package/dist/Menu-cjs.js +5 -3
- package/dist/Menu-es.js +5 -3
- package/dist/MenuSubmenuTrigger-cjs.js +49 -91
- package/dist/MenuSubmenuTrigger-es.js +51 -91
- package/dist/NumberFieldInput-es.js +1 -1
- package/dist/Page/index.cjs +1 -0
- package/dist/Page/index.mjs +1 -0
- package/dist/ScrollAreaViewport-cjs.js +938 -935
- package/dist/ScrollAreaViewport-es.js +938 -938
- package/dist/dialogReturnFocus-cjs.js +427 -0
- package/dist/dialogReturnFocus-es.js +423 -0
- package/dist/docs/Icon/Icon.md +1 -0
- package/dist/index.cjs +13 -7
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +10 -7
- package/dist/primitives/BottomSheet/BottomSheet.d.ts +19 -1
- package/dist/primitives/BottomSheet/BottomSheet.types.d.ts +8 -0
- package/dist/primitives/BottomSheet/index.cjs +1 -0
- package/dist/primitives/BottomSheet/index.d.ts +1 -1
- package/dist/primitives/BottomSheet/index.mjs +1 -1
- package/dist/primitives/index.cjs +1 -0
- package/dist/primitives/index.mjs +1 -1
- package/dist/styles.css +360 -0
- package/dist/unstyledPrimitives/index.cjs +32 -249
- package/dist/unstyledPrimitives/index.d.ts +1 -0
- package/dist/unstyledPrimitives/index.mjs +30 -248
- package/dist/useButton-es.js +1 -1
- package/dist/useCompositeListItem-es.js +2 -2
- package/dist/useLabel-es.js +1 -1
- package/dist/utils/meta/meta.json +11 -1
- package/package.json +3 -3
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { e as useStableCallback, a9 as pointer, j as useIsoLayoutEffect, o as ownerDocument, r as contains, k as getTarget, f as useTimeout, b as useBaseUiId, c as createChangeEventDetails, aa as swipe, ab as useAnimationFrame, ac as TransitionStatusDataAttributes, E as useControlled, a3 as itemPress, h as useTransitionStatus, d as useOpenChangeComplete, a5 as useAnimationsFinished, ad as isFirefox, ae as scrub, N as createGenericEventDetails, af as isWebKit } from '../useButton-es.js';
|
|
3
3
|
import { A as useCoreFilter, B as AriaCombobox, D as stringifyAsLabel, E as useComboboxInputValueContext, l as ComboboxArrow, i as ComboboxBackdrop, x as ComboboxClear, v as ComboboxCollection, w as ComboboxEmpty, n as ComboboxGroup, o as ComboboxGroupLabel, m as ComboboxIcon, c as ComboboxInput, d as ComboboxInputGroup, p as ComboboxItem, f as ComboboxList, k as ComboboxPopup, h as ComboboxPortal, j as ComboboxPositioner, u as ComboboxRow, g as ComboboxStatus, e as ComboboxTrigger, z as useFilteredItems, s as ComboboxChip, t as ComboboxChipRemove, r as ComboboxChips, q as ComboboxItemIndicator, a as ComboboxLabel, C as ComboboxRoot, b as ComboboxValue, y as useComboboxFilter } from '../ComboboxChipRemove-es.js';
|
|
4
4
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
5
5
|
import { S as Separator } from '../Separator-es.js';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { a as DialogBackdrop, d as DialogDescription, f as DialogHandle, c as DialogPopup, b as DialogViewport, e as createDialogHandle, D as DrawerDescription } from '../DrawerDescription-es.js';
|
|
7
|
+
import { c as DialogClose, b as DialogTitle, a as DrawerClose, D as DrawerTitle } from '../DrawerTitle-es.js';
|
|
8
|
+
import { i as DialogPortal, g as DialogRoot, h as DialogTrigger, t as useDrawerProviderContext, v as DrawerBackdropCssVars, w as DrawerPopupCssVars, x as DrawerProviderContext, u as useDialogRootContext, y as useDrawerRootContext, s as useTriggerRegistration, z as DrawerPopupDataAttributes, A as useDrawerSnapPoints, B as DrawerViewportContext, E as DRAWER_CONTENT_ATTRIBUTE, c as DrawerBackdrop, f as DrawerContent, d as DrawerPopup, b as DrawerPortal, a as DrawerRoot, D as DrawerTrigger, F as useScrollAreaRootContext, G as getOffset, H as ScrollAreaRootCssVars, I as scrollAreaStateAttributesMapping, J as useScrollAreaViewportContext, S as ScrollAreaRoot, e as ScrollAreaViewport } from '../ScrollAreaViewport-es.js';
|
|
8
9
|
import { u as useRenderElement, m as mergeProps, f as formatErrorMessage, N as NOOP, E as EMPTY_OBJECT } from '../useRenderElement-es.js';
|
|
9
10
|
import { a as isHTMLElement, f as getComputedStyle, b as isElement, k as getWindow } from '../floating-ui.utils.dom-es.js';
|
|
10
11
|
import { c as clamp } from '../clamp-es.js';
|
|
11
|
-
import { C as CommonPopupDataAttributes,
|
|
12
|
+
import { C as CommonPopupDataAttributes, Y as BASE_UI_SWIPE_IGNORE_SELECTOR, p as popupStateMapping, n as useDirection, t as inertValue } from '../InternalBackdrop-es.js';
|
|
12
13
|
import * as ReactDOM from 'react-dom';
|
|
14
|
+
import { u as useMenuRootContext, o as useMenuPositionerContext, p as useMenuItem, R as REGULAR_ITEM, q as itemMapping, r as MenuStore, h as MenuBackdrop, l as MenuGroup, n as MenuGroupLabel, b as MenuItem, a as MenuLinkItem, j as MenuPopup, g as MenuPortal, i as MenuPositioner, k as MenuRadioGroup, c as MenuRadioItem, d as MenuRadioItemIndicator, f as MenuRoot, m as MenuSubmenuRoot, e as MenuSubmenuTrigger, M as MenuTrigger } from '../MenuSubmenuTrigger-es.js';
|
|
13
15
|
import { u as useCompositeListItem } from '../useCompositeListItem-es.js';
|
|
14
16
|
import { y as round } from '../index.esm-es.js';
|
|
15
|
-
import { u as useNumberFieldRootContext, D as DEFAULT_STEP, s as stateAttributesMapping$
|
|
17
|
+
import { u as useNumberFieldRootContext, D as DEFAULT_STEP, s as stateAttributesMapping$4, d as NumberFieldDecrement, a as NumberFieldGroup, c as NumberFieldIncrement, b as NumberFieldInput, N as NumberFieldRoot } from '../NumberFieldInput-es.js';
|
|
16
18
|
import '../useLabel-es.js';
|
|
17
19
|
import '../floating-ui.react-dom-es.js';
|
|
18
20
|
|
|
@@ -125,7 +127,7 @@ function AutocompleteValue(props) {
|
|
|
125
127
|
});
|
|
126
128
|
}
|
|
127
129
|
|
|
128
|
-
var index_parts$
|
|
130
|
+
var index_parts$6 = /*#__PURE__*/Object.freeze({
|
|
129
131
|
__proto__: null,
|
|
130
132
|
Arrow: ComboboxArrow,
|
|
131
133
|
Backdrop: ComboboxBackdrop,
|
|
@@ -152,42 +154,22 @@ var index_parts$5 = /*#__PURE__*/Object.freeze({
|
|
|
152
154
|
useFilteredItems: useFilteredItems
|
|
153
155
|
});
|
|
154
156
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
const {
|
|
169
|
-
store
|
|
170
|
-
} = useDialogRootContext();
|
|
171
|
-
const id = useBaseUiId(idProp);
|
|
172
|
-
store.useSyncedValueWithCleanup('descriptionElementId', id);
|
|
173
|
-
return useRenderElement('p', componentProps, {
|
|
174
|
-
ref: forwardedRef,
|
|
175
|
-
props: [{
|
|
176
|
-
id
|
|
177
|
-
}, elementProps]
|
|
178
|
-
});
|
|
157
|
+
var index_parts$5 = /*#__PURE__*/Object.freeze({
|
|
158
|
+
__proto__: null,
|
|
159
|
+
Backdrop: DialogBackdrop,
|
|
160
|
+
Close: DialogClose,
|
|
161
|
+
Description: DialogDescription,
|
|
162
|
+
Handle: DialogHandle,
|
|
163
|
+
Popup: DialogPopup,
|
|
164
|
+
Portal: DialogPortal,
|
|
165
|
+
Root: DialogRoot,
|
|
166
|
+
Title: DialogTitle,
|
|
167
|
+
Trigger: DialogTrigger,
|
|
168
|
+
Viewport: DialogViewport,
|
|
169
|
+
createHandle: createDialogHandle
|
|
179
170
|
});
|
|
180
|
-
if (process.env.NODE_ENV !== "production") DialogDescription.displayName = "DialogDescription";
|
|
181
|
-
|
|
182
|
-
/**
|
|
183
|
-
* A paragraph with additional information about the drawer.
|
|
184
|
-
* Renders a `<p>` element.
|
|
185
|
-
*
|
|
186
|
-
* Documentation: [Base UI Drawer](https://base-ui.com/react/components/drawer)
|
|
187
|
-
*/
|
|
188
|
-
const DrawerDescription = DialogDescription;
|
|
189
171
|
|
|
190
|
-
const stateAttributesMapping$
|
|
172
|
+
const stateAttributesMapping$3 = {
|
|
191
173
|
active(value) {
|
|
192
174
|
if (value) {
|
|
193
175
|
return {
|
|
@@ -257,12 +239,12 @@ const DrawerIndent = /*#__PURE__*/React.forwardRef(function DrawerIndent(compone
|
|
|
257
239
|
[DrawerBackdropCssVars.swipeProgress]: '0'
|
|
258
240
|
}
|
|
259
241
|
}, elementProps],
|
|
260
|
-
stateAttributesMapping: stateAttributesMapping$
|
|
242
|
+
stateAttributesMapping: stateAttributesMapping$3
|
|
261
243
|
});
|
|
262
244
|
});
|
|
263
245
|
if (process.env.NODE_ENV !== "production") DrawerIndent.displayName = "DrawerIndent";
|
|
264
246
|
|
|
265
|
-
const stateAttributesMapping$
|
|
247
|
+
const stateAttributesMapping$2 = {
|
|
266
248
|
active(value) {
|
|
267
249
|
if (value) {
|
|
268
250
|
return {
|
|
@@ -296,7 +278,7 @@ const DrawerIndentBackground = /*#__PURE__*/React.forwardRef(function DrawerInde
|
|
|
296
278
|
ref: forwardedRef,
|
|
297
279
|
state,
|
|
298
280
|
props: elementProps,
|
|
299
|
-
stateAttributesMapping: stateAttributesMapping$
|
|
281
|
+
stateAttributesMapping: stateAttributesMapping$2
|
|
300
282
|
});
|
|
301
283
|
});
|
|
302
284
|
if (process.env.NODE_ENV !== "production") DrawerIndentBackground.displayName = "DrawerIndentBackground";
|
|
@@ -384,160 +366,6 @@ function createVisualStateStore() {
|
|
|
384
366
|
};
|
|
385
367
|
}
|
|
386
368
|
|
|
387
|
-
let DialogViewportDataAttributes = function (DialogViewportDataAttributes) {
|
|
388
|
-
/**
|
|
389
|
-
* Present when the dialog is open.
|
|
390
|
-
*/
|
|
391
|
-
DialogViewportDataAttributes[DialogViewportDataAttributes["open"] = CommonPopupDataAttributes.open] = "open";
|
|
392
|
-
/**
|
|
393
|
-
* Present when the dialog is closed.
|
|
394
|
-
*/
|
|
395
|
-
DialogViewportDataAttributes[DialogViewportDataAttributes["closed"] = CommonPopupDataAttributes.closed] = "closed";
|
|
396
|
-
/**
|
|
397
|
-
* Present when the dialog is animating in.
|
|
398
|
-
*/
|
|
399
|
-
DialogViewportDataAttributes[DialogViewportDataAttributes["startingStyle"] = CommonPopupDataAttributes.startingStyle] = "startingStyle";
|
|
400
|
-
/**
|
|
401
|
-
* Present when the dialog is animating out.
|
|
402
|
-
*/
|
|
403
|
-
DialogViewportDataAttributes[DialogViewportDataAttributes["endingStyle"] = CommonPopupDataAttributes.endingStyle] = "endingStyle";
|
|
404
|
-
/**
|
|
405
|
-
* Present when the dialog is nested within another dialog.
|
|
406
|
-
*/
|
|
407
|
-
DialogViewportDataAttributes["nested"] = "data-nested";
|
|
408
|
-
/**
|
|
409
|
-
* Present when the dialog has other open dialogs nested within it.
|
|
410
|
-
*/
|
|
411
|
-
DialogViewportDataAttributes["nestedDialogOpen"] = "data-nested-dialog-open";
|
|
412
|
-
return DialogViewportDataAttributes;
|
|
413
|
-
}({});
|
|
414
|
-
|
|
415
|
-
const stateAttributesMapping$3 = {
|
|
416
|
-
...popupStateMapping,
|
|
417
|
-
...transitionStatusMapping,
|
|
418
|
-
nested(value) {
|
|
419
|
-
return value ? {
|
|
420
|
-
[DialogViewportDataAttributes.nested]: ''
|
|
421
|
-
} : null;
|
|
422
|
-
},
|
|
423
|
-
nestedDialogOpen(value) {
|
|
424
|
-
return value ? {
|
|
425
|
-
[DialogViewportDataAttributes.nestedDialogOpen]: ''
|
|
426
|
-
} : null;
|
|
427
|
-
}
|
|
428
|
-
};
|
|
429
|
-
|
|
430
|
-
/**
|
|
431
|
-
* A positioning container for the dialog popup that can be made scrollable.
|
|
432
|
-
* Renders a `<div>` element.
|
|
433
|
-
*
|
|
434
|
-
* Documentation: [Base UI Dialog](https://base-ui.com/react/components/dialog)
|
|
435
|
-
*/
|
|
436
|
-
const DialogViewport = /*#__PURE__*/React.forwardRef(function DialogViewport(componentProps, forwardedRef) {
|
|
437
|
-
const {
|
|
438
|
-
className,
|
|
439
|
-
render,
|
|
440
|
-
children,
|
|
441
|
-
...elementProps
|
|
442
|
-
} = componentProps;
|
|
443
|
-
const keepMounted = useDialogPortalContext();
|
|
444
|
-
const {
|
|
445
|
-
store
|
|
446
|
-
} = useDialogRootContext();
|
|
447
|
-
const open = store.useState('open');
|
|
448
|
-
const nested = store.useState('nested');
|
|
449
|
-
const transitionStatus = store.useState('transitionStatus');
|
|
450
|
-
const nestedOpenDialogCount = store.useState('nestedOpenDialogCount');
|
|
451
|
-
const mounted = store.useState('mounted');
|
|
452
|
-
const nestedDialogOpen = nestedOpenDialogCount > 0;
|
|
453
|
-
const state = {
|
|
454
|
-
open,
|
|
455
|
-
nested,
|
|
456
|
-
transitionStatus,
|
|
457
|
-
nestedDialogOpen
|
|
458
|
-
};
|
|
459
|
-
const shouldRender = keepMounted || mounted;
|
|
460
|
-
return useRenderElement('div', componentProps, {
|
|
461
|
-
enabled: shouldRender,
|
|
462
|
-
state,
|
|
463
|
-
ref: [forwardedRef, store.useStateSetter('viewportElement')],
|
|
464
|
-
stateAttributesMapping: stateAttributesMapping$3,
|
|
465
|
-
props: [{
|
|
466
|
-
role: 'presentation',
|
|
467
|
-
hidden: !mounted,
|
|
468
|
-
style: {
|
|
469
|
-
pointerEvents: !open ? 'none' : undefined
|
|
470
|
-
},
|
|
471
|
-
children
|
|
472
|
-
}, elementProps]
|
|
473
|
-
});
|
|
474
|
-
});
|
|
475
|
-
if (process.env.NODE_ENV !== "production") DialogViewport.displayName = "DialogViewport";
|
|
476
|
-
|
|
477
|
-
/**
|
|
478
|
-
* A handle to control a Dialog imperatively and to associate detached triggers with it.
|
|
479
|
-
*/
|
|
480
|
-
class DialogHandle {
|
|
481
|
-
/**
|
|
482
|
-
* Internal store holding the dialog state.
|
|
483
|
-
* @internal
|
|
484
|
-
*/
|
|
485
|
-
|
|
486
|
-
constructor(store) {
|
|
487
|
-
this.store = store ?? new DialogStore();
|
|
488
|
-
}
|
|
489
|
-
|
|
490
|
-
/**
|
|
491
|
-
* Opens the dialog and associates it with the trigger with the given id.
|
|
492
|
-
* The trigger, if provided, must be a Dialog.Trigger component with this handle passed as a prop.
|
|
493
|
-
*
|
|
494
|
-
* This method should only be called in an event handler or an effect (not during rendering).
|
|
495
|
-
*
|
|
496
|
-
* @param triggerId ID of the trigger to associate with the dialog. If null, the dialog will open without a trigger association.
|
|
497
|
-
*/
|
|
498
|
-
open(triggerId) {
|
|
499
|
-
const triggerElement = triggerId ? this.store.context.triggerElements.getById(triggerId) : undefined;
|
|
500
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
501
|
-
if (triggerId && !triggerElement) {
|
|
502
|
-
console.warn(`Base UI: DialogHandle.open: No trigger found with id "${triggerId}". The dialog will open, but the trigger will not be associated with the dialog.`);
|
|
503
|
-
}
|
|
504
|
-
}
|
|
505
|
-
this.store.setOpen(true, createChangeEventDetails(imperativeAction, undefined, triggerElement));
|
|
506
|
-
}
|
|
507
|
-
|
|
508
|
-
/**
|
|
509
|
-
* Opens the dialog and sets the payload.
|
|
510
|
-
* Does not associate the dialog with any trigger.
|
|
511
|
-
*
|
|
512
|
-
* @param payload Payload to set when opening the dialog.
|
|
513
|
-
*/
|
|
514
|
-
openWithPayload(payload) {
|
|
515
|
-
this.store.set('payload', payload);
|
|
516
|
-
this.store.setOpen(true, createChangeEventDetails(imperativeAction, undefined, undefined));
|
|
517
|
-
}
|
|
518
|
-
|
|
519
|
-
/**
|
|
520
|
-
* Closes the dialog.
|
|
521
|
-
*/
|
|
522
|
-
close() {
|
|
523
|
-
this.store.setOpen(false, createChangeEventDetails(imperativeAction, undefined, undefined));
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
/**
|
|
527
|
-
* Indicates whether the dialog is currently open.
|
|
528
|
-
*/
|
|
529
|
-
get isOpen() {
|
|
530
|
-
return this.store.state.open;
|
|
531
|
-
}
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
/**
|
|
535
|
-
* Creates a new handle to connect a Dialog.Root with detached Dialog.Trigger components.
|
|
536
|
-
*/
|
|
537
|
-
function createDialogHandle() {
|
|
538
|
-
return new DialogHandle();
|
|
539
|
-
}
|
|
540
|
-
|
|
541
369
|
function isScrollable(element, axis) {
|
|
542
370
|
const style = getComputedStyle(element);
|
|
543
371
|
if (axis === 'vertical') {
|
|
@@ -1550,7 +1378,7 @@ const SWIPE_AREA_SWIPING_HOOK = {
|
|
|
1550
1378
|
const SWIPE_AREA_DISABLED_HOOK = {
|
|
1551
1379
|
[DrawerSwipeAreaDataAttributes.disabled]: ''
|
|
1552
1380
|
};
|
|
1553
|
-
const stateAttributesMapping$
|
|
1381
|
+
const stateAttributesMapping$1 = {
|
|
1554
1382
|
open(value) {
|
|
1555
1383
|
return value ? SWIPE_AREA_OPEN_HOOK : SWIPE_AREA_CLOSED_HOOK;
|
|
1556
1384
|
},
|
|
@@ -1855,7 +1683,7 @@ const DrawerSwipeArea = /*#__PURE__*/React.forwardRef(function DrawerSwipeArea(c
|
|
|
1855
1683
|
return useRenderElement('div', componentProps, {
|
|
1856
1684
|
state,
|
|
1857
1685
|
ref: [forwardedRef, swipeAreaRef, registerTrigger],
|
|
1858
|
-
stateAttributesMapping: stateAttributesMapping$
|
|
1686
|
+
stateAttributesMapping: stateAttributesMapping$1,
|
|
1859
1687
|
props: [{
|
|
1860
1688
|
role: 'presentation',
|
|
1861
1689
|
'aria-hidden': true,
|
|
@@ -2921,52 +2749,6 @@ const MenuArrow = /*#__PURE__*/React.forwardRef(function MenuArrow(componentProp
|
|
|
2921
2749
|
});
|
|
2922
2750
|
if (process.env.NODE_ENV !== "production") MenuArrow.displayName = "MenuArrow";
|
|
2923
2751
|
|
|
2924
|
-
const stateAttributesMapping$1 = {
|
|
2925
|
-
...popupStateMapping,
|
|
2926
|
-
...transitionStatusMapping
|
|
2927
|
-
};
|
|
2928
|
-
|
|
2929
|
-
/**
|
|
2930
|
-
* An overlay displayed beneath the menu popup.
|
|
2931
|
-
* Renders a `<div>` element.
|
|
2932
|
-
*
|
|
2933
|
-
* Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
|
|
2934
|
-
*/
|
|
2935
|
-
const MenuBackdrop = /*#__PURE__*/React.forwardRef(function MenuBackdrop(componentProps, forwardedRef) {
|
|
2936
|
-
const {
|
|
2937
|
-
className,
|
|
2938
|
-
render,
|
|
2939
|
-
...elementProps
|
|
2940
|
-
} = componentProps;
|
|
2941
|
-
const {
|
|
2942
|
-
store
|
|
2943
|
-
} = useMenuRootContext();
|
|
2944
|
-
const open = store.useState('open');
|
|
2945
|
-
const mounted = store.useState('mounted');
|
|
2946
|
-
const transitionStatus = store.useState('transitionStatus');
|
|
2947
|
-
const lastOpenChangeReason = store.useState('lastOpenChangeReason');
|
|
2948
|
-
const contextMenuContext = useContextMenuRootContext();
|
|
2949
|
-
const state = {
|
|
2950
|
-
open,
|
|
2951
|
-
transitionStatus
|
|
2952
|
-
};
|
|
2953
|
-
return useRenderElement('div', componentProps, {
|
|
2954
|
-
ref: contextMenuContext?.backdropRef ? [forwardedRef, contextMenuContext.backdropRef] : forwardedRef,
|
|
2955
|
-
state,
|
|
2956
|
-
stateAttributesMapping: stateAttributesMapping$1,
|
|
2957
|
-
props: [{
|
|
2958
|
-
role: 'presentation',
|
|
2959
|
-
hidden: !mounted,
|
|
2960
|
-
style: {
|
|
2961
|
-
pointerEvents: lastOpenChangeReason === triggerHover ? 'none' : undefined,
|
|
2962
|
-
userSelect: 'none',
|
|
2963
|
-
WebkitUserSelect: 'none'
|
|
2964
|
-
}
|
|
2965
|
-
}, elementProps]
|
|
2966
|
-
});
|
|
2967
|
-
});
|
|
2968
|
-
if (process.env.NODE_ENV !== "production") MenuBackdrop.displayName = "MenuBackdrop";
|
|
2969
|
-
|
|
2970
2752
|
const MenuCheckboxItemContext = /*#__PURE__*/React.createContext(undefined);
|
|
2971
2753
|
if (process.env.NODE_ENV !== "production") MenuCheckboxItemContext.displayName = "MenuCheckboxItemContext";
|
|
2972
2754
|
function useMenuCheckboxItemContext() {
|
|
@@ -4388,7 +4170,7 @@ const NumberFieldScrubArea = /*#__PURE__*/React.forwardRef(function NumberFieldS
|
|
|
4388
4170
|
ref: [forwardedRef, scrubAreaRef],
|
|
4389
4171
|
state,
|
|
4390
4172
|
props: [defaultProps, elementProps],
|
|
4391
|
-
stateAttributesMapping: stateAttributesMapping$
|
|
4173
|
+
stateAttributesMapping: stateAttributesMapping$4
|
|
4392
4174
|
});
|
|
4393
4175
|
const contextValue = React.useMemo(() => ({
|
|
4394
4176
|
isScrubbing,
|
|
@@ -4446,7 +4228,7 @@ const NumberFieldScrubAreaCursor = /*#__PURE__*/React.forwardRef(function Number
|
|
|
4446
4228
|
pointerEvents: 'none'
|
|
4447
4229
|
}
|
|
4448
4230
|
}, elementProps],
|
|
4449
|
-
stateAttributesMapping: stateAttributesMapping$
|
|
4231
|
+
stateAttributesMapping: stateAttributesMapping$4
|
|
4450
4232
|
});
|
|
4451
4233
|
return element && /*#__PURE__*/ReactDOM.createPortal(element, ownerDocument(domElement).body);
|
|
4452
4234
|
});
|
|
@@ -4472,4 +4254,4 @@ function useRender(params) {
|
|
|
4472
4254
|
return useRenderElement(params.defaultTagName ?? 'div', params, params);
|
|
4473
4255
|
}
|
|
4474
4256
|
|
|
4475
|
-
export { index_parts$
|
|
4257
|
+
export { index_parts$6 as Autocomplete, index_parts$1 as Combobox, index_parts$5 as Dialog, index_parts$4 as Drawer, index_parts$3 as Menu, index_parts as NumberField, index_parts$2 as ScrollArea, Separator, useRender };
|
package/dist/useButton-es.js
CHANGED
|
@@ -1088,4 +1088,4 @@ function isValidLinkElement(elem) {
|
|
|
1088
1088
|
return Boolean(elem?.tagName === 'A' && elem?.href);
|
|
1089
1089
|
}
|
|
1090
1090
|
|
|
1091
|
-
export {
|
|
1091
|
+
export { triggerPress as $, ARROW_DOWN as A, isVirtualPointerEvent as B, ARROW_UP as C, useOnMount as D, useControlled as E, isIOS as F, none as G, visuallyHiddenInput as H, visuallyHidden as I, inputChange as J, inputClear as K, inputBlur as L, inputPaste as M, createGenericEventDetails as N, incrementPress as O, decrementPress as P, useValueChanged as Q, keyboard as R, SafeReact as S, Timeout as T, isMouseLikePointerType as U, isTypeableElement as V, matchesFocusVisible as W, isTargetInsideEnabledTrigger as X, triggerFocus as Y, isMac as Z, isSafari as _, closePress as a, escapeKey as a0, TYPEABLE_SELECTOR as a1, triggerHover as a2, itemPress as a3, outsidePress as a4, useAnimationsFinished as a5, siblingOpen as a6, useCompositeRootContext as a7, cancelOpen as a8, pointer as a9, swipe as aa, useAnimationFrame as ab, TransitionStatusDataAttributes as ac, isFirefox as ad, scrub as ae, isWebKit as af, isAndroid as ag, closeWatcher as ah, resolveRef as ai, isClickLikeEvent as aj, isReactEvent as ak, isEventTargetWithin as al, isRootElement as am, FOCUSABLE_ATTRIBUTE as an, ACTIVE_KEY as ao, SELECTED_KEY as ap, AnimationFrame as aq, inputPress as ar, clearPress as as, chipRemovePress as at, useBaseUiId as b, createChangeEventDetails as c, useOpenChangeComplete as d, useStableCallback as e, useTimeout as f, error as g, useTransitionStatus as h, imperativeAction as i, useIsoLayoutEffect as j, getTarget as k, useId as l, getFloatingFocusElement as m, useValueAsRef as n, ownerDocument as o, isTypeableCombobox as p, activeElement as q, contains as r, stopEvent as s, transitionStatusMapping as t, useButton as u, listNavigation as v, ARROW_LEFT as w, ARROW_RIGHT as x, focusOut as y, isVirtualClick as z };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { b as isElement, a as isHTMLElement, k as getWindow } from './floating-ui.utils.dom-es.js';
|
|
3
|
-
import {
|
|
4
|
-
import { u as useFloatingParentNodeId,
|
|
3
|
+
import { l as useId, j as useIsoLayoutEffect, m as getFloatingFocusElement, n as useValueAsRef, p as isTypeableCombobox, e as useStableCallback, q as activeElement, o as ownerDocument, r as contains, s as stopEvent, c as createChangeEventDetails, v as listNavigation, A as ARROW_DOWN, w as ARROW_LEFT, x as ARROW_RIGHT, k as getTarget, y as focusOut, z as isVirtualClick, B as isVirtualPointerEvent, C as ARROW_UP, f as useTimeout } from './useButton-es.js';
|
|
4
|
+
import { u as useFloatingParentNodeId, a as FloatingRootStore, P as PopupTriggerMap, b as useFloatingTree, i as isIndexOutOfListBounds, g as getMinListIndex, c as getMaxListIndex, d as createGridCellMap, e as isListIndexDisabled, f as getGridNavigatedIndex, h as getGridCellIndices, j as getGridCellIndexOfCorner, k as findNonDisabledListIndex, l as enqueueFocus, m as isElementVisible, n as useDirection, D as DISABLED_TRANSITIONS_STYLE } from './InternalBackdrop-es.js';
|
|
5
5
|
import { a as useRefWithInit, E as EMPTY_OBJECT } from './useRenderElement-es.js';
|
|
6
6
|
import { jsx } from 'react/jsx-runtime';
|
|
7
7
|
import { e as evaluate, h as getPaddingObject, b as getAlignmentAxis, d as getAlignment, q as getAxisLength, n as clamp, c as getSide, g as getSideAxis } from './index.esm-es.js';
|
package/dist/useLabel-es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as ReactDOM from 'react-dom';
|
|
2
|
-
import {
|
|
2
|
+
import { e as useStableCallback, j as useIsoLayoutEffect, b as useBaseUiId, k as getTarget, o as ownerDocument } from './useButton-es.js';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { N as NOOP, f as formatErrorMessage, E as EMPTY_OBJECT, a as useRefWithInit } from './useRenderElement-es.js';
|
|
5
5
|
import { b as isElement, a as isHTMLElement } from './floating-ui.utils.dom-es.js';
|
|
@@ -70,6 +70,16 @@
|
|
|
70
70
|
"DataTable.Table",
|
|
71
71
|
"DatePicker",
|
|
72
72
|
"DescriptionList",
|
|
73
|
+
"Dialog",
|
|
74
|
+
"Dialog.Actions",
|
|
75
|
+
"Dialog.Body",
|
|
76
|
+
"Dialog.Close",
|
|
77
|
+
"Dialog.Content",
|
|
78
|
+
"Dialog.Footer",
|
|
79
|
+
"Dialog.Header",
|
|
80
|
+
"Dialog.ScrollArea",
|
|
81
|
+
"Dialog.Title",
|
|
82
|
+
"Dialog.Trigger",
|
|
73
83
|
"Disclosure",
|
|
74
84
|
"Divider",
|
|
75
85
|
"Drawer",
|
|
@@ -225,4 +235,4 @@
|
|
|
225
235
|
"Tooltip",
|
|
226
236
|
"Typography"
|
|
227
237
|
]
|
|
228
|
-
}
|
|
238
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/components",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.22.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -487,7 +487,7 @@
|
|
|
487
487
|
"devDependencies": {
|
|
488
488
|
"@apollo/client": "^3.7.10",
|
|
489
489
|
"@csstools/postcss-global-data": "^1.0.3",
|
|
490
|
-
"@jobber/design": "0.
|
|
490
|
+
"@jobber/design": "0.107.0",
|
|
491
491
|
"@jobber/hooks": "2.21.0",
|
|
492
492
|
"@rollup/plugin-alias": "^5.1.0",
|
|
493
493
|
"@rollup/plugin-commonjs": "^25.0.7",
|
|
@@ -541,5 +541,5 @@
|
|
|
541
541
|
"> 1%",
|
|
542
542
|
"IE 10"
|
|
543
543
|
],
|
|
544
|
-
"gitHead": "
|
|
544
|
+
"gitHead": "a79f359b1697f28cc49148b1ac1ca4c9d270a5dd"
|
|
545
545
|
}
|