This commit is contained in:
1
node_modules/@headlessui/react/dist/utils/active-element-history.d.ts
generated
vendored
Normal file
1
node_modules/@headlessui/react/dist/utils/active-element-history.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare let history: (HTMLOrSVGElement & Element)[];
|
||||
1
node_modules/@headlessui/react/dist/utils/active-element-history.js
generated
vendored
Normal file
1
node_modules/@headlessui/react/dist/utils/active-element-history.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
import{onDocumentReady as d}from'./document-ready.js';import*as u from'./dom.js';import{focusableSelector as i}from'./focus-management.js';let n=[];d(()=>{function e(t){if(!u.isHTMLorSVGElement(t.target)||t.target===document.body||n[0]===t.target)return;let r=t.target;r=r.closest(i),n.unshift(r!=null?r:t.target),n=n.filter(o=>o!=null&&o.isConnected),n.splice(10)}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});export{n as history};
|
||||
1
node_modules/@headlessui/react/dist/utils/bugs.d.ts
generated
vendored
Normal file
1
node_modules/@headlessui/react/dist/utils/bugs.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare function isDisabledReactIssue7711(element: Element): boolean;
|
||||
1
node_modules/@headlessui/react/dist/utils/bugs.js
generated
vendored
Normal file
1
node_modules/@headlessui/react/dist/utils/bugs.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
import*as n from'./dom.js';function s(l){let e=l.parentElement,t=null;for(;e&&!n.isHTMLFieldSetElement(e);)n.isHTMLLegendElement(e)&&(t=e),e=e.parentElement;let i=(e==null?void 0:e.getAttribute("disabled"))==="";return i&&r(t)?!1:i}function r(l){if(!l)return!1;let e=l.previousElementSibling;for(;e!==null;){if(n.isHTMLLegendElement(e))return!1;e=e.previousElementSibling}return!0}export{s as isDisabledReactIssue7711};
|
||||
25
node_modules/@headlessui/react/dist/utils/calculate-active-index.d.ts
generated
vendored
Normal file
25
node_modules/@headlessui/react/dist/utils/calculate-active-index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
export declare enum Focus {
|
||||
/** Focus the first non-disabled item. */
|
||||
First = 0,
|
||||
/** Focus the previous non-disabled item. */
|
||||
Previous = 1,
|
||||
/** Focus the next non-disabled item. */
|
||||
Next = 2,
|
||||
/** Focus the last non-disabled item. */
|
||||
Last = 3,
|
||||
/** Focus a specific item based on the `id` of the item. */
|
||||
Specific = 4,
|
||||
/** Focus no items at all. */
|
||||
Nothing = 5
|
||||
}
|
||||
export declare function calculateActiveIndex<TItem>(action: {
|
||||
focus: Focus.Specific;
|
||||
id: string;
|
||||
} | {
|
||||
focus: Exclude<Focus, Focus.Specific>;
|
||||
}, resolvers: {
|
||||
resolveItems(): TItem[];
|
||||
resolveActiveIndex(): number | null;
|
||||
resolveId(item: TItem, index: number, items: TItem[]): string;
|
||||
resolveDisabled(item: TItem, index: number, items: TItem[]): boolean;
|
||||
}): number | null;
|
||||
1
node_modules/@headlessui/react/dist/utils/calculate-active-index.js
generated
vendored
Normal file
1
node_modules/@headlessui/react/dist/utils/calculate-active-index.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
function u(l){throw new Error("Unexpected object: "+l)}var c=(i=>(i[i.First=0]="First",i[i.Previous=1]="Previous",i[i.Next=2]="Next",i[i.Last=3]="Last",i[i.Specific=4]="Specific",i[i.Nothing=5]="Nothing",i))(c||{});function f(l,n){let t=n.resolveItems();if(t.length<=0)return null;let r=n.resolveActiveIndex(),s=r!=null?r:-1;switch(l.focus){case 0:{for(let e=0;e<t.length;++e)if(!n.resolveDisabled(t[e],e,t))return e;return r}case 1:{s===-1&&(s=t.length);for(let e=s-1;e>=0;--e)if(!n.resolveDisabled(t[e],e,t))return e;return r}case 2:{for(let e=s+1;e<t.length;++e)if(!n.resolveDisabled(t[e],e,t))return e;return r}case 3:{for(let e=t.length-1;e>=0;--e)if(!n.resolveDisabled(t[e],e,t))return e;return r}case 4:{for(let e=0;e<t.length;++e)if(n.resolveId(t[e],e,t)===l.id)return e;return r}case 5:return null;default:u(l)}}export{c as Focus,f as calculateActiveIndex};
|
||||
1
node_modules/@headlessui/react/dist/utils/class-names.d.ts
generated
vendored
Normal file
1
node_modules/@headlessui/react/dist/utils/class-names.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare function classNames(...classes: (false | null | undefined | string)[]): string;
|
||||
1
node_modules/@headlessui/react/dist/utils/class-names.js
generated
vendored
Normal file
1
node_modules/@headlessui/react/dist/utils/class-names.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
function t(...r){return Array.from(new Set(r.flatMap(n=>typeof n=="string"?n.split(" "):[]))).filter(Boolean).join(" ")}export{t as classNames};
|
||||
5
node_modules/@headlessui/react/dist/utils/default-map.d.ts
generated
vendored
Normal file
5
node_modules/@headlessui/react/dist/utils/default-map.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export declare class DefaultMap<T = string, V = any> extends Map<T, V> {
|
||||
private factory;
|
||||
constructor(factory: (key: T) => V);
|
||||
get(key: T): V;
|
||||
}
|
||||
1
node_modules/@headlessui/react/dist/utils/default-map.js
generated
vendored
Normal file
1
node_modules/@headlessui/react/dist/utils/default-map.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
class a extends Map{constructor(t){super();this.factory=t}get(t){let e=super.get(t);return e===void 0&&(e=this.factory(t),this.set(t,e)),e}}export{a as DefaultMap};
|
||||
24
node_modules/@headlessui/react/dist/utils/disposables.d.ts
generated
vendored
Normal file
24
node_modules/@headlessui/react/dist/utils/disposables.d.ts
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
export type Disposables = ReturnType<typeof disposables>;
|
||||
/**
|
||||
* Disposables are a way to manage event handlers and functions like
|
||||
* `setTimeout` and `requestAnimationFrame` that need to be cleaned up when they
|
||||
* are no longer needed.
|
||||
*
|
||||
*
|
||||
* When you register a disposable function, it is added to a collection of
|
||||
* disposables. Each disposable in the collection provides a `dispose` clean up
|
||||
* function that can be called when it's no longer needed. There is also a
|
||||
* `dispose` function on the collection itself that can be used to clean up all
|
||||
* pending disposables in that collection.
|
||||
*/
|
||||
export declare function disposables(): {
|
||||
addEventListener<TEventName extends keyof WindowEventMap>(element: HTMLElement | Window | Document, name: TEventName, listener: (event: WindowEventMap[TEventName]) => any, options?: boolean | AddEventListenerOptions): () => void;
|
||||
requestAnimationFrame(callback: FrameRequestCallback): () => void;
|
||||
nextFrame(callback: FrameRequestCallback): () => void;
|
||||
setTimeout(callback: (...args: any[]) => void, ms?: number | undefined, ...args: any[]): () => void;
|
||||
microTask(cb: () => void): () => void;
|
||||
style(node: ElementCSSInlineStyle, property: string, value: string): () => void;
|
||||
group(cb: (d: typeof this) => void): () => void;
|
||||
add(cb: () => void): () => void;
|
||||
dispose(): void;
|
||||
};
|
||||
1
node_modules/@headlessui/react/dist/utils/disposables.js
generated
vendored
Normal file
1
node_modules/@headlessui/react/dist/utils/disposables.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
import{microTask as a}from'./micro-task.js';function o(){let s=[],r={addEventListener(e,t,n,i){return e.addEventListener(t,n,i),r.add(()=>e.removeEventListener(t,n,i))},requestAnimationFrame(...e){let t=requestAnimationFrame(...e);return r.add(()=>cancelAnimationFrame(t))},nextFrame(...e){return r.requestAnimationFrame(()=>r.requestAnimationFrame(...e))},setTimeout(...e){let t=setTimeout(...e);return r.add(()=>clearTimeout(t))},microTask(...e){let t={current:!0};return a(()=>{t.current&&e[0]()}),r.add(()=>{t.current=!1})},style(e,t,n){let i=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:n}),this.add(()=>{Object.assign(e.style,{[t]:i})})},group(e){let t=o();return e(t),this.add(()=>t.dispose())},add(e){return s.includes(e)||s.push(e),()=>{let t=s.indexOf(e);if(t>=0)for(let n of s.splice(t,1))n()}},dispose(){for(let e of s.splice(0))e()}};return r}export{o as disposables};
|
||||
1
node_modules/@headlessui/react/dist/utils/document-ready.d.ts
generated
vendored
Normal file
1
node_modules/@headlessui/react/dist/utils/document-ready.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare function onDocumentReady(cb: () => void): void;
|
||||
1
node_modules/@headlessui/react/dist/utils/document-ready.js
generated
vendored
Normal file
1
node_modules/@headlessui/react/dist/utils/document-ready.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
function t(n){function e(){document.readyState!=="loading"&&(n(),document.removeEventListener("DOMContentLoaded",e))}typeof window!="undefined"&&typeof document!="undefined"&&(document.addEventListener("DOMContentLoaded",e),e())}export{t as onDocumentReady};
|
||||
12
node_modules/@headlessui/react/dist/utils/dom.d.ts
generated
vendored
Normal file
12
node_modules/@headlessui/react/dist/utils/dom.d.ts
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
export declare function isNode(element: unknown): element is Node;
|
||||
export declare function isElement(element: unknown): element is Element;
|
||||
export declare function isHTMLElement(element: unknown): element is HTMLElement;
|
||||
export declare function isHTMLorSVGElement(element: unknown): element is HTMLOrSVGElement & Element;
|
||||
export declare function hasInlineStyle(element: unknown): element is ElementCSSInlineStyle;
|
||||
export declare function isHTMLIframeElement(element: unknown): element is HTMLIFrameElement;
|
||||
export declare function isHTMLInputElement(element: unknown): element is HTMLInputElement;
|
||||
export declare function isHTMLTextAreaElement(element: unknown): element is HTMLTextAreaElement;
|
||||
export declare function isHTMLLabelElement(element: unknown): element is HTMLLabelElement;
|
||||
export declare function isHTMLFieldSetElement(element: unknown): element is HTMLFieldSetElement;
|
||||
export declare function isHTMLLegendElement(element: unknown): element is HTMLLegendElement;
|
||||
export declare function isInteractiveElement(element: unknown): element is Element;
|
||||
1
node_modules/@headlessui/react/dist/utils/dom.js
generated
vendored
Normal file
1
node_modules/@headlessui/react/dist/utils/dom.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
function o(e){return typeof e!="object"||e===null?!1:"nodeType"in e}function t(e){return o(e)&&"tagName"in e}function n(e){return t(e)&&"accessKey"in e}function i(e){return t(e)&&"tabIndex"in e}function r(e){return t(e)&&"style"in e}function u(e){return n(e)&&e.nodeName==="IFRAME"}function l(e){return n(e)&&e.nodeName==="INPUT"}function s(e){return n(e)&&e.nodeName==="TEXTAREA"}function m(e){return n(e)&&e.nodeName==="LABEL"}function a(e){return n(e)&&e.nodeName==="FIELDSET"}function E(e){return n(e)&&e.nodeName==="LEGEND"}function L(e){return t(e)?e.matches('a[href],audio[controls],button,details,embed,iframe,img[usemap],input:not([type="hidden"]),label,select,textarea,video[controls]'):!1}export{r as hasInlineStyle,t as isElement,n as isHTMLElement,a as isHTMLFieldSetElement,u as isHTMLIframeElement,l as isHTMLInputElement,m as isHTMLLabelElement,E as isHTMLLegendElement,s as isHTMLTextAreaElement,i as isHTMLorSVGElement,L as isInteractiveElement,o as isNode};
|
||||
17
node_modules/@headlessui/react/dist/utils/env.d.ts
generated
vendored
Normal file
17
node_modules/@headlessui/react/dist/utils/env.d.ts
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
type RenderEnv = 'client' | 'server';
|
||||
type HandoffState = 'pending' | 'complete';
|
||||
declare class Env {
|
||||
current: RenderEnv;
|
||||
handoffState: HandoffState;
|
||||
currentId: number;
|
||||
set(env: RenderEnv): void;
|
||||
reset(): void;
|
||||
nextId(): number;
|
||||
get isServer(): boolean;
|
||||
get isClient(): boolean;
|
||||
private detect;
|
||||
handoff(): void;
|
||||
get isHandoffComplete(): boolean;
|
||||
}
|
||||
export declare let env: Env;
|
||||
export {};
|
||||
1
node_modules/@headlessui/react/dist/utils/env.js
generated
vendored
Normal file
1
node_modules/@headlessui/react/dist/utils/env.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
var i=Object.defineProperty;var d=(t,e,n)=>e in t?i(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var r=(t,e,n)=>(d(t,typeof e!="symbol"?e+"":e,n),n);class o{constructor(){r(this,"current",this.detect());r(this,"handoffState","pending");r(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window=="undefined"||typeof document=="undefined"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}}let s=new o;export{s as env};
|
||||
46
node_modules/@headlessui/react/dist/utils/focus-management.d.ts
generated
vendored
Normal file
46
node_modules/@headlessui/react/dist/utils/focus-management.d.ts
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
import type { MutableRefObject } from 'react';
|
||||
export declare let focusableSelector: string;
|
||||
export declare enum Focus {
|
||||
/** Focus the first non-disabled element */
|
||||
First = 1,
|
||||
/** Focus the previous non-disabled element */
|
||||
Previous = 2,
|
||||
/** Focus the next non-disabled element */
|
||||
Next = 4,
|
||||
/** Focus the last non-disabled element */
|
||||
Last = 8,
|
||||
/** Wrap tab around */
|
||||
WrapAround = 16,
|
||||
/** Prevent scrolling the focusable elements into view */
|
||||
NoScroll = 32,
|
||||
/** Focus the first focusable element with the `data-autofocus` attribute. */
|
||||
AutoFocus = 64
|
||||
}
|
||||
export declare enum FocusResult {
|
||||
/** Something went wrong while trying to focus. */
|
||||
Error = 0,
|
||||
/** When `Focus.WrapAround` is enabled, going from position `N` to `N+1` where `N` is the last index in the array, then we overflow. */
|
||||
Overflow = 1,
|
||||
/** Focus was successful. */
|
||||
Success = 2,
|
||||
/** When `Focus.WrapAround` is enabled, going from position `N` to `N-1` where `N` is the first index in the array, then we underflow. */
|
||||
Underflow = 3
|
||||
}
|
||||
export declare function getFocusableElements(container?: HTMLElement | null): HTMLElement[];
|
||||
export declare function getAutoFocusableElements(container?: HTMLElement | null): HTMLElement[];
|
||||
export declare enum FocusableMode {
|
||||
/** The element itself must be focusable. */
|
||||
Strict = 0,
|
||||
/** The element should be inside of a focusable element. */
|
||||
Loose = 1
|
||||
}
|
||||
export declare function isFocusableElement(element: HTMLOrSVGElement & Element, mode?: FocusableMode): boolean;
|
||||
export declare function restoreFocusIfNecessary(element: HTMLElement | null): void;
|
||||
export declare function focusElement(element: HTMLOrSVGElement | null): void;
|
||||
export declare function sortByDomNode<T>(nodes: T[], resolveKey?: (item: T) => HTMLElement | null): T[];
|
||||
export declare function focusFrom(current: HTMLElement | null, focus: Focus): FocusResult;
|
||||
export declare function focusIn(container: HTMLElement | HTMLElement[], focus: Focus, { sorted, relativeTo, skipElements, }?: Partial<{
|
||||
sorted: boolean;
|
||||
relativeTo: HTMLElement | null;
|
||||
skipElements: (HTMLElement | MutableRefObject<HTMLElement | null>)[];
|
||||
}>): FocusResult;
|
||||
1
node_modules/@headlessui/react/dist/utils/focus-management.js
generated
vendored
Normal file
1
node_modules/@headlessui/react/dist/utils/focus-management.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
import{disposables as N}from'./disposables.js';import*as p from'./dom.js';import{match as L}from'./match.js';import{getOwnerDocument as E}from'./owner.js';let f=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(","),F=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var T=(n=>(n[n.First=1]="First",n[n.Previous=2]="Previous",n[n.Next=4]="Next",n[n.Last=8]="Last",n[n.WrapAround=16]="WrapAround",n[n.NoScroll=32]="NoScroll",n[n.AutoFocus=64]="AutoFocus",n))(T||{}),y=(o=>(o[o.Error=0]="Error",o[o.Overflow=1]="Overflow",o[o.Success=2]="Success",o[o.Underflow=3]="Underflow",o))(y||{}),S=(t=>(t[t.Previous=-1]="Previous",t[t.Next=1]="Next",t))(S||{});function b(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(f)).sort((r,t)=>Math.sign((r.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}function O(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(F)).sort((r,t)=>Math.sign((r.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}var h=(t=>(t[t.Strict=0]="Strict",t[t.Loose=1]="Loose",t))(h||{});function A(e,r=0){var t;return e===((t=E(e))==null?void 0:t.body)?!1:L(r,{[0](){return e.matches(f)},[1](){let l=e;for(;l!==null;){if(l.matches(f))return!0;l=l.parentElement}return!1}})}function V(e){let r=E(e);N().nextFrame(()=>{r&&p.isHTMLorSVGElement(r.activeElement)&&!A(r.activeElement,0)&&I(e)})}var H=(t=>(t[t.Keyboard=0]="Keyboard",t[t.Mouse=1]="Mouse",t))(H||{});typeof window!="undefined"&&typeof document!="undefined"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function I(e){e==null||e.focus({preventScroll:!0})}let w=["textarea","input"].join(",");function _(e){var r,t;return(t=(r=e==null?void 0:e.matches)==null?void 0:r.call(e,w))!=null?t:!1}function P(e,r=t=>t){return e.slice().sort((t,l)=>{let o=r(t),c=r(l);if(o===null||c===null)return 0;let u=o.compareDocumentPosition(c);return u&Node.DOCUMENT_POSITION_FOLLOWING?-1:u&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function j(e,r){return g(b(),r,{relativeTo:e})}function g(e,r,{sorted:t=!0,relativeTo:l=null,skipElements:o=[]}={}){let c=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,u=Array.isArray(e)?t?P(e):e:r&64?O(e):b(e);o.length>0&&u.length>1&&(u=u.filter(s=>!o.some(a=>a!=null&&"current"in a?(a==null?void 0:a.current)===s:a===s))),l=l!=null?l:c.activeElement;let n=(()=>{if(r&5)return 1;if(r&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),x=(()=>{if(r&1)return 0;if(r&2)return Math.max(0,u.indexOf(l))-1;if(r&4)return Math.max(0,u.indexOf(l))+1;if(r&8)return u.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),M=r&32?{preventScroll:!0}:{},m=0,d=u.length,i;do{if(m>=d||m+d<=0)return 0;let s=x+m;if(r&16)s=(s+d)%d;else{if(s<0)return 3;if(s>=d)return 1}i=u[s],i==null||i.focus(M),m+=n}while(i!==c.activeElement);return r&6&&_(i)&&i.select(),2}export{T as Focus,y as FocusResult,h as FocusableMode,I as focusElement,j as focusFrom,g as focusIn,f as focusableSelector,O as getAutoFocusableElements,b as getFocusableElements,A as isFocusableElement,V as restoreFocusIfNecessary,P as sortByDomNode};
|
||||
4
node_modules/@headlessui/react/dist/utils/form.d.ts
generated
vendored
Normal file
4
node_modules/@headlessui/react/dist/utils/form.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
type Entries = [string, string][];
|
||||
export declare function objectToFormEntries(source?: Record<string, any>, parentKey?: string | null, entries?: Entries): Entries;
|
||||
export declare function attemptSubmit(elementInForm: HTMLElement): void;
|
||||
export {};
|
||||
1
node_modules/@headlessui/react/dist/utils/form.js
generated
vendored
Normal file
1
node_modules/@headlessui/react/dist/utils/form.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
function e(i={},s=null,t=[]){for(let[r,n]of Object.entries(i))o(t,f(s,r),n);return t}function f(i,s){return i?i+"["+s+"]":s}function o(i,s,t){if(Array.isArray(t))for(let[r,n]of t.entries())o(i,f(s,r.toString()),n);else t instanceof Date?i.push([s,t.toISOString()]):typeof t=="boolean"?i.push([s,t?"1":"0"]):typeof t=="string"?i.push([s,t]):typeof t=="number"?i.push([s,`${t}`]):t==null?i.push([s,""]):e(t,s,i)}function p(i){var t,r;let s=(t=i==null?void 0:i.form)!=null?t:i.closest("form");if(s){for(let n of s.elements)if(n!==i&&(n.tagName==="INPUT"&&n.type==="submit"||n.tagName==="BUTTON"&&n.type==="submit"||n.nodeName==="INPUT"&&n.type==="image")){n.click();return}(r=s.requestSubmit)==null||r.call(s)}}export{p as attemptSubmit,e as objectToFormEntries};
|
||||
1
node_modules/@headlessui/react/dist/utils/get-text-value.d.ts
generated
vendored
Normal file
1
node_modules/@headlessui/react/dist/utils/get-text-value.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare function getTextValue(element: HTMLElement): string;
|
||||
1
node_modules/@headlessui/react/dist/utils/get-text-value.js
generated
vendored
Normal file
1
node_modules/@headlessui/react/dist/utils/get-text-value.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
import*as g from'./dom.js';let a=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function o(e){var l,n;let i=(l=e.innerText)!=null?l:"",t=e.cloneNode(!0);if(!g.isHTMLElement(t))return i;let u=!1;for(let f of t.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))f.remove(),u=!0;let r=u?(n=t.innerText)!=null?n:"":i;return a.test(r)&&(r=r.replace(a,"")),r}function F(e){let i=e.getAttribute("aria-label");if(typeof i=="string")return i.trim();let t=e.getAttribute("aria-labelledby");if(t){let u=t.split(" ").map(r=>{let l=document.getElementById(r);if(l){let n=l.getAttribute("aria-label");return typeof n=="string"?n.trim():o(l).trim()}return null}).filter(Boolean);if(u.length>0)return u.join(", ")}return o(e).trim()}export{F as getTextValue};
|
||||
1
node_modules/@headlessui/react/dist/utils/match.d.ts
generated
vendored
Normal file
1
node_modules/@headlessui/react/dist/utils/match.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare function match<TValue extends string | number = string, TReturnValue = unknown>(value: TValue, lookup: Record<TValue, TReturnValue | ((...args: any[]) => TReturnValue)>, ...args: any[]): TReturnValue;
|
||||
1
node_modules/@headlessui/react/dist/utils/match.js
generated
vendored
Normal file
1
node_modules/@headlessui/react/dist/utils/match.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
function u(r,n,...a){if(r in n){let e=n[r];return typeof e=="function"?e(...a):e}let t=new Error(`Tried to handle "${r}" but there is no handler defined. Only defined handlers are: ${Object.keys(n).map(e=>`"${e}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,u),t}export{u as match};
|
||||
1
node_modules/@headlessui/react/dist/utils/micro-task.d.ts
generated
vendored
Normal file
1
node_modules/@headlessui/react/dist/utils/micro-task.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare function microTask(cb: () => void): void;
|
||||
1
node_modules/@headlessui/react/dist/utils/micro-task.js
generated
vendored
Normal file
1
node_modules/@headlessui/react/dist/utils/micro-task.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
function t(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(o=>setTimeout(()=>{throw o}))}export{t as microTask};
|
||||
1
node_modules/@headlessui/react/dist/utils/once.d.ts
generated
vendored
Normal file
1
node_modules/@headlessui/react/dist/utils/once.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare function once<T>(cb: (...args: T[]) => void): (...args: T[]) => void;
|
||||
1
node_modules/@headlessui/react/dist/utils/once.js
generated
vendored
Normal file
1
node_modules/@headlessui/react/dist/utils/once.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
function l(r){let e={called:!1};return(...t)=>{if(!e.called)return e.called=!0,r(...t)}}export{l as once};
|
||||
2
node_modules/@headlessui/react/dist/utils/owner.d.ts
generated
vendored
Normal file
2
node_modules/@headlessui/react/dist/utils/owner.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import type { MutableRefObject } from 'react';
|
||||
export declare function getOwnerDocument<T extends Element | MutableRefObject<Element | null>>(element: T | null | undefined): Document | null;
|
||||
1
node_modules/@headlessui/react/dist/utils/owner.js
generated
vendored
Normal file
1
node_modules/@headlessui/react/dist/utils/owner.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
import{env as t}from'./env.js';function o(n){var e,r;return t.isServer?null:n?"ownerDocument"in n?n.ownerDocument:"current"in n?(r=(e=n.current)==null?void 0:e.ownerDocument)!=null?r:document:null:document}export{o as getOwnerDocument};
|
||||
3
node_modules/@headlessui/react/dist/utils/platform.d.ts
generated
vendored
Normal file
3
node_modules/@headlessui/react/dist/utils/platform.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export declare function isIOS(): boolean;
|
||||
export declare function isAndroid(): boolean;
|
||||
export declare function isMobile(): boolean;
|
||||
1
node_modules/@headlessui/react/dist/utils/platform.js
generated
vendored
Normal file
1
node_modules/@headlessui/react/dist/utils/platform.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
function t(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function i(){return/Android/gi.test(window.navigator.userAgent)}function n(){return t()||i()}export{i as isAndroid,t as isIOS,n as isMobile};
|
||||
79
node_modules/@headlessui/react/dist/utils/render.d.ts
generated
vendored
Normal file
79
node_modules/@headlessui/react/dist/utils/render.d.ts
generated
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
import React, { type ElementType, type Ref } from 'react';
|
||||
import type { Expand, Props } from '../types.js';
|
||||
export declare enum RenderFeatures {
|
||||
/** No features at all */
|
||||
None = 0,
|
||||
/**
|
||||
* When used, this will allow us to use one of the render strategies.
|
||||
*
|
||||
* **The render strategies are:**
|
||||
* - **Unmount** _(Will unmount the component.)_
|
||||
* - **Hidden** _(Will hide the component using the [hidden] attribute.)_
|
||||
*/
|
||||
RenderStrategy = 1,
|
||||
/**
|
||||
* When used, this will allow the user of our component to be in control. This can be used when
|
||||
* you want to transition based on some state.
|
||||
*/
|
||||
Static = 2
|
||||
}
|
||||
export declare enum RenderStrategy {
|
||||
Unmount = 0,
|
||||
Hidden = 1
|
||||
}
|
||||
type UnionToIntersection<T> = (T extends any ? (x: T) => any : never) extends (x: infer R) => any ? R : never;
|
||||
type PropsForFeature<TPassedInFeatures extends RenderFeatures, TForFeature extends RenderFeatures, TProps> = TPassedInFeatures extends TForFeature ? TProps : {};
|
||||
export type PropsForFeatures<T extends RenderFeatures> = Expand<UnionToIntersection<PropsForFeature<T, RenderFeatures.Static, {
|
||||
static?: boolean;
|
||||
}> | PropsForFeature<T, RenderFeatures.RenderStrategy, {
|
||||
unmount?: boolean;
|
||||
}>>>;
|
||||
export declare function useRender(): typeof render;
|
||||
declare function render<TFeature extends RenderFeatures, TTag extends ElementType, TSlot>({ ourProps, theirProps, slot, defaultTag, features, visible, name, mergeRefs, }: {
|
||||
ourProps: Expand<Props<TTag, TSlot, any> & PropsForFeatures<TFeature>> & {
|
||||
ref?: Ref<HTMLElement | ElementType>;
|
||||
};
|
||||
theirProps: Expand<Props<TTag, TSlot, any>>;
|
||||
slot?: TSlot;
|
||||
defaultTag: ElementType;
|
||||
features?: TFeature;
|
||||
visible?: boolean;
|
||||
name: string;
|
||||
mergeRefs?: ReturnType<typeof useMergeRefsFn>;
|
||||
}): ReturnType<typeof _render> | null;
|
||||
declare function _render<TTag extends ElementType, TSlot>(props: Props<TTag, TSlot> & {
|
||||
ref?: unknown;
|
||||
}, slot: TSlot | undefined, tag: ElementType, name: string, mergeRefs: ReturnType<typeof useMergeRefsFn>): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
||||
/**
|
||||
* This is a singleton hook. **You can ONLY call the returned
|
||||
* function *once* to produce expected results.** If you need
|
||||
* to call `mergeRefs()` multiple times you need to create a
|
||||
* separate function for each invocation. This happens as we
|
||||
* store the list of `refs` to update and always return the
|
||||
* same function that refers to that list of refs.
|
||||
*
|
||||
* You shouldn't normally read refs during render but this
|
||||
* should actually be okay because React itself is calling
|
||||
* the `function` that updates these refs and can only do
|
||||
* so once the ref that contains the list is updated.
|
||||
*/
|
||||
declare function useMergeRefsFn(): (...refs: any[]) => ((value: any) => void) | undefined;
|
||||
export type HasDisplayName = {
|
||||
displayName: string;
|
||||
};
|
||||
export type RefProp<T extends Function> = T extends (props: any, ref: Ref<infer RefType>) => any ? {
|
||||
ref?: Ref<RefType>;
|
||||
} : never;
|
||||
export declare function mergeProps<T extends Props<any, any>[]>(...listOfProps: T): Props<any, any>;
|
||||
/**
|
||||
* This is a hack, but basically we want to keep the full 'API' of the component, but we do want to
|
||||
* wrap it in a forwardRef so that we _can_ passthrough the ref
|
||||
*/
|
||||
export declare function forwardRefWithAs<T extends {
|
||||
name: string;
|
||||
displayName?: string;
|
||||
}>(component: T): T & {
|
||||
displayName: string;
|
||||
};
|
||||
export declare function compact<T extends Record<any, any>>(object: T): {} & T;
|
||||
export {};
|
||||
4
node_modules/@headlessui/react/dist/utils/render.js
generated
vendored
Normal file
4
node_modules/@headlessui/react/dist/utils/render.js
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import E,{Fragment as b,cloneElement as j,createElement as v,forwardRef as S,isValidElement as w,useCallback as x,useRef as k}from"react";import{classNames as N}from'./class-names.js';import{match as M}from'./match.js';var O=(a=>(a[a.None=0]="None",a[a.RenderStrategy=1]="RenderStrategy",a[a.Static=2]="Static",a))(O||{}),A=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(A||{});function L(){let n=U();return x(r=>C({mergeRefs:n,...r}),[n])}function C({ourProps:n,theirProps:r,slot:e,defaultTag:a,features:s,visible:t=!0,name:l,mergeRefs:i}){i=i!=null?i:$;let o=P(r,n);if(t)return F(o,e,a,l,i);let y=s!=null?s:0;if(y&2){let{static:f=!1,...u}=o;if(f)return F(u,e,a,l,i)}if(y&1){let{unmount:f=!0,...u}=o;return M(f?0:1,{[0](){return null},[1](){return F({...u,hidden:!0,style:{display:"none"}},e,a,l,i)}})}return F(o,e,a,l,i)}function F(n,r={},e,a,s){let{as:t=e,children:l,refName:i="ref",...o}=h(n,["unmount","static"]),y=n.ref!==void 0?{[i]:n.ref}:{},f=typeof l=="function"?l(r):l;"className"in o&&o.className&&typeof o.className=="function"&&(o.className=o.className(r)),o["aria-labelledby"]&&o["aria-labelledby"]===o.id&&(o["aria-labelledby"]=void 0);let u={};if(r){let d=!1,p=[];for(let[c,T]of Object.entries(r))typeof T=="boolean"&&(d=!0),T===!0&&p.push(c.replace(/([A-Z])/g,g=>`-${g.toLowerCase()}`));if(d){u["data-headlessui-state"]=p.join(" ");for(let c of p)u[`data-${c}`]=""}}if(t===b&&(Object.keys(m(o)).length>0||Object.keys(m(u)).length>0))if(!w(f)||Array.isArray(f)&&f.length>1){if(Object.keys(m(o)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${a} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(m(o)).concat(Object.keys(m(u))).map(d=>` - ${d}`).join(`
|
||||
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(d=>` - ${d}`).join(`
|
||||
`)].join(`
|
||||
`))}else{let d=f.props,p=d==null?void 0:d.className,c=typeof p=="function"?(...R)=>N(p(...R),o.className):N(p,o.className),T=c?{className:c}:{},g=P(f.props,m(h(o,["ref"])));for(let R in u)R in g&&delete u[R];return j(f,Object.assign({},g,u,y,{ref:s(H(f),y.ref)},T))}return v(t,Object.assign({},h(o,["ref"]),t!==b&&y,t!==b&&u),f)}function U(){let n=k([]),r=x(e=>{for(let a of n.current)a!=null&&(typeof a=="function"?a(e):a.current=e)},[]);return(...e)=>{if(!e.every(a=>a==null))return n.current=e,r}}function $(...n){return n.every(r=>r==null)?void 0:r=>{for(let e of n)e!=null&&(typeof e=="function"?e(r):e.current=r)}}function P(...n){var a;if(n.length===0)return{};if(n.length===1)return n[0];let r={},e={};for(let s of n)for(let t in s)t.startsWith("on")&&typeof s[t]=="function"?((a=e[t])!=null||(e[t]=[]),e[t].push(s[t])):r[t]=s[t];if(r.disabled||r["aria-disabled"])for(let s in e)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(s)&&(e[s]=[t=>{var l;return(l=t==null?void 0:t.preventDefault)==null?void 0:l.call(t)}]);for(let s in e)Object.assign(r,{[s](t,...l){let i=e[s];for(let o of i){if((t instanceof Event||(t==null?void 0:t.nativeEvent)instanceof Event)&&t.defaultPrevented)return;o(t,...l)}}});return r}function _(...n){var a;if(n.length===0)return{};if(n.length===1)return n[0];let r={},e={};for(let s of n)for(let t in s)t.startsWith("on")&&typeof s[t]=="function"?((a=e[t])!=null||(e[t]=[]),e[t].push(s[t])):r[t]=s[t];for(let s in e)Object.assign(r,{[s](...t){let l=e[s];for(let i of l)i==null||i(...t)}});return r}function K(n){var r;return Object.assign(S(n),{displayName:(r=n.displayName)!=null?r:n.name})}function m(n){let r=Object.assign({},n);for(let e in r)r[e]===void 0&&delete r[e];return r}function h(n,r=[]){let e=Object.assign({},n);for(let a of r)a in e&&delete e[a];return e}function H(n){return E.version.split(".")[0]>="19"?n.props.ref:n.ref}export{O as RenderFeatures,A as RenderStrategy,m as compact,K as forwardRefWithAs,_ as mergeProps,L as useRender};
|
||||
5
node_modules/@headlessui/react/dist/utils/stable-collection.d.ts
generated
vendored
Normal file
5
node_modules/@headlessui/react/dist/utils/stable-collection.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import * as React from 'react';
|
||||
export declare function StableCollection({ children }: {
|
||||
children: React.ReactNode | React.ReactNode[];
|
||||
}): React.JSX.Element;
|
||||
export declare function useStableCollectionIndex(group: string): number;
|
||||
1
node_modules/@headlessui/react/dist/utils/stable-collection.js
generated
vendored
Normal file
1
node_modules/@headlessui/react/dist/utils/stable-collection.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
import*as l from"react";const s=l.createContext(null);function a(){return{groups:new Map,get(o,e){var i;let t=this.groups.get(o);t||(t=new Map,this.groups.set(o,t));let n=(i=t.get(e))!=null?i:0;t.set(e,n+1);let r=Array.from(t.keys()).indexOf(e);function u(){let c=t.get(e);c>1?t.set(e,c-1):t.delete(e)}return[r,u]}}}function f({children:o}){let e=l.useRef(a());return l.createElement(s.Provider,{value:e},o)}function C(o){let e=l.useContext(s);if(!e)throw new Error("You must wrap your component in a <StableCollection>");let t=l.useId(),[n,r]=e.current.get(o,t);return l.useEffect(()=>r,[]),n}export{f as StableCollection,C as useStableCollectionIndex};
|
||||
2
node_modules/@headlessui/react/dist/utils/start-transition.d.ts
generated
vendored
Normal file
2
node_modules/@headlessui/react/dist/utils/start-transition.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import React from 'react';
|
||||
export declare let startTransition: typeof React.startTransition;
|
||||
1
node_modules/@headlessui/react/dist/utils/start-transition.js
generated
vendored
Normal file
1
node_modules/@headlessui/react/dist/utils/start-transition.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
var t;import r from"react";let a=(t=r.startTransition)!=null?t:function(i){i()};export{a as startTransition};
|
||||
11
node_modules/@headlessui/react/dist/utils/store.d.ts
generated
vendored
Normal file
11
node_modules/@headlessui/react/dist/utils/store.d.ts
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
type ChangeFn = () => void;
|
||||
type UnsubscribeFn = () => void;
|
||||
type ActionFn<T> = (this: T, ...args: any[]) => T | void;
|
||||
type StoreActions<Key extends string, T> = Record<Key, ActionFn<T>>;
|
||||
export interface Store<T, ActionKey extends string> {
|
||||
getSnapshot(): T;
|
||||
subscribe(onChange: ChangeFn): UnsubscribeFn;
|
||||
dispatch(action: ActionKey, ...args: any[]): void;
|
||||
}
|
||||
export declare function createStore<T, ActionKey extends string>(initial: () => T, actions: StoreActions<ActionKey, T>): Store<T, ActionKey>;
|
||||
export {};
|
||||
1
node_modules/@headlessui/react/dist/utils/store.js
generated
vendored
Normal file
1
node_modules/@headlessui/react/dist/utils/store.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
function a(o,r){let t=o(),n=new Set;return{getSnapshot(){return t},subscribe(e){return n.add(e),()=>n.delete(e)},dispatch(e,...s){let i=r[e].call(t,...s);i&&(t=i,n.forEach(c=>c()))}}}export{a as createStore};
|
||||
Reference in New Issue
Block a user