@santi020k/lumen-react 4.0.0 → 4.3.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/README.md +50 -1
- package/dist/components.d.ts.map +1 -1
- package/dist/components.js +2 -2
- package/dist/floating-panel.d.ts +2 -1
- package/dist/floating-panel.d.ts.map +1 -1
- package/dist/floating-panel.js +1 -1
- package/dist/hooks.d.ts.map +1 -1
- package/dist/hooks.js +1 -1
- package/dist/interval-charts.d.ts.map +1 -1
- package/dist/interval-charts.js +1 -1
- package/dist/motion.d.ts +7 -7
- package/dist/server-components.d.ts +10 -3
- package/dist/server-components.d.ts.map +1 -1
- package/dist/server-components.js +15 -7
- package/package.json +11 -8
- package/styles/critical.css +66 -5
- package/tailwind.css +1 -0
package/dist/floating-panel.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { RefObject } from 'react';
|
|
2
|
+
import { type LumenFloatingPanelPlacement } from '@santi020k/lumen-core';
|
|
2
3
|
export interface FloatingPanelOptions {
|
|
3
4
|
/** Logical alignment follows the trigger's inherited text direction. */
|
|
4
|
-
placement?:
|
|
5
|
+
placement?: LumenFloatingPanelPlacement | undefined;
|
|
5
6
|
offset?: number | undefined;
|
|
6
7
|
collisionPadding?: number | undefined;
|
|
7
8
|
/** Disable placement when an application owns a specialized panel layout. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"floating-panel.d.ts","sourceRoot":"","sources":["../src/floating-panel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtC,MAAM,WAAW,oBAAoB;IACnC,wEAAwE;IACxE,SAAS,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"floating-panel.d.ts","sourceRoot":"","sources":["../src/floating-panel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtC,OAAO,EAA6B,KAAK,2BAA2B,EAAE,MAAM,uBAAuB,CAAA;AAEnG,MAAM,WAAW,oBAAoB;IACnC,wEAAwE;IACxE,SAAS,CAAC,EAAE,2BAA2B,GAAG,SAAS,CAAA;IACnD,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACrC,6EAA6E;IAC7E,WAAW,CAAC,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS,CAAA;CAC9C;AAID,eAAO,MAAM,gBAAgB,GAC3B,MAAM,OAAO,EACb,YAAY,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,EACzC,UAAU,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,EACvC,OAAO,MAAM,IAAI,EACjB,sDAAoF,oBAAoB,KACvG,IAuBF,CAAA"}
|
package/dist/floating-panel.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useEffect,useLayoutEffect,useRef}from"react";
|
|
1
|
+
import{useEffect,useLayoutEffect,useRef}from"react";import{connectLumenFloatingPanel}from"@santi020k/lumen-core";const firstMenuItem='[role="menuitem"]:not(:disabled):not([aria-disabled="true"])',useFloatingPanel=(open,triggerRef,panelRef,close,{placement="bottom-start",offset,collisionPadding,positioning="anchored"})=>{const closeRef=useRef(close);useLayoutEffect(()=>{closeRef.current=close},[close]),useEffect(()=>{const panel=panelRef.current,trigger=triggerRef.current;if(!(!open||positioning==="none"||!panel||!trigger))return connectLumenFloatingPanel(panel,trigger,{collisionPadding,initialFocus:firstMenuItem,offset,onDismiss:()=>{closeRef.current()},placement})},[open,positioning,placement,offset,collisionPadding,triggerRef,panelRef])};export{useFloatingPanel};
|
package/dist/hooks.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../src/hooks.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,aAAa,EAClB,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,kBAyRzB,CAAA;AAuDD,eAAO,MAAM,kBAAkB,GAAI,oBAEhC,sBAA2B,KAAG,yBAyDhC,CAAA;AAOD,eAAO,MAAM,WAAW,GAAI,eAEzB,eAAoB,KAAG,kBAoGzB,CAAA;AAgJD,eAAO,MAAM,SAAS,GAAI,oBAEvB,aAAkB,KAAG,gBAyJvB,CAAA;AAyCD,eAAO,MAAM,YAAY,GAAI,iHAQ1B,gBAAqB,KAAG,mBAmP1B,CAAA;AAGD,eAAO,MAAM,eAAe,GAAI,ybA8B7B,mBAAwB,KAAG,sBAuO7B,CAAA;AAED,eAAO,MAAM,UAAU,GAAI,iDAMxB,cAAmB,KAAG,iBAiExB,CAAA;AAED,eAAO,MAAM,cAAc,GAAI,qBAAsB;;0BA4BtB,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC;;CAiEjE,CAAA"}
|
package/dist/hooks.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{useCallback,useEffect,useId,useMemo,useRef,useState}from"react";import{coerceThemeBuilderExportFormat,composeClassName,createLumenKanbanMoveDetail,createThemeBuilderTokens,exportThemeBuilderValue,getLumenDirectionalKey,getLumenLocalePair,normalizeLumenLocales,scrollLumenTabIntoView}from"@santi020k/lumen-core";import{isLumenDateBoundsValid as isCalendarBoundsValid,parseLumenDate as parseCalendarDate,resolveLumenDateLabels as resolveDateControlLabels,resolveLumenDateLocale as getCalendarLocale}from"@santi020k/lumen-core";import{useDialogLifecycle}from"./dialog-lifecycle.js";import{useFloatingPanel}from"./floating-panel.js";import{isLumenFormControl}from"./form-workflow.js";import{useSelectFormReset}from"./select-form.js";import{useToast}from"./toast-context.js";const setRefValue=(ref,value)=>{typeof ref=="function"?ref(value):ref&&(ref.current=value)};import{useRichTextEditor}from"./rich-text-editor.js";const focusableSelector=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),composeHandlers=(userHandler,lumenHandler)=>event=>{userHandler?.(event),lumenHandler(event)},isElementVisible=element=>{if(typeof element.checkVisibility=="function")return element.checkVisibility({visibilityProperty:!0});const visibility=getComputedStyle(element).visibility;return visibility==="hidden"||visibility==="collapse"?!1:element.offsetParent!==null||element.getClientRects().length>0},getFocusable=root=>root?[...root.querySelectorAll(focusableSelector)].filter(element=>!element.matches(":disabled")&&!element.closest("[hidden], [inert]")&&isElementVisible(element)):[],getLoopedIndex=(key,currentIndex,itemCount,forwardKeys)=>{const lastIndex=itemCount-1;return key==="Home"?0:key==="End"?lastIndex:forwardKeys.includes(key)?(currentIndex+1)%itemCount:(currentIndex-1+itemCount)%itemCount},useSafeId=(prefix,id)=>{const reactId=useId().replaceAll(":","");return id??`${prefix}-${reactId}`},useControllableState=({defaultValue,onChange,value})=>{const[uncontrolledValue,setUncontrolledValue]=useState(defaultValue),pendingValueRef=useRef(defaultValue),currentValue=value??uncontrolledValue,setValue=useCallback(next=>{const previousValue=value===void 0?pendingValueRef.current:currentValue,resolvedValue=typeof next=="function"?next(previousValue):next;value===void 0&&(pendingValueRef.current=resolvedValue,setUncontrolledValue(resolvedValue)),onChange?.(resolvedValue)},[currentValue,onChange,value]),restoreValue=useCallback(next=>{value===void 0&&(pendingValueRef.current=next,setUncontrolledValue(next))},[value]);return[currentValue,setValue,restoreValue]},focusFirstIn=root=>{globalThis.setTimeout(()=>{getFocusable(root)[0]?.focus()})},focusTrigger=trigger=>{trigger?.focus({preventScroll:!0})},clampViewportPosition=(value,size,viewportSize)=>Math.max(8,Math.min(value,viewportSize-size-8)),getContextMenuPosition=(x,y,rect)=>{const width=rect?.width??0,height=rect?.height??0,viewportWidth=typeof window>"u"?x+width+16:window.innerWidth,viewportHeight=typeof window>"u"?y+height+16:window.innerHeight;return{left:clampViewportPosition(x,width,viewportWidth),top:clampViewportPosition(y,height,viewportHeight)}},isDisclosureEditableTarget=(target,panel)=>{const ElementType=panel.ownerDocument.defaultView?.Element;if(!ElementType||!(target instanceof ElementType))return!1;if(target.closest("input, textarea"))return!0;const editable=target.closest("[contenteditable]")?.getAttribute("contenteditable")?.toLowerCase();return editable===""||editable==="true"||editable==="plaintext-only"},useOutsideClose=(open,refs,onClose)=>{useEffect(()=>{const owner=refs.find(ref=>ref.current)?.current?.ownerDocument,NodeType=owner?.defaultView?.Node;if(!open||!owner||!NodeType)return;const pointerDown=event=>{const target=event.target;target instanceof NodeType&&!refs.some(ref=>ref.current?.contains(target))&&onClose()};return owner.addEventListener("pointerdown",pointerDown),()=>{owner.removeEventListener("pointerdown",pointerDown)}},[onClose,open,refs])},useDisclosureController=(options,hasPopup)=>{const rootRef=useRef(null),triggerRef=useRef(null),panelRef=useRef(null),panelId=useSafeId(`ui-${hasPopup}`,options.id),[open,setOpen]=useControllableState({defaultValue:options.defaultOpen??!1,onChange:options.onOpenChange,value:options.open}),close=useCallback(()=>{setOpen(!1)},[setOpen]),toggle=useCallback(()=>{setOpen(current=>!current)},[setOpen]);return useOutsideClose(open,[rootRef,triggerRef,panelRef],close),useFloatingPanel(open,triggerRef,panelRef,close,options),{close,open,panelProps:{"data-state":open?"open":"closed",hidden:!open,id:panelId,onKeyDown:event=>{if(event.defaultPrevented||event.nativeEvent.isComposing)return;if(event.key==="Escape"){event.preventDefault(),close(),focusTrigger(triggerRef.current);return}if(isDisclosureEditableTarget(event.target,event.currentTarget)||!["ArrowDown","ArrowUp","Home","End"].includes(event.key))return;const items=getFocusable(panelRef.current);if(!items.length)return;event.preventDefault();const currentIndex=items.indexOf(document.activeElement);items[getLoopedIndex(getLumenDirectionalKey(event.currentTarget,event.key),Math.max(0,currentIndex),items.length,["ArrowDown"])]?.focus()},ref:panelRef},panelRef,rootProps:{ref:rootRef},rootRef,setOpen,toggle,triggerProps:{"aria-controls":panelId,"aria-expanded":open,"aria-haspopup":hasPopup,"data-ui-trigger":!0,onClick:event=>{event.defaultPrevented||(focusTrigger(triggerRef.current),toggle())},onKeyDown:event=>{if(!(event.defaultPrevented||event.nativeEvent.isComposing)){if(event.key==="Escape"&&open){event.preventDefault(),close();return}event.key!=="ArrowDown"&&event.key!=="Enter"&&event.key!==" "||(event.preventDefault(),setOpen(!0),focusFirstIn(panelRef.current))}},ref:triggerRef,type:"button"},triggerRef}},isDialogBackdropPoint=(dialog,event)=>{if(!dialog||event.target!==dialog)return!1;const bounds=dialog.getBoundingClientRect();return event.clientX<bounds.left||event.clientX>=bounds.right||event.clientY<bounds.top||event.clientY>=bounds.bottom},useDialog=(options={})=>{const dialogRef=useRef(null),triggerRef=useRef(null),outsidePointerRef=useRef(void 0),[open,setOpen]=useControllableState({defaultValue:options.defaultOpen??!1,onChange:options.onOpenChange,value:options.open}),consumeProgrammaticClose=useDialogLifecycle(open,dialogRef,triggerRef),close=useCallback(()=>{setOpen(!1)},[setOpen]),dialogProps={"aria-modal":!0,"data-ui-alert-dialog":options.alert?!0:void 0,"data-ui-bound":!0,"data-ui-dialog":options.alert?void 0:!0,onCancel:event=>{event.target!==dialogRef.current||event.defaultPrevented||(event.preventDefault(),event.stopPropagation(),options.dismissOnEscape!==!1&&close())},onClick:event=>{const startedOutside=outsidePointerRef.current;outsidePointerRef.current=void 0,!(event.defaultPrevented||startedOutside===!1||event.detail===0)&&(options.dismissOnOutsidePress??!options.alert)&&isDialogBackdropPoint(dialogRef.current,event)&&close()},onClose:event=>{event.target!==dialogRef.current||consumeProgrammaticClose()||close()},onPointerDown:event=>{outsidePointerRef.current=isDialogBackdropPoint(dialogRef.current,event)},ref:dialogRef,role:options.alert?"alertdialog":"dialog"};return{close,closeProps:{onClick:close,type:"button"},dialogProps,dialogRef,open,setOpen,triggerProps:{"aria-haspopup":"dialog",onClick:()=>{setOpen(!0)},ref:element=>{triggerRef.current=element},type:"button"},triggerRef}},usePopover=(options={})=>useDisclosureController(options,"menu"),useDropdownMenu=(options={})=>useDisclosureController(options,"menu"),readLanguageStorage=storageKey=>{if(!storageKey)return null;try{return localStorage.getItem(storageKey)}catch{return null}},useLanguageToggle=({defaultValue,locales:localeOptions,onValueChange,storageKey,value:controlledValue}={})=>{const locales=useMemo(()=>normalizeLumenLocales(localeOptions),[localeOptions]),defaultPair=getLumenLocalePair(locales,defaultValue),[internalValue,setInternalValue]=useState(defaultPair.current.value),value=controlledValue??internalValue,pair=getLumenLocalePair(locales,value),initializedRef=useRef(!1);return useEffect(()=>{if(controlledValue===void 0){if(!initializedRef.current){initializedRef.current=!0;const preferredValue=readLanguageStorage(storageKey)??defaultValue??document.documentElement.lang;if(preferredValue&&preferredValue!==value&&locales.some(locale=>locale.value===preferredValue)){setInternalValue(preferredValue);return}}if(document.documentElement.lang=value,storageKey)try{localStorage.setItem(storageKey,value)}catch{}}},[controlledValue,defaultValue,locales,storageKey,value]),{currentLocale:pair.current,nextLocale:pair.next,selectNext:()=>{controlledValue===void 0&&setInternalValue(pair.next.value),onValueChange?.(pair.next.value)},value:pair.current.value}},useContextMenu=({defaultOpen=!1,id,onOpenChange,open:controlledOpen}={})=>{const menuRef=useRef(null),triggerRef=useRef(null),menuId=useSafeId("ui-context-menu",id),[position,setPosition]=useState({left:0,top:0}),[open,setOpen]=useControllableState({defaultValue:defaultOpen,onChange:onOpenChange,value:controlledOpen}),close=useCallback(()=>{setOpen(!1)},[setOpen]);useOutsideClose(open,[triggerRef,menuRef],close);const openAt=useCallback((x,y)=>{const rect=menuRef.current?.getBoundingClientRect();setPosition(getContextMenuPosition(x,y,rect)),setOpen(!0),focusFirstIn(menuRef.current)},[setOpen]),triggerProps={"aria-controls":menuId,"aria-haspopup":"menu","data-ui-context-menu-trigger":menuId,onContextMenu:event=>{event.preventDefault(),openAt(event.clientX,event.clientY)},onKeyDown:event=>{if(event.key!=="ContextMenu"&&!(event.shiftKey&&event.key==="F10"))return;event.preventDefault();const rect=event.currentTarget.getBoundingClientRect();openAt(rect.left+16,rect.top+16)},ref:triggerRef,type:"button"},menuProps={"data-state":open?"open":"closed","data-ui-context-menu":!0,hidden:!open,id:menuId,onClick:event=>{const ElementType=event.currentTarget.ownerDocument.defaultView?.Element;if(!ElementType)return;let item;try{item=ElementType.prototype.closest.call(event.target,'[role="menuitem"]')}catch{return}item&&close()},onKeyDown:event=>{if(event.defaultPrevented||event.nativeEvent.isComposing)return;if(event.key==="Escape"){event.preventDefault(),close(),focusTrigger(triggerRef.current);return}if(!["ArrowDown","ArrowUp","End","Home"].includes(event.key))return;const items=getFocusable(menuRef.current);if(items.length===0)return;event.preventDefault();const activeElement=event.currentTarget.ownerDocument.activeElement,currentIndex=items.findIndex(item=>item===activeElement);items[getLoopedIndex(getLumenDirectionalKey(event.currentTarget,event.key),currentIndex,items.length,["ArrowDown"])]?.focus()},ref:menuRef,role:"menu",style:{left:position.left,position:"fixed",top:position.top,zIndex:60}};return{close,menuProps,menuRef,open,openAt,setOpen,triggerProps,triggerRef}},useTabs=({defaultValue="",id,onValueChange,orientation="horizontal",value}={})=>{const rootRef=useRef(null),tabsId=useSafeId("ui-tabs",id),[selectedValue,setSelectedValue]=useControllableState({defaultValue,onChange:onValueChange,value}),activate=useCallback(nextValue=>{setSelectedValue(nextValue)},[setSelectedValue]),getTriggerProps=useCallback((triggerValue,props={})=>{const selected=selectedValue===triggerValue,triggerId=`${tabsId}-tab-${triggerValue}`,panelId=`${tabsId}-panel-${triggerValue}`;return{...props,"aria-controls":panelId,"aria-selected":selected,id:props.id??triggerId,onClick:composeHandlers(props.onClick,event=>{activate(triggerValue),scrollLumenTabIntoView(event.currentTarget)}),onKeyDown:composeHandlers(props.onKeyDown,event=>{if(!(orientation==="vertical"?["ArrowUp","ArrowDown","Home","End"]:["ArrowLeft","ArrowRight","Home","End"]).includes(event.key))return;const tabs=rootRef.current?[...rootRef.current.querySelectorAll('[role="tab"]')].filter(tab=>tab.closest("[data-ui-tabs]")===rootRef.current&&!tab.matches(':disabled, [aria-disabled="true"]')):[];if(!tabs.length)return;event.preventDefault();const currentIndex=tabs.indexOf(event.currentTarget),nextTab=tabs[getLoopedIndex(event.key,Math.max(0,currentIndex),tabs.length,orientation==="vertical"?["ArrowDown"]:[getLumenDirectionalKey(event.currentTarget,"ArrowRight")])],nextValue=nextTab?.dataset.value;!nextTab||!nextValue||(activate(nextValue),scrollLumenTabIntoView(nextTab),nextTab.focus())}),role:"tab",tabIndex:selected?0:-1,type:props.type??"button","data-value":triggerValue}},[activate,orientation,selectedValue,tabsId]);return{getPanelProps:useCallback((panelValue,props={})=>{const selected=selectedValue===panelValue;return{...props,"aria-labelledby":`${tabsId}-tab-${panelValue}`,hidden:!selected,id:props.id??`${tabsId}-panel-${panelValue}`,role:"tabpanel",tabIndex:props.tabIndex??0}},[selectedValue,tabsId]),getTriggerProps,listProps:{"aria-orientation":orientation,role:"tablist"},rootProps:{"data-ui-tabs":!0,ref:rootRef},rootRef,setValue:setSelectedValue,value:selectedValue}},normalizeOption=option=>typeof option=="string"?{label:option,value:option}:option,isPrintableKey=event=>event.key.length===1&&!event.altKey&&!event.ctrlKey&&!event.metaKey,useSelect=({defaultValue="",disabled=!1,id,name,onValueChange,options=[],placeholder,required=!1,value}={})=>{const rootRef=useRef(null),triggerRef=useRef(null),listRef=useRef(null),typeaheadRef=useRef(""),typeaheadTimerRef=useRef(void 0),selectId=useSafeId("ui-select",id),listId=`${selectId}-listbox`,normalizedOptions=useMemo(()=>options.map(normalizeOption),[options]),[open,setOpen]=useState(!1),[selectedValue,setSelectedValue,restoreSelectedValue]=useControllableState({defaultValue,onChange:onValueChange,value}),selectedOption=normalizedOptions.find(option=>option.value===selectedValue),triggerText=selectedOption?.label??placeholder??"Select an option",hasSelection=!!(selectedOption&&selectedValue!==""),close=useCallback(()=>{setOpen(!1)},[setOpen]),openList=useCallback(()=>{setOpen(!0)},[setOpen]);useSelectFormReset(rootRef,defaultValue,value,restoreSelectedValue,close),useOutsideClose(open,[rootRef,triggerRef,listRef],close),useEffect(()=>()=>{typeaheadTimerRef.current&&clearTimeout(typeaheadTimerRef.current)},[]);const getEnabledItems=useCallback(()=>listRef.current?[...listRef.current.querySelectorAll("[data-ui-select-option]")].filter(item=>!item.hasAttribute("disabled")&&item.getAttribute("aria-disabled")!=="true"):[],[]),focusOption=useCallback((key,currentItem)=>{const items=getEnabledItems();if(!items.length)return;const selectedItem=items.find(item=>item.getAttribute("aria-selected")==="true"),current=currentItem??selectedItem??items[0];if(!current)return;const currentIndex=items.indexOf(current);items[getLoopedIndex(key,Math.max(0,currentIndex),items.length,["ArrowDown"])]?.focus()},[getEnabledItems]),focusTypeaheadOption=useCallback(currentItem=>{const items=getEnabledItems(),typeahead=typeaheadRef.current;if(!items.length||!typeahead)return;const selectedItem=items.find(item=>item.getAttribute("aria-selected")==="true"),current=currentItem??selectedItem??items[0];if(!current)return;const currentIndex=items.indexOf(current),startIndex=Math.max(0,currentIndex+1);[...items.slice(startIndex),...items.slice(0,startIndex)].find(item=>item.textContent.trim().toLowerCase().startsWith(typeahead))?.focus()},[getEnabledItems]),handleTypeahead=useCallback((event,currentItem)=>isPrintableKey(event)?(event.preventDefault(),typeaheadRef.current+=event.key.toLowerCase(),typeaheadTimerRef.current&&clearTimeout(typeaheadTimerRef.current),typeaheadTimerRef.current=setTimeout(()=>{typeaheadRef.current=""},700),openList(),focusTypeaheadOption(currentItem),!0):!1,[focusTypeaheadOption,openList]),selectOption=useCallback(nextValue=>{const option=normalizedOptions.find(item=>item.value===nextValue);if(!option||option.disabled)return;const native=rootRef.current?.querySelector("[data-ui-select-native]");native?(native.value=nextValue,native.dispatchEvent(new Event("change",{bubbles:!0}))):setSelectedValue(nextValue),close(),focusTrigger(triggerRef.current)},[close,normalizedOptions,setSelectedValue]),rootProps={"data-placeholder":hasSelection?"false":"true","data-ui-select":!0,ref:rootRef},controlProps={"data-ui-select-control":!0},nativeSelectProps={"aria-hidden":!0,"data-ui-enhanced":!0,"data-ui-select-native":!0,disabled,id:selectId,name,onChange:event=>{setSelectedValue(event.currentTarget.value)},required,tabIndex:-1,value:selectedValue},triggerProps={"aria-controls":listId,"aria-expanded":open,"aria-haspopup":"listbox","aria-required":required||void 0,"data-ui-select-trigger":!0,disabled,id:`${selectId}-trigger`,onClick:()=>{setOpen(current=>!current)},onKeyDown:event=>{if(event.defaultPrevented||event.nativeEvent.isComposing||handleTypeahead(event))return;if(event.key==="Escape"&&open){event.preventDefault(),close();return}if(["ArrowDown","ArrowUp","Home","End","Enter"," "].includes(event.key)){if(event.preventDefault(),openList(),event.key==="Enter"||event.key===" "){const selectedItem=getEnabledItems().find(item=>item.getAttribute("aria-selected")==="true"),firstItem=getEnabledItems()[0];(selectedItem??firstItem)?.focus();return}focusOption(event.key)}},ref:triggerRef,role:"combobox",type:"button"},listProps={"data-state":open?"open":"closed","data-ui-select-list":!0,hidden:!open,id:listId,ref:listRef,role:"listbox"},getOptionProps=useCallback((option,props={})=>({...props,"aria-disabled":option.disabled?"true":void 0,"aria-selected":selectedValue===option.value,"data-ui-select-option":!0,"data-value":option.value,disabled:option.disabled,onClick:composeHandlers(props.onClick,()=>{selectOption(option.value)}),onKeyDown:composeHandlers(props.onKeyDown,event=>{if(event.defaultPrevented||event.nativeEvent.isComposing||handleTypeahead(event,event.currentTarget))return;if(event.key==="Escape"&&open){event.preventDefault(),close(),focusTrigger(triggerRef.current);return}if(event.key==="Enter"||event.key===" "){event.preventDefault(),selectOption(option.value);return}["ArrowDown","ArrowUp","Home","End"].includes(event.key)&&(event.preventDefault(),focusOption(event.key,event.currentTarget))}),role:"option",tabIndex:-1,type:props.type??"button"}),[close,focusOption,handleTypeahead,open,selectOption,selectedValue]);return{close,controlProps,getOptionProps,listProps,nativeSelectProps,open,options:normalizedOptions,rootProps,rootRef,selectOption,selectedOption,setOpen,triggerProps,triggerText,value:selectedValue}},fieldControlSelector=['input:not([type="hidden"])',"select","textarea",'[contenteditable="true"]','[role="combobox"]','[role="listbox"]','[role="spinbutton"]','[role="textbox"]'].join(","),fieldDescriptionSelector="[data-ui-field-hint], [data-ui-field-error], .ui-field__hint, .ui-field__error",fieldErrorSelector="[data-ui-field-error], .ui-field__error",formControlSelector=['input:not([type="hidden"])',"select","textarea"].join(","),validityMessageAttributes=[["valueMissing","data-error-required"],["typeMismatch","data-error-type"],["patternMismatch","data-error-pattern"],["tooShort","data-error-too-short"],["tooLong","data-error-too-long"],["rangeUnderflow","data-error-min"],["rangeOverflow","data-error-max"],["stepMismatch","data-error-step"],["badInput","data-error-bad-input"],["customError","data-error-custom"]],isNativeFormControl=element=>element!==null&&isLumenFormControl(element),getFieldRoot=control=>control.closest(".ui-field, [data-ui-field]"),getValidationMessage=(control,field)=>{for(const[validityKey,attributeName]of validityMessageAttributes)if(control.validity[validityKey])return control.getAttribute(attributeName)??field?.getAttribute(attributeName)??control.validationMessage;return control.validationMessage},getFieldDescriptionId=element=>(element.id||(element.id=`ui-field-description-${Math.random().toString(36).slice(2)}`),element.id),syncFieldDescription=field=>{const controlId=field.dataset.uiFieldControl,control=controlId?document.getElementById(controlId):field.querySelector(fieldControlSelector);if(!(control instanceof HTMLElement))return;const existingIds=control.getAttribute("aria-describedby")?.trim().split(/\s+/)??[],configuredIds=field.dataset.uiFieldDescribedby?.trim().split(/\s+/)??[],descriptionIds=[...field.querySelectorAll(fieldDescriptionSelector)].map(element=>getFieldDescriptionId(element)),describedBy=[...new Set([...existingIds,...configuredIds,...descriptionIds].filter(Boolean))];describedBy.length&&control.setAttribute("aria-describedby",describedBy.join(" "))},useFormValidation=({onInvalid,onValid,onValidate}={})=>{const formRef=useRef(null),setFieldValidity=useCallback((control,invalid,message="")=>{const field=getFieldRoot(control);if(invalid?(control.setAttribute("aria-invalid","true"),control.dataset.uiValidationInvalid="true"):control.dataset.uiValidationInvalid==="true"&&(control.removeAttribute("aria-invalid"),delete control.dataset.uiValidationInvalid),!!field){field.dataset.invalid=String(invalid);for(const error of field.querySelectorAll(fieldErrorSelector))error.dataset.uiValidationErrorBound="true",error.hidden=!invalid,error.textContent=invalid?message:""}},[]),getControls=useCallback((form=formRef.current)=>form?[...form.elements].filter(isNativeFormControl).filter(control=>control.matches(formControlSelector)&&control.form===form&&!control.matches(":disabled")):[],[]),validateControl=useCallback((control,form=formRef.current??control.form)=>{if(!form)return!0;const validateDetail={control,form,value:control.value};form.dispatchEvent(new CustomEvent("ui:validate",{bubbles:!0,detail:validateDetail})),onValidate?.(validateDetail);const invalid=!control.validity.valid,message=invalid?getValidationMessage(control,getFieldRoot(control)):"";return setFieldValidity(control,invalid,message),!invalid},[onValidate,setFieldValidity]),validateForm=useCallback((form=formRef.current)=>form?getControls(form).filter(control=>!validateControl(control,form)):[],[getControls,validateControl]),emitState=useCallback((name,detail)=>{detail.form.dispatchEvent(new CustomEvent(name,{bubbles:!0,detail})),name==="ui:invalid"?onInvalid?.(detail):onValid?.(detail)},[onInvalid,onValid]),syncFields=useCallback(form=>{for(const field of form.querySelectorAll(".ui-field, [data-ui-field]"))syncFieldDescription(field)},[]);return{formProps:{"data-ui-form":!0,noValidate:!0,onBlur:event=>{const form=event.currentTarget;if(syncFields(form),!isNativeFormControl(event.target)||event.target.form!==form)return;const valid=validateControl(event.target,form);emitState(valid?"ui:valid":"ui:invalid",valid?{control:event.target,form}:{control:event.target,controls:[event.target],form})},onSubmit:event=>{const form=event.currentTarget;syncFields(form);const invalidControls=validateForm(form);if(invalidControls.length){event.preventDefault();const firstInvalid=invalidControls[0];if(!firstInvalid)return;emitState("ui:invalid",{control:firstInvalid,controls:invalidControls,form}),firstInvalid.focus({preventScroll:!0}),firstInvalid.reportValidity();return}emitState("ui:valid",{controls:getControls(form),form})},ref:formRef},formRef,getControls,setFieldValidity,validateControl,validateForm}},calendarMonthPattern=/^\d{4}-\d{2}$/,parseCalendarMonth=value=>!value||!calendarMonthPattern.test(value)?null:parseCalendarDate(`${value}-01`),createCalendarDate=(year,month,day)=>{const date=new Date(0);return date.setUTCFullYear(year,month,day),date},formatCalendarDate=date=>date.toISOString().split("T")[0]??"",formatCalendarMonth=date=>formatCalendarDate(date).slice(0,-3),startOfCalendarMonth=date=>createCalendarDate(date.getUTCFullYear(),date.getUTCMonth(),1),addCalendarDays=(date,days)=>createCalendarDate(date.getUTCFullYear(),date.getUTCMonth(),date.getUTCDate()+days),getCalendarDaysInMonth=date=>createCalendarDate(date.getUTCFullYear(),date.getUTCMonth()+1,0).getUTCDate(),addCalendarMonths=(date,months)=>{const targetMonth=createCalendarDate(date.getUTCFullYear(),date.getUTCMonth()+months,1),day=Math.min(date.getUTCDate(),getCalendarDaysInMonth(targetMonth));return createCalendarDate(targetMonth.getUTCFullYear(),targetMonth.getUTCMonth(),day)},getCalendarToday=()=>{const today=new Date;return createCalendarDate(today.getFullYear(),today.getMonth(),today.getDate())},compareCalendarDates=(date,other)=>other?Math.sign(date.getTime()-other.getTime()):0,isCalendarDateDisabled=(disabled,date,min,max)=>disabled||compareCalendarDates(date,min)<0||compareCalendarDates(date,max)>0,clampCalendarDate=(date,min,max)=>min&&compareCalendarDates(date,min)<0?min:max&&compareCalendarDates(date,max)>0?max:date,getCalendarGridStart=month=>addCalendarDays(month,-((month.getUTCDay()+6)%7)),coerceCalendarDate=value=>value instanceof Date?value:parseCalendarDate(value),getCalendarFocusDate=(disabled,month,min,max,selectedDate,requestedDate)=>{const today=getCalendarToday(),candidates=[requestedDate,selectedDate,today,month];for(const candidate of candidates)if(candidate&&formatCalendarMonth(candidate)===formatCalendarMonth(month)&&!isCalendarDateDisabled(disabled,candidate,min,max))return candidate;for(let index=0;index<getCalendarDaysInMonth(month);index+=1){const date=addCalendarDays(month,index);if(!isCalendarDateDisabled(disabled,date,min,max))return date}return month},formatSelectedCalendarDate=value=>value?formatCalendarDate(value):"",useCalendar=({defaultValue,disabled:requestedDisabled=!1,labels,locale,max,min,month,name,onValueChange,readOnly=!1,value:controlledValue}={})=>{const disabled=requestedDisabled||!isCalendarBoundsValid(min,max),rootRef=useRef(null),labelId=`${`ui-calendar-${useId()}`}-label`,minDate=parseCalendarDate(min??"0001-01-01"),maxDate=parseCalendarDate(max??"9999-12-31"),defaultDate=parseCalendarDate(defaultValue),controlledDate=parseCalendarDate(controlledValue),[uncontrolledValue,setUncontrolledValue]=useState(()=>defaultDate?formatCalendarDate(defaultDate):""),selectedValue=controlledValue===void 0?uncontrolledValue:formatSelectedCalendarDate(controlledDate),selectedDate=parseCalendarDate(selectedValue),initialMonth=parseCalendarMonth(month)??(selectedDate?startOfCalendarMonth(selectedDate):null)??startOfCalendarMonth(getCalendarToday()),[visibleMonthValue,setVisibleMonthValue]=useState(()=>formatCalendarMonth(initialMonth)),visibleMonth=parseCalendarMonth(month??visibleMonthValue)??initialMonth,[focusValue,setFocusValue]=useState(null);useEffect(()=>{const root=rootRef.current,owner=root?.closest("form");let active=!0,resetTimer;const reset=event=>{globalThis.clearTimeout(resetTimer),resetTimer=globalThis.setTimeout(()=>{if(!active||event.defaultPrevented||!root?.isConnected)return;const date=parseCalendarDate(defaultValue);controlledValue===void 0&&setUncontrolledValue(date?formatCalendarDate(date):"");const resetMonth=parseCalendarMonth(month)??startOfCalendarMonth(date??getCalendarToday());setVisibleMonthValue(formatCalendarMonth(resetMonth)),setFocusValue(null)})};return owner?.addEventListener("reset",reset),()=>{active=!1,globalThis.clearTimeout(resetTimer),owner?.removeEventListener("reset",reset)}},[controlledValue,defaultValue,month]);const focusDate=getCalendarFocusDate(disabled,visibleMonth,minDate,maxDate,selectedDate,parseCalendarDate(focusValue)),focusIso=formatCalendarDate(focusDate);useEffect(()=>{const root=rootRef.current;root?.contains(root.ownerDocument.activeElement)&&root.ownerDocument.activeElement?.getAttribute("role")==="gridcell"&&root.querySelector('[role="gridcell"][tabindex="0"]')?.focus({preventScroll:!0})},[focusIso]);const selectedIso=selectedDate?formatCalendarDate(selectedDate):"",currentLocale=getCalendarLocale(locale||"en"),navigationLabels={...resolveDateControlLabels(currentLocale),...labels},monthFormatter=useMemo(()=>new Intl.DateTimeFormat(currentLocale,{month:"long",timeZone:"UTC",year:"numeric"}),[currentLocale]),dayFormatter=useMemo(()=>new Intl.DateTimeFormat(currentLocale,{day:"numeric",month:"long",timeZone:"UTC",weekday:"long",year:"numeric"}),[currentLocale]),weekdayFormatter=useMemo(()=>new Intl.DateTimeFormat(currentLocale,{timeZone:"UTC",weekday:"short"}),[currentLocale]),todayIso=formatCalendarDate(getCalendarToday()),label=monthFormatter.format(visibleMonth),weekdays=useMemo(()=>Array.from({length:7},(_,index)=>weekdayFormatter.format(new Date(Date.UTC(2026,0,5+index)))),[weekdayFormatter]),weeks=useMemo(()=>{const firstCell=getCalendarGridStart(visibleMonth);return Array.from({length:6},(_,rowIndex)=>Array.from({length:7},(_2,columnIndex)=>{const date=addCalendarDays(firstCell,rowIndex*7+columnIndex),dateIso=formatCalendarDate(date),unavailable=isCalendarDateDisabled(disabled,date,minDate,maxDate);return{date:dateIso,day:date.getUTCDate(),disabled:unavailable,label:dayFormatter.format(date),outside:formatCalendarMonth(date)!==formatCalendarMonth(visibleMonth),selected:selectedIso===dateIso,tabIndex:!unavailable&&focusIso===dateIso?0:-1,today:todayIso===dateIso}}))},[dayFormatter,disabled,focusIso,maxDate,minDate,selectedIso,todayIso,visibleMonth]),focusCalendarDate=dateInput=>{const date=coerceCalendarDate(dateInput);if(!date)return;const nextDate=clampCalendarDate(date,minDate,maxDate);setVisibleMonthValue(formatCalendarMonth(startOfCalendarMonth(nextDate))),setFocusValue(formatCalendarDate(nextDate))},selectDate=dateInput=>{if(disabled||readOnly)return;const date=coerceCalendarDate(dateInput);if(!date)return;const nextDate=clampCalendarDate(date,minDate,maxDate);if(isCalendarDateDisabled(disabled,nextDate,minDate,maxDate))return;const nextValue=formatCalendarDate(nextDate);controlledValue===void 0&&setUncontrolledValue(nextValue),setVisibleMonthValue(formatCalendarMonth(startOfCalendarMonth(nextDate))),setFocusValue(nextValue),onValueChange?.(nextValue)},moveFocus=(currentDate,key)=>{const column=(currentDate.getUTCDay()+6)%7,keyOffsets={ArrowDown:7,ArrowLeft:-1,ArrowRight:1,ArrowUp:-7,End:6-column,Home:-column};if(key==="PageDown"||key==="PageUp"){focusCalendarDate(addCalendarMonths(currentDate,key==="PageDown"?1:-1));return}const directionRoot=rootRef.current,offset=keyOffsets[directionRoot?getLumenDirectionalKey(directionRoot,key):key];offset!==void 0&&focusCalendarDate(addCalendarDays(currentDate,offset))},previousMonthLastDay=addCalendarDays(visibleMonth,-1),nextMonthFirstDay=addCalendarMonths(visibleMonth,1),previousDisabled=disabled||compareCalendarDates(previousMonthLastDay,minDate)<0,nextDisabled=disabled||compareCalendarDates(nextMonthFirstDay,maxDate)>0;return{focusDate:focusCalendarDate,getDayProps:(day,props={})=>({...props,"aria-disabled":day.disabled?!0:void 0,"aria-label":props["aria-label"]??day.label,"aria-selected":day.selected?"true":"false","data-date":day.date,"data-outside":day.outside?"true":void 0,"data-selected":day.selected?"true":void 0,"data-today":day.today?"true":void 0,"data-ui-calendar-day":!0,onClick:composeHandlers(props.onClick,()=>{day.disabled||selectDate(day.date)}),onKeyDown:composeHandlers(props.onKeyDown,event=>{if(day.disabled)return;if(event.key==="Enter"||event.key===" "){event.preventDefault(),selectDate(day.date);return}if(event.key!=="ArrowDown"&&event.key!=="ArrowLeft"&&event.key!=="ArrowRight"&&event.key!=="ArrowUp"&&event.key!=="End"&&event.key!=="Home"&&event.key!=="PageDown"&&event.key!=="PageUp")return;const date=parseCalendarDate(day.date);date&&(event.preventDefault(),moveFocus(date,event.key))}),role:"gridcell",tabIndex:props.tabIndex??day.tabIndex}),gridProps:{"aria-labelledby":labelId,"aria-readonly":readOnly||void 0,className:"ui-calendar__grid","data-ui-calendar-grid":!0,role:"grid"},inputProps:{"data-ui-calendar-input":!0,disabled,name,type:"hidden",value:selectedValue},label,labelProps:{className:"ui-calendar__label","data-ui-calendar-label":!0,id:labelId},month:formatCalendarMonth(visibleMonth),nextProps:{"aria-label":navigationLabels.nextMonth,className:"ui-calendar__nav","data-ui-calendar-next":!0,disabled:nextDisabled,onClick:()=>{if(nextDisabled)return;const nextMonth=startOfCalendarMonth(addCalendarMonths(visibleMonth,1));setVisibleMonthValue(formatCalendarMonth(nextMonth)),setFocusValue(formatCalendarDate(getCalendarFocusDate(disabled,nextMonth,minDate,maxDate,selectedDate)))},type:"button"},previousProps:{"aria-label":navigationLabels.previousMonth,className:"ui-calendar__nav","data-ui-calendar-prev":!0,disabled:previousDisabled,onClick:()=>{if(previousDisabled)return;const previousMonth=startOfCalendarMonth(addCalendarMonths(visibleMonth,-1));setVisibleMonthValue(formatCalendarMonth(previousMonth)),setFocusValue(formatCalendarDate(getCalendarFocusDate(disabled,previousMonth,minDate,maxDate,selectedDate)))},type:"button"},rootProps:{"aria-disabled":disabled?!0:void 0,className:"ui-calendar","data-disabled":disabled?"true":void 0,"data-ui-calendar":!0,"data-ui-calendar-initial-month":formatCalendarMonth(initialMonth),"data-ui-calendar-max":maxDate?formatCalendarDate(maxDate):void 0,"data-ui-calendar-min":minDate?formatCalendarDate(minDate):void 0,"data-ui-calendar-month":formatCalendarMonth(visibleMonth),"data-ui-calendar-value":selectedValue||void 0,ref:rootRef},rootRef,selectDate,value:selectedValue,weekdays,weeks}},defaultInputOtpLength=6,defaultInputOtpPattern="[0-9]*",coerceInputOtpLength=length=>Number(length)||defaultInputOtpLength,clampInputOtpLength=length=>Math.max(1,Math.floor(length)),normalizeInputOtpLength=length=>clampInputOtpLength(coerceInputOtpLength(length)),isNumericInputOtp=(inputMode,pattern)=>inputMode==="numeric"||pattern===defaultInputOtpPattern,sanitizeInputOtpValue=(value,length,inputMode,pattern)=>(isNumericInputOtp(inputMode,pattern)?value.replaceAll(/\D/g,""):value.replaceAll(/\s/g,"")).slice(0,length),getInputOtpActiveIndex=(length,value,selectionStart)=>Math.min(length-1,Math.max(0,selectionStart??value.length)),useInputOTP=({defaultValue,disabled=!1,inputMode="numeric",inputRef:forwardedInputRef,invalid=!1,length:lengthOption,onValueChange,pattern=defaultInputOtpPattern,value:controlledValue}={})=>{const length=normalizeInputOtpLength(lengthOption),rootRef=useRef(null),inputRef=useRef(null),[focused,setFocused]=useState(!1),[activeIndex,setActiveIndex]=useState(0),[uncontrolledValue,setUncontrolledValue]=useState(()=>sanitizeInputOtpValue(defaultValue??"",length,inputMode,pattern)),value=sanitizeInputOtpValue(controlledValue??uncontrolledValue,length,inputMode,pattern),segmentIndexes=useMemo(()=>Array.from({length},(_,index)=>index),[length]),syncValue=useCallback((input=inputRef.current)=>{if(!input)return value;const nextValue=sanitizeInputOtpValue(input.value,length,inputMode,pattern);return input.value!==nextValue&&(input.value=nextValue),controlledValue===void 0&&setUncontrolledValue(nextValue),setActiveIndex(getInputOtpActiveIndex(length,nextValue,input.selectionStart)),nextValue},[controlledValue,inputMode,length,pattern,value]),setSelection=useCallback(index=>{const input=inputRef.current,position=Math.min(value.length,Math.max(0,index));setActiveIndex(getInputOtpActiveIndex(length,value,position)),input?.focus({preventScroll:!0}),input?.setSelectionRange(position,position)},[length,value]),setValue=useCallback(nextValue=>{const sanitizedValue=sanitizeInputOtpValue(nextValue,length,inputMode,pattern),input=inputRef.current;return controlledValue===void 0&&setUncontrolledValue(sanitizedValue),input&&(input.value=sanitizedValue,input.setSelectionRange(sanitizedValue.length,sanitizedValue.length)),setActiveIndex(getInputOtpActiveIndex(length,sanitizedValue,sanitizedValue.length)),onValueChange?.(sanitizedValue),sanitizedValue},[controlledValue,inputMode,length,onValueChange,pattern]),commitInputValue=useCallback(input=>{onValueChange?.(syncValue(input))},[onValueChange,syncValue]);useEffect(()=>{const form=inputRef.current?.form;let resetTimer;if(!form)return;const handleReset=()=>{resetTimer=globalThis.setTimeout(()=>{syncValue(inputRef.current)})};return form.addEventListener("reset",handleReset),()=>{resetTimer&&globalThis.clearTimeout(resetTimer),form.removeEventListener("reset",handleReset)}},[syncValue]);const getInputProps=useCallback((props={})=>({...props,"aria-invalid":props["aria-invalid"]??(invalid?!0:void 0),autoComplete:props.autoComplete??"one-time-code",className:composeClassName("ui-input-otp ui-input-otp__native",props.className),"data-ui-enhanced":!0,"data-ui-input-otp-native":!0,disabled:props.disabled??disabled,inputMode:props.inputMode??inputMode,maxLength:props.maxLength??length,onBlur:composeHandlers(props.onBlur,event=>{setFocused(!1),syncValue(event.currentTarget)}),onChange:composeHandlers(props.onChange,event=>{commitInputValue(event.currentTarget)}),onClick:composeHandlers(props.onClick,event=>{syncValue(event.currentTarget)}),onFocus:composeHandlers(props.onFocus,event=>{setFocused(!0),syncValue(event.currentTarget)}),onInput:composeHandlers(props.onInput,event=>{commitInputValue(event.currentTarget)}),onKeyDown:composeHandlers(props.onKeyDown,event=>{if(event.key==="ArrowLeft"){event.preventDefault(),setSelection((event.currentTarget.selectionStart??event.currentTarget.value.length)-1);return}if(event.key==="ArrowRight"){event.preventDefault(),setSelection((event.currentTarget.selectionStart??event.currentTarget.value.length)+1);return}if(event.key==="Home"){event.preventDefault(),setSelection(0);return}event.key==="End"&&(event.preventDefault(),setSelection(event.currentTarget.value.length))}),onKeyUp:composeHandlers(props.onKeyUp,event=>{syncValue(event.currentTarget)}),onPaste:composeHandlers(props.onPaste,event=>{const pasted=event.clipboardData.getData("text");pasted&&(event.preventDefault(),setValue(pasted))}),pattern:props.pattern??pattern,ref:node=>{inputRef.current=node,setRefValue(forwardedInputRef,node)},type:"text",value}),[commitInputValue,disabled,forwardedInputRef,inputMode,invalid,length,pattern,setSelection,setValue,syncValue,value]),getSegmentChar=useCallback(index=>value[index]??"\xA0",[value]),getSegmentProps=useCallback((index,props={})=>({...props,"aria-hidden":!0,className:composeClassName("ui-input-otp__segment",props.className),"data-active":String(focused&&index===activeIndex),"data-index":index,"data-ui-input-otp-segment":!0,disabled:props.disabled??disabled,onClick:composeHandlers(props.onClick,()=>{setSelection(index)}),tabIndex:props.tabIndex??-1,type:"button"}),[activeIndex,disabled,focused,setSelection]);return{activeIndex,getInputProps,getSegmentChar,getSegmentProps,inputRef,rootProps:{className:"ui-input-otp-field","data-disabled":disabled?"true":"false","data-invalid":invalid?"true":"false","data-ui-input-otp":!0,"data-ui-input-otp-length":length,ref:rootRef},rootRef,segmentIndexes,segmentsProps:{className:"ui-input-otp__segments","data-ui-input-otp-segments":!0},setSelection,setValue,syncValue,value}},getDateRangeRoot=(control,fallback)=>control.closest("[data-ui-date-range-picker]")??fallback,getDateRangeInputs=(root,start,end)=>{if(start&&end&&start!==end)return[start,end];const inputs=root?[...root.querySelectorAll('input[type="date"]')]:[];return[start??inputs[0]??null,end??inputs.at(-1)??null]},syncDateInputConstraint=(input,property,value)=>{if(value){input[property]=value;return}input.removeAttribute(property)},syncDateRangeInputs=(start,end)=>!start||!end||start===end?{}:(start.value&&end.value&&end.value<start.value&&(end.value=start.value),syncDateInputConstraint(end,"min",start.value),syncDateInputConstraint(start,"max",end.value),{...end.value?{end:end.value}:{},...start.value?{start:start.value}:{}}),useDateRangePicker=({onRangeChange}={})=>{const rootRef=useRef(null),startRef=useRef(null),endRef=useRef(null),syncRange=useCallback((root=rootRef.current)=>{const[start,end]=getDateRangeInputs(root,startRef.current,endRef.current),detail=syncDateRangeInputs(start,end);return onRangeChange?.(detail),detail},[onRangeChange]),getStartProps=useCallback((props={})=>({...props,onChange:composeHandlers(props.onChange,event=>{startRef.current=event.currentTarget,syncRange(getDateRangeRoot(event.currentTarget,rootRef.current))}),ref:startRef,type:props.type??"date"}),[syncRange]),getEndProps=useCallback((props={})=>({...props,onChange:composeHandlers(props.onChange,event=>{endRef.current=event.currentTarget,syncRange(getDateRangeRoot(event.currentTarget,rootRef.current))}),ref:endRef,type:props.type??"date"}),[syncRange]);return{endRef,getEndProps,getStartProps,rootProps:{"data-ui-date-range-picker":!0,ref:rootRef},rootRef,startRef,syncRange}},getScheduleRoot=(element,fallback)=>element.closest("[data-ui-schedule]")??fallback,useSchedule=({onChange}={})=>{const rootRef=useRef(null),emitChange=useCallback((detail,root=rootRef.current)=>{root&&typeof CustomEvent<"u"&&root.dispatchEvent(new CustomEvent("ui:schedule-change",{bubbles:!0,detail})),onChange?.(detail)},[onChange]),getEventProps=useCallback((eventId,props={})=>({...props,...eventId&&!props.id?{id:eventId}:{},"data-ui-draggable":!0,"data-ui-schedule-event":!0,draggable:props.draggable??!0,onDragEnd:composeHandlers(props.onDragEnd,event=>{const root=getScheduleRoot(event.currentTarget,rootRef.current);root&&delete root.dataset.uiDragging}),onDragStart:composeHandlers(props.onDragStart,event=>{const transferValue=eventId||event.currentTarget.id||event.currentTarget.textContent.trim(),root=getScheduleRoot(event.currentTarget,rootRef.current);event.dataTransfer.setData("text/plain",transferValue),root&&(root.dataset.uiDragging="true")})}),[]),getSlotProps=useCallback((slot,props={})=>({...props,"data-ui-schedule-slot":slot,onDragLeave:composeHandlers(props.onDragLeave,event=>{delete event.currentTarget.dataset.state}),onDragOver:composeHandlers(props.onDragOver,event=>{event.preventDefault(),event.currentTarget.dataset.state="drag-over"}),onDrop:composeHandlers(props.onDrop,event=>{event.preventDefault(),delete event.currentTarget.dataset.state;const draggedId=event.dataTransfer.getData("text/plain"),dragged=typeof document<"u"&&draggedId?document.getElementById(draggedId):null;typeof HTMLElement<"u"&&dragged instanceof HTMLElement&&event.currentTarget.append(dragged),emitChange({...draggedId?{eventId:draggedId}:{},...slot?{slot}:{}},getScheduleRoot(event.currentTarget,rootRef.current))})}),[emitChange]);return{emitChange,getEventProps,getSlotProps,rootProps:{"data-ui-schedule":!0,ref:rootRef},rootRef}},getKanbanRoot=(element,fallback)=>element.closest("[data-ui-kanban]")??fallback,getKanbanItem=(root,itemId)=>[...root?.querySelectorAll("[data-ui-kanban-item]")??[]].find(item=>item.dataset.uiKanbanItem===itemId)??null,getKanbanColumnValues=root=>[...root?.querySelectorAll("[data-ui-kanban-column]")??[]].map(column=>column.dataset.uiKanbanColumn??"").filter(Boolean),isKanbanArrowKey=key=>["ArrowLeft","ArrowRight"].includes(key),clearKanbanInteractionState=(root,item)=>{item?.dataset.state==="dragging"&&delete item.dataset.state;for(const column of root?.querySelectorAll("[data-ui-kanban-column]")??[])delete column.dataset.state},setKanbanDropTarget=(root,target)=>{for(const column of root?.querySelectorAll("[data-ui-kanban-column]")??[])column===target?column.dataset.state="drop-target":delete column.dataset.state},getKanbanColumnAtPoint=(root,clientX,clientY)=>{if(!root)return null;const column=document.elementFromPoint(clientX,clientY)?.closest("[data-ui-kanban-column]")??null;return column?.closest("[data-ui-kanban]")===root?column:null},requestKeyboardKanbanMove=(event,itemId,root,requestMove)=>{if(!isKanbanArrowKey(event.key)||!root)return;const item=getKanbanItem(root,itemId);if(!item||item.getAttribute("aria-busy")==="true")return;const fromColumn=item.closest("[data-ui-kanban-column]")?.dataset.uiKanbanColumn;if(!fromColumn)return;const columns=getKanbanColumnValues(root),currentIndex=columns.indexOf(fromColumn),visualDirection=event.key==="ArrowRight"?1:-1,direction=getComputedStyle(root).direction==="rtl"?-visualDirection:visualDirection,toColumn=columns[currentIndex+direction];toColumn&&(event.preventDefault(),requestMove({fromColumn,input:"keyboard",itemId,toColumn}))},updateKanbanPointer=(event,pointer,root)=>{if(pointer?.pointerId!==event.pointerId||Math.hypot(event.clientX-pointer.startX,event.clientY-pointer.startY)<8&&!pointer.active)return;pointer.active=!0,event.currentTarget.setPointerCapture(event.pointerId);const item=getKanbanItem(root,pointer.itemId),target=getKanbanColumnAtPoint(root,event.clientX,event.clientY);item&&(item.dataset.state="dragging"),setKanbanDropTarget(root,target)},finishKanbanPointer=(event,pointer,root,requestMove)=>{if(pointer?.pointerId!==event.pointerId||!pointer.active)return;const item=getKanbanItem(root,pointer.itemId),fromColumn=item?.closest("[data-ui-kanban-column]")?.dataset.uiKanbanColumn,toColumn=getKanbanColumnAtPoint(root,event.clientX,event.clientY)?.dataset.uiKanbanColumn;clearKanbanInteractionState(root,item),fromColumn&&toColumn&&requestMove({fromColumn,input:"pointer",itemId:pointer.itemId,toColumn})},useKanban=({onMoveRequest}={})=>{const rootRef=useRef(null),pointerRef=useRef(null),requestMove=useCallback(detail=>{const normalized=createLumenKanbanMoveDetail(detail);if(!normalized)return!1;const accepted=rootRef.current&&typeof CustomEvent<"u"?rootRef.current.dispatchEvent(new CustomEvent("ui:kanban-move-request",{bubbles:!0,cancelable:!0,detail:normalized})):!0;return accepted&&onMoveRequest?.(normalized),accepted},[onMoveRequest]),getItemProps=useCallback((itemId,props={})=>({...props,"data-ui-kanban-item":itemId,id:props.id??itemId}),[]),getHandleProps=useCallback((itemId,props={})=>({...props,"aria-keyshortcuts":props["aria-keyshortcuts"]??"ArrowLeft ArrowRight","data-ui-kanban-handle":itemId,draggable:props.draggable??!0,onDragEnd:composeHandlers(props.onDragEnd,event=>{const root=getKanbanRoot(event.currentTarget,rootRef.current),item=getKanbanItem(root,itemId);item?.dataset.state==="dragging"&&delete item.dataset.state}),onDragStart:composeHandlers(props.onDragStart,event=>{const root=getKanbanRoot(event.currentTarget,rootRef.current),item=getKanbanItem(root,itemId);if(!item||item.getAttribute("aria-busy")==="true"){event.preventDefault();return}event.dataTransfer.setData("text/plain",itemId),event.dataTransfer.effectAllowed="move",item.dataset.state="dragging"}),onKeyDown:composeHandlers(props.onKeyDown,event=>{const root=getKanbanRoot(event.currentTarget,rootRef.current);requestKeyboardKanbanMove(event,itemId,root,requestMove)}),onPointerDown:composeHandlers(props.onPointerDown,event=>{event.pointerType!=="mouse"&&(pointerRef.current={active:!1,itemId,pointerId:event.pointerId,startX:event.clientX,startY:event.clientY})}),onPointerMove:composeHandlers(props.onPointerMove,event=>{const root=getKanbanRoot(event.currentTarget,rootRef.current);updateKanbanPointer(event,pointerRef.current,root)}),onPointerCancel:composeHandlers(props.onPointerCancel,event=>{const pointer=pointerRef.current;if(pointer?.pointerId!==event.pointerId)return;pointerRef.current=null;const root=getKanbanRoot(event.currentTarget,rootRef.current),item=getKanbanItem(root,pointer.itemId);clearKanbanInteractionState(root,item)}),onPointerUp:composeHandlers(props.onPointerUp,event=>{const pointer=pointerRef.current;pointerRef.current=null;const root=getKanbanRoot(event.currentTarget,rootRef.current);finishKanbanPointer(event,pointer,root,requestMove)}),type:props.type??"button"}),[requestMove]);return{getColumnProps:useCallback((column,props={})=>({...props,"data-ui-kanban-column":column,onDragLeave:composeHandlers(props.onDragLeave,event=>{delete event.currentTarget.dataset.state}),onDragOver:composeHandlers(props.onDragOver,event=>{event.preventDefault(),event.dataTransfer.dropEffect="move",event.currentTarget.dataset.state="drop-target"}),onDrop:composeHandlers(props.onDrop,event=>{event.preventDefault(),delete event.currentTarget.dataset.state;const itemId=event.dataTransfer.getData("text/plain"),root=getKanbanRoot(event.currentTarget,rootRef.current),item=getKanbanItem(root,itemId),fromColumn=item?.closest("[data-ui-kanban-column]")?.dataset.uiKanbanColumn;item?.dataset.state==="dragging"&&delete item.dataset.state,fromColumn&&requestMove({fromColumn,input:"pointer",itemId,toColumn:column})})}),[requestMove]),getHandleProps,getItemProps,requestMove,rootProps:{"aria-orientation":"horizontal","data-ui-kanban":!0,ref:rootRef,tabIndex:0},rootRef}},parseResizableNumberList=(value,count,fallback)=>{const values=typeof value=="number"?[value]:value??[];return Array.from({length:count},(_,index)=>values[index]??values[0]??fallback)},normalizeResizableSizes=(sizes,count)=>{const fallbackSize=100/Math.max(1,count),usableSizes=Array.from({length:count},(_,index)=>{const size=sizes[index]??fallbackSize;return Number.isFinite(size)&&size>0?size:fallbackSize}),total=usableSizes.reduce((sum,size)=>sum+size,0);return total<=0?Array.from({length:count},()=>fallbackSize):usableSizes.map(size=>size/total*100)},serializeResizableSize=value=>{if(value!==void 0)return Array.isArray(value)?value.join(","):String(value)},useResizable=({defaultSizes,direction="horizontal",maxSize,minSize,onSizesChange,panelCount:panelCountOption=2,resetOnDoubleClick=!0}={})=>{if(!Number.isFinite(panelCountOption)||panelCountOption>1e3)throw new RangeError("Resizable panelCount must be finite and at most 1000");const panelCount=Math.max(0,Math.floor(panelCountOption)),rootRef=useRef(null),dragRef=useRef(null),minSizes=useMemo(()=>parseResizableNumberList(minSize,panelCount,12),[minSize,panelCount]),maxSizes=useMemo(()=>parseResizableNumberList(maxSize,panelCount,88),[maxSize,panelCount]),initialSizes=useMemo(()=>normalizeResizableSizes(parseResizableNumberList(defaultSizes,panelCount,100/Math.max(1,panelCount)),panelCount),[defaultSizes,panelCount]),[sizes,setSizes]=useState(initialSizes),axis=direction==="horizontal"?"clientX":"clientY",sizeProperty=direction==="horizontal"?"width":"height",separatorOrientation=direction==="horizontal"?"vertical":"horizontal",panelIndexes=useMemo(()=>Array.from({length:panelCount},(_,index)=>index),[panelCount]),handleIndexes=useMemo(()=>Array.from({length:Math.max(0,panelCount-1)},(_,index)=>index),[panelCount]);useEffect(()=>{setSizes(initialSizes)},[initialSizes]);const updateSizes=useCallback(updater=>{setSizes(currentSizes=>{const nextSizes=updater(currentSizes);return onSizesChange?.(nextSizes),nextSizes})},[onSizesChange]),resizePair=useCallback((index,nextSize)=>{updateSizes(currentSizes=>{const nextSizes=[...currentSizes],nextIndex=index+1,total=(nextSizes[index]??0)+(nextSizes[nextIndex]??0),min=Math.max(minSizes[index]??0,total-(maxSizes[nextIndex]??100)),max=Math.min(maxSizes[index]??100,total-(minSizes[nextIndex]??0)),paneSize=Math.min(max,Math.max(min,nextSize));return nextSizes[index]=paneSize,nextSizes[nextIndex]=total-paneSize,nextSizes})},[maxSizes,minSizes,updateSizes]),reset=useCallback(()=>{updateSizes(()=>[...initialSizes])},[initialSizes,updateSizes]),getPanelProps=useCallback((index,props={})=>({...props,"data-ui-resizable-panel":!0,style:{...props.style,"--ui-resizable-size":`${sizes[index]??0}%`}}),[sizes]),getHandleProps=useCallback((index,props={})=>({...props,"aria-label":props["aria-label"]??`Resize panel ${index+1}`,"aria-orientation":separatorOrientation,"aria-valuemax":Math.round(maxSizes[index]??100),"aria-valuemin":Math.round(minSizes[index]??0),"aria-valuenow":Math.round(sizes[index]??0),className:composeClassName("ui-resizable__handle",props.className),"data-index":index,"data-ui-resizable-handle":!0,onDoubleClick:composeHandlers(props.onDoubleClick,()=>{resetOnDoubleClick&&reset()}),onKeyDown:composeHandlers(props.onKeyDown,event=>{const step=event.shiftKey?10:2,keyDeltas=direction==="horizontal"?{ArrowLeft:-step,ArrowRight:step}:{ArrowDown:step,ArrowUp:-step};if(event.key==="Home"){event.preventDefault(),resizePair(index,minSizes[index]??0);return}if(event.key==="End"){event.preventDefault(),resizePair(index,maxSizes[index]??100);return}const delta=keyDeltas[getLumenDirectionalKey(event.currentTarget,event.key)];delta!==void 0&&(event.preventDefault(),resizePair(index,(sizes[index]??0)+delta))}),onPointerDown:composeHandlers(props.onPointerDown,event=>{event.button===0&&(event.preventDefault(),dragRef.current={containerSize:Math.max(1,rootRef.current?.getBoundingClientRect()[sizeProperty]??1),index,startPosition:event[axis],startSize:sizes[index]??0},rootRef.current&&(rootRef.current.dataset.resizing="true"),event.currentTarget.dataset.active="true",event.currentTarget.setPointerCapture(event.pointerId))}),onPointerMove:composeHandlers(props.onPointerMove,event=>{const drag=dragRef.current;if(drag?.index!==index||event.currentTarget.dataset.active!=="true")return;const delta=(event[axis]-drag.startPosition)/drag.containerSize*100,multiplier=direction==="horizontal"&&getLumenDirectionalKey(event.currentTarget,"ArrowRight")==="ArrowLeft"?-1:1;resizePair(index,drag.startSize+delta*multiplier)}),onPointerUp:composeHandlers(props.onPointerUp,event=>{event.currentTarget.dataset.active==="true"&&(delete event.currentTarget.dataset.active,rootRef.current&&delete rootRef.current.dataset.resizing,dragRef.current=null,event.currentTarget.releasePointerCapture(event.pointerId))}),role:"separator",tabIndex:props.tabIndex??0,type:props.type??"button"}),[axis,direction,maxSizes,minSizes,reset,resetOnDoubleClick,resizePair,separatorOrientation,sizeProperty,sizes]);return{direction,getHandleProps,getPanelProps,handleIndexes,panelIndexes,reset,resizePair,rootProps:{className:composeClassName("ui-resizable",direction==="vertical"&&"ui-resizable--vertical"),"data-orientation":direction,"data-ui-resizable":!0,"data-ui-resizable-default-sizes":defaultSizes?.join(","),"data-ui-resizable-enhanced":!0,"data-ui-resizable-max-size":serializeResizableSize(maxSize),"data-ui-resizable-min-size":serializeResizableSize(minSize),"data-ui-resizable-reset":resetOnDoubleClick?"true":void 0,ref:rootRef},rootRef,sizes}},useThemeBuilder=({radiusScale,spacingScale,borderWidth,preset,defaultPreset,onPresetChange,accentHue,defaultAccentHue=54,defaultExportFormat="css",defaultHue=264,defaultMode="generated",defaultPrimaryColor="#6f20f0",defaultScheme="light",defaultSecondaryColor="#14b8a6",exportFormat,hue,mode,onAccentHueChange,onExportFormatChange,onHueChange,onModeChange,onPrimaryColorChange,onSchemeChange,onSecondaryColorChange,onThemeChange,onThemeExport,primaryColor,scheme,secondaryColor}={})=>{const[currentPreset,setPreset]=useControllableState({defaultValue:defaultPreset,onChange:onPresetChange,value:preset}),[currentHue,setHue]=useControllableState({defaultValue:defaultHue,onChange:onHueChange,value:hue}),[currentAccentHue,setAccentHue]=useControllableState({defaultValue:defaultAccentHue,onChange:onAccentHueChange,value:accentHue}),[currentMode,setMode]=useControllableState({defaultValue:defaultMode,onChange:onModeChange,value:mode}),[currentScheme,setScheme]=useControllableState({defaultValue:defaultScheme,onChange:onSchemeChange,value:scheme}),[currentPrimaryColor,setPrimaryColor]=useControllableState({defaultValue:defaultPrimaryColor,onChange:onPrimaryColorChange,value:primaryColor}),[currentSecondaryColor,setSecondaryColor]=useControllableState({defaultValue:defaultSecondaryColor,onChange:onSecondaryColorChange,value:secondaryColor}),[currentExportFormat,setExportFormat]=useControllableState({defaultValue:defaultExportFormat,onChange:onExportFormatChange,value:exportFormat}),result=useMemo(()=>createThemeBuilderTokens({radiusScale:radiusScale??null,spacingScale:spacingScale??null,borderWidth:borderWidth??null,preset:currentPreset??null,accentHue:currentAccentHue,hue:currentHue,mode:currentMode,primaryColor:currentPrimaryColor,scheme:currentScheme,secondaryColor:currentSecondaryColor}),[radiusScale,spacingScale,borderWidth,currentPreset,currentAccentHue,currentHue,currentMode,currentPrimaryColor,currentScheme,currentSecondaryColor]),exportValue=useMemo(()=>exportThemeBuilderValue(result.tokens,result.scheme,currentExportFormat),[currentExportFormat,result.scheme,result.tokens]),previewStyle=useMemo(()=>Object.fromEntries(Object.entries(result.tokens).map(([token,value])=>[`--${token}`,value])),[result.tokens]);useEffect(()=>{onThemeChange?.(result)},[onThemeChange,result]);const exportDetail=useMemo(()=>({...currentExportFormat==="css"?{css:exportValue}:{},format:currentExportFormat,tokens:result.tokens,value:exportValue}),[currentExportFormat,exportValue,result.tokens]),copyExport=useCallback(async()=>(typeof navigator<"u"&&await navigator.clipboard.writeText(exportValue).catch(()=>null),onThemeExport?.(exportDetail),exportValue),[exportDetail,exportValue,onThemeExport]),getPresetProps=useCallback((nextPreset,props={})=>({...props,"aria-pressed":currentPreset===nextPreset,"data-ui-theme-preset":nextPreset,onClick:composeHandlers(props.onClick,()=>{setPreset(nextPreset)}),type:props.type??"button"}),[currentPreset,setPreset]),getModeProps=useCallback((nextMode,props={})=>({...props,"aria-pressed":currentMode===nextMode,"data-ui-theme-mode":nextMode,onClick:composeHandlers(props.onClick,()=>{setMode(nextMode)}),type:props.type??"button"}),[currentMode,setMode]),getSchemeProps=useCallback((nextScheme,props={})=>({...props,"aria-pressed":currentScheme===nextScheme,"data-ui-theme-scheme":nextScheme,onClick:composeHandlers(props.onClick,()=>{setScheme(nextScheme)}),type:props.type??"button"}),[currentScheme,setScheme]),getExportFormatProps=useCallback((format,props={})=>({...props,"aria-pressed":currentExportFormat===format,"data-ui-theme-export-format":format,onClick:composeHandlers(props.onClick,()=>{setExportFormat(coerceThemeBuilderExportFormat(format))}),type:props.type??"button"}),[currentExportFormat,setExportFormat]);return{...result,setPreset,getPresetProps,accentHueProps:{"data-ui-theme-accent-hue":!0,max:359,min:0,onChange:event=>{setAccentHue(Number(event.currentTarget.value))},type:"range",value:currentAccentHue},copyExport,exportButtonProps:{"data-ui-theme-export":!0,onClick:()=>{copyExport().catch(()=>null)},type:"button"},exportFormat:currentExportFormat,exportValue,getExportFormatProps,getModeProps,getSchemeProps,hueProps:{"data-ui-theme-brand-hue":!0,max:359,min:0,onChange:event=>{setHue(Number(event.currentTarget.value))},type:"range",value:currentHue},outputProps:{"data-ui-theme-output":!0,readOnly:!0,value:exportValue},previewStyle,primaryColorProps:{"data-ui-theme-primary-color":!0,onChange:event=>{setPrimaryColor(event.currentTarget.value)},type:"color",value:currentPrimaryColor},rootProps:{"data-ui-theme-builder":!0},secondaryColorProps:{"data-ui-theme-secondary-color":!0,onChange:event=>{setSecondaryColor(event.currentTarget.value)},type:"color",value:currentSecondaryColor},setAccentHue,setExportFormat,setHue,setMode,setPrimaryColor,setScheme,setSecondaryColor}},useTooltip=({defaultOpen=!1,delay=250,id,onOpenChange,open}={})=>{const tooltipId=useSafeId("ui-tooltip",id),timerRef=useRef(void 0),[isOpen,setIsOpen]=useControllableState({defaultValue:defaultOpen,onChange:onOpenChange,value:open}),close=useCallback(()=>{clearTimeout(timerRef.current),setIsOpen(!1)},[setIsOpen]),scheduleOpen=useCallback(nextDelay=>{clearTimeout(timerRef.current),timerRef.current=setTimeout(()=>{setIsOpen(!0)},nextDelay)},[setIsOpen]);return useEffect(()=>()=>{clearTimeout(timerRef.current)},[]),{close,open:isOpen,rootProps:{"aria-describedby":isOpen?tooltipId:void 0,"data-ui-tooltip":!0,onBlur:event=>{event.currentTarget.contains(event.relatedTarget)||close()},onFocus:()=>{scheduleOpen(0)},onKeyDown:event=>{event.defaultPrevented||event.nativeEvent.isComposing||event.key==="Escape"&&isOpen&&(event.preventDefault(),close())},onMouseEnter:()=>{scheduleOpen(delay)},onMouseLeave:close},setOpen:setIsOpen,tooltipProps:{hidden:!isOpen,id:tooltipId,role:"tooltip"}}},useThemeToggle=(defaultTheme="light")=>{const[theme,setTheme]=useState(()=>typeof window<"u"?localStorage.getItem("theme")??(document.documentElement.classList.contains("dark")?"dark":"light"):defaultTheme);return useEffect(()=>{const doc=document.documentElement;doc.setAttribute("data-theme",theme),theme==="dark"?doc.classList.add("dark"):doc.classList.remove("dark"),localStorage.setItem("theme",theme),window.dispatchEvent(new CustomEvent("theme-change",{detail:theme}))},[theme]),{theme,toggleTheme:event=>{const isDark=theme==="dark",newTheme=isDark?"light":"dark",prefersReducedMotion=window.matchMedia("(prefers-reduced-motion: reduce)").matches,isTouchDevice=window.matchMedia("(hover: none) and (pointer: coarse)").matches;if(prefersReducedMotion||isTouchDevice||!event){setTheme(newTheme);return}const rect=event.currentTarget.getBoundingClientRect(),x=Math.round(rect.left+rect.width/2),y=Math.round(rect.top+rect.height/2),maxRadius=Math.hypot(Math.max(x,window.innerWidth-x),Math.max(y,window.innerHeight-y)),oldBg=isDark?"hsl(277 20% 10%)":"hsl(268 20% 98%)",overlay=document.createElement("div");overlay.setAttribute("aria-hidden","true"),Object.assign(overlay.style,{position:"fixed",inset:"0",zIndex:"99999",pointerEvents:"none",backgroundColor:oldBg,clipPath:`circle(${maxRadius}px at ${x}px ${y}px)`,willChange:"clip-path"}),document.body.appendChild(overlay),setTheme(newTheme),requestAnimationFrame(()=>{requestAnimationFrame(()=>{overlay.style.transition="clip-path 580ms cubic-bezier(0.4, 0, 0.2, 1)",overlay.style.clipPath=`circle(0px at ${x}px ${y}px)`;const done=()=>{overlay.remove()};overlay.addEventListener("transitionend",done,{once:!0}),setTimeout(done,750)})})},setTheme}};export{useCalendar,useContextMenu,useDateRangePicker,useDialog,useDropdownMenu,useFormValidation,useInputOTP,useKanban,useLanguageToggle,usePopover,useResizable,useRichTextEditor,useSchedule,useSelect,useTabs,useThemeBuilder,useThemeToggle,useToast,useTooltip};
|
|
1
|
+
"use client";import{useCallback,useEffect,useId,useLayoutEffect,useMemo,useRef,useState}from"react";import{coerceThemeBuilderExportFormat,composeClassName,createLumenKanbanMoveDetail,createThemeBuilderTokens,exportThemeBuilderValue,getLumenDirectionalKey,getLumenLocalePair,normalizeLumenLocales,scrollLumenTabIntoView}from"@santi020k/lumen-core";import{isLumenDateBoundsValid as isCalendarBoundsValid,parseLumenDate as parseCalendarDate,resolveLumenDateLabels as resolveDateControlLabels,resolveLumenDateLocale as getCalendarLocale}from"@santi020k/lumen-core";import{useDialogLifecycle}from"./dialog-lifecycle.js";import{useFloatingPanel}from"./floating-panel.js";import{isLumenFormControl}from"./form-workflow.js";import{useSelectFormReset}from"./select-form.js";import{useToast}from"./toast-context.js";const setRefValue=(ref,value)=>{typeof ref=="function"?ref(value):ref&&(ref.current=value)};import{useRichTextEditor}from"./rich-text-editor.js";const focusableSelector=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),composeHandlers=(userHandler,lumenHandler)=>event=>{userHandler?.(event),lumenHandler(event)},isElementVisible=element=>{if(typeof element.checkVisibility=="function")return element.checkVisibility({visibilityProperty:!0});const visibility=getComputedStyle(element).visibility;return visibility==="hidden"||visibility==="collapse"?!1:element.offsetParent!==null||element.getClientRects().length>0},getFocusable=root=>root?[...root.querySelectorAll(focusableSelector)].filter(element=>!element.matches(":disabled")&&!element.closest("[hidden], [inert]")&&isElementVisible(element)):[],getLoopedIndex=(key,currentIndex,itemCount,forwardKeys)=>{const lastIndex=itemCount-1;return key==="Home"?0:key==="End"?lastIndex:forwardKeys.includes(key)?(currentIndex+1)%itemCount:(currentIndex-1+itemCount)%itemCount},useSafeId=(prefix,id)=>{const reactId=useId().replaceAll(":","");return id??`${prefix}-${reactId}`},useControllableState=({defaultValue,onChange,value})=>{const[uncontrolledValue,setUncontrolledValue]=useState(defaultValue),pendingValueRef=useRef(defaultValue),currentValue=value??uncontrolledValue,setValue=useCallback(next=>{const previousValue=value===void 0?pendingValueRef.current:currentValue,resolvedValue=typeof next=="function"?next(previousValue):next;value===void 0&&(pendingValueRef.current=resolvedValue,setUncontrolledValue(resolvedValue)),onChange?.(resolvedValue)},[currentValue,onChange,value]),restoreValue=useCallback(next=>{value===void 0&&(pendingValueRef.current=next,setUncontrolledValue(next))},[value]);return[currentValue,setValue,restoreValue]},focusFirstIn=root=>{globalThis.setTimeout(()=>{getFocusable(root)[0]?.focus()})},focusTrigger=trigger=>{trigger?.focus({preventScroll:!0})},clampViewportPosition=(value,size,viewportSize)=>Math.max(8,Math.min(value,viewportSize-size-8)),getContextMenuPosition=(x,y,rect)=>{const width=rect?.width??0,height=rect?.height??0,viewportWidth=typeof window>"u"?x+width+16:window.innerWidth,viewportHeight=typeof window>"u"?y+height+16:window.innerHeight;return{left:clampViewportPosition(x,width,viewportWidth),top:clampViewportPosition(y,height,viewportHeight)}},isDisclosureEditableTarget=(target,panel)=>{const ElementType=panel.ownerDocument.defaultView?.Element;if(!ElementType||!(target instanceof ElementType))return!1;if(target.closest("input, textarea"))return!0;const editable=target.closest("[contenteditable]")?.getAttribute("contenteditable")?.toLowerCase();return editable===""||editable==="true"||editable==="plaintext-only"},useOutsideClose=(open,refs,onClose)=>{useEffect(()=>{const owner=refs.find(ref=>ref.current)?.current?.ownerDocument,NodeType=owner?.defaultView?.Node;if(!open||!owner||!NodeType)return;const pointerDown=event=>{const target=event.target;target instanceof NodeType&&!refs.some(ref=>ref.current?.contains(target))&&onClose()};return owner.addEventListener("pointerdown",pointerDown),()=>{owner.removeEventListener("pointerdown",pointerDown)}},[onClose,open,refs])},useDisclosureController=(options,hasPopup)=>{const rootRef=useRef(null),triggerRef=useRef(null),panelRef=useRef(null),panelId=useSafeId(`ui-${hasPopup}`,options.id),[open,setOpen]=useControllableState({defaultValue:options.defaultOpen??!1,onChange:options.onOpenChange,value:options.open}),close=useCallback(()=>{setOpen(!1)},[setOpen]),toggle=useCallback(()=>{setOpen(current=>!current)},[setOpen]);return useOutsideClose(open,[rootRef,triggerRef,panelRef],close),useFloatingPanel(open,triggerRef,panelRef,close,options),{close,open,panelProps:{"data-state":open?"open":"closed",hidden:!open,id:panelId,onKeyDown:event=>{if(event.defaultPrevented||event.nativeEvent.isComposing)return;if(event.key==="Escape"){event.preventDefault(),close(),focusTrigger(triggerRef.current);return}if(isDisclosureEditableTarget(event.target,event.currentTarget)||!["ArrowDown","ArrowUp","Home","End"].includes(event.key))return;const items=getFocusable(panelRef.current);if(!items.length)return;event.preventDefault();const currentIndex=items.indexOf(document.activeElement);items[getLoopedIndex(getLumenDirectionalKey(event.currentTarget,event.key),Math.max(0,currentIndex),items.length,["ArrowDown"])]?.focus()},ref:panelRef},panelRef,rootProps:{ref:rootRef},rootRef,setOpen,toggle,triggerProps:{"aria-controls":panelId,"aria-expanded":open,"aria-haspopup":hasPopup,"data-ui-trigger":!0,onClick:event=>{event.defaultPrevented||(focusTrigger(triggerRef.current),toggle())},onKeyDown:event=>{if(!(event.defaultPrevented||event.nativeEvent.isComposing)){if(event.key==="Escape"&&open){event.preventDefault(),close();return}event.key!=="ArrowDown"&&event.key!=="Enter"&&event.key!==" "||(event.preventDefault(),setOpen(!0),focusFirstIn(panelRef.current))}},ref:triggerRef,type:"button"},triggerRef}},isDialogBackdropPoint=(dialog,event)=>{if(!dialog||event.target!==dialog)return!1;const bounds=dialog.getBoundingClientRect();return event.clientX<bounds.left||event.clientX>=bounds.right||event.clientY<bounds.top||event.clientY>=bounds.bottom},useDialog=(options={})=>{const dialogRef=useRef(null),triggerRef=useRef(null),outsidePointerRef=useRef(void 0),[open,setOpen]=useControllableState({defaultValue:options.defaultOpen??!1,onChange:options.onOpenChange,value:options.open}),consumeProgrammaticClose=useDialogLifecycle(open,dialogRef,triggerRef),close=useCallback(()=>{setOpen(!1)},[setOpen]),dialogProps={"aria-modal":!0,"data-ui-alert-dialog":options.alert?!0:void 0,"data-ui-bound":!0,"data-ui-dialog":options.alert?void 0:!0,onCancel:event=>{event.target!==dialogRef.current||event.defaultPrevented||(event.preventDefault(),event.stopPropagation(),options.dismissOnEscape!==!1&&close())},onClick:event=>{const startedOutside=outsidePointerRef.current;outsidePointerRef.current=void 0,!(event.defaultPrevented||startedOutside===!1||event.detail===0)&&(options.dismissOnOutsidePress??!options.alert)&&isDialogBackdropPoint(dialogRef.current,event)&&close()},onClose:event=>{event.target!==dialogRef.current||consumeProgrammaticClose()||close()},onPointerDown:event=>{outsidePointerRef.current=isDialogBackdropPoint(dialogRef.current,event)},ref:dialogRef,role:options.alert?"alertdialog":"dialog"};return{close,closeProps:{onClick:close,type:"button"},dialogProps,dialogRef,open,setOpen,triggerProps:{"aria-haspopup":"dialog",onClick:()=>{setOpen(!0)},ref:element=>{triggerRef.current=element},type:"button"},triggerRef}},usePopover=(options={})=>useDisclosureController(options,"menu"),useDropdownMenu=(options={})=>useDisclosureController(options,"menu"),readLanguageStorage=storageKey=>{if(!storageKey)return null;try{return localStorage.getItem(storageKey)}catch{return null}},useLanguageToggle=({defaultValue,locales:localeOptions,onValueChange,storageKey,value:controlledValue}={})=>{const locales=useMemo(()=>normalizeLumenLocales(localeOptions),[localeOptions]),defaultPair=getLumenLocalePair(locales,defaultValue),[internalValue,setInternalValue]=useState(defaultPair.current.value),value=controlledValue??internalValue,pair=getLumenLocalePair(locales,value),initializedRef=useRef(!1);return useEffect(()=>{if(controlledValue===void 0){if(!initializedRef.current){initializedRef.current=!0;const preferredValue=readLanguageStorage(storageKey)??defaultValue??document.documentElement.lang;if(preferredValue&&preferredValue!==value&&locales.some(locale=>locale.value===preferredValue)){setInternalValue(preferredValue);return}}if(document.documentElement.lang=value,storageKey)try{localStorage.setItem(storageKey,value)}catch{}}},[controlledValue,defaultValue,locales,storageKey,value]),{currentLocale:pair.current,nextLocale:pair.next,selectNext:()=>{controlledValue===void 0&&setInternalValue(pair.next.value),onValueChange?.(pair.next.value)},value:pair.current.value}},useContextMenu=({defaultOpen=!1,id,onOpenChange,open:controlledOpen}={})=>{const menuRef=useRef(null),triggerRef=useRef(null),menuId=useSafeId("ui-context-menu",id),[position,setPosition]=useState({left:0,top:0}),[open,setOpen]=useControllableState({defaultValue:defaultOpen,onChange:onOpenChange,value:controlledOpen}),close=useCallback(()=>{setOpen(!1)},[setOpen]);useOutsideClose(open,[triggerRef,menuRef],close);const openAt=useCallback((x,y)=>{const rect=menuRef.current?.getBoundingClientRect();setPosition(getContextMenuPosition(x,y,rect)),setOpen(!0),focusFirstIn(menuRef.current)},[setOpen]),triggerProps={"aria-controls":menuId,"aria-haspopup":"menu","data-ui-context-menu-trigger":menuId,onContextMenu:event=>{event.preventDefault(),openAt(event.clientX,event.clientY)},onKeyDown:event=>{if(event.key!=="ContextMenu"&&!(event.shiftKey&&event.key==="F10"))return;event.preventDefault();const rect=event.currentTarget.getBoundingClientRect();openAt(rect.left+16,rect.top+16)},ref:triggerRef,type:"button"},menuProps={"data-state":open?"open":"closed","data-ui-context-menu":!0,hidden:!open,id:menuId,onClick:event=>{const ElementType=event.currentTarget.ownerDocument.defaultView?.Element;if(!ElementType)return;let item;try{item=ElementType.prototype.closest.call(event.target,'[role="menuitem"]')}catch{return}item&&close()},onKeyDown:event=>{if(event.defaultPrevented||event.nativeEvent.isComposing)return;if(event.key==="Escape"){event.preventDefault(),close(),focusTrigger(triggerRef.current);return}if(!["ArrowDown","ArrowUp","End","Home"].includes(event.key))return;const items=getFocusable(menuRef.current);if(items.length===0)return;event.preventDefault();const activeElement=event.currentTarget.ownerDocument.activeElement,currentIndex=items.findIndex(item=>item===activeElement);items[getLoopedIndex(getLumenDirectionalKey(event.currentTarget,event.key),currentIndex,items.length,["ArrowDown"])]?.focus()},ref:menuRef,role:"menu",style:{left:position.left,position:"fixed",top:position.top,zIndex:60}};return{close,menuProps,menuRef,open,openAt,setOpen,triggerProps,triggerRef}},useTabs=({defaultValue="",id,onValueChange,orientation="horizontal",value}={})=>{const rootRef=useRef(null),tabsId=useSafeId("ui-tabs",id),[selectedValue,setSelectedValue]=useControllableState({defaultValue,onChange:onValueChange,value}),activate=useCallback(nextValue=>{setSelectedValue(nextValue)},[setSelectedValue]),getTriggerProps=useCallback((triggerValue,props={})=>{const selected=selectedValue===triggerValue,triggerId=`${tabsId}-tab-${triggerValue}`,panelId=`${tabsId}-panel-${triggerValue}`;return{...props,"aria-controls":panelId,"aria-selected":selected,id:props.id??triggerId,onClick:composeHandlers(props.onClick,event=>{activate(triggerValue),scrollLumenTabIntoView(event.currentTarget)}),onKeyDown:composeHandlers(props.onKeyDown,event=>{if(!(orientation==="vertical"?["ArrowUp","ArrowDown","Home","End"]:["ArrowLeft","ArrowRight","Home","End"]).includes(event.key))return;const tabs=rootRef.current?[...rootRef.current.querySelectorAll('[role="tab"]')].filter(tab=>tab.closest("[data-ui-tabs]")===rootRef.current&&!tab.matches(':disabled, [aria-disabled="true"]')):[];if(!tabs.length)return;event.preventDefault();const currentIndex=tabs.indexOf(event.currentTarget),nextTab=tabs[getLoopedIndex(event.key,Math.max(0,currentIndex),tabs.length,orientation==="vertical"?["ArrowDown"]:[getLumenDirectionalKey(event.currentTarget,"ArrowRight")])],nextValue=nextTab?.dataset.value;!nextTab||!nextValue||(activate(nextValue),scrollLumenTabIntoView(nextTab),nextTab.focus())}),role:"tab",tabIndex:selected?0:-1,type:props.type??"button","data-value":triggerValue}},[activate,orientation,selectedValue,tabsId]);return{getPanelProps:useCallback((panelValue,props={})=>{const selected=selectedValue===panelValue;return{...props,"aria-labelledby":`${tabsId}-tab-${panelValue}`,hidden:!selected,id:props.id??`${tabsId}-panel-${panelValue}`,role:"tabpanel",tabIndex:props.tabIndex??0}},[selectedValue,tabsId]),getTriggerProps,listProps:{"aria-orientation":orientation,role:"tablist"},rootProps:{"data-ui-tabs":!0,ref:rootRef},rootRef,setValue:setSelectedValue,value:selectedValue}},normalizeOption=option=>typeof option=="string"?{label:option,value:option}:option,isPrintableKey=event=>event.key.length===1&&!event.altKey&&!event.ctrlKey&&!event.metaKey,useSelect=({defaultValue="",disabled=!1,id,name,onValueChange,options=[],placeholder,required=!1,value}={})=>{const rootRef=useRef(null),triggerRef=useRef(null),listRef=useRef(null),typeaheadRef=useRef(""),typeaheadTimerRef=useRef(void 0),selectId=useSafeId("ui-select",id),listId=`${selectId}-listbox`,normalizedOptions=useMemo(()=>options.map(normalizeOption),[options]),[open,setOpen]=useState(!1),[selectedValue,setSelectedValue,restoreSelectedValue]=useControllableState({defaultValue,onChange:onValueChange,value}),selectedOption=normalizedOptions.find(option=>option.value===selectedValue),triggerText=selectedOption?.label??placeholder??"Select an option",hasSelection=!!(selectedOption&&selectedValue!==""),pendingFocusRef=useRef(void 0),[focusRequest,setFocusRequest]=useState(0),close=useCallback(()=>{pendingFocusRef.current=void 0,setOpen(!1)},[setOpen]),openAndFocus=useCallback(focus=>{pendingFocusRef.current=focus,setOpen(!0),setFocusRequest(request=>request+1)},[setOpen]);useLayoutEffect(()=>{const focus=pendingFocusRef.current;!open||!focus||(pendingFocusRef.current=void 0,focus())},[focusRequest,open]),useSelectFormReset(rootRef,defaultValue,value,restoreSelectedValue,close),useOutsideClose(open,[rootRef,triggerRef,listRef],close),useEffect(()=>()=>{typeaheadTimerRef.current&&clearTimeout(typeaheadTimerRef.current)},[]);const getEnabledItems=useCallback(()=>listRef.current?[...listRef.current.querySelectorAll("[data-ui-select-option]")].filter(item=>!item.hasAttribute("disabled")&&item.getAttribute("aria-disabled")!=="true"):[],[]),focusOption=useCallback((key,currentItem)=>{const items=getEnabledItems();if(!items.length)return;const selectedItem=items.find(item=>item.getAttribute("aria-selected")==="true"),current=currentItem??selectedItem??items[0];if(!current)return;const currentIndex=items.indexOf(current);items[getLoopedIndex(key,Math.max(0,currentIndex),items.length,["ArrowDown"])]?.focus()},[getEnabledItems]),focusTypeaheadOption=useCallback((typeahead,currentItem)=>{const items=getEnabledItems();if(!items.length||!typeahead)return;const selectedItem=items.find(item=>item.getAttribute("aria-selected")==="true"),current=currentItem??selectedItem??items[0];if(!current)return;const currentIndex=items.indexOf(current),startIndex=Math.max(0,currentIndex+1);[...items.slice(startIndex),...items.slice(0,startIndex)].find(item=>item.textContent.trim().toLowerCase().startsWith(typeahead))?.focus()},[getEnabledItems]),resetTypeahead=useCallback(()=>{typeaheadRef.current="",typeaheadTimerRef.current&&(clearTimeout(typeaheadTimerRef.current),typeaheadTimerRef.current=void 0)},[]),handleTypeahead=useCallback((event,currentItem)=>{if(!isPrintableKey(event)||event.key===" "&&(!typeaheadRef.current||!open))return!1;event.preventDefault(),typeaheadRef.current+=event.key.toLowerCase(),typeaheadTimerRef.current&&clearTimeout(typeaheadTimerRef.current),typeaheadTimerRef.current=setTimeout(()=>{typeaheadRef.current=""},700);const query=typeaheadRef.current;return openAndFocus(()=>{focusTypeaheadOption(query,currentItem)}),!0},[focusTypeaheadOption,open,openAndFocus]),selectOption=useCallback(nextValue=>{const option=normalizedOptions.find(item=>item.value===nextValue);if(!option||option.disabled)return;const native=rootRef.current?.querySelector("[data-ui-select-native]");native?(native.value=nextValue,native.dispatchEvent(new Event("change",{bubbles:!0}))):setSelectedValue(nextValue),close(),focusTrigger(triggerRef.current)},[close,normalizedOptions,setSelectedValue]),rootProps={"data-placeholder":hasSelection?"false":"true","data-ui-select":!0,onBlur:event=>{const next=event.relatedTarget,NodeType=event.currentTarget.ownerDocument.defaultView?.Node;NodeType&&next instanceof NodeType&&event.currentTarget.contains(next)||(resetTypeahead(),close())},ref:rootRef},controlProps={"data-ui-select-control":!0},nativeSelectProps={"aria-hidden":!0,"data-ui-enhanced":!0,"data-ui-select-native":!0,disabled,id:selectId,name,onChange:event=>{setSelectedValue(event.currentTarget.value)},required,tabIndex:-1,value:selectedValue},triggerProps={"aria-controls":listId,"aria-expanded":open,"aria-haspopup":"listbox","aria-required":required||void 0,"data-ui-select-trigger":!0,disabled,id:`${selectId}-trigger`,onClick:()=>{resetTypeahead(),setOpen(current=>!current)},onKeyDown:event=>{if(event.defaultPrevented||event.nativeEvent.isComposing||handleTypeahead(event))return;if(event.key==="Escape"&&open){event.preventDefault(),close();return}if(!["ArrowDown","ArrowUp","Home","End","Enter"," "].includes(event.key))return;event.preventDefault(),resetTypeahead();const{key}=event;openAndFocus(()=>{if(key==="Enter"||key===" "){const items=getEnabledItems();(items.find(item=>item.getAttribute("aria-selected")==="true")??items[0])?.focus();return}focusOption(key)})},ref:triggerRef,role:"combobox",type:"button"},listProps={"data-state":open?"open":"closed","data-ui-select-list":!0,hidden:!open,id:listId,ref:listRef,role:"listbox"},getOptionProps=useCallback((option,props={})=>({...props,"aria-disabled":option.disabled?"true":void 0,"aria-selected":selectedValue===option.value,"data-ui-select-option":!0,"data-value":option.value,disabled:option.disabled,onClick:composeHandlers(props.onClick,()=>{selectOption(option.value)}),onKeyDown:composeHandlers(props.onKeyDown,event=>{if(event.defaultPrevented||event.nativeEvent.isComposing||handleTypeahead(event,event.currentTarget))return;if(event.key==="Escape"&&open){event.preventDefault(),close(),focusTrigger(triggerRef.current);return}if(event.key==="Enter"||event.key===" "){event.preventDefault(),selectOption(option.value);return}["ArrowDown","ArrowUp","Home","End"].includes(event.key)&&(event.preventDefault(),resetTypeahead(),focusOption(event.key,event.currentTarget))}),role:"option",tabIndex:-1,type:props.type??"button"}),[close,focusOption,handleTypeahead,open,resetTypeahead,selectOption,selectedValue]);return{close,controlProps,getOptionProps,listProps,nativeSelectProps,open,options:normalizedOptions,rootProps,rootRef,selectOption,selectedOption,setOpen,triggerProps,triggerText,value:selectedValue}},fieldControlSelector=['input:not([type="hidden"])',"select","textarea",'[contenteditable="true"]','[role="combobox"]','[role="listbox"]','[role="spinbutton"]','[role="textbox"]'].join(","),fieldDescriptionSelector="[data-ui-field-hint], [data-ui-field-error], .ui-field__hint, .ui-field__error",fieldErrorSelector="[data-ui-field-error], .ui-field__error",formControlSelector=['input:not([type="hidden"])',"select","textarea"].join(","),validityMessageAttributes=[["valueMissing","data-error-required"],["typeMismatch","data-error-type"],["patternMismatch","data-error-pattern"],["tooShort","data-error-too-short"],["tooLong","data-error-too-long"],["rangeUnderflow","data-error-min"],["rangeOverflow","data-error-max"],["stepMismatch","data-error-step"],["badInput","data-error-bad-input"],["customError","data-error-custom"]],isNativeFormControl=element=>element!==null&&isLumenFormControl(element),getFieldRoot=control=>control.closest(".ui-field, [data-ui-field]"),getValidationMessage=(control,field)=>{for(const[validityKey,attributeName]of validityMessageAttributes)if(control.validity[validityKey])return control.getAttribute(attributeName)??field?.getAttribute(attributeName)??control.validationMessage;return control.validationMessage},getFieldDescriptionId=element=>(element.id||(element.id=`ui-field-description-${Math.random().toString(36).slice(2)}`),element.id),syncFieldDescription=field=>{const controlId=field.dataset.uiFieldControl,control=controlId?document.getElementById(controlId):field.querySelector(fieldControlSelector);if(!(control instanceof HTMLElement))return;const existingIds=control.getAttribute("aria-describedby")?.trim().split(/\s+/)??[],configuredIds=field.dataset.uiFieldDescribedby?.trim().split(/\s+/)??[],descriptionIds=[...field.querySelectorAll(fieldDescriptionSelector)].map(element=>getFieldDescriptionId(element)),describedBy=[...new Set([...existingIds,...configuredIds,...descriptionIds].filter(Boolean))];describedBy.length&&control.setAttribute("aria-describedby",describedBy.join(" "))},useFormValidation=({onInvalid,onValid,onValidate}={})=>{const formRef=useRef(null),setFieldValidity=useCallback((control,invalid,message="")=>{const field=getFieldRoot(control);if(invalid?(control.setAttribute("aria-invalid","true"),control.dataset.uiValidationInvalid="true"):control.dataset.uiValidationInvalid==="true"&&(control.removeAttribute("aria-invalid"),delete control.dataset.uiValidationInvalid),!!field){field.dataset.invalid=String(invalid);for(const error of field.querySelectorAll(fieldErrorSelector))error.dataset.uiValidationErrorBound="true",error.hidden=!invalid,error.textContent=invalid?message:""}},[]),getControls=useCallback((form=formRef.current)=>form?[...form.elements].filter(isNativeFormControl).filter(control=>control.matches(formControlSelector)&&control.form===form&&!control.matches(":disabled")):[],[]),validateControl=useCallback((control,form=formRef.current??control.form)=>{if(!form)return!0;const validateDetail={control,form,value:control.value};form.dispatchEvent(new CustomEvent("ui:validate",{bubbles:!0,detail:validateDetail})),onValidate?.(validateDetail);const invalid=!control.validity.valid,message=invalid?getValidationMessage(control,getFieldRoot(control)):"";return setFieldValidity(control,invalid,message),!invalid},[onValidate,setFieldValidity]),validateForm=useCallback((form=formRef.current)=>form?getControls(form).filter(control=>!validateControl(control,form)):[],[getControls,validateControl]),emitState=useCallback((name,detail)=>{detail.form.dispatchEvent(new CustomEvent(name,{bubbles:!0,detail})),name==="ui:invalid"?onInvalid?.(detail):onValid?.(detail)},[onInvalid,onValid]),syncFields=useCallback(form=>{for(const field of form.querySelectorAll(".ui-field, [data-ui-field]"))syncFieldDescription(field)},[]);return{formProps:{"data-ui-form":!0,noValidate:!0,onBlur:event=>{const form=event.currentTarget;if(syncFields(form),!isNativeFormControl(event.target)||event.target.form!==form)return;const valid=validateControl(event.target,form);emitState(valid?"ui:valid":"ui:invalid",valid?{control:event.target,form}:{control:event.target,controls:[event.target],form})},onSubmit:event=>{const form=event.currentTarget;syncFields(form);const invalidControls=validateForm(form);if(invalidControls.length){event.preventDefault();const firstInvalid=invalidControls[0];if(!firstInvalid)return;emitState("ui:invalid",{control:firstInvalid,controls:invalidControls,form}),firstInvalid.focus({preventScroll:!0}),firstInvalid.reportValidity();return}emitState("ui:valid",{controls:getControls(form),form})},ref:formRef},formRef,getControls,setFieldValidity,validateControl,validateForm}},calendarMonthPattern=/^\d{4}-\d{2}$/,parseCalendarMonth=value=>!value||!calendarMonthPattern.test(value)?null:parseCalendarDate(`${value}-01`),createCalendarDate=(year,month,day)=>{const date=new Date(0);return date.setUTCFullYear(year,month,day),date},formatCalendarDate=date=>date.toISOString().split("T")[0]??"",formatCalendarMonth=date=>formatCalendarDate(date).slice(0,-3),startOfCalendarMonth=date=>createCalendarDate(date.getUTCFullYear(),date.getUTCMonth(),1),addCalendarDays=(date,days)=>createCalendarDate(date.getUTCFullYear(),date.getUTCMonth(),date.getUTCDate()+days),getCalendarDaysInMonth=date=>createCalendarDate(date.getUTCFullYear(),date.getUTCMonth()+1,0).getUTCDate(),addCalendarMonths=(date,months)=>{const targetMonth=createCalendarDate(date.getUTCFullYear(),date.getUTCMonth()+months,1),day=Math.min(date.getUTCDate(),getCalendarDaysInMonth(targetMonth));return createCalendarDate(targetMonth.getUTCFullYear(),targetMonth.getUTCMonth(),day)},getCalendarToday=()=>{const today=new Date;return createCalendarDate(today.getFullYear(),today.getMonth(),today.getDate())},compareCalendarDates=(date,other)=>other?Math.sign(date.getTime()-other.getTime()):0,isCalendarDateDisabled=(disabled,date,min,max)=>disabled||compareCalendarDates(date,min)<0||compareCalendarDates(date,max)>0,clampCalendarDate=(date,min,max)=>min&&compareCalendarDates(date,min)<0?min:max&&compareCalendarDates(date,max)>0?max:date,getCalendarGridStart=month=>addCalendarDays(month,-((month.getUTCDay()+6)%7)),coerceCalendarDate=value=>value instanceof Date?value:parseCalendarDate(value),getCalendarFocusDate=(disabled,month,min,max,selectedDate,requestedDate)=>{const today=getCalendarToday(),candidates=[requestedDate,selectedDate,today,month];for(const candidate of candidates)if(candidate&&formatCalendarMonth(candidate)===formatCalendarMonth(month)&&!isCalendarDateDisabled(disabled,candidate,min,max))return candidate;for(let index=0;index<getCalendarDaysInMonth(month);index+=1){const date=addCalendarDays(month,index);if(!isCalendarDateDisabled(disabled,date,min,max))return date}return month},formatSelectedCalendarDate=value=>value?formatCalendarDate(value):"",useCalendar=({defaultValue,disabled:requestedDisabled=!1,labels,locale,max,min,month,name,onValueChange,readOnly=!1,value:controlledValue}={})=>{const disabled=requestedDisabled||!isCalendarBoundsValid(min,max),rootRef=useRef(null),labelId=`${`ui-calendar-${useId()}`}-label`,minDate=parseCalendarDate(min??"0001-01-01"),maxDate=parseCalendarDate(max??"9999-12-31"),defaultDate=parseCalendarDate(defaultValue),controlledDate=parseCalendarDate(controlledValue),[uncontrolledValue,setUncontrolledValue]=useState(()=>defaultDate?formatCalendarDate(defaultDate):""),selectedValue=controlledValue===void 0?uncontrolledValue:formatSelectedCalendarDate(controlledDate),selectedDate=parseCalendarDate(selectedValue),initialMonth=parseCalendarMonth(month)??(selectedDate?startOfCalendarMonth(selectedDate):null)??startOfCalendarMonth(getCalendarToday()),[visibleMonthValue,setVisibleMonthValue]=useState(()=>formatCalendarMonth(initialMonth)),visibleMonth=parseCalendarMonth(month??visibleMonthValue)??initialMonth,[focusValue,setFocusValue]=useState(null);useEffect(()=>{const root=rootRef.current,owner=root?.closest("form");let active=!0,resetTimer;const reset=event=>{globalThis.clearTimeout(resetTimer),resetTimer=globalThis.setTimeout(()=>{if(!active||event.defaultPrevented||!root?.isConnected)return;const date=parseCalendarDate(defaultValue);controlledValue===void 0&&setUncontrolledValue(date?formatCalendarDate(date):"");const resetMonth=parseCalendarMonth(month)??startOfCalendarMonth(date??getCalendarToday());setVisibleMonthValue(formatCalendarMonth(resetMonth)),setFocusValue(null)})};return owner?.addEventListener("reset",reset),()=>{active=!1,globalThis.clearTimeout(resetTimer),owner?.removeEventListener("reset",reset)}},[controlledValue,defaultValue,month]);const focusDate=getCalendarFocusDate(disabled,visibleMonth,minDate,maxDate,selectedDate,parseCalendarDate(focusValue)),focusIso=formatCalendarDate(focusDate);useEffect(()=>{const root=rootRef.current;root?.contains(root.ownerDocument.activeElement)&&root.ownerDocument.activeElement?.getAttribute("role")==="gridcell"&&root.querySelector('[role="gridcell"][tabindex="0"]')?.focus({preventScroll:!0})},[focusIso]);const selectedIso=selectedDate?formatCalendarDate(selectedDate):"",currentLocale=getCalendarLocale(locale||"en"),navigationLabels={...resolveDateControlLabels(currentLocale),...labels},monthFormatter=useMemo(()=>new Intl.DateTimeFormat(currentLocale,{month:"long",timeZone:"UTC",year:"numeric"}),[currentLocale]),dayFormatter=useMemo(()=>new Intl.DateTimeFormat(currentLocale,{day:"numeric",month:"long",timeZone:"UTC",weekday:"long",year:"numeric"}),[currentLocale]),weekdayFormatter=useMemo(()=>new Intl.DateTimeFormat(currentLocale,{timeZone:"UTC",weekday:"short"}),[currentLocale]),todayIso=formatCalendarDate(getCalendarToday()),label=monthFormatter.format(visibleMonth),weekdays=useMemo(()=>Array.from({length:7},(_,index)=>weekdayFormatter.format(new Date(Date.UTC(2026,0,5+index)))),[weekdayFormatter]),weeks=useMemo(()=>{const firstCell=getCalendarGridStart(visibleMonth);return Array.from({length:6},(_,rowIndex)=>Array.from({length:7},(_2,columnIndex)=>{const date=addCalendarDays(firstCell,rowIndex*7+columnIndex),dateIso=formatCalendarDate(date),unavailable=isCalendarDateDisabled(disabled,date,minDate,maxDate);return{date:dateIso,day:date.getUTCDate(),disabled:unavailable,label:dayFormatter.format(date),outside:formatCalendarMonth(date)!==formatCalendarMonth(visibleMonth),selected:selectedIso===dateIso,tabIndex:!unavailable&&focusIso===dateIso?0:-1,today:todayIso===dateIso}}))},[dayFormatter,disabled,focusIso,maxDate,minDate,selectedIso,todayIso,visibleMonth]),focusCalendarDate=dateInput=>{const date=coerceCalendarDate(dateInput);if(!date)return;const nextDate=clampCalendarDate(date,minDate,maxDate);setVisibleMonthValue(formatCalendarMonth(startOfCalendarMonth(nextDate))),setFocusValue(formatCalendarDate(nextDate))},selectDate=dateInput=>{if(disabled||readOnly)return;const date=coerceCalendarDate(dateInput);if(!date)return;const nextDate=clampCalendarDate(date,minDate,maxDate);if(isCalendarDateDisabled(disabled,nextDate,minDate,maxDate))return;const nextValue=formatCalendarDate(nextDate);controlledValue===void 0&&setUncontrolledValue(nextValue),setVisibleMonthValue(formatCalendarMonth(startOfCalendarMonth(nextDate))),setFocusValue(nextValue),onValueChange?.(nextValue)},moveFocus=(currentDate,key)=>{const column=(currentDate.getUTCDay()+6)%7,keyOffsets={ArrowDown:7,ArrowLeft:-1,ArrowRight:1,ArrowUp:-7,End:6-column,Home:-column};if(key==="PageDown"||key==="PageUp"){focusCalendarDate(addCalendarMonths(currentDate,key==="PageDown"?1:-1));return}const directionRoot=rootRef.current,offset=keyOffsets[directionRoot?getLumenDirectionalKey(directionRoot,key):key];offset!==void 0&&focusCalendarDate(addCalendarDays(currentDate,offset))},previousMonthLastDay=addCalendarDays(visibleMonth,-1),nextMonthFirstDay=addCalendarMonths(visibleMonth,1),previousDisabled=disabled||compareCalendarDates(previousMonthLastDay,minDate)<0,nextDisabled=disabled||compareCalendarDates(nextMonthFirstDay,maxDate)>0;return{focusDate:focusCalendarDate,getDayProps:(day,props={})=>({...props,"aria-disabled":day.disabled?!0:void 0,"aria-label":props["aria-label"]??day.label,"aria-selected":day.selected?"true":"false","data-date":day.date,"data-outside":day.outside?"true":void 0,"data-selected":day.selected?"true":void 0,"data-today":day.today?"true":void 0,"data-ui-calendar-day":!0,onClick:composeHandlers(props.onClick,()=>{day.disabled||selectDate(day.date)}),onKeyDown:composeHandlers(props.onKeyDown,event=>{if(day.disabled)return;if(event.key==="Enter"||event.key===" "){event.preventDefault(),selectDate(day.date);return}if(event.key!=="ArrowDown"&&event.key!=="ArrowLeft"&&event.key!=="ArrowRight"&&event.key!=="ArrowUp"&&event.key!=="End"&&event.key!=="Home"&&event.key!=="PageDown"&&event.key!=="PageUp")return;const date=parseCalendarDate(day.date);date&&(event.preventDefault(),moveFocus(date,event.key))}),role:"gridcell",tabIndex:props.tabIndex??day.tabIndex}),gridProps:{"aria-labelledby":labelId,"aria-readonly":readOnly||void 0,className:"ui-calendar__grid","data-ui-calendar-grid":!0,role:"grid"},inputProps:{"data-ui-calendar-input":!0,disabled,name,type:"hidden",value:selectedValue},label,labelProps:{className:"ui-calendar__label","data-ui-calendar-label":!0,id:labelId},month:formatCalendarMonth(visibleMonth),nextProps:{"aria-label":navigationLabels.nextMonth,className:"ui-calendar__nav","data-ui-calendar-next":!0,disabled:nextDisabled,onClick:()=>{if(nextDisabled)return;const nextMonth=startOfCalendarMonth(addCalendarMonths(visibleMonth,1));setVisibleMonthValue(formatCalendarMonth(nextMonth)),setFocusValue(formatCalendarDate(getCalendarFocusDate(disabled,nextMonth,minDate,maxDate,selectedDate)))},type:"button"},previousProps:{"aria-label":navigationLabels.previousMonth,className:"ui-calendar__nav","data-ui-calendar-prev":!0,disabled:previousDisabled,onClick:()=>{if(previousDisabled)return;const previousMonth=startOfCalendarMonth(addCalendarMonths(visibleMonth,-1));setVisibleMonthValue(formatCalendarMonth(previousMonth)),setFocusValue(formatCalendarDate(getCalendarFocusDate(disabled,previousMonth,minDate,maxDate,selectedDate)))},type:"button"},rootProps:{"aria-disabled":disabled?!0:void 0,className:"ui-calendar","data-disabled":disabled?"true":void 0,"data-ui-calendar":!0,"data-ui-calendar-initial-month":formatCalendarMonth(initialMonth),"data-ui-owner":"react","data-ui-calendar-max":maxDate?formatCalendarDate(maxDate):void 0,"data-ui-calendar-min":minDate?formatCalendarDate(minDate):void 0,"data-ui-calendar-month":formatCalendarMonth(visibleMonth),"data-ui-calendar-value":selectedValue||void 0,ref:rootRef},rootRef,selectDate,value:selectedValue,weekdays,weeks}},defaultInputOtpLength=6,defaultInputOtpPattern="[0-9]*",coerceInputOtpLength=length=>Number(length)||defaultInputOtpLength,clampInputOtpLength=length=>Math.max(1,Math.floor(length)),normalizeInputOtpLength=length=>clampInputOtpLength(coerceInputOtpLength(length)),isNumericInputOtp=(inputMode,pattern)=>inputMode==="numeric"||pattern===defaultInputOtpPattern,sanitizeInputOtpValue=(value,length,inputMode,pattern)=>(isNumericInputOtp(inputMode,pattern)?value.replaceAll(/\D/g,""):value.replaceAll(/\s/g,"")).slice(0,length),getInputOtpActiveIndex=(length,value,selectionStart)=>Math.min(length-1,Math.max(0,selectionStart??value.length)),useInputOTP=({defaultValue,disabled=!1,inputMode="numeric",inputRef:forwardedInputRef,invalid=!1,length:lengthOption,onValueChange,pattern=defaultInputOtpPattern,value:controlledValue}={})=>{const length=normalizeInputOtpLength(lengthOption),rootRef=useRef(null),inputRef=useRef(null),[focused,setFocused]=useState(!1),[activeIndex,setActiveIndex]=useState(0),[uncontrolledValue,setUncontrolledValue]=useState(()=>sanitizeInputOtpValue(defaultValue??"",length,inputMode,pattern)),value=sanitizeInputOtpValue(controlledValue??uncontrolledValue,length,inputMode,pattern),segmentIndexes=useMemo(()=>Array.from({length},(_,index)=>index),[length]),syncValue=useCallback((input=inputRef.current)=>{if(!input)return value;const nextValue=sanitizeInputOtpValue(input.value,length,inputMode,pattern);return input.value!==nextValue&&(input.value=nextValue),controlledValue===void 0&&setUncontrolledValue(nextValue),setActiveIndex(getInputOtpActiveIndex(length,nextValue,input.selectionStart)),nextValue},[controlledValue,inputMode,length,pattern,value]),setSelection=useCallback(index=>{const input=inputRef.current,position=Math.min(value.length,Math.max(0,index));setActiveIndex(getInputOtpActiveIndex(length,value,position)),input?.focus({preventScroll:!0}),input?.setSelectionRange(position,position)},[length,value]),setValue=useCallback(nextValue=>{const sanitizedValue=sanitizeInputOtpValue(nextValue,length,inputMode,pattern),input=inputRef.current;return controlledValue===void 0&&setUncontrolledValue(sanitizedValue),input&&(input.value=sanitizedValue,input.setSelectionRange(sanitizedValue.length,sanitizedValue.length)),setActiveIndex(getInputOtpActiveIndex(length,sanitizedValue,sanitizedValue.length)),onValueChange?.(sanitizedValue),sanitizedValue},[controlledValue,inputMode,length,onValueChange,pattern]),committedInputEventRef=useRef(null),commitInputValue=useCallback((input,nativeEvent)=>{if(committedInputEventRef.current===nativeEvent)return;committedInputEventRef.current=nativeEvent;const nextValue=syncValue(input);onValueChange?.(nextValue)},[onValueChange,syncValue]);useEffect(()=>{const form=inputRef.current?.form;let resetTimer;if(!form)return;const handleReset=()=>{resetTimer=globalThis.setTimeout(()=>{syncValue(inputRef.current)})};return form.addEventListener("reset",handleReset),()=>{resetTimer&&globalThis.clearTimeout(resetTimer),form.removeEventListener("reset",handleReset)}},[syncValue]);const getInputProps=useCallback((props={})=>({...props,"aria-invalid":props["aria-invalid"]??(invalid?!0:void 0),autoComplete:props.autoComplete??"one-time-code",className:composeClassName("ui-input-otp ui-input-otp__native",props.className),"data-ui-enhanced":!0,"data-ui-input-otp-native":!0,disabled:props.disabled??disabled,inputMode:props.inputMode??inputMode,maxLength:props.maxLength??length,onBlur:composeHandlers(props.onBlur,event=>{setFocused(!1),syncValue(event.currentTarget)}),onChange:composeHandlers(props.onChange,event=>{commitInputValue(event.currentTarget,event.nativeEvent)}),onClick:composeHandlers(props.onClick,event=>{syncValue(event.currentTarget)}),onFocus:composeHandlers(props.onFocus,event=>{setFocused(!0),syncValue(event.currentTarget)}),onInput:composeHandlers(props.onInput,event=>{commitInputValue(event.currentTarget,event.nativeEvent)}),onKeyDown:composeHandlers(props.onKeyDown,event=>{if(event.key==="ArrowLeft"){event.preventDefault(),setSelection((event.currentTarget.selectionStart??event.currentTarget.value.length)-1);return}if(event.key==="ArrowRight"){event.preventDefault(),setSelection((event.currentTarget.selectionStart??event.currentTarget.value.length)+1);return}if(event.key==="Home"){event.preventDefault(),setSelection(0);return}event.key==="End"&&(event.preventDefault(),setSelection(event.currentTarget.value.length))}),onKeyUp:composeHandlers(props.onKeyUp,event=>{syncValue(event.currentTarget)}),onPaste:composeHandlers(props.onPaste,event=>{if(event.defaultPrevented)return;const pasted=event.clipboardData.getData("text");if(!pasted)return;event.preventDefault();const input=event.currentTarget,sanitizedValue=sanitizeInputOtpValue(pasted,length,inputMode,pattern);Reflect.set(HTMLInputElement.prototype,"value",sanitizedValue,input),input.setSelectionRange(sanitizedValue.length,sanitizedValue.length),input.dispatchEvent(new Event("input",{bubbles:!0}))}),pattern:props.pattern??pattern,ref:node=>{inputRef.current=node,setRefValue(forwardedInputRef,node)},type:"text",value}),[commitInputValue,disabled,forwardedInputRef,inputMode,invalid,length,pattern,setSelection,syncValue,value]),getSegmentChar=useCallback(index=>value[index]??"\xA0",[value]),getSegmentProps=useCallback((index,props={})=>({...props,"aria-hidden":!0,className:composeClassName("ui-input-otp__segment",props.className),"data-active":String(focused&&index===activeIndex),"data-index":index,"data-ui-input-otp-segment":!0,disabled:props.disabled??disabled,onClick:composeHandlers(props.onClick,()=>{setSelection(index)}),tabIndex:props.tabIndex??-1,type:"button"}),[activeIndex,disabled,focused,setSelection]);return{activeIndex,getInputProps,getSegmentChar,getSegmentProps,inputRef,rootProps:{className:"ui-input-otp-field","data-disabled":disabled?"true":"false","data-invalid":invalid?"true":"false","data-ui-input-otp":!0,"data-ui-input-otp-length":length,"data-ui-owner":"react",ref:rootRef},rootRef,segmentIndexes,segmentsProps:{className:"ui-input-otp__segments","data-ui-input-otp-segments":!0},setSelection,setValue,syncValue,value}},getDateRangeRoot=(control,fallback)=>control.closest("[data-ui-date-range-picker]")??fallback,getDateRangeInputs=(root,start,end)=>{if(start&&end&&start!==end)return[start,end];const inputs=root?[...root.querySelectorAll('input[type="date"]')]:[];return[start??inputs[0]??null,end??inputs.at(-1)??null]},syncDateInputConstraint=(input,property,value)=>{if(value){input[property]=value;return}input.removeAttribute(property)},syncDateRangeInputs=(start,end)=>!start||!end||start===end?{}:(start.value&&end.value&&end.value<start.value&&(end.value=start.value),syncDateInputConstraint(end,"min",start.value),syncDateInputConstraint(start,"max",end.value),{...end.value?{end:end.value}:{},...start.value?{start:start.value}:{}}),useDateRangePicker=({onRangeChange}={})=>{const rootRef=useRef(null),startRef=useRef(null),endRef=useRef(null),syncRange=useCallback((root=rootRef.current)=>{const[start,end]=getDateRangeInputs(root,startRef.current,endRef.current),detail=syncDateRangeInputs(start,end);return onRangeChange?.(detail),detail},[onRangeChange]),getStartProps=useCallback((props={})=>({...props,onChange:composeHandlers(props.onChange,event=>{startRef.current=event.currentTarget,syncRange(getDateRangeRoot(event.currentTarget,rootRef.current))}),ref:startRef,type:props.type??"date"}),[syncRange]),getEndProps=useCallback((props={})=>({...props,onChange:composeHandlers(props.onChange,event=>{endRef.current=event.currentTarget,syncRange(getDateRangeRoot(event.currentTarget,rootRef.current))}),ref:endRef,type:props.type??"date"}),[syncRange]);return{endRef,getEndProps,getStartProps,rootProps:{"data-ui-date-range-picker":!0,ref:rootRef},rootRef,startRef,syncRange}},getScheduleRoot=(element,fallback)=>element.closest("[data-ui-schedule]")??fallback,useSchedule=({onChange}={})=>{const rootRef=useRef(null),emitChange=useCallback((detail,root=rootRef.current)=>{root&&typeof CustomEvent<"u"&&root.dispatchEvent(new CustomEvent("ui:schedule-change",{bubbles:!0,detail})),onChange?.(detail)},[onChange]),getEventProps=useCallback((eventId,props={})=>({...props,...eventId&&!props.id?{id:eventId}:{},"data-ui-draggable":!0,"data-ui-schedule-event":!0,draggable:props.draggable??!0,onDragEnd:composeHandlers(props.onDragEnd,event=>{const root=getScheduleRoot(event.currentTarget,rootRef.current);root&&delete root.dataset.uiDragging}),onDragStart:composeHandlers(props.onDragStart,event=>{const transferValue=eventId||event.currentTarget.id||event.currentTarget.textContent.trim(),root=getScheduleRoot(event.currentTarget,rootRef.current);event.dataTransfer.setData("text/plain",transferValue),root&&(root.dataset.uiDragging="true")})}),[]),getSlotProps=useCallback((slot,props={})=>({...props,"data-ui-schedule-slot":slot,onDragLeave:composeHandlers(props.onDragLeave,event=>{delete event.currentTarget.dataset.state}),onDragOver:composeHandlers(props.onDragOver,event=>{event.preventDefault(),event.currentTarget.dataset.state="drag-over"}),onDrop:composeHandlers(props.onDrop,event=>{event.preventDefault(),delete event.currentTarget.dataset.state;const draggedId=event.dataTransfer.getData("text/plain"),dragged=typeof document<"u"&&draggedId?document.getElementById(draggedId):null;typeof HTMLElement<"u"&&dragged instanceof HTMLElement&&event.currentTarget.append(dragged),emitChange({...draggedId?{eventId:draggedId}:{},...slot?{slot}:{}},getScheduleRoot(event.currentTarget,rootRef.current))})}),[emitChange]);return{emitChange,getEventProps,getSlotProps,rootProps:{"data-ui-schedule":!0,ref:rootRef},rootRef}},getKanbanRoot=(element,fallback)=>element.closest("[data-ui-kanban]")??fallback,getKanbanItem=(root,itemId)=>[...root?.querySelectorAll("[data-ui-kanban-item]")??[]].find(item=>item.dataset.uiKanbanItem===itemId)??null,getKanbanColumnValues=root=>[...root?.querySelectorAll("[data-ui-kanban-column]")??[]].map(column=>column.dataset.uiKanbanColumn??"").filter(Boolean),isKanbanArrowKey=key=>["ArrowLeft","ArrowRight"].includes(key),clearKanbanInteractionState=(root,item)=>{item?.dataset.state==="dragging"&&delete item.dataset.state;for(const column of root?.querySelectorAll("[data-ui-kanban-column]")??[])delete column.dataset.state},setKanbanDropTarget=(root,target)=>{for(const column of root?.querySelectorAll("[data-ui-kanban-column]")??[])column===target?column.dataset.state="drop-target":delete column.dataset.state},getKanbanColumnAtPoint=(root,clientX,clientY)=>{if(!root)return null;const column=document.elementFromPoint(clientX,clientY)?.closest("[data-ui-kanban-column]")??null;return column?.closest("[data-ui-kanban]")===root?column:null},requestKeyboardKanbanMove=(event,itemId,root,requestMove)=>{if(!isKanbanArrowKey(event.key)||!root)return;const item=getKanbanItem(root,itemId);if(!item||item.getAttribute("aria-busy")==="true")return;const fromColumn=item.closest("[data-ui-kanban-column]")?.dataset.uiKanbanColumn;if(!fromColumn)return;const columns=getKanbanColumnValues(root),currentIndex=columns.indexOf(fromColumn),visualDirection=event.key==="ArrowRight"?1:-1,direction=getComputedStyle(root).direction==="rtl"?-visualDirection:visualDirection,toColumn=columns[currentIndex+direction];toColumn&&(event.preventDefault(),requestMove({fromColumn,input:"keyboard",itemId,toColumn}))},updateKanbanPointer=(event,pointer,root)=>{if(pointer?.pointerId!==event.pointerId||Math.hypot(event.clientX-pointer.startX,event.clientY-pointer.startY)<8&&!pointer.active)return;pointer.active=!0,event.currentTarget.setPointerCapture(event.pointerId);const item=getKanbanItem(root,pointer.itemId),target=getKanbanColumnAtPoint(root,event.clientX,event.clientY);item&&(item.dataset.state="dragging"),setKanbanDropTarget(root,target)},finishKanbanPointer=(event,pointer,root,requestMove)=>{if(pointer?.pointerId!==event.pointerId||!pointer.active)return;const item=getKanbanItem(root,pointer.itemId),fromColumn=item?.closest("[data-ui-kanban-column]")?.dataset.uiKanbanColumn,toColumn=getKanbanColumnAtPoint(root,event.clientX,event.clientY)?.dataset.uiKanbanColumn;clearKanbanInteractionState(root,item),fromColumn&&toColumn&&requestMove({fromColumn,input:"pointer",itemId:pointer.itemId,toColumn})},useKanban=({onMoveRequest}={})=>{const rootRef=useRef(null),pointerRef=useRef(null),requestMove=useCallback(detail=>{const normalized=createLumenKanbanMoveDetail(detail);if(!normalized)return!1;const accepted=rootRef.current&&typeof CustomEvent<"u"?rootRef.current.dispatchEvent(new CustomEvent("ui:kanban-move-request",{bubbles:!0,cancelable:!0,detail:normalized})):!0;return accepted&&onMoveRequest?.(normalized),accepted},[onMoveRequest]),getItemProps=useCallback((itemId,props={})=>({...props,"data-ui-kanban-item":itemId,id:props.id??itemId}),[]),getHandleProps=useCallback((itemId,props={})=>({...props,"aria-keyshortcuts":props["aria-keyshortcuts"]??"ArrowLeft ArrowRight","data-ui-kanban-handle":itemId,draggable:props.draggable??!0,onDragEnd:composeHandlers(props.onDragEnd,event=>{const root=getKanbanRoot(event.currentTarget,rootRef.current),item=getKanbanItem(root,itemId);item?.dataset.state==="dragging"&&delete item.dataset.state}),onDragStart:composeHandlers(props.onDragStart,event=>{const root=getKanbanRoot(event.currentTarget,rootRef.current),item=getKanbanItem(root,itemId);if(!item||item.getAttribute("aria-busy")==="true"){event.preventDefault();return}event.dataTransfer.setData("text/plain",itemId),event.dataTransfer.effectAllowed="move",item.dataset.state="dragging"}),onKeyDown:composeHandlers(props.onKeyDown,event=>{const root=getKanbanRoot(event.currentTarget,rootRef.current);requestKeyboardKanbanMove(event,itemId,root,requestMove)}),onPointerDown:composeHandlers(props.onPointerDown,event=>{event.pointerType!=="mouse"&&(pointerRef.current={active:!1,itemId,pointerId:event.pointerId,startX:event.clientX,startY:event.clientY})}),onPointerMove:composeHandlers(props.onPointerMove,event=>{const root=getKanbanRoot(event.currentTarget,rootRef.current);updateKanbanPointer(event,pointerRef.current,root)}),onPointerCancel:composeHandlers(props.onPointerCancel,event=>{const pointer=pointerRef.current;if(pointer?.pointerId!==event.pointerId)return;pointerRef.current=null;const root=getKanbanRoot(event.currentTarget,rootRef.current),item=getKanbanItem(root,pointer.itemId);clearKanbanInteractionState(root,item)}),onPointerUp:composeHandlers(props.onPointerUp,event=>{const pointer=pointerRef.current;pointerRef.current=null;const root=getKanbanRoot(event.currentTarget,rootRef.current);finishKanbanPointer(event,pointer,root,requestMove)}),type:props.type??"button"}),[requestMove]);return{getColumnProps:useCallback((column,props={})=>({...props,"data-ui-kanban-column":column,onDragLeave:composeHandlers(props.onDragLeave,event=>{delete event.currentTarget.dataset.state}),onDragOver:composeHandlers(props.onDragOver,event=>{event.preventDefault(),event.dataTransfer.dropEffect="move",event.currentTarget.dataset.state="drop-target"}),onDrop:composeHandlers(props.onDrop,event=>{event.preventDefault(),delete event.currentTarget.dataset.state;const itemId=event.dataTransfer.getData("text/plain"),root=getKanbanRoot(event.currentTarget,rootRef.current),item=getKanbanItem(root,itemId),fromColumn=item?.closest("[data-ui-kanban-column]")?.dataset.uiKanbanColumn;item?.dataset.state==="dragging"&&delete item.dataset.state,fromColumn&&requestMove({fromColumn,input:"pointer",itemId,toColumn:column})})}),[requestMove]),getHandleProps,getItemProps,requestMove,rootProps:{"aria-orientation":"horizontal","data-ui-kanban":!0,ref:rootRef,tabIndex:0},rootRef}},parseResizableNumberList=(value,count,fallback)=>{const values=typeof value=="number"?[value]:value??[];return Array.from({length:count},(_,index)=>values[index]??values[0]??fallback)},normalizeResizableSizes=(sizes,count)=>{const fallbackSize=100/Math.max(1,count),usableSizes=Array.from({length:count},(_,index)=>{const size=sizes[index]??fallbackSize;return Number.isFinite(size)&&size>0?size:fallbackSize}),total=usableSizes.reduce((sum,size)=>sum+size,0);return total<=0?Array.from({length:count},()=>fallbackSize):usableSizes.map(size=>size/total*100)},serializeResizableSize=value=>{if(value!==void 0)return Array.isArray(value)?value.join(","):String(value)},useResizable=({defaultSizes,direction="horizontal",maxSize,minSize,onSizesChange,panelCount:panelCountOption=2,resetOnDoubleClick=!0}={})=>{if(!Number.isFinite(panelCountOption)||panelCountOption>1e3)throw new RangeError("Resizable panelCount must be finite and at most 1000");const panelCount=Math.max(0,Math.floor(panelCountOption)),rootRef=useRef(null),dragRef=useRef(null),minSizes=useMemo(()=>parseResizableNumberList(minSize,panelCount,12),[minSize,panelCount]),maxSizes=useMemo(()=>parseResizableNumberList(maxSize,panelCount,88),[maxSize,panelCount]),initialSizes=useMemo(()=>normalizeResizableSizes(parseResizableNumberList(defaultSizes,panelCount,100/Math.max(1,panelCount)),panelCount),[defaultSizes,panelCount]),[sizes,setSizes]=useState(initialSizes),axis=direction==="horizontal"?"clientX":"clientY",sizeProperty=direction==="horizontal"?"width":"height",separatorOrientation=direction==="horizontal"?"vertical":"horizontal",panelIndexes=useMemo(()=>Array.from({length:panelCount},(_,index)=>index),[panelCount]),handleIndexes=useMemo(()=>Array.from({length:Math.max(0,panelCount-1)},(_,index)=>index),[panelCount]);useEffect(()=>{setSizes(initialSizes)},[initialSizes]);const updateSizes=useCallback(updater=>{setSizes(currentSizes=>{const nextSizes=updater(currentSizes);return onSizesChange?.(nextSizes),nextSizes})},[onSizesChange]),resizePair=useCallback((index,nextSize)=>{updateSizes(currentSizes=>{const nextSizes=[...currentSizes],nextIndex=index+1,total=(nextSizes[index]??0)+(nextSizes[nextIndex]??0),min=Math.max(minSizes[index]??0,total-(maxSizes[nextIndex]??100)),max=Math.min(maxSizes[index]??100,total-(minSizes[nextIndex]??0)),paneSize=Math.min(max,Math.max(min,nextSize));return nextSizes[index]=paneSize,nextSizes[nextIndex]=total-paneSize,nextSizes})},[maxSizes,minSizes,updateSizes]),reset=useCallback(()=>{updateSizes(()=>[...initialSizes])},[initialSizes,updateSizes]),getPanelProps=useCallback((index,props={})=>({...props,"data-ui-resizable-panel":!0,style:{...props.style,"--ui-resizable-size":`${sizes[index]??0}%`}}),[sizes]),getHandleProps=useCallback((index,props={})=>({...props,"aria-label":props["aria-label"]??`Resize panel ${index+1}`,"aria-orientation":separatorOrientation,"aria-valuemax":Math.round(maxSizes[index]??100),"aria-valuemin":Math.round(minSizes[index]??0),"aria-valuenow":Math.round(sizes[index]??0),className:composeClassName("ui-resizable__handle",props.className),"data-index":index,"data-ui-resizable-handle":!0,onDoubleClick:composeHandlers(props.onDoubleClick,()=>{resetOnDoubleClick&&reset()}),onKeyDown:composeHandlers(props.onKeyDown,event=>{const step=event.shiftKey?10:2,keyDeltas=direction==="horizontal"?{ArrowLeft:-step,ArrowRight:step}:{ArrowDown:step,ArrowUp:-step};if(event.key==="Home"){event.preventDefault(),resizePair(index,minSizes[index]??0);return}if(event.key==="End"){event.preventDefault(),resizePair(index,maxSizes[index]??100);return}const delta=keyDeltas[getLumenDirectionalKey(event.currentTarget,event.key)];delta!==void 0&&(event.preventDefault(),resizePair(index,(sizes[index]??0)+delta))}),onPointerDown:composeHandlers(props.onPointerDown,event=>{event.button===0&&(event.preventDefault(),dragRef.current={containerSize:Math.max(1,rootRef.current?.getBoundingClientRect()[sizeProperty]??1),index,startPosition:event[axis],startSize:sizes[index]??0},rootRef.current&&(rootRef.current.dataset.resizing="true"),event.currentTarget.dataset.active="true",event.currentTarget.setPointerCapture(event.pointerId))}),onPointerMove:composeHandlers(props.onPointerMove,event=>{const drag=dragRef.current;if(drag?.index!==index||event.currentTarget.dataset.active!=="true")return;const delta=(event[axis]-drag.startPosition)/drag.containerSize*100,multiplier=direction==="horizontal"&&getLumenDirectionalKey(event.currentTarget,"ArrowRight")==="ArrowLeft"?-1:1;resizePair(index,drag.startSize+delta*multiplier)}),onPointerUp:composeHandlers(props.onPointerUp,event=>{event.currentTarget.dataset.active==="true"&&(delete event.currentTarget.dataset.active,rootRef.current&&delete rootRef.current.dataset.resizing,dragRef.current=null,event.currentTarget.releasePointerCapture(event.pointerId))}),role:"separator",tabIndex:props.tabIndex??0,type:props.type??"button"}),[axis,direction,maxSizes,minSizes,reset,resetOnDoubleClick,resizePair,separatorOrientation,sizeProperty,sizes]);return{direction,getHandleProps,getPanelProps,handleIndexes,panelIndexes,reset,resizePair,rootProps:{className:composeClassName("ui-resizable",direction==="vertical"&&"ui-resizable--vertical"),"data-orientation":direction,"data-ui-resizable":!0,"data-ui-resizable-default-sizes":defaultSizes?.join(","),"data-ui-resizable-enhanced":!0,"data-ui-resizable-max-size":serializeResizableSize(maxSize),"data-ui-resizable-min-size":serializeResizableSize(minSize),"data-ui-resizable-reset":resetOnDoubleClick?"true":void 0,ref:rootRef},rootRef,sizes}},useThemeBuilder=({radiusScale,spacingScale,borderWidth,preset,defaultPreset,onPresetChange,accentHue,defaultAccentHue=54,defaultExportFormat="css",defaultHue=264,defaultMode="generated",defaultPrimaryColor="#6f20f0",defaultScheme="light",defaultSecondaryColor="#14b8a6",exportFormat,hue,mode,onAccentHueChange,onExportFormatChange,onHueChange,onModeChange,onPrimaryColorChange,onSchemeChange,onSecondaryColorChange,onThemeChange,onThemeExport,primaryColor,scheme,secondaryColor}={})=>{const[currentPreset,setPreset]=useControllableState({defaultValue:defaultPreset,onChange:onPresetChange,value:preset}),[currentHue,setHue]=useControllableState({defaultValue:defaultHue,onChange:onHueChange,value:hue}),[currentAccentHue,setAccentHue]=useControllableState({defaultValue:defaultAccentHue,onChange:onAccentHueChange,value:accentHue}),[currentMode,setMode]=useControllableState({defaultValue:defaultMode,onChange:onModeChange,value:mode}),[currentScheme,setScheme]=useControllableState({defaultValue:defaultScheme,onChange:onSchemeChange,value:scheme}),[currentPrimaryColor,setPrimaryColor]=useControllableState({defaultValue:defaultPrimaryColor,onChange:onPrimaryColorChange,value:primaryColor}),[currentSecondaryColor,setSecondaryColor]=useControllableState({defaultValue:defaultSecondaryColor,onChange:onSecondaryColorChange,value:secondaryColor}),[currentExportFormat,setExportFormat]=useControllableState({defaultValue:defaultExportFormat,onChange:onExportFormatChange,value:exportFormat}),result=useMemo(()=>createThemeBuilderTokens({radiusScale:radiusScale??null,spacingScale:spacingScale??null,borderWidth:borderWidth??null,preset:currentPreset??null,accentHue:currentAccentHue,hue:currentHue,mode:currentMode,primaryColor:currentPrimaryColor,scheme:currentScheme,secondaryColor:currentSecondaryColor}),[radiusScale,spacingScale,borderWidth,currentPreset,currentAccentHue,currentHue,currentMode,currentPrimaryColor,currentScheme,currentSecondaryColor]),exportValue=useMemo(()=>exportThemeBuilderValue(result.tokens,result.scheme,currentExportFormat),[currentExportFormat,result.scheme,result.tokens]),previewStyle=useMemo(()=>Object.fromEntries(Object.entries(result.tokens).map(([token,value])=>[`--${token}`,value])),[result.tokens]);useEffect(()=>{onThemeChange?.(result)},[onThemeChange,result]);const exportDetail=useMemo(()=>({...currentExportFormat==="css"?{css:exportValue}:{},format:currentExportFormat,tokens:result.tokens,value:exportValue}),[currentExportFormat,exportValue,result.tokens]),copyExport=useCallback(async()=>(typeof navigator<"u"&&await navigator.clipboard.writeText(exportValue).catch(()=>null),onThemeExport?.(exportDetail),exportValue),[exportDetail,exportValue,onThemeExport]),getPresetProps=useCallback((nextPreset,props={})=>({...props,"aria-pressed":currentPreset===nextPreset,"data-ui-theme-preset":nextPreset,onClick:composeHandlers(props.onClick,()=>{setPreset(nextPreset)}),type:props.type??"button"}),[currentPreset,setPreset]),getModeProps=useCallback((nextMode,props={})=>({...props,"aria-pressed":currentMode===nextMode,"data-ui-theme-mode":nextMode,onClick:composeHandlers(props.onClick,()=>{setMode(nextMode)}),type:props.type??"button"}),[currentMode,setMode]),getSchemeProps=useCallback((nextScheme,props={})=>({...props,"aria-pressed":currentScheme===nextScheme,"data-ui-theme-scheme":nextScheme,onClick:composeHandlers(props.onClick,()=>{setScheme(nextScheme)}),type:props.type??"button"}),[currentScheme,setScheme]),getExportFormatProps=useCallback((format,props={})=>({...props,"aria-pressed":currentExportFormat===format,"data-ui-theme-export-format":format,onClick:composeHandlers(props.onClick,()=>{setExportFormat(coerceThemeBuilderExportFormat(format))}),type:props.type??"button"}),[currentExportFormat,setExportFormat]);return{...result,setPreset,getPresetProps,accentHueProps:{"data-ui-theme-accent-hue":!0,max:359,min:0,onChange:event=>{setAccentHue(Number(event.currentTarget.value))},type:"range",value:currentAccentHue},copyExport,exportButtonProps:{"data-ui-theme-export":!0,onClick:()=>{copyExport().catch(()=>null)},type:"button"},exportFormat:currentExportFormat,exportValue,getExportFormatProps,getModeProps,getSchemeProps,hueProps:{"data-ui-theme-brand-hue":!0,max:359,min:0,onChange:event=>{setHue(Number(event.currentTarget.value))},type:"range",value:currentHue},outputProps:{"data-ui-theme-output":!0,readOnly:!0,value:exportValue},previewStyle,primaryColorProps:{"data-ui-theme-primary-color":!0,onChange:event=>{setPrimaryColor(event.currentTarget.value)},type:"color",value:currentPrimaryColor},rootProps:{"data-ui-theme-builder":!0},secondaryColorProps:{"data-ui-theme-secondary-color":!0,onChange:event=>{setSecondaryColor(event.currentTarget.value)},type:"color",value:currentSecondaryColor},setAccentHue,setExportFormat,setHue,setMode,setPrimaryColor,setScheme,setSecondaryColor}},useTooltip=({defaultOpen=!1,delay=250,id,onOpenChange,open}={})=>{const tooltipId=useSafeId("ui-tooltip",id),timerRef=useRef(void 0),[isOpen,setIsOpen]=useControllableState({defaultValue:defaultOpen,onChange:onOpenChange,value:open}),close=useCallback(()=>{clearTimeout(timerRef.current),setIsOpen(!1)},[setIsOpen]),scheduleOpen=useCallback(nextDelay=>{clearTimeout(timerRef.current),timerRef.current=setTimeout(()=>{setIsOpen(!0)},nextDelay)},[setIsOpen]);return useEffect(()=>()=>{clearTimeout(timerRef.current)},[]),{close,open:isOpen,rootProps:{"aria-describedby":isOpen?tooltipId:void 0,"data-ui-tooltip":!0,onBlur:event=>{event.currentTarget.contains(event.relatedTarget)||close()},onFocus:()=>{scheduleOpen(0)},onKeyDown:event=>{event.defaultPrevented||event.nativeEvent.isComposing||event.key==="Escape"&&isOpen&&(event.preventDefault(),close())},onMouseEnter:()=>{scheduleOpen(delay)},onMouseLeave:close},setOpen:setIsOpen,tooltipProps:{hidden:!isOpen,id:tooltipId,role:"tooltip"}}},useThemeToggle=(defaultTheme="light")=>{const[theme,setTheme]=useState(()=>typeof window<"u"?localStorage.getItem("theme")??(document.documentElement.classList.contains("dark")?"dark":"light"):defaultTheme);return useEffect(()=>{const doc=document.documentElement;doc.setAttribute("data-theme",theme),theme==="dark"?doc.classList.add("dark"):doc.classList.remove("dark"),localStorage.setItem("theme",theme),window.dispatchEvent(new CustomEvent("theme-change",{detail:theme}))},[theme]),{theme,toggleTheme:event=>{const isDark=theme==="dark",newTheme=isDark?"light":"dark",prefersReducedMotion=window.matchMedia("(prefers-reduced-motion: reduce)").matches,isTouchDevice=window.matchMedia("(hover: none) and (pointer: coarse)").matches;if(prefersReducedMotion||isTouchDevice||!event){setTheme(newTheme);return}const rect=event.currentTarget.getBoundingClientRect(),x=Math.round(rect.left+rect.width/2),y=Math.round(rect.top+rect.height/2),maxRadius=Math.hypot(Math.max(x,window.innerWidth-x),Math.max(y,window.innerHeight-y)),oldBg=isDark?"hsl(277 20% 10%)":"hsl(268 20% 98%)",overlay=document.createElement("div");overlay.setAttribute("aria-hidden","true"),Object.assign(overlay.style,{position:"fixed",inset:"0",zIndex:"99999",pointerEvents:"none",backgroundColor:oldBg,clipPath:`circle(${maxRadius}px at ${x}px ${y}px)`,willChange:"clip-path"}),document.body.appendChild(overlay),setTheme(newTheme),requestAnimationFrame(()=>{requestAnimationFrame(()=>{overlay.style.transition="clip-path 580ms cubic-bezier(0.4, 0, 0.2, 1)",overlay.style.clipPath=`circle(0px at ${x}px ${y}px)`;const done=()=>{overlay.remove()};overlay.addEventListener("transitionend",done,{once:!0}),setTimeout(done,750)})})},setTheme}};export{useCalendar,useContextMenu,useDateRangePicker,useDialog,useDropdownMenu,useFormValidation,useInputOTP,useKanban,useLanguageToggle,usePopover,useResizable,useRichTextEditor,useSchedule,useSelect,useTabs,useThemeBuilder,useThemeToggle,useToast,useTooltip};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interval-charts.d.ts","sourceRoot":"","sources":["../src/interval-charts.tsx"],"names":[],"mappings":"AAIA,OAAO,EAML,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EAEzB,MAAM,uBAAuB,CAAA;AAG9B,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAExD,UAAU,kBAAmB,SAAQ,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC;IAC/D,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;IACvC,MAAM,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAA;IAClC,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;
|
|
1
|
+
{"version":3,"file":"interval-charts.d.ts","sourceRoot":"","sources":["../src/interval-charts.tsx"],"names":[],"mappings":"AAIA,OAAO,EAML,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EAEzB,MAAM,uBAAuB,CAAA;AAG9B,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAExD,UAAU,kBAAmB,SAAQ,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC;IAC/D,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;IACvC,MAAM,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAA;IAClC,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAiHD,MAAM,WAAW,mBAAoB,SAAQ,kBAAkB;IAC7D,IAAI,CAAC,EAAE,SAAS,mBAAmB,EAAE,CAAA;CACtC;AAED,eAAO,MAAM,cAAc,GAAI,4CAA0E,mBAAmB,gCAAiN,CAAA;AAE7U,MAAM,WAAW,cAAe,SAAQ,kBAAkB;IACxD,IAAI,CAAC,EAAE,SAAS,iBAAiB,EAAE,CAAA;IACnC,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;IAC1C,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAC/B,IAAI,CAAC,EAAE,cAAc,CAAA;CACtB;AAED,eAAO,MAAM,SAAS,GAAI,iGAA+J,cAAc,gCAAyX,CAAA"}
|
package/dist/interval-charts.js
CHANGED
|
@@ -15,7 +15,7 @@ const IntervalPlot = ({ formatBoundary, formatValue = String, labels, model, sho
|
|
|
15
15
|
const factualSummary = formatLumenChartSummary([{ id: 'values', label, data }], formatValue, text);
|
|
16
16
|
const hasData = model.marks.length > 0;
|
|
17
17
|
const rows = intervalRows(model, formatValue, formatBoundary);
|
|
18
|
-
return (_jsxs(Chart, { ...props, summary: intervalSummary(model.valid, summary, factualSummary, text.invalidData), children: [!hasData && _jsx("p", { className: "ui-chart__empty", role: "status", children: model.valid ? text.empty : text.invalidData }), hasData && (_jsxs(_Fragment, { children: [_jsx("p", { className: "ui-chart__axis-title", children: label }), _jsx("div", { className: "ui-chart__plot", role: "region", tabIndex: 0, "aria-label": getChartPlotLabel(props['aria-label'], props.heading, text.chartData), children: _jsxs("svg", { "aria-hidden": "true", viewBox: `0 0 ${model.width} ${model.height}`, children: [_jsx("g", { className: "ui-chart__grid", children: model.ticks.map(tick => (_jsxs(Fragment, { children: [_jsx("line", { x1: model.left, x2: model.right, y1: model.y(tick), y2: model.y(tick) }), _jsx("text", { x: model.left - 8, y: model.y(tick), children: formatValue(tick) })] }, tick))) }), _jsx("g", { className: "ui-chart__axis-labels", children: model.categoryTicks.map(tick => _jsx("text", { textAnchor: tick.textAnchor, x: tick.position, y: model.height - 16, children: tick.label }, tick.index)) }), 'connectors' in model && model.connectors.map(connector => (_jsx("line", { className: "ui-waterfall-chart__connector", x1: connector.x1, x2: connector.x2, y1: connector.y, y2: connector.y }, connector.x1))), _jsx("g", { className: "ui-bar-chart__marks", children: model.marks.map(mark => (_jsx("rect", { className: getLumenChartToneClassName(mark.tone), x: mark.x, y: mark.y, width: mark.width, height: mark.height, children:
|
|
18
|
+
return (_jsxs(Chart, { ...props, summary: intervalSummary(model.valid, summary, factualSummary, text.invalidData), children: [!hasData && _jsx("p", { className: "ui-chart__empty", role: "status", children: model.valid ? text.empty : text.invalidData }), hasData && (_jsxs(_Fragment, { children: [_jsx("p", { className: "ui-chart__axis-title", children: label }), _jsx("div", { className: "ui-chart__plot", role: "region", tabIndex: 0, "aria-label": getChartPlotLabel(props['aria-label'], props.heading, text.chartData), children: _jsxs("svg", { "aria-hidden": "true", viewBox: `0 0 ${model.width} ${model.height}`, children: [_jsx("g", { className: "ui-chart__grid", children: model.ticks.map(tick => (_jsxs(Fragment, { children: [_jsx("line", { x1: model.left, x2: model.right, y1: model.y(tick), y2: model.y(tick) }), _jsx("text", { x: model.left - 8, y: model.y(tick), children: formatValue(tick) })] }, tick))) }), _jsx("g", { className: "ui-chart__axis-labels", children: model.categoryTicks.map(tick => _jsx("text", { textAnchor: tick.textAnchor, x: tick.position, y: model.height - 16, children: tick.label }, tick.index)) }), 'connectors' in model && model.connectors.map(connector => (_jsx("line", { className: "ui-waterfall-chart__connector", x1: connector.x1, x2: connector.x2, y1: connector.y, y2: connector.y }, connector.x1))), _jsx("g", { className: "ui-bar-chart__marks", children: model.marks.map(mark => (_jsx("rect", { className: getLumenChartToneClassName(mark.tone), x: mark.x, y: mark.y, width: mark.width, height: mark.height, children: _jsx("title", { children: `${mark.label}: ${formatValue(mark.value)}` }) }, mark.key))) })] }) })] })), showTable && hasData && (_jsxs("details", { className: "ui-chart__data", children: [_jsx("summary", { children: text.viewData }), _jsx("div", { "aria-label": text.chartData, role: "group", tabIndex: 0, children: _jsxs("table", { children: [_jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { scope: "col", children: text.category }), _jsx("th", { scope: "col", children: text.start }), _jsx("th", { scope: "col", children: text.end }), _jsx("th", { scope: "col", children: label }), isDensityModel(model) && _jsx("th", { scope: "col", children: text.count })] }) }), _jsx("tbody", { children: rows })] }) })] }))] }));
|
|
19
19
|
};
|
|
20
20
|
const emptyWaterfallData = [];
|
|
21
21
|
const emptyHistogramBins = [];
|
package/dist/motion.d.ts
CHANGED
|
@@ -13,15 +13,14 @@ declare const AnimatedButton: import("react").ComponentType<Omit<{
|
|
|
13
13
|
hidden?: boolean | undefined;
|
|
14
14
|
"aria-live"?: "polite" | "off" | "assertive" | undefined;
|
|
15
15
|
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
|
16
|
-
popover?: "" | "auto" | "manual" | "hint" | undefined;
|
|
17
|
-
dir?: string | undefined;
|
|
18
|
-
key?: import("react").Key | null | undefined;
|
|
19
16
|
"aria-label"?: string | undefined;
|
|
20
17
|
name?: string | undefined;
|
|
21
18
|
rel?: string | undefined;
|
|
19
|
+
dir?: string | undefined;
|
|
22
20
|
"aria-pressed"?: boolean | "true" | "false" | "mixed" | undefined;
|
|
23
21
|
onClick?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
|
|
24
22
|
type?: "button" | "reset" | "submit" | undefined;
|
|
23
|
+
key?: import("react").Key | null | undefined;
|
|
25
24
|
disabled?: boolean | undefined;
|
|
26
25
|
formAction?: string | ((formData: FormData) => void | Promise<void>) | undefined;
|
|
27
26
|
formEncType?: string | undefined;
|
|
@@ -67,6 +66,7 @@ declare const AnimatedButton: import("react").ComponentType<Omit<{
|
|
|
67
66
|
results?: number | undefined;
|
|
68
67
|
security?: string | undefined;
|
|
69
68
|
unselectable?: "off" | "on" | undefined;
|
|
69
|
+
popover?: "" | "auto" | "manual" | "hint" | undefined;
|
|
70
70
|
popoverTargetAction?: "toggle" | "show" | "hide" | undefined;
|
|
71
71
|
popoverTarget?: string | undefined;
|
|
72
72
|
inert?: boolean | undefined;
|
|
@@ -312,14 +312,12 @@ declare const AnimatedStack: import("react").ComponentType<Omit<{
|
|
|
312
312
|
hidden?: boolean | undefined;
|
|
313
313
|
"aria-live"?: "polite" | "off" | "assertive" | undefined;
|
|
314
314
|
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
|
315
|
-
gap?: "section" | "none" | "group" | "lg" | "sm" | "xl" | "md" | "2xl" | "3xl" | "related" | "xs";
|
|
316
|
-
popover?: "" | "auto" | "manual" | "hint" | undefined;
|
|
317
|
-
dir?: string | undefined;
|
|
318
|
-
key?: import("react").Key | null | undefined;
|
|
319
315
|
"aria-label"?: string | undefined;
|
|
320
316
|
rel?: string | undefined;
|
|
317
|
+
dir?: string | undefined;
|
|
321
318
|
"aria-pressed"?: boolean | "true" | "false" | "mixed" | undefined;
|
|
322
319
|
onClick?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
320
|
+
key?: import("react").Key | null | undefined;
|
|
323
321
|
defaultChecked?: boolean | undefined;
|
|
324
322
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
325
323
|
suppressContentEditableWarning?: boolean | undefined;
|
|
@@ -359,6 +357,7 @@ declare const AnimatedStack: import("react").ComponentType<Omit<{
|
|
|
359
357
|
results?: number | undefined;
|
|
360
358
|
security?: string | undefined;
|
|
361
359
|
unselectable?: "off" | "on" | undefined;
|
|
360
|
+
popover?: "" | "auto" | "manual" | "hint" | undefined;
|
|
362
361
|
popoverTargetAction?: "toggle" | "show" | "hide" | undefined;
|
|
363
362
|
popoverTarget?: string | undefined;
|
|
364
363
|
inert?: boolean | undefined;
|
|
@@ -585,6 +584,7 @@ declare const AnimatedStack: import("react").ComponentType<Omit<{
|
|
|
585
584
|
align?: "end" | "start" | "center" | "stretch";
|
|
586
585
|
wrap?: boolean;
|
|
587
586
|
as?: import("react").ElementType;
|
|
587
|
+
gap?: "section" | "none" | "group" | "lg" | "sm" | "xl" | "md" | "2xl" | "3xl" | "related" | "xs";
|
|
588
588
|
} & import("motion/react").MotionProps, "children"> & {
|
|
589
589
|
children?: import("react").ReactNode | import("motion/react").MotionValue<number> | import("motion/react").MotionValue<string>;
|
|
590
590
|
}>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ComponentPropsWithoutRef, type ComponentPropsWithRef, type ElementType } from 'react';
|
|
2
|
-
import { type LumenControlVisualSize } from '@santi020k/lumen-core';
|
|
2
|
+
import { type LumenControlVisualSize, type LumenSkeletonAnimation, type LumenSkeletonShape, type LumenSkeletonSize } from '@santi020k/lumen-core';
|
|
3
3
|
export type LumenGlassProp = boolean | 'strong' | 'subtle';
|
|
4
4
|
export type LumenPrimitiveProps<T extends ElementType = 'div'> = {
|
|
5
5
|
as?: T;
|
|
@@ -57,8 +57,15 @@ export interface SeparatorProps extends ComponentPropsWithRef<'hr'> {
|
|
|
57
57
|
orientation?: Orientation;
|
|
58
58
|
}
|
|
59
59
|
export declare const Separator: ({ className, orientation, ...props }: SeparatorProps) => import("react").JSX.Element;
|
|
60
|
-
export
|
|
61
|
-
|
|
60
|
+
export interface SkeletonProps extends ComponentPropsWithRef<'div'> {
|
|
61
|
+
/** `shimmer` (default) keeps the existing sweep; `pulse` fades; `none` is static. */
|
|
62
|
+
animation?: LumenSkeletonAnimation;
|
|
63
|
+
/** Pixels for numbers, or a CSS length such as `0.75rem` or `60%`. */
|
|
64
|
+
height?: LumenSkeletonSize;
|
|
65
|
+
shape?: LumenSkeletonShape;
|
|
66
|
+
width?: LumenSkeletonSize;
|
|
67
|
+
}
|
|
68
|
+
export declare const Skeleton: ({ animation, "aria-hidden": ariaHidden, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, className, height, role, shape, style, width, ...props }: SkeletonProps) => import("react").JSX.Element;
|
|
62
69
|
export type SpinnerProps = ComponentPropsWithoutRef<'span'>;
|
|
63
70
|
export declare const Spinner: ({ "aria-hidden": ariaHidden, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, className, role, ...props }: SpinnerProps) => import("react").JSX.Element;
|
|
64
71
|
export interface StackProps extends ComponentPropsWithRef<'div'> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-components.d.ts","sourceRoot":"","sources":["../src/server-components.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,qBAAqB,EAG1B,KAAK,WAAW,EACjB,MAAM,OAAO,CAAA;AAEd,OAAO,
|
|
1
|
+
{"version":3,"file":"server-components.d.ts","sourceRoot":"","sources":["../src/server-components.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,qBAAqB,EAG1B,KAAK,WAAW,EACjB,MAAM,OAAO,CAAA;AAEd,OAAO,EAEL,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EAMvB,MAAM,uBAAuB,CAAA;AAE9B,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAA;AAE1D,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,WAAW,GAAG,KAAK,IAAI;IAC/D,EAAE,CAAC,EAAE,CAAC,CAAA;CACP,GAAG,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;AA0BxC,KAAK,YAAY,GACf,SAAS,GAAG,aAAa,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,CAAA;AAE7E,MAAM,WAAW,UAAW,SAAQ,qBAAqB,CAAC,MAAM,CAAC;IAC/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