@ngrok/mantle 0.76.2 → 0.76.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -8
- package/dist/accordion.d.ts +1 -2
- package/dist/accordion.js +1 -2
- package/dist/agent.json +1 -1
- package/dist/alert-dialog.d.ts +4 -45
- package/dist/alert-dialog.js +1 -2
- package/dist/alert.d.ts +2 -3
- package/dist/alert.js +1 -2
- package/dist/anchor-CcTY5SIz.js +1 -2
- package/dist/anchor.d.ts +1 -2
- package/dist/as-child-uN_018tj.d.ts +1 -2
- package/dist/badge.d.ts +1 -2
- package/dist/badge.js +1 -2
- package/dist/booleanish-BfvnW6vy.js +1 -2
- package/dist/browser-only-BSl_hruR.js +1 -2
- package/dist/browser-only.d.ts +1 -2
- package/dist/button-BAxneEMu.js +1 -2
- package/dist/{button-uMIZVKit.js → button-BfMn3PgP.js} +1 -2
- package/dist/button-mfYak6Rx.d.ts +71 -0
- package/dist/button.d.ts +3 -3
- package/dist/button.js +1 -1
- package/dist/calendar.d.ts +2 -3
- package/dist/calendar.js +1 -2
- package/dist/card.d.ts +1 -2
- package/dist/card.js +1 -2
- package/dist/checkbox.d.ts +30 -2
- package/dist/checkbox.js +1 -2
- package/dist/code-block.d.ts +1 -2
- package/dist/code-block.js +2 -3
- package/dist/code-block_highlight-utils.js +1 -1
- package/dist/code.d.ts +1 -2
- package/dist/code.js +1 -2
- package/dist/color.js +1 -2
- package/dist/combobox.d.ts +1 -2
- package/dist/combobox.js +1 -2
- package/dist/command.d.ts +3 -4
- package/dist/command.js +1 -2
- package/dist/compose-refs-Cjf2gfB8.js +1 -2
- package/dist/copy-to-clipboard-Baw30q9O.js +1 -2
- package/dist/cx-CBSnSC36.js +1 -2
- package/dist/cx.d.ts +1 -2
- package/dist/data-table.d.ts +124 -45
- package/dist/data-table.js +1 -2
- package/dist/description-list.d.ts +1 -2
- package/dist/description-list.js +1 -2
- package/dist/{dialog-DR2V7zsR.js → dialog-ebkUwitP.js} +1 -2
- package/dist/dialog.d.ts +2 -3
- package/dist/dialog.js +1 -1
- package/dist/direction-CcTY0FmA.d.ts +1 -2
- package/dist/direction-Wa9W2F61.js +1 -2
- package/dist/{dropdown-menu-C3YZJBkV.js → dropdown-menu-BHyYWtrH.js} +1 -2
- package/dist/dropdown-menu-BqdyTFLu.d.ts +1 -2
- package/dist/dropdown-menu.js +1 -1
- package/dist/empty.d.ts +1 -2
- package/dist/empty.js +1 -2
- package/dist/field-context-4k1kI7Bo.js +1 -2
- package/dist/field.d.ts +3 -4
- package/dist/field.js +1 -2
- package/dist/flag.d.ts +1 -2
- package/dist/flag.js +1 -2
- package/dist/hooks.d.ts +1 -2
- package/dist/hooks.js +1 -2
- package/dist/hover-card.d.ts +1 -2
- package/dist/hover-card.js +1 -2
- package/dist/icon-C8bYBIHW.js +1 -2
- package/dist/{icon-button-ntupABbM.d.ts → icon-button-D7hs6bX2.d.ts} +52 -44
- package/dist/{icon-button-C_Ht_g1C.js → icon-button-DUNHVWpb.js} +1 -2
- package/dist/icon-n49kOh4_.d.ts +1 -2
- package/dist/icons.d.ts +1 -2
- package/dist/icons.js +1 -2
- package/dist/in-view-BC3wmz-a.d.ts +1 -2
- package/dist/in-view-C2DpZ6s0.js +1 -2
- package/dist/{index-L3NmbHi5.d.ts → index-Bed_XLWa.d.ts} +16 -2
- package/dist/{index-BL5WVva_.d.ts → index-CJbKEKr2.d.ts} +4 -3
- package/dist/{index-DBZ3eRsl.d.ts → index-CTU6apE6.d.ts} +2 -3
- package/dist/index-DorCusfG.d.ts +1 -2
- package/dist/input.d.ts +4 -5
- package/dist/input.js +1 -2
- package/dist/is-input-CXmS0OFN.js +1 -2
- package/dist/kbd-Bv6tefdB.js +1 -2
- package/dist/kbd.d.ts +1 -2
- package/dist/label-DhIUmTN2.js +1 -2
- package/dist/label.d.ts +1 -2
- package/dist/llms.txt +1 -1
- package/dist/main.d.ts +1 -2
- package/dist/main.js +1 -2
- package/dist/mantle.css +191 -14
- package/dist/media-object.d.ts +1 -2
- package/dist/media-object.js +1 -2
- package/dist/multi-select.d.ts +1 -2
- package/dist/multi-select.js +1 -2
- package/dist/otp-input.d.ts +1 -2
- package/dist/otp-input.js +1 -2
- package/dist/pagination.d.ts +2 -3
- package/dist/pagination.js +1 -2
- package/dist/popover-DponNBot.js +1 -2
- package/dist/popover.d.ts +1 -2
- package/dist/primitive-Cn3h4DJg.js +1 -2
- package/dist/primitive-FoWela9a.d.ts +1 -2
- package/dist/progress.d.ts +1 -2
- package/dist/progress.js +1 -2
- package/dist/qr-code.d.ts +1 -2
- package/dist/qr-code.js +1 -2
- package/dist/radio-group.d.ts +1 -2
- package/dist/radio-group.js +1 -2
- package/dist/{resolve-pre-rendered-props-C-vrNxH1.js → resolve-pre-rendered-props-D9nlC6xE.js} +2 -3
- package/dist/resolve-pre-rendered-props-DxJ9-DAl.d.ts +1 -2
- package/dist/sandboxed-on-click.d.ts +2 -2
- package/dist/sandboxed-on-click.js +1 -2
- package/dist/select-C15-XvRT.d.ts +1 -2
- package/dist/{select-Cxc9VmP8.js → select-g0E_TsXr.js} +1 -2
- package/dist/select.js +1 -1
- package/dist/{separator-Bqjy77rG.js → separator-BXFUCWFa.js} +1 -2
- package/dist/separator.d.ts +1 -2
- package/dist/separator.js +1 -1
- package/dist/sheet.d.ts +3 -4
- package/dist/sheet.js +1 -2
- package/dist/skeleton.d.ts +1 -2
- package/dist/skeleton.js +1 -2
- package/dist/skip-to-main-link.d.ts +1 -2
- package/dist/skip-to-main-link.js +1 -2
- package/dist/slider.d.ts +1 -2
- package/dist/slider.js +1 -2
- package/dist/slot-CV5fmqFr.js +1 -2
- package/dist/slot.d.ts +1 -1
- package/dist/sort-BPX2Fk9t.js +1 -2
- package/dist/split-button.d.ts +5 -6
- package/dist/split-button.js +1 -2
- package/dist/svg-only-Cz1cby8y.js +1 -2
- package/dist/svg-only-f6ToFLH0.d.ts +1 -2
- package/dist/switch.d.ts +1 -2
- package/dist/switch.js +1 -2
- package/dist/table-BWD9IlIN.d.ts +1 -2
- package/dist/table-DWy_oNta.js +1 -0
- package/dist/table.js +1 -1
- package/dist/tabs.d.ts +1 -2
- package/dist/tabs.js +1 -2
- package/dist/text-area.d.ts +1 -2
- package/dist/text-area.js +1 -2
- package/dist/theme-provider-MMwxHEfw.js +1 -2
- package/dist/theme.d.ts +4 -5
- package/dist/theme.js +1 -2
- package/dist/themes-CYNpplwN.d.ts +1 -2
- package/dist/toast-CR3MVChj.js +1 -2
- package/dist/toast.d.ts +1 -2
- package/dist/tooltip.d.ts +1 -2
- package/dist/tooltip.js +1 -2
- package/dist/traffic-policy-file-0g5RXFqu.js +1 -2
- package/dist/types-BvUzforF.d.ts +1 -2
- package/dist/types-D85fCNV3.js +1 -2
- package/dist/types.d.ts +1 -3
- package/dist/use-copy-to-clipboard-BLpquU9d.js +1 -2
- package/dist/use-isomorphic-layout-effect-DdTRtMY-.js +1 -2
- package/dist/use-matches-media-query-CMSxHR9n.js +1 -2
- package/dist/use-prefers-reduced-motion-CWIoFA6W.js +1 -2
- package/dist/utils.d.ts +1 -2
- package/dist/utils.js +1 -2
- package/dist/validation-DCyx-ceH.js +1 -2
- package/dist/validation-xyX_6kph.d.ts +1 -2
- package/dist/well.d.ts +1 -2
- package/dist/well.js +1 -2
- package/dist/with-style-props-CyImx7vd.d.ts +1 -2
- package/package.json +22 -22
- package/dist/accordion.js.map +0 -1
- package/dist/alert-dialog.js.map +0 -1
- package/dist/alert.js.map +0 -1
- package/dist/anchor-CcTY5SIz.js.map +0 -1
- package/dist/badge.js.map +0 -1
- package/dist/booleanish-BfvnW6vy.js.map +0 -1
- package/dist/browser-only-BSl_hruR.js.map +0 -1
- package/dist/button-BAxneEMu.js.map +0 -1
- package/dist/button-BYZOBUgj.d.ts +0 -172
- package/dist/button-uMIZVKit.js.map +0 -1
- package/dist/calendar.js.map +0 -1
- package/dist/card.js.map +0 -1
- package/dist/checkbox.js.map +0 -1
- package/dist/code-block.js.map +0 -1
- package/dist/code.js.map +0 -1
- package/dist/color.js.map +0 -1
- package/dist/combobox.js.map +0 -1
- package/dist/command.js.map +0 -1
- package/dist/compose-refs-Cjf2gfB8.js.map +0 -1
- package/dist/copy-to-clipboard-Baw30q9O.js.map +0 -1
- package/dist/cx-CBSnSC36.js.map +0 -1
- package/dist/data-table.js.map +0 -1
- package/dist/deep-non-nullable-BxRoySYR.d.ts +0 -8
- package/dist/description-list.js.map +0 -1
- package/dist/dialog-DR2V7zsR.js.map +0 -1
- package/dist/direction-Wa9W2F61.js.map +0 -1
- package/dist/dropdown-menu-C3YZJBkV.js.map +0 -1
- package/dist/empty.js.map +0 -1
- package/dist/field-context-4k1kI7Bo.js.map +0 -1
- package/dist/field.js.map +0 -1
- package/dist/flag.js.map +0 -1
- package/dist/hooks.js.map +0 -1
- package/dist/hover-card.js.map +0 -1
- package/dist/icon-C8bYBIHW.js.map +0 -1
- package/dist/icon-button-C_Ht_g1C.js.map +0 -1
- package/dist/icons.js.map +0 -1
- package/dist/in-view-C2DpZ6s0.js.map +0 -1
- package/dist/input.js.map +0 -1
- package/dist/is-input-CXmS0OFN.js.map +0 -1
- package/dist/kbd-Bv6tefdB.js.map +0 -1
- package/dist/label-DhIUmTN2.js.map +0 -1
- package/dist/main.js.map +0 -1
- package/dist/media-object.js.map +0 -1
- package/dist/multi-select.js.map +0 -1
- package/dist/otp-input.js.map +0 -1
- package/dist/pagination.js.map +0 -1
- package/dist/popover-DponNBot.js.map +0 -1
- package/dist/primitive-Cn3h4DJg.js.map +0 -1
- package/dist/progress.js.map +0 -1
- package/dist/qr-code.js.map +0 -1
- package/dist/radio-group.js.map +0 -1
- package/dist/resolve-pre-rendered-props-C-vrNxH1.js.map +0 -1
- package/dist/sandboxed-on-click.js.map +0 -1
- package/dist/select-Cxc9VmP8.js.map +0 -1
- package/dist/separator-Bqjy77rG.js.map +0 -1
- package/dist/sheet.js.map +0 -1
- package/dist/skeleton.js.map +0 -1
- package/dist/skip-to-main-link.js.map +0 -1
- package/dist/slider.js.map +0 -1
- package/dist/slot-CV5fmqFr.js.map +0 -1
- package/dist/sort-BPX2Fk9t.js.map +0 -1
- package/dist/split-button.js.map +0 -1
- package/dist/svg-only-Cz1cby8y.js.map +0 -1
- package/dist/switch.js.map +0 -1
- package/dist/table-eyoUW2Uv.js +0 -2
- package/dist/table-eyoUW2Uv.js.map +0 -1
- package/dist/tabs.js.map +0 -1
- package/dist/text-area.js.map +0 -1
- package/dist/theme-provider-MMwxHEfw.js.map +0 -1
- package/dist/theme.js.map +0 -1
- package/dist/toast-CR3MVChj.js.map +0 -1
- package/dist/tooltip.js.map +0 -1
- package/dist/traffic-policy-file-0g5RXFqu.js.map +0 -1
- package/dist/types-D85fCNV3.js.map +0 -1
- package/dist/use-copy-to-clipboard-BLpquU9d.js.map +0 -1
- package/dist/use-isomorphic-layout-effect-DdTRtMY-.js.map +0 -1
- package/dist/use-matches-media-query-CMSxHR9n.js.map +0 -1
- package/dist/use-prefers-reduced-motion-CWIoFA6W.js.map +0 -1
- package/dist/utils.js.map +0 -1
- package/dist/validation-DCyx-ceH.js.map +0 -1
- package/dist/variant-props-CVymuSfa.d.ts +0 -13
- package/dist/well.js.map +0 -1
package/dist/hooks.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import{t as e}from"./use-matches-media-query-CMSxHR9n.js";import{r as t}from"./browser-only-BSl_hruR.js";import{n}from"./compose-refs-Cjf2gfB8.js";import{t as r}from"./use-copy-to-clipboard-BLpquU9d.js";import{t as i}from"./use-isomorphic-layout-effect-DdTRtMY-.js";import{n as a,t as o}from"./use-prefers-reduced-motion-CWIoFA6W.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=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])}const z=(e=`mantle`)=>u(()=>B(e),[e]);function B(e=`mantle`){return[e.trim()||`mantle`,V()].join(`-`)}function V(){return Math.random().toString(36).substring(2,9)}function H(){let e=a();return u(()=>e?`auto`:`smooth`,[e])}function U(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 W(e,t){switch(t.type){case`push`:return{undoStack:[...e.undoStack,t.snapshot],redoStack:[]};case`undo`:{if(e.undoStack.length===0)return e;let n=e.undoStack.slice(0,-1);return e.undoStack[e.undoStack.length-1]===void 0?e:{undoStack:n,redoStack:[...e.redoStack,t.current]}}case`redo`:{if(e.redoStack.length===0)return e;let n=e.redoStack.slice(0,-1);return e.redoStack[e.redoStack.length-1]===void 0?e:{undoStack:[...e.undoStack,t.current],redoStack:n}}}}function G(){let[e,t]=d(W,{undoStack:[],redoStack:[]}),n=c(e=>{t({type:`push`,snapshot:e})},[]),r=c(n=>{let r=e.undoStack[e.undoStack.length-1];if(r!==void 0)return t({type:`undo`,current:n}),r},[e.undoStack]),i=c(n=>{let r=e.redoStack[e.redoStack.length-1];if(r!==void 0)return t({type:`redo`,current:n}),r},[e.redoStack]);return u(()=>({canUndo:e.undoStack.length>0,canRedo:e.redoStack.length>0,push:n,undo:r,redo:i}),[e.undoStack.length,e.redoStack.length,n,r,i])}export{g as breakpoints,o as getPrefersReducedMotion,_ as useBreakpoint,L as useCallbackRef,n as useComposedRefs,r as useCopyToClipboard,R as useDebouncedCallback,U as useInView,v as useIsBelowBreakpoint,t as useIsHydrated,i as useIsomorphicLayoutEffect,e as useMatchesMediaQuery,a as usePrefersReducedMotion,z as useRandomStableId,H as useScrollBehavior,G as useUndoRedo};
|
|
2
|
-
//# sourceMappingURL=hooks.js.map
|
|
1
|
+
import{t as e}from"./use-matches-media-query-CMSxHR9n.js";import{r as t}from"./browser-only-BSl_hruR.js";import{n}from"./compose-refs-Cjf2gfB8.js";import{t as r}from"./use-copy-to-clipboard-BLpquU9d.js";import{t as i}from"./use-isomorphic-layout-effect-DdTRtMY-.js";import{n as a,t as o}from"./use-prefers-reduced-motion-CWIoFA6W.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=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])}const z=(e=`mantle`)=>u(()=>B(e),[e]);function B(e=`mantle`){return[e.trim()||`mantle`,V()].join(`-`)}function V(){return Math.random().toString(36).substring(2,9)}function H(){let e=a();return u(()=>e?`auto`:`smooth`,[e])}function U(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 W(e,t){switch(t.type){case`push`:return{undoStack:[...e.undoStack,t.snapshot],redoStack:[]};case`undo`:{if(e.undoStack.length===0)return e;let n=e.undoStack.slice(0,-1);return e.undoStack[e.undoStack.length-1]===void 0?e:{undoStack:n,redoStack:[...e.redoStack,t.current]}}case`redo`:{if(e.redoStack.length===0)return e;let n=e.redoStack.slice(0,-1);return e.redoStack[e.redoStack.length-1]===void 0?e:{undoStack:[...e.undoStack,t.current],redoStack:n}}}}function G(){let[e,t]=d(W,{undoStack:[],redoStack:[]}),n=c(e=>{t({type:`push`,snapshot:e})},[]),r=c(n=>{let r=e.undoStack[e.undoStack.length-1];if(r!==void 0)return t({type:`undo`,current:n}),r},[e.undoStack]),i=c(n=>{let r=e.redoStack[e.redoStack.length-1];if(r!==void 0)return t({type:`redo`,current:n}),r},[e.redoStack]);return u(()=>({canUndo:e.undoStack.length>0,canRedo:e.redoStack.length>0,push:n,undo:r,redo:i}),[e.undoStack.length,e.redoStack.length,n,r,i])}export{g as breakpoints,o as getPrefersReducedMotion,_ as useBreakpoint,L as useCallbackRef,n as useComposedRefs,r as useCopyToClipboard,R as useDebouncedCallback,U as useInView,v as useIsBelowBreakpoint,t as useIsHydrated,i as useIsomorphicLayoutEffect,e as useMatchesMediaQuery,a as usePrefersReducedMotion,z as useRandomStableId,H as useScrollBehavior,G as useUndoRedo};
|
package/dist/hover-card.d.ts
CHANGED
|
@@ -135,5 +135,4 @@ declare const HoverCard: {
|
|
|
135
135
|
readonly Trigger: import("react").ForwardRefExoticComponent<Omit<HoverCardPrimitive.HoverCardTriggerProps & import("react").RefAttributes<HTMLAnchorElement>, "ref"> & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
136
136
|
};
|
|
137
137
|
//#endregion
|
|
138
|
-
export { HoverCard };
|
|
139
|
-
//# sourceMappingURL=hover-card.d.ts.map
|
|
138
|
+
export { HoverCard };
|
package/dist/hover-card.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-CBSnSC36.js";import{forwardRef as t}from"react";import{jsx as n}from"react/jsx-runtime";import*as r from"@radix-ui/react-hover-card";const i=({closeDelay:e=300,openDelay:t=100,...i})=>n(r.Root,{closeDelay:e,openDelay:t,...i});i.displayName=`HoverCard`;const a=t((e,t)=>n(r.Trigger,{ref:t,"data-slot":`hover-card-trigger`,...e}));a.displayName=`HoverCardTrigger`;const o=r.Portal;o.displayName=`HoverCardPortal`;const s=t(({className:t,onClick:i,align:a=`center`,sideOffset:s=4,...c},l)=>n(o,{children:n(r.Content,{ref:l,"data-slot":`hover-card-content`,align:a,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`,t),onClick:e=>{e.stopPropagation(),i?.(e)},...c})}));s.displayName=r.Content.displayName;const c={Root:i,Content:s,Portal:o,Trigger:a};export{c as HoverCard};
|
|
2
|
-
//# sourceMappingURL=hover-card.js.map
|
|
1
|
+
import{t as e}from"./cx-CBSnSC36.js";import{forwardRef as t}from"react";import{jsx as n}from"react/jsx-runtime";import*as r from"@radix-ui/react-hover-card";const i=({closeDelay:e=300,openDelay:t=100,...i})=>n(r.Root,{closeDelay:e,openDelay:t,...i});i.displayName=`HoverCard`;const a=t((e,t)=>n(r.Trigger,{ref:t,"data-slot":`hover-card-trigger`,...e}));a.displayName=`HoverCardTrigger`;const o=r.Portal;o.displayName=`HoverCardPortal`;const s=t(({className:t,onClick:i,align:a=`center`,sideOffset:s=4,...c},l)=>n(o,{children:n(r.Content,{ref:l,"data-slot":`hover-card-content`,align:a,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`,t),onClick:e=>{e.stopPropagation(),i?.(e)},...c})}));s.displayName=r.Content.displayName;const c={Root:i,Content:s,Portal:o,Trigger:a};export{c as HoverCard};
|
package/dist/icon-C8bYBIHW.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-CBSnSC36.js";import{t}from"./svg-only-Cz1cby8y.js";import{forwardRef as n}from"react";import{jsx as r}from"react/jsx-runtime";const i=n(({className:n,style:i,svg:a,...o},s)=>r(t,{ref:s,"data-slot":`icon`,className:e(`size-5`,n),style:i,svg:a,...o}));i.displayName=`Icon`;export{i as t};
|
|
2
|
-
//# sourceMappingURL=icon-C8bYBIHW.js.map
|
|
1
|
+
import{t as e}from"./cx-CBSnSC36.js";import{t}from"./svg-only-Cz1cby8y.js";import{forwardRef as n}from"react";import{jsx as r}from"react/jsx-runtime";const i=n(({className:n,style:i,svg:a,...o},s)=>r(t,{ref:s,"data-slot":`icon`,className:e(`size-5`,n),style:i,svg:a,...o}));i.displayName=`Icon`;export{i as t};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as WithAsChild } from "./as-child-uN_018tj.js";
|
|
2
|
-
import {
|
|
2
|
+
import { i as DeepNonNullable, r as VariantProps } from "./index-Bed_XLWa.js";
|
|
3
3
|
import { ButtonHTMLAttributes, ReactNode } from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/components/button/icon-button.d.ts
|
|
@@ -10,7 +10,7 @@ declare const iconButtonVariants: (props?: ({
|
|
|
10
10
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
11
11
|
type IconButtonVariants = VariantProps<typeof iconButtonVariants>;
|
|
12
12
|
/**
|
|
13
|
-
* The props for the `
|
|
13
|
+
* The props for the `IconButton` component.
|
|
14
14
|
*/
|
|
15
15
|
type IconButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & WithAsChild & IconButtonVariants & {
|
|
16
16
|
/**
|
|
@@ -22,28 +22,16 @@ type IconButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & WithAsChild & I
|
|
|
22
22
|
* the icon will automatically be replaced with a spinner.
|
|
23
23
|
*/
|
|
24
24
|
icon: ReactNode;
|
|
25
|
-
} & ({
|
|
26
25
|
/**
|
|
27
|
-
*
|
|
28
|
-
*
|
|
26
|
+
* The behavior of the button when activated. Defaults to `"button"`, so the
|
|
27
|
+
* button does not accidentally submit a surrounding `<form>` — pass
|
|
28
|
+
* `type="submit"` to submit a form, or `type="reset"` to reset it.
|
|
29
29
|
*
|
|
30
|
-
* When `asChild` is
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* asChild can be used as deeply as you need to. This means it is a great way
|
|
35
|
-
* to compose multiple primitive's behavior together.
|
|
36
|
-
*
|
|
37
|
-
* @see https://www.radix-ui.com/docs/primitives/guides/composition#composition
|
|
38
|
-
*/
|
|
39
|
-
asChild: true;
|
|
40
|
-
/**
|
|
41
|
-
* The default behavior of the button. Possible values are: `"button"`, `"submit"`, and `"reset"`.
|
|
42
|
-
*
|
|
43
|
-
* if `asChild` is NOT used: Unlike the native `<button>` element, this prop is required and has no default value.
|
|
44
|
-
*
|
|
45
|
-
* If `asChild` IS used: This prop HAS NO EFFECT, is REMOVED, and has no default value. This is because we do not want the `button` `type` to automatically merge with any child anchor `type` attribute because the `anchor` `type` is _strictly different_ than the `button` type, see: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#type
|
|
30
|
+
* When `asChild` is used, `type` has no effect and is not forwarded to the
|
|
31
|
+
* child, so a wrapped anchor never inherits a `button` `type`. See:
|
|
32
|
+
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#type
|
|
46
33
|
*
|
|
34
|
+
* @default "button"
|
|
47
35
|
* @enum
|
|
48
36
|
* - `"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.
|
|
49
37
|
* - `"reset"`: The button resets all the controls to their initial values.
|
|
@@ -52,24 +40,7 @@ type IconButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & WithAsChild & I
|
|
|
52
40
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#type
|
|
53
41
|
*/
|
|
54
42
|
type?: ButtonHTMLAttributes<HTMLButtonElement>["type"];
|
|
55
|
-
}
|
|
56
|
-
asChild?: false | undefined;
|
|
57
|
-
/**
|
|
58
|
-
* The default behavior of the button. Possible values are: `"button"`, `"submit"`, and `"reset"`.
|
|
59
|
-
*
|
|
60
|
-
* if `asChild` is NOT used: Unlike the native `<button>` element, this prop is required and has no default value.
|
|
61
|
-
*
|
|
62
|
-
* If `asChild` IS used: This prop HAS NO EFFECT, is REMOVED, and has no default value. This is because we do not want the `button` `type` to automatically merge with any child anchor `type` attribute because the `anchor` `type` is _strictly different_ than the `button` type, see: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#type
|
|
63
|
-
*
|
|
64
|
-
* @enum
|
|
65
|
-
* - `"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.
|
|
66
|
-
* - `"reset"`: The button resets all the controls to their initial values.
|
|
67
|
-
* - `"submit"`: The button submits the form data to the server.
|
|
68
|
-
*
|
|
69
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#type
|
|
70
|
-
*/
|
|
71
|
-
type: Exclude<ButtonHTMLAttributes<HTMLButtonElement>["type"], undefined>;
|
|
72
|
-
});
|
|
43
|
+
};
|
|
73
44
|
/**
|
|
74
45
|
* Renders a button or a component that looks like a button, an interactive
|
|
75
46
|
* element activated by a user with a mouse, keyboard, finger, voice command, or
|
|
@@ -77,20 +48,57 @@ type IconButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & WithAsChild & I
|
|
|
77
48
|
* as submitting a form or opening a dialog.
|
|
78
49
|
* Renders only a single icon as children with an accessible, screen-reader-only label.
|
|
79
50
|
*
|
|
80
|
-
* @see https://mantle.ngrok.com/components/button
|
|
51
|
+
* @see https://mantle.ngrok.com/components/icon-button
|
|
81
52
|
*
|
|
82
53
|
* @example
|
|
83
54
|
* ```tsx
|
|
84
55
|
* <IconButton
|
|
85
|
-
* type="button"
|
|
86
56
|
* icon={<TrashIcon />}
|
|
87
57
|
* label="Delete item"
|
|
88
58
|
* appearance="ghost"
|
|
89
59
|
* size="sm"
|
|
60
|
+
* onClick={handleDelete}
|
|
90
61
|
* />
|
|
91
62
|
* ```
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* Submit a form — opt in with `type="submit"` (the default `"button"` does not submit):
|
|
66
|
+
* ```tsx
|
|
67
|
+
* <IconButton type="submit" icon={<MagnifyingGlassIcon />} label="Search" />
|
|
68
|
+
* ```
|
|
92
69
|
*/
|
|
93
|
-
declare const IconButton: import("react").ForwardRefExoticComponent<
|
|
70
|
+
declare const IconButton: import("react").ForwardRefExoticComponent<ButtonHTMLAttributes<HTMLButtonElement> & WithAsChild & Partial<DeepNonNullable<import("class-variance-authority").VariantProps<(props?: ({
|
|
71
|
+
appearance?: "ghost" | "outlined" | null | undefined;
|
|
72
|
+
isLoading?: boolean | null | undefined;
|
|
73
|
+
size?: "xs" | "sm" | "md" | null | undefined;
|
|
74
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string>>> & {
|
|
75
|
+
/**
|
|
76
|
+
* 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.
|
|
77
|
+
*/
|
|
78
|
+
label: string;
|
|
79
|
+
/**
|
|
80
|
+
* An icon to render inside the button. If the `state` is `"pending"`, then
|
|
81
|
+
* the icon will automatically be replaced with a spinner.
|
|
82
|
+
*/
|
|
83
|
+
icon: ReactNode;
|
|
84
|
+
/**
|
|
85
|
+
* The behavior of the button when activated. Defaults to `"button"`, so the
|
|
86
|
+
* button does not accidentally submit a surrounding `<form>` — pass
|
|
87
|
+
* `type="submit"` to submit a form, or `type="reset"` to reset it.
|
|
88
|
+
*
|
|
89
|
+
* When `asChild` is used, `type` has no effect and is not forwarded to the
|
|
90
|
+
* child, so a wrapped anchor never inherits a `button` `type`. See:
|
|
91
|
+
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#type
|
|
92
|
+
*
|
|
93
|
+
* @default "button"
|
|
94
|
+
* @enum
|
|
95
|
+
* - `"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.
|
|
96
|
+
* - `"reset"`: The button resets all the controls to their initial values.
|
|
97
|
+
* - `"submit"`: The button submits the form data to the server.
|
|
98
|
+
*
|
|
99
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#type
|
|
100
|
+
*/
|
|
101
|
+
type?: ButtonHTMLAttributes<HTMLButtonElement>["type"];
|
|
102
|
+
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
94
103
|
//#endregion
|
|
95
|
-
export { IconButtonProps as n, IconButton as t };
|
|
96
|
-
//# sourceMappingURL=icon-button-ntupABbM.d.ts.map
|
|
104
|
+
export { IconButtonProps as n, IconButton as t };
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-CBSnSC36.js";import{t}from"./icon-C8bYBIHW.js";import{t as n}from"./booleanish-BfvnW6vy.js";import{t as r}from"./slot-CV5fmqFr.js";import{Children as i,cloneElement as a,forwardRef as o,isValidElement as s}from"react";import c from"tiny-invariant";import{Fragment as l,jsx as u,jsxs as d}from"react/jsx-runtime";import{cva as f}from"class-variance-authority";import{CircleNotchIcon as p}from"@phosphor-icons/react/CircleNotch";const m=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`),h=f(m,{variants:{appearance:{ghost:`text-strong focus-visible:ring-focus-accent not-disabled:hover:bg-neutral-500/10 not-disabled:hover:text-strong border-transparent`,outlined:`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`},isLoading:{false:``,true:`opacity-50`},size:{xs:`size-6`,sm:`size-7`,md:`size-9`}},defaultVariants:{appearance:`outlined`,size:`md`}}),g=o(({"aria-disabled":o,appearance:f,asChild:m=!1,children:g,className:_,disabled:v,icon:y,isLoading:b=!1,label:x,size:S,type:C,...w},T)=>{let E=n(o??v??b),D=b?u(p,{className:`animate-spin`}):y,O={"aria-disabled":E,"data-slot":`icon-button`,className:e(h({appearance:f,isLoading:b,size:S}),_),"data-appearance":f,"data-disabled":E,"data-icon-button":!0,"data-loading":b,"data-size":S,disabled:E,ref:T,...w},k=d(l,{children:[u(`span`,{className:`sr-only`,children:x}),u(t,{svg:D})]});return m?(c(s(g)&&i.only(g),"When using `asChild`, IconButton must be passed a single child as a JSX tag."),u(r,{...O,children:a(g,{},k)})):u(`button`,{...O,type:C
|
|
2
|
-
//# sourceMappingURL=icon-button-C_Ht_g1C.js.map
|
|
1
|
+
import{t as e}from"./cx-CBSnSC36.js";import{t}from"./icon-C8bYBIHW.js";import{t as n}from"./booleanish-BfvnW6vy.js";import{t as r}from"./slot-CV5fmqFr.js";import{Children as i,cloneElement as a,forwardRef as o,isValidElement as s}from"react";import c from"tiny-invariant";import{Fragment as l,jsx as u,jsxs as d}from"react/jsx-runtime";import{cva as f}from"class-variance-authority";import{CircleNotchIcon as p}from"@phosphor-icons/react/CircleNotch";const m=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`),h=f(m,{variants:{appearance:{ghost:`text-strong focus-visible:ring-focus-accent not-disabled:hover:bg-neutral-500/10 not-disabled:hover:text-strong border-transparent`,outlined:`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`},isLoading:{false:``,true:`opacity-50`},size:{xs:`size-6`,sm:`size-7`,md:`size-9`}},defaultVariants:{appearance:`outlined`,size:`md`}}),g=o(({"aria-disabled":o,appearance:f,asChild:m=!1,children:g,className:_,disabled:v,icon:y,isLoading:b=!1,label:x,size:S,type:C,...w},T)=>{let E=n(o??v??b),D=b?u(p,{className:`animate-spin`}):y,O={"aria-disabled":E,"data-slot":`icon-button`,className:e(h({appearance:f,isLoading:b,size:S}),_),"data-appearance":f,"data-disabled":E,"data-icon-button":!0,"data-loading":b,"data-size":S,disabled:E,ref:T,...w},k=d(l,{children:[u(`span`,{className:`sr-only`,children:x}),u(t,{svg:D})]});return m?(c(s(g)&&i.only(g),"When using `asChild`, IconButton must be passed a single child as a JSX tag."),u(r,{...O,children:a(g,{},k)})):u(`button`,{...O,type:C??`button`,children:k})});g.displayName=`IconButton`;export{m as n,h as r,g as t};
|
package/dist/icon-n49kOh4_.d.ts
CHANGED
|
@@ -22,5 +22,4 @@ type IconProps = Omit<SvgAttributes, "children"> & {
|
|
|
22
22
|
*/
|
|
23
23
|
declare const Icon: import("react").ForwardRefExoticComponent<Omit<IconProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
|
|
24
24
|
//#endregion
|
|
25
|
-
export { IconProps as n, Icon as t };
|
|
26
|
-
//# sourceMappingURL=icon-n49kOh4_.d.ts.map
|
|
25
|
+
export { IconProps as n, Icon as t };
|
package/dist/icons.d.ts
CHANGED
|
@@ -99,5 +99,4 @@ declare function NgrokWordmarkIcon(props: Omit<InlineIconProps, "color">): impor
|
|
|
99
99
|
*/
|
|
100
100
|
declare function NgrokLettermarkIcon(props: Omit<InlineIconProps, "color">): import("react").JSX.Element;
|
|
101
101
|
//#endregion
|
|
102
|
-
export { AutoThemeIcon, type InlineIconProps, NgrokLettermarkIcon, NgrokWordmarkIcon, SortIcon, ThemeIcon, TrafficPolicyFileIcon };
|
|
103
|
-
//# sourceMappingURL=icons.d.ts.map
|
|
102
|
+
export { AutoThemeIcon, type InlineIconProps, NgrokLettermarkIcon, NgrokWordmarkIcon, SortIcon, ThemeIcon, TrafficPolicyFileIcon };
|
package/dist/icons.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import{s as e}from"./theme-provider-MMwxHEfw.js";import{t}from"./traffic-policy-file-0g5RXFqu.js";import{t as n}from"./sort-BPX2Fk9t.js";import{jsx as r}from"react/jsx-runtime";import{DesktopIcon as i}from"@phosphor-icons/react/Desktop";import{MoonIcon as a}from"@phosphor-icons/react/Moon";import{SunIcon as o}from"@phosphor-icons/react/Sun";function s(t){return r(c,{theme:e(),...t})}s.displayName=`AutoThemeIcon`;function c({theme:e,...t}){switch(e){case`system`:return r(i,{...t});case`light`:return r(o,{...t});case`dark`:return r(a,{...t});case`light-high-contrast`:return r(o,{...t,weight:`fill`});case`dark-high-contrast`:return r(a,{...t,weight:`fill`})}}c.displayName=`ThemeIcon`;function l(e){return r(`svg`,{fill:`currentColor`,height:`1em`,viewBox:`0 0 94 36`,width:`2.61em`,...e,children:r(`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 u(e){return r(`svg`,{fill:`currentColor`,height:`1em`,viewBox:`0 0 32 32`,width:`1em`,...e,children:r(`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{s as AutoThemeIcon,u as NgrokLettermarkIcon,l as NgrokWordmarkIcon,n as SortIcon,c as ThemeIcon,t as TrafficPolicyFileIcon};
|
|
2
|
-
//# sourceMappingURL=icons.js.map
|
|
1
|
+
import{s as e}from"./theme-provider-MMwxHEfw.js";import{t}from"./traffic-policy-file-0g5RXFqu.js";import{t as n}from"./sort-BPX2Fk9t.js";import{jsx as r}from"react/jsx-runtime";import{DesktopIcon as i}from"@phosphor-icons/react/Desktop";import{MoonIcon as a}from"@phosphor-icons/react/Moon";import{SunIcon as o}from"@phosphor-icons/react/Sun";function s(t){return r(c,{theme:e(),...t})}s.displayName=`AutoThemeIcon`;function c({theme:e,...t}){switch(e){case`system`:return r(i,{...t});case`light`:return r(o,{...t});case`dark`:return r(a,{...t});case`light-high-contrast`:return r(o,{...t,weight:`fill`});case`dark-high-contrast`:return r(a,{...t,weight:`fill`})}}c.displayName=`ThemeIcon`;function l(e){return r(`svg`,{fill:`currentColor`,height:`1em`,viewBox:`0 0 94 36`,width:`2.61em`,...e,children:r(`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 u(e){return r(`svg`,{fill:`currentColor`,height:`1em`,viewBox:`0 0 32 32`,width:`1em`,...e,children:r(`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{s as AutoThemeIcon,u as NgrokLettermarkIcon,l as NgrokWordmarkIcon,n as SortIcon,c as ThemeIcon,t as TrafficPolicyFileIcon};
|
|
@@ -92,5 +92,4 @@ declare function inView(element: Element, onStart: (element: Element, entry: Int
|
|
|
92
92
|
amount
|
|
93
93
|
}?: InViewOptions): VoidFunction;
|
|
94
94
|
//#endregion
|
|
95
|
-
export { composeRefs as a, inView as i, MarginType as n, useComposedRefs as o, ViewChangeHandler as r, copyToClipboard as s, InViewOptions as t };
|
|
96
|
-
//# sourceMappingURL=in-view-BC3wmz-a.d.ts.map
|
|
95
|
+
export { composeRefs as a, inView as i, MarginType as n, useComposedRefs as o, ViewChangeHandler as r, copyToClipboard as s, InViewOptions as t };
|
package/dist/in-view-C2DpZ6s0.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
const e={some:0,all:1};function t(t,n,{root:r,margin:i,amount:a=`some`}={}){let o=new WeakMap,s=new IntersectionObserver(e=>{e.forEach(e=>{let t=o.get(e.target);if(e.isIntersecting!==!!t)if(e.isIntersecting){let t=n(e.target,e);typeof t==`function`?o.set(e.target,t):s.unobserve(e.target)}else typeof t==`function`&&(t(e),o.delete(e.target))})},{root:r,rootMargin:i,threshold:typeof a==`number`?a:e[a]});return s.observe(t),()=>{s.unobserve(t),s.disconnect()}}export{t};
|
|
2
|
-
//# sourceMappingURL=in-view-C2DpZ6s0.js.map
|
|
1
|
+
const e={some:0,all:1};function t(t,n,{root:r,margin:i,amount:a=`some`}={}){let o=new WeakMap,s=new IntersectionObserver(e=>{e.forEach(e=>{let t=o.get(e.target);if(e.isIntersecting!==!!t)if(e.isIntersecting){let t=n(e.target,e);typeof t==`function`?o.set(e.target,t):s.unobserve(e.target)}else typeof t==`function`&&(t(e),o.delete(e.target))})},{root:r,rootMargin:i,threshold:typeof a==`number`?a:e[a]});return s.observe(t),()=>{s.unobserve(t),s.disconnect()}}export{t};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CSSProperties } from "react";
|
|
2
|
+
import { VariantProps } from "class-variance-authority";
|
|
2
3
|
|
|
3
4
|
//#region src/types/booleanish.d.ts
|
|
4
5
|
type Booleanish = boolean | "true" | "false";
|
|
@@ -8,6 +9,20 @@ type Booleanish = boolean | "true" | "false";
|
|
|
8
9
|
*/
|
|
9
10
|
declare function parseBooleanish(value: Booleanish | (string & {}) | undefined | null): boolean;
|
|
10
11
|
//#endregion
|
|
12
|
+
//#region src/types/deep-non-nullable.d.ts
|
|
13
|
+
/**
|
|
14
|
+
* Makes all properties in an object non-nullable, recursively.
|
|
15
|
+
*/
|
|
16
|
+
type DeepNonNullable<Type> = { [Property in keyof Type]-?: Type[Property] & {} };
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region src/types/variant-props.d.ts
|
|
19
|
+
/**
|
|
20
|
+
* Variant props that are optional and cannot be `null`.
|
|
21
|
+
*
|
|
22
|
+
* Using VariantProps directly from CVA produces that can be `null`, which is not what we want.
|
|
23
|
+
*/
|
|
24
|
+
type VariantProps$1<Variants extends (props: Record<PropertyKey, unknown> | undefined) => string> = Partial<DeepNonNullable<VariantProps<Variants>>>;
|
|
25
|
+
//#endregion
|
|
11
26
|
//#region src/types/css-properties.d.ts
|
|
12
27
|
/**
|
|
13
28
|
* A CSS custom property (CSS variable) name.
|
|
@@ -43,5 +58,4 @@ type CssProperties = CSSProperties & Record<CssVariableName, string | number>;
|
|
|
43
58
|
*/
|
|
44
59
|
declare const $cssProperties: <T extends CssProperties = CssProperties>(input: T) => CSSProperties;
|
|
45
60
|
//#endregion
|
|
46
|
-
export {
|
|
47
|
-
//# sourceMappingURL=index-L3NmbHi5.d.ts.map
|
|
61
|
+
export { Booleanish as a, DeepNonNullable as i, CssProperties as n, parseBooleanish as o, VariantProps$1 as r, $cssProperties as t };
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
* </Slot>
|
|
14
14
|
* ```
|
|
15
15
|
*/
|
|
16
|
-
declare const Slot: import("react").ForwardRefExoticComponent<Omit<import("
|
|
16
|
+
declare const Slot: import("react").ForwardRefExoticComponent<Omit<import("react").HTMLAttributes<HTMLElement> & {
|
|
17
|
+
children?: import("react").ReactNode;
|
|
18
|
+
} & import("react").RefAttributes<HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>>;
|
|
17
19
|
//#endregion
|
|
18
|
-
export { Slot as t };
|
|
19
|
-
//# sourceMappingURL=index-BL5WVva_.d.ts.map
|
|
20
|
+
export { Slot as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as WithAsChild } from "./as-child-uN_018tj.js";
|
|
2
|
-
import {
|
|
2
|
+
import { r as VariantProps } from "./index-Bed_XLWa.js";
|
|
3
3
|
import { ComponentProps } from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/components/button/button-group.d.ts
|
|
@@ -24,5 +24,4 @@ type ButtonGroupProps = ComponentProps<"div"> & ButtonGroupVariants & WithAsChil
|
|
|
24
24
|
*/
|
|
25
25
|
declare const ButtonGroup: import("react").ForwardRefExoticComponent<Omit<ButtonGroupProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
26
26
|
//#endregion
|
|
27
|
-
export { ButtonGroupProps as n, ButtonGroup as t };
|
|
28
|
-
//# sourceMappingURL=index-DBZ3eRsl.d.ts.map
|
|
27
|
+
export { ButtonGroupProps as n, ButtonGroup as t };
|
package/dist/index-DorCusfG.d.ts
CHANGED
|
@@ -36,5 +36,4 @@ type Color = (typeof colors)[number];
|
|
|
36
36
|
*/
|
|
37
37
|
declare const isColor: (value: unknown) => value is Color;
|
|
38
38
|
//#endregion
|
|
39
|
-
export { functionalColors as a, isNamedColor as c, colors as i, namedColors as l, FunctionalColor as n, isColor as o, NamedColor as r, isFunctionalColor as s, Color as t };
|
|
40
|
-
//# sourceMappingURL=index-DorCusfG.d.ts.map
|
|
39
|
+
export { functionalColors as a, isNamedColor as c, colors as i, namedColors as l, FunctionalColor as n, isColor as o, NamedColor as r, isFunctionalColor as s, Color as t };
|
package/dist/input.d.ts
CHANGED
|
@@ -68,7 +68,7 @@ type InputProps = Omit<InputHTMLAttributes<HTMLInputElement>, "autoComplete" | "
|
|
|
68
68
|
* />
|
|
69
69
|
* ```
|
|
70
70
|
*/
|
|
71
|
-
declare const Input: import("react").ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "
|
|
71
|
+
declare const Input: import("react").ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "autoComplete" | "type"> & WithAutoComplete & WithInputType & WithValidation & {
|
|
72
72
|
children?: import("react").ReactNode | undefined;
|
|
73
73
|
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
74
74
|
type InputCaptureProps = Omit<InputHTMLAttributes<HTMLInputElement>, "autoComplete" | "type"> & BaseProps;
|
|
@@ -86,7 +86,7 @@ type InputCaptureProps = Omit<InputHTMLAttributes<HTMLInputElement>, "autoComple
|
|
|
86
86
|
* </Input>
|
|
87
87
|
* ```
|
|
88
88
|
*/
|
|
89
|
-
declare const InputCapture: import("react").ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "
|
|
89
|
+
declare const InputCapture: import("react").ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "autoComplete" | "type"> & WithAutoComplete & WithInputType & WithValidation & import("react").RefAttributes<HTMLInputElement>>;
|
|
90
90
|
//#endregion
|
|
91
91
|
//#region src/components/input/password-input.d.ts
|
|
92
92
|
type PasswordInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, "autoComplete" | "type"> & WithValidation & WithAutoComplete & {
|
|
@@ -158,7 +158,7 @@ type PasswordInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, "autoCompl
|
|
|
158
158
|
* }
|
|
159
159
|
* ```
|
|
160
160
|
*/
|
|
161
|
-
declare const PasswordInput: import("react").ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "
|
|
161
|
+
declare const PasswordInput: import("react").ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "autoComplete" | "type"> & WithValidation & WithAutoComplete & {
|
|
162
162
|
/**
|
|
163
163
|
* Callback for when the visibility of the password value changes.
|
|
164
164
|
*/
|
|
@@ -187,5 +187,4 @@ declare const PasswordInput: import("react").ForwardRefExoticComponent<Omit<Inpu
|
|
|
187
187
|
*/
|
|
188
188
|
declare function isInput(value: unknown): value is HTMLInputElement;
|
|
189
189
|
//#endregion
|
|
190
|
-
export { type AutoComplete, Input, InputCapture, type InputCaptureProps, type InputProps, type InputType, PasswordInput, type PasswordInputProps, type Validation, type WithAutoComplete, type WithInputType, type WithValidation, isInput };
|
|
191
|
-
//# sourceMappingURL=input.d.ts.map
|
|
190
|
+
export { type AutoComplete, Input, InputCapture, type InputCaptureProps, type InputProps, type InputType, PasswordInput, type PasswordInputProps, type Validation, type WithAutoComplete, type WithInputType, type WithValidation, isInput };
|
package/dist/input.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-CBSnSC36.js";import{t}from"./icon-C8bYBIHW.js";import{t as n}from"./compose-refs-Cjf2gfB8.js";import{a as r,r as i}from"./validation-DCyx-ceH.js";import{t as a}from"./use-prefers-reduced-motion-CWIoFA6W.js";import{t as o}from"./is-input-CXmS0OFN.js";import{createContext as s,forwardRef as c,useContext as l,useEffect as u,useMemo as d,useRef as f,useState as p}from"react";import m from"clsx";import{jsx as h,jsxs as g}from"react/jsx-runtime";import{CheckCircleIcon as _}from"@phosphor-icons/react/CheckCircle";import{WarningIcon as v}from"@phosphor-icons/react/Warning";import{WarningDiamondIcon as y}from"@phosphor-icons/react/WarningDiamond";import{EyeIcon as b}from"@phosphor-icons/react/Eye";import{EyeClosedIcon as x}from"@phosphor-icons/react/EyeClosed";import{flushSync as S}from"react-dom";const C=c(({children:e,className:t,...n},r)=>{let i=!!e,a=f(null);return i?h(E,{className:t,forwardedRef:r,innerRef:a,...n,children:e}):h(E,{...n,className:t,forwardedRef:r,innerRef:a,children:h(w,{...n})})});C.displayName=`Input`;const w=c(({"aria-invalid":t,className:a,validation:o,...s},c)=>{let{"aria-invalid":u,forwardedRef:d,innerRef:f,validation:p,...m}=l(T),g=r(),{ariaInvalid:_,validation:v}=i({"aria-invalid":u??t,validation:p??o??g}),y={...m,...s,type:s.type??m.type??`text`};return h(`input`,{"aria-invalid":_,"data-slot":`input-capture`,"data-validation":v,className:e(`placeholder:text-placeholder min-w-0 flex-1 bg-transparent text-left autofill:shadow-[inset_0_0_0px_1000px_var(--color-blue-50)] focus:outline-hidden`,a),ref:n(c,d,f),...y})});w.displayName=`InputCapture`;const T=s({validation:void 0,innerRef:{current:null}}),E=({"aria-invalid":t,"aria-disabled":n,"data-slot":a=`input`,children:o,className:s,disabled:c,forwardedRef:l,innerRef:u,style:f,type:p,validation:m,..._})=>{let v=r(),{validation:y}=i({"aria-invalid":t,validation:m??v}),b=d(()=>({"aria-invalid":t,"aria-disabled":n,disabled:c,type:p,validation:m,..._,forwardedRef:l,innerRef:u}),[t,n,c,p,m,_,l,u]);return h(T.Provider,{value:b,children:g(`div`,{role:`none`,"data-slot":a,"data-disabled":(c??n)||void 0,"data-validation":y||void 0,className:e(`pointer-coarse:text-base h-9 text-sm`,`bg-form relative flex w-full items-center gap-1.5 rounded-md border px-3 py-2 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-within:outline-hidden focus-within:ring-4`,`data-disabled:opacity-50`,`has-[input:not(:first-child)]:ps-2.5 has-[input:not(:last-child)]:pe-2.5 [&>:not(input)]:shrink-0 [&_svg]:size-5`,`border-form text-strong focus-within:border-accent-600 focus-within:ring-focus-accent`,`data-validation-success:border-success-600 focus-within:data-validation-success:border-success-600 focus-within:data-validation-success:ring-focus-success`,`data-validation-warning:border-warning-600 focus-within:data-validation-warning:border-warning-600 focus-within:data-validation-warning:ring-focus-warning`,`data-validation-error:border-danger-600 focus-within:data-validation-error:border-danger-600 focus-within:data-validation-error:ring-focus-danger`,`autofill:shadow-[inset_0_0_0px_1000px_var(--color-blue-50)] has-autofill:bg-blue-50 has-autofill:[-webkit-text-fill-color:var(--text-color-strong)]`,s),onMouseDown:e=>{e.target!==u?.current&&e.preventDefault()},onClick:()=>{u?.current?.focus()},onKeyDown:()=>{u?.current!==document.activeElement&&u?.current?.focus()},style:f,children:[o,h(D,{name:_.name,validation:y})]})})};E.displayName=`InputContainer`;const D=({name:e,validation:n})=>{switch(n){case`error`:return g(`div`,{className:`text-danger-600 order-last select-none`,children:[h(`span`,{className:`sr-only`,children:m(`The value entered for the`,e,`input has failed validation.`)}),h(t,{svg:h(v,{"aria-hidden":!0,weight:`fill`})})]});case`success`:return h(`div`,{className:`text-success-600 order-last select-none`,children:h(t,{svg:h(_,{weight:`fill`})})});case`warning`:return h(`div`,{className:`text-warning-600 order-last select-none`,children:h(t,{svg:h(y,{weight:`fill`})})});default:return null}};D.displayName=`ValidationFeedback`;const O=c(({onValueVisibilityChange:e,showValue:n=!1,...r},i)=>{let[o,s]=p(n),c=o?`text`:`password`,l=o?b:x,d=f(null),m=f(null);return u(()=>{s(n)},[n]),g(C,{"data-slot":`password-input`,type:c,ref:i,...r,children:[h(w,{}),g(`button`,{type:`button`,tabIndex:-1,className:`text-body hover:text-strong ml-1 cursor-pointer bg-inherit p-0`,onClick:()=>{m.current&&=(m.current.cancel(),null);let t=!o;S(()=>{s(t)}),e?.(t);let n=d.current;n&&!a()&&(m.current=n.animate([{transform:`scaleY(0)`},{transform:`scaleY(1)`}],{duration:200,easing:`ease-out`}),m.current.onfinish=()=>{m.current=null})},children:[g(`span`,{className:`sr-only`,children:[`Turn password visibility `,o?`off`:`on`]}),h(t,{ref:d,svg:h(l,{"aria-hidden":!0})})]})]})});O.displayName=`PasswordInput`;export{C as Input,w as InputCapture,O as PasswordInput,o as isInput};
|
|
2
|
-
//# sourceMappingURL=input.js.map
|
|
1
|
+
import{t as e}from"./cx-CBSnSC36.js";import{t}from"./icon-C8bYBIHW.js";import{t as n}from"./compose-refs-Cjf2gfB8.js";import{a as r,r as i}from"./validation-DCyx-ceH.js";import{t as a}from"./use-prefers-reduced-motion-CWIoFA6W.js";import{t as o}from"./is-input-CXmS0OFN.js";import{createContext as s,forwardRef as c,useContext as l,useEffect as u,useMemo as d,useRef as f,useState as p}from"react";import m from"clsx";import{jsx as h,jsxs as g}from"react/jsx-runtime";import{CheckCircleIcon as _}from"@phosphor-icons/react/CheckCircle";import{WarningIcon as v}from"@phosphor-icons/react/Warning";import{WarningDiamondIcon as y}from"@phosphor-icons/react/WarningDiamond";import{EyeIcon as b}from"@phosphor-icons/react/Eye";import{EyeClosedIcon as x}from"@phosphor-icons/react/EyeClosed";import{flushSync as S}from"react-dom";const C=c(({children:e,className:t,...n},r)=>{let i=!!e,a=f(null);return i?h(E,{className:t,forwardedRef:r,innerRef:a,...n,children:e}):h(E,{...n,className:t,forwardedRef:r,innerRef:a,children:h(w,{...n})})});C.displayName=`Input`;const w=c(({"aria-invalid":t,className:a,validation:o,...s},c)=>{let{"aria-invalid":u,forwardedRef:d,innerRef:f,validation:p,...m}=l(T),g=r(),{ariaInvalid:_,validation:v}=i({"aria-invalid":u??t,validation:p??o??g}),y={...m,...s,type:s.type??m.type??`text`};return h(`input`,{"aria-invalid":_,"data-slot":`input-capture`,"data-validation":v,className:e(`placeholder:text-placeholder min-w-0 flex-1 bg-transparent text-left autofill:shadow-[inset_0_0_0px_1000px_var(--color-blue-50)] focus:outline-hidden`,a),ref:n(c,d,f),...y})});w.displayName=`InputCapture`;const T=s({validation:void 0,innerRef:{current:null}}),E=({"aria-invalid":t,"aria-disabled":n,"data-slot":a=`input`,children:o,className:s,disabled:c,forwardedRef:l,innerRef:u,style:f,type:p,validation:m,..._})=>{let v=r(),{validation:y}=i({"aria-invalid":t,validation:m??v}),b=d(()=>({"aria-invalid":t,"aria-disabled":n,disabled:c,type:p,validation:m,..._,forwardedRef:l,innerRef:u}),[t,n,c,p,m,_,l,u]);return h(T.Provider,{value:b,children:g(`div`,{role:`none`,"data-slot":a,"data-disabled":(c??n)||void 0,"data-validation":y||void 0,className:e(`pointer-coarse:text-base h-9 text-sm`,`bg-form relative flex w-full items-center gap-1.5 rounded-md border px-3 py-2 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-within:outline-hidden focus-within:ring-4`,`data-disabled:opacity-50`,`has-[input:not(:first-child)]:ps-2.5 has-[input:not(:last-child)]:pe-2.5 [&>:not(input)]:shrink-0 [&_svg]:size-5`,`border-form text-strong focus-within:border-accent-600 focus-within:ring-focus-accent`,`data-validation-success:border-success-600 focus-within:data-validation-success:border-success-600 focus-within:data-validation-success:ring-focus-success`,`data-validation-warning:border-warning-600 focus-within:data-validation-warning:border-warning-600 focus-within:data-validation-warning:ring-focus-warning`,`data-validation-error:border-danger-600 focus-within:data-validation-error:border-danger-600 focus-within:data-validation-error:ring-focus-danger`,`autofill:shadow-[inset_0_0_0px_1000px_var(--color-blue-50)] has-autofill:bg-blue-50 has-autofill:[-webkit-text-fill-color:var(--text-color-strong)]`,s),onMouseDown:e=>{e.target!==u?.current&&e.preventDefault()},onClick:()=>{u?.current?.focus()},onKeyDown:()=>{u?.current!==document.activeElement&&u?.current?.focus()},style:f,children:[o,h(D,{name:_.name,validation:y})]})})};E.displayName=`InputContainer`;const D=({name:e,validation:n})=>{switch(n){case`error`:return g(`div`,{className:`text-danger-600 order-last select-none`,children:[h(`span`,{className:`sr-only`,children:m(`The value entered for the`,e,`input has failed validation.`)}),h(t,{svg:h(v,{"aria-hidden":!0,weight:`fill`})})]});case`success`:return h(`div`,{className:`text-success-600 order-last select-none`,children:h(t,{svg:h(_,{weight:`fill`})})});case`warning`:return h(`div`,{className:`text-warning-600 order-last select-none`,children:h(t,{svg:h(y,{weight:`fill`})})});default:return null}};D.displayName=`ValidationFeedback`;const O=c(({onValueVisibilityChange:e,showValue:n=!1,...r},i)=>{let[o,s]=p(n),c=o?`text`:`password`,l=o?b:x,d=f(null),m=f(null);return u(()=>{s(n)},[n]),g(C,{"data-slot":`password-input`,type:c,ref:i,...r,children:[h(w,{}),g(`button`,{type:`button`,tabIndex:-1,className:`text-body hover:text-strong ml-1 cursor-pointer bg-inherit p-0`,onClick:()=>{m.current&&=(m.current.cancel(),null);let t=!o;S(()=>{s(t)}),e?.(t);let n=d.current;n&&!a()&&(m.current=n.animate([{transform:`scaleY(0)`},{transform:`scaleY(1)`}],{duration:200,easing:`ease-out`}),m.current.onfinish=()=>{m.current=null})},children:[g(`span`,{className:`sr-only`,children:[`Turn password visibility `,o?`off`:`on`]}),h(t,{ref:d,svg:h(l,{"aria-hidden":!0})})]})]})});O.displayName=`PasswordInput`;export{C as Input,w as InputCapture,O as PasswordInput,o as isInput};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
function e(e){return e!=null&&e instanceof HTMLInputElement}export{e as t};
|
|
2
|
-
//# sourceMappingURL=is-input-CXmS0OFN.js.map
|
|
1
|
+
function e(e){return e!=null&&e instanceof HTMLInputElement}export{e as t};
|
package/dist/kbd-Bv6tefdB.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-CBSnSC36.js";import{jsx as t}from"react/jsx-runtime";function n({children:n,className:r,...i}){return t(`kbd`,{"data-slot":`kbd`,className:e(`[font-kerning:normal] [font-variant-ligatures:common-ligatures_contextual]`,`appearance-none tabular-nums inline-grid place-items-center size-5 bg-neutral-500/15 px-1 rounded text-mono leading-none font-mono`,r),...i,children:n})}export{n as t};
|
|
2
|
-
//# sourceMappingURL=kbd-Bv6tefdB.js.map
|
|
1
|
+
import{t as e}from"./cx-CBSnSC36.js";import{jsx as t}from"react/jsx-runtime";function n({children:n,className:r,...i}){return t(`kbd`,{"data-slot":`kbd`,className:e(`[font-kerning:normal] [font-variant-ligatures:common-ligatures_contextual]`,`appearance-none tabular-nums inline-grid place-items-center size-5 bg-neutral-500/15 px-1 rounded text-mono leading-none font-mono`,r),...i,children:n})}export{n as t};
|
package/dist/kbd.d.ts
CHANGED
package/dist/label-DhIUmTN2.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-CBSnSC36.js";import{forwardRef as t}from"react";import{jsx as n}from"react/jsx-runtime";const r=t(({"aria-disabled":t,children:r,className:i,disabled:a,onMouseDown:o,...s},c)=>n(`label`,{"aria-disabled":a??t,"data-slot":`label`,className:e(`text-strong cursor-pointer text-sm peer-disabled:cursor-default has-disabled:cursor-default aria-disabled:cursor-default font-sans`,`[:where(&:not(:has(input,textarea,select,button,[contenteditable])))]:font-medium`,i),onMouseDown:e=>{e.target.closest(`button, input, select, textarea`)||(o?.(e),!e.defaultPrevented&&e.detail>1&&e.preventDefault())},ref:c,...s,children:r}));r.displayName=`Label`;export{r as t};
|
|
2
|
-
//# sourceMappingURL=label-DhIUmTN2.js.map
|
|
1
|
+
import{t as e}from"./cx-CBSnSC36.js";import{forwardRef as t}from"react";import{jsx as n}from"react/jsx-runtime";const r=t(({"aria-disabled":t,children:r,className:i,disabled:a,onMouseDown:o,...s},c)=>n(`label`,{"aria-disabled":a??t,"data-slot":`label`,className:e(`text-strong cursor-pointer text-sm peer-disabled:cursor-default has-disabled:cursor-default aria-disabled:cursor-default font-sans`,`[:where(&:not(:has(input,textarea,select,button,[contenteditable])))]:font-medium`,i),onMouseDown:e=>{e.target.closest(`button, input, select, textarea`)||(o?.(e),!e.defaultPrevented&&e.detail>1&&e.preventDefault())},ref:c,...s,children:r}));r.displayName=`Label`;export{r as t};
|
package/dist/label.d.ts
CHANGED
package/dist/llms.txt
CHANGED
package/dist/main.d.ts
CHANGED
package/dist/main.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-CBSnSC36.js";import{jsx as t}from"react/jsx-runtime";const n=({className:n,...r})=>t(`main`,{...r,"data-slot":`main`,id:`main`,tabIndex:-1,className:e(`focus:outline-hidden`,n)});n.displayName=`Main`;export{n as Main};
|
|
2
|
-
//# sourceMappingURL=main.js.map
|
|
1
|
+
import{t as e}from"./cx-CBSnSC36.js";import{jsx as t}from"react/jsx-runtime";const n=({className:n,...r})=>t(`main`,{...r,"data-slot":`main`,id:`main`,tabIndex:-1,className:e(`focus:outline-hidden`,n)});n.displayName=`Main`;export{n as Main};
|