@jobber/components 8.14.1 → 8.16.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/dist/Autocomplete-es.js +1 -1
- package/dist/BottomSheet-cjs.js +109 -77
- package/dist/BottomSheet-es.js +103 -75
- package/dist/Card/index.cjs +2 -3
- package/dist/Card/index.mjs +2 -3
- package/dist/DataDump/index.cjs +2 -3
- package/dist/DataDump/index.mjs +2 -3
- package/dist/InputNumberExperimental-cjs.js +16 -17
- package/dist/InputNumberExperimental-es.js +2 -3
- package/dist/Menu/index.cjs +2 -3
- package/dist/Menu/index.mjs +2 -3
- package/dist/Menu-cjs.js +11 -56
- package/dist/Menu-es.js +4 -49
- package/dist/MenuSubmenuTrigger-cjs.js +1608 -1793
- package/dist/MenuSubmenuTrigger-es.js +1340 -1522
- package/dist/Modal/index.mjs +1 -1
- package/dist/NumberFieldInput-cjs.js +53 -54
- package/dist/NumberFieldInput-es.js +2 -3
- package/dist/Page/index.cjs +2 -3
- package/dist/Page/index.mjs +2 -3
- package/dist/{DrawerRoot-cjs.js → ScrollAreaViewport-cjs.js} +5488 -4449
- package/dist/{DrawerRoot-es.js → ScrollAreaViewport-es.js} +5423 -4393
- package/dist/{useValueChanged-cjs.js → clamp-cjs.js} +573 -321
- package/dist/{useValueChanged-es.js → clamp-es.js} +569 -322
- package/dist/floating-ui.react-es.js +1 -1
- package/dist/index.cjs +2 -3
- package/dist/index.mjs +2 -3
- package/dist/primitives/BottomSheet/BottomSheet.d.ts +15 -16
- package/dist/primitives/BottomSheet/BottomSheet.types.d.ts +27 -0
- package/dist/primitives/BottomSheet/BottomSheet.utils.d.ts +6 -0
- package/dist/primitives/BottomSheet/index.cjs +8 -3
- package/dist/primitives/BottomSheet/index.d.ts +1 -0
- package/dist/primitives/BottomSheet/index.mjs +8 -3
- package/dist/primitives/InputNumberExperimental/index.cjs +2 -3
- package/dist/primitives/InputNumberExperimental/index.mjs +2 -3
- package/dist/primitives/index.cjs +8 -9
- package/dist/primitives/index.mjs +8 -9
- package/dist/styles.css +62 -1
- package/dist/unstyledPrimitives/index.cjs +6373 -5868
- package/dist/unstyledPrimitives/index.d.ts +2 -0
- package/dist/unstyledPrimitives/index.mjs +6325 -5822
- package/dist/useRenderElement-cjs.js +30 -30
- package/dist/useRenderElement-es.js +31 -31
- package/package.json +2 -2
- package/dist/useBaseUiId-cjs.js +0 -275
- package/dist/useBaseUiId-es.js +0 -251
|
@@ -3233,4 +3233,4 @@ function useTransitionStyles(context, props) {
|
|
|
3233
3233
|
};
|
|
3234
3234
|
}
|
|
3235
3235
|
|
|
3236
|
-
export { FloatingPortal as F, useFloatingParentNodeId as a, useFloatingNodeId as b, useDismiss as c, useInteractions as d, FloatingTree as e, FloatingNode as f,
|
|
3236
|
+
export { FloatingPortal as F, useFloatingParentNodeId as a, useFloatingNodeId as b, useDismiss as c, useInteractions as d, FloatingTree as e, FloatingNode as f, useListNavigation as g, useRole as h, FloatingFocusManager as i, FloatingOverlay as j, useClick as k, useTransitionStyles as l, FloatingArrow as m, useFloating as u };
|
package/dist/index.cjs
CHANGED
|
@@ -177,12 +177,11 @@ require('./FormFieldPostFix-cjs.js');
|
|
|
177
177
|
require('axios');
|
|
178
178
|
require('./useRenderElement-cjs.js');
|
|
179
179
|
require('./BottomSheet-cjs.js');
|
|
180
|
-
require('./
|
|
181
|
-
require('./
|
|
180
|
+
require('./ScrollAreaViewport-cjs.js');
|
|
181
|
+
require('./clamp-cjs.js');
|
|
182
182
|
require('./OverlaySeparator-cjs.js');
|
|
183
183
|
require('./Separator-cjs.js');
|
|
184
184
|
require('./MenuSubmenuTrigger-cjs.js');
|
|
185
|
-
require('./useBaseUiId-cjs.js');
|
|
186
185
|
require('./AtlantisPortalContent-cjs.js');
|
|
187
186
|
require('@jobber/formatters');
|
|
188
187
|
require('react-dom/client');
|
package/dist/index.mjs
CHANGED
|
@@ -175,12 +175,11 @@ import './FormFieldPostFix-es.js';
|
|
|
175
175
|
import 'axios';
|
|
176
176
|
import './useRenderElement-es.js';
|
|
177
177
|
import './BottomSheet-es.js';
|
|
178
|
-
import './
|
|
179
|
-
import './
|
|
178
|
+
import './ScrollAreaViewport-es.js';
|
|
179
|
+
import './clamp-es.js';
|
|
180
180
|
import './OverlaySeparator-es.js';
|
|
181
181
|
import './Separator-es.js';
|
|
182
182
|
import './MenuSubmenuTrigger-es.js';
|
|
183
|
-
import './useBaseUiId-es.js';
|
|
184
183
|
import './AtlantisPortalContent-es.js';
|
|
185
184
|
import '@jobber/formatters';
|
|
186
185
|
import 'react-dom/client';
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
declare function BottomSheetRoot({ children, defaultOpen, onOpenChange, open, ...rootProps }: BottomSheetRootProps): React.JSX.Element;
|
|
15
|
-
export declare const BottomSheet: React.ForwardRefExoticComponent<BottomSheetProps & React.RefAttributes<HTMLDivElement>> & {
|
|
2
|
+
import type { BottomSheetContentProps, BottomSheetPopupProps, BottomSheetProps, BottomSheetRootProps, BottomSheetTriggerProps } from "./BottomSheet.types";
|
|
3
|
+
declare function BottomSheetTrigger({ children, render, className, ...triggerProps }: BottomSheetTriggerProps): React.JSX.Element;
|
|
4
|
+
/**
|
|
5
|
+
* Thin pass-through to the Drawer root: a single owner manages open state, and
|
|
6
|
+
* all root props — `handle`, `modal`, `disablePointerDismissal`, the payload
|
|
7
|
+
* render-function `children`, etc. — reach BaseUI unchanged.
|
|
8
|
+
*/
|
|
9
|
+
declare function BottomSheetRoot({ children, ...rootProps }: BottomSheetRootProps): React.JSX.Element;
|
|
10
|
+
declare function BottomSheetPopup({ children, className, initialFocus, finalFocus, ref, ...popupProps }: BottomSheetPopupProps): React.JSX.Element;
|
|
11
|
+
declare function BottomSheetContent({ children, className, ref, ...contentProps }: BottomSheetContentProps): React.JSX.Element;
|
|
12
|
+
declare function BottomSheetComponent({ children, className, initialFocus, finalFocus, open, defaultOpen, onOpenChange, ref, ...contentProps }: BottomSheetProps): React.JSX.Element;
|
|
13
|
+
export declare const BottomSheet: typeof BottomSheetComponent & {
|
|
16
14
|
Root: typeof BottomSheetRoot;
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
Trigger: typeof BottomSheetTrigger;
|
|
16
|
+
Popup: typeof BottomSheetPopup;
|
|
17
|
+
Content: typeof BottomSheetContent;
|
|
19
18
|
};
|
|
20
19
|
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Drawer as BaseDrawer } from "../../unstyledPrimitives";
|
|
2
|
+
export type BottomSheetRootProps = React.ComponentProps<typeof BaseDrawer.Root>;
|
|
3
|
+
type BottomSheetPopupBaseProps = Omit<React.ComponentPropsWithRef<typeof BaseDrawer.Popup>, "className">;
|
|
4
|
+
export interface BottomSheetPopupProps extends BottomSheetPopupBaseProps {
|
|
5
|
+
readonly className?: string;
|
|
6
|
+
}
|
|
7
|
+
type BottomSheetContentBaseProps = Omit<React.ComponentPropsWithRef<typeof BaseDrawer.Content>, "className">;
|
|
8
|
+
export interface BottomSheetContentProps extends BottomSheetContentBaseProps {
|
|
9
|
+
readonly className?: string;
|
|
10
|
+
}
|
|
11
|
+
export type BottomSheetTriggerRenderProps = React.ComponentPropsWithRef<"button">;
|
|
12
|
+
export type BottomSheetTriggerRender = React.ReactElement | ((props: BottomSheetTriggerRenderProps) => React.ReactElement);
|
|
13
|
+
type BottomSheetTriggerSharedProps = Omit<React.ComponentPropsWithRef<typeof BaseDrawer.Trigger>, "className" | "render" | "children"> & {
|
|
14
|
+
readonly className?: string;
|
|
15
|
+
};
|
|
16
|
+
interface BottomSheetTriggerDefaultProps extends BottomSheetTriggerSharedProps {
|
|
17
|
+
readonly children: React.ReactNode;
|
|
18
|
+
readonly render?: undefined;
|
|
19
|
+
}
|
|
20
|
+
interface BottomSheetTriggerCustomRenderProps extends BottomSheetTriggerSharedProps {
|
|
21
|
+
readonly children?: React.ReactNode;
|
|
22
|
+
readonly render: BottomSheetTriggerRender;
|
|
23
|
+
}
|
|
24
|
+
export type BottomSheetTriggerProps = BottomSheetTriggerDefaultProps | BottomSheetTriggerCustomRenderProps;
|
|
25
|
+
export interface BottomSheetProps extends Pick<BottomSheetRootProps, "open" | "defaultOpen" | "onOpenChange">, BottomSheetContentProps, Pick<BottomSheetPopupProps, "initialFocus" | "finalFocus"> {
|
|
26
|
+
}
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { BottomSheetTriggerRender } from "./BottomSheet.types";
|
|
3
|
+
export declare function resolveBottomSheetTriggerRender({ children, render, }: {
|
|
4
|
+
readonly children?: React.ReactNode;
|
|
5
|
+
readonly render?: BottomSheetTriggerRender;
|
|
6
|
+
}): React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | ((props: React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>) => React.JSX.Element);
|
|
@@ -4,13 +4,18 @@ var BottomSheet = require('../../BottomSheet-cjs.js');
|
|
|
4
4
|
require('../../tslib.es6-cjs.js');
|
|
5
5
|
require('react');
|
|
6
6
|
require('classnames');
|
|
7
|
-
require('../../
|
|
7
|
+
require('../../Button-cjs.js');
|
|
8
|
+
require('react-router-dom');
|
|
9
|
+
require('../../Icon-cjs.js');
|
|
10
|
+
require('@jobber/design');
|
|
11
|
+
require('../../Typography-cjs.js');
|
|
8
12
|
require('../../useRenderElement-cjs.js');
|
|
9
|
-
require('../../
|
|
13
|
+
require('../../ScrollAreaViewport-cjs.js');
|
|
14
|
+
require('../../clamp-cjs.js');
|
|
10
15
|
require('react-dom');
|
|
16
|
+
require('../../floating-ui.utils.dom-cjs.js');
|
|
11
17
|
require('react/jsx-runtime');
|
|
12
18
|
require('../../index.esm-cjs.js');
|
|
13
|
-
require('../../floating-ui.utils.dom-cjs.js');
|
|
14
19
|
|
|
15
20
|
|
|
16
21
|
|
|
@@ -2,10 +2,15 @@ export { B as BottomSheet } from '../../BottomSheet-es.js';
|
|
|
2
2
|
import '../../tslib.es6-es.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'classnames';
|
|
5
|
-
import '../../
|
|
5
|
+
import '../../Button-es.js';
|
|
6
|
+
import 'react-router-dom';
|
|
7
|
+
import '../../Icon-es.js';
|
|
8
|
+
import '@jobber/design';
|
|
9
|
+
import '../../Typography-es.js';
|
|
6
10
|
import '../../useRenderElement-es.js';
|
|
7
|
-
import '../../
|
|
11
|
+
import '../../ScrollAreaViewport-es.js';
|
|
12
|
+
import '../../clamp-es.js';
|
|
8
13
|
import 'react-dom';
|
|
14
|
+
import '../../floating-ui.utils.dom-es.js';
|
|
9
15
|
import 'react/jsx-runtime';
|
|
10
16
|
import '../../index.esm-es.js';
|
|
11
|
-
import '../../floating-ui.utils.dom-es.js';
|
|
@@ -10,12 +10,11 @@ require('react-router-dom');
|
|
|
10
10
|
require('../../Icon-cjs.js');
|
|
11
11
|
require('@jobber/design');
|
|
12
12
|
require('../../Typography-cjs.js');
|
|
13
|
-
require('../../
|
|
13
|
+
require('../../clamp-cjs.js');
|
|
14
14
|
require('../../useRenderElement-cjs.js');
|
|
15
15
|
require('react-dom');
|
|
16
|
-
require('../../NumberFieldInput-cjs.js');
|
|
17
16
|
require('../../floating-ui.utils.dom-cjs.js');
|
|
18
|
-
require('../../
|
|
17
|
+
require('../../NumberFieldInput-cjs.js');
|
|
19
18
|
require('react/jsx-runtime');
|
|
20
19
|
|
|
21
20
|
|
|
@@ -8,10 +8,9 @@ import 'react-router-dom';
|
|
|
8
8
|
import '../../Icon-es.js';
|
|
9
9
|
import '@jobber/design';
|
|
10
10
|
import '../../Typography-es.js';
|
|
11
|
-
import '../../
|
|
11
|
+
import '../../clamp-es.js';
|
|
12
12
|
import '../../useRenderElement-es.js';
|
|
13
13
|
import 'react-dom';
|
|
14
|
-
import '../../NumberFieldInput-es.js';
|
|
15
14
|
import '../../floating-ui.utils.dom-es.js';
|
|
16
|
-
import '../../
|
|
15
|
+
import '../../NumberFieldInput-es.js';
|
|
17
16
|
import 'react/jsx-runtime';
|
|
@@ -9,21 +9,20 @@ require('react');
|
|
|
9
9
|
require('classnames');
|
|
10
10
|
require('../Separator-cjs.js');
|
|
11
11
|
require('../useRenderElement-cjs.js');
|
|
12
|
-
require('../
|
|
13
|
-
require('
|
|
12
|
+
require('../Button-cjs.js');
|
|
13
|
+
require('react-router-dom');
|
|
14
|
+
require('../Icon-cjs.js');
|
|
15
|
+
require('@jobber/design');
|
|
16
|
+
require('../Typography-cjs.js');
|
|
17
|
+
require('../ScrollAreaViewport-cjs.js');
|
|
18
|
+
require('../clamp-cjs.js');
|
|
14
19
|
require('react-dom');
|
|
20
|
+
require('../floating-ui.utils.dom-cjs.js');
|
|
15
21
|
require('react/jsx-runtime');
|
|
16
22
|
require('../index.esm-cjs.js');
|
|
17
|
-
require('../floating-ui.utils.dom-cjs.js');
|
|
18
23
|
require('../Text-cjs.js');
|
|
19
|
-
require('../Typography-cjs.js');
|
|
20
|
-
require('../Icon-cjs.js');
|
|
21
|
-
require('@jobber/design');
|
|
22
24
|
require('../ActivityIndicator-cjs.js');
|
|
23
|
-
require('../Button-cjs.js');
|
|
24
|
-
require('react-router-dom');
|
|
25
25
|
require('../NumberFieldInput-cjs.js');
|
|
26
|
-
require('../useBaseUiId-cjs.js');
|
|
27
26
|
|
|
28
27
|
|
|
29
28
|
|
|
@@ -7,18 +7,17 @@ import 'react';
|
|
|
7
7
|
import 'classnames';
|
|
8
8
|
import '../Separator-es.js';
|
|
9
9
|
import '../useRenderElement-es.js';
|
|
10
|
-
import '../
|
|
11
|
-
import '
|
|
10
|
+
import '../Button-es.js';
|
|
11
|
+
import 'react-router-dom';
|
|
12
|
+
import '../Icon-es.js';
|
|
13
|
+
import '@jobber/design';
|
|
14
|
+
import '../Typography-es.js';
|
|
15
|
+
import '../ScrollAreaViewport-es.js';
|
|
16
|
+
import '../clamp-es.js';
|
|
12
17
|
import 'react-dom';
|
|
18
|
+
import '../floating-ui.utils.dom-es.js';
|
|
13
19
|
import 'react/jsx-runtime';
|
|
14
20
|
import '../index.esm-es.js';
|
|
15
|
-
import '../floating-ui.utils.dom-es.js';
|
|
16
21
|
import '../Text-es.js';
|
|
17
|
-
import '../Typography-es.js';
|
|
18
|
-
import '../Icon-es.js';
|
|
19
|
-
import '@jobber/design';
|
|
20
22
|
import '../ActivityIndicator-es.js';
|
|
21
|
-
import '../Button-es.js';
|
|
22
|
-
import 'react-router-dom';
|
|
23
23
|
import '../NumberFieldInput-es.js';
|
|
24
|
-
import '../useBaseUiId-es.js';
|
package/dist/styles.css
CHANGED
|
@@ -4005,12 +4005,33 @@ a._7BLGtYNuJOU-.zgRx3ehZ2z8-:hover {
|
|
|
4005
4005
|
right: 0;
|
|
4006
4006
|
bottom: 0;
|
|
4007
4007
|
left: 0;
|
|
4008
|
+
|
|
4009
|
+
/*
|
|
4010
|
+
* Use a high (modal) z-index so the sheet and its dimmed backdrop render on top
|
|
4011
|
+
* of the app's nav bars, headers, and other fixed UI instead of behind them.
|
|
4012
|
+
* Every sheet renders its own backdrop at this same elevation (see the
|
|
4013
|
+
* `forceRender` in BottomSheet.tsx), so the frontmost sheet — portaled last —
|
|
4014
|
+
* wins by DOM order: it both catches the dismissing outside press and lays its
|
|
4015
|
+
* dim over the sheets beneath it.
|
|
4016
|
+
*/
|
|
4008
4017
|
z-index: 1001;
|
|
4009
4018
|
z-index: var(--elevation-modal);
|
|
4010
4019
|
background-color: rgba(0, 0, 0, 0.32);
|
|
4011
4020
|
background-color: var(--color-overlay);
|
|
4021
|
+
|
|
4022
|
+
/*
|
|
4023
|
+
* Only the frontmost sheet shows the dim overlay. When a sheet has a nested
|
|
4024
|
+
* sheet open above it, Base UI marks its popup with `data-nested-drawer-open`;
|
|
4025
|
+
* we make that sheet's backdrop transparent so the dim is supplied solely by
|
|
4026
|
+
* the frontmost sheet's backdrop. This keeps the dimming from compounding as
|
|
4027
|
+
* sheets stack.
|
|
4028
|
+
*/
|
|
4012
4029
|
}
|
|
4013
4030
|
|
|
4031
|
+
.Qf3IFhKJwQ0-:has(~ ._868PDAA3U2M-[data-nested-drawer-open]) {
|
|
4032
|
+
background-color: transparent;
|
|
4033
|
+
}
|
|
4034
|
+
|
|
4014
4035
|
._868PDAA3U2M- {
|
|
4015
4036
|
display: -ms-flexbox;
|
|
4016
4037
|
display: flex;
|
|
@@ -4046,15 +4067,40 @@ a._7BLGtYNuJOU-.zgRx3ehZ2z8-:hover {
|
|
|
4046
4067
|
flex: 1 1 auto;
|
|
4047
4068
|
}
|
|
4048
4069
|
|
|
4070
|
+
.V--tRnN-P0I- {
|
|
4071
|
+
display: -ms-flexbox;
|
|
4072
|
+
display: flex;
|
|
4073
|
+
position: relative;
|
|
4074
|
+
-ms-flex: 1 1 auto;
|
|
4075
|
+
flex: 1 1 auto;
|
|
4076
|
+
min-height: 0;
|
|
4077
|
+
-ms-flex-direction: column;
|
|
4078
|
+
flex-direction: column;
|
|
4079
|
+
}
|
|
4080
|
+
|
|
4081
|
+
/* The ScrollArea.Viewport — the scrollable element. */
|
|
4082
|
+
|
|
4049
4083
|
._1I0eaFciaWo- {
|
|
4050
4084
|
-ms-flex: 1 1 auto;
|
|
4051
4085
|
flex: 1 1 auto;
|
|
4052
4086
|
min-height: 0;
|
|
4053
4087
|
padding-bottom: env(safe-area-inset-bottom);
|
|
4054
|
-
overflow-y: auto;
|
|
4055
4088
|
-webkit-overflow-scrolling: touch;
|
|
4056
4089
|
}
|
|
4057
4090
|
|
|
4091
|
+
/* Re-enable the browser's native scrollbar — BaseUI hides it by default for its
|
|
4092
|
+
own custom scrollbar, which we are not using. */
|
|
4093
|
+
|
|
4094
|
+
.V--tRnN-P0I- ._1I0eaFciaWo- {
|
|
4095
|
+
scrollbar-width: auto;
|
|
4096
|
+
}
|
|
4097
|
+
|
|
4098
|
+
.V--tRnN-P0I- ._1I0eaFciaWo-::-webkit-scrollbar {
|
|
4099
|
+
display: revert;
|
|
4100
|
+
}
|
|
4101
|
+
|
|
4102
|
+
/* Bottom fade — shown only while there is content below the current scroll. */
|
|
4103
|
+
|
|
4058
4104
|
.BYEzqcZUGls- {
|
|
4059
4105
|
position: absolute;
|
|
4060
4106
|
right: 0;
|
|
@@ -4064,6 +4110,21 @@ a._7BLGtYNuJOU-.zgRx3ehZ2z8-:hover {
|
|
|
4064
4110
|
background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 1));
|
|
4065
4111
|
background: linear-gradient(to bottom, transparent, var(--color-surface));
|
|
4066
4112
|
pointer-events: none;
|
|
4113
|
+
opacity: 0;
|
|
4114
|
+
transition: opacity 200ms ease;
|
|
4115
|
+
transition: opacity var(--timing-base) ease;
|
|
4116
|
+
}
|
|
4117
|
+
|
|
4118
|
+
.V--tRnN-P0I-[data-overflow-y-end] .BYEzqcZUGls- {
|
|
4119
|
+
opacity: 1;
|
|
4120
|
+
}
|
|
4121
|
+
|
|
4122
|
+
/* Honor reduced-motion: drop the bottom fade transition. */
|
|
4123
|
+
|
|
4124
|
+
@media (prefers-reduced-motion: reduce) {
|
|
4125
|
+
.BYEzqcZUGls- {
|
|
4126
|
+
transition: none;
|
|
4127
|
+
}
|
|
4067
4128
|
}
|
|
4068
4129
|
|
|
4069
4130
|
.yL7--3ni8BM- {
|