@adam-milo/ui 1.0.56 → 1.0.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/index10.cjs +1 -1
- package/dist/index10.js +2 -4
- package/dist/index100.cjs +1 -1
- package/dist/index100.js +1 -1
- package/dist/index101.cjs +1 -1
- package/dist/index101.js +1 -1
- package/dist/index102.cjs +1 -1
- package/dist/index102.js +1 -2
- package/dist/index103.cjs +1 -1
- package/dist/index103.js +1 -1
- package/dist/index104.cjs +1 -1
- package/dist/index104.js +1 -1
- package/dist/index105.cjs +1 -1
- package/dist/index105.js +1 -1
- package/dist/index106.cjs +1 -1
- package/dist/index106.js +2 -1
- package/dist/index107.cjs +1 -1
- package/dist/index107.js +1 -1
- package/dist/index108.cjs +1 -0
- package/dist/index108.js +1 -0
- package/dist/index109.cjs +1 -0
- package/dist/index109.js +1 -0
- package/dist/index11.cjs +1 -1
- package/dist/index11.js +4 -4
- package/dist/index110.cjs +1 -0
- package/dist/index110.js +1 -0
- package/dist/index111.cjs +1 -0
- package/dist/index111.js +1 -0
- package/dist/index12.cjs +1 -1
- package/dist/index12.js +4 -9
- package/dist/index13.cjs +1 -1
- package/dist/index13.js +9 -11
- package/dist/index14.cjs +1 -1
- package/dist/index14.js +11 -2
- package/dist/index15.cjs +1 -1
- package/dist/index15.js +2 -5
- package/dist/index16.cjs +1 -1
- package/dist/index16.js +5 -2
- package/dist/index17.cjs +1 -1
- package/dist/index17.js +2 -2
- package/dist/index18.cjs +1 -1
- package/dist/index18.js +2 -2
- package/dist/index19.cjs +1 -1
- package/dist/index19.js +2 -2
- package/dist/index20.cjs +1 -1
- package/dist/index20.js +2 -2
- package/dist/index21.cjs +1 -1
- package/dist/index21.js +2 -2
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +2 -2
- package/dist/index23.cjs +1 -1
- package/dist/index23.js +2 -2
- package/dist/index24.cjs +1 -1
- package/dist/index24.js +2 -2
- package/dist/index25.cjs +1 -1
- package/dist/index25.js +2 -2
- package/dist/index26.cjs +1 -1
- package/dist/index26.js +2 -2
- package/dist/index27.cjs +1 -1
- package/dist/index27.js +2 -4
- package/dist/index28.cjs +1 -1
- package/dist/index28.js +4 -4
- package/dist/index29.cjs +1 -1
- package/dist/index29.js +4 -8
- package/dist/index3.cjs +1 -1
- package/dist/index3.js +1 -1
- package/dist/index30.cjs +1 -1
- package/dist/index30.js +8 -4
- package/dist/index31.cjs +1 -1
- package/dist/index31.js +2 -8
- package/dist/index32.cjs +1 -1
- package/dist/index32.js +4 -4
- package/dist/index33.cjs +1 -1
- package/dist/index33.js +8 -2
- package/dist/index34.cjs +1 -1
- package/dist/index34.js +4 -5
- package/dist/index35.cjs +1 -1
- package/dist/index35.js +2 -2
- package/dist/index36.cjs +1 -1
- package/dist/index36.js +5 -10
- package/dist/index37.cjs +1 -1
- package/dist/index37.js +2 -2
- package/dist/index38.cjs +1 -1
- package/dist/index38.js +10 -2
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +2 -2
- package/dist/index4.cjs +1 -1
- package/dist/index4.js +1 -1
- package/dist/index40.cjs +1 -1
- package/dist/index40.js +2 -6
- package/dist/index41.cjs +1 -1
- package/dist/index41.js +2 -3
- package/dist/index42.cjs +1 -1
- package/dist/index42.js +6 -2
- package/dist/index43.cjs +1 -1
- package/dist/index43.js +3 -2
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +2 -2
- package/dist/index45.cjs +1 -1
- package/dist/index45.js +2 -2
- package/dist/index46.cjs +1 -1
- package/dist/index46.js +2 -10
- package/dist/index47.cjs +1 -1
- package/dist/index47.js +2 -11
- package/dist/index48.cjs +1 -1
- package/dist/index48.js +10 -1
- package/dist/index49.cjs +1 -1
- package/dist/index49.js +11 -1
- package/dist/index5.cjs +1 -1
- package/dist/index5.js +1 -1
- package/dist/index50.cjs +1 -1
- package/dist/index50.js +1 -1
- package/dist/index51.cjs +1 -1
- package/dist/index51.js +1 -1
- package/dist/index52.cjs +1 -1
- package/dist/index52.js +1 -1
- package/dist/index53.cjs +1 -1
- package/dist/index53.js +1 -1
- package/dist/index54.cjs +1 -1
- package/dist/index54.js +1 -15
- package/dist/index55.cjs +1 -1
- package/dist/index55.js +1 -1
- package/dist/index56.cjs +1 -1
- package/dist/index56.js +15 -1
- package/dist/index57.cjs +1 -1
- package/dist/index57.js +1 -1
- package/dist/index58.cjs +1 -1
- package/dist/index58.js +1 -1
- package/dist/index59.cjs +1 -1
- package/dist/index59.js +1 -1
- package/dist/index6.cjs +1 -1
- package/dist/index6.js +1 -1
- package/dist/index60.cjs +1 -1
- package/dist/index60.js +1 -1
- package/dist/index61.cjs +1 -1
- package/dist/index61.js +1 -1
- package/dist/index62.cjs +1 -1
- package/dist/index62.js +1 -1
- package/dist/index63.cjs +1 -1
- package/dist/index63.js +1 -1
- package/dist/index64.cjs +1 -1
- package/dist/index64.js +1 -1
- package/dist/index65.cjs +1 -1
- package/dist/index65.js +1 -1
- package/dist/index66.cjs +1 -1
- package/dist/index66.js +1 -1
- package/dist/index67.cjs +1 -1
- package/dist/index67.js +1 -1
- package/dist/index68.cjs +1 -1
- package/dist/index68.js +1 -1
- package/dist/index69.cjs +1 -1
- package/dist/index69.js +1 -1
- package/dist/index7.cjs +1 -1
- package/dist/index7.js +3 -1
- package/dist/index70.cjs +1 -1
- package/dist/index70.js +1 -1
- package/dist/index71.cjs +1 -1
- package/dist/index71.js +1 -1
- package/dist/index72.cjs +1 -1
- package/dist/index72.js +1 -1
- package/dist/index73.cjs +1 -1
- package/dist/index73.js +1 -1
- package/dist/index74.cjs +1 -1
- package/dist/index74.js +1 -1
- package/dist/index75.cjs +1 -1
- package/dist/index75.js +1 -1
- package/dist/index76.cjs +1 -1
- package/dist/index76.js +1 -1
- package/dist/index77.cjs +1 -1
- package/dist/index77.js +1 -1
- package/dist/index78.cjs +1 -1
- package/dist/index78.js +1 -1
- package/dist/index79.cjs +1 -1
- package/dist/index79.js +1 -1
- package/dist/index8.cjs +1 -1
- package/dist/index8.js +4 -2
- package/dist/index80.cjs +1 -1
- package/dist/index80.js +1 -1
- package/dist/index81.cjs +1 -1
- package/dist/index81.js +1 -1
- package/dist/index82.cjs +1 -1
- package/dist/index82.js +1 -1
- package/dist/index83.cjs +1 -1
- package/dist/index83.js +1 -1
- package/dist/index84.cjs +1 -1
- package/dist/index84.js +1 -5
- package/dist/index85.cjs +1 -1
- package/dist/index85.js +1 -1
- package/dist/index86.cjs +1 -1
- package/dist/index86.js +1 -1
- package/dist/index87.cjs +1 -1
- package/dist/index87.js +1 -1
- package/dist/index88.cjs +1 -1
- package/dist/index88.js +5 -2
- package/dist/index89.cjs +1 -1
- package/dist/index89.js +1 -1
- package/dist/index9.cjs +1 -1
- package/dist/index9.js +2 -2
- package/dist/index90.cjs +1 -1
- package/dist/index90.js +1 -1
- package/dist/index91.cjs +1 -1
- package/dist/index91.js +1 -4
- package/dist/index92.cjs +1 -1
- package/dist/index92.js +2 -1
- package/dist/index93.cjs +1 -1
- package/dist/index93.js +1 -1
- package/dist/index94.cjs +1 -1
- package/dist/index94.js +1 -1
- package/dist/index95.cjs +1 -1
- package/dist/index95.js +4 -3
- package/dist/index96.cjs +1 -1
- package/dist/index96.js +1 -1
- package/dist/index97.cjs +1 -1
- package/dist/index97.js +1 -1
- package/dist/index98.cjs +1 -1
- package/dist/index98.js +1 -1
- package/dist/index99.cjs +1 -1
- package/dist/index99.js +3 -1
- package/dist/src/components/forms/password-checklist/PasswordChecklist.component.d.ts +22 -0
- package/dist/src/components/forms/password-checklist/PasswordChecklist.component.d.ts.map +1 -0
- package/dist/src/components/forms/password-checklist/PasswordChecklist.styles.d.ts +7 -0
- package/dist/src/components/forms/password-checklist/PasswordChecklist.styles.d.ts.map +1 -0
- package/dist/src/components/forms/password-checklist/PasswordChecklist.types.d.ts +44 -0
- package/dist/src/components/forms/password-checklist/PasswordChecklist.types.d.ts.map +1 -0
- package/dist/src/components/forms/password-input/PasswordInput.component.d.ts.map +1 -1
- package/dist/src/components/forms/password-input/PasswordInput.types.d.ts +7 -0
- package/dist/src/components/forms/password-input/PasswordInput.types.d.ts.map +1 -1
- package/dist/src/components/navigation/top-nav/TopNav.component.d.ts +5 -0
- package/dist/src/components/navigation/top-nav/TopNav.component.d.ts.map +1 -0
- package/dist/src/components/navigation/top-nav/TopNav.styles.d.ts +9 -0
- package/dist/src/components/navigation/top-nav/TopNav.styles.d.ts.map +1 -0
- package/dist/src/components/navigation/top-nav/TopNav.types.d.ts +27 -0
- package/dist/src/components/navigation/top-nav/TopNav.types.d.ts.map +1 -0
- package/dist/src/index.d.ts +4 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});/* empty css */const e=require("./index3.cjs"),r=require("./index4.cjs"),o=require("./index5.cjs"),t=require("./index6.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});/* empty css */const e=require("./index3.cjs"),r=require("./index4.cjs"),o=require("./index5.cjs"),t=require("./index6.cjs"),s=require("./index7.cjs"),i=require("./index8.cjs"),n=require("./index9.cjs"),p=require("./index10.cjs"),x=require("./index11.cjs"),a=require("./index12.cjs"),l=require("./index13.cjs"),d=require("./index14.cjs"),u=require("./index15.cjs"),c=require("./index16.cjs"),g=require("./index17.cjs"),C=require("./index18.cjs"),j=require("./index19.cjs"),S=require("./index20.cjs"),q=require("./index21.cjs"),D=require("./index22.cjs"),I=require("./index23.cjs"),P=require("./index24.cjs"),m=require("./index25.cjs"),T=require("./index26.cjs"),h=require("./index27.cjs"),b=require("./index28.cjs"),L=require("./index29.cjs"),R=require("./index30.cjs"),A=require("./index31.cjs"),O=require("./index32.cjs"),y=require("./index33.cjs"),B=require("./index34.cjs"),v=require("./index35.cjs"),k=require("./index36.cjs"),E=require("./index37.cjs"),F=require("./index38.cjs"),N=require("./index39.cjs"),_=require("./index40.cjs"),f=require("./index41.cjs"),M=require("./index42.cjs"),H=require("./index43.cjs"),w=require("./index44.cjs"),G=require("./index45.cjs"),U=require("./index46.cjs"),W=require("./index47.cjs"),V=require("./index48.cjs"),z=require("./index49.cjs"),J=require("./index50.cjs"),K=require("@adam-milo/icons"),Q=require("./index51.cjs"),X=require("./index52.cjs");exports.Button=e.Button,exports.IconButton=r.IconButton,exports.MenuIconButton=o.MenuIconButton,exports.EmailInput=t.EmailInput,exports.PasswordInput=s.PasswordInput,exports.DEFAULT_PASSWORD_LABELS=i.DEFAULT_PASSWORD_LABELS,exports.DEFAULT_PASSWORD_RULES=i.DEFAULT_PASSWORD_RULES,exports.PASSWORD_MIN_LENGTH=i.PASSWORD_MIN_LENGTH,exports.PASSWORD_RULES=i.PASSWORD_RULES,exports.PasswordChecklist=i.PasswordChecklist,exports.isPasswordValid=i.isPasswordValid,exports.NumericInput=n.NumericInput,exports.AlphanumericInput=p.AlphanumericInput,exports.Checkbox=x.Checkbox,exports.Radio=a.Radio,exports.Select=l.Select,exports.SelectContent=l.SelectContent,exports.SelectGroup=l.SelectGroup,exports.SelectItem=l.SelectItem,exports.SelectLabel=l.SelectLabel,exports.SelectSeparator=l.SelectSeparator,exports.SelectTrigger=l.SelectTrigger,exports.SelectValue=l.SelectValue,exports.PhoneInput=d.PhoneInput,exports.OTPInput=u.OTPInput,exports.Toggle=c.Toggle,exports.Form=g.Form,exports.FormField=C.FormField,exports.ControlledEmailInput=j.ControlledEmailInput,exports.ControlledPasswordInput=S.ControlledPasswordInput,exports.ControlledCheckbox=q.ControlledCheckbox,exports.ControlledRadio=D.ControlledRadio,exports.ControlledToggle=I.ControlledToggle,exports.ControlledNumericInput=P.ControlledNumericInput,exports.ControlledAlphanumericInput=m.ControlledAlphanumericInput,exports.ControlledPhoneInput=T.ControlledPhoneInput,exports.ControlledOTPInput=h.ControlledOTPInput,exports.ControlledSelect=b.ControlledSelect,exports.Tabs=L.Tabs,exports.TabsContent=L.TabsContent,exports.TabsList=L.TabsList,exports.TabsTrigger=L.TabsTrigger,exports.Stepper=R.Stepper,exports.TopNav=A.TopNav,exports.Alert=O.Alert,exports.Card=y.Card,exports.CardContent=y.CardContent,exports.CardDescription=y.CardDescription,exports.CardFooter=y.CardFooter,exports.CardHeader=y.CardHeader,exports.CardTitle=y.CardTitle,exports.DataTable=B.DataTable,exports.Chip=v.Chip,exports.ChipGroup=k.ChipGroup,exports.Badge=E.Badge,exports.Dialog=F.Dialog,exports.DialogClose=F.DialogClose,exports.DialogCloseButton=F.DialogCloseButton,exports.DialogContent=F.DialogContent,exports.DialogDescription=F.DialogDescription,exports.DialogFooter=F.DialogFooter,exports.DialogHeader=F.DialogHeader,exports.DialogIcon=F.DialogIcon,exports.DialogOverlay=F.DialogOverlay,exports.DialogPortal=F.DialogPortal,exports.DialogTitle=F.DialogTitle,exports.DialogTrigger=F.DialogTrigger,exports.Stack=N.Stack,exports.Container=_.Container,exports.Divider=f.Divider,exports.AuthLayout=M.AuthLayout,exports.SimpleHeader=H.SimpleHeader,exports.Grid=w.Grid,exports.Text=G.Text,exports.Heading=U.Heading,exports.Link=W.Link,exports.Spinner=V.Spinner,exports.AiLoader=z.AiLoader,exports.cn=J.cn,exports.generateId=J.generateId,Object.defineProperty(exports,"Icon",{enumerable:!0,get:()=>K.Icon}),Object.defineProperty(exports,"availableIcons",{enumerable:!0,get:()=>K.availableIcons}),Object.defineProperty(exports,"figmaIconMapping",{enumerable:!0,get:()=>K.figmaIconMapping}),Object.defineProperty(exports,"getRadixIconName",{enumerable:!0,get:()=>K.getRadixIconName}),exports.allCountries=Q.allCountries,exports.commonCountries=Q.commonCountries,exports.defaultCountries=Q.defaultCountries,exports.defaultPhoneMask=Q.defaultPhoneMask,exports.formatPhoneNumber=Q.formatPhoneNumber,exports.getCountriesByDialCode=Q.getCountriesByDialCode,exports.getCountryByCode=Q.getCountryByCode,exports.getCountryByDialCode=Q.getCountryByDialCode,exports.getPhoneDigits=Q.getPhoneDigits,exports.getPhoneMask=Q.getPhoneMask,exports.isValidPhoneLength=Q.isValidPhoneLength,exports.phoneMasks=Q.phoneMasks,exports.searchCountries=Q.searchCountries,exports.getResponsiveBase=X.getResponsiveBase,exports.getResponsiveClasses=X.getResponsiveClasses,exports.getResponsiveSizeClasses=X.getResponsiveSizeClasses,exports.isResponsiveObject=X.isResponsiveObject;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
/* empty css */import{Button as o}from"./index3.js";import{IconButton as i}from"./index4.js";import{MenuIconButton as m}from"./index5.js";import{EmailInput as r}from"./index6.js";import{PasswordInput as p}from"./index7.js";import{
|
|
1
|
+
/* empty css */import{Button as o}from"./index3.js";import{IconButton as i}from"./index4.js";import{MenuIconButton as m}from"./index5.js";import{EmailInput as r}from"./index6.js";import{PasswordInput as p}from"./index7.js";import{DEFAULT_PASSWORD_LABELS as t,DEFAULT_PASSWORD_RULES as d,PASSWORD_MIN_LENGTH as e,PASSWORD_RULES as n,PasswordChecklist as s,isPasswordValid as x}from"./index8.js";import{NumericInput as f}from"./index9.js";import{AlphanumericInput as j}from"./index10.js";import{Checkbox as a}from"./index11.js";import{Radio as c}from"./index12.js";import{Select as l,SelectContent as b,SelectGroup as g,SelectItem as h,SelectLabel as k,SelectSeparator as q,SelectTrigger as u,SelectValue as v}from"./index13.js";import{PhoneInput as w}from"./index14.js";import{OTPInput as y}from"./index15.js";import{Toggle as z}from"./index16.js";import{Form as A}from"./index17.js";import{FormField as B}from"./index18.js";import{ControlledEmailInput as C}from"./index19.js";import{ControlledPasswordInput as D}from"./index20.js";import{ControlledCheckbox as E}from"./index21.js";import{ControlledRadio as F}from"./index22.js";import{ControlledToggle as G}from"./index23.js";import{ControlledNumericInput as H}from"./index24.js";import{ControlledAlphanumericInput as I}from"./index25.js";import{ControlledPhoneInput as J}from"./index26.js";import{ControlledOTPInput as K}from"./index27.js";import{ControlledSelect as L}from"./index28.js";import{Tabs as M,TabsContent as N,TabsList as O,TabsTrigger as P}from"./index29.js";import{Stepper as Q}from"./index30.js";import{TopNav as R}from"./index31.js";import{Alert as S}from"./index32.js";import{Card as T,CardContent as U,CardDescription as V,CardFooter as W,CardHeader as X,CardTitle as Y}from"./index33.js";import{DataTable as Z}from"./index34.js";import{Chip as $}from"./index35.js";import{ChipGroup as _}from"./index36.js";import{Badge as oo}from"./index37.js";import{Dialog as io,DialogClose as mo,DialogCloseButton as ro,DialogContent as po,DialogDescription as to,DialogFooter as eo,DialogHeader as no,DialogIcon as so,DialogOverlay as xo,DialogPortal as fo,DialogTitle as jo,DialogTrigger as ao}from"./index38.js";import{Stack as co}from"./index39.js";import{Container as lo}from"./index40.js";import{Divider as bo}from"./index41.js";import{AuthLayout as go}from"./index42.js";import{SimpleHeader as ho}from"./index43.js";import{Grid as ko}from"./index44.js";import{Text as qo}from"./index45.js";import{Heading as uo}from"./index46.js";import{Link as vo}from"./index47.js";import{Spinner as wo}from"./index48.js";import{AiLoader as yo}from"./index49.js";import{cn as zo,generateId as Ao}from"./index50.js";import{Icon as Bo,availableIcons as Co,figmaIconMapping as Do,getRadixIconName as Eo}from"@adam-milo/icons";import{allCountries as Fo,commonCountries as Go,defaultCountries as Ho,defaultPhoneMask as Io,formatPhoneNumber as Jo,getCountriesByDialCode as Ko,getCountryByCode as Lo,getCountryByDialCode as Mo,getPhoneDigits as No,getPhoneMask as Oo,isValidPhoneLength as Po,phoneMasks as Qo,searchCountries as Ro}from"./index51.js";import{getResponsiveBase as So,getResponsiveClasses as To,getResponsiveSizeClasses as Uo,isResponsiveObject as Vo}from"./index52.js";export{yo as AiLoader,S as Alert,j as AlphanumericInput,go as AuthLayout,oo as Badge,o as Button,T as Card,U as CardContent,V as CardDescription,W as CardFooter,X as CardHeader,Y as CardTitle,a as Checkbox,$ as Chip,_ as ChipGroup,lo as Container,I as ControlledAlphanumericInput,E as ControlledCheckbox,C as ControlledEmailInput,H as ControlledNumericInput,K as ControlledOTPInput,D as ControlledPasswordInput,J as ControlledPhoneInput,F as ControlledRadio,L as ControlledSelect,G as ControlledToggle,t as DEFAULT_PASSWORD_LABELS,d as DEFAULT_PASSWORD_RULES,Z as DataTable,io as Dialog,mo as DialogClose,ro as DialogCloseButton,po as DialogContent,to as DialogDescription,eo as DialogFooter,no as DialogHeader,so as DialogIcon,xo as DialogOverlay,fo as DialogPortal,jo as DialogTitle,ao as DialogTrigger,bo as Divider,r as EmailInput,A as Form,B as FormField,ko as Grid,uo as Heading,Bo as Icon,i as IconButton,vo as Link,m as MenuIconButton,f as NumericInput,y as OTPInput,e as PASSWORD_MIN_LENGTH,n as PASSWORD_RULES,s as PasswordChecklist,p as PasswordInput,w as PhoneInput,c as Radio,l as Select,b as SelectContent,g as SelectGroup,h as SelectItem,k as SelectLabel,q as SelectSeparator,u as SelectTrigger,v as SelectValue,ho as SimpleHeader,wo as Spinner,co as Stack,Q as Stepper,M as Tabs,N as TabsContent,O as TabsList,P as TabsTrigger,qo as Text,z as Toggle,R as TopNav,Fo as allCountries,Co as availableIcons,zo as cn,Go as commonCountries,Ho as defaultCountries,Io as defaultPhoneMask,Do as figmaIconMapping,Jo as formatPhoneNumber,Ao as generateId,Ko as getCountriesByDialCode,Lo as getCountryByCode,Mo as getCountryByDialCode,No as getPhoneDigits,Oo as getPhoneMask,Eo as getRadixIconName,So as getResponsiveBase,To as getResponsiveClasses,Uo as getResponsiveSizeClasses,x as isPasswordValid,Vo as isResponsiveObject,Po as isValidPhoneLength,Qo as phoneMasks,Ro as searchCountries};
|
package/dist/index10.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),a=require("./index56.cjs"),n=require("./index58.cjs"),l=t.forwardRef(({allowHyphen:l=!1,allowUnderscore:r=!1,allowSpace:s=!1,minLength:u,maxLength:i,validate:c,onChange:o,"data-cy":p,"data-testid":d,...h},g)=>{const m=t.useRef(null),f=n.useMergedRef(g,m),v=t.useMemo(()=>{let e="^[a-zA-Z0-9";return l&&(e+="\\-"),r&&(e+="_"),s&&(e+=" "),e+="]*$",new RegExp(e)},[l,r,s]),x=t.useMemo(()=>{let e="[a-zA-Z0-9";return l&&(e+="\\-"),r&&(e+="_"),s&&(e+=" "),e+="]",new RegExp(e)},[l,r,s]),y=t.useCallback(e=>{if(e){if(!v.test(e)){let e="letters and numbers";const t=[];return l&&t.push("hyphens"),r&&t.push("underscores"),s&&t.push("spaces"),t.length>0&&(e+=`, ${t.join(", ")}`),`Only ${e} are allowed`}return void 0!==u&&e.length<u?`Must be at least ${u} characters`:void 0!==i&&e.length>i?`Must be at most ${i} characters`:void 0}},[v,u,i,l,r,s]),b=t.useCallback(e=>c?y(e)||c(e):y(e),[y,c]),[j,w]=t.useState(null);t.useEffect(()=>{null!==j&&m.current&&(m.current.setSelectionRange(j,j),w(null))},[h.value,j]);const R=t.useCallback(e=>{const t=e.target,a=t.value,n=t.selectionStart||0,l=a.split("").filter(e=>x.test(e)).join(""),r=n-a.slice(0,n).split("").filter(e=>!x.test(e)).length;t.value=l;void 0!==h.value?w(r):t.setSelectionRange(r,r),o?.(e)},[x,o,h.value]);return e.jsx(a.Input,{ref:f,type:"text",minLength:u,maxLength:i,validate:b,onChange:R,"data-cy":p||"alphanumeric-input","data-testid":d||"alphanumeric-input",...h})});l.displayName="AlphanumericInput",exports.AlphanumericInput=l;
|
package/dist/index10.js
CHANGED
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
return e("
|
|
3
|
-
/* @__PURE__ */e("div",{className:s,children:[
|
|
4
|
-
/* @__PURE__ */r("input",{ref:H,id:z,type:"checkbox",checked:q,className:l(p,x&&m,"checkbox-checkmark",f),"aria-invalid":x?"true":"false","aria-required":v?"true":void 0,"aria-describedby":x?A:y?B:void 0,"data-cy":D,"data-testid":E,"data-indeterminate":k?"true":void 0,disabled:j,required:v,...F}),a&&/* @__PURE__ */r("label",{htmlFor:z,className:l(u,j&&h),"data-cy":`${D}-label`,"data-testid":`${E}-label`,children:I})]}),x&&/* @__PURE__ */r("span",{id:A,className:n,role:"alert","data-cy":`${D}-error`,"data-testid":`${E}-error`,children:x}),y&&!x&&/* @__PURE__ */r("span",{id:B,className:o,"data-cy":`${D}-helper`,"data-testid":`${E}-helper`,children:y})]})});x.displayName="Checkbox";export{x as Checkbox};
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{forwardRef as t,useRef as n,useMemo as a,useCallback as l,useState as r,useEffect as s}from"react";import{Input as i}from"./index56.js";import{useMergedRef as o}from"./index58.js";const u=t(({allowHyphen:t=!1,allowUnderscore:u=!1,allowSpace:c=!1,minLength:p,maxLength:h,validate:d,onChange:m,"data-cy":g,"data-testid":v,...f},x)=>{const y=n(null),w=o(x,y),j=a(()=>{let e="^[a-zA-Z0-9";return t&&(e+="\\-"),u&&(e+="_"),c&&(e+=" "),e+="]*$",new RegExp(e)},[t,u,c]),$=a(()=>{let e="[a-zA-Z0-9";return t&&(e+="\\-"),u&&(e+="_"),c&&(e+=" "),e+="]",new RegExp(e)},[t,u,c]),L=l(e=>{if(e){if(!j.test(e)){let e="letters and numbers";const n=[];return t&&n.push("hyphens"),u&&n.push("underscores"),c&&n.push("spaces"),n.length>0&&(e+=`, ${n.join(", ")}`),`Only ${e} are allowed`}return void 0!==p&&e.length<p?`Must be at least ${p} characters`:void 0!==h&&e.length>h?`Must be at most ${h} characters`:void 0}},[j,p,h,t,u,c]),R=l(e=>d?L(e)||d(e):L(e),[L,d]),[S,b]=r(null);s(()=>{null!==S&&y.current&&(y.current.setSelectionRange(S,S),b(null))},[f.value,S]);const A=l(e=>{const t=e.target,n=t.value,a=t.selectionStart||0,l=n.split("").filter(e=>$.test(e)).join(""),r=a-n.slice(0,a).split("").filter(e=>!$.test(e)).length;t.value=l;void 0!==f.value?b(r):t.setSelectionRange(r,r),m?.(e)},[$,m,f.value]);/* @__PURE__ */
|
|
2
|
+
return e(i,{ref:w,type:"text",minLength:p,maxLength:h,validate:R,onChange:A,"data-cy":g||"alphanumeric-input","data-testid":v||"alphanumeric-input",...f})});u.displayName="AlphanumericInput";export{u as AlphanumericInput};
|
package/dist/index100.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=require("./index104.cjs");function r(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const r in e)if("default"!==r){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}return t.default=e,Object.freeze(t)}const n=r(e);var o=n[" useInsertionEffect ".trim().toString()]||t.useLayoutEffect;exports.useControllableState=function({prop:e,defaultProp:t,onChange:r=()=>{},caller:u}){const[c,f,s]=function({defaultProp:e,onChange:t}){const[r,u]=n.useState(e),c=n.useRef(r),f=n.useRef(t);return o(()=>{f.current=t},[t]),n.useEffect(()=>{c.current!==r&&(f.current?.(r),c.current=r)},[r,c]),[r,u,f]}({defaultProp:t,onChange:r}),i=void 0!==e,a=i?e:c;{const t=n.useRef(void 0!==e);n.useEffect(()=>{const e=t.current;if(e!==i){}t.current=i},[i,u])}const l=n.useCallback(t=>{if(i){const r=function(e){return"function"==typeof e}(t)?t(e):t;r!==e&&s.current?.(r)}else f(t)},[i,e,f,s]);return[a,l]};
|
package/dist/index100.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as e from"react";import{useLayoutEffect as t}from"./index104.js";var r=e[" useInsertionEffect ".trim().toString()]||t;function n({prop:t,defaultProp:n,onChange:o=()=>{},caller:u}){const[c,f,s]=function({defaultProp:t,onChange:n}){const[o,u]=e.useState(t),c=e.useRef(o),f=e.useRef(n);return r(()=>{f.current=n},[n]),e.useEffect(()=>{c.current!==o&&(f.current?.(o),c.current=o)},[o,c]),[o,u,f]}({defaultProp:n,onChange:o}),a=void 0!==t,i=a?t:c;{const r=e.useRef(void 0!==t);e.useEffect(()=>{const e=r.current;if(e!==a){}r.current=a},[a,u])}const p=e.useCallback(e=>{if(a){const r=function(e){return"function"==typeof e}(e)?e(t):e;r!==t&&s.current?.(r)}else f(e)},[a,t,f,s]);return[i,p]}export{n as useControllableState};
|
package/dist/index101.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),r=require("./index98.cjs"),t=require("react/jsx-runtime");function o(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const t in e)if("default"!==t){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,o.get?o:{enumerable:!0,get:()=>e[t]})}return r.default=e,Object.freeze(r)}const i=o(e);var n=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),a=i.forwardRef((e,o)=>t.jsx(r.Primitive.span,{...e,ref:o,style:{...n,...e.style}}));a.displayName="VisuallyHidden";var s=a;exports.Root=s,exports.VISUALLY_HIDDEN_STYLES=n,exports.VisuallyHidden=a;
|
package/dist/index101.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import*as r from"react";import{Primitive as e}from"./index98.js";import{jsx as a}from"react/jsx-runtime";var i=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),o=r.forwardRef((r,o)=>/* @__PURE__ */a(e.span,{...r,ref:o,style:{...i,...r.style}}));o.displayName="VisuallyHidden";var t=o;export{t as Root,i as VISUALLY_HIDDEN_STYLES,o as VisuallyHidden};
|
package/dist/index102.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function e(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const r in e)if("default"!==r){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}return t.default=e,Object.freeze(t)}const t=e(require("react"));exports.useCallbackRef=function(e){const r=t.useRef(e);return t.useEffect(()=>{r.current=e}),t.useMemo(()=>(...e)=>r.current?.(...e),[])};
|
package/dist/index102.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import*as
|
|
2
|
-
return i(e.svg,{...s,ref:o,width:a,height:n,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:r.asChild?t:/* @__PURE__ */i("polygon",{points:"0,0 30,0 15,10"})})});o.displayName="Arrow";var t=o;export{o as Arrow,t as Root};
|
|
1
|
+
import*as e from"react";function r(r){const t=e.useRef(r);return e.useEffect(()=>{t.current=r}),e.useMemo(()=>(...e)=>t.current?.(...e),[])}export{r as useCallbackRef};
|
package/dist/index103.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=require("./index102.cjs");function r(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const r in e)if("default"!==r){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}return t.default=e,Object.freeze(t)}const n=r(e);exports.useEscapeKeydown=function(e,r=globalThis?.document){const o=t.useCallbackRef(e);n.useEffect(()=>{const e=e=>{"Escape"===e.key&&o(e)};return r.addEventListener("keydown",e,{capture:!0}),()=>r.removeEventListener("keydown",e,{capture:!0})},[o,r])};
|
package/dist/index103.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{
|
|
1
|
+
import*as e from"react";import{useCallbackRef as t}from"./index102.js";function n(n,o=globalThis?.document){const r=t(n);e.useEffect(()=>{const e=e=>{"Escape"===e.key&&r(e)};return o.addEventListener("keydown",e,{capture:!0}),()=>o.removeEventListener("keydown",e,{capture:!0})},[r,o])}export{n as useEscapeKeydown};
|
package/dist/index104.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function e(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const r in e)if("default"!==r){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:()=>e[r]})}return t.default=e,Object.freeze(t)}const t=e(require("react"));var r=globalThis?.document?t.useLayoutEffect:()=>{};exports.useLayoutEffect=r;
|
package/dist/index104.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import*as t from"react";var a=globalThis?.document?t.useLayoutEffect:()=>{};export{a as useLayoutEffect};
|
package/dist/index105.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index108.cjs"),t=require("react"),r=require("react-dom");function n(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const r in e)if("default"!==r){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}return t.default=e,Object.freeze(t)}const o=n(t),i=n(r);var u="undefined"!=typeof document?t.useLayoutEffect:function(){};function s(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;0!==n--;)if(!s(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;0!==n--;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;0!==n--;){const r=o[n];if(("_owner"!==r||!e.$$typeof)&&!s(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function f(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function c(e,t){const r=f(e);return Math.round(t*r)/r}function l(e){const t=o.useRef(e);return u(()=>{t.current=e}),t}const a=t=>({name:"arrow",options:t,fn(r){const{element:n,padding:o}="function"==typeof t?t(r):t;return n&&(i=n,{}.hasOwnProperty.call(i,"current"))?null!=n.current?e.arrow({element:n.current,padding:o}).fn(r):{}:n?e.arrow({element:n,padding:o}).fn(r):{};var i}});exports.autoUpdate=e.autoUpdate,exports.computePosition=e.computePosition,exports.platform=e.platform,exports.arrow=(e,t)=>({...a(e),options:[e,t]}),exports.flip=(t,r)=>({...e.flip(t),options:[t,r]}),exports.hide=(t,r)=>({...e.hide(t),options:[t,r]}),exports.limitShift=(t,r)=>({...e.limitShift(t),options:[t,r]}),exports.offset=(t,r)=>({...e.offset(t),options:[t,r]}),exports.shift=(t,r)=>({...e.shift(t),options:[t,r]}),exports.size=(t,r)=>({...e.size(t),options:[t,r]}),exports.useFloating=function(t){void 0===t&&(t={});const{placement:r="bottom",strategy:n="absolute",middleware:a=[],platform:p,elements:{reference:d,floating:m}={},transform:g=!0,whileElementsMounted:y,open:w}=t,[x,h]=o.useState({x:0,y:0,strategy:n,placement:r,middlewareData:{},isPositioned:!1}),[b,P]=o.useState(a);s(b,a)||P(a);const[S,O]=o.useState(null),[j,M]=o.useState(null),R=o.useCallback(e=>{e!==q.current&&(q.current=e,O(e))},[]),v=o.useCallback(e=>{e!==z.current&&(z.current=e,M(e))},[]),k=d||S,C=m||j,q=o.useRef(null),z=o.useRef(null),D=o.useRef(x),A=null!=y,E=l(y),F=l(p),T=l(w),U=o.useCallback(()=>{if(!q.current||!z.current)return;const t={placement:r,strategy:n,middleware:b};F.current&&(t.platform=F.current),e.computePosition(q.current,z.current,t).then(e=>{const t={...e,isPositioned:!1!==T.current};$.current&&!s(D.current,t)&&(D.current=t,i.flushSync(()=>{h(t)}))})},[b,r,n,F,T]);u(()=>{!1===w&&D.current.isPositioned&&(D.current.isPositioned=!1,h(e=>({...e,isPositioned:!1})))},[w]);const $=o.useRef(!1);u(()=>($.current=!0,()=>{$.current=!1}),[]),u(()=>{if(k&&(q.current=k),C&&(z.current=C),k&&C){if(E.current)return E.current(k,C,U);U()}},[k,C,U,E,A]);const L=o.useMemo(()=>({reference:q,floating:z,setReference:R,setFloating:v}),[R,v]),V=o.useMemo(()=>({reference:k,floating:C}),[k,C]),_=o.useMemo(()=>{const e={position:n,left:0,top:0};if(!V.floating)return e;const t=c(V.floating,x.x),r=c(V.floating,x.y);return g?{...e,transform:"translate("+t+"px, "+r+"px)",...f(V.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,g,V.floating,x.x,x.y]);return o.useMemo(()=>({...x,update:U,refs:L,elements:V,floatingStyles:_}),[x,U,L,V,_])};
|
package/dist/index105.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{computePosition as e,offset as t,shift as n,flip as r,size as o,hide as i,arrow as u,limitShift as s}from"./index108.js";import{autoUpdate as f,platform as a}from"./index108.js";import*as c from"react";import{useLayoutEffect as l}from"react";import*as p from"react-dom";var m="undefined"!=typeof document?l:function(){};function d(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!==r--;)if(!d(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!==r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!d(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function g(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function y(e,t){const n=g(e);return Math.round(t*n)/n}function w(e){const t=c.useRef(e);return m(()=>{t.current=e}),t}function h(t){void 0===t&&(t={});const{placement:n="bottom",strategy:r="absolute",middleware:o=[],platform:i,elements:{reference:u,floating:s}={},transform:f=!0,whileElementsMounted:a,open:l}=t,[h,x]=c.useState({x:0,y:0,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[S,b]=c.useState(o);d(S,o)||b(o);const[P,R]=c.useState(null),[M,j]=c.useState(null),k=c.useCallback(e=>{e!==A.current&&(A.current=e,R(e))},[]),v=c.useCallback(e=>{e!==D.current&&(D.current=e,j(e))},[]),C=u||P,O=s||M,A=c.useRef(null),D=c.useRef(null),$=c.useRef(h),z=null!=a,E=w(a),F=w(i),V=w(l),_=c.useCallback(()=>{if(!A.current||!D.current)return;const t={placement:n,strategy:r,middleware:S};F.current&&(t.platform=F.current),e(A.current,D.current,t).then(e=>{const t={...e,isPositioned:!1!==V.current};q.current&&!d($.current,t)&&($.current=t,p.flushSync(()=>{x(t)}))})},[S,n,r,F,V]);m(()=>{!1===l&&$.current.isPositioned&&($.current.isPositioned=!1,x(e=>({...e,isPositioned:!1})))},[l]);const q=c.useRef(!1);m(()=>(q.current=!0,()=>{q.current=!1}),[]),m(()=>{if(C&&(A.current=C),O&&(D.current=O),C&&O){if(E.current)return E.current(C,O,_);_()}},[C,O,_,E,z]);const B=c.useMemo(()=>({reference:A,floating:D,setReference:k,setFloating:v}),[k,v]),G=c.useMemo(()=>({reference:C,floating:O}),[C,O]),H=c.useMemo(()=>{const e={position:r,left:0,top:0};if(!G.floating)return e;const t=y(G.floating,h.x),n=y(G.floating,h.y);return f?{...e,transform:"translate("+t+"px, "+n+"px)",...g(G.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}},[r,f,G.floating,h.x,h.y]);return c.useMemo(()=>({...h,update:_,refs:B,elements:G,floatingStyles:H}),[h,_,B,G,H])}const x=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?u({element:n.current,padding:r}).fn(t):{}:n?u({element:n,padding:r}).fn(t):{};var o}}),S=(e,n)=>({...t(e),options:[e,n]}),b=(e,t)=>({...n(e),options:[e,t]}),P=(e,t)=>({...s(e),options:[e,t]}),R=(e,t)=>({...r(e),options:[e,t]}),M=(e,t)=>({...o(e),options:[e,t]}),j=(e,t)=>({...i(e),options:[e,t]}),k=(e,t)=>({...x(e),options:[e,t]});export{k as arrow,f as autoUpdate,e as computePosition,R as flip,j as hide,P as limitShift,S as offset,a as platform,b as shift,M as size,h as useFloating};
|
package/dist/index106.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),r=require("./index98.cjs"),t=require("react/jsx-runtime");function o(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const t in e)if("default"!==t){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,o.get?o:{enumerable:!0,get:()=>e[t]})}return r.default=e,Object.freeze(r)}var i=o(e).forwardRef((e,o)=>{const{children:i,width:n=10,height:s=5,...c}=e;return t.jsx(r.Primitive.svg,{...c,ref:o,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?i:t.jsx("polygon",{points:"0,0 30,0 15,10"})})});i.displayName="Arrow";var n=i;exports.Arrow=i,exports.Root=n;
|
package/dist/index106.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import*as r from"react";import{Primitive as e}from"./index98.js";import{jsx as i}from"react/jsx-runtime";var o=r.forwardRef((r,o)=>{const{children:t,width:a=10,height:n=5,...s}=r;/* @__PURE__ */
|
|
2
|
+
return i(e.svg,{...s,ref:o,width:a,height:n,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:r.asChild?t:/* @__PURE__ */i("polygon",{points:"0,0 30,0 15,10"})})});o.displayName="Arrow";var t=o;export{o as Arrow,t as Root};
|
package/dist/index107.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=require("./index104.cjs");function r(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const r in e)if("default"!==r){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:()=>e[r]})}return t.default=e,Object.freeze(t)}const o=r(e);exports.useSize=function(e){const[r,i]=o.useState(void 0);return t.useLayoutEffect(()=>{if(e){i({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver(t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let o,n;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,n=t.blockSize}else o=e.offsetWidth,n=e.offsetHeight;i({width:o,height:n})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}i(void 0)},[e]),r};
|
package/dist/index107.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import*as e from"react";import{useLayoutEffect as r}from"./index104.js";function t(t){const[i,o]=e.useState(void 0);return r(()=>{if(t){o({width:t.offsetWidth,height:t.offsetHeight});const e=new ResizeObserver(e=>{if(!Array.isArray(e))return;if(!e.length)return;const r=e[0];let i,s;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,s=t.blockSize}else i=t.offsetWidth,s=t.offsetHeight;o({width:i,height:s})});return e.observe(t,{box:"border-box"}),()=>e.unobserve(t)}o(void 0)},[t]),i}export{t as useSize};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index109.cjs"),e=require("./index110.cjs"),n=require("./index111.cjs");function o(t){const o=n.getComputedStyle(t);let i=parseFloat(o.width)||0,r=parseFloat(o.height)||0;const l=n.isHTMLElement(t),s=l?t.offsetWidth:i,c=l?t.offsetHeight:r,f=e.round(i)!==s||e.round(r)!==c;return f&&(i=s,r=c),{width:i,height:r,$:f}}function i(t){return n.isElement(t)?t:t.contextElement}function r(t){const r=i(t);if(!n.isHTMLElement(r))return e.createCoords(1);const l=r.getBoundingClientRect(),{width:s,height:c,$:f}=o(r);let u=(f?e.round(l.width):l.width)/s,a=(f?e.round(l.height):l.height)/c;return u&&Number.isFinite(u)||(u=1),a&&Number.isFinite(a)||(a=1),{x:u,y:a}}const l=e.createCoords(0);function s(t){const e=n.getWindow(t);return n.isWebKit()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:l}function c(t,o,l,c){void 0===o&&(o=!1),void 0===l&&(l=!1);const f=t.getBoundingClientRect(),u=i(t);let a=e.createCoords(1);o&&(c?n.isElement(c)&&(a=r(c)):a=r(t));const d=function(t,e,o){return void 0===e&&(e=!1),!(!o||e&&o!==n.getWindow(t))&&e}(u,l,c)?s(u):e.createCoords(0);let g=(f.left+d.x)/a.x,h=(f.top+d.y)/a.y,m=f.width/a.x,p=f.height/a.y;if(u){const t=n.getWindow(u),e=c&&n.isElement(c)?n.getWindow(c):c;let o=t,i=n.getFrameElement(o);for(;i&&c&&e!==o;){const t=r(i),e=i.getBoundingClientRect(),l=n.getComputedStyle(i),s=e.left+(i.clientLeft+parseFloat(l.paddingLeft))*t.x,c=e.top+(i.clientTop+parseFloat(l.paddingTop))*t.y;g*=t.x,h*=t.y,m*=t.x,p*=t.y,g+=s,h+=c,o=n.getWindow(i),i=n.getFrameElement(o)}}return e.rectToClientRect({width:m,height:p,x:g,y:h})}function f(t,e){const o=n.getNodeScroll(t).scrollLeft;return e?e.left+o:c(n.getDocumentElement(t)).left+o}function u(t,e){const n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-f(t,n),y:n.top+e.scrollTop}}const a=new Set(["absolute","fixed"]);function d(t,o,i){let l;if("viewport"===o)l=function(t,e){const o=n.getWindow(t),i=n.getDocumentElement(t),r=o.visualViewport;let l=i.clientWidth,s=i.clientHeight,c=0,u=0;if(r){l=r.width,s=r.height;const t=n.isWebKit();(!t||t&&"fixed"===e)&&(c=r.offsetLeft,u=r.offsetTop)}const a=f(i);if(a<=0){const t=i.ownerDocument,e=t.body,n=getComputedStyle(e),o="CSS1Compat"===t.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,r=Math.abs(i.clientWidth-e.clientWidth-o);r<=25&&(l-=r)}else a<=25&&(l+=a);return{width:l,height:s,x:c,y:u}}(t,i);else if("document"===o)l=function(t){const o=n.getDocumentElement(t),i=n.getNodeScroll(t),r=t.ownerDocument.body,l=e.max(o.scrollWidth,o.clientWidth,r.scrollWidth,r.clientWidth),s=e.max(o.scrollHeight,o.clientHeight,r.scrollHeight,r.clientHeight);let c=-i.scrollLeft+f(t);const u=-i.scrollTop;return"rtl"===n.getComputedStyle(r).direction&&(c+=e.max(o.clientWidth,r.clientWidth)-l),{width:l,height:s,x:c,y:u}}(n.getDocumentElement(t));else if(n.isElement(o))l=function(t,o){const i=c(t,!0,"fixed"===o),l=i.top+t.clientTop,s=i.left+t.clientLeft,f=n.isHTMLElement(t)?r(t):e.createCoords(1);return{width:t.clientWidth*f.x,height:t.clientHeight*f.y,x:s*f.x,y:l*f.y}}(o,i);else{const e=s(t);l={x:o.x-e.x,y:o.y-e.y,width:o.width,height:o.height}}return e.rectToClientRect(l)}function g(t,e){const o=n.getParentNode(t);return!(o===e||!n.isElement(o)||n.isLastTraversableNode(o))&&("fixed"===n.getComputedStyle(o).position||g(o,e))}function h(t,o,i){const r=n.isHTMLElement(o),l=n.getDocumentElement(o),s="fixed"===i,a=c(t,!0,s,o);let d={scrollLeft:0,scrollTop:0};const g=e.createCoords(0);function h(){g.x=f(l)}if(r||!r&&!s)if(("body"!==n.getNodeName(o)||n.isOverflowElement(l))&&(d=n.getNodeScroll(o)),r){const t=c(o,!0,s,o);g.x=t.x+o.clientLeft,g.y=t.y+o.clientTop}else l&&h();s&&!r&&l&&h();const m=!l||r||s?e.createCoords(0):u(l,d);return{x:a.left+d.scrollLeft-g.x-m.x,y:a.top+d.scrollTop-g.y-m.y,width:a.width,height:a.height}}function m(t){return"static"===n.getComputedStyle(t).position}function p(t,e){if(!n.isHTMLElement(t)||"fixed"===n.getComputedStyle(t).position)return null;if(e)return e(t);let o=t.offsetParent;return n.getDocumentElement(t)===o&&(o=o.ownerDocument.body),o}function x(t,e){const o=n.getWindow(t);if(n.isTopLayer(t))return o;if(!n.isHTMLElement(t)){let e=n.getParentNode(t);for(;e&&!n.isLastTraversableNode(e);){if(n.isElement(e)&&!m(e))return e;e=n.getParentNode(e)}return o}let i=p(t,e);for(;i&&n.isTableElement(i)&&m(i);)i=p(i,e);return i&&n.isLastTraversableNode(i)&&m(i)&&!n.isContainingBlock(i)?o:i||n.getContainingBlock(t)||o}const y={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:o,rect:i,offsetParent:l,strategy:s}=t;const f="fixed"===s,a=n.getDocumentElement(l),d=!!o&&n.isTopLayer(o.floating);if(l===a||d&&f)return i;let g={scrollLeft:0,scrollTop:0},h=e.createCoords(1);const m=e.createCoords(0),p=n.isHTMLElement(l);if((p||!p&&!f)&&(("body"!==n.getNodeName(l)||n.isOverflowElement(a))&&(g=n.getNodeScroll(l)),n.isHTMLElement(l))){const t=c(l);h=r(l),m.x=t.x+l.clientLeft,m.y=t.y+l.clientTop}const x=!a||p||f?e.createCoords(0):u(a,g);return{width:i.width*h.x,height:i.height*h.y,x:i.x*h.x-g.scrollLeft*h.x+m.x+x.x,y:i.y*h.y-g.scrollTop*h.y+m.y+x.y}},getDocumentElement:n.getDocumentElement,getClippingRect:function(t){let{element:o,boundary:i,rootBoundary:r,strategy:l}=t;const s=[..."clippingAncestors"===i?n.isTopLayer(o)?[]:function(t,e){const o=e.get(t);if(o)return o;let i=n.getOverflowAncestors(t,[],!1).filter(t=>n.isElement(t)&&"body"!==n.getNodeName(t)),r=null;const l="fixed"===n.getComputedStyle(t).position;let s=l?n.getParentNode(t):t;for(;n.isElement(s)&&!n.isLastTraversableNode(s);){const e=n.getComputedStyle(s),o=n.isContainingBlock(s);o||"fixed"!==e.position||(r=null),(l?!o&&!r:!o&&"static"===e.position&&r&&a.has(r.position)||n.isOverflowElement(s)&&!o&&g(t,s))?i=i.filter(t=>t!==s):r=e,s=n.getParentNode(s)}return e.set(t,i),i}(o,this._c):[].concat(i),r],c=s[0],f=s.reduce((t,n)=>{const i=d(o,n,l);return t.top=e.max(i.top,t.top),t.right=e.min(i.right,t.right),t.bottom=e.min(i.bottom,t.bottom),t.left=e.max(i.left,t.left),t},d(o,c,l));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}},getOffsetParent:x,getElementRects:async function(t){const e=this.getOffsetParent||x,n=this.getDimensions,o=await n(t.floating);return{reference:h(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:n}=o(t);return{width:e,height:n}},getScale:r,isElement:n.isElement,isRTL:function(t){return"rtl"===n.getComputedStyle(t).direction}};function w(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}const v=t.offset,E=t.shift,C=t.flip,T=t.size,L=t.hide,b=t.arrow,S=t.limitShift;exports.getOverflowAncestors=n.getOverflowAncestors,exports.arrow=b,exports.autoUpdate=function(t,o,r,l){void 0===l&&(l={});const{ancestorScroll:s=!0,ancestorResize:f=!0,elementResize:u="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:d=!1}=l,g=i(t),h=s||f?[...g?n.getOverflowAncestors(g):[],...n.getOverflowAncestors(o)]:[];h.forEach(t=>{s&&t.addEventListener("scroll",r,{passive:!0}),f&&t.addEventListener("resize",r)});const m=g&&a?function(t,o){let i,r=null;const l=n.getDocumentElement(t);function s(){var t;clearTimeout(i),null==(t=r)||t.disconnect(),r=null}return function n(c,f){void 0===c&&(c=!1),void 0===f&&(f=1),s();const u=t.getBoundingClientRect(),{left:a,top:d,width:g,height:h}=u;if(c||o(),!g||!h)return;const m={rootMargin:-e.floor(d)+"px "+-e.floor(l.clientWidth-(a+g))+"px "+-e.floor(l.clientHeight-(d+h))+"px "+-e.floor(a)+"px",threshold:e.max(0,e.min(1,f))||1};let p=!0;function x(e){const o=e[0].intersectionRatio;if(o!==f){if(!p)return n();o?n(!1,o):i=setTimeout(()=>{n(!1,1e-7)},1e3)}1!==o||w(u,t.getBoundingClientRect())||n(),p=!1}try{r=new IntersectionObserver(x,{...m,root:l.ownerDocument})}catch(y){r=new IntersectionObserver(x,m)}r.observe(t)}(!0),s}(g,r):null;let p,x=-1,y=null;u&&(y=new ResizeObserver(t=>{let[e]=t;e&&e.target===g&&y&&(y.unobserve(o),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var t;null==(t=y)||t.observe(o)})),r()}),g&&!d&&y.observe(g),y.observe(o));let v=d?c(t):null;return d&&function e(){const n=c(t);v&&!w(v,n)&&r();v=n,p=requestAnimationFrame(e)}(),r(),()=>{var t;h.forEach(t=>{s&&t.removeEventListener("scroll",r),f&&t.removeEventListener("resize",r)}),null==m||m(),null==(t=y)||t.disconnect(),y=null,d&&cancelAnimationFrame(p)}},exports.computePosition=(e,n,o)=>{const i=new Map,r={platform:y,...o},l={...r.platform,_c:i};return t.computePosition(e,n,{...r,platform:l})},exports.flip=C,exports.hide=L,exports.limitShift=S,exports.offset=v,exports.platform=y,exports.shift=E,exports.size=T;
|
package/dist/index108.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{computePosition as t,offset as e,shift as n,flip as i,size as o,hide as r,arrow as c,limitShift as l}from"./index109.js";import{createCoords as s,round as f,max as u,min as h,rectToClientRect as a,floor as d}from"./index110.js";import{isElement as g,getDocumentElement as p,getOverflowAncestors as x,getComputedStyle as y,isHTMLElement as m,getWindow as w,isTopLayer as v,getParentNode as b,isLastTraversableNode as R,isTableElement as L,isContainingBlock as T,getContainingBlock as C,getNodeName as F,isOverflowElement as W,getNodeScroll as E,getFrameElement as S,isWebKit as H}from"./index111.js";function O(t){const e=y(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const o=m(t),r=o?t.offsetWidth:n,c=o?t.offsetHeight:i,l=f(n)!==r||f(i)!==c;return l&&(n=r,i=c),{width:n,height:i,$:l}}function z(t){return g(t)?t:t.contextElement}function B(t){const e=z(t);if(!m(e))return s(1);const n=e.getBoundingClientRect(),{width:i,height:o,$:r}=O(e);let c=(r?f(n.width):n.width)/i,l=(r?f(n.height):n.height)/o;return c&&Number.isFinite(c)||(c=1),l&&Number.isFinite(l)||(l=1),{x:c,y:l}}const D=/* @__PURE__ */s(0);function A(t){const e=w(t);return H()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:D}function P(t,e,n,i){void 0===e&&(e=!1),void 0===n&&(n=!1);const o=t.getBoundingClientRect(),r=z(t);let c=s(1);e&&(i?g(i)&&(c=B(i)):c=B(t));const l=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==w(t))&&e}(r,n,i)?A(r):s(0);let f=(o.left+l.x)/c.x,u=(o.top+l.y)/c.y,h=o.width/c.x,d=o.height/c.y;if(r){const t=w(r),e=i&&g(i)?w(i):i;let n=t,o=S(n);for(;o&&i&&e!==n;){const t=B(o),e=o.getBoundingClientRect(),i=y(o),r=e.left+(o.clientLeft+parseFloat(i.paddingLeft))*t.x,c=e.top+(o.clientTop+parseFloat(i.paddingTop))*t.y;f*=t.x,u*=t.y,h*=t.x,d*=t.y,f+=r,u+=c,n=w(o),o=S(n)}}return a({width:h,height:d,x:f,y:u})}function V(t,e){const n=E(t).scrollLeft;return e?e.left+n:P(p(t)).left+n}function M(t,e){const n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-V(t,n),y:n.top+e.scrollTop}}const j=/* @__PURE__ */new Set(["absolute","fixed"]);function I(t,e,n){let i;if("viewport"===e)i=function(t,e){const n=w(t),i=p(t),o=n.visualViewport;let r=i.clientWidth,c=i.clientHeight,l=0,s=0;if(o){r=o.width,c=o.height;const t=H();(!t||t&&"fixed"===e)&&(l=o.offsetLeft,s=o.offsetTop)}const f=V(i);if(f<=0){const t=i.ownerDocument,e=t.body,n=getComputedStyle(e),o="CSS1Compat"===t.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,c=Math.abs(i.clientWidth-e.clientWidth-o);c<=25&&(r-=c)}else f<=25&&(r+=f);return{width:r,height:c,x:l,y:s}}(t,n);else if("document"===e)i=function(t){const e=p(t),n=E(t),i=t.ownerDocument.body,o=u(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),r=u(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let c=-n.scrollLeft+V(t);const l=-n.scrollTop;return"rtl"===y(i).direction&&(c+=u(e.clientWidth,i.clientWidth)-o),{width:o,height:r,x:c,y:l}}(p(t));else if(g(e))i=function(t,e){const n=P(t,!0,"fixed"===e),i=n.top+t.clientTop,o=n.left+t.clientLeft,r=m(t)?B(t):s(1);return{width:t.clientWidth*r.x,height:t.clientHeight*r.y,x:o*r.x,y:i*r.y}}(e,n);else{const n=A(t);i={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return a(i)}function q(t,e){const n=b(t);return!(n===e||!g(n)||R(n))&&("fixed"===y(n).position||q(n,e))}function N(t,e,n){const i=m(e),o=p(e),r="fixed"===n,c=P(t,!0,r,e);let l={scrollLeft:0,scrollTop:0};const f=s(0);function u(){f.x=V(o)}if(i||!i&&!r)if(("body"!==F(e)||W(o))&&(l=E(e)),i){const t=P(e,!0,r,e);f.x=t.x+e.clientLeft,f.y=t.y+e.clientTop}else o&&u();r&&!i&&o&&u();const h=!o||i||r?s(0):M(o,l);return{x:c.left+l.scrollLeft-f.x-h.x,y:c.top+l.scrollTop-f.y-h.y,width:c.width,height:c.height}}function $(t){return"static"===y(t).position}function _(t,e){if(!m(t)||"fixed"===y(t).position)return null;if(e)return e(t);let n=t.offsetParent;return p(t)===n&&(n=n.ownerDocument.body),n}function k(t,e){const n=w(t);if(v(t))return n;if(!m(t)){let e=b(t);for(;e&&!R(e);){if(g(e)&&!$(e))return e;e=b(e)}return n}let i=_(t,e);for(;i&&L(i)&&$(i);)i=_(i,e);return i&&R(i)&&$(i)&&!T(i)?n:i||C(t)||n}const G={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:i,strategy:o}=t;const r="fixed"===o,c=p(i),l=!!e&&v(e.floating);if(i===c||l&&r)return n;let f={scrollLeft:0,scrollTop:0},u=s(1);const h=s(0),a=m(i);if((a||!a&&!r)&&(("body"!==F(i)||W(c))&&(f=E(i)),m(i))){const t=P(i);u=B(i),h.x=t.x+i.clientLeft,h.y=t.y+i.clientTop}const d=!c||a||r?s(0):M(c,f);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-f.scrollLeft*u.x+h.x+d.x,y:n.y*u.y-f.scrollTop*u.y+h.y+d.y}},getDocumentElement:p,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:i,strategy:o}=t;const r=[..."clippingAncestors"===n?v(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let i=x(t,[],!1).filter(t=>g(t)&&"body"!==F(t)),o=null;const r="fixed"===y(t).position;let c=r?b(t):t;for(;g(c)&&!R(c);){const e=y(c),n=T(c);n||"fixed"!==e.position||(o=null),(r?!n&&!o:!n&&"static"===e.position&&o&&j.has(o.position)||W(c)&&!n&&q(t,c))?i=i.filter(t=>t!==c):o=e,c=b(c)}return e.set(t,i),i}(e,this._c):[].concat(n),i],c=r[0],l=r.reduce((t,n)=>{const i=I(e,n,o);return t.top=u(i.top,t.top),t.right=h(i.right,t.right),t.bottom=h(i.bottom,t.bottom),t.left=u(i.left,t.left),t},I(e,c,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:k,getElementRects:async function(t){const e=this.getOffsetParent||k,n=this.getDimensions,i=await n(t.floating);return{reference:N(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:n}=O(t);return{width:e,height:n}},getScale:B,isElement:g,isRTL:function(t){return"rtl"===y(t).direction}};function J(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function K(t,e,n,i){void 0===i&&(i={});const{ancestorScroll:o=!0,ancestorResize:r=!0,elementResize:c="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:s=!1}=i,f=z(t),a=o||r?[...f?x(f):[],...x(e)]:[];a.forEach(t=>{o&&t.addEventListener("scroll",n,{passive:!0}),r&&t.addEventListener("resize",n)});const g=f&&l?function(t,e){let n,i=null;const o=p(t);function r(){var t;clearTimeout(n),null==(t=i)||t.disconnect(),i=null}return function c(l,s){void 0===l&&(l=!1),void 0===s&&(s=1),r();const f=t.getBoundingClientRect(),{left:a,top:g,width:p,height:x}=f;if(l||e(),!p||!x)return;const y={rootMargin:-d(g)+"px "+-d(o.clientWidth-(a+p))+"px "+-d(o.clientHeight-(g+x))+"px "+-d(a)+"px",threshold:u(0,h(1,s))||1};let m=!0;function w(e){const i=e[0].intersectionRatio;if(i!==s){if(!m)return c();i?c(!1,i):n=setTimeout(()=>{c(!1,1e-7)},1e3)}1!==i||J(f,t.getBoundingClientRect())||c(),m=!1}try{i=new IntersectionObserver(w,{...y,root:o.ownerDocument})}catch(v){i=new IntersectionObserver(w,y)}i.observe(t)}(!0),r}(f,n):null;let y,m=-1,w=null;c&&(w=new ResizeObserver(t=>{let[i]=t;i&&i.target===f&&w&&(w.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var t;null==(t=w)||t.observe(e)})),n()}),f&&!s&&w.observe(f),w.observe(e));let v=s?P(t):null;return s&&function e(){const i=P(t);v&&!J(v,i)&&n();v=i,y=requestAnimationFrame(e)}(),n(),()=>{var t;a.forEach(t=>{o&&t.removeEventListener("scroll",n),r&&t.removeEventListener("resize",n)}),null==g||g(),null==(t=w)||t.disconnect(),w=null,s&&cancelAnimationFrame(y)}}const Q=e,U=n,X=i,Y=o,Z=r,tt=c,et=l,nt=(e,n,i)=>{const o=/* @__PURE__ */new Map,r={platform:G,...i},c={...r.platform,_c:o};return t(e,n,{...r,platform:c})};export{tt as arrow,K as autoUpdate,nt as computePosition,X as flip,x as getOverflowAncestors,Z as hide,et as limitShift,Q as offset,G as platform,U as shift,Y as size};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index110.cjs");function t(t,n,i){let{reference:a,floating:o}=t;const l=e.getSideAxis(n),r=e.getAlignmentAxis(n),s=e.getAxisLength(r),c=e.getSide(n),f="y"===l,m=a.x+a.width/2-o.width/2,d=a.y+a.height/2-o.height/2,g=a[s]/2-o[s]/2;let p;switch(c){case"top":p={x:m,y:a.y-o.height};break;case"bottom":p={x:m,y:a.y+a.height};break;case"right":p={x:a.x+a.width,y:d};break;case"left":p={x:a.x-o.width,y:d};break;default:p={x:a.x,y:a.y}}switch(e.getAlignment(n)){case"start":p[r]-=g*(i&&f?-1:1);break;case"end":p[r]+=g*(i&&f?-1:1)}return p}async function n(t,n){var i;void 0===n&&(n={});const{x:a,y:o,platform:l,rects:r,elements:s,strategy:c}=t,{boundary:f="clippingAncestors",rootBoundary:m="viewport",elementContext:d="floating",altBoundary:g=!1,padding:p=0}=e.evaluate(n,t),x=e.getPaddingObject(p),u=s[g?"floating"===d?"reference":"floating":d],y=e.rectToClientRect(await l.getClippingRect({element:null==(i=await(null==l.isElement?void 0:l.isElement(u)))||i?u:u.contextElement||await(null==l.getDocumentElement?void 0:l.getDocumentElement(s.floating)),boundary:f,rootBoundary:m,strategy:c})),w="floating"===d?{x:a,y:o,width:r.floating.width,height:r.floating.height}:r.reference,h=await(null==l.getOffsetParent?void 0:l.getOffsetParent(s.floating)),v=await(null==l.isElement?void 0:l.isElement(h))&&await(null==l.getScale?void 0:l.getScale(h))||{x:1,y:1},A=e.rectToClientRect(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:w,offsetParent:h,strategy:c}):w);return{top:(y.top-A.top+x.top)/v.y,bottom:(A.bottom-y.bottom+x.bottom)/v.y,left:(y.left-A.left+x.left)/v.x,right:(A.right-y.right+x.right)/v.x}}function i(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function a(t){return e.sides.some(e=>t[e]>=0)}const o=new Set(["left","top"]);exports.rectToClientRect=e.rectToClientRect,exports.arrow=t=>({name:"arrow",options:t,async fn(n){const{x:i,y:a,placement:o,rects:l,platform:r,elements:s,middlewareData:c}=n,{element:f,padding:m=0}=e.evaluate(t,n)||{};if(null==f)return{};const d=e.getPaddingObject(m),g={x:i,y:a},p=e.getAlignmentAxis(o),x=e.getAxisLength(p),u=await r.getDimensions(f),y="y"===p,w=y?"top":"left",h=y?"bottom":"right",v=y?"clientHeight":"clientWidth",A=l.reference[x]+l.reference[p]-g[p]-l.floating[x],b=g[p]-l.reference[p],O=await(null==r.getOffsetParent?void 0:r.getOffsetParent(f));let S=O?O[v]:0;S&&await(null==r.isElement?void 0:r.isElement(O))||(S=s.floating[v]||l.floating[x]);const R=A/2-b/2,P=S/2-u[x]/2-1,T=e.min(d[w],P),D=e.min(d[h],P),E=T,L=S-u[x]-D,k=S/2-u[x]/2+R,C=e.clamp(E,k,L),H=!c.arrow&&null!=e.getAlignment(o)&&k!==C&&l.reference[x]/2-(k<E?T:D)-u[x]/2<0,j=H?k<E?k-E:k-L:0;return{[p]:g[p]+j,data:{[p]:C,centerOffset:k-C-j,...H&&{alignmentOffset:j}},reset:H}}}),exports.computePosition=async(e,i,a)=>{const{placement:o="bottom",strategy:l="absolute",middleware:r=[],platform:s}=a,c=r.filter(Boolean),f=await(null==s.isRTL?void 0:s.isRTL(i));let m=await s.getElementRects({reference:e,floating:i,strategy:l}),{x:d,y:g}=t(m,o,f),p=o,x={},u=0;for(let w=0;w<c.length;w++){var y;const{name:a,fn:r}=c[w],{x:h,y:v,data:A,reset:b}=await r({x:d,y:g,initialPlacement:o,placement:p,strategy:l,middlewareData:x,rects:m,platform:{...s,detectOverflow:null!=(y=s.detectOverflow)?y:n},elements:{reference:e,floating:i}});d=null!=h?h:d,g=null!=v?v:g,x={...x,[a]:{...x[a],...A}},b&&u<=50&&(u++,"object"==typeof b&&(b.placement&&(p=b.placement),b.rects&&(m=!0===b.rects?await s.getElementRects({reference:e,floating:i,strategy:l}):b.rects),({x:d,y:g}=t(m,p,f))),w=-1)}return{x:d,y:g,placement:p,strategy:l,middlewareData:x}},exports.detectOverflow=n,exports.flip=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(n){var i,a;const{placement:o,middlewareData:l,rects:r,initialPlacement:s,platform:c,elements:f}=n,{mainAxis:m=!0,crossAxis:d=!0,fallbackPlacements:g,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:u=!0,...y}=e.evaluate(t,n);if(null!=(i=l.arrow)&&i.alignmentOffset)return{};const w=e.getSide(o),h=e.getSideAxis(s),v=e.getSide(s)===s,A=await(null==c.isRTL?void 0:c.isRTL(f.floating)),b=g||(v||!u?[e.getOppositePlacement(s)]:e.getExpandedPlacements(s)),O="none"!==x;!g&&O&&b.push(...e.getOppositeAxisPlacements(s,u,x,A));const S=[s,...b],R=await c.detectOverflow(n,y),P=[];let T=(null==(a=l.flip)?void 0:a.overflows)||[];if(m&&P.push(R[w]),d){const t=e.getAlignmentSides(o,r,A);P.push(R[t[0]],R[t[1]])}if(T=[...T,{placement:o,overflows:P}],!P.every(e=>e<=0)){var D,E;const t=((null==(D=l.flip)?void 0:D.index)||0)+1,n=S[t];if(n){if(!("alignment"===d&&h!==e.getSideAxis(n))||T.every(t=>e.getSideAxis(t.placement)!==h||t.overflows[0]>0))return{data:{index:t,overflows:T},reset:{placement:n}}}let i=null==(E=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:E.placement;if(!i)switch(p){case"bestFit":{var L;const t=null==(L=T.filter(t=>{if(O){const n=e.getSideAxis(t.placement);return n===h||"y"===n}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:L[0];t&&(i=t);break}case"initialPlacement":i=s}if(o!==i)return{reset:{placement:i}}}return{}}}},exports.hide=function(t){return void 0===t&&(t={}),{name:"hide",options:t,async fn(n){const{rects:o,platform:l}=n,{strategy:r="referenceHidden",...s}=e.evaluate(t,n);switch(r){case"referenceHidden":{const e=i(await l.detectOverflow(n,{...s,elementContext:"reference"}),o.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:a(e)}}}case"escaped":{const e=i(await l.detectOverflow(n,{...s,altBoundary:!0}),o.floating);return{data:{escapedOffsets:e,escaped:a(e)}}}default:return{}}}}},exports.limitShift=function(t){return void 0===t&&(t={}),{options:t,fn(n){const{x:i,y:a,placement:l,rects:r,middlewareData:s}=n,{offset:c=0,mainAxis:f=!0,crossAxis:m=!0}=e.evaluate(t,n),d={x:i,y:a},g=e.getSideAxis(l),p=e.getOppositeAxis(g);let x=d[p],u=d[g];const y=e.evaluate(c,n),w="number"==typeof y?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(f){const e="y"===p?"height":"width",t=r.reference[p]-r.floating[e]+w.mainAxis,n=r.reference[p]+r.reference[e]-w.mainAxis;x<t?x=t:x>n&&(x=n)}if(m){var h,v;const t="y"===p?"width":"height",n=o.has(e.getSide(l)),i=r.reference[g]-r.floating[t]+(n&&(null==(h=s.offset)?void 0:h[g])||0)+(n?0:w.crossAxis),a=r.reference[g]+r.reference[t]+(n?0:(null==(v=s.offset)?void 0:v[g])||0)-(n?w.crossAxis:0);u<i?u=i:u>a&&(u=a)}return{[p]:x,[g]:u}}}},exports.offset=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(n){var i,a;const{x:l,y:r,placement:s,middlewareData:c}=n,f=await async function(t,n){const{placement:i,platform:a,elements:l}=t,r=await(null==a.isRTL?void 0:a.isRTL(l.floating)),s=e.getSide(i),c=e.getAlignment(i),f="y"===e.getSideAxis(i),m=o.has(s)?-1:1,d=r&&f?-1:1,g=e.evaluate(n,t);let{mainAxis:p,crossAxis:x,alignmentAxis:u}="number"==typeof g?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return c&&"number"==typeof u&&(x="end"===c?-1*u:u),f?{x:x*d,y:p*m}:{x:p*m,y:x*d}}(n,t);return s===(null==(i=c.offset)?void 0:i.placement)&&null!=(a=c.arrow)&&a.alignmentOffset?{}:{x:l+f.x,y:r+f.y,data:{...f,placement:s}}}}},exports.shift=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(n){const{x:i,y:a,placement:o,platform:l}=n,{mainAxis:r=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...f}=e.evaluate(t,n),m={x:i,y:a},d=await l.detectOverflow(n,f),g=e.getSideAxis(e.getSide(o)),p=e.getOppositeAxis(g);let x=m[p],u=m[g];if(r){const t="y"===p?"bottom":"right",n=x+d["y"===p?"top":"left"],i=x-d[t];x=e.clamp(n,x,i)}if(s){const t="y"===g?"bottom":"right",n=u+d["y"===g?"top":"left"],i=u-d[t];u=e.clamp(n,u,i)}const y=c.fn({...n,[p]:x,[g]:u});return{...y,data:{x:y.x-i,y:y.y-a,enabled:{[p]:r,[g]:s}}}}}},exports.size=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(n){var i,a;const{placement:o,rects:l,platform:r,elements:s}=n,{apply:c=()=>{},...f}=e.evaluate(t,n),m=await r.detectOverflow(n,f),d=e.getSide(o),g=e.getAlignment(o),p="y"===e.getSideAxis(o),{width:x,height:u}=l.floating;let y,w;"top"===d||"bottom"===d?(y=d,w=g===(await(null==r.isRTL?void 0:r.isRTL(s.floating))?"start":"end")?"left":"right"):(w=d,y="end"===g?"top":"bottom");const h=u-m.top-m.bottom,v=x-m.left-m.right,A=e.min(u-m[y],h),b=e.min(x-m[w],v),O=!n.middlewareData.shift;let S=A,R=b;if(null!=(i=n.middlewareData.shift)&&i.enabled.x&&(R=v),null!=(a=n.middlewareData.shift)&&a.enabled.y&&(S=h),O&&!g){const t=e.max(m.left,0),n=e.max(m.right,0),i=e.max(m.top,0),a=e.max(m.bottom,0);p?R=x-2*(0!==t||0!==n?t+n:e.max(m.left,m.right)):S=u-2*(0!==i||0!==a?i+a:e.max(m.top,m.bottom))}await c({...n,availableWidth:R,availableHeight:S});const P=await r.getDimensions(s.floating);return x!==P.width||u!==P.height?{reset:{rects:!0}}:{}}}};
|
package/dist/index109.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getSideAxis as e,getAlignmentAxis as t,getSide as n,getAlignment as i,evaluate as a,getPaddingObject as o,rectToClientRect as r,clamp as l,getOppositePlacement as s,getExpandedPlacements as f,getOppositeAxisPlacements as c,getAlignmentSides as m,min as d,max as g,getAxisLength as u,getOppositeAxis as p,sides as y}from"./index110.js";function w(a,o,r){let{reference:l,floating:s}=a;const f=e(o),c=t(o),m=u(c),d=n(o),g="y"===f,p=l.x+l.width/2-s.width/2,y=l.y+l.height/2-s.height/2,w=l[m]/2-s[m]/2;let h;switch(d){case"top":h={x:p,y:l.y-s.height};break;case"bottom":h={x:p,y:l.y+l.height};break;case"right":h={x:l.x+l.width,y:y};break;case"left":h={x:l.x-s.width,y:y};break;default:h={x:l.x,y:l.y}}switch(i(o)){case"start":h[c]-=w*(r&&g?-1:1);break;case"end":h[c]+=w*(r&&g?-1:1)}return h}async function h(e,t){var n;void 0===t&&(t={});const{x:i,y:l,platform:s,rects:f,elements:c,strategy:m}=e,{boundary:d="clippingAncestors",rootBoundary:g="viewport",elementContext:u="floating",altBoundary:p=!1,padding:y=0}=a(t,e),w=o(y),h=c[p?"floating"===u?"reference":"floating":u],x=r(await s.getClippingRect({element:null==(n=await(null==s.isElement?void 0:s.isElement(h)))||n?h:h.contextElement||await(null==s.getDocumentElement?void 0:s.getDocumentElement(c.floating)),boundary:d,rootBoundary:g,strategy:m})),v="floating"===u?{x:i,y:l,width:f.floating.width,height:f.floating.height}:f.reference,b=await(null==s.getOffsetParent?void 0:s.getOffsetParent(c.floating)),A=await(null==s.isElement?void 0:s.isElement(b))&&await(null==s.getScale?void 0:s.getScale(b))||{x:1,y:1},O=r(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:v,offsetParent:b,strategy:m}):v);return{top:(x.top-O.top+w.top)/A.y,bottom:(O.bottom-x.bottom+w.bottom)/A.y,left:(x.left-O.left+w.left)/A.x,right:(O.right-x.right+w.right)/A.x}}const x=async(e,t,n)=>{const{placement:i="bottom",strategy:a="absolute",middleware:o=[],platform:r}=n,l=o.filter(Boolean),s=await(null==r.isRTL?void 0:r.isRTL(t));let f=await r.getElementRects({reference:e,floating:t,strategy:a}),{x:c,y:m}=w(f,i,s),d=i,g={},u=0;for(let y=0;y<l.length;y++){var p;const{name:n,fn:o}=l[y],{x:x,y:v,data:b,reset:A}=await o({x:c,y:m,initialPlacement:i,placement:d,strategy:a,middlewareData:g,rects:f,platform:{...r,detectOverflow:null!=(p=r.detectOverflow)?p:h},elements:{reference:e,floating:t}});c=null!=x?x:c,m=null!=v?v:m,g={...g,[n]:{...g[n],...b}},A&&u<=50&&(u++,"object"==typeof A&&(A.placement&&(d=A.placement),A.rects&&(f=!0===A.rects?await r.getElementRects({reference:e,floating:t,strategy:a}):A.rects),({x:c,y:m}=w(f,d,s))),y=-1)}return{x:c,y:m,placement:d,strategy:a,middlewareData:g}},v=e=>({name:"arrow",options:e,async fn(n){const{x:r,y:s,placement:f,rects:c,platform:m,elements:g,middlewareData:p}=n,{element:y,padding:w=0}=a(e,n)||{};if(null==y)return{};const h=o(w),x={x:r,y:s},v=t(f),b=u(v),A=await m.getDimensions(y),O="y"===v,R=O?"top":"left",D=O?"bottom":"right",E=O?"clientHeight":"clientWidth",P=c.reference[b]+c.reference[v]-x[v]-c.floating[b],T=x[v]-c.reference[v],k=await(null==m.getOffsetParent?void 0:m.getOffsetParent(y));let L=k?k[E]:0;L&&await(null==m.isElement?void 0:m.isElement(k))||(L=g.floating[E]||c.floating[b]);const H=P/2-T/2,B=L/2-A[b]/2-1,S=d(h[R],B),C=d(h[D],B),j=S,F=L-A[b]-C,V=L/2-A[b]/2+H,W=l(j,V,F),z=!p.arrow&&null!=i(f)&&V!==W&&c.reference[b]/2-(V<j?S:C)-A[b]/2<0,q=z?V<j?V-j:V-F:0;return{[v]:x[v]+q,data:{[v]:W,centerOffset:V-W-q,...z&&{alignmentOffset:q}},reset:z}}}),b=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(i){var o,r;const{placement:l,middlewareData:d,rects:g,initialPlacement:u,platform:p,elements:y}=i,{mainAxis:w=!0,crossAxis:h=!0,fallbackPlacements:x,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:A=!0,...O}=a(t,i);if(null!=(o=d.arrow)&&o.alignmentOffset)return{};const R=n(l),D=e(u),E=n(u)===u,P=await(null==p.isRTL?void 0:p.isRTL(y.floating)),T=x||(E||!A?[s(u)]:f(u)),k="none"!==b;!x&&k&&T.push(...c(u,A,b,P));const L=[u,...T],H=await p.detectOverflow(i,O),B=[];let S=(null==(r=d.flip)?void 0:r.overflows)||[];if(w&&B.push(H[R]),h){const e=m(l,g,P);B.push(H[e[0]],H[e[1]])}if(S=[...S,{placement:l,overflows:B}],!B.every(e=>e<=0)){var C,j;const t=((null==(C=d.flip)?void 0:C.index)||0)+1,n=L[t];if(n){if(!("alignment"===h&&D!==e(n))||S.every(t=>e(t.placement)!==D||t.overflows[0]>0))return{data:{index:t,overflows:S},reset:{placement:n}}}let i=null==(j=S.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:j.placement;if(!i)switch(v){case"bestFit":{var F;const t=null==(F=S.filter(t=>{if(k){const n=e(t.placement);return n===D||"y"===n}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:F[0];t&&(i=t);break}case"initialPlacement":i=u}if(l!==i)return{reset:{placement:i}}}return{}}}};function A(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function O(e){return y.some(t=>e[t]>=0)}const R=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:i}=t,{strategy:o="referenceHidden",...r}=a(e,t);switch(o){case"referenceHidden":{const e=A(await i.detectOverflow(t,{...r,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:O(e)}}}case"escaped":{const e=A(await i.detectOverflow(t,{...r,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:O(e)}}}default:return{}}}}},D=/* @__PURE__ */new Set(["left","top"]);const E=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(o){var r,l;const{x:s,y:f,placement:c,middlewareData:m}=o,d=await async function(t,o){const{placement:r,platform:l,elements:s}=t,f=await(null==l.isRTL?void 0:l.isRTL(s.floating)),c=n(r),m=i(r),d="y"===e(r),g=D.has(c)?-1:1,u=f&&d?-1:1,p=a(o,t);let{mainAxis:y,crossAxis:w,alignmentAxis:h}="number"==typeof p?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return m&&"number"==typeof h&&(w="end"===m?-1*h:h),d?{x:w*u,y:y*g}:{x:y*g,y:w*u}}(o,t);return c===(null==(r=m.offset)?void 0:r.placement)&&null!=(l=m.arrow)&&l.alignmentOffset?{}:{x:s+d.x,y:f+d.y,data:{...d,placement:c}}}}},P=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(i){const{x:o,y:r,placement:s,platform:f}=i,{mainAxis:c=!0,crossAxis:m=!1,limiter:d={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...g}=a(t,i),u={x:o,y:r},y=await f.detectOverflow(i,g),w=e(n(s)),h=p(w);let x=u[h],v=u[w];if(c){const e="y"===h?"bottom":"right",t=x+y["y"===h?"top":"left"],n=x-y[e];x=l(t,x,n)}if(m){const e="y"===w?"bottom":"right",t=v+y["y"===w?"top":"left"],n=v-y[e];v=l(t,v,n)}const b=d.fn({...i,[h]:x,[w]:v});return{...b,data:{x:b.x-o,y:b.y-r,enabled:{[h]:c,[w]:m}}}}}},T=function(t){return void 0===t&&(t={}),{options:t,fn(i){const{x:o,y:r,placement:l,rects:s,middlewareData:f}=i,{offset:c=0,mainAxis:m=!0,crossAxis:d=!0}=a(t,i),g={x:o,y:r},u=e(l),y=p(u);let w=g[y],h=g[u];const x=a(c,i),v="number"==typeof x?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(m){const e="y"===y?"height":"width",t=s.reference[y]-s.floating[e]+v.mainAxis,n=s.reference[y]+s.reference[e]-v.mainAxis;w<t?w=t:w>n&&(w=n)}if(d){var b,A;const e="y"===y?"width":"height",t=D.has(n(l)),i=s.reference[u]-s.floating[e]+(t&&(null==(b=f.offset)?void 0:b[u])||0)+(t?0:v.crossAxis),a=s.reference[u]+s.reference[e]+(t?0:(null==(A=f.offset)?void 0:A[u])||0)-(t?v.crossAxis:0);h<i?h=i:h>a&&(h=a)}return{[y]:w,[u]:h}}}},k=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(o){var r,l;const{placement:s,rects:f,platform:c,elements:m}=o,{apply:u=()=>{},...p}=a(t,o),y=await c.detectOverflow(o,p),w=n(s),h=i(s),x="y"===e(s),{width:v,height:b}=f.floating;let A,O;"top"===w||"bottom"===w?(A=w,O=h===(await(null==c.isRTL?void 0:c.isRTL(m.floating))?"start":"end")?"left":"right"):(O=w,A="end"===h?"top":"bottom");const R=b-y.top-y.bottom,D=v-y.left-y.right,E=d(b-y[A],R),P=d(v-y[O],D),T=!o.middlewareData.shift;let k=E,L=P;if(null!=(r=o.middlewareData.shift)&&r.enabled.x&&(L=D),null!=(l=o.middlewareData.shift)&&l.enabled.y&&(k=R),T&&!h){const e=g(y.left,0),t=g(y.right,0),n=g(y.top,0),i=g(y.bottom,0);x?L=v-2*(0!==e||0!==t?e+t:g(y.left,y.right)):k=b-2*(0!==n||0!==i?n+i:g(y.top,y.bottom))}await u({...o,availableWidth:L,availableHeight:k});const H=await c.getDimensions(m.floating);return v!==H.width||b!==H.height?{reset:{rects:!0}}:{}}}};export{v as arrow,x as computePosition,h as detectOverflow,b as flip,R as hide,T as limitShift,E as offset,r as rectToClientRect,P as shift,k as size};
|
package/dist/index11.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("react"),a=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("react"),a=require("./index50.cjs"),t=require("./index59.cjs"),s=r.forwardRef(({label:s,error:d,helperText:c,indeterminate:i=!1,className:l,id:n,required:o,disabled:u,checked:p,"data-cy":b,"data-testid":y,...h},x)=>{const m=r.useId(),k=n||m,S=`${k}-error`,$=`${k}-helper`,f=b||"checkbox",j=y||"checkbox",N=r.useRef(null),q=r.useCallback(e=>{N.current=e,x&&("function"==typeof x?x(e):"current"in x&&(x.current=e))},[x]);r.useEffect(()=>{N.current&&(N.current.indeterminate=i)},[i]);const v=s&&o&&!s.includes("*")?`${s} *`:s;return e.jsxs("div",{className:a.cn(t.wrapperStyles,u&&t.wrapperDisabledStyles),"data-cy":`${f}-wrapper`,"data-testid":`${j}-wrapper`,children:[e.jsxs("div",{className:t.containerStyles,children:[e.jsx("input",{ref:q,id:k,type:"checkbox",checked:p,className:a.cn(t.inputBaseStyles,d&&t.inputErrorStyles,"checkbox-checkmark",l),"aria-invalid":d?"true":"false","aria-required":o?"true":void 0,"aria-describedby":d?S:c?$:void 0,"data-cy":f,"data-testid":j,"data-indeterminate":i?"true":void 0,disabled:u,required:o,...h}),s&&e.jsx("label",{htmlFor:k,className:a.cn(t.labelStyles,u&&t.labelDisabledStyles),"data-cy":`${f}-label`,"data-testid":`${j}-label`,children:v})]}),d&&e.jsx("span",{id:S,className:t.errorMsgStyles,role:"alert","data-cy":`${f}-error`,"data-testid":`${j}-error`,children:d}),c&&!d&&e.jsx("span",{id:$,className:t.helperMsgStyles,"data-cy":`${f}-helper`,"data-testid":`${j}-helper`,children:c})]})});s.displayName="Checkbox",exports.Checkbox=s;
|