@adam-milo/ui 1.0.46 → 1.0.48
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 +1 -1
- package/dist/index100.cjs +1 -0
- package/dist/index100.js +1 -0
- package/dist/index101.cjs +1 -0
- package/dist/index101.js +2 -0
- package/dist/index102.cjs +1 -0
- package/dist/index102.js +1 -0
- package/dist/index103.cjs +1 -0
- package/dist/index103.js +1 -0
- package/dist/index104.cjs +1 -0
- package/dist/index104.js +1 -0
- package/dist/index105.cjs +1 -0
- package/dist/index105.js +1 -0
- package/dist/index106.cjs +1 -0
- package/dist/index106.js +1 -0
- package/dist/index11.cjs +1 -1
- package/dist/index11.js +1 -1
- package/dist/index12.cjs +1 -1
- package/dist/index12.js +1 -1
- package/dist/index13.cjs +1 -1
- package/dist/index13.js +1 -1
- package/dist/index14.cjs +1 -1
- package/dist/index14.js +1 -1
- package/dist/index15.cjs +1 -1
- package/dist/index15.js +1 -1
- package/dist/index16.cjs +1 -1
- package/dist/index16.js +2 -4
- package/dist/index17.cjs +1 -1
- package/dist/index17.js +2 -8
- package/dist/index18.cjs +1 -1
- package/dist/index18.js +2 -4
- package/dist/index19.cjs +1 -1
- package/dist/index19.js +2 -8
- package/dist/index20.cjs +1 -1
- package/dist/index20.js +2 -4
- package/dist/index21.cjs +1 -1
- package/dist/index21.js +2 -2
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +2 -5
- package/dist/index23.cjs +1 -1
- package/dist/index23.js +2 -11
- 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 +4 -7
- package/dist/index28.cjs +1 -1
- package/dist/index28.js +4 -4
- package/dist/index29.cjs +1 -1
- package/dist/index29.js +8 -3
- package/dist/index3.cjs +1 -1
- package/dist/index3.js +1 -1
- package/dist/index30.cjs +1 -1
- package/dist/index30.js +4 -2
- package/dist/index31.cjs +1 -1
- package/dist/index31.js +8 -2
- package/dist/index32.cjs +1 -1
- package/dist/index32.js +4 -2
- package/dist/index33.cjs +1 -1
- package/dist/index33.js +2 -2
- package/dist/index34.cjs +1 -1
- package/dist/index34.js +5 -10
- package/dist/index35.cjs +1 -1
- package/dist/index35.js +11 -11
- package/dist/index36.cjs +1 -1
- package/dist/index36.js +2 -1
- package/dist/index37.cjs +1 -1
- package/dist/index37.js +2 -1
- package/dist/index38.cjs +1 -1
- package/dist/index38.js +2 -1
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +7 -1
- package/dist/index4.cjs +1 -1
- package/dist/index4.js +1 -1
- package/dist/index40.cjs +1 -1
- package/dist/index40.js +4 -1
- package/dist/index41.cjs +1 -1
- package/dist/index41.js +3 -1
- package/dist/index42.cjs +1 -1
- package/dist/index42.js +2 -15
- package/dist/index43.cjs +1 -1
- package/dist/index43.js +2 -1
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +2 -1
- package/dist/index45.cjs +1 -1
- package/dist/index45.js +2 -1
- package/dist/index46.cjs +1 -1
- package/dist/index46.js +10 -1
- package/dist/index47.cjs +1 -1
- package/dist/index47.js +11 -1
- package/dist/index48.cjs +1 -1
- package/dist/index48.js +1 -1
- package/dist/index49.cjs +1 -1
- package/dist/index49.js +1 -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 +15 -1
- package/dist/index55.cjs +1 -1
- package/dist/index55.js +1 -1
- package/dist/index56.cjs +1 -1
- package/dist/index56.js +1 -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 +1 -1
- package/dist/index70.cjs +1 -1
- package/dist/index70.js +1 -5
- 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 -2
- 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 -4
- 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 +1 -1
- package/dist/index80.cjs +1 -1
- package/dist/index80.js +1 -1
- package/dist/index81.cjs +1 -1
- package/dist/index81.js +1 -3
- package/dist/index82.cjs +1 -1
- package/dist/index82.js +1 -1
- package/dist/index83.cjs +1 -1
- package/dist/index83.js +5 -1
- package/dist/index84.cjs +1 -1
- package/dist/index84.js +1 -1
- 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 +2 -1
- package/dist/index88.cjs +1 -1
- package/dist/index88.js +1 -2
- package/dist/index89.cjs +1 -1
- package/dist/index89.js +1 -1
- package/dist/index9.cjs +1 -1
- package/dist/index9.js +1 -1
- package/dist/index90.cjs +1 -1
- package/dist/index90.js +4 -1
- package/dist/index91.cjs +1 -1
- package/dist/index91.js +1 -1
- package/dist/index92.cjs +1 -1
- package/dist/index92.js +1 -1
- package/dist/index93.cjs +1 -1
- package/dist/index93.js +1 -1
- package/dist/index94.cjs +1 -0
- package/dist/index94.js +3 -0
- package/dist/index95.cjs +1 -0
- package/dist/index95.js +1 -0
- package/dist/index96.cjs +1 -0
- package/dist/index96.js +1 -0
- package/dist/index97.cjs +1 -0
- package/dist/index97.js +1 -0
- package/dist/index98.cjs +1 -0
- package/dist/index98.js +1 -0
- package/dist/index99.cjs +1 -0
- package/dist/index99.js +1 -0
- package/dist/src/components/forms/controlled/FormField.component.d.ts +9 -0
- package/dist/src/components/forms/controlled/FormField.component.d.ts.map +1 -0
- package/dist/src/components/forms/controlled/FormField.types.d.ts +18 -0
- package/dist/src/components/forms/controlled/FormField.types.d.ts.map +1 -0
- package/dist/src/components/forms/controlled/alphanumeric-input/ControlledAlphanumericInput.component.d.ts +9 -0
- package/dist/src/components/forms/controlled/alphanumeric-input/ControlledAlphanumericInput.component.d.ts.map +1 -0
- package/dist/src/components/forms/controlled/alphanumeric-input/ControlledAlphanumericInput.types.d.ts +9 -0
- package/dist/src/components/forms/controlled/alphanumeric-input/ControlledAlphanumericInput.types.d.ts.map +1 -0
- package/dist/src/components/forms/controlled/checkbox/ControlledCheckbox.component.d.ts +9 -0
- package/dist/src/components/forms/controlled/checkbox/ControlledCheckbox.component.d.ts.map +1 -0
- package/dist/src/components/forms/controlled/checkbox/ControlledCheckbox.types.d.ts +9 -0
- package/dist/src/components/forms/controlled/checkbox/ControlledCheckbox.types.d.ts.map +1 -0
- package/dist/src/components/forms/controlled/email-input/ControlledEmailInput.component.d.ts +9 -0
- package/dist/src/components/forms/controlled/email-input/ControlledEmailInput.component.d.ts.map +1 -0
- package/dist/src/components/forms/controlled/email-input/ControlledEmailInput.types.d.ts +9 -0
- package/dist/src/components/forms/controlled/email-input/ControlledEmailInput.types.d.ts.map +1 -0
- package/dist/src/components/forms/controlled/form/Form.component.d.ts +9 -0
- package/dist/src/components/forms/controlled/form/Form.component.d.ts.map +1 -0
- package/dist/src/components/forms/controlled/form/Form.types.d.ts +12 -0
- package/dist/src/components/forms/controlled/form/Form.types.d.ts.map +1 -0
- package/dist/src/components/forms/controlled/numeric-input/ControlledNumericInput.component.d.ts +9 -0
- package/dist/src/components/forms/controlled/numeric-input/ControlledNumericInput.component.d.ts.map +1 -0
- package/dist/src/components/forms/controlled/numeric-input/ControlledNumericInput.types.d.ts +9 -0
- package/dist/src/components/forms/controlled/numeric-input/ControlledNumericInput.types.d.ts.map +1 -0
- package/dist/src/components/forms/controlled/otp-input/ControlledOTPInput.component.d.ts +9 -0
- package/dist/src/components/forms/controlled/otp-input/ControlledOTPInput.component.d.ts.map +1 -0
- package/dist/src/components/forms/controlled/otp-input/ControlledOTPInput.types.d.ts +9 -0
- package/dist/src/components/forms/controlled/otp-input/ControlledOTPInput.types.d.ts.map +1 -0
- package/dist/src/components/forms/controlled/password-input/ControlledPasswordInput.component.d.ts +9 -0
- package/dist/src/components/forms/controlled/password-input/ControlledPasswordInput.component.d.ts.map +1 -0
- package/dist/src/components/forms/controlled/password-input/ControlledPasswordInput.types.d.ts +9 -0
- package/dist/src/components/forms/controlled/password-input/ControlledPasswordInput.types.d.ts.map +1 -0
- package/dist/src/components/forms/controlled/phone-input/ControlledPhoneInput.component.d.ts +9 -0
- package/dist/src/components/forms/controlled/phone-input/ControlledPhoneInput.component.d.ts.map +1 -0
- package/dist/src/components/forms/controlled/phone-input/ControlledPhoneInput.types.d.ts +9 -0
- package/dist/src/components/forms/controlled/phone-input/ControlledPhoneInput.types.d.ts.map +1 -0
- package/dist/src/components/forms/controlled/radio/ControlledRadio.component.d.ts +9 -0
- package/dist/src/components/forms/controlled/radio/ControlledRadio.component.d.ts.map +1 -0
- package/dist/src/components/forms/controlled/radio/ControlledRadio.types.d.ts +10 -0
- package/dist/src/components/forms/controlled/radio/ControlledRadio.types.d.ts.map +1 -0
- package/dist/src/components/forms/controlled/select/ControlledSelect.component.d.ts +9 -0
- package/dist/src/components/forms/controlled/select/ControlledSelect.component.d.ts.map +1 -0
- package/dist/src/components/forms/controlled/select/ControlledSelect.types.d.ts +21 -0
- package/dist/src/components/forms/controlled/select/ControlledSelect.types.d.ts.map +1 -0
- package/dist/src/components/forms/controlled/toggle/ControlledToggle.component.d.ts +9 -0
- package/dist/src/components/forms/controlled/toggle/ControlledToggle.component.d.ts.map +1 -0
- package/dist/src/components/forms/controlled/toggle/ControlledToggle.types.d.ts +9 -0
- package/dist/src/components/forms/controlled/toggle/ControlledToggle.types.d.ts.map +1 -0
- package/dist/src/components/navigation/stepper/Stepper.component.d.ts +1 -1
- package/dist/src/components/navigation/stepper/Stepper.component.d.ts.map +1 -1
- package/dist/src/components/navigation/stepper/Stepper.styles.d.ts +1 -0
- package/dist/src/components/navigation/stepper/Stepper.styles.d.ts.map +1 -1
- package/dist/src/components/navigation/stepper/Stepper.types.d.ts +5 -3
- package/dist/src/components/navigation/stepper/Stepper.types.d.ts.map +1 -1
- package/dist/src/index.d.ts +24 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +4 -2
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"),
|
|
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"),i=require("./index7.cjs"),s=require("./index8.cjs"),n=require("./index9.cjs"),p=require("./index10.cjs"),x=require("./index11.cjs"),l=require("./index12.cjs"),a=require("./index13.cjs"),u=require("./index14.cjs"),d=require("./index15.cjs"),c=require("./index16.cjs"),g=require("./index17.cjs"),C=require("./index18.cjs"),j=require("./index19.cjs"),q=require("./index20.cjs"),I=require("./index21.cjs"),m=require("./index22.cjs"),D=require("./index23.cjs"),h=require("./index24.cjs"),b=require("./index25.cjs"),S=require("./index26.cjs"),T=require("./index27.cjs"),P=require("./index28.cjs"),y=require("./index29.cjs"),k=require("./index30.cjs"),B=require("./index31.cjs"),R=require("./index32.cjs"),v=require("./index33.cjs"),L=require("./index34.cjs"),f=require("./index35.cjs"),O=require("./index36.cjs"),A=require("./index37.cjs"),M=require("./index38.cjs"),F=require("./index39.cjs"),H=require("./index40.cjs"),N=require("./index41.cjs"),w=require("./index42.cjs"),G=require("./index43.cjs"),E=require("./index44.cjs"),V=require("./index45.cjs"),z=require("./index46.cjs"),J=require("./index47.cjs"),K=require("./index48.cjs"),Q=require("@adam-milo/icons"),U=require("./index49.cjs"),W=require("./index50.cjs");exports.Button=e.Button,exports.IconButton=r.IconButton,exports.MenuIconButton=o.MenuIconButton,exports.EmailInput=t.EmailInput,exports.PasswordInput=i.PasswordInput,exports.NumericInput=s.NumericInput,exports.AlphanumericInput=n.AlphanumericInput,exports.Checkbox=p.Checkbox,exports.Radio=x.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=a.PhoneInput,exports.OTPInput=u.OTPInput,exports.Toggle=d.Toggle,exports.Form=c.Form,exports.FormField=g.FormField,exports.ControlledEmailInput=C.ControlledEmailInput,exports.ControlledPasswordInput=j.ControlledPasswordInput,exports.ControlledCheckbox=q.ControlledCheckbox,exports.ControlledRadio=I.ControlledRadio,exports.ControlledToggle=m.ControlledToggle,exports.ControlledNumericInput=D.ControlledNumericInput,exports.ControlledAlphanumericInput=h.ControlledAlphanumericInput,exports.ControlledPhoneInput=b.ControlledPhoneInput,exports.ControlledOTPInput=S.ControlledOTPInput,exports.ControlledSelect=T.ControlledSelect,exports.Tabs=P.Tabs,exports.TabsContent=P.TabsContent,exports.TabsList=P.TabsList,exports.TabsTrigger=P.TabsTrigger,exports.Stepper=y.Stepper,exports.Alert=k.Alert,exports.Card=B.Card,exports.CardContent=B.CardContent,exports.CardDescription=B.CardDescription,exports.CardFooter=B.CardFooter,exports.CardHeader=B.CardHeader,exports.CardTitle=B.CardTitle,exports.DataTable=R.DataTable,exports.Chip=v.Chip,exports.ChipGroup=L.ChipGroup,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=O.Stack,exports.Container=A.Container,exports.Divider=M.Divider,exports.AuthLayout=F.AuthLayout,exports.AuthLinksRow=H.AuthLinksRow,exports.SimpleHeader=N.SimpleHeader,exports.Grid=w.Grid,exports.Text=G.Text,exports.Heading=E.Heading,exports.Link=V.Link,exports.Spinner=z.Spinner,exports.AiLoader=J.AiLoader,exports.cn=K.cn,exports.generateId=K.generateId,Object.defineProperty(exports,"Icon",{enumerable:!0,get:()=>Q.Icon}),Object.defineProperty(exports,"availableIcons",{enumerable:!0,get:()=>Q.availableIcons}),Object.defineProperty(exports,"figmaIconMapping",{enumerable:!0,get:()=>Q.figmaIconMapping}),Object.defineProperty(exports,"getRadixIconName",{enumerable:!0,get:()=>Q.getRadixIconName}),exports.allCountries=U.allCountries,exports.commonCountries=U.commonCountries,exports.defaultCountries=U.defaultCountries,exports.defaultPhoneMask=U.defaultPhoneMask,exports.formatPhoneNumber=U.formatPhoneNumber,exports.getCountriesByDialCode=U.getCountriesByDialCode,exports.getCountryByCode=U.getCountryByCode,exports.getCountryByDialCode=U.getCountryByDialCode,exports.getPhoneDigits=U.getPhoneDigits,exports.getPhoneMask=U.getPhoneMask,exports.isValidPhoneLength=U.isValidPhoneLength,exports.phoneMasks=U.phoneMasks,exports.searchCountries=U.searchCountries,exports.getResponsiveBase=W.getResponsiveBase,exports.getResponsiveClasses=W.getResponsiveClasses,exports.getResponsiveSizeClasses=W.getResponsiveSizeClasses,exports.isResponsiveObject=W.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{NumericInput as t}from"./index8.js";import{AlphanumericInput as d}from"./index9.js";import{Checkbox as e}from"./index10.js";import{Radio as n}from"./index11.js";import{Select as s,SelectContent as x,SelectGroup as f,SelectItem as j,SelectLabel as a,SelectSeparator as c,SelectTrigger as l,SelectValue as b}from"./index12.js";import{PhoneInput as g}from"./index13.js";import{OTPInput as h}from"./index14.js";import{Toggle as k}from"./index15.js";import{Tabs as
|
|
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{NumericInput as t}from"./index8.js";import{AlphanumericInput as d}from"./index9.js";import{Checkbox as e}from"./index10.js";import{Radio as n}from"./index11.js";import{Select as s,SelectContent as x,SelectGroup as f,SelectItem as j,SelectLabel as a,SelectSeparator as c,SelectTrigger as l,SelectValue as b}from"./index12.js";import{PhoneInput as g}from"./index13.js";import{OTPInput as h}from"./index14.js";import{Toggle as k}from"./index15.js";import{Form as q}from"./index16.js";import{FormField as u}from"./index17.js";import{ControlledEmailInput as v}from"./index18.js";import{ControlledPasswordInput as w}from"./index19.js";import{ControlledCheckbox as y}from"./index20.js";import{ControlledRadio as z}from"./index21.js";import{ControlledToggle as A}from"./index22.js";import{ControlledNumericInput as B}from"./index23.js";import{ControlledAlphanumericInput as C}from"./index24.js";import{ControlledPhoneInput as D}from"./index25.js";import{ControlledOTPInput as E}from"./index26.js";import{ControlledSelect as F}from"./index27.js";import{Tabs as G,TabsContent as H,TabsList as I,TabsTrigger as J}from"./index28.js";import{Stepper as K}from"./index29.js";import{Alert as L}from"./index30.js";import{Card as M,CardContent as N,CardDescription as O,CardFooter as P,CardHeader as Q,CardTitle as R}from"./index31.js";import{DataTable as S}from"./index32.js";import{Chip as T}from"./index33.js";import{ChipGroup as U}from"./index34.js";import{Dialog as V,DialogClose as W,DialogCloseButton as X,DialogContent as Y,DialogDescription as Z,DialogFooter as $,DialogHeader as _,DialogIcon as oo,DialogOverlay as io,DialogPortal as mo,DialogTitle as ro,DialogTrigger as po}from"./index35.js";import{Stack as to}from"./index36.js";import{Container as eo}from"./index37.js";import{Divider as no}from"./index38.js";import{AuthLayout as so}from"./index39.js";import{AuthLinksRow as xo}from"./index40.js";import{SimpleHeader as fo}from"./index41.js";import{Grid as jo}from"./index42.js";import{Text as ao}from"./index43.js";import{Heading as co}from"./index44.js";import{Link as lo}from"./index45.js";import{Spinner as bo}from"./index46.js";import{AiLoader as go}from"./index47.js";import{cn as ho,generateId as ko}from"./index48.js";import{Icon as qo,availableIcons as uo,figmaIconMapping as vo,getRadixIconName as wo}from"@adam-milo/icons";import{allCountries as yo,commonCountries as zo,defaultCountries as Ao,defaultPhoneMask as Bo,formatPhoneNumber as Co,getCountriesByDialCode as Do,getCountryByCode as Eo,getCountryByDialCode as Fo,getPhoneDigits as Go,getPhoneMask as Ho,isValidPhoneLength as Io,phoneMasks as Jo,searchCountries as Ko}from"./index49.js";import{getResponsiveBase as Lo,getResponsiveClasses as Mo,getResponsiveSizeClasses as No,isResponsiveObject as Oo}from"./index50.js";export{go as AiLoader,L as Alert,d as AlphanumericInput,so as AuthLayout,xo as AuthLinksRow,o as Button,M as Card,N as CardContent,O as CardDescription,P as CardFooter,Q as CardHeader,R as CardTitle,e as Checkbox,T as Chip,U as ChipGroup,eo as Container,C as ControlledAlphanumericInput,y as ControlledCheckbox,v as ControlledEmailInput,B as ControlledNumericInput,E as ControlledOTPInput,w as ControlledPasswordInput,D as ControlledPhoneInput,z as ControlledRadio,F as ControlledSelect,A as ControlledToggle,S as DataTable,V as Dialog,W as DialogClose,X as DialogCloseButton,Y as DialogContent,Z as DialogDescription,$ as DialogFooter,_ as DialogHeader,oo as DialogIcon,io as DialogOverlay,mo as DialogPortal,ro as DialogTitle,po as DialogTrigger,no as Divider,r as EmailInput,q as Form,u as FormField,jo as Grid,co as Heading,qo as Icon,i as IconButton,lo as Link,m as MenuIconButton,t as NumericInput,h as OTPInput,p as PasswordInput,g as PhoneInput,n as Radio,s as Select,x as SelectContent,f as SelectGroup,j as SelectItem,a as SelectLabel,c as SelectSeparator,l as SelectTrigger,b as SelectValue,fo as SimpleHeader,bo as Spinner,to as Stack,K as Stepper,G as Tabs,H as TabsContent,I as TabsList,J as TabsTrigger,ao as Text,k as Toggle,yo as allCountries,uo as availableIcons,ho as cn,zo as commonCountries,Ao as defaultCountries,Bo as defaultPhoneMask,vo as figmaIconMapping,Co as formatPhoneNumber,ko as generateId,Do as getCountriesByDialCode,Eo as getCountryByCode,Fo as getCountryByDialCode,Go as getPhoneDigits,Ho as getPhoneMask,wo as getRadixIconName,Lo as getResponsiveBase,Mo as getResponsiveClasses,No as getResponsiveSizeClasses,Oo as isResponsiveObject,Io as isValidPhoneLength,Jo as phoneMasks,Ko 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"),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("./index48.cjs"),t=require("./index56.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;
|
package/dist/index10.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as e,jsx as r}from"react/jsx-runtime";import{forwardRef as a,useId as t,useRef as d,useCallback as i,useEffect as c}from"react";import{cn as l}from"./
|
|
1
|
+
import{jsxs as e,jsx as r}from"react/jsx-runtime";import{forwardRef as a,useId as t,useRef as d,useCallback as i,useEffect as c}from"react";import{cn as l}from"./index48.js";import{containerStyles as s,errorMsgStyles as n,helperMsgStyles as o,inputErrorStyles as m,inputBaseStyles as p,labelDisabledStyles as h,labelStyles as u,wrapperDisabledStyles as b,wrapperStyles as $}from"./index56.js";const x=a(({label:a,error:x,helperText:y,indeterminate:k=!1,className:f,id:N,required:v,disabled:j,checked:q,"data-cy":w,"data-testid":C,...F},T)=>{const g=t(),z=N||g,A=`${z}-error`,B=`${z}-helper`,D=w||"checkbox",E=C||"checkbox",G=d(null),H=i(e=>{G.current=e,T&&("function"==typeof T?T(e):"current"in T&&(T.current=e))},[T]);c(()=>{G.current&&(G.current.indeterminate=k)},[k]);const I=a&&v&&!a.includes("*")?`${a} *`:a;/* @__PURE__ */
|
|
2
2
|
return e("div",{className:l($,j&&b),"data-cy":`${D}-wrapper`,"data-testid":`${E}-wrapper`,children:[
|
|
3
3
|
/* @__PURE__ */e("div",{className:s,children:[
|
|
4
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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index103.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/index100.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
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"./index103.js";import{autoUpdate as f,platform as a}from"./index103.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),r=require("./index93.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/index101.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import*as r from"react";import{Primitive as e}from"./index93.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=require("./index99.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/index102.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as e from"react";import{useLayoutEffect as r}from"./index99.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("./index104.cjs"),e=require("./index105.cjs"),n=require("./index106.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/index103.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"./index104.js";import{createCoords as s,round as f,max as u,min as h,rectToClientRect as a,floor as d}from"./index105.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"./index106.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("./index105.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/index104.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"./index105.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=Math.min,e=Math.max,o=Math.round,n=Math.floor,r={left:"right",right:"left",bottom:"top",top:"bottom"},i={start:"end",end:"start"};function s(t){return t.split("-")[0]}function p(t){return t.split("-")[1]}function c(t){return"x"===t?"y":"x"}function u(t){return"y"===t?"height":"width"}const x=new Set(["top","bottom"]);function a(t){return x.has(s(t))?"y":"x"}function g(t){return c(a(t))}function f(t){return t.replace(/start|end/g,t=>i[t])}const l=["left","right"],m=["right","left"],h=["top","bottom"],d=["bottom","top"];function b(t){return t.replace(/left|right|bottom|top/g,t=>r[t])}function y(t){return{top:0,right:0,bottom:0,left:0,...t}}exports.clamp=function(o,n,r){return e(o,t(n,r))},exports.createCoords=t=>({x:t,y:t}),exports.evaluate=function(t,e){return"function"==typeof t?t(e):t},exports.expandPaddingObject=y,exports.floor=n,exports.getAlignment=p,exports.getAlignmentAxis=g,exports.getAlignmentSides=function(t,e,o){void 0===o&&(o=!1);const n=p(t),r=g(t),i=u(r);let s="x"===r?n===(o?"end":"start")?"right":"left":"start"===n?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=b(s)),[s,b(s)]},exports.getAxisLength=u,exports.getExpandedPlacements=function(t){const e=b(t);return[f(t),e,f(e)]},exports.getOppositeAlignmentPlacement=f,exports.getOppositeAxis=c,exports.getOppositeAxisPlacements=function(t,e,o,n){const r=p(t);let i=function(t,e,o){switch(t){case"top":case"bottom":return o?e?m:l:e?l:m;case"left":case"right":return e?h:d;default:return[]}}(s(t),"start"===o,n);return r&&(i=i.map(t=>t+"-"+r),e&&(i=i.concat(i.map(f)))),i},exports.getOppositePlacement=b,exports.getPaddingObject=function(t){return"number"!=typeof t?y(t):{top:t,right:t,bottom:t,left:t}},exports.getSide=s,exports.getSideAxis=a,exports.max=e,exports.min=t,exports.rectToClientRect=function(t){const{x:e,y:o,width:n,height:r}=t;return{width:n,height:r,top:o,left:e,right:e+n,bottom:o+r,x:e,y:o}},exports.round=o,exports.sides=["top","right","bottom","left"];
|
package/dist/index105.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const t=["top","right","bottom","left"],n=Math.min,o=Math.max,r=Math.round,e=Math.floor,i=t=>({x:t,y:t}),u={left:"right",right:"left",bottom:"top",top:"bottom"},c={start:"end",end:"start"};function f(t,r,e){return o(t,n(r,e))}function h(t,n){return"function"==typeof t?t(n):t}function a(t){return t.split("-")[0]}function p(t){return t.split("-")[1]}function s(t){return"x"===t?"y":"x"}function l(t){return"y"===t?"height":"width"}const g=/* @__PURE__ */new Set(["top","bottom"]);function m(t){return g.has(a(t))?"y":"x"}function b(t){return s(m(t))}function d(t,n,o){void 0===o&&(o=!1);const r=p(t),e=b(t),i=l(e);let u="x"===e?r===(o?"end":"start")?"right":"left":"start"===r?"bottom":"top";return n.reference[i]>n.floating[i]&&(u=k(u)),[u,k(u)]}function x(t){const n=k(t);return[y(t),n,y(n)]}function y(t){return t.replace(/start|end/g,t=>c[t])}const w=["left","right"],M=["right","left"],v=["top","bottom"],S=["bottom","top"];function j(t,n,o,r){const e=p(t);let i=function(t,n,o){switch(t){case"top":case"bottom":return o?n?M:w:n?w:M;case"left":case"right":return n?v:S;default:return[]}}(a(t),"start"===o,r);return e&&(i=i.map(t=>t+"-"+e),n&&(i=i.concat(i.map(y)))),i}function k(t){return t.replace(/left|right|bottom|top/g,t=>u[t])}function q(t){return{top:0,right:0,bottom:0,left:0,...t}}function z(t){return"number"!=typeof t?q(t):{top:t,right:t,bottom:t,left:t}}function A(t){const{x:n,y:o,width:r,height:e}=t;return{width:r,height:e,top:o,left:n,right:n+r,bottom:o+e,x:n,y:o}}export{f as clamp,i as createCoords,h as evaluate,q as expandPaddingObject,e as floor,p as getAlignment,b as getAlignmentAxis,d as getAlignmentSides,l as getAxisLength,x as getExpandedPlacements,y as getOppositeAlignmentPlacement,s as getOppositeAxis,j as getOppositeAxisPlacements,k as getOppositePlacement,z as getPaddingObject,a as getSide,m as getSideAxis,o as max,n as min,A as rectToClientRect,r as round,t as sides};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function e(){return"undefined"!=typeof window}function t(e){return r(e)?(e.nodeName||"").toLowerCase():"#document"}function n(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function o(e){var t;return null==(t=(r(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function r(t){return!!e()&&(t instanceof Node||t instanceof n(t).Node)}function s(t){return!!e()&&(t instanceof Element||t instanceof n(t).Element)}function c(t){return!!e()&&(t instanceof HTMLElement||t instanceof n(t).HTMLElement)}function i(t){return!(!e()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof n(t).ShadowRoot)}Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=new Set(["inline","contents"]);function u(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=g(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!l.has(r)}const a=new Set(["table","td","th"]);const f=[":popover-open",":modal"];function p(e){return f.some(t=>{try{return e.matches(t)}catch(n){return!1}})}const d=["transform","translate","scale","rotate","perspective"],m=["transform","translate","scale","rotate","perspective","filter"],w=["paint","layout","strict","content"];function v(e){const t=x(),n=s(e)?g(e):e;return d.some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||m.some(e=>(n.willChange||"").includes(e))||w.some(e=>(n.contain||"").includes(e))}function x(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const y=new Set(["html","body","#document"]);function S(e){return y.has(t(e))}function g(e){return n(e).getComputedStyle(e)}function h(e){if("html"===t(e))return e;const n=e.assignedSlot||e.parentNode||i(e)&&e.host||o(e);return i(n)?n.host:n}function b(e){const t=h(e);return S(t)?e.ownerDocument?e.ownerDocument.body:e.body:c(t)&&u(t)?t:b(t)}function E(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}exports.getComputedStyle=g,exports.getContainingBlock=function(e){let t=h(e);for(;c(t)&&!S(t);){if(v(t))return t;if(p(t))return null;t=h(t)}return null},exports.getDocumentElement=o,exports.getFrameElement=E,exports.getNearestOverflowAncestor=b,exports.getNodeName=t,exports.getNodeScroll=function(e){return s(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}},exports.getOverflowAncestors=function e(t,o,r){var s;void 0===o&&(o=[]),void 0===r&&(r=!0);const c=b(t),i=c===(null==(s=t.ownerDocument)?void 0:s.body),l=n(c);if(i){const t=E(l);return o.concat(l,l.visualViewport||[],u(c)?c:[],t&&r?e(t):[])}return o.concat(c,e(c,[],r))},exports.getParentNode=h,exports.getWindow=n,exports.isContainingBlock=v,exports.isElement=s,exports.isHTMLElement=c,exports.isLastTraversableNode=S,exports.isNode=r,exports.isOverflowElement=u,exports.isShadowRoot=i,exports.isTableElement=function(e){return a.has(t(e))},exports.isTopLayer=p,exports.isWebKit=x;
|
package/dist/index106.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function n(){return"undefined"!=typeof window}function t(n){return r(n)?(n.nodeName||"").toLowerCase():"#document"}function e(n){var t;return(null==n||null==(t=n.ownerDocument)?void 0:t.defaultView)||window}function o(n){var t;return null==(t=(r(n)?n.ownerDocument:n.document)||window.document)?void 0:t.documentElement}function r(t){return!!n()&&(t instanceof Node||t instanceof e(t).Node)}function c(t){return!!n()&&(t instanceof Element||t instanceof e(t).Element)}function u(t){return!!n()&&(t instanceof HTMLElement||t instanceof e(t).HTMLElement)}function i(t){return!(!n()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof e(t).ShadowRoot)}const l=/* @__PURE__ */new Set(["inline","contents"]);function s(n){const{overflow:t,overflowX:e,overflowY:o,display:r}=C(n);return/auto|scroll|overlay|hidden|clip/.test(t+o+e)&&!l.has(r)}const a=/* @__PURE__ */new Set(["table","td","th"]);function f(n){return a.has(t(n))}const d=[":popover-open",":modal"];function p(n){return d.some(t=>{try{return n.matches(t)}catch(e){return!1}})}const m=["transform","translate","scale","rotate","perspective"],w=["transform","translate","scale","rotate","perspective","filter"],v=["paint","layout","strict","content"];function h(n){const t=S(),e=c(n)?C(n):n;return m.some(n=>!!e[n]&&"none"!==e[n])||!!e.containerType&&"normal"!==e.containerType||!t&&!!e.backdropFilter&&"none"!==e.backdropFilter||!t&&!!e.filter&&"none"!==e.filter||w.some(n=>(e.willChange||"").includes(n))||v.some(n=>(e.contain||"").includes(n))}function y(n){let t=L(n);for(;u(t)&&!T(t);){if(h(t))return t;if(p(t))return null;t=L(t)}return null}function S(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const b=/* @__PURE__ */new Set(["html","body","#document"]);function T(n){return b.has(t(n))}function C(n){return e(n).getComputedStyle(n)}function E(n){return c(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function L(n){if("html"===t(n))return n;const e=n.assignedSlot||n.parentNode||i(n)&&n.host||o(n);return i(e)?e.host:e}function D(n){const t=L(n);return T(t)?n.ownerDocument?n.ownerDocument.body:n.body:u(t)&&s(t)?t:D(t)}function g(n,t,o){var r;void 0===t&&(t=[]),void 0===o&&(o=!0);const c=D(n),u=c===(null==(r=n.ownerDocument)?void 0:r.body),i=e(c);if(u){const n=k(i);return t.concat(i,i.visualViewport||[],s(c)?c:[],n&&o?g(n):[])}return t.concat(c,g(c,[],o))}function k(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}export{C as getComputedStyle,y as getContainingBlock,o as getDocumentElement,k as getFrameElement,D as getNearestOverflowAncestor,t as getNodeName,E as getNodeScroll,g as getOverflowAncestors,L as getParentNode,e as getWindow,h as isContainingBlock,c as isElement,u as isHTMLElement,T as isLastTraversableNode,r as isNode,s as isOverflowElement,i as isShadowRoot,f as isTableElement,p as isTopLayer,S as isWebKit};
|
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("./index48.cjs"),s=require("./index57.cjs"),t=r.forwardRef(({label:t,error:d,helperText:l,className:i,id:c,required:n,disabled:o,checked:p,"data-cy":u,"data-testid":y,...b},h)=>{const x=r.useId(),m=c||x,S=`${m}-error`,$=`${m}-helper`,j=u||"radio",N=y||"radio",f=r.useRef(null),q=r.useCallback(e=>{f.current=e,h&&("function"==typeof h?h(e):"current"in h&&(h.current=e))},[h]),w=t&&n&&!t.includes("*")?`${t} *`:t;return e.jsxs("div",{className:a.cn(s.wrapperStyles,o&&s.wrapperDisabledStyles),"data-cy":`${j}-wrapper`,"data-testid":`${N}-wrapper`,children:[e.jsxs("div",{className:s.containerStyles,children:[e.jsx("input",{ref:q,id:m,type:"radio",checked:p,className:a.cn(s.inputBaseStyles,d&&s.inputErrorStyles,i),"aria-describedby":d?S:l?$:void 0,"data-cy":j,"data-testid":N,disabled:o,required:n,...b}),t&&e.jsx("label",{htmlFor:m,className:a.cn(s.labelStyles,o&&s.labelDisabledStyles),"data-cy":`${j}-label`,"data-testid":`${N}-label`,children:w})]}),d&&e.jsx("span",{id:S,className:s.errorMsgStyles,role:"alert","data-cy":`${j}-error`,"data-testid":`${N}-error`,children:d}),l&&!d&&e.jsx("span",{id:$,className:s.helperMsgStyles,"data-cy":`${j}-helper`,"data-testid":`${N}-helper`,children:l})]})});t.displayName="Radio",exports.Radio=t;
|
package/dist/index11.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as e,jsx as a}from"react/jsx-runtime";import{forwardRef as r,useId as d,useRef as t,useCallback as i}from"react";import{cn as l}from"./
|
|
1
|
+
import{jsxs as e,jsx as a}from"react/jsx-runtime";import{forwardRef as r,useId as d,useRef as t,useCallback as i}from"react";import{cn as l}from"./index48.js";import{containerStyles as c,errorMsgStyles as s,helperMsgStyles as o,inputErrorStyles as n,inputBaseStyles as p,labelDisabledStyles as m,labelStyles as h,wrapperDisabledStyles as u,wrapperStyles as $}from"./index57.js";const y=r(({label:r,error:y,helperText:b,className:N,id:f,required:x,disabled:j,checked:v,"data-cy":k,"data-testid":q,...w},F)=>{const R=d(),T=f||R,g=`${T}-error`,z=`${T}-helper`,A=k||"radio",B=q||"radio",C=t(null),D=i(e=>{C.current=e,F&&("function"==typeof F?F(e):"current"in F&&(F.current=e))},[F]),E=r&&x&&!r.includes("*")?`${r} *`:r;/* @__PURE__ */
|
|
2
2
|
return e("div",{className:l($,j&&u),"data-cy":`${A}-wrapper`,"data-testid":`${B}-wrapper`,children:[
|
|
3
3
|
/* @__PURE__ */e("div",{className:c,children:[
|
|
4
4
|
/* @__PURE__ */a("input",{ref:D,id:T,type:"radio",checked:v,className:l(p,y&&n,N),"aria-describedby":y?g:b?z:void 0,"data-cy":A,"data-testid":B,disabled:j,required:x,...w}),r&&/* @__PURE__ */a("label",{htmlFor:T,className:l(h,j&&m),"data-cy":`${A}-label`,"data-testid":`${B}-label`,children:E})]}),y&&/* @__PURE__ */a("span",{id:g,className:s,role:"alert","data-cy":`${A}-error`,"data-testid":`${B}-error`,children:y}),b&&!y&&/* @__PURE__ */a("span",{id:z,className:o,"data-cy":`${A}-helper`,"data-testid":`${B}-helper`,children:b})]})});y.displayName="Radio";export{y as Radio};
|
package/dist/index12.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),r=require("@radix-ui/react-select"),a=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),r=require("@radix-ui/react-select"),a=require("./index48.cjs"),s=require("./index58.cjs");function l(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const r in e)if("default"!==r){const a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:()=>e[r]})}return t.default=e,Object.freeze(t)}const c=l(r),i=c.Root,d=t.forwardRef(({className:r,children:l,label:i,error:d,helperText:o,fullWidth:n=!1,hasValue:p=!1,placeholder:g,id:u,"data-cy":y,"data-testid":S,disabled:h,required:m,...x},b)=>{const f=t.useId(),j=u||f,N=`${j}-label`,$=`${j}-error`,w=`${j}-helper`,v=y||"select-trigger",L=S||"select-trigger";return e.jsxs("div",{className:a.cn(s.triggerWrapperStyles,n&&s.triggerWrapperFullWidthStyles),"data-cy":`${v}-wrapper`,"data-testid":`${L}-wrapper`,children:[i&&e.jsx("label",{id:N,htmlFor:j,className:a.cn(s.triggerLabelStyles,d&&s.triggerLabelErrorStyles,h&&s.triggerLabelDisabledStyles),"data-cy":`${v}-label`,"data-testid":`${L}-label`,children:i}),e.jsxs(c.Trigger,{ref:b,id:j,className:a.cn(s.triggerButtonStyles,d&&s.triggerButtonErrorStyles,!p&&s.triggerButtonPlaceholderStyles,r),"aria-invalid":d?"true":"false","aria-describedby":d?$:o?w:void 0,"aria-labelledby":i?N:void 0,"aria-required":m?"true":void 0,"data-cy":v,"data-testid":L,disabled:h,...x,children:[e.jsx("span",{className:s.triggerValueStyles,children:p?l:e.jsx("span",{"data-cy":`${v}-placeholder`,"data-testid":`${L}-placeholder`,children:g||i})}),e.jsx(c.Icon,{className:s.triggerIconStyles,"data-cy":`${v}-icon`,"data-testid":`${L}-icon`,children:e.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:e.jsx("path",{d:"M5 7.5L10 12.5L15 7.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),d&&e.jsx("span",{id:$,className:s.triggerErrorStyles,role:"alert","data-cy":`${v}-error`,"data-testid":`${L}-error`,children:d}),o&&!d&&e.jsx("span",{id:w,className:s.triggerHelperStyles,"data-cy":`${v}-helper`,"data-testid":`${L}-helper`,children:o})]})});d.displayName="SelectTrigger";const o=c.Value,n=t.forwardRef(({className:t,children:r,position:l="popper","data-cy":i,"data-testid":d,...o},n)=>{const p=i||"select-content",g=d||"select-content";return e.jsx(c.Portal,{children:e.jsx(c.Content,{ref:n,className:a.cn(s.contentStyles,t),position:l,sideOffset:4,"data-cy":p,"data-testid":g,...o,children:e.jsx(c.Viewport,{className:s.viewportStyles,children:r})})})});n.displayName="SelectContent";const p=t.forwardRef(({className:t,children:r,value:l,"data-cy":i,"data-testid":d,...o},n)=>{const p=i||`select-item-${l}`,g=d||`select-item-${l}`;return e.jsx(c.Item,{ref:n,className:a.cn(s.itemStyles,t),value:l,"data-cy":p,"data-testid":g,...o,children:e.jsx(c.ItemText,{children:r})})});p.displayName="SelectItem";const g=c.Group,u=t.forwardRef(({className:t,"data-cy":r,"data-testid":l,...i},d)=>{const o=r||"select-label",n=l||"select-label";return e.jsx(c.Label,{ref:d,className:a.cn(s.labelStyles,t),"data-cy":o,"data-testid":n,...i})});u.displayName="SelectLabel";const y=t.forwardRef(({className:t,"data-cy":r,"data-testid":l,...i},d)=>{const o=r||"select-separator",n=l||"select-separator";return e.jsx(c.Separator,{ref:d,className:a.cn(s.separatorStyles,t),"data-cy":o,"data-testid":n,...i})});y.displayName="SelectSeparator",exports.Select=i,exports.SelectContent=n,exports.SelectGroup=g,exports.SelectItem=p,exports.SelectLabel=u,exports.SelectSeparator=y,exports.SelectTrigger=d,exports.SelectValue=o;
|
package/dist/index12.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as e,jsxs as a}from"react/jsx-runtime";import{forwardRef as t,useId as r}from"react";import*as d from"@radix-ui/react-select";import{cn as l}from"./
|
|
1
|
+
import{jsx as e,jsxs as a}from"react/jsx-runtime";import{forwardRef as t,useId as r}from"react";import*as d from"@radix-ui/react-select";import{cn as l}from"./index48.js";import{viewportStyles as s,triggerValueStyles as i,triggerIconStyles as c,triggerErrorStyles as o,triggerHelperStyles as n,triggerLabelDisabledStyles as m,triggerLabelErrorStyles as p,triggerLabelStyles as h,triggerButtonPlaceholderStyles as y,triggerButtonErrorStyles as N,triggerButtonStyles as u,triggerWrapperFullWidthStyles as $,triggerWrapperStyles as b,contentStyles as f,itemStyles as g,labelStyles as v,separatorStyles as w}from"./index58.js";const x=d.Root,S=t(({className:t,children:s,label:f,error:g,helperText:v,fullWidth:w=!1,hasValue:x=!1,placeholder:S,id:L,"data-cy":j,"data-testid":k,disabled:I,required:T,...C},V)=>{const q=r(),W=L||q,B=`${W}-label`,F=`${W}-error`,G=`${W}-helper`,M=j||"select-trigger",O=k||"select-trigger";/* @__PURE__ */
|
|
2
2
|
return a("div",{className:l(b,w&&$),"data-cy":`${M}-wrapper`,"data-testid":`${O}-wrapper`,children:[f&&/* @__PURE__ */e("label",{id:B,htmlFor:W,className:l(h,g&&p,I&&m),"data-cy":`${M}-label`,"data-testid":`${O}-label`,children:f}),
|
|
3
3
|
/* @__PURE__ */a(d.Trigger,{ref:V,id:W,className:l(u,g&&N,!x&&y,t),"aria-invalid":g?"true":"false","aria-describedby":g?F:v?G:void 0,"aria-labelledby":f?B:void 0,"aria-required":T?"true":void 0,"data-cy":M,"data-testid":O,disabled:I,...C,children:[
|
|
4
4
|
/* @__PURE__ */e("span",{className:i,children:x?s:/* @__PURE__ */e("span",{"data-cy":`${M}-placeholder`,"data-testid":`${O}-placeholder`,children:S||f})}),
|
package/dist/index13.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),a=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),a=require("./index48.cjs"),r=require("@adam-milo/icons"),o=require("./index49.cjs"),s=require("./index59.cjs"),n=t.forwardRef(({label:n,error:l,helperText:i,fullWidth:d=!0,value:c="",onChange:u,countryCode:p="US",onCountryChange:y,countries:h=o.commonCountries,enableFormatting:m=!0,onValidationChange:g,disabled:x,required:f,placeholder:C,id:b,"data-cy":S,"data-testid":$,className:v,onFocus:k,onBlur:w,...D},j)=>{const[N,P]=t.useState(!1),[M,q]=t.useState(!1),[B,E]=t.useState(0),I=t.useId(),L=b||I,F=`${L}-error`,R=`${L}-helper`,T=`${L}-listbox`,A=t.useRef(null),K=t.useRef(null),V=t.useRef(null),U=S||"phone-input",W=$||"phone-input",z=h.find(e=>e.code===p)||h[0],H=o.getPhoneMask(p),O=C||H.placeholder,G=n&&f&&!n.includes("*")?`${n}*`:n;t.useEffect(()=>{const e=e=>{A.current&&!A.current.contains(e.target)&&P(!1)};return N&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[N]);const J=t.useCallback(e=>{y?.(e),P(!1),setTimeout(()=>{const e=A.current?.querySelector("input");e?.focus()},0)},[y]),Q=t.useCallback(e=>{switch(e.key){case"ArrowDown":e.preventDefault(),E(e=>Math.min(e+1,h.length-1));break;case"ArrowUp":e.preventDefault(),E(e=>Math.max(e-1,0));break;case"Enter":case" ":e.preventDefault(),J(h[B]);break;case"Escape":e.preventDefault(),P(!1),V.current?.focus();break;case"Tab":P(!1)}},[h,B,J]),X=x?"disabled":l?"error":M||N?"focus":"idle";return e.jsxs("div",{ref:A,className:a.cn(s.wrapperStyles,d&&s.wrapperFullWidthStyles),"data-cy":`${U}-wrapper`,"data-testid":`${W}-wrapper`,children:[n&&e.jsx("label",{htmlFor:L,className:s.labelStyles,"data-cy":`${U}-label`,"data-testid":`${W}-label`,children:G}),e.jsxs("div",{className:a.cn(s.containerBaseStyles,"focus"===X&&s.containerFocusStyles,"error"===X&&s.containerErrorStyles,"disabled"===X&&s.containerDisabledStyles,"idle"===X&&s.containerIdleStyles),"data-state":X,"data-cy":`${U}-container`,"data-testid":`${W}-container`,children:[e.jsxs("button",{ref:V,type:"button",className:s.triggerStyles,onClick:()=>!x&&P(!N),onKeyDown:e=>{if("Enter"===e.key||" "===e.key||"ArrowDown"===e.key){e.preventDefault(),P(!0);const t=h.findIndex(e=>e.code===p);E(-1===t?0:t)}},disabled:x,"aria-haspopup":"listbox","aria-expanded":N,"aria-controls":T,"aria-label":`Select country. Current: ${z.name}`,"data-cy":`${U}-country-trigger`,"data-testid":`${W}-country-trigger`,children:[e.jsx("span",{className:s.flagStyles,"data-cy":`${U}-flag`,"data-testid":`${W}-flag`,children:z.flag}),e.jsx(r.Icon,{name:"ChevronDownIcon",size:"sm",color:M||N?"clickable":"text",decorative:!0,"data-cy":`${U}-chevron`})]}),e.jsx("span",{className:s.dialCodeStyles,"data-cy":`${U}-dial-code`,"data-testid":`${W}-dial-code`,children:z.dialCode}),e.jsx("input",{ref:j,id:L,type:"tel",inputMode:"numeric",value:c,onChange:e=>{const t=e.target.value;if(m){const e=o.getPhoneDigits(t).slice(0,H.maxLength),a=o.formatPhoneNumber(e,p);u?.(a);const r=e.length===H.maxLength;g?.(r)}else{const e=t.replace(/[^0-9]/g,"");u?.(e);const a=e.length===H.maxLength;g?.(a)}},onFocus:e=>{q(!0),k?.(e)},onBlur:e=>{q(!1),w?.(e)},placeholder:O,disabled:x,required:f,className:a.cn(s.inputStyles,v),"aria-invalid":l?"true":"false","aria-required":f?"true":void 0,"aria-describedby":l?F:i?R:void 0,"data-cy":U,"data-testid":W,...D})]}),N&&e.jsx("div",{ref:K,id:T,role:"listbox","aria-label":"Select country",className:s.dropdownStyles,tabIndex:-1,onKeyDown:Q,"data-cy":`${U}-dropdown`,"data-testid":`${W}-dropdown`,children:h.map((t,r)=>e.jsxs("div",{role:"option","aria-selected":t.code===p,className:a.cn(s.optionBaseStyles,r===B&&s.optionHighlightedStyles,t.code===p&&s.optionSelectedStyles),onClick:()=>J(t),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),J(t))},onMouseEnter:()=>E(r),tabIndex:r===B?0:-1,"data-cy":`${U}-option-${t.code.toLowerCase()}`,"data-testid":`${W}-option-${t.code.toLowerCase()}`,children:[e.jsx("span",{className:s.optionFlagStyles,children:t.flag}),e.jsx("span",{className:s.optionNameStyles,children:t.name}),e.jsx("span",{className:s.optionDialCodeStyles,children:t.dialCode})]},t.code))}),l&&e.jsx("span",{id:F,className:s.errorStyles,role:"alert","data-cy":`${U}-error`,"data-testid":`${W}-error`,children:l}),i&&!l&&e.jsx("span",{id:R,className:s.helperStyles,"data-cy":`${U}-helper`,"data-testid":`${W}-helper`,children:i})]})});n.displayName="PhoneInput",exports.allCountries=o.allCountries,exports.commonCountries=o.commonCountries,exports.defaultCountries=o.defaultCountries,exports.defaultPhoneMask=o.defaultPhoneMask,exports.formatPhoneNumber=o.formatPhoneNumber,exports.getCountriesByDialCode=o.getCountriesByDialCode,exports.getCountryByCode=o.getCountryByCode,exports.getCountryByDialCode=o.getCountryByDialCode,exports.getPhoneDigits=o.getPhoneDigits,exports.getPhoneMask=o.getPhoneMask,exports.isValidPhoneLength=o.isValidPhoneLength,exports.phoneMasks=o.phoneMasks,exports.searchCountries=o.searchCountries,exports.PhoneInput=n;
|
package/dist/index13.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as e,jsx as a}from"react/jsx-runtime";import{forwardRef as t,useState as r,useId as n,useRef as o,useEffect as d,useCallback as l}from"react";import{cn as i}from"./
|
|
1
|
+
import{jsxs as e,jsx as a}from"react/jsx-runtime";import{forwardRef as t,useState as r,useId as n,useRef as o,useEffect as d,useCallback as l}from"react";import{cn as i}from"./index48.js";import{Icon as c}from"@adam-milo/icons";import{commonCountries as s,getPhoneMask as u,getPhoneDigits as p,formatPhoneNumber as m}from"./index49.js";import{allCountries as h,defaultCountries as y,defaultPhoneMask as f,getCountriesByDialCode as $,getCountryByCode as b,getCountryByDialCode as g,isValidPhoneLength as v,phoneMasks as x,searchCountries as w}from"./index49.js";import{labelStyles as N,triggerStyles as C,flagStyles as k,dialCodeStyles as D,dropdownStyles as E,optionFlagStyles as L,optionNameStyles as j,optionDialCodeStyles as I,optionSelectedStyles as q,optionHighlightedStyles as F,optionBaseStyles as M,errorStyles as S,helperStyles as A,inputStyles as K,containerIdleStyles as T,containerDisabledStyles as B,containerErrorStyles as U,containerFocusStyles as z,containerBaseStyles as P,wrapperFullWidthStyles as V,wrapperStyles as W}from"./index59.js";const G=t(({label:t,error:h,helperText:y,fullWidth:f=!0,value:$="",onChange:b,countryCode:g="US",onCountryChange:v,countries:x=s,enableFormatting:w=!0,onValidationChange:G,disabled:H,required:J,placeholder:O,id:Q,"data-cy":R,"data-testid":X,className:Y,onFocus:Z,onBlur:_,...ee},ae)=>{const[te,re]=r(!1),[ne,oe]=r(!1),[de,le]=r(0),ie=n(),ce=Q||ie,se=`${ce}-error`,ue=`${ce}-helper`,pe=`${ce}-listbox`,me=o(null),he=o(null),ye=o(null),fe=R||"phone-input",$e=X||"phone-input",be=x.find(e=>e.code===g)||x[0],ge=u(g),ve=O||ge.placeholder,xe=t&&J&&!t.includes("*")?`${t}*`:t;d(()=>{const e=e=>{me.current&&!me.current.contains(e.target)&&re(!1)};return te&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[te]);const we=l(e=>{v?.(e),re(!1),setTimeout(()=>{const e=me.current?.querySelector("input");e?.focus()},0)},[v]),Ne=l(e=>{switch(e.key){case"ArrowDown":e.preventDefault(),le(e=>Math.min(e+1,x.length-1));break;case"ArrowUp":e.preventDefault(),le(e=>Math.max(e-1,0));break;case"Enter":case" ":e.preventDefault(),we(x[de]);break;case"Escape":e.preventDefault(),re(!1),ye.current?.focus();break;case"Tab":re(!1)}},[x,de,we]),Ce=H?"disabled":h?"error":ne||te?"focus":"idle";/* @__PURE__ */
|
|
2
2
|
return e("div",{ref:me,className:i(W,f&&V),"data-cy":`${fe}-wrapper`,"data-testid":`${$e}-wrapper`,children:[t&&/* @__PURE__ */a("label",{htmlFor:ce,className:N,"data-cy":`${fe}-label`,"data-testid":`${$e}-label`,children:xe}),
|
|
3
3
|
/* @__PURE__ */e("div",{className:i(P,"focus"===Ce&&z,"error"===Ce&&U,"disabled"===Ce&&B,"idle"===Ce&&T),"data-state":Ce,"data-cy":`${fe}-container`,"data-testid":`${$e}-container`,children:[
|
|
4
4
|
/* @__PURE__ */e("button",{ref:ye,type:"button",className:C,onClick:()=>!H&&re(!te),onKeyDown:e=>{if("Enter"===e.key||" "===e.key||"ArrowDown"===e.key){e.preventDefault(),re(!0);const a=x.findIndex(e=>e.code===g);le(-1===a?0:a)}},disabled:H,"aria-haspopup":"listbox","aria-expanded":te,"aria-controls":pe,"aria-label":`Select country. Current: ${be.name}`,"data-cy":`${fe}-country-trigger`,"data-testid":`${$e}-country-trigger`,children:[
|
package/dist/index14.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),a=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),a=require("./index48.cjs"),r=require("./index60.cjs"),l=t.forwardRef(({length:l=4,label:s,value:n="",onChange:c,onComplete:i,error:o,helperText:d,disabled:u=!1,autoFocus:p=!1,fullWidth:f=!1,centered:y=!1,type:b="numeric",required:h=!1,"data-cy":g,"data-testid":m},$)=>{const x=t.useId(),k=`${x}-error`,v=`${x}-helper`,D=g||"otp-input",S=m||"otp-input",j=t.useRef([]),[C,w]=t.useState(()=>n.split("").slice(0,l).concat(Array(l).fill("")).slice(0,l));t.useEffect(()=>{const e=n.split("").slice(0,l).concat(Array(l).fill("")).slice(0,l);w(e)},[n,l]);const A=t.useCallback(e=>"numeric"===b?/^\d$/.test(e):/^[a-zA-Z0-9]$/.test(e),[b]),I=t.useCallback(e=>{w(e);const t=e.join("");c?.(t),e.every(e=>""!==e)&&e.length===l&&i?.(t)},[c,i,l]),E=t.useCallback(e=>{const t=j.current[e];t&&(t.focus(),t.select())},[]),N=t.useCallback((e,t)=>{const a=t.target.value;if(1===a.length&&A(a)){const t=[...C];t[e]=a,I(t),e<l-1&&E(e+1)}else if(a.length>1){const t=a.split("").filter(A),r=[...C];t.forEach((t,a)=>{e+a<l&&(r[e+a]=t)}),I(r);const s=r.findIndex(e=>""===e);E(-1===s?l-1:s)}},[C,l,A,I,E]),q=t.useCallback((e,t)=>{switch(t.key){case"Backspace":if(t.preventDefault(),C[e]){const t=[...C];t[e]="",I(t)}else if(e>0){const t=[...C];t[e-1]="",I(t),E(e-1)}break;case"Delete":if(t.preventDefault(),C[e]){const t=[...C];t[e]="",I(t)}break;case"ArrowLeft":t.preventDefault(),e>0&&E(e-1);break;case"ArrowRight":t.preventDefault(),e<l-1&&E(e+1);break;case"Home":t.preventDefault(),E(0);break;case"End":t.preventDefault(),E(l-1);break;default:if(1===t.key.length&&A(t.key)){t.preventDefault();const a=[...C];a[e]=t.key,I(a),e<l-1&&E(e+1)}}},[C,l,A,I,E]),P=t.useCallback((e,t)=>{t.preventDefault();const a=t.clipboardData.getData("text").split("").filter(A);if(0===a.length)return;const r=[...C];a.forEach((t,a)=>{e+a<l&&(r[e+a]=t)}),I(r);const s=r.findIndex(e=>""===e);E(-1===s?l-1:s)},[C,l,A,I,E]),T=t.useCallback(e=>{e.target.select()},[]);return t.useImperativeHandle($,()=>({focus:()=>{const e=C.findIndex(e=>""===e);E(-1===e?l-1:e)},clear:()=>{const e=Array(l).fill("");I(e),E(0)},getValue:()=>C.join("")}),[C,l,E,I]),t.useEffect(()=>{p&&!u&&E(0)},[p,u,E]),e.jsxs("div",{className:a.cn(r.wrapperStyles,f&&r.wrapperFullWidthStyles),"data-cy":`${D}-wrapper`,"data-testid":`${S}-wrapper`,children:[s&&e.jsx("label",{className:a.cn(r.labelBaseStyles,o&&r.labelErrorStyles,u&&r.labelDisabledStyles),"data-cy":`${D}-label`,"data-testid":`${S}-label`,children:s}),e.jsx("div",{className:a.cn(r.containerBaseStyles,y&&r.containerCenteredStyles),role:"group","aria-label":s||"OTP Input","data-cy":`${D}-container`,"data-testid":`${S}-container`,children:Array.from({length:l},(t,s)=>e.jsx("input",{ref:e=>{j.current[s]=e},type:"text",inputMode:"numeric"===b?"numeric":"text",pattern:"numeric"===b?"[0-9]*":"[a-zA-Z0-9]*",maxLength:1,value:C[s]||"",onChange:e=>N(s,e),onKeyDown:e=>q(s,e),onPaste:e=>P(s,e),onFocus:T,disabled:u,required:h,"aria-label":`Digit ${s+1} of ${l}`,"aria-invalid":o?"true":"false","aria-describedby":o?k:d?v:void 0,className:a.cn(r.digitBaseStyles,o&&r.digitErrorStyles),"data-otp-digit":!0,"data-cy":`${D}-digit-${s}`,"data-testid":`${S}-digit-${s}`,autoComplete:"one-time-code"},s))}),o&&e.jsx("span",{id:k,className:r.errorStyles,role:"alert","data-cy":`${D}-error`,"data-testid":`${S}-error`,children:o}),d&&!o&&e.jsx("span",{id:v,className:r.helperStyles,"data-cy":`${D}-helper`,"data-testid":`${S}-helper`,children:d})]})});l.displayName="OTPInput",exports.OTPInput=l;
|
package/dist/index14.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{forwardRef as a,useId as r,useRef as n,useState as i,useEffect as l,useCallback as c,useImperativeHandle as s}from"react";import{cn as o}from"./
|
|
1
|
+
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{forwardRef as a,useId as r,useRef as n,useState as i,useEffect as l,useCallback as c,useImperativeHandle as s}from"react";import{cn as o}from"./index48.js";import{errorStyles as d,helperStyles as p,labelDisabledStyles as u,labelErrorStyles as f,labelBaseStyles as m,digitErrorStyles as h,digitBaseStyles as y,containerCenteredStyles as g,containerBaseStyles as $,wrapperFullWidthStyles as b,wrapperStyles as v}from"./index60.js";const D=a(({length:a=4,label:D,value:x="",onChange:k,onComplete:A,error:N,helperText:w,disabled:j=!1,autoFocus:I=!1,fullWidth:C=!1,centered:E=!1,type:P="numeric",required:T=!1,"data-cy":q,"data-testid":z},F)=>{const L=r(),O=`${L}-error`,Z=`${L}-helper`,B=q||"otp-input",H=z||"otp-input",K=n([]),[M,R]=i(()=>x.split("").slice(0,a).concat(Array(a).fill("")).slice(0,a));l(()=>{const e=x.split("").slice(0,a).concat(Array(a).fill("")).slice(0,a);R(e)},[x,a]);const V=c(e=>"numeric"===P?/^\d$/.test(e):/^[a-zA-Z0-9]$/.test(e),[P]),W=c(e=>{R(e);const t=e.join("");k?.(t),e.every(e=>""!==e)&&e.length===a&&A?.(t)},[k,A,a]),G=c(e=>{const t=K.current[e];t&&(t.focus(),t.select())},[]),J=c((e,t)=>{const r=t.target.value;if(1===r.length&&V(r)){const t=[...M];t[e]=r,W(t),e<a-1&&G(e+1)}else if(r.length>1){const t=r.split("").filter(V),n=[...M];t.forEach((t,r)=>{e+r<a&&(n[e+r]=t)}),W(n);const i=n.findIndex(e=>""===e);G(-1===i?a-1:i)}},[M,a,V,W,G]),Q=c((e,t)=>{switch(t.key){case"Backspace":if(t.preventDefault(),M[e]){const t=[...M];t[e]="",W(t)}else if(e>0){const t=[...M];t[e-1]="",W(t),G(e-1)}break;case"Delete":if(t.preventDefault(),M[e]){const t=[...M];t[e]="",W(t)}break;case"ArrowLeft":t.preventDefault(),e>0&&G(e-1);break;case"ArrowRight":t.preventDefault(),e<a-1&&G(e+1);break;case"Home":t.preventDefault(),G(0);break;case"End":t.preventDefault(),G(a-1);break;default:if(1===t.key.length&&V(t.key)){t.preventDefault();const r=[...M];r[e]=t.key,W(r),e<a-1&&G(e+1)}}},[M,a,V,W,G]),S=c((e,t)=>{t.preventDefault();const r=t.clipboardData.getData("text").split("").filter(V);if(0===r.length)return;const n=[...M];r.forEach((t,r)=>{e+r<a&&(n[e+r]=t)}),W(n);const i=n.findIndex(e=>""===e);G(-1===i?a-1:i)},[M,a,V,W,G]),U=c(e=>{e.target.select()},[]);return s(F,()=>({focus:()=>{const e=M.findIndex(e=>""===e);G(-1===e?a-1:e)},clear:()=>{const e=Array(a).fill("");W(e),G(0)},getValue:()=>M.join("")}),[M,a,G,W]),l(()=>{I&&!j&&G(0)},[I,j,G]),/* @__PURE__ */e("div",{className:o(v,C&&b),"data-cy":`${B}-wrapper`,"data-testid":`${H}-wrapper`,children:[D&&/* @__PURE__ */t("label",{className:o(m,N&&f,j&&u),"data-cy":`${B}-label`,"data-testid":`${H}-label`,children:D}),
|
|
2
2
|
/* @__PURE__ */t("div",{className:o($,E&&g),role:"group","aria-label":D||"OTP Input","data-cy":`${B}-container`,"data-testid":`${H}-container`,children:Array.from({length:a},(e,r)=>/* @__PURE__ */t("input",{ref:e=>{K.current[r]=e},type:"text",inputMode:"numeric"===P?"numeric":"text",pattern:"numeric"===P?"[0-9]*":"[a-zA-Z0-9]*",maxLength:1,value:M[r]||"",onChange:e=>J(r,e),onKeyDown:e=>Q(r,e),onPaste:e=>S(r,e),onFocus:U,disabled:j,required:T,"aria-label":`Digit ${r+1} of ${a}`,"aria-invalid":N?"true":"false","aria-describedby":N?O:w?Z:void 0,className:o(y,N&&h),"data-otp-digit":!0,"data-cy":`${B}-digit-${r}`,"data-testid":`${H}-digit-${r}`,autoComplete:"one-time-code"},r))}),N&&/* @__PURE__ */t("span",{id:O,className:d,role:"alert","data-cy":`${B}-error`,"data-testid":`${H}-error`,children:N}),w&&!N&&/* @__PURE__ */t("span",{id:Z,className:p,"data-cy":`${B}-helper`,"data-testid":`${H}-helper`,children:w})]})});D.displayName="OTPInput";export{D as OTPInput};
|
package/dist/index15.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),a=require("react"),t=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),a=require("react"),t=require("./index48.cjs"),s=require("./index61.cjs"),l=a.forwardRef(({label:l,labelPosition:r="end",helperText:d,size:c="md",className:n,id:i,disabled:o,checked:p,defaultChecked:y,"data-cy":u,"data-testid":b,...h},S)=>{const k=a.useId(),x=i||k,m=`${x}-helper`,$=u||"toggle",j=b||"toggle",[g,N]=a.useState(!1),f=a.useRef(null),v=a.useCallback(e=>{f.current=e,S&&("function"==typeof S?S(e):"current"in S&&(S.current=e))},[S]);return e.jsxs("div",{className:t.cn(s.wrapperStyles,o&&s.wrapperDisabledStyles),"data-cy":`${$}-wrapper`,"data-testid":`${j}-wrapper`,children:[e.jsxs("label",{className:t.cn(s.labelContainerStyles,o&&"cursor-not-allowed","start"===r&&s.labelContainerReversedStyles),htmlFor:x,onMouseEnter:()=>{o||N(!0)},onMouseLeave:()=>{N(!1)},children:[l&&"start"===r&&e.jsx("span",{className:s.labelTextStyles,"data-cy":`${$}-label`,"data-testid":`${j}-label`,children:l}),e.jsx("input",{ref:v,id:x,type:"checkbox",role:"switch",checked:p,defaultChecked:y,className:t.cn(s.inputSrOnlyStyles,n),"aria-describedby":d?m:void 0,"data-cy":$,"data-testid":j,disabled:o,...h}),e.jsx("span",{className:t.cn(s.trackBaseStyles,s.trackSizeMap[c],g&&!o&&s.trackHoverStyles,g&&!o&&s.trackHoverCheckedStyles),"data-cy":`${$}-track`,"data-testid":`${j}-track`,"aria-hidden":"true",children:e.jsx("span",{className:t.cn(s.knobBaseStyles,s.knobSizeMap[c],g&&!o&&s.knobHoverShadowStyles),"data-cy":`${$}-knob`,"data-testid":`${j}-knob`})}),l&&"end"===r&&e.jsx("span",{className:s.labelTextStyles,"data-cy":`${$}-label`,"data-testid":`${j}-label`,children:l})]}),d&&e.jsx("span",{id:m,className:s.helperStyles,"data-cy":`${$}-helper`,"data-testid":`${j}-helper`,children:d})]})});l.displayName="Toggle",exports.Toggle=l;
|
package/dist/index15.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as e,jsx as a}from"react/jsx-runtime";import{forwardRef as t,useId as d,useState as r,useRef as s,useCallback as l}from"react";import{cn as c}from"./
|
|
1
|
+
import{jsxs as e,jsx as a}from"react/jsx-runtime";import{forwardRef as t,useId as d,useState as r,useRef as s,useCallback as l}from"react";import{cn as c}from"./index48.js";import{labelTextStyles as i,helperStyles as n,inputSrOnlyStyles as o,knobHoverShadowStyles as p,knobSizeMap as m,knobBaseStyles as h,trackHoverCheckedStyles as b,trackHoverStyles as u,trackSizeMap as $,trackBaseStyles as y,labelContainerReversedStyles as N,labelContainerStyles as f,wrapperDisabledStyles as k,wrapperStyles as g}from"./index61.js";const x=t(({label:t,labelPosition:x="end",helperText:w,size:j="md",className:v,id:C,disabled:M,checked:T,defaultChecked:z,"data-cy":E,"data-testid":F,...L},P)=>{const q=d(),A=C||q,B=`${A}-helper`,D=E||"toggle",G=F||"toggle",[H,I]=r(!1),J=s(null),K=l(e=>{J.current=e,P&&("function"==typeof P?P(e):"current"in P&&(P.current=e))},[P]);/* @__PURE__ */
|
|
2
2
|
return e("div",{className:c(g,M&&k),"data-cy":`${D}-wrapper`,"data-testid":`${G}-wrapper`,children:[
|
|
3
3
|
/* @__PURE__ */e("label",{className:c(f,M&&"cursor-not-allowed","start"===x&&N),htmlFor:A,onMouseEnter:()=>{M||I(!0)},onMouseLeave:()=>{I(!1)},children:[t&&"start"===x&&/* @__PURE__ */a("span",{className:i,"data-cy":`${D}-label`,"data-testid":`${G}-label`,children:t}),
|
|
4
4
|
/* @__PURE__ */a("input",{ref:K,id:A,type:"checkbox",role:"switch",checked:T,defaultChecked:z,className:c(o,v),"aria-describedby":w?B:void 0,"data-cy":D,"data-testid":G,disabled:M,...L}),
|
package/dist/index16.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime")
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime");function e({methods:e,onSubmit:r,onError:o,children:a,"data-cy":i,"data-testid":d,...n}){return t.jsx("form",{onSubmit:e.handleSubmit(r,o),"data-cy":i??"form","data-testid":d??"form",noValidate:!0,...n,children:a})}e.displayName="Form",exports.Form=e;
|
package/dist/index16.js
CHANGED
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";
|
|
2
|
-
return t(
|
|
3
|
-
return t(s.Trigger,{ref:n,className:e(d,a),value:r,"data-cy":m,"data-testid":l,...o})});m.displayName=s.Trigger.displayName;const l=a(({className:a,value:r,"data-cy":i,"data-testid":d,...o},n)=>{const m=i||(r?`tabs-content-${r}`:"tabs-content"),l=d||(r?`tabs-content-${r}`:"tabs-content");/* @__PURE__ */
|
|
4
|
-
return t(s.Content,{ref:n,className:e(c,a),value:r,"data-cy":m,"data-testid":l,...o})});l.displayName=s.Content.displayName;export{o as Tabs,l as TabsContent,n as TabsList,m as TabsTrigger};
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";function r({methods:r,onSubmit:a,onError:o,children:d,"data-cy":e,"data-testid":i,...m}){/* @__PURE__ */
|
|
2
|
+
return t("form",{onSubmit:r.handleSubmit(a,o),"data-cy":e??"form","data-testid":i??"form",noValidate:!0,...m,children:d})}r.displayName="Form";export{r as Form};
|
package/dist/index17.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"),r=require("./index62.cjs");function t({control:t,name:n,rules:a,children:o,"data-cy":l,"data-testid":s}){return e.jsx(r.Controller,{control:t,name:n,rules:a,render:({field:r,fieldState:t})=>e.jsx("div",{className:"contents","data-cy":l,"data-testid":s,children:o({value:r.value,onChange:r.onChange,onBlur:r.onBlur,ref:r.ref,error:t.error?.message,name:r.name})})})}t.displayName="FormField",exports.FormField=t;
|
package/dist/index17.js
CHANGED
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
import{jsx as e
|
|
2
|
-
return e(
|
|
3
|
-
return t("div",{ref:j,className:r(d,x&&!o&&"cursor-pointer"),onMouseEnter:()=>A(!0),onMouseLeave:()=>A(!1),onClick:()=>{x&&!o&&g&&g()},onKeyDown:e=>{!x||o||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),g?.())},role:x?"button":void 0,tabIndex:x&&!o?0:-1,"aria-current":c?"step":void 0,"aria-disabled":o,"data-cy":E,"data-testid":I,children:[
|
|
4
|
-
/* @__PURE__ */e("div",{className:r(p,o?l:c?w?m:y:w&&x?b:n?$:u),"data-cy":`${E}-circle`,"data-testid":`${I}-circle`,children:a}),
|
|
5
|
-
/* @__PURE__ */e("p",{className:r(N,o?v:c?h:w&&x?C:n?f:k),"data-cy":`${E}-label`,"data-testid":`${I}-label`,children:s})]})});S.displayName="StepItem";const D=a(({steps:a,currentStep:i,onChange:d,allowStepNavigation:c=!0,showConnector:n=!0,className:o,"data-cy":l,"data-testid":p,...m},y)=>{const b=l||"stepper",$=p||"stepper";/* @__PURE__ */
|
|
6
|
-
return e("div",{ref:y,className:r(x,o),role:"navigation","aria-label":"Progress indicator","data-cy":b,"data-testid":$,...m,children:a.map((r,o)=>{const l=o===i,p=o<i,m=r.disabled??!1,y=c&&!m&&o!==i;/* @__PURE__ */
|
|
7
|
-
return t(s,{children:[
|
|
8
|
-
/* @__PURE__ */e(S,{stepNumber:o+1,label:r.label,isActive:l,isCompleted:p,isDisabled:m,isClickable:y,onClick:()=>((e,t)=>{c&&!t&&e!==i&&d?.(e)})(o,m),"data-cy":`${b}-step-${o+1}`,"data-testid":`${$}-step-${o+1}`}),o<a.length-1&&(n?/* @__PURE__ */e(g,{"data-cy":`${b}-connector-${o+1}`,"data-testid":`${$}-connector-${o+1}`}):/* @__PURE__ */e("div",{className:"flex-1","aria-hidden":"true"}))]},r.id)})})});D.displayName="Stepper";export{D as Stepper};
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{Controller as r}from"./index62.js";function a({control:a,name:n,rules:t,children:o,"data-cy":d,"data-testid":l}){/* @__PURE__ */
|
|
2
|
+
return e(r,{control:a,name:n,rules:t,render:({field:r,fieldState:a})=>/* @__PURE__ */e("div",{className:"contents","data-cy":d,"data-testid":l,children:o({value:r.value,onChange:r.onChange,onBlur:r.onBlur,ref:r.ref,error:a.error?.message,name:r.name})})})}a.displayName="FormField";export{a as FormField};
|
package/dist/index18.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/jsx-runtime"),t=require("./index17.cjs"),r=require("./index6.cjs");function a({control:a,name:n,rules:l,"data-cy":o,"data-testid":i,...u}){return e.jsx(t.FormField,{control:a,name:n,rules:l,"data-cy":o,"data-testid":i,children:({value:t,onChange:a,onBlur:n,ref:l,error:d})=>e.jsx(r.EmailInput,{value:t??"",onChange:e=>a(e.target.value),onBlur:n,ref:l,error:d,"data-cy":o??"controlled-email-input","data-testid":i??"controlled-email-input",...u})})}a.displayName="ControlledEmailInput",exports.ControlledEmailInput=a;
|
package/dist/index18.js
CHANGED
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
return
|
|
3
|
-
/* @__PURE__ */t("div",{className:s,"data-cy":`${p}-content`,"data-testid":`${v}-content`,children:[n&&/* @__PURE__ */a("div",{className:"font-semibold mb-1 leading-tight","data-cy":`${p}-title`,"data-testid":`${v}-title`,children:n}),
|
|
4
|
-
/* @__PURE__ */a("div",{"data-cy":`${p}-message`,"data-testid":`${v}-message`,children:m})]})]})});n.displayName="Alert";export{n as Alert};
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{FormField as r}from"./index17.js";import{EmailInput as t}from"./index6.js";function a({control:a,name:o,rules:n,"data-cy":l,"data-testid":i,...d}){/* @__PURE__ */
|
|
2
|
+
return e(r,{control:a,name:o,rules:n,"data-cy":l,"data-testid":i,children:({value:r,onChange:a,onBlur:o,ref:n,error:m})=>/* @__PURE__ */e(t,{value:r??"",onChange:e=>a(e.target.value),onBlur:o,ref:n,error:m,"data-cy":l??"controlled-email-input","data-testid":i??"controlled-email-input",...d})})}a.displayName="ControlledEmailInput";export{a as ControlledEmailInput};
|
package/dist/index19.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/jsx-runtime"),r=require("./index17.cjs"),t=require("./index7.cjs");function o({control:o,name:a,rules:n,"data-cy":s,"data-testid":d,...l}){return e.jsx(r.FormField,{control:o,name:a,rules:n,"data-cy":s,"data-testid":d,children:({value:r,onChange:o,onBlur:a,ref:n,error:u})=>e.jsx(t.PasswordInput,{value:r??"",onChange:e=>o(e.target.value),onBlur:a,ref:n,error:u,"data-cy":s??"controlled-password-input","data-testid":d??"controlled-password-input",...l})})}o.displayName="ControlledPasswordInput",exports.ControlledPasswordInput=o;
|