@ngrok/mantle 0.79.2 → 0.80.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accordion.d.ts +169 -12
- package/dist/accordion.js +1 -1
- package/dist/agent.json +1 -1
- package/dist/alert-dialog.d.ts +496 -30
- package/dist/alert-dialog.js +1 -1
- package/dist/alert.d.ts +129 -9
- package/dist/alert.js +1 -1
- package/dist/anchor-_2meGDfj.js +1 -0
- package/dist/anchor.d.ts +2 -2
- package/dist/anchor.js +1 -1
- package/dist/as-child-D23mGo4f.d.ts +49 -0
- package/dist/badge.d.ts +44 -5
- package/dist/badge.js +1 -1
- package/dist/breadcrumb.d.ts +214 -14
- package/dist/breadcrumb.js +1 -1
- package/dist/button-5WsvzIQ6.js +1 -0
- package/dist/{button-DcXOWUYo.d.ts → button-BPMwa2jN.d.ts} +3 -3
- package/dist/button-D9n09xUg.js +1 -0
- package/dist/button.d.ts +3 -3
- package/dist/button.js +1 -1
- package/dist/calendar.d.ts +0 -3
- package/dist/calendar.js +1 -1
- package/dist/card.d.ts +146 -9
- package/dist/card.js +1 -1
- package/dist/centered-layout.d.ts +224 -8
- package/dist/centered-layout.js +1 -1
- package/dist/checkbox-Cq17y0-R.js +1 -0
- package/dist/checkbox.d.ts +12 -10
- package/dist/checkbox.js +1 -1
- package/dist/choice-Cc8dA5r8.js +1 -0
- package/dist/choice-Ct0KK8jw.d.ts +269 -0
- package/dist/choice.d.ts +1 -252
- package/dist/choice.js +1 -1
- package/dist/code-block.d.ts +270 -50
- package/dist/code-block.js +6 -6
- package/dist/code-block_highlight-utils.js +1 -1
- package/dist/code.d.ts +3 -2
- package/dist/code.js +1 -1
- package/dist/combobox.d.ts +190 -11
- package/dist/combobox.js +1 -1
- package/dist/command.d.ts +285 -81
- package/dist/command.js +1 -1
- package/dist/compose-refs-BdBMM9ga.js +1 -0
- package/dist/data-table.d.ts +33 -5
- package/dist/data-table.js +1 -1
- package/dist/description-list.d.ts +79 -6
- package/dist/description-list.js +1 -1
- package/dist/dialog-CQ2C6vkE.js +1 -0
- package/dist/dialog.d.ts +239 -18
- package/dist/dialog.js +1 -1
- package/dist/dropdown-menu-CSCDdA3K.js +1 -0
- package/dist/{dropdown-menu-DP_Ne9Mr.d.ts → dropdown-menu-CoyozLzy.d.ts} +170 -29
- package/dist/dropdown-menu.d.ts +2 -2
- package/dist/dropdown-menu.js +1 -1
- package/dist/empty.d.ts +1 -1
- package/dist/empty.js +1 -1
- package/dist/field.d.ts +596 -45
- package/dist/field.js +1 -1
- package/dist/flag.d.ts +0 -3
- package/dist/flag.js +1 -1
- package/dist/hooks.d.ts +3 -4
- package/dist/hooks.js +1 -1
- package/dist/hover-card.d.ts +54 -4
- package/dist/hover-card.js +1 -1
- package/dist/{icon-Cevjo93X.d.ts → icon-BDqpcZ-n.d.ts} +1 -1
- package/dist/icon-CGgMKpJg.js +1 -0
- package/dist/{icon-button-B7uEj1qq.d.ts → icon-button-C1AfGnQx.d.ts} +11 -60
- package/dist/icon-button-DiOhreJD.js +1 -0
- package/dist/icon.d.ts +2 -2
- package/dist/icon.js +1 -1
- package/dist/icons.d.ts +5 -13
- package/dist/icons.js +1 -1
- package/dist/{in-view-nkSOdED2.d.ts → in-view-DDEGUKDR.d.ts} +17 -9
- package/dist/index-B8mIWKIU.d.ts +211 -0
- package/dist/{index-Rv8RL7xy.d.ts → index-BtwKJTLq.d.ts} +1 -1
- package/dist/{index-BivvYYs-.d.ts → index-C2jj8U4a.d.ts} +8 -5
- package/dist/index-CdPXa9h1.d.ts +1 -0
- package/dist/{index-D47aqlpz.d.ts → index-DA4ig3gj.d.ts} +1 -1
- package/dist/input-CVyAVbim.js +1 -0
- package/dist/{types-C19IR7jf.d.ts → input-DV9M6K4v.d.ts} +42 -2
- package/dist/input.d.ts +4 -55
- package/dist/input.js +1 -1
- package/dist/{label-v2-bv98k.d.ts → label-C6YH9skg.d.ts} +8 -6
- package/dist/label-D-D11mlp.js +1 -0
- package/dist/label.d.ts +1 -1
- package/dist/label.js +1 -1
- package/dist/list.d.ts +150 -6
- package/dist/list.js +1 -1
- package/dist/llms.txt +1 -1
- package/dist/main.d.ts +20 -4
- package/dist/main.js +1 -1
- package/dist/mantle.css +21 -7
- package/dist/media-object.d.ts +27 -4
- package/dist/media-object.js +1 -1
- package/dist/multi-select.d.ts +312 -15
- package/dist/multi-select.js +1 -1
- package/dist/otp-input.d.ts +129 -5
- package/dist/otp-input.js +1 -1
- package/dist/pagination.d.ts +70 -6
- package/dist/pagination.js +1 -1
- package/dist/popover-CBMADtjV.js +1 -0
- package/dist/popover.d.ts +1 -181
- package/dist/popover.js +1 -1
- package/dist/primitive-CJRIlrLz.d.ts +31 -0
- package/dist/primitive-DCPHJsRs.js +1 -0
- package/dist/progress.js +1 -1
- package/dist/qr-code.d.ts +113 -5
- package/dist/qr-code.js +1 -1
- package/dist/radio-group.d.ts +128 -23
- package/dist/radio-group.js +1 -1
- package/dist/{resolve-pre-rendered-props-C3e5Auo3.js → resolve-pre-rendered-props-C9uaM9-V.js} +1 -1
- package/dist/sandboxed-on-click.d.ts +2 -2
- package/dist/sandboxed-on-click.js +1 -1
- package/dist/select-SR_9-bxA.js +1 -0
- package/dist/select-idm1jy7y.d.ts +600 -0
- package/dist/select.d.ts +1 -1
- package/dist/select.js +1 -1
- package/dist/selectable-list.d.ts +252 -298
- package/dist/selectable-list.js +1 -1
- package/dist/separator-B5UmkVRL.d.ts +75 -0
- package/dist/separator-bpE_kooz.js +1 -0
- package/dist/separator.d.ts +1 -52
- package/dist/separator.js +1 -1
- package/dist/sheet.d.ts +295 -21
- package/dist/sheet.js +1 -1
- package/dist/skeleton-CsbUHbBA.js +1 -0
- package/dist/skeleton.d.ts +4 -7
- package/dist/skeleton.js +1 -1
- package/dist/skip-to-main-link.d.ts +24 -4
- package/dist/skip-to-main-link.js +1 -1
- package/dist/slot-CDk0Bb9z.js +1 -0
- package/dist/slot.d.ts +1 -1
- package/dist/slot.js +1 -1
- package/dist/{sort-BPX2Fk9t.js → sort-B_DDQcVD.js} +1 -1
- package/dist/split-button.d.ts +28 -13
- package/dist/split-button.js +1 -1
- package/dist/{svg-only-BFeFS1aa.d.ts → svg-only-CdI_v82i.d.ts} +1 -1
- package/dist/svg-only-d-nMCfAI.js +1 -0
- package/dist/switch.d.ts +9 -6
- package/dist/switch.js +1 -1
- package/dist/table-DUSvU_Jw.d.ts +875 -0
- package/dist/table-GDkapNFi.js +1 -0
- package/dist/table.d.ts +1 -1
- package/dist/table.js +1 -1
- package/dist/tabs.d.ts +139 -12
- package/dist/tabs.js +1 -1
- package/dist/text-area.d.ts +1 -1
- package/dist/text-area.js +1 -1
- package/dist/theme-provider-BftkIiZn.js +1 -0
- package/dist/theme-switcher.d.ts +110 -29
- package/dist/theme-switcher.js +1 -1
- package/dist/theme-wVnzzx2F.js +1 -0
- package/dist/theme.d.ts +53 -14
- package/dist/theme.js +1 -1
- package/dist/toast-DKgMRv4F.js +1 -0
- package/dist/toast.d.ts +98 -10
- package/dist/toast.js +1 -1
- package/dist/tooltip.d.ts +28 -1
- package/dist/tooltip.js +1 -1
- package/dist/{traffic-policy-file-0g5RXFqu.js → traffic-policy-file-CF1lbWtp.js} +1 -1
- package/dist/types.d.ts +2 -2
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +1 -1
- package/dist/virtual-UrzmaSQm.js +1 -0
- package/dist/well.d.ts +3 -3
- package/dist/well.js +1 -1
- package/package.json +5 -5
- package/dist/anchor-C_tjSVy6.js +0 -1
- package/dist/as-child-CYEVu1WY.d.ts +0 -23
- package/dist/button-5t6-JS_I.js +0 -1
- package/dist/button-ClC60Nzg.js +0 -1
- package/dist/checkbox-DJ2xl7Rc.js +0 -1
- package/dist/choice-DOdyNzFC.js +0 -1
- package/dist/compose-refs-Cjf2gfB8.js +0 -1
- package/dist/dialog-ZCgG41hx.js +0 -1
- package/dist/dropdown-menu-Bt1aKF1g.js +0 -1
- package/dist/icon-CDtYjF_H.js +0 -1
- package/dist/icon-button-DV2-GZHf.js +0 -1
- package/dist/index-g2rfwNCH.d.ts +0 -1
- package/dist/input-Ct1YOqSy.js +0 -1
- package/dist/label-BMlHW_2D.js +0 -1
- package/dist/popover-D5WxxnBY.js +0 -1
- package/dist/primitive-C64-m48O.d.ts +0 -13
- package/dist/primitive-M-kZdNIS.js +0 -1
- package/dist/select-Bwt2YduR.d.ts +0 -345
- package/dist/select-D-5u0Blc.js +0 -1
- package/dist/separator-kBnnv3Cw.js +0 -1
- package/dist/skeleton-Bu3tgNcW.js +0 -1
- package/dist/slot-DmPrjM7N.js +0 -1
- package/dist/svg-only-DDx6FtJd.js +0 -1
- package/dist/table-CPH2md2-.js +0 -1
- package/dist/table-CwFHXC-G.d.ts +0 -414
- package/dist/theme-D8kZCOzM.js +0 -1
- package/dist/theme-provider-Djj_jBo6.js +0 -1
- package/dist/toast-D3ntBmn4.js +0 -1
- package/dist/virtual-DZMBu7Ch.js +0 -1
package/dist/field.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./use-isomorphic-layout-effect-DdTRtMY-.js";import{t}from"./cx-IiQEAKf5.js";import{t as n}from"./slot-
|
|
1
|
+
import{t as e}from"./use-isomorphic-layout-effect-DdTRtMY-.js";import{t}from"./cx-IiQEAKf5.js";import{t as n}from"./slot-CDk0Bb9z.js";import{t as r}from"./icon-button-DiOhreJD.js";import{i,n as a,r as o,t as s}from"./validation-Bpptk_9t.js";import{n as c,r as l,t as u}from"./field-context-BR01g789.js";import{t as d}from"./label-D-D11mlp.js";import{t as f}from"./popover-CBMADtjV.js";import{Children as p,Fragment as m,cloneElement as h,isValidElement as g,useCallback as _,useContext as v,useId as y,useMemo as b,useState as x}from"react";import S from"tiny-invariant";import{jsx as C}from"react/jsx-runtime";import{QuestionIcon as w}from"@phosphor-icons/react/Question";const T=e=>{let t=[],n=new Set;for(let r of e??[]){if(typeof r!=`string`)continue;let e=r.trim();e.length===0||n.has(e)||(n.add(e),t.push(e))}return t},E=e=>!(e==null||typeof e==`boolean`||typeof e==`string`&&e.trim().length===0),D=({children:e,errorItemType:t})=>{let n=!1;return p.forEach(e,e=>{if(!(n||e==null||typeof e==`boolean`)){if(typeof e==`string`){e.trim().length>0&&(n=!0);return}if(!g(e)){n=!0;return}if(e.type===t){n=E(e.props.children);return}if(e.type===m){n=D({children:e.props.children,errorItemType:t});return}n=!0}}),n},O=({className:e,ref:n,...r})=>C(`fieldset`,{ref:n,"data-slot":`field-set`,className:t(`flex w-full min-w-0 flex-col gap-4 border-0 p-0`,e),...r}),k=({className:e,ref:n,...r})=>C(`legend`,{ref:n,"data-slot":`field-legend`,className:t(`text-strong mb-1.5 text-sm font-medium font-sans`,e),...r});k.displayName=`FieldLegend`;const A=({htmlFor:e,ref:t,...n})=>{let r=v(c);return C(d,{ref:t,htmlFor:e??r?.controlId,...n})},j=({asChild:e,className:r,ref:i,...a})=>C(e?n:`p`,{ref:i,"data-slot":`field-label-text`,className:t(`text-strong text-sm font-medium font-sans`,r),...a});j.displayName=`FieldLabelText`;const M=({asChild:e,className:r,ref:i,...a})=>C(e?n:`div`,{ref:i,"data-slot":`field-label-row`,className:t(`flex items-center gap-1`,r),...a});M.displayName=`FieldLabelRow`;const N=f.Root,P=C(w,{}),F=({appearance:e=`ghost`,className:n,icon:i=P,intent:a=`neutral`,label:o,ref:s,size:c=`xs`,type:l=`button`,...u})=>C(f.Trigger,{asChild:!0,children:C(r,{ref:s,appearance:e,className:t(`text-body -my-0.5`,n),icon:i,intent:a,label:o,size:c,type:l,...u})});F.displayName=`FieldHelpTrigger`;const I=({ref:e,...t})=>C(f.Content,{ref:e,"data-slot":`field-help-content`,...t});I.displayName=`FieldHelpContent`;const L=({asChild:e,children:r,className:i,ref:a,...o})=>C(e?n:`span`,{ref:a,"data-slot":`field-optional`,className:t(`text-muted text-sm font-normal font-sans`,i),...o,children:r??`(Optional)`});L.displayName=`FieldOptional`;const R=({asChild:e,className:r,ref:i,...a})=>C(e?n:`div`,{ref:i,"data-slot":`field-group`,className:t(`flex w-full flex-col gap-4`,r),...a});R.displayName=`FieldGroup`;const z=({asChild:e,children:r,className:a,name:o,ref:l,validation:u,...d})=>{let f=e?n:`div`,p=y(),m=y(),h=y(),[g,v]=x(!1),S=i(u??(g?`error`:void 0)),w=_(()=>(v(!0),()=>{v(!1)}),[]),T=b(()=>({controlId:p,descriptionId:m,errorId:h,hasErrors:g,name:o,registerError:w,validation:S}),[p,m,h,g,o,w,S]);return C(c.Provider,{value:T,children:C(s,{validation:S,children:C(f,{ref:l,"data-slot":`field-item`,"data-validation":S,className:t(`flex w-full flex-col gap-1.5`,a),...d,children:r})})})};z.displayName=`FieldItem`;const B=({children:e,ref:t,...r})=>{let i=v(c),a=l({context:i});return typeof e==`function`?C(s,{validation:a.validation,children:C(u.Provider,{value:i?a.ariaProps:null,children:e(a.ariaProps)})}):(S(g(e),`Field.Control expects a single React element child (or a render-prop function). Got a non-element value (string, array, fragment, null, or undefined). Wrap the control in a single element, or use the function child form: <Field.Control>{(props) => <YourControl {...props} />}</Field.Control>.`),C(s,{validation:a.validation,children:C(u.Provider,{value:i?a.ariaProps:null,children:C(n,{ref:t,...r,children:h(e,a.ariaProps)})})}))};B.displayName=`FieldControl`;const V=({asChild:e,className:r,ref:i,...a})=>C(e?n:`p`,{ref:i,"data-slot":`field-description`,id:v(c)?.descriptionId,className:t(`text-body text-sm leading-4`,`[:where([data-slot=field-error-list]+&)]:-mt-1.5`,r),...a});V.displayName=`FieldDescription`;const H=({children:e,className:n,ref:r,...i})=>E(e)?C(`li`,{ref:r,"data-slot":`field-error`,className:t(`text-danger-600 text-sm leading-4`,n),...i,children:e}):null,U=({messages:e,ref:t,...n})=>C(W,{ref:t,...n,children:T(e).map(e=>C(H,{children:e},e))}),W=({asChild:r,children:i,className:a,ref:o,...s})=>{let l=D({children:i,errorItemType:H}),u=v(c),d=u?.registerError;return e(()=>{if(!(!l||d==null))return d()},[l,d]),l?C(r?n:`ul`,{ref:o,"data-slot":`field-error-list`,id:u?.errorId,role:`list`,className:t(`m-0 flex w-full flex-col list-none p-0`,a),...s,children:i}):null},G={Item:z,Control:B,Group:R,Set:O,Legend:k,Label:A,LabelText:j,LabelRow:M,Help:N,HelpTrigger:F,HelpContent:I,Optional:L,Description:V,Errors:U,ErrorList:W,ErrorItem:H},K=e=>T(e?.map(e=>typeof e==`string`||!e?e:e.message));export{G as Field,a as isAriaInvalid,o as parseValidation,i as resolveValidation,K as toErrorMessages};
|
package/dist/flag.d.ts
CHANGED
|
@@ -75,8 +75,5 @@ type Props = Omit<ComponentProps<"div">, "children"> & {
|
|
|
75
75
|
* ```
|
|
76
76
|
*/
|
|
77
77
|
declare function Flag({ className, code, size, loading, ...props }: Props): import("react").JSX.Element;
|
|
78
|
-
declare namespace Flag {
|
|
79
|
-
var displayName: string;
|
|
80
|
-
}
|
|
81
78
|
//#endregion
|
|
82
79
|
export { type CountryCode, Flag, type Props as FlagProps, countryCodes, isCountryCode };
|
package/dist/flag.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-IiQEAKf5.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";import{cva as r}from"class-variance-authority";const i=r(``,{variants:{size:{s:`rounded-[0.0625rem]`,m:`rounded-[0.09375rem]`,l:`rounded-xs`}}}),a=r(``,{variants:{size:{s:`w-4 h-3`,m:`w-5 h-3.75`,l:`w-8 h-6`}}});function o({className:r,code:o,size:s=`l`,loading:c=`lazy`,...l}){let u=i({size:s});return n(`div`,{"data-slot":`flag`,className:e(`flag relative overflow-hidden`,u,a({size:s}),r),...l,children:[t(`div`,{"aria-hidden":!0,className:e(`absolute inset-0 border border-[#000]/10`,u)}),t(`img`,{className:`h-full w-full block object-cover`,src:`https://assets.ngrok.com/flags/${s}/${o}.svg`,alt:`flag for ${o}`,loading:c})]})}
|
|
1
|
+
import{t as e}from"./cx-IiQEAKf5.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";import{cva as r}from"class-variance-authority";const i=r(``,{variants:{size:{s:`rounded-[0.0625rem]`,m:`rounded-[0.09375rem]`,l:`rounded-xs`}}}),a=r(``,{variants:{size:{s:`w-4 h-3`,m:`w-5 h-3.75`,l:`w-8 h-6`}}});function o({className:r,code:o,size:s=`l`,loading:c=`lazy`,...l}){let u=i({size:s});return n(`div`,{"data-slot":`flag`,className:e(`flag relative overflow-hidden`,u,a({size:s}),r),...l,children:[t(`div`,{"aria-hidden":!0,className:e(`absolute inset-0 border border-[#000]/10`,u)}),t(`img`,{className:`h-full w-full block object-cover`,src:`https://assets.ngrok.com/flags/${s}/${o}.svg`,alt:`flag for ${o}`,loading:c})]})}const s=`004.008.010.016.016.020.024.028.031.032.040.044.048.050.051.052.056.060.064.068.070.072.074.076.084.086.090.092.096.100.104.108.112.116.120.124.132.136.140.144.148.152.156.158.162.166.170.174.178.180.184.188.191.192.196.203.204.208.212.214.218.222.226.231.232.233.234.238.239.242.246.248.250.254.258.260.262.266.268.270.275.276.288.292.296.300.304.308.312.316.320.324.328.332.334.336.340.344.348.352.356.360.364.368.372.376.380.384.388.392.398.400.404.408.410.414.417.418.422.426.428.430.434.438.440.442.446.450.454.458.462.466.470.474.478.480.484.492.496.498.499.500.504.508.512.516.520.524.528.531.533.534.540.548.554.558.562.566.570.574.578.580.581.583.584.585.586.591.598.600.604.608.612.616.620.624.626.630.634.638.642.643.646.652.654.659.660.662.663.666.670.674.678.682.686.688.690.694.702.703.704.705.706.710.716.724.728.729.732.740.744.748.752.756.760.762.764.768.772.776.780.784.788.792.795.796.798.800.804.807.818.831.832.833.834.836.840.850.854.858.860.862.876.882.887.894.ABW.AD.AE.AF.AFG.AFRUN.AG.AGO.AI.AIA.AL.ALA.ALB.AM.AMS.AND.AO.AQ.AR.ARE.ARG.ARM.AS.ASM.AT.ATA.ATF.ATG.AU.AUS.AUT.AW.AX.AZ.AZE.BA.BB.BD.BDI.BE.BEL.BEN.BF.BFA.BG.BGD.BGR.BH.BHR.BHS.BI.BIH.BJ.BL.BLM.BLR.BLZ.BM.BMU.BN.BO.BOL.BQ-BO.BQ-SA.BQ-SE.BR.BRA.BRB.BRN.BS.BT.BTN.BV.BVT.BW.BWA.BY.BZ.CA.CAF.CAN.CC.CCK.CD.CF.CG.CH.CHE.CHL.CHN.CI.CIV.CK.CL.CM.CMR.CN.CO.COD.COG.COK.COL.COM.CPV.CR.CRI.CU.CUB.CUW.CV.CW.CX.CXR.CY.CYM.CYP.CZ.CZE.DE.DEU.DJ.DJI.DK.DM.DMA.DNK.DO.DOM.EC.ECU.EE.EG.EGY.EH.ER.ERI.ES.ESH.ESP.EST.ET.ETH.EU.FI.FIN.FJ.FJI.FK.FLK.FM.FO.FR.FRA.FRO.FSM.GA.GAB.GB-ENG.GB-NIR.GB-SCT.GB-UKM.GB-WLS.GB.GBR.GD.GE.GEO.GF.GG.GGY.GH.GHA.GI.GIB.GIN.GL.GLP.GM.GMB.GN.GNB.GNQ.GP.GQ.GR.GRC.GRD.GRL.GS.GT.GTM.GU.GUF.GUM.GUY.GW.GY.HK.HKG.HM.HMD.HN.HND.HR.HRV.HT.HTI.HU.HUN.ID.IDN.IE.IL.IM.IMN.IN.IND.IO.IOT.IQ.IR.IRL.IRN.IRQ.IS.ISL.ISR.IT.ITA.JAM.JE.JEY.JM.JO.JOR.JP.JPN.KAZ.KE.KEN.KG.KGZ.KH.KHM.KI.KIR.KM.KN-SK.KNA.KOR.KP.KR.KW.KWT.KY.KZ.LA.LAO.LB.LBN.LBR.LBY.LC.LCA.LI.LIE.LK.LKA.LR.LS.LSO.LT.LTU.LU.LUX.LV.LVA.LY.MA.MAC.MAF.MAR.MC.MCO.MD.MDA.MDG.MDV.ME.MEX.MF.MG.MH.MHL.MK.MKD.ML.MLI.MLT.MM.MMR.MN.MNE.MNG.MNP.MO.MOZ.MP.MQ.MR.MRT.MS.MSR.MT.MTQ.MU.MUS.MV.MW.MWI.MX.MY.MYS.MZ.NA.NAM.NC.NCL.NE.NER.NF.NFK.NG.NGA.NI.NIC.NIU.NL.NLD.NO.NOR.NP.NPL.NR.NRU.NU.NZ.NZL.OM.OMN.PA.PAK.PAN.PCN.PE.PER.PF.PG.PH.PHL.PK.PL.PLW.PM.PN.PNG.POL.PR.PRI.PRK.PRT.PRY.PS.PSE.PT.PW.PY.PYF.QA.QAT.RAINBOW.RE.REU.RO.ROU.RS.RU.RUS.RW.RWA.SA.SAU.SB.SC.SD.SDN.SE.SEN.SG.SGP.SGS.SH.SHN.SI.SJ.SJM.SK.SL.SLB.SLE.SLV.SM.SMR.SN.SO.SOM.SPM.SR.SRB.SS.SSD.ST.STP.SUR.SV.SVK.SVN.SWE.SWZ.SX.SXM.SY.SYC.SYR.SZ.TC.TCA.TCD.TD.TF.TG.TGO.TH.THA.TJ.TJK.TK.TKL.TKM.TL.TLS.TM.TN.TO.TON.TR.TT.TTO.TUN.TUR.TUV.TV.TW.TWN.TZ.TZA.UA.UG.UGA.UKR.UM.UMI.UNASUR.URY.US.USA.UY.UZ.UZB.VA.VAT.VC.VCT.VE.VEN.VG.VGB.VI.VIR.VN.VNM.VU.VUT.WF.WLF.WS.WSM.YE.YEM.ZA.ZAF.ZM.ZMB.ZW.ZWE`.split(`.`);function c(e){return s.includes(e)}export{o as Flag,s as countryCodes,c as isCountryCode};
|
package/dist/hooks.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as MarginType, o as useComposedRefs, s as copyToClipboard } from "./in-view-
|
|
1
|
+
import { n as MarginType, o as useComposedRefs, s as copyToClipboard } from "./in-view-DDEGUKDR.js";
|
|
2
2
|
import { RefObject, useLayoutEffect } from "react";
|
|
3
3
|
//#region src/hooks/use-breakpoint.d.ts
|
|
4
4
|
/**
|
|
@@ -74,9 +74,8 @@ type Breakpoint = (typeof breakpoints)[number];
|
|
|
74
74
|
/**
|
|
75
75
|
* React hook that returns the current breakpoint based on the viewport width.
|
|
76
76
|
*
|
|
77
|
-
* Uses a singleton subscription to a set of min-width media queries
|
|
78
|
-
* the largest matching breakpoint.
|
|
79
|
-
* `useSyncExternalStore`.
|
|
77
|
+
* Uses a singleton subscription to a set of min-width media queries via
|
|
78
|
+
* `useSyncExternalStore` and returns the largest matching breakpoint.
|
|
80
79
|
*
|
|
81
80
|
* @returns {Breakpoint} The current breakpoint that matches the viewport width.
|
|
82
81
|
*
|
package/dist/hooks.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./use-isomorphic-layout-effect-DdTRtMY-.js";import{n as t}from"./compose-refs-
|
|
1
|
+
import{t as e}from"./use-isomorphic-layout-effect-DdTRtMY-.js";import{n as t}from"./compose-refs-BdBMM9ga.js";import{t as n}from"./use-matches-media-query-CMSxHR9n.js";import{r}from"./browser-only-CPH56Xw_.js";import{t as i}from"./use-copy-to-clipboard-DqQ0_N3E.js";import{n as a,t as o}from"./use-prefers-reduced-motion-CagaNRgm.js";import{t as s}from"./in-view-C2DpZ6s0.js";import{useCallback as c,useEffect as l,useMemo as u,useReducer as d,useRef as f,useState as p,useSyncExternalStore as m}from"react";const h=[`2xl`,`xl`,`lg`,`md`,`sm`,`xs`,`2xs`],g=[`default`,...h];function _(){return m(j,M,()=>`default`)}function v(e){return m(P(e),I(e),()=>!1)}const y={"2xl":`(min-width: 96rem)`,xl:`(min-width: 80rem)`,lg:`(min-width: 64rem)`,md:`(min-width: 48rem)`,sm:`(min-width: 40rem)`,xs:`(min-width: 30rem)`,"2xs":`(min-width: 22.5rem)`},b={"2xl":`(max-width: 95.99rem)`,xl:`(max-width: 79.99rem)`,lg:`(max-width: 63.99rem)`,md:`(max-width: 47.99rem)`,sm:`(max-width: 39.99rem)`,xs:`(max-width: 29.99rem)`,"2xs":`(max-width: 22.49rem)`};let x=null,S=null;function C(){return x||={"2xl":window.matchMedia(y[`2xl`]),xl:window.matchMedia(y.xl),lg:window.matchMedia(y.lg),md:window.matchMedia(y.md),sm:window.matchMedia(y.sm),xs:window.matchMedia(y.xs),"2xs":window.matchMedia(y[`2xs`])},x}function w(e){return S||={"2xl":window.matchMedia(b[`2xl`]),xl:window.matchMedia(b.xl),lg:window.matchMedia(b.lg),md:window.matchMedia(b.md),sm:window.matchMedia(b.sm),xs:window.matchMedia(b.xs),"2xs":window.matchMedia(b[`2xs`])},S[e]}let T=`default`;const E=new Set;let D=!1;function O(){let e=C();for(let t of h)if(e[t].matches)return t;return`default`}let k=!1;function A(){k||(k=!0,requestAnimationFrame(()=>{k=!1;let e=O();if(e!==T){T=e;for(let e of E)e()}}))}function j(e){if(E.add(e),!D){D=!0;let e=C();T=O();for(let t of Object.values(e))t.addEventListener(`change`,A)}return e(),()=>{if(E.delete(e),E.size===0&&D){D=!1;let e=C();for(let t of Object.values(e))t.removeEventListener(`change`,A)}}}function M(){return T}const N=new Map;function P(e){let t=N.get(e);return t||(t=t=>{let n=w(e),r=!1,i=()=>{r||(r=!0,requestAnimationFrame(()=>{r=!1,t()}))};return n.addEventListener(`change`,i),()=>{n.removeEventListener(`change`,i)}},N.set(e,t),t)}const F=new Map;function I(e){let t=F.get(e);return t||(t=()=>w(e).matches,F.set(e,t),t)}function L(e){let t=f(e);return l(()=>{t.current=e}),u(()=>((...e)=>t.current?.(...e)),[])}function R(e,t){let[n,r]=p(e);return l(()=>{let n=window.setTimeout(()=>{r(e)},t.waitMs);return()=>{window.clearTimeout(n)}},[e,t.waitMs]),n}function z(e,t){let n=L(e),r=f(0);return l(()=>()=>window.clearTimeout(r.current),[]),c((...e)=>{window.clearTimeout(r.current),r.current=window.setTimeout(()=>n(...e),t.waitMs)},[n,t.waitMs])}function B(e){return function(t){function n(n){let r=n.storageArea==null||n.storageArea===window.localStorage,i=n.key==null||n.key===e;r&&i&&t()}return window.addEventListener(`storage`,n),()=>{window.removeEventListener(`storage`,n)}}}function V(){return null}function H(e,t){try{let n=JSON.parse(e);return typeof n==`string`?n:t}catch{return t}}function U(e,t){let n=m(u(()=>B(e),[e]),()=>window.localStorage.getItem(e),V);return[n==null?t:H(n,t),c(t=>{let n=JSON.stringify(t);window.localStorage.setItem(e,n),window.dispatchEvent(new StorageEvent(`storage`,{key:e,newValue:n,storageArea:window.localStorage}))},[e])]}function W(e){return function(t){function n(n){let r=n.storageArea==null||n.storageArea===window.sessionStorage,i=n.key==null||n.key===e;r&&i&&t()}return window.addEventListener(`storage`,n),()=>{window.removeEventListener(`storage`,n)}}}function G(){return null}function K(e,t){try{let n=JSON.parse(e);return typeof n==`string`?n:t}catch{return t}}function q(e,t){let n=m(u(()=>W(e),[e]),()=>window.sessionStorage.getItem(e),G);return[n==null?t:K(n,t),c(t=>{let n=JSON.stringify(t);window.sessionStorage.setItem(e,n),window.dispatchEvent(new StorageEvent(`storage`,{key:e,newValue:n,storageArea:window.sessionStorage}))},[e])]}function J(){let e=a();return u(()=>e?`auto`:`smooth`,[e])}function Y(e,{root:t,margin:n,amount:r,once:i=!1,initial:a=!1}={}){let[o,c]=p(a);return l(()=>{if(!e.current||i&&o)return;function a(){return c(!0),i?void 0:()=>c(!1)}let l={root:t&&t.current||void 0,margin:n,amount:r};return s(e.current,a,l)},[t,e,n,i,r]),o}function X(){let e=f([]),t=f([]),[,n]=d(e=>e+1,0),r=c(r=>{e.current.push(r),t.current=[],n()},[]),i=c(r=>{let i=e.current[e.current.length-1];if(i!==void 0)return e.current.pop(),t.current.push(r),n(),i},[]),a=c(r=>{let i=t.current[t.current.length-1];if(i!==void 0)return t.current.pop(),e.current.push(r),n(),i},[]),o=e.current.length>0,s=t.current.length>0;return u(()=>({canUndo:o,canRedo:s,push:r,undo:i,redo:a}),[o,s,r,i,a])}export{g as breakpoints,o as getPrefersReducedMotion,_ as useBreakpoint,L as useCallbackRef,t as useComposedRefs,i as useCopyToClipboard,R as useDebounce,z as useDebouncedCallback,Y as useInView,v as useIsBelowBreakpoint,r as useIsHydrated,e as useIsomorphicLayoutEffect,U as useLocalStorage,n as useMatchesMediaQuery,a as usePrefersReducedMotion,J as useScrollBehavior,q as useSessionStorage,X as useUndoRedo};
|
package/dist/hover-card.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
2
|
import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
|
|
3
3
|
//#region src/components/hover-card/hover-card.d.ts
|
|
4
4
|
/**
|
|
@@ -26,9 +26,59 @@ import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
|
|
|
26
26
|
* ```
|
|
27
27
|
*/
|
|
28
28
|
declare const Root: {
|
|
29
|
-
({ closeDelay, openDelay, ...props }:
|
|
29
|
+
({ closeDelay, openDelay, ...props }: ComponentProps<typeof HoverCardPrimitive.Root>): import("react").JSX.Element;
|
|
30
30
|
displayName: string;
|
|
31
31
|
};
|
|
32
|
+
/**
|
|
33
|
+
* The trigger element that opens the hover card when hovered.
|
|
34
|
+
*
|
|
35
|
+
* @see https://mantle.ngrok.com/components/overlays/hover-card#hovercardtrigger
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```tsx
|
|
39
|
+
* <HoverCard.Root>
|
|
40
|
+
* <HoverCard.Trigger asChild>
|
|
41
|
+
* <Button type="button" appearance="outlined" intent="neutral">
|
|
42
|
+
* Hover me
|
|
43
|
+
* </Button>
|
|
44
|
+
* </HoverCard.Trigger>
|
|
45
|
+
* <HoverCard.Content>
|
|
46
|
+
* <p>This is the hover card content.</p>
|
|
47
|
+
* </HoverCard.Content>
|
|
48
|
+
* </HoverCard.Root>
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
declare const Trigger: {
|
|
52
|
+
(props: ComponentProps<typeof HoverCardPrimitive.Trigger>): import("react").JSX.Element;
|
|
53
|
+
displayName: string;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* The content to render inside the hover card.
|
|
57
|
+
*
|
|
58
|
+
* `HoverCard.Content` renders at Tailwind `z-50`, Mantle's shared floating
|
|
59
|
+
* z-index. When multiple shared layers are open, the most recently mounted
|
|
60
|
+
* layer renders on top.
|
|
61
|
+
*
|
|
62
|
+
* @see https://mantle.ngrok.com/components/overlays/hover-card#hovercardcontent
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* ```tsx
|
|
66
|
+
* <HoverCard.Root>
|
|
67
|
+
* <HoverCard.Trigger asChild>
|
|
68
|
+
* <Button type="button" appearance="outlined" intent="neutral">
|
|
69
|
+
* Hover me
|
|
70
|
+
* </Button>
|
|
71
|
+
* </HoverCard.Trigger>
|
|
72
|
+
* <HoverCard.Content>
|
|
73
|
+
* <p>This is the hover card content.</p>
|
|
74
|
+
* </HoverCard.Content>
|
|
75
|
+
* </HoverCard.Root>
|
|
76
|
+
* ```
|
|
77
|
+
*/
|
|
78
|
+
declare const Content: {
|
|
79
|
+
({ className, onClick, align, sideOffset, ...props }: ComponentProps<typeof HoverCardPrimitive.Content>): import("react").JSX.Element;
|
|
80
|
+
displayName: string | undefined;
|
|
81
|
+
};
|
|
32
82
|
/**
|
|
33
83
|
* A floating card that appears when a user hovers over a trigger element.
|
|
34
84
|
*
|
|
@@ -118,7 +168,7 @@ declare const HoverCard: {
|
|
|
118
168
|
* </HoverCard.Root>
|
|
119
169
|
* ```
|
|
120
170
|
*/
|
|
121
|
-
readonly Content:
|
|
171
|
+
readonly Content: typeof Content;
|
|
122
172
|
/**
|
|
123
173
|
* The portal container for rendering hover card content outside the normal DOM tree.
|
|
124
174
|
* `HoverCard.Content` already renders inside this portal internally, so you typically
|
|
@@ -166,7 +216,7 @@ declare const HoverCard: {
|
|
|
166
216
|
* </HoverCard.Root>
|
|
167
217
|
* ```
|
|
168
218
|
*/
|
|
169
|
-
readonly Trigger:
|
|
219
|
+
readonly Trigger: typeof Trigger;
|
|
170
220
|
};
|
|
171
221
|
//#endregion
|
|
172
222
|
export { HoverCard };
|
package/dist/hover-card.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-IiQEAKf5.js";import{
|
|
1
|
+
import{t as e}from"./cx-IiQEAKf5.js";import{jsx as t}from"react/jsx-runtime";import*as n from"@radix-ui/react-hover-card";const r=({closeDelay:e=300,openDelay:r=100,...i})=>t(n.Root,{closeDelay:e,openDelay:r,...i});r.displayName=`HoverCard`;const i=e=>t(n.Trigger,{"data-slot":`hover-card-trigger`,...e});i.displayName=`HoverCardTrigger`;const a=n.Portal;a.displayName=`HoverCardPortal`;const o=({className:r,onClick:i,align:o=`center`,sideOffset:s=4,...c})=>t(a,{children:t(n.Content,{"data-slot":`hover-card-content`,align:o,sideOffset:s,className:e(`bg-popover border-popover z-50 w-64 rounded-md border p-4 shadow-md outline-hidden`,`data-state-open:animate-in data-state-closed:animate-out data-state-closed:fade-out-0 data-state-open:fade-in-0 data-state-closed:zoom-out-95 data-state-open:zoom-in-95 data-side-bottom:slide-in-from-top-2 data-side-left:slide-in-from-right-2 data-side-right:slide-in-from-left-2 data-side-top:slide-in-from-bottom-2`,r),onClick:e=>{e.stopPropagation(),i?.(e)},...c})});o.displayName=n.Content.displayName;const s={Root:r,Content:o,Portal:a,Trigger:i};export{s as HoverCard};
|
|
@@ -19,6 +19,6 @@ type IconProps = Omit<SvgAttributes, "children"> & {
|
|
|
19
19
|
* <Icon svg={<ShrimpIcon />} />
|
|
20
20
|
* ```
|
|
21
21
|
*/
|
|
22
|
-
declare const Icon:
|
|
22
|
+
declare const Icon: ({ className, style, svg, ref, ...props }: IconProps) => import("react").JSX.Element;
|
|
23
23
|
//#endregion
|
|
24
24
|
export { IconProps as n, Icon as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./svg-only-d-nMCfAI.js";import{jsx as n}from"react/jsx-runtime";const r=({className:r,style:i,svg:a,ref:o,...s})=>n(t,{ref:o,"data-slot":`icon`,className:e(`size-5`,r),style:i,svg:a,...s});export{r as t};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { n as WithAsChild } from "./as-child-D23mGo4f.js";
|
|
2
|
+
import { r as VariantProps } from "./index-DA4ig3gj.js";
|
|
3
3
|
import { t as ButtonIntent } from "./intents-DdSKSj1c.js";
|
|
4
|
-
import {
|
|
4
|
+
import { ComponentProps, ReactNode } from "react";
|
|
5
5
|
//#region src/components/button/icon-button.d.ts
|
|
6
6
|
/**
|
|
7
7
|
* The visual style of an `IconButton`: how much visual weight it carries,
|
|
@@ -20,7 +20,7 @@ type IconButtonVariants = VariantProps<typeof iconButtonVariants>;
|
|
|
20
20
|
/**
|
|
21
21
|
* The props for the `IconButton` component.
|
|
22
22
|
*/
|
|
23
|
-
type IconButtonProps =
|
|
23
|
+
type IconButtonProps = ComponentProps<"button"> & WithAsChild & Omit<IconButtonVariants, "appearance" | "intent"> & {
|
|
24
24
|
/**
|
|
25
25
|
* The visual style of the IconButton. Required — there is no default,
|
|
26
26
|
* so every call site states the weight it means.
|
|
@@ -68,7 +68,7 @@ type IconButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & WithAsChild & O
|
|
|
68
68
|
*
|
|
69
69
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#type
|
|
70
70
|
*/
|
|
71
|
-
type?:
|
|
71
|
+
type?: ComponentProps<"button">["type"];
|
|
72
72
|
};
|
|
73
73
|
/**
|
|
74
74
|
* Renders a button or a component that looks like a button, an interactive
|
|
@@ -81,6 +81,11 @@ type IconButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & WithAsChild & O
|
|
|
81
81
|
* site states what it means; there are no implicit defaults. `intent="neutral"`
|
|
82
82
|
* matches how IconButton rendered before it had an intent axis.
|
|
83
83
|
*
|
|
84
|
+
* The border radius is driven by the `--icon-button-border-radius` CSS
|
|
85
|
+
* variable (default: `0.375rem`). Wrappers can set it to slot icon buttons
|
|
86
|
+
* into their chrome — e.g. `ButtonGroup`'s panel appearance tightens it to
|
|
87
|
+
* `0.125rem`.
|
|
88
|
+
*
|
|
84
89
|
* @see https://mantle.ngrok.com/components/actions/icon-button
|
|
85
90
|
*
|
|
86
91
|
* @example
|
|
@@ -107,60 +112,6 @@ type IconButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & WithAsChild & O
|
|
|
107
112
|
* />
|
|
108
113
|
* ```
|
|
109
114
|
*/
|
|
110
|
-
declare const IconButton:
|
|
111
|
-
appearance?: "ghost" | "outlined" | null | undefined;
|
|
112
|
-
intent?: "accent" | "danger" | "neutral" | null | undefined;
|
|
113
|
-
isLoading?: boolean | null | undefined;
|
|
114
|
-
size?: "lg" | "md" | "sm" | "xl" | "xs" | null | undefined;
|
|
115
|
-
} & import("class-variance-authority/types").ClassProp) | undefined) => string>>>, "appearance" | "intent"> & {
|
|
116
|
-
/**
|
|
117
|
-
* The visual style of the IconButton. Required — there is no default,
|
|
118
|
-
* so every call site states the weight it means.
|
|
119
|
-
*
|
|
120
|
-
* @enum
|
|
121
|
-
* - `"ghost"`: no border or fill until hovered
|
|
122
|
-
* - `"outlined"`: bordered on the form background
|
|
123
|
-
*/
|
|
124
|
-
appearance: IconButtonAppearance;
|
|
125
|
-
/**
|
|
126
|
-
* The tone of the IconButton — the purpose its color communicates to
|
|
127
|
-
* the user. Required — there is no default, so every call site states
|
|
128
|
-
* the tone it means. `"neutral"` is the workhorse tone (and matches
|
|
129
|
-
* how IconButton rendered before it had an intent axis).
|
|
130
|
-
*
|
|
131
|
-
* @enum
|
|
132
|
-
* - `"neutral"`: the workhorse tone — routine and secondary actions
|
|
133
|
-
* - `"accent"`: deliberate brand emphasis; reach for it when an action should carry the brand color
|
|
134
|
-
* - `"danger"`: a destructive or irreversible action
|
|
135
|
-
*/
|
|
136
|
-
intent: ButtonIntent;
|
|
137
|
-
/**
|
|
138
|
-
* The accessible label for the icon. This label will be visually hidden but announced to screen reader users, similar to alt text for img tags.
|
|
139
|
-
*/
|
|
140
|
-
label: string;
|
|
141
|
-
/**
|
|
142
|
-
* An icon to render inside the button. If the `state` is `"pending"`, then
|
|
143
|
-
* the icon will automatically be replaced with a spinner.
|
|
144
|
-
*/
|
|
145
|
-
icon: ReactNode;
|
|
146
|
-
/**
|
|
147
|
-
* The behavior of the button when activated. Defaults to `"button"`, so the
|
|
148
|
-
* button does not accidentally submit a surrounding `<form>` — pass
|
|
149
|
-
* `type="submit"` to submit a form, or `type="reset"` to reset it.
|
|
150
|
-
*
|
|
151
|
-
* When `asChild` is used, `type` has no effect and is not forwarded to the
|
|
152
|
-
* child, so a wrapped anchor never inherits a `button` `type`. See:
|
|
153
|
-
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#type
|
|
154
|
-
*
|
|
155
|
-
* @default "button"
|
|
156
|
-
* @enum
|
|
157
|
-
* - `"button"`: The button has no default behavior, and does nothing when pressed by default. It can have client-side scripts listen to the element's events, which are triggered when the events occur.
|
|
158
|
-
* - `"reset"`: The button resets all the controls to their initial values.
|
|
159
|
-
* - `"submit"`: The button submits the form data to the server.
|
|
160
|
-
*
|
|
161
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#type
|
|
162
|
-
*/
|
|
163
|
-
type?: ButtonHTMLAttributes<HTMLButtonElement>["type"];
|
|
164
|
-
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
115
|
+
declare const IconButton: ({ "aria-disabled": _ariaDisabled, appearance, asChild, children, className, disabled: _disabled, icon: propIcon, intent, isLoading, label, ref, size, type, ...props }: IconButtonProps) => import("react").JSX.Element;
|
|
165
116
|
//#endregion
|
|
166
117
|
export { IconButtonAppearance as n, IconButtonProps as r, IconButton as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./icon-CGgMKpJg.js";import{t as n}from"./slot-CDk0Bb9z.js";import{t as r}from"./booleanish-BfvnW6vy.js";import{Children as i,cloneElement as a,isValidElement as o}from"react";import s from"tiny-invariant";import{Fragment as c,jsx as l,jsxs as u}from"react/jsx-runtime";import{cva as d}from"class-variance-authority";import{CircleNotchIcon as f}from"@phosphor-icons/react/CircleNotch";const p=d(e(`icon-button`,`inline-flex shrink-0 items-center justify-center rounded-[var(--icon-button-border-radius,0.375rem)] border`,`focus:outline-hidden focus-visible:ring-4`,`disabled:cursor-default disabled:opacity-50`,`not-disabled:active:scale-97 ease-out transition-transform duration-150`),{variants:{appearance:{ghost:`text-accent-600 focus-visible:ring-focus-accent not-disabled:hover:bg-accent-500/10 not-disabled:hover:text-accent-700 border-transparent`,outlined:`border-accent-600 bg-form text-accent-600 focus-visible:ring-focus-accent not-disabled:hover:border-accent-700 not-disabled:hover:bg-accent-500/10 not-disabled:hover:text-accent-700`},intent:{accent:``,danger:``,neutral:``},isLoading:{false:``,true:`opacity-50`},size:{xs:`size-6`,sm:`size-7`,md:`size-9`,lg:`size-10`,xl:`size-12`}},defaultVariants:{intent:`neutral`,size:`md`},compoundVariants:[{appearance:`ghost`,intent:`danger`,class:`text-danger-600 focus-visible:ring-focus-danger not-disabled:hover:bg-danger-500/10 not-disabled:hover:text-danger-700 border-transparent`},{appearance:`outlined`,intent:`danger`,class:`border-danger-600 bg-form text-danger-600 focus-visible:ring-focus-danger not-disabled:hover:border-danger-700 not-disabled:hover:bg-danger-500/10 not-disabled:hover:text-danger-700`},{appearance:`ghost`,intent:`neutral`,class:`text-strong focus-visible:ring-focus-accent not-disabled:hover:bg-neutral-500/10 not-disabled:hover:text-strong border-transparent`},{appearance:`outlined`,intent:`neutral`,class:`border-form bg-form text-strong focus-visible:border-accent-600 focus-visible:ring-focus-accent not-disabled:hover:border-neutral-400 not-disabled:hover:bg-form-hover not-disabled:hover:text-strong focus-visible:not-disabled:hover:border-accent-600 focus-visible:not-disabled:active:border-accent-600`}]}),m=({"aria-disabled":d,appearance:m,asChild:h=!1,children:g,className:_,disabled:v,icon:y,intent:b,isLoading:x=!1,label:S,ref:C,size:w=`md`,type:T,...E})=>{let D=r(d??v??x),O=x?l(f,{className:`animate-spin`}):y,k={"aria-disabled":D,"data-slot":`icon-button`,className:e(p({appearance:m,intent:b,isLoading:x,size:w}),_),"data-appearance":m,"data-disabled":D,"data-icon-button":!0,"data-intent":b,"data-loading":x,"data-size":w,disabled:D,ref:C,...E},A=u(c,{children:[l(`span`,{className:`sr-only`,children:S}),l(t,{svg:O})]});return h?(s(o(g)&&i.only(g),"When using `asChild`, IconButton must be passed a single child as a JSX tag."),l(n,{...k,children:a(g,{},A)})):l(`button`,{...k,type:T??`button`,children:A})};export{p as n,m as t};
|
package/dist/icon.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { t as SvgAttributes } from "./types-D1RY5Tcj.js";
|
|
2
|
-
import { n as IconProps, t as Icon } from "./icon-
|
|
3
|
-
import { n as SvgOnlyProps, t as SvgOnly } from "./svg-only-
|
|
2
|
+
import { n as IconProps, t as Icon } from "./icon-BDqpcZ-n.js";
|
|
3
|
+
import { n as SvgOnlyProps, t as SvgOnly } from "./svg-only-CdI_v82i.js";
|
|
4
4
|
export { Icon, type IconProps, type SvgAttributes, SvgOnly, type SvgOnlyProps };
|
package/dist/icon.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./svg-only-
|
|
1
|
+
import{t as e}from"./svg-only-d-nMCfAI.js";import{t}from"./icon-CGgMKpJg.js";export{t as Icon,e as SvgOnly};
|
package/dist/icons.d.ts
CHANGED
|
@@ -20,19 +20,17 @@ type Props = SvgAttributes & ({
|
|
|
20
20
|
*/
|
|
21
21
|
direction: TimeSortingDirection | SortingDirection;
|
|
22
22
|
});
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
/**
|
|
24
|
+
* A sorting icon that can be used to indicate the sorting direction of a table column or list.
|
|
25
|
+
* It is aware of the sorting mode (alphanumeric or time) and the sorting direction (ascending or descending).
|
|
26
|
+
*/
|
|
27
|
+
declare const SortIcon: ({ mode, direction, ...props }: Props) => import("react").JSX.Element;
|
|
27
28
|
//#endregion
|
|
28
29
|
//#region src/components/icons/traffic-policy-file.d.ts
|
|
29
30
|
/**
|
|
30
31
|
* An icon representing a traffic policy file.
|
|
31
32
|
*/
|
|
32
33
|
declare function TrafficPolicyFileIcon(props: SvgAttributes): import("react").JSX.Element;
|
|
33
|
-
declare namespace TrafficPolicyFileIcon {
|
|
34
|
-
var displayName: string;
|
|
35
|
-
}
|
|
36
34
|
//#endregion
|
|
37
35
|
//#region src/components/icons/theme.d.ts
|
|
38
36
|
/**
|
|
@@ -43,9 +41,6 @@ declare namespace TrafficPolicyFileIcon {
|
|
|
43
41
|
* - `dark-high-contrast`: MoonIcon (fill)
|
|
44
42
|
*/
|
|
45
43
|
declare function AutoThemeIcon(props: SvgAttributes): import("react").JSX.Element;
|
|
46
|
-
declare namespace AutoThemeIcon {
|
|
47
|
-
var displayName: string;
|
|
48
|
-
}
|
|
49
44
|
type ThemeIconProps = SvgAttributes & {
|
|
50
45
|
theme: Theme;
|
|
51
46
|
};
|
|
@@ -59,9 +54,6 @@ type ThemeIconProps = SvgAttributes & {
|
|
|
59
54
|
* - `dark-high-contrast`: MoonIcon (fill)
|
|
60
55
|
*/
|
|
61
56
|
declare function ThemeIcon({ theme, ...props }: ThemeIconProps): import("react").JSX.Element;
|
|
62
|
-
declare namespace ThemeIcon {
|
|
63
|
-
var displayName: string;
|
|
64
|
-
}
|
|
65
57
|
//#endregion
|
|
66
58
|
//#region src/components/icons/types.d.ts
|
|
67
59
|
/**
|
package/dist/icons.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./traffic-policy-file-
|
|
1
|
+
import{t as e}from"./traffic-policy-file-CF1lbWtp.js";import{t}from"./sort-B_DDQcVD.js";import{n,t as r}from"./theme-wVnzzx2F.js";import{jsx as i}from"react/jsx-runtime";function a(e){return i(`svg`,{fill:`currentColor`,height:`1em`,viewBox:`0 0 94 36`,width:`2.61em`,...e,children:i(`path`,{d:`M32.272 12.011c-1.298-1.466-2.904-2.205-4.812-2.205-1.176 0-2.26.233-3.255.7a7.995 7.995 0 0 0-2.581 1.906 9.205 9.205 0 0 0-1.715 2.853 9.773 9.773 0 0 0-.628 3.546c0 1.25.194 2.39.58 3.419.362.98.918 1.877 1.635 2.636A7.543 7.543 0 0 0 24 26.584c.965.41 2.025.617 3.176.617.522 0 1.005-.041 1.445-.116.439-.075.858-.2 1.26-.37.4-.175.79-.398 1.18-.664.385-.27.792-.612 1.21-1.018v4.353h-.005v.421h-5.33l-4.005 4.64v.798h15.037v-24.98h-5.697v1.746Zm-.014 7.979a4.25 4.25 0 0 1-.786 1.215 3.555 3.555 0 0 1-2.592 1.1 3.627 3.627 0 0 1-1.464-.292 3.508 3.508 0 0 1-1.166-.808 3.93 3.93 0 0 1-1.054-2.72c0-.519.097-1.006.298-1.457a3.77 3.77 0 0 1 .804-1.181 4.114 4.114 0 0 1 1.162-.808 3.484 3.484 0 0 1 2.817-.016c.448.19.844.463 1.181.81.336.347.6.743.804 1.194.202.452.298.95.298 1.493 0 .505-.104 1.005-.302 1.47m-16.261-7.708a6.173 6.173 0 0 0-2.06-1.602 4.875 4.875 0 0 0-.57-.22 6.383 6.383 0 0 0-.923-.216H8.383L5.697 13.39v-3.082H.002v16.61h5.695V15.712h5.35l.444-.01v11.214h5.697V16.528c0-.885-.084-1.674-.25-2.366a4.655 4.655 0 0 0-.941-1.877zm38.367-2.018h-6.213l-2.47 2.863v-2.864h-5.7v16.61h5.71l.004-11.117h4.144l4.526-5.26zm31.051 7.672 7.79-7.392v-.281H85.7l-5.975 5.991V0h-5.696v26.87h5.696v-6.766l6.262 6.763h7.663v-.316l-8.233-8.617zm-16.11-5.78a9.436 9.436 0 0 0-3.085-1.842 10.953 10.953 0 0 0-3.855-.664c-1.407 0-2.705.226-3.884.678a9.611 9.611 0 0 0-3.072 1.858 8.488 8.488 0 0 0-2.016 2.788 8.281 8.281 0 0 0-.722 3.449c0 1.362.24 2.596.722 3.707a8.52 8.52 0 0 0 2.002 2.862c.85.798 1.86 1.415 3.036 1.847 1.177.432 2.455.647 3.842.647 1.406 0 2.707-.215 3.919-.647 1.204-.431 2.24-1.04 3.098-1.833a8.583 8.583 0 0 0 2.031-2.816c.493-1.09.742-2.29.742-3.611 0-1.316-.244-2.52-.722-3.612a8.424 8.424 0 0 0-2.035-2.81Zm-3.558 7.864c-.2.461-.463.869-.786 1.215a3.573 3.573 0 0 1-2.592 1.1c-.502 0-.981-.096-1.434-.291a3.44 3.44 0 0 1-1.16-.809 4.155 4.155 0 0 1-.788-1.215 3.825 3.825 0 0 1-.297-1.537c0-.517.098-1.004.297-1.456.201-.451.46-.849.787-1.194a3.579 3.579 0 0 1 2.597-1.1c.502 0 .98.096 1.43.29.448.19.839.461 1.16.81.328.345.586.752.786 1.214.2.461.297.954.297 1.471 0 .538-.096 1.04-.297 1.502`})})}function o(e){return i(`svg`,{fill:`currentColor`,height:`1em`,viewBox:`0 0 32 32`,width:`1em`,...e,children:i(`path`,{d:`M27.2 6.18a9.47 9.47 0 0 0-3.12-2.5A9.42 9.42 0 0 0 21.82 3h-6.14l-4.06 4.9V3.1H3V29h8.62V11.53h8.09l.67-.02v17.48H29V12.8c0-1.37-.13-2.6-.38-3.68a7.35 7.35 0 0 0-1.42-2.93Z`})})}export{r as AutoThemeIcon,o as NgrokLettermarkIcon,a as NgrokWordmarkIcon,t as SortIcon,n as ThemeIcon,e as TrafficPolicyFileIcon};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ref } from "react";
|
|
1
|
+
import { Ref, RefCallback } from "react";
|
|
2
2
|
//#region src/utils/copy-to-clipboard.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* Copy the given string to the clipboard. Uses the Clipboard API when
|
|
@@ -17,27 +17,35 @@ type PossibleRef<T> = Ref<T> | undefined;
|
|
|
17
17
|
* callback refs and RefObject(s); the returned ref writes the node to every
|
|
18
18
|
* given ref.
|
|
19
19
|
*
|
|
20
|
+
* Cleanup propagation: if any inner callback ref returns a cleanup function,
|
|
21
|
+
* the composed ref returns a cleanup which invokes each inner cleanup and
|
|
22
|
+
* performs the legacy `null` write for inner refs that did not return one.
|
|
23
|
+
* If no inner ref returns a cleanup, the composed ref returns `undefined`
|
|
24
|
+
* and React calls it again with `null` on unmount (legacy behavior).
|
|
25
|
+
*
|
|
20
26
|
* Prefer {@link useComposedRefs} inside components — it keeps a stable
|
|
21
27
|
* function identity across renders.
|
|
22
28
|
*
|
|
23
29
|
* @example
|
|
24
|
-
* const setRefs = composeRefs(internalRef,
|
|
30
|
+
* const setRefs = composeRefs(internalRef, props.ref);
|
|
25
31
|
* return <input ref={setRefs} />;
|
|
26
32
|
*/
|
|
27
|
-
declare function composeRefs<T>(...refs: PossibleRef<T>[]):
|
|
33
|
+
declare function composeRefs<T>(...refs: PossibleRef<T>[]): RefCallback<T>;
|
|
28
34
|
/**
|
|
29
35
|
* A custom hook that composes multiple refs into a single stable callback
|
|
30
36
|
* ref. Accepts callback refs and RefObject(s); the latest refs passed on
|
|
31
|
-
* each render are the ones written to
|
|
37
|
+
* each render are the ones written to, and any cleanup the composed ref
|
|
38
|
+
* returns targets the refs captured when React attached the node (see
|
|
39
|
+
* {@link composeRefs} for the cleanup propagation contract).
|
|
32
40
|
*
|
|
33
41
|
* @example
|
|
34
|
-
*
|
|
42
|
+
* function MyInput({ ref, ...props }: ComponentProps<"input">) {
|
|
35
43
|
* const internalRef = useRef<HTMLInputElement>(null);
|
|
36
|
-
* const
|
|
37
|
-
* return <input ref={
|
|
38
|
-
* }
|
|
44
|
+
* const composedRef = useComposedRefs(internalRef, ref);
|
|
45
|
+
* return <input ref={composedRef} {...props} />;
|
|
46
|
+
* }
|
|
39
47
|
*/
|
|
40
|
-
declare function useComposedRefs<T>(...refs: PossibleRef<T>[]):
|
|
48
|
+
declare function useComposedRefs<T>(...refs: PossibleRef<T>[]): RefCallback<T>;
|
|
41
49
|
//#endregion
|
|
42
50
|
//#region src/utils/in-view.d.ts
|
|
43
51
|
type MarginValue = `${number}${"px" | "%"}`;
|