@okam/stack-ui 1.32.2 → 1.32.3
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/index.d.ts +1 -1
- package/index.js +1 -1
- package/index.mjs +145 -144
- package/index101.js +1 -1
- package/index101.mjs +1 -1
- package/index102.js +1 -1
- package/index102.mjs +3 -3
- package/index103.js +1 -1
- package/index103.mjs +1 -1
- package/index110.js +1 -1
- package/index110.mjs +5 -5
- package/index111.js +1 -1
- package/index111.mjs +2 -2
- package/index112.js +1 -1
- package/index112.mjs +1 -1
- package/index113.js +1 -1
- package/index113.mjs +2 -2
- package/index115.js +1 -1
- package/index115.mjs +4 -4
- package/index116.js +1 -1
- package/index116.mjs +2 -2
- package/index120.js +1 -1
- package/index120.mjs +4 -4
- package/index121.js +1 -1
- package/index121.mjs +2 -2
- package/index125.js +1 -1
- package/index125.mjs +2 -2
- package/index126.js +1 -1
- package/index126.mjs +3 -3
- package/index130.js +1 -1
- package/index130.mjs +2 -2
- package/index133.js +1 -1
- package/index133.mjs +1 -1
- package/index139.js +1 -1
- package/index139.mjs +52 -46
- package/index140.js +1 -1
- package/index140.mjs +46 -241
- package/index141.js +1 -2
- package/index141.mjs +241 -13
- package/index142.js +2 -1
- package/index142.mjs +12 -29
- package/index143.js +1 -1
- package/index143.mjs +30 -52
- package/index144.js +1 -1
- package/index144.mjs +1 -1
- package/index145.js +1 -1
- package/index145.mjs +5 -5
- package/index146.js +1 -1
- package/index146.mjs +3 -3
- package/index147.js +1 -1
- package/index147.mjs +2 -2
- package/index148.js +1 -1
- package/index148.mjs +3 -3
- package/index149.js +1 -1
- package/index149.mjs +3 -3
- package/index151.js +1 -1
- package/index151.mjs +2 -2
- package/index152.js +1 -1
- package/index152.mjs +106 -20
- package/index153.js +1 -1
- package/index153.mjs +83 -107
- package/index154.js +1 -1
- package/index154.mjs +26 -83
- package/index155.js +1 -1
- package/index155.mjs +20 -25
- package/index156.js +1 -1
- package/index156.mjs +17 -123
- package/index157.js +1 -1
- package/index157.mjs +122 -24
- package/index158.js +1 -1
- package/index158.mjs +71 -17
- package/index159.js +1 -1
- package/index159.mjs +338 -62
- package/index160.js +1 -1
- package/index160.mjs +42 -346
- package/index161.js +1 -1
- package/index161.mjs +29 -43
- package/index162.js +1 -1
- package/index162.mjs +24 -28
- package/index164.js +1 -1
- package/index164.mjs +2 -2
- package/index167.js +1 -1
- package/index167.mjs +3 -3
- package/index169.js +1 -1
- package/index169.mjs +1 -1
- package/index170.js +1 -1
- package/index170.mjs +1 -1
- package/index171.js +1 -1
- package/index171.mjs +1 -1
- package/index173.js +1 -1
- package/index173.mjs +1 -1
- package/index175.js +1 -1
- package/index175.mjs +1 -1
- package/index176.js +1 -1
- package/index176.mjs +1 -1
- package/index178.js +1 -1
- package/index178.mjs +2 -2
- package/index179.js +1 -1
- package/index179.mjs +1 -1
- package/index180.js +1 -1
- package/index180.mjs +2 -2
- package/index182.js +1 -1
- package/index182.mjs +1 -1
- package/index198.js +1 -1
- package/index198.mjs +2 -2
- package/index199.js +1 -1
- package/index199.mjs +1 -1
- package/index200.js +1 -1
- package/index200.mjs +3 -3
- package/index204.js +1 -1
- package/index204.mjs +2 -2
- package/index205.js +1 -1
- package/index205.mjs +1 -1
- package/index314.js +1 -1
- package/index314.mjs +20 -136
- package/index315.js +1 -1
- package/index315.mjs +39 -189
- package/index316.js +1 -1
- package/index316.mjs +5 -22
- package/index317.js +1 -1
- package/index317.mjs +6 -29
- package/index318.js +1 -1
- package/index318.mjs +14 -46
- package/index319.js +1 -1
- package/index319.mjs +23 -47
- package/index320.js +1 -1
- package/index320.mjs +25 -97
- package/index321.js +1 -1
- package/index321.mjs +30 -4
- package/index322.js +1 -1
- package/index322.mjs +29 -72
- package/index323.js +1 -1
- package/index323.mjs +8 -57
- package/index324.js +1 -1
- package/index324.mjs +5 -7
- package/index325.js +1 -1
- package/index325.mjs +7 -11
- package/index326.js +1 -1
- package/index326.mjs +13 -47
- package/index327.js +1 -1
- package/index327.mjs +8 -24
- package/index328.js +1 -1
- package/index328.mjs +141 -6
- package/index329.js +1 -1
- package/index329.mjs +197 -14
- package/index330.js +1 -1
- package/index330.mjs +22 -24
- package/index331.js +1 -1
- package/index331.mjs +44 -26
- package/index332.js +1 -1
- package/index332.mjs +46 -29
- package/index333.js +1 -1
- package/index333.mjs +99 -8
- package/index334.js +1 -1
- package/index334.mjs +72 -6
- package/index335.js +1 -1
- package/index335.mjs +58 -7
- package/index336.js +1 -1
- package/index336.mjs +7 -13
- package/index337.js +1 -1
- package/index337.mjs +11 -8
- package/index338.js +1 -1
- package/index338.mjs +7 -4
- package/index339.js +1 -1
- package/index339.mjs +68 -6
- package/index340.js +1 -1
- package/index340.mjs +27 -65
- package/index341.js +1 -1
- package/index341.mjs +6 -30
- package/index342.js +1 -1
- package/index342.mjs +6 -6
- package/index343.js +1 -1
- package/index343.mjs +20 -6
- package/index344.js +1 -1
- package/index344.mjs +3 -20
- package/package.json +1 -1
package/index170.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CalendarDate as C, ZonedDateTime as b, CalendarDateTime as U } from "./index169.mjs";
|
|
2
2
|
import { constrain as M } from "./index185.mjs";
|
|
3
3
|
import { GregorianCalendar as h, getExtendedYear as p } from "./index184.mjs";
|
|
4
|
-
import { getLocalTimeZone as y } from "./
|
|
4
|
+
import { getLocalTimeZone as y } from "./index152.mjs";
|
|
5
5
|
function u(e) {
|
|
6
6
|
e = $(e, new h());
|
|
7
7
|
let t = p(e.era, e.year);
|
package/index171.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index139.js");function d(a,t){let{id:i,"aria-label":l,"aria-labelledby":e}=a;return i=r.useId(i),e&&l?e=[...new Set([i,...e.trim().split(/\s+/)])].join(" "):e&&(e=e.trim().split(/\s+/).join(" ")),!l&&!e&&t&&(l=t),{id:i,"aria-label":l,"aria-labelledby":e}}exports.useLabels=d;
|
package/index171.mjs
CHANGED
package/index173.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index324.js");function r(n,l){let e=n;for(t.isScrollable(e,l)&&(e=e.parentElement);e&&!t.isScrollable(e,l);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}exports.getScrollParent=r;
|
package/index173.mjs
CHANGED
package/index175.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index326.js"),s=require("react");function i(e,t,u,r){let n=l.useEffectEvent(u),c=u==null;s.useEffect(()=>{if(c||!e.current)return;let f=e.current;return f.addEventListener(t,n,r),()=>{f.removeEventListener(t,n,r)}},[e,t,r,c,n])}exports.useEvent=i;
|
package/index175.mjs
CHANGED
package/index176.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("./index325.js");function a(e,o){let d=p(e,o,"left"),f=p(e,o,"top"),t=o.offsetWidth,l=o.offsetHeight,r=e.scrollLeft,s=e.scrollTop,{borderTopWidth:i,borderLeftWidth:c}=getComputedStyle(e),u=e.scrollLeft+parseInt(c,10),n=e.scrollTop+parseInt(i,10),b=u+e.clientWidth,v=n+e.clientHeight;d<=r?r=d-parseInt(c,10):d+t>b&&(r+=d+t-b),f<=n?s=f-parseInt(i,10):f+l>v&&(s+=f+l-v),e.scrollLeft=r,e.scrollTop=s}function p(e,o,d){const f=d==="left"?"offsetLeft":"offsetTop";let t=0;for(;o.offsetParent&&(t+=o[f],o.offsetParent!==e);){if(o.offsetParent.contains(e)){t-=e[f];break}o=o.offsetParent}return t}function h(e,o){if(e&&document.contains(e)){let r=document.scrollingElement||document.documentElement;if(window.getComputedStyle(r).overflow==="hidden"){let i=P.getScrollParents(e);for(let c of i)a(c,e)}else{var d;let{left:i,top:c}=e.getBoundingClientRect();e==null||(d=e.scrollIntoView)===null||d===void 0||d.call(e,{block:"nearest"});let{left:u,top:n}=e.getBoundingClientRect();if(Math.abs(i-u)>1||Math.abs(c-n)>1){var f,t,l;o==null||(t=o.containingElement)===null||t===void 0||(f=t.scrollIntoView)===null||f===void 0||f.call(t,{block:"center",inline:"center"}),(l=e.scrollIntoView)===null||l===void 0||l.call(e,{block:"nearest"})}}}}exports.scrollIntoView=a;exports.scrollIntoViewport=h;
|
package/index176.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getScrollParents as a } from "./
|
|
1
|
+
import { getScrollParents as a } from "./index325.mjs";
|
|
2
2
|
function $(e, o) {
|
|
3
3
|
let d = p(e, o, "left"), f = p(e, o, "top"), t = o.offsetWidth, l = o.offsetHeight, r = e.scrollLeft, s = e.scrollTop, { borderTopWidth: i, borderLeftWidth: c } = getComputedStyle(e), u = e.scrollLeft + parseInt(c, 10), n = e.scrollTop + parseInt(i, 10), b = u + e.clientWidth, v = n + e.clientHeight;
|
|
4
4
|
d <= r ? r = d - parseInt(c, 10) : d + t > b && (r += d + t - b), f <= n ? s = f - parseInt(i, 10) : f + l > v && (s += f + l - v), e.scrollLeft = r, e.scrollTop = s;
|
package/index178.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("./index346.js"),q=require("./index270.js"),f=require("react"),F=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("./index346.js"),q=require("./index270.js"),f=require("react"),F=require("./index321.js"),S=require("./index326.js"),I=require("@react-aria/i18n");function M(o){return o&&o.__esModule?o.default:o}function R(o){const v=f.useRef(void 0);let{value:n,textValue:w,minValue:a,maxValue:u,isDisabled:T,isReadOnly:P,isRequired:B,onIncrement:t,onIncrementPage:s,onDecrement:r,onDecrementPage:l,onDecrementToMin:c,onIncrementToMax:d}=o;const L=I.useLocalizedStringFormatter(M(A),"@react-aria/spinbutton"),i=()=>clearTimeout(v.current);f.useEffect(()=>()=>i(),[]);let k=e=>{if(!(e.ctrlKey||e.metaKey||e.shiftKey||e.altKey||P))switch(e.key){case"PageUp":if(s){e.preventDefault(),s==null||s();break}case"ArrowUp":case"Up":t&&(e.preventDefault(),t==null||t());break;case"PageDown":if(l){e.preventDefault(),l==null||l();break}case"ArrowDown":case"Down":r&&(e.preventDefault(),r==null||r());break;case"Home":c&&(e.preventDefault(),c==null||c());break;case"End":d&&(e.preventDefault(),d==null||d());break}},m=f.useRef(!1),p=()=>{m.current=!0},D=()=>{m.current=!1},b=w===""?L.format("Empty"):(w||`${n}`).replace("-","−");f.useEffect(()=>{m.current&&(q.clearAnnouncer("assertive"),q.announce(b,"assertive"))},[b]);const y=S.useEffectEvent(e=>{i(),t==null||t(),v.current=window.setTimeout(()=>{(u===void 0||isNaN(u)||n===void 0||isNaN(n)||n<u)&&y(60)},e)}),x=S.useEffectEvent(e=>{i(),r==null||r(),v.current=window.setTimeout(()=>{(a===void 0||isNaN(a)||n===void 0||isNaN(n)||n>a)&&x(60)},e)});let E=e=>{e.preventDefault()},{addGlobalListener:g,removeAllGlobalListeners:N}=F.useGlobalListeners();return{spinButtonProps:{role:"spinbutton","aria-valuenow":n!==void 0&&!isNaN(n)?n:void 0,"aria-valuetext":b,"aria-valuemin":a,"aria-valuemax":u,"aria-disabled":T||void 0,"aria-readonly":P||void 0,"aria-required":B||void 0,onKeyDown:k,onFocus:p,onBlur:D},incrementButtonProps:{onPressStart:()=>{y(400),g(window,"contextmenu",E)},onPressEnd:()=>{i(),N()},onFocus:p,onBlur:D},decrementButtonProps:{onPressStart:()=>{x(400),g(window,"contextmenu",E)},onPressEnd:()=>{i(),N()},onFocus:p,onBlur:D}}}exports.useSpinButton=R;
|
package/index178.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import V from "./index346.mjs";
|
|
2
2
|
import { clearAnnouncer as A, announce as K } from "./index270.mjs";
|
|
3
3
|
import { useRef as g, useEffect as B } from "react";
|
|
4
|
-
import { useGlobalListeners as L } from "./
|
|
5
|
-
import { useEffectEvent as T } from "./
|
|
4
|
+
import { useGlobalListeners as L } from "./index321.mjs";
|
|
5
|
+
import { useEffectEvent as T } from "./index326.mjs";
|
|
6
6
|
import { useLocalizedStringFormatter as M } from "@react-aria/i18n";
|
|
7
7
|
function S(o) {
|
|
8
8
|
return o && o.__esModule ? o.default : o;
|
package/index179.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index326.js"),o=require("react");function s(t,d,u){let i=o.useRef(d),r=l.useEffectEvent(()=>{u&&u(i.current)});o.useEffect(()=>{var n;let e=t==null||(n=t.current)===null||n===void 0?void 0:n.form;return e==null||e.addEventListener("reset",r),()=>{e==null||e.removeEventListener("reset",r)}},[t,r])}exports.useFormReset=s;
|
package/index179.mjs
CHANGED
package/index180.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("./index266.js"),F=require("./index169.js"),s=require("./index170.js"),b=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("./index266.js"),F=require("./index169.js"),s=require("./index170.js"),b=require("./index152.js"),I=require("./index181.js"),y=require("./index267.js"),_=require("./index268.js"),$=require("./index157.js"),p=require("react");function O(e){return e&&e.__esModule?e.default:e}const w=new y.LocalizedStringDictionary(O(v));function L(){return typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US"}function h(e,t,a,r,n){let i=e!=null&&a!=null&&e.compare(a)>0,o=e!=null&&t!=null&&e.compare(t)<0,l=e!=null&&(r==null?void 0:r(e))||!1,d=i||o||l,u=[];if(d){let f=L(),c=y.LocalizedStringDictionary.getGlobalDictionaryForPackage("@react-stately/datepicker")||w,m=new _.LocalizedStringFormatter(f,c),g=new I.DateFormatter(f,S({},n)),D=g.resolvedOptions().timeZone;o&&t!=null&&u.push(m.format("rangeUnderflow",{minValue:g.format(t.toDate(D))})),i&&a!=null&&u.push(m.format("rangeOverflow",{maxValue:g.format(a.toDate(D))})),l&&u.push(m.format("unavailableDate"))}return{isInvalid:d,validationErrors:u,validationDetails:{badInput:l,customError:!1,patternMismatch:!1,rangeOverflow:i,rangeUnderflow:o,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!d}}}function x(e,t,a,r,n){var i;let o=h((i=e==null?void 0:e.start)!==null&&i!==void 0?i:null,t,a,r,n);var l;let d=h((l=e==null?void 0:e.end)!==null&&l!==void 0?l:null,t,a,r,n),u=$.mergeValidation(o,d);if((e==null?void 0:e.end)!=null&&e.start!=null&&e.end.compare(e.start)<0){let f=y.LocalizedStringDictionary.getGlobalDictionaryForPackage("@react-stately/datepicker")||w;u=$.mergeValidation(u,{isInvalid:!0,validationErrors:[f.getStringForLocale("rangeReversed",L())],validationDetails:{...$.VALID_VALIDITY_STATE,rangeUnderflow:!0,rangeOverflow:!0,valid:!1}})}return u}const q={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"},E={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"};function S(e,t){e={...t.shouldForceLeadingZeros?E:q,...e};let r=t.granularity||"minute",n=Object.keys(e);var i;let o=n.indexOf((i=t.maxGranularity)!==null&&i!==void 0?i:"year");o<0&&(o=0);let l=n.indexOf(r);if(l<0&&(l=2),o>l)throw new Error("maxGranularity must be greater than granularity");let d=n.slice(o,l+1).reduce((f,c)=>(f[c]=e[c],f),{});return t.hourCycle!=null&&(d.hour12=t.hourCycle===12),d.timeZone=t.timeZone||"UTC",(r==="hour"||r==="minute"||r==="second")&&t.timeZone&&!t.hideTimeZone&&(d.timeZoneName="short"),t.showEra&&o===0&&(d.era="short"),d}function Z(e){return e&&"hour"in e?e:new F.Time}function T(e,t){if(e===null)return null;if(e)return s.toCalendar(e,t)}function C(e,t,a,r){if(e)return T(e,a);let n=s.toCalendar(b.now(r??b.getLocalTimeZone()).set({hour:0,minute:0,second:0,millisecond:0}),a);return t==="year"||t==="month"||t==="day"?s.toCalendarDate(n):r?n:s.toCalendarDateTime(n)}function P(e,t){let a=e&&"timeZone"in e?e.timeZone:void 0,r=e&&"minute"in e?"minute":"day";if(e&&t&&!(t in e))throw new Error("Invalid granularity "+t+" for value "+e.toString());let[n,i]=p.useState([r,a]);e&&(n[0]!==r||n[1]!==a)&&i([r,a]),t||(t=e?r:n[0]);let o=e?a:n[1];return[t,o]}exports.convertValue=T;exports.createPlaceholderDate=C;exports.getFormatOptions=S;exports.getPlaceholderTime=Z;exports.getRangeValidationResult=x;exports.getValidationResult=h;exports.useDefaultProps=P;
|
package/index180.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import w from "./index266.mjs";
|
|
2
2
|
import { Time as D } from "./index169.mjs";
|
|
3
3
|
import { toCalendar as h, toCalendarDate as T, toCalendarDateTime as I } from "./index170.mjs";
|
|
4
|
-
import { now as _, getLocalTimeZone as v } from "./
|
|
4
|
+
import { now as _, getLocalTimeZone as v } from "./index152.mjs";
|
|
5
5
|
import { DateFormatter as L } from "./index181.mjs";
|
|
6
6
|
import { LocalizedStringDictionary as m } from "./index267.mjs";
|
|
7
7
|
import { LocalizedStringFormatter as F } from "./index268.mjs";
|
|
8
|
-
import { mergeValidation as b, VALID_VALIDITY_STATE as O } from "./
|
|
8
|
+
import { mergeValidation as b, VALID_VALIDITY_STATE as O } from "./index157.mjs";
|
|
9
9
|
import { useState as E } from "react";
|
|
10
10
|
function S(e) {
|
|
11
11
|
return e && e.__esModule ? e.default : e;
|
package/index182.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),c=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),c=require("./index162.js");function r(t){let[n,e]=c.useControlledState(t.isOpen,t.defaultOpen||!1,t.onOpenChange);const o=l.useCallback(()=>{e(!0)},[e]),s=l.useCallback(()=>{e(!1)},[e]),a=l.useCallback(()=>{e(!n)},[e,n]);return{isOpen:n,setOpen:e,open:o,close:s,toggle:a}}exports.useOverlayTriggerState=r;
|
package/index182.mjs
CHANGED
package/index198.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index199.js"),m=require("./index201.js"),c=require("./index270.js"),q=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index199.js"),m=require("./index201.js"),c=require("./index270.js"),q=require("./index139.js"),R=require("./index156.js"),S=require("./index165.js"),p=require("./index171.js"),b=require("./index271.js"),x=require("@react-aria/i18n"),f=require("react");function y(e){return e&&e.__esModule?e.default:e}function M(e,i){let l=x.useLocalizedStringFormatter(y(m),"@react-aria/calendar"),g=S.filterDOMProps(e),D=a.useVisibleRangeDescription(i.visibleRange.start,i.visibleRange.end,i.timeZone,!1),s=a.useVisibleRangeDescription(i.visibleRange.start,i.visibleRange.end,i.timeZone,!0);b.useUpdateEffect(()=>{i.isFocused||c.announce(s)},[s]);let r=a.useSelectedDateDescription(i);b.useUpdateEffect(()=>{r&&c.announce(r,"polite",4e3)},[r]);let t=q.useSlotId([!!e.errorMessage,e.isInvalid,e.validationState]);a.hookData.set(i,{ariaLabel:e["aria-label"],ariaLabelledBy:e["aria-labelledby"],errorMessageId:t,selectedDateDescription:r});let[v,n]=f.useState(!1),o=e.isDisabled||i.isNextVisibleRangeInvalid();o&&v&&(n(!1),i.setFocused(!0));let[P,u]=f.useState(!1),d=e.isDisabled||i.isPreviousVisibleRangeInvalid();d&&P&&(u(!1),i.setFocused(!0));let F=p.useLabels({id:e.id,"aria-label":[e["aria-label"],s].filter(Boolean).join(", "),"aria-labelledby":e["aria-labelledby"]});return{calendarProps:R.mergeProps(g,F,{role:"application","aria-describedby":e["aria-describedby"]||void 0}),nextButtonProps:{onPress:()=>i.focusNextPage(),"aria-label":l.format("next"),isDisabled:o,onFocusChange:n},prevButtonProps:{onPress:()=>i.focusPreviousPage(),"aria-label":l.format("previous"),isDisabled:d,onFocusChange:u},errorMessageProps:{id:t},title:D}}exports.useCalendarBase=M;
|
package/index198.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useVisibleRangeDescription as n, useSelectedDateDescription as D, hookData as v } from "./index199.mjs";
|
|
2
2
|
import P from "./index201.mjs";
|
|
3
3
|
import { announce as c } from "./index270.mjs";
|
|
4
|
-
import { useSlotId as F } from "./
|
|
5
|
-
import { mergeProps as R } from "./
|
|
4
|
+
import { useSlotId as F } from "./index139.mjs";
|
|
5
|
+
import { mergeProps as R } from "./index156.mjs";
|
|
6
6
|
import { filterDOMProps as y } from "./index165.mjs";
|
|
7
7
|
import { useLabels as B } from "./index171.mjs";
|
|
8
8
|
import { useUpdateEffect as f } from "./index271.mjs";
|
package/index199.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("./index201.js"),f=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("./index201.js"),f=require("./index152.js"),c=require("@react-aria/i18n"),$=require("react");function p(e){return e&&e.__esModule?e.default:e}const y=new WeakMap;function d(e){return(e==null?void 0:e.calendar.identifier)==="gregory"&&e.era==="BC"?"short":void 0}function R(e){let a=c.useLocalizedStringFormatter(p(h),"@react-aria/calendar"),r,t;var l;"highlightedRange"in e?{start:r,end:t}=e.highlightedRange||{}:r=t=(l=e.value)!==null&&l!==void 0?l:void 0;let n=c.useDateFormatter({weekday:"long",month:"long",year:"numeric",day:"numeric",era:d(r)||d(t),timeZone:e.timeZone}),o="anchorDate"in e?e.anchorDate:null;return $.useMemo(()=>{if(!o&&r&&t)if(f.isSameDay(r,t)){let u=n.format(r.toDate(e.timeZone));return a.format("selectedDateDescription",{date:u})}else{let u=g(n,a,r,t,e.timeZone);return a.format("selectedRangeDescription",{dateRange:u})}return""},[r,t,o,e.timeZone,a,n])}function F(e,a,r,t){let l=c.useLocalizedStringFormatter(p(h),"@react-aria/calendar"),n=d(e)||d(a),o=c.useDateFormatter({month:"long",year:"numeric",era:n,calendar:e.calendar.identifier,timeZone:r}),u=c.useDateFormatter({month:"long",year:"numeric",day:"numeric",era:n,calendar:e.calendar.identifier,timeZone:r});return $.useMemo(()=>{if(f.isSameDay(e,f.startOfMonth(e))){if(f.isSameDay(a,f.endOfMonth(e)))return o.format(e.toDate(r));if(f.isSameDay(a,f.endOfMonth(a)))return t?g(o,l,e,a,r):o.formatRange(e.toDate(r),a.toDate(r))}return t?g(u,l,e,a,r):u.formatRange(e.toDate(r),a.toDate(r))},[e,a,o,u,l,r,t])}function g(e,a,r,t,l){let n=e.formatRangeToParts(r.toDate(l),t.toDate(l)),o=-1;for(let i=0;i<n.length;i++){let m=n[i];if(m.source==="shared"&&m.type==="literal")o=i;else if(m.source==="endRange")break}let u="",s="";for(let i=0;i<n.length;i++)i<o?u+=n[i].value:i>o&&(s+=n[i].value);return a.format("dateRange",{startDate:u,endDate:s})}exports.getEraFormat=d;exports.hookData=y;exports.useSelectedDateDescription=R;exports.useVisibleRangeDescription=F;
|
package/index199.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import s from "./index201.mjs";
|
|
2
|
-
import { isSameDay as c, startOfMonth as x, endOfMonth as p } from "./
|
|
2
|
+
import { isSameDay as c, startOfMonth as x, endOfMonth as p } from "./index152.mjs";
|
|
3
3
|
import { useLocalizedStringFormatter as h, useDateFormatter as m } from "@react-aria/i18n";
|
|
4
4
|
import { useMemo as R } from "react";
|
|
5
5
|
function b(e) {
|
package/index200.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const I=require("./index199.js"),E=require("./index201.js"),n=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const I=require("./index199.js"),E=require("./index201.js"),n=require("./index152.js"),Z=require("./index156.js"),$=require("./index202.js"),w=require("./index173.js"),A=require("./index166.js"),U=require("./index176.js"),k=require("./index203.js"),B=require("./index204.js"),j=require("./index159.js"),P=require("@react-aria/i18n"),l=require("react");function W(t){return t&&t.__esModule?t.default:t}function _(t,e,u){let{date:i,isDisabled:s}=t,{errorMessageId:T,selectedDateDescription:b}=I.hookData.get(e),a=P.useLocalizedStringFormatter(W(E),"@react-aria/calendar"),R=P.useDateFormatter({weekday:"long",day:"numeric",month:"long",year:"numeric",era:I.getEraFormat(i),timeZone:e.timeZone}),d=e.isSelected(i),f=e.isCellFocused(i);s=s||e.isCellDisabled(i);let S=e.isCellUnavailable(i),g=!s&&!S,c=e.isValueInvalid&&!!("highlightedRange"in e?!e.anchorDate&&e.highlightedRange&&i.compare(e.highlightedRange.start)>=0&&i.compare(e.highlightedRange.end)<=0:e.value&&n.isSameDay(e.value,i));c&&(d=!0),i=k.useDeepMemo(i,n.isEqualDay);let m=l.useMemo(()=>i.toDate(e.timeZone),[i,e.timeZone]),v=n.isToday(i,e.timeZone),M=l.useMemo(()=>{let r="";return"highlightedRange"in e&&e.value&&!e.anchorDate&&(n.isSameDay(i,e.value.start)||n.isSameDay(i,e.value.end))&&(r=b+", "),r+=R.format(m),v?r=a.format(d?"todayDateSelected":"todayDate",{date:r}):d&&(r=a.format("dateSelected",{date:r})),e.minValue&&n.isSameDay(i,e.minValue)?r+=", "+a.format("minimumDate"):e.maxValue&&n.isSameDay(i,e.maxValue)&&(r+=", "+a.format("maximumDate")),r},[R,m,a,d,v,i,e,b]),p="";"anchorDate"in e&&f&&!e.isReadOnly&&g&&(e.anchorDate?p=a.format("finishRangeSelectionPrompt"):p=a.format("startRangeSelectionPrompt"));let x=A.useDescription(p),y=l.useRef(!1),h=l.useRef(!1),D=l.useRef(void 0),{pressProps:C,isPressed:O}=j.usePress({shouldCancelOnPointerExit:"anchorDate"in e&&!!e.anchorDate,preventFocusOnPress:!0,isDisabled:!g||e.isReadOnly,onPressStart(r){if(e.isReadOnly){e.setFocusedDate(i);return}if("highlightedRange"in e&&!e.anchorDate&&(r.pointerType==="mouse"||r.pointerType==="touch")){if(e.highlightedRange&&!c){if(n.isSameDay(i,e.highlightedRange.start)){e.setAnchorDate(e.highlightedRange.end),e.setFocusedDate(i),e.setDragging(!0),h.current=!0;return}else if(n.isSameDay(i,e.highlightedRange.end)){e.setAnchorDate(e.highlightedRange.start),e.setFocusedDate(i),e.setDragging(!0),h.current=!0;return}}let o=()=>{e.setDragging(!0),D.current=void 0,e.selectDate(i),e.setFocusedDate(i),y.current=!0};r.pointerType==="touch"?D.current=setTimeout(o,200):o()}},onPressEnd(){h.current=!1,y.current=!1,clearTimeout(D.current),D.current=void 0},onPress(){!("anchorDate"in e)&&!e.isReadOnly&&(e.selectDate(i),e.setFocusedDate(i))},onPressUp(r){if(!e.isReadOnly&&("anchorDate"in e&&D.current&&(e.selectDate(i),e.setFocusedDate(i)),"anchorDate"in e))if(h.current)e.setAnchorDate(i);else if(e.anchorDate&&!y.current)e.selectDate(i),e.setFocusedDate(i);else if(r.pointerType==="keyboard"&&!e.anchorDate){e.selectDate(i);let o=i.add({days:1});e.isInvalid(o)&&(o=i.subtract({days:1})),e.isInvalid(o)||e.setFocusedDate(o)}else r.pointerType==="virtual"&&(e.selectDate(i),e.setFocusedDate(i))}}),F;s||(F=n.isSameDay(i,e.focusedDate)?0:-1),l.useEffect(()=>{f&&u.current&&($.focusWithoutScrolling(u.current),B.getInteractionModality()!=="pointer"&&document.activeElement===u.current&&U.scrollIntoViewport(u.current,{containingElement:w.getScrollParent(u.current)}))},[f,u]);let q=P.useDateFormatter({day:"numeric",timeZone:e.timeZone,calendar:i.calendar.identifier}),V=l.useMemo(()=>q.formatToParts(m).find(r=>r.type==="day").value,[q,m]);return{cellProps:{role:"gridcell","aria-disabled":!g||void 0,"aria-selected":d||void 0,"aria-invalid":c||void 0},buttonProps:Z.mergeProps(C,{onFocus(){s||e.setFocusedDate(i)},tabIndex:F,role:"button","aria-disabled":!g||void 0,"aria-label":M,"aria-invalid":c||void 0,"aria-describedby":[c?T:void 0,x["aria-describedby"]].filter(Boolean).join(" ")||void 0,onPointerEnter(r){"highlightDate"in e&&(r.pointerType!=="touch"||e.isDragging)&&g&&e.highlightDate(i)},onPointerDown(r){"releasePointerCapture"in r.target&&r.target.releasePointerCapture(r.pointerId)},onContextMenu(r){r.preventDefault()}}),isPressed:O,isFocused:f,isSelected:d,isDisabled:s,isUnavailable:S,isOutsideVisibleRange:i.compare(e.visibleRange.start)<0||i.compare(e.visibleRange.end)>0,isInvalid:c,formattedDate:V}}exports.useCalendarCell=_;
|
package/index200.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { hookData as V, getEraFormat as Z } from "./index199.mjs";
|
|
2
2
|
import A from "./index201.mjs";
|
|
3
|
-
import { isSameDay as a, isEqualDay as U, isToday as k } from "./
|
|
4
|
-
import { mergeProps as w } from "./
|
|
3
|
+
import { isSameDay as a, isEqualDay as U, isToday as k } from "./index152.mjs";
|
|
4
|
+
import { mergeProps as w } from "./index156.mjs";
|
|
5
5
|
import { focusWithoutScrolling as B } from "./index202.mjs";
|
|
6
6
|
import { getScrollParent as _ } from "./index173.mjs";
|
|
7
7
|
import { useDescription as j } from "./index166.mjs";
|
|
8
8
|
import { scrollIntoViewport as q } from "./index176.mjs";
|
|
9
9
|
import { useDeepMemo as z } from "./index203.mjs";
|
|
10
10
|
import { getInteractionModality as L } from "./index204.mjs";
|
|
11
|
-
import { usePress as W } from "./
|
|
11
|
+
import { usePress as W } from "./index159.mjs";
|
|
12
12
|
import { useLocalizedStringFormatter as G, useDateFormatter as S } from "@react-aria/i18n";
|
|
13
13
|
import { useMemo as b, useRef as $, useEffect as H } from "react";
|
|
14
14
|
function J(t) {
|
package/index204.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index317.js"),w=require("./index174.js"),m=require("./index327.js");require("react");let d=null,L=new Set,u=new Map,a=!1,s=!1;function c(e,n){for(let t of L)t(e,n)}function y(e){return!(e.metaKey||!w.isMac()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function f(e){a=!0,y(e)&&(d="keyboard",c("keyboard",e))}function o(e){d="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(a=!0,c("pointer",e))}function l(e){m.isVirtualClick(e)&&(a=!0,d="virtual")}function b(e){e.target===window||e.target===document||(!a&&!s&&(d="virtual",c("virtual",e)),a=!1,s=!1)}function $(){a=!1,s=!0}function v(e){if(typeof window>"u"||u.get(i.getOwnerWindow(e)))return;const n=i.getOwnerWindow(e),t=i.getOwnerDocument(e);let r=n.HTMLElement.prototype.focus;n.HTMLElement.prototype.focus=function(){a=!0,r.apply(this,arguments)},t.addEventListener("keydown",f,!0),t.addEventListener("keyup",f,!0),t.addEventListener("click",l,!0),n.addEventListener("focus",b,!0),n.addEventListener("blur",$,!1),typeof PointerEvent<"u"?(t.addEventListener("pointerdown",o,!0),t.addEventListener("pointermove",o,!0),t.addEventListener("pointerup",o,!0)):(t.addEventListener("mousedown",o,!0),t.addEventListener("mousemove",o,!0),t.addEventListener("mouseup",o,!0)),n.addEventListener("beforeunload",()=>{p(e)},{once:!0}),u.set(n,{focus:r})}const p=(e,n)=>{const t=i.getOwnerWindow(e),r=i.getOwnerDocument(e);n&&r.removeEventListener("DOMContentLoaded",n),u.has(t)&&(t.HTMLElement.prototype.focus=u.get(t).focus,r.removeEventListener("keydown",f,!0),r.removeEventListener("keyup",f,!0),r.removeEventListener("click",l,!0),t.removeEventListener("focus",b,!0),t.removeEventListener("blur",$,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",o,!0),r.removeEventListener("pointermove",o,!0),r.removeEventListener("pointerup",o,!0)):(r.removeEventListener("mousedown",o,!0),r.removeEventListener("mousemove",o,!0),r.removeEventListener("mouseup",o,!0)),u.delete(t))};function E(e){const n=i.getOwnerDocument(e);let t;return n.readyState!=="loading"?v(e):(t=()=>{v(e)},n.addEventListener("DOMContentLoaded",t)),()=>p(e,t)}typeof document<"u"&&E();function g(){return d}function k(e){d=e,c(e,null)}exports.addWindowFocusTracking=E;exports.getInteractionModality=g;exports.hasSetupGlobalListeners=u;exports.setInteractionModality=k;
|
package/index204.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { getOwnerDocument as v, getOwnerWindow as s } from "./
|
|
1
|
+
import { getOwnerDocument as v, getOwnerWindow as s } from "./index317.mjs";
|
|
2
2
|
import { isMac as m } from "./index174.mjs";
|
|
3
|
-
import { isVirtualClick as L } from "./
|
|
3
|
+
import { isVirtualClick as L } from "./index327.mjs";
|
|
4
4
|
import "react";
|
|
5
5
|
let f = null, y = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map(), a = !1, c = !1;
|
|
6
6
|
function u(e, n) {
|
package/index205.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("./index170.js"),i=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("./index170.js"),i=require("./index152.js");function b(e,r,f){return r!=null&&e.compare(r)<0||f!=null&&e.compare(f)>0}function D(e,r,f,n,s){let t={};for(let c in r)t[c]=Math.floor(r[c]/2),t[c]>0&&r[c]%2===0&&t[c]--;let o=l(e,r,f).subtract(t);return a(e,o,r,f,n,s)}function l(e,r,f,n,s){let t=e;return r.years?t=i.startOfYear(e):r.months?t=i.startOfMonth(e):r.weeks&&(t=i.startOfWeek(e,f)),a(e,t,r,f,n,s)}function p(e,r,f,n,s){let t={...r};t.days?t.days--:t.weeks?t.weeks--:t.months?t.months--:t.years&&t.years--;let o=l(e,r,f).subtract(t);return a(e,o,r,f,n,s)}function a(e,r,f,n,s,t){if(s&&e.compare(s)>=0){let o=i.maxDate(r,l($.toCalendarDate(s),f,n));o&&(r=o)}if(t&&e.compare(t)<=0){let o=i.minDate(r,p($.toCalendarDate(t),f,n));o&&(r=o)}return r}function u(e,r,f){if(r){let n=i.maxDate(e,$.toCalendarDate(r));n&&(e=n)}if(f){let n=i.minDate(e,$.toCalendarDate(f));n&&(e=n)}return e}function y(e,r,f){if(!f)return e;for(;e.compare(r)>=0&&f(e);)e=e.subtract({days:1});return e.compare(r)>=0?e:null}exports.alignCenter=D;exports.alignEnd=p;exports.alignStart=l;exports.constrainStart=a;exports.constrainValue=u;exports.isInvalid=b;exports.previousAvailableDate=y;
|
package/index205.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { toCalendarDate as o } from "./index170.mjs";
|
|
2
|
-
import { startOfYear as l, startOfMonth as x, startOfWeek as w, maxDate as i, minDate as b } from "./
|
|
2
|
+
import { startOfYear as l, startOfMonth as x, startOfWeek as w, maxDate as i, minDate as b } from "./index152.mjs";
|
|
3
3
|
function m(f, e, t) {
|
|
4
4
|
return e != null && f.compare(e) < 0 || t != null && f.compare(t) > 0;
|
|
5
5
|
}
|
package/index314.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./index326.js"),a=require("./index172.js"),n=require("react");function o(c){let[u,l]=n.useState(c),e=n.useRef(null),r=f.useEffectEvent(()=>{if(!e.current)return;let t=e.current.next();if(t.done){e.current=null;return}u===t.value?r():l(t.value)});a.useLayoutEffect(()=>{e.current&&r()});let s=f.useEffectEvent(t=>{e.current=t(u),r()});return[u,s]}exports.useValueEffect=o;
|
package/index314.mjs
CHANGED
|
@@ -1,143 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { useState as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
let
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
H,
|
|
12
|
-
i.current,
|
|
13
|
-
c.current,
|
|
14
|
-
s.current,
|
|
15
|
-
P,
|
|
16
|
-
L,
|
|
17
|
-
$,
|
|
18
|
-
C,
|
|
19
|
-
B,
|
|
20
|
-
v,
|
|
21
|
-
y,
|
|
22
|
-
b,
|
|
23
|
-
T,
|
|
24
|
-
w
|
|
25
|
-
], N = U(e == null ? void 0 : e.scale);
|
|
26
|
-
K(() => {
|
|
27
|
-
v && (N.current = e == null ? void 0 : e.scale);
|
|
28
|
-
}, [
|
|
29
|
-
v
|
|
30
|
-
]);
|
|
31
|
-
let a = j(() => {
|
|
32
|
-
if (S === !1 || !v || !i.current || !c.current || !$ || (e == null ? void 0 : e.scale) !== N.current) return;
|
|
33
|
-
let o = null;
|
|
34
|
-
if (s.current && s.current.contains(document.activeElement)) {
|
|
35
|
-
var d;
|
|
36
|
-
let r = (d = document.activeElement) === null || d === void 0 ? void 0 : d.getBoundingClientRect(), g = s.current.getBoundingClientRect();
|
|
37
|
-
var u;
|
|
38
|
-
if (o = {
|
|
39
|
-
type: "top",
|
|
40
|
-
offset: ((u = r == null ? void 0 : r.top) !== null && u !== void 0 ? u : 0) - g.top
|
|
41
|
-
}, o.offset > g.height / 2) {
|
|
42
|
-
o.type = "bottom";
|
|
43
|
-
var R;
|
|
44
|
-
o.offset = ((R = r == null ? void 0 : r.bottom) !== null && R !== void 0 ? R : 0) - g.bottom;
|
|
45
|
-
}
|
|
1
|
+
import { useEffectEvent as u } from "./index326.mjs";
|
|
2
|
+
import { useLayoutEffect as l } from "./index172.mjs";
|
|
3
|
+
import { useState as o, useRef as s } from "react";
|
|
4
|
+
function p(a) {
|
|
5
|
+
let [f, c] = o(a), e = s(null), r = u(() => {
|
|
6
|
+
if (!e.current) return;
|
|
7
|
+
let t = e.current.next();
|
|
8
|
+
if (t.done) {
|
|
9
|
+
e.current = null;
|
|
10
|
+
return;
|
|
46
11
|
}
|
|
47
|
-
|
|
48
|
-
if (!b && i.current) {
|
|
49
|
-
var O;
|
|
50
|
-
l.style.top = "0px", l.style.bottom = "";
|
|
51
|
-
var E;
|
|
52
|
-
l.style.maxHeight = ((E = (O = window.visualViewport) === null || O === void 0 ? void 0 : O.height) !== null && E !== void 0 ? E : window.innerHeight) + "px";
|
|
53
|
-
}
|
|
54
|
-
let f = D({
|
|
55
|
-
placement: W(H, y),
|
|
56
|
-
overlayNode: i.current,
|
|
57
|
-
targetNode: c.current,
|
|
58
|
-
scrollNode: s.current || i.current,
|
|
59
|
-
padding: P,
|
|
60
|
-
shouldFlip: L,
|
|
61
|
-
boundaryElement: $,
|
|
62
|
-
offset: C,
|
|
63
|
-
crossOffset: B,
|
|
64
|
-
maxHeight: b,
|
|
65
|
-
arrowSize: w,
|
|
66
|
-
arrowBoundaryOffset: T
|
|
67
|
-
});
|
|
68
|
-
if (f.position) {
|
|
69
|
-
if (l.style.top = "", l.style.bottom = "", l.style.left = "", l.style.right = "", Object.keys(f.position).forEach((r) => l.style[r] = f.position[r] + "px"), l.style.maxHeight = f.maxHeight != null ? f.maxHeight + "px" : "", o && document.activeElement && s.current) {
|
|
70
|
-
let r = document.activeElement.getBoundingClientRect(), g = s.current.getBoundingClientRect(), A = r[o.type] - g[o.type];
|
|
71
|
-
s.current.scrollTop += A - o.offset;
|
|
72
|
-
}
|
|
73
|
-
I(f);
|
|
74
|
-
}
|
|
75
|
-
}, F);
|
|
76
|
-
z(a, F), Q(a), k({
|
|
77
|
-
ref: i,
|
|
78
|
-
onResize: a
|
|
79
|
-
}), k({
|
|
80
|
-
ref: c,
|
|
81
|
-
onResize: a
|
|
12
|
+
f === t.value ? r() : c(t.value);
|
|
82
13
|
});
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
let o, d = () => {
|
|
86
|
-
m.current = !0, clearTimeout(o), o = setTimeout(() => {
|
|
87
|
-
m.current = !1;
|
|
88
|
-
}, 500), a();
|
|
89
|
-
}, u = () => {
|
|
90
|
-
m.current && d();
|
|
91
|
-
};
|
|
92
|
-
return e == null || e.addEventListener("resize", d), e == null || e.addEventListener("scroll", u), () => {
|
|
93
|
-
e == null || e.removeEventListener("resize", d), e == null || e.removeEventListener("scroll", u);
|
|
94
|
-
};
|
|
95
|
-
}, [
|
|
96
|
-
a
|
|
97
|
-
]);
|
|
98
|
-
let q = j(() => {
|
|
99
|
-
m.current || p == null || p();
|
|
100
|
-
}, [
|
|
101
|
-
p,
|
|
102
|
-
m
|
|
103
|
-
]);
|
|
104
|
-
G({
|
|
105
|
-
triggerRef: c,
|
|
106
|
-
isOpen: v,
|
|
107
|
-
onClose: p && q
|
|
14
|
+
l(() => {
|
|
15
|
+
e.current && r();
|
|
108
16
|
});
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
zIndex: 1e5,
|
|
115
|
-
...t == null ? void 0 : t.position,
|
|
116
|
-
maxHeight: (h = t == null ? void 0 : t.maxHeight) !== null && h !== void 0 ? h : "100vh"
|
|
117
|
-
}
|
|
118
|
-
},
|
|
119
|
-
placement: (x = t == null ? void 0 : t.placement) !== null && x !== void 0 ? x : null,
|
|
120
|
-
arrowProps: {
|
|
121
|
-
"aria-hidden": "true",
|
|
122
|
-
role: "presentation",
|
|
123
|
-
style: {
|
|
124
|
-
left: t == null ? void 0 : t.arrowOffsetLeft,
|
|
125
|
-
top: t == null ? void 0 : t.arrowOffsetTop
|
|
126
|
-
}
|
|
127
|
-
},
|
|
128
|
-
updatePosition: a
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
|
-
function Q(n) {
|
|
132
|
-
z(() => (window.addEventListener("resize", n, !1), () => {
|
|
133
|
-
window.removeEventListener("resize", n, !1);
|
|
134
|
-
}), [
|
|
17
|
+
let n = u((t) => {
|
|
18
|
+
e.current = t(f), r();
|
|
19
|
+
});
|
|
20
|
+
return [
|
|
21
|
+
f,
|
|
135
22
|
n
|
|
136
|
-
]
|
|
137
|
-
}
|
|
138
|
-
function W(n, y) {
|
|
139
|
-
return y === "rtl" ? n.replace("start", "right").replace("end", "left") : n.replace("start", "left").replace("end", "right");
|
|
23
|
+
];
|
|
140
24
|
}
|
|
141
25
|
export {
|
|
142
|
-
|
|
26
|
+
p as useValueEffect
|
|
143
27
|
};
|
package/index315.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),u={prefix:String(Math.round(Math.random()*1e10)),current:0},d=e.createContext(u),l=e.createContext(!1);let f=!!(typeof window<"u"&&window.document&&window.document.createElement),s=new WeakMap;function v(r=!1){let t=e.useContext(d),n=e.useRef(null);if(n.current===null&&!r){var a,c;let o=(c=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||c===void 0||(a=c.ReactCurrentOwner)===null||a===void 0?void 0:a.current;if(o){let i=s.get(o);i==null?s.set(o,{id:t.current,state:o.memoizedState}):o.memoizedState!==i.state&&(t.current=i.id,s.delete(o))}n.current=++t.current}return n.current}function S(r){let t=e.useContext(d);t===u&&!f&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let n=v(!!r),a=t===u&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${t.prefix}`;return r||`${a}-${n}`}function p(r){let t=e.useId(),[n]=e.useState($()),a=n||process.env.NODE_ENV==="test"?"react-aria":`react-aria${u.prefix}`;return r||`${a}-${t}`}const b=typeof e.useId=="function"?p:S;function x(){return!1}function m(){return!0}function g(r){return()=>{}}function $(){return typeof e.useSyncExternalStore=="function"?e.useSyncExternalStore(g,x,m):e.useContext(l)}exports.useIsSSR=$;exports.useSSRSafeId=b;
|