@phillips/seldon 1.119.0 → 1.121.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/_virtual/_commonjsHelpers.js +1 -1
- package/dist/components/Accordion/Accordion.js +18 -18
- package/dist/components/Accordion/AccordionItem.js +67 -68
- package/dist/components/Carousel/Carousel.js +49 -51
- package/dist/components/Carousel/CarouselDots.js +46 -47
- package/dist/components/ContentPeek/ContentPeek.js +47 -47
- package/dist/components/ErrorBoundary/ErrorBoundary.js +11 -12
- package/dist/components/Filter/Filter.js +40 -41
- package/dist/components/Filter/FilterHeader.js +24 -24
- package/dist/components/Input/Input.d.ts +1 -1
- package/dist/components/Input/Input.js +21 -20
- package/dist/components/Input/Input.stories.d.ts +7 -0
- package/dist/components/Link/utils.js +2 -2
- package/dist/components/LinkBlock/LinkBlock.js +12 -13
- package/dist/components/LinkList/LinkList.js +8 -11
- package/dist/components/Navigation/Navigation.js +21 -22
- package/dist/components/Navigation/NavigationItemTrigger/NavigationItemTrigger.js +48 -50
- package/dist/components/Navigation/NavigationList/NavigationList.js +33 -35
- package/dist/components/Pagination/Pagination.js +7 -7
- package/dist/components/Pagination/utils.js +1 -1
- package/dist/components/PinchZoom/PinchZoom.js +40 -43
- package/dist/components/Search/Search.js +94 -98
- package/dist/components/Search/SearchButton.js +19 -19
- package/dist/components/SeldonImage/SeldonImage.js +1 -1
- package/dist/components/Select/Select.js +22 -14
- package/dist/components/Select/Select.stories.d.ts +15 -0
- package/dist/components/Tabs/TabTrigger.js +13 -13
- package/dist/node_modules/@artsy/fresnel/dist/Breakpoints.js +2 -2
- package/dist/node_modules/@artsy/fresnel/dist/DynamicResponsive.js +1 -1
- package/dist/node_modules/@artsy/fresnel/dist/Interactions.js +2 -2
- package/dist/node_modules/@artsy/fresnel/dist/Media.js +2 -2
- package/dist/node_modules/@artsy/fresnel/dist/MediaQueries.js +1 -1
- package/dist/node_modules/@artsy/fresnel/dist/Utils.js +1 -1
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +1 -1
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +1 -1
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +2 -2
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +2 -2
- package/dist/node_modules/@radix-ui/primitive/dist/index.js +5 -5
- package/dist/node_modules/@radix-ui/react-accordion/dist/index.js +63 -67
- package/dist/node_modules/@radix-ui/react-context/dist/index.js +35 -35
- package/dist/node_modules/@radix-ui/react-dialog/dist/index.js +79 -83
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/primitive/dist/index.js +5 -5
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-context/dist/index.js +43 -45
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +86 -87
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-guards/dist/index.js +7 -8
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-scope/dist/index.js +56 -57
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-portal/dist/index.js +12 -13
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-presence/dist/index.js +37 -42
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-primitive/dist/index.js +1 -1
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot/dist/index.js +18 -19
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +86 -87
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +7 -8
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +56 -57
- package/dist/node_modules/@radix-ui/react-id/dist/index.js +10 -10
- package/dist/node_modules/@radix-ui/react-popper/dist/index.js +113 -115
- package/dist/node_modules/@radix-ui/react-portal/dist/index.js +12 -13
- package/dist/node_modules/@radix-ui/react-presence/dist/index.js +33 -37
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +1 -1
- package/dist/node_modules/@radix-ui/react-select/dist/index.js +422 -439
- package/dist/node_modules/@radix-ui/react-select/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +1 -1
- package/dist/node_modules/@radix-ui/react-select/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +1 -1
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js +18 -19
- package/dist/node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-context/dist/index.js +39 -41
- package/dist/node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-presence/dist/index.js +37 -42
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +7 -10
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +1 -1
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +1 -1
- package/dist/node_modules/aria-hidden/dist/es2015/index.js +1 -1
- package/dist/node_modules/change-case/dist/index.js +41 -44
- package/dist/node_modules/date-fns/differenceInCalendarDays.js +11 -11
- package/dist/node_modules/date-fns/differenceInDays.js +9 -9
- package/dist/node_modules/date-fns/differenceInHours.js +11 -11
- package/dist/node_modules/date-fns/differenceInMinutes.js +8 -8
- package/dist/node_modules/date-fns/differenceInSeconds.js +7 -7
- package/dist/node_modules/date-fns/formatDuration.js +11 -12
- package/dist/node_modules/date-fns/isSameWeek.js +8 -8
- package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +12 -12
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +3 -3
- package/dist/node_modules/date-fns/locale/zh-CN/_lib/formatDistance.js +5 -5
- package/dist/node_modules/date-fns/locale/zh-CN/_lib/localize.js +10 -10
- package/dist/node_modules/date-fns/startOfDay.js +6 -6
- package/dist/node_modules/date-fns/startOfWeek.js +7 -8
- package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.js +1 -1
- package/dist/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.js +1 -1
- package/dist/node_modules/exenv/index.js +2 -2
- package/dist/node_modules/get-nonce/dist/es2015/index.js +1 -1
- package/dist/node_modules/prop-types/checkPropTypes.js +2 -2
- package/dist/node_modules/prop-types/factoryWithTypeCheckers.js +3 -3
- package/dist/node_modules/react-intersection-observer/dist/index.js +2 -2
- package/dist/node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js +1 -1
- package/dist/node_modules/react-modal/lib/components/ModalPortal.js +1 -1
- package/dist/node_modules/react-modal/lib/helpers/scopeTab.js +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +1 -1
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +1 -1
- package/dist/node_modules/react-transition-group/esm/Transition.js +1 -1
- package/dist/node_modules/react-zoom-pan-pinch/dist/index.esm.js +14 -14
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +1 -1
- package/dist/node_modules/usehooks-ts/dist/index.js +1 -1
- package/dist/node_modules/warning/warning.js +1 -1
- package/dist/node_modules/wheel-gestures/dist/wheel-gestures.esm.js +1 -1
- package/dist/patterns/BidSnapshot/BidSnapshot.js +58 -58
- package/dist/patterns/DetailList/DetailList.js +22 -22
- package/dist/patterns/FilterMenu/FilterMenu.js +15 -15
- package/dist/patterns/LanguageSelector/LanguageSelector.js +23 -23
- package/dist/patterns/LanguageSelector/utils.js +2 -5
- package/dist/patterns/ObjectTile/ObjectTile.d.ts +4 -0
- package/dist/patterns/ObjectTile/ObjectTile.js +50 -48
- package/dist/patterns/ObjectTile/ObjectTile.stories.d.ts +2 -0
- package/dist/patterns/ViewingsList/StatefulViewingsList.js +16 -16
- package/dist/patterns/ViewingsList/ViewingsList.js +42 -42
- package/dist/patterns/ViewingsList/ViewingsListCard.js +122 -123
- package/dist/patterns/ViewingsList/ViewingsListCardForm.js +170 -170
- package/dist/scss/patterns/ObjectTile/_objectTile.scss +17 -1
- package/dist/site-furniture/Header/Header.js +32 -32
- package/package.json +2 -1
|
@@ -14,7 +14,7 @@ var p = function(r) {
|
|
|
14
14
|
}, R = function(r, e) {
|
|
15
15
|
var o = e.ownerDocument, t = e;
|
|
16
16
|
do {
|
|
17
|
-
typeof ShadowRoot
|
|
17
|
+
typeof ShadowRoot < "u" && t instanceof ShadowRoot && (t = t.host);
|
|
18
18
|
var a = g(r, t);
|
|
19
19
|
if (a) {
|
|
20
20
|
var n = b(r, t), i = n[1], l = n[2];
|
|
@@ -1,46 +1,45 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as o from "react";
|
|
2
2
|
import { composeRefs as u } from "../../react-compose-refs/dist/index.js";
|
|
3
3
|
import { jsx as c, Fragment as d } from "react/jsx-runtime";
|
|
4
|
-
var m =
|
|
5
|
-
const { children: r, ...t } = e,
|
|
4
|
+
var m = o.forwardRef((e, n) => {
|
|
5
|
+
const { children: r, ...t } = e, l = o.Children.toArray(r), i = l.find(y);
|
|
6
6
|
if (i) {
|
|
7
|
-
const s = i.props.children, a =
|
|
8
|
-
return /* @__PURE__ */ c(f, { ...t, ref: n, children:
|
|
7
|
+
const s = i.props.children, a = l.map((p) => p === i ? o.Children.count(s) > 1 ? o.Children.only(null) : o.isValidElement(s) ? s.props.children : null : p);
|
|
8
|
+
return /* @__PURE__ */ c(f, { ...t, ref: n, children: o.isValidElement(s) ? o.cloneElement(s, void 0, a) : null });
|
|
9
9
|
}
|
|
10
10
|
return /* @__PURE__ */ c(f, { ...t, ref: n, children: r });
|
|
11
11
|
});
|
|
12
12
|
m.displayName = "Slot";
|
|
13
|
-
var f =
|
|
13
|
+
var f = o.forwardRef((e, n) => {
|
|
14
14
|
const { children: r, ...t } = e;
|
|
15
|
-
if (
|
|
16
|
-
const
|
|
17
|
-
return
|
|
15
|
+
if (o.isValidElement(r)) {
|
|
16
|
+
const l = C(r);
|
|
17
|
+
return o.cloneElement(r, {
|
|
18
18
|
...h(t, r.props),
|
|
19
19
|
// @ts-ignore
|
|
20
|
-
ref: n ? u(n,
|
|
20
|
+
ref: n ? u(n, l) : l
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
|
-
return
|
|
23
|
+
return o.Children.count(r) > 1 ? o.Children.only(null) : null;
|
|
24
24
|
});
|
|
25
25
|
f.displayName = "SlotClone";
|
|
26
26
|
var g = ({ children: e }) => /* @__PURE__ */ c(d, { children: e });
|
|
27
27
|
function y(e) {
|
|
28
|
-
return
|
|
28
|
+
return o.isValidElement(e) && e.type === g;
|
|
29
29
|
}
|
|
30
30
|
function h(e, n) {
|
|
31
31
|
const r = { ...n };
|
|
32
32
|
for (const t in n) {
|
|
33
|
-
const
|
|
34
|
-
/^on[A-Z]/.test(t) ?
|
|
35
|
-
i(...a),
|
|
36
|
-
} :
|
|
33
|
+
const l = e[t], i = n[t];
|
|
34
|
+
/^on[A-Z]/.test(t) ? l && i ? r[t] = (...a) => {
|
|
35
|
+
i(...a), l(...a);
|
|
36
|
+
} : l && (r[t] = l) : t === "style" ? r[t] = { ...l, ...i } : t === "className" && (r[t] = [l, i].filter(Boolean).join(" "));
|
|
37
37
|
}
|
|
38
38
|
return { ...e, ...r };
|
|
39
39
|
}
|
|
40
40
|
function C(e) {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
return r ? e.ref : (n = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, r = n && "isReactWarning" in n && n.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
|
|
41
|
+
let n = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, r = n && "isReactWarning" in n && n.isReactWarning;
|
|
42
|
+
return r ? e.ref : (n = Object.getOwnPropertyDescriptor(e, "ref")?.get, r = n && "isReactWarning" in n && n.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
|
|
44
43
|
}
|
|
45
44
|
export {
|
|
46
45
|
m as Slot,
|
package/dist/node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-context/dist/index.js
CHANGED
|
@@ -1,55 +1,53 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { jsx as
|
|
3
|
-
function
|
|
4
|
-
let
|
|
5
|
-
function
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
return /* @__PURE__ */ h(f.Provider, { value: _, children: S });
|
|
1
|
+
import * as u from "react";
|
|
2
|
+
import { jsx as _ } from "react/jsx-runtime";
|
|
3
|
+
function P(e, p = []) {
|
|
4
|
+
let n = [];
|
|
5
|
+
function m(s, t) {
|
|
6
|
+
const o = u.createContext(t), c = n.length;
|
|
7
|
+
n = [...n, t];
|
|
8
|
+
const a = (i) => {
|
|
9
|
+
const { scope: f, children: C, ...x } = i, d = f?.[e]?.[c] || o, v = u.useMemo(() => x, Object.values(x));
|
|
10
|
+
return /* @__PURE__ */ _(d.Provider, { value: v, children: C });
|
|
12
11
|
};
|
|
13
|
-
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
if (
|
|
18
|
-
|
|
19
|
-
throw new Error(`\`${a}\` must be used within \`${u}\``);
|
|
12
|
+
a.displayName = s + "Provider";
|
|
13
|
+
function S(i, f) {
|
|
14
|
+
const C = f?.[e]?.[c] || o, x = u.useContext(C);
|
|
15
|
+
if (x) return x;
|
|
16
|
+
if (t !== void 0) return t;
|
|
17
|
+
throw new Error(`\`${i}\` must be used within \`${s}\``);
|
|
20
18
|
}
|
|
21
|
-
return [
|
|
19
|
+
return [a, S];
|
|
22
20
|
}
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
return function(
|
|
26
|
-
const
|
|
27
|
-
return
|
|
28
|
-
() => ({ [`__scope${
|
|
29
|
-
[
|
|
21
|
+
const r = () => {
|
|
22
|
+
const s = n.map((t) => u.createContext(t));
|
|
23
|
+
return function(o) {
|
|
24
|
+
const c = o?.[e] || s;
|
|
25
|
+
return u.useMemo(
|
|
26
|
+
() => ({ [`__scope${e}`]: { ...o, [e]: c } }),
|
|
27
|
+
[o, c]
|
|
30
28
|
);
|
|
31
29
|
};
|
|
32
30
|
};
|
|
33
|
-
return
|
|
31
|
+
return r.scopeName = e, [m, h(r, ...p)];
|
|
34
32
|
}
|
|
35
|
-
function
|
|
36
|
-
const
|
|
37
|
-
if (
|
|
38
|
-
const
|
|
39
|
-
const
|
|
40
|
-
useScope:
|
|
41
|
-
scopeName:
|
|
33
|
+
function h(...e) {
|
|
34
|
+
const p = e[0];
|
|
35
|
+
if (e.length === 1) return p;
|
|
36
|
+
const n = () => {
|
|
37
|
+
const m = e.map((r) => ({
|
|
38
|
+
useScope: r(),
|
|
39
|
+
scopeName: r.scopeName
|
|
42
40
|
}));
|
|
43
|
-
return function(
|
|
44
|
-
const
|
|
45
|
-
const
|
|
46
|
-
return { ...
|
|
41
|
+
return function(s) {
|
|
42
|
+
const t = m.reduce((o, { useScope: c, scopeName: a }) => {
|
|
43
|
+
const i = c(s)[`__scope${a}`];
|
|
44
|
+
return { ...o, ...i };
|
|
47
45
|
}, {});
|
|
48
|
-
return
|
|
46
|
+
return u.useMemo(() => ({ [`__scope${p.scopeName}`]: t }), [t]);
|
|
49
47
|
};
|
|
50
48
|
};
|
|
51
|
-
return
|
|
49
|
+
return n.scopeName = p.scopeName, n;
|
|
52
50
|
}
|
|
53
51
|
export {
|
|
54
|
-
|
|
52
|
+
P as createContextScope
|
|
55
53
|
};
|
package/dist/node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-presence/dist/index.js
CHANGED
|
@@ -1,19 +1,16 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { useComposedRefs as
|
|
3
|
-
import { useLayoutEffect as
|
|
4
|
-
function
|
|
5
|
-
return
|
|
6
|
-
const o = e[r][t];
|
|
7
|
-
return o != null ? o : r;
|
|
8
|
-
}, n);
|
|
1
|
+
import * as i from "react";
|
|
2
|
+
import { useComposedRefs as O } from "../../../../../react-compose-refs/dist/index.js";
|
|
3
|
+
import { useLayoutEffect as A } from "../../../../../react-use-layout-effect/dist/index.js";
|
|
4
|
+
function E(n, e) {
|
|
5
|
+
return i.useReducer((t, r) => e[t][r] ?? t, n);
|
|
9
6
|
}
|
|
10
|
-
var
|
|
11
|
-
const { present: e, children:
|
|
12
|
-
return typeof
|
|
7
|
+
var T = (n) => {
|
|
8
|
+
const { present: e, children: t } = n, r = R(e), a = typeof t == "function" ? t({ present: r.isPresent }) : i.Children.only(t), c = O(r.ref, v(a));
|
|
9
|
+
return typeof t == "function" || r.isPresent ? i.cloneElement(a, { ref: c }) : null;
|
|
13
10
|
};
|
|
14
|
-
|
|
15
|
-
function
|
|
16
|
-
const [e,
|
|
11
|
+
T.displayName = "Presence";
|
|
12
|
+
function R(n) {
|
|
13
|
+
const [e, t] = i.useState(), r = i.useRef({}), a = i.useRef(n), c = i.useRef("none"), p = n ? "mounted" : "unmounted", [N, s] = E(p, {
|
|
17
14
|
mounted: {
|
|
18
15
|
UNMOUNT: "unmounted",
|
|
19
16
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -26,50 +23,48 @@ function v(n) {
|
|
|
26
23
|
MOUNT: "mounted"
|
|
27
24
|
}
|
|
28
25
|
});
|
|
29
|
-
return
|
|
30
|
-
const
|
|
31
|
-
c.current = N === "mounted" ?
|
|
32
|
-
}, [N]),
|
|
33
|
-
const
|
|
26
|
+
return i.useEffect(() => {
|
|
27
|
+
const o = l(r.current);
|
|
28
|
+
c.current = N === "mounted" ? o : "none";
|
|
29
|
+
}, [N]), A(() => {
|
|
30
|
+
const o = r.current, m = a.current;
|
|
34
31
|
if (m !== n) {
|
|
35
|
-
const
|
|
36
|
-
n ? s("MOUNT") :
|
|
32
|
+
const f = c.current, u = l(o);
|
|
33
|
+
n ? s("MOUNT") : u === "none" || o?.display === "none" ? s("UNMOUNT") : s(m && f !== u ? "ANIMATION_OUT" : "UNMOUNT"), a.current = n;
|
|
37
34
|
}
|
|
38
|
-
}, [n, s]),
|
|
39
|
-
var i;
|
|
35
|
+
}, [n, s]), A(() => {
|
|
40
36
|
if (e) {
|
|
41
|
-
let
|
|
42
|
-
const
|
|
43
|
-
const g = l(
|
|
44
|
-
if (
|
|
45
|
-
const
|
|
46
|
-
e.style.animationFillMode = "forwards",
|
|
47
|
-
e.style.animationFillMode === "forwards" && (e.style.animationFillMode =
|
|
37
|
+
let o;
|
|
38
|
+
const m = e.ownerDocument.defaultView ?? window, d = (u) => {
|
|
39
|
+
const g = l(r.current).includes(u.animationName);
|
|
40
|
+
if (u.target === e && g && (s("ANIMATION_END"), !a.current)) {
|
|
41
|
+
const y = e.style.animationFillMode;
|
|
42
|
+
e.style.animationFillMode = "forwards", o = m.setTimeout(() => {
|
|
43
|
+
e.style.animationFillMode === "forwards" && (e.style.animationFillMode = y);
|
|
48
44
|
});
|
|
49
45
|
}
|
|
50
|
-
},
|
|
51
|
-
|
|
46
|
+
}, f = (u) => {
|
|
47
|
+
u.target === e && (c.current = l(r.current));
|
|
52
48
|
};
|
|
53
|
-
return e.addEventListener("animationstart",
|
|
54
|
-
|
|
49
|
+
return e.addEventListener("animationstart", f), e.addEventListener("animationcancel", d), e.addEventListener("animationend", d), () => {
|
|
50
|
+
m.clearTimeout(o), e.removeEventListener("animationstart", f), e.removeEventListener("animationcancel", d), e.removeEventListener("animationend", d);
|
|
55
51
|
};
|
|
56
52
|
} else
|
|
57
53
|
s("ANIMATION_END");
|
|
58
54
|
}, [e, s]), {
|
|
59
55
|
isPresent: ["mounted", "unmountSuspended"].includes(N),
|
|
60
|
-
ref:
|
|
61
|
-
|
|
56
|
+
ref: i.useCallback((o) => {
|
|
57
|
+
o && (r.current = getComputedStyle(o)), t(o);
|
|
62
58
|
}, [])
|
|
63
59
|
};
|
|
64
60
|
}
|
|
65
61
|
function l(n) {
|
|
66
|
-
return
|
|
62
|
+
return n?.animationName || "none";
|
|
67
63
|
}
|
|
68
|
-
function
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
return r ? n.ref : (e = (o = Object.getOwnPropertyDescriptor(n, "ref")) == null ? void 0 : o.get, r = e && "isReactWarning" in e && e.isReactWarning, r ? n.props.ref : n.props.ref || n.ref);
|
|
64
|
+
function v(n) {
|
|
65
|
+
let e = Object.getOwnPropertyDescriptor(n.props, "ref")?.get, t = e && "isReactWarning" in e && e.isReactWarning;
|
|
66
|
+
return t ? n.ref : (e = Object.getOwnPropertyDescriptor(n, "ref")?.get, t = e && "isReactWarning" in e && e.isReactWarning, t ? n.props.ref : n.props.ref || n.ref);
|
|
72
67
|
}
|
|
73
68
|
export {
|
|
74
|
-
|
|
69
|
+
T as Presence
|
|
75
70
|
};
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
function
|
|
3
|
-
const
|
|
4
|
-
return
|
|
5
|
-
|
|
6
|
-
}),
|
|
7
|
-
var u;
|
|
8
|
-
return (u = e.current) == null ? void 0 : u.call(e, ...n);
|
|
9
|
-
}, []);
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
function c(r) {
|
|
3
|
+
const t = e.useRef(r);
|
|
4
|
+
return e.useEffect(() => {
|
|
5
|
+
t.current = r;
|
|
6
|
+
}), e.useMemo(() => (...u) => t.current?.(...u), []);
|
|
10
7
|
}
|
|
11
8
|
export {
|
|
12
|
-
|
|
9
|
+
c as useCallbackRef
|
|
13
10
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as r from "react";
|
|
2
2
|
import { useCallbackRef as s } from "../../react-use-callback-ref/dist/index.js";
|
|
3
|
-
function p(n, e = globalThis
|
|
3
|
+
function p(n, e = globalThis?.document) {
|
|
4
4
|
const t = s(n);
|
|
5
5
|
r.useEffect(() => {
|
|
6
6
|
const o = (a) => {
|
|
@@ -1,64 +1,61 @@
|
|
|
1
|
-
const
|
|
2
|
-
function
|
|
3
|
-
let e =
|
|
4
|
-
e = e.replace(
|
|
5
|
-
let
|
|
6
|
-
for (; e.charAt(
|
|
7
|
-
|
|
8
|
-
if (
|
|
1
|
+
const h = /([\p{Ll}\d])(\p{Lu})/gu, L = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu, E = /(\d)\p{Ll}|(\p{L})\d/u, d = /[^\p{L}\d]+/giu, a = "$1\0$2", f = "";
|
|
2
|
+
function o(t) {
|
|
3
|
+
let e = t.trim();
|
|
4
|
+
e = e.replace(h, a).replace(L, a), e = e.replace(d, "\0");
|
|
5
|
+
let r = 0, c = e.length;
|
|
6
|
+
for (; e.charAt(r) === "\0"; )
|
|
7
|
+
r++;
|
|
8
|
+
if (r === c)
|
|
9
9
|
return [];
|
|
10
10
|
for (; e.charAt(c - 1) === "\0"; )
|
|
11
11
|
c--;
|
|
12
|
-
return e.slice(
|
|
12
|
+
return e.slice(r, c).split(/\0/g);
|
|
13
13
|
}
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
e.splice(c, 1, a.slice(0, s), a.slice(s));
|
|
14
|
+
function x(t) {
|
|
15
|
+
const e = o(t);
|
|
16
|
+
for (let r = 0; r < e.length; r++) {
|
|
17
|
+
const c = e[r], l = E.exec(c);
|
|
18
|
+
if (l) {
|
|
19
|
+
const s = l.index + (l[1] ?? l[2]).length;
|
|
20
|
+
e.splice(r, 1, c.slice(0, s), c.slice(s));
|
|
22
21
|
}
|
|
23
22
|
}
|
|
24
23
|
return e;
|
|
25
24
|
}
|
|
26
|
-
function
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
return l + c.map(C(e == null ? void 0 : e.locale)).join((t = e == null ? void 0 : e.delimiter) != null ? t : " ") + a;
|
|
25
|
+
function P(t, e) {
|
|
26
|
+
const [r, c, l] = p(t, e);
|
|
27
|
+
return r + c.map(_(e?.locale)).join(e?.delimiter ?? " ") + l;
|
|
30
28
|
}
|
|
31
|
-
function
|
|
32
|
-
return
|
|
29
|
+
function R(t, e) {
|
|
30
|
+
return P(t, { delimiter: "-", ...e });
|
|
33
31
|
}
|
|
34
|
-
function
|
|
35
|
-
return
|
|
32
|
+
function _(t) {
|
|
33
|
+
return t === !1 ? (e) => e.toLowerCase() : (e) => e.toLocaleLowerCase(t);
|
|
36
34
|
}
|
|
37
|
-
function
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
if (!c.includes(n))
|
|
35
|
+
function p(t, e = {}) {
|
|
36
|
+
const r = e.split ?? (e.separateNumbers ? x : o), c = e.prefixCharacters ?? f, l = e.suffixCharacters ?? f;
|
|
37
|
+
let s = 0, n = t.length;
|
|
38
|
+
for (; s < t.length; ) {
|
|
39
|
+
const i = t.charAt(s);
|
|
40
|
+
if (!c.includes(i))
|
|
44
41
|
break;
|
|
45
|
-
|
|
42
|
+
s++;
|
|
46
43
|
}
|
|
47
|
-
for (;
|
|
48
|
-
const
|
|
49
|
-
if (!
|
|
44
|
+
for (; n > s; ) {
|
|
45
|
+
const i = n - 1, u = t.charAt(i);
|
|
46
|
+
if (!l.includes(u))
|
|
50
47
|
break;
|
|
51
|
-
|
|
48
|
+
n = i;
|
|
52
49
|
}
|
|
53
50
|
return [
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
51
|
+
t.slice(0, s),
|
|
52
|
+
r(t.slice(s, n)),
|
|
53
|
+
t.slice(n)
|
|
57
54
|
];
|
|
58
55
|
}
|
|
59
56
|
export {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
57
|
+
R as kebabCase,
|
|
58
|
+
P as noCase,
|
|
59
|
+
o as split,
|
|
60
|
+
x as splitSeparateNumbers
|
|
64
61
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { getTimezoneOffsetInMilliseconds as
|
|
1
|
+
import { getTimezoneOffsetInMilliseconds as r } from "./_lib/getTimezoneOffsetInMilliseconds.js";
|
|
2
2
|
import { normalizeDates as c } from "./_lib/normalizeDates.js";
|
|
3
3
|
import { millisecondsInDay as D } from "./constants.js";
|
|
4
|
-
import { startOfDay as
|
|
5
|
-
function
|
|
6
|
-
const [
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
),
|
|
11
|
-
return Math.round((
|
|
4
|
+
import { startOfDay as a } from "./startOfDay.js";
|
|
5
|
+
function O(o, n, i) {
|
|
6
|
+
const [s, m] = c(
|
|
7
|
+
i?.in,
|
|
8
|
+
o,
|
|
9
|
+
n
|
|
10
|
+
), t = a(s), e = a(m), f = +t - r(t), l = +e - r(e);
|
|
11
|
+
return Math.round((f - l) / D);
|
|
12
12
|
}
|
|
13
13
|
export {
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
O as default,
|
|
15
|
+
O as differenceInCalendarDays
|
|
16
16
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { normalizeDates as d } from "./_lib/normalizeDates.js";
|
|
2
2
|
import { differenceInCalendarDays as r } from "./differenceInCalendarDays.js";
|
|
3
|
-
function l(n, t,
|
|
4
|
-
const [
|
|
5
|
-
|
|
3
|
+
function l(n, t, s) {
|
|
4
|
+
const [o, e] = d(
|
|
5
|
+
s?.in,
|
|
6
6
|
n,
|
|
7
7
|
t
|
|
8
|
-
),
|
|
9
|
-
r(
|
|
8
|
+
), c = f(o, e), g = Math.abs(
|
|
9
|
+
r(o, e)
|
|
10
10
|
);
|
|
11
|
-
|
|
12
|
-
const i = +(f(
|
|
11
|
+
o.setDate(o.getDate() - c * g);
|
|
12
|
+
const i = +(f(o, e) === -c), u = c * (g - i);
|
|
13
13
|
return u === 0 ? 0 : u;
|
|
14
14
|
}
|
|
15
15
|
function f(n, t) {
|
|
16
|
-
const
|
|
17
|
-
return
|
|
16
|
+
const s = n.getFullYear() - t.getFullYear() || n.getMonth() - t.getMonth() || n.getDate() - t.getDate() || n.getHours() - t.getHours() || n.getMinutes() - t.getMinutes() || n.getSeconds() - t.getSeconds() || n.getMilliseconds() - t.getMilliseconds();
|
|
17
|
+
return s < 0 ? -1 : s > 0 ? 1 : s;
|
|
18
18
|
}
|
|
19
19
|
export {
|
|
20
20
|
l as default,
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { getRoundingMethod as
|
|
2
|
-
import { normalizeDates as
|
|
3
|
-
import { millisecondsInHour as
|
|
4
|
-
function
|
|
5
|
-
const [
|
|
6
|
-
e
|
|
1
|
+
import { getRoundingMethod as f } from "./_lib/getRoundingMethod.js";
|
|
2
|
+
import { normalizeDates as a } from "./_lib/normalizeDates.js";
|
|
3
|
+
import { millisecondsInHour as d } from "./constants.js";
|
|
4
|
+
function s(r, o, e) {
|
|
5
|
+
const [t, n] = a(
|
|
6
|
+
e?.in,
|
|
7
7
|
r,
|
|
8
|
-
|
|
9
|
-
),
|
|
10
|
-
return
|
|
8
|
+
o
|
|
9
|
+
), i = (+t - +n) / d;
|
|
10
|
+
return f(e?.roundingMethod)(i);
|
|
11
11
|
}
|
|
12
12
|
export {
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
s as default,
|
|
14
|
+
s as differenceInHours
|
|
15
15
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { getRoundingMethod as
|
|
2
|
-
import { millisecondsInMinute as
|
|
3
|
-
import { differenceInMilliseconds as
|
|
4
|
-
function
|
|
5
|
-
const
|
|
6
|
-
return i
|
|
1
|
+
import { getRoundingMethod as t } from "./_lib/getRoundingMethod.js";
|
|
2
|
+
import { millisecondsInMinute as r } from "./constants.js";
|
|
3
|
+
import { differenceInMilliseconds as f } from "./differenceInMilliseconds.js";
|
|
4
|
+
function u(n, e, i) {
|
|
5
|
+
const o = f(n, e) / r;
|
|
6
|
+
return t(i?.roundingMethod)(o);
|
|
7
7
|
}
|
|
8
8
|
export {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
u as default,
|
|
10
|
+
u as differenceInMinutes
|
|
11
11
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { getRoundingMethod as
|
|
2
|
-
import { differenceInMilliseconds as
|
|
3
|
-
function
|
|
4
|
-
const
|
|
5
|
-
return
|
|
1
|
+
import { getRoundingMethod as f } from "./_lib/getRoundingMethod.js";
|
|
2
|
+
import { differenceInMilliseconds as i } from "./differenceInMilliseconds.js";
|
|
3
|
+
function c(e, n, o) {
|
|
4
|
+
const d = i(e, n) / 1e3;
|
|
5
|
+
return f(o?.roundingMethod)(d);
|
|
6
6
|
}
|
|
7
7
|
export {
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
c as default,
|
|
9
|
+
c as differenceInSeconds
|
|
10
10
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { getDefaultOptions as
|
|
2
|
-
import { enUS as
|
|
3
|
-
const
|
|
1
|
+
import { getDefaultOptions as i } from "./_lib/defaultOptions.js";
|
|
2
|
+
import { enUS as d } from "./locale/en-US.js";
|
|
3
|
+
const p = [
|
|
4
4
|
"years",
|
|
5
5
|
"months",
|
|
6
6
|
"weeks",
|
|
@@ -9,15 +9,14 @@ const U = [
|
|
|
9
9
|
"minutes",
|
|
10
10
|
"seconds"
|
|
11
11
|
];
|
|
12
|
-
function
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}, []).join(k) : "";
|
|
12
|
+
function x(r, e) {
|
|
13
|
+
const a = i(), o = e?.locale ?? a.locale ?? d, c = e?.format ?? p, l = e?.zero ?? !1, f = e?.delimiter ?? " ";
|
|
14
|
+
return o.formatDistance ? c.reduce((n, t) => {
|
|
15
|
+
const m = `x${t.replace(/(^.)/, (u) => u.toUpperCase())}`, s = r[t];
|
|
16
|
+
return s !== void 0 && (l || r[t]) ? n.concat(o.formatDistance(m, s)) : n;
|
|
17
|
+
}, []).join(f) : "";
|
|
19
18
|
}
|
|
20
19
|
export {
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
x as default,
|
|
21
|
+
x as formatDuration
|
|
23
22
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { normalizeDates as
|
|
1
|
+
import { normalizeDates as i } from "./_lib/normalizeDates.js";
|
|
2
2
|
import { startOfWeek as r } from "./startOfWeek.js";
|
|
3
|
-
function
|
|
4
|
-
const [m, f] =
|
|
5
|
-
e
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
function o(t, a, e) {
|
|
4
|
+
const [m, f] = i(
|
|
5
|
+
e?.in,
|
|
6
|
+
t,
|
|
7
|
+
a
|
|
8
8
|
);
|
|
9
9
|
return +r(m, e) == +r(f, e);
|
|
10
10
|
}
|
|
11
11
|
export {
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
o as default,
|
|
13
|
+
o as isSameWeek
|
|
14
14
|
};
|