@ngrok/mantle 0.10.1 → 0.10.2
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/badge.js +1 -1
- package/dist/button.js +1 -1
- package/dist/calendar.js +1 -1
- package/dist/chunk-BGJBYKS4.js +2 -0
- package/dist/chunk-BGJBYKS4.js.map +1 -0
- package/dist/{chunk-DK2VDJHL.js → chunk-E4ORUHXM.js} +2 -2
- package/dist/chunk-JTS7CKVJ.js +2 -0
- package/dist/chunk-JTS7CKVJ.js.map +1 -0
- package/dist/{chunk-47UGLBIG.js → chunk-LGKHTPYA.js} +2 -2
- package/dist/dialog.js +1 -1
- package/dist/icon.d.ts +8 -9
- package/dist/icon.js +1 -1
- package/dist/pagination.js +1 -1
- package/dist/sheet.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-6EMCH2HX.js +0 -2
- package/dist/chunk-6EMCH2HX.js.map +0 -1
- package/dist/chunk-ZOQ33WW5.js +0 -2
- package/dist/chunk-ZOQ33WW5.js.map +0 -1
- /package/dist/{chunk-DK2VDJHL.js.map → chunk-E4ORUHXM.js.map} +0 -0
- /package/dist/{chunk-47UGLBIG.js.map → chunk-LGKHTPYA.js.map} +0 -0
package/dist/badge.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
1
|
+
import{a as s}from"./chunk-JTS7CKVJ.js";import{a as c}from"./chunk-EW5CFGXT.js";import{Slot as f}from"@radix-ui/react-slot";import{Children as y,cloneElement as h,isValidElement as C}from"react";import n from"tiny-invariant";import{Fragment as N,jsx as o,jsxs as d}from"react/jsx-runtime";var k=({appearance:t,asChild:e=!1,children:l,className:m,color:i="neutral",icon:r,...g})=>{let u=B(i,t),b=A(i,t),p=c("inline-flex w-fit shrink-0 cursor-default items-center gap-1 rounded px-1.5 py-0.5 text-sm font-medium sm:text-xs",r&&"ps-1",u,b,m);if(e){let a=y.only(l);n(C(a),"When using `asChild`, Badge must be passed a single child as a JSX tag.");let x=a.props?.children;return o(f,{className:p,...g,children:h(a,{},d(N,{children:[r&&o(s,{className:"size-5 sm:size-4",svg:r}),x]}))})}return d("span",{className:p,...g,children:[r&&o(s,{className:"size-5 sm:size-4",svg:r}),l]})};var w={amber:"bg-amber-500/20",blue:"bg-blue-500/20",cyan:"bg-cyan-500/20",emerald:"bg-emerald-500/20",fuchsia:"bg-fuchsia-500/20",gray:"bg-gray-500/20",green:"bg-green-500/20",indigo:"bg-indigo-500/20",lime:"bg-lime-500/20",orange:"bg-orange-500/20",pink:"bg-pink-500/20",purple:"bg-purple-500/20",red:"bg-red-500/20",rose:"bg-rose-500/20",sky:"bg-sky-500/20",teal:"bg-teal-500/20",violet:"bg-violet-500/20",yellow:"bg-yellow-500/20",accent:"bg-accent-500/20",danger:"bg-danger-500/20",neutral:"bg-neutral-500/20",success:"bg-success-500/20",warning:"bg-warning-500/20"};function B(t,e){switch(e){case"muted":return w[t];default:n(!1,`Invalid appearance: ${String(e)}`)}}var v={amber:"text-amber-700",blue:"text-blue-700",cyan:"text-cyan-700",emerald:"text-emerald-700",fuchsia:"text-fuchsia-700",gray:"text-gray-700",green:"text-green-700",indigo:"text-indigo-700",lime:"text-lime-700",orange:"text-orange-700",pink:"text-pink-700",purple:"text-purple-700",red:"text-red-700",rose:"text-rose-700",sky:"text-sky-700",teal:"text-teal-700",violet:"text-violet-700",yellow:"text-yellow-700",accent:"text-accent-700",danger:"text-danger-700",neutral:"text-neutral-700",success:"text-success-700",warning:"text-warning-700"};function A(t,e){switch(e){case"muted":return v[t];default:n(!1,`Invalid appearance: ${String(e)}`)}}export{k as Badge};
|
|
2
2
|
//# sourceMappingURL=badge.js.map
|
package/dist/button.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as c}from"./chunk-VTEPKCRP.js";import{a as b}from"./chunk-
|
|
1
|
+
import{a as c}from"./chunk-VTEPKCRP.js";import{a as b}from"./chunk-E4ORUHXM.js";import{b as a}from"./chunk-LGKHTPYA.js";import"./chunk-4LSFAAZW.js";import"./chunk-RDMTCZPT.js";import"./chunk-BGJBYKS4.js";import"./chunk-JTS7CKVJ.js";import"./chunk-EW5CFGXT.js";export{a as Button,c as ButtonGroup,b as IconButton};
|
|
2
2
|
//# sourceMappingURL=button.js.map
|
package/dist/calendar.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as d}from"./chunk-
|
|
1
|
+
import{a as d}from"./chunk-LGKHTPYA.js";import"./chunk-4LSFAAZW.js";import"./chunk-RDMTCZPT.js";import"./chunk-BGJBYKS4.js";import"./chunk-JTS7CKVJ.js";import{a as e}from"./chunk-EW5CFGXT.js";import{CaretLeft as s}from"@phosphor-icons/react/dist/icons/CaretLeft";import{CaretRight as i}from"@phosphor-icons/react/dist/icons/CaretRight";import{DayPicker as c}from"react-day-picker";import{jsx as t}from"react/jsx-runtime";function r({className:o,classNames:n,showOutsideDays:l=!1,...a}){return t(c,{showOutsideDays:l,className:e("",o),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"flex items-center",nav_button:e(d({appearance:"ghost",priority:"neutral"}),"sm:h-7 sm:w-7 h-7 w-7"),nav_button_previous:"absolute left-0",nav_button_next:"absolute right-0",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-body w-7 text-[0.8rem] text-center font-normal",row:"flex w-full mt-1",cell:e("overflow-hidden text-center text-sm p-0 relative focus-within:relative focus-within:z-20 sm:h-7 sm:w-7 h-7 w-7 ",a.mode==="range"?"first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":""),day:"day size-full rounded-md [&:not([aria-selected],_[disabled])]:hover:bg-filled-accent/15",day_range_start:"day-range-start [&:not(.day-range-end)]:rounded-r-none",day_range_end:"day-range-end [&:not(.day-range-start)]:rounded-l-none",day_selected:"[&:not([disabled])]:bg-filled-accent text-on-filled [&:not([disabled])]:hover:bg-filled-accent",day_today:"[&:not([aria-selected],_[disabled])]:text-accent-600 font-medium [&:not([aria-selected],_[disabled])]:bg-filled-accent/10",day_outside:"day-outside aria-selected:text-on-filled opacity-50 text-muted",day_disabled:"text-muted opacity-50",day_range_middle:"day-range-middle [&:not([disabled])]:aria-selected:bg-filled-accent/15 aria-selected:text-strong rounded-none [&:not([disabled])]:aria-selected:hover:bg-filled-accent/25",day_hidden:"invisible",...n},components:{IconLeft:()=>t(s,{className:"h-4 w-4 shrink-0",weight:"bold"}),IconRight:()=>t(i,{className:"h-4 w-4 shrink-0",weight:"bold"})},...a})}r.displayName="Calendar";export{r as Calendar};
|
|
2
2
|
//# sourceMappingURL=calendar.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as o}from"./chunk-JTS7CKVJ.js";import{a as e}from"./chunk-EW5CFGXT.js";import{forwardRef as c}from"react";import{jsx as i}from"react/jsx-runtime";var f=c(({className:t,style:r,svg:p,...s},m)=>i(o,{ref:m,className:e("size-6 sm:size-5",t),style:r,svg:p,...s}));export{f as a};
|
|
2
|
+
//# sourceMappingURL=chunk-BGJBYKS4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/icon/icon.tsx"],"sourcesContent":["import { forwardRef, type ElementRef, type ReactNode } from \"react\";\nimport { cx } from \"../../utils/cx/cx.js\";\nimport { IconBase } from \"./_icon-base.js\";\nimport type { SvgAttributes } from \"./types.js\";\n\ntype IconProps = Omit<SvgAttributes, \"children\"> & {\n\t/**\n\t * A single SVG icon element.\n\t */\n\tsvg: ReactNode;\n};\n/**\n * Decorates an svg icon with automatic sizing styles.\n * Merges `className` selectors with the following order of precedence (last one wins):\n * 1. Icon base classes\n * 2. svg className\n * 3. Icon className\n */\nconst Icon = forwardRef<ElementRef<\"svg\">, IconProps>(({ className, style, svg, ...props }, ref) => (\n\t<IconBase ref={ref} className={cx(\"size-6 sm:size-5\", className)} style={style} svg={svg} {...props} />\n));\n\nexport {\n\t//,\n\tIcon,\n};\n\nexport type {\n\t//,\n\tIconProps,\n};\n"],"mappings":"gFAAA,OAAS,cAAAA,MAAmD,QAmB3D,cAAAC,MAAA,oBADD,IAAMC,EAAOC,EAAyC,CAAC,CAAE,UAAAC,EAAW,MAAAC,EAAO,IAAAC,EAAK,GAAGC,CAAM,EAAGC,IAC3FP,EAACQ,EAAA,CAAS,IAAKD,EAAK,UAAWE,EAAG,mBAAoBN,CAAS,EAAG,MAAOC,EAAO,IAAKC,EAAM,GAAGC,EAAO,CACrG","names":["forwardRef","jsx","Icon","forwardRef","className","style","svg","props","ref","IconBase","cx"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as l}from"./chunk-RDMTCZPT.js";import{a as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as l}from"./chunk-RDMTCZPT.js";import{a as o}from"./chunk-BGJBYKS4.js";import{a as d}from"./chunk-EW5CFGXT.js";import{CircleNotch as V}from"@phosphor-icons/react/CircleNotch";import{Slot as z}from"@radix-ui/react-slot";import{cva as C}from"class-variance-authority";import{Children as H,cloneElement as I,forwardRef as M,isValidElement as T}from"react";import{jsx as t,jsxs as A}from"react/jsx-runtime";var E=C("inline-flex shrink-0 cursor-pointer items-center justify-center rounded-[var(--icon-button-border-radius,0.375rem)] border focus-within:outline-none focus-visible:ring-4 disabled:cursor-default disabled:opacity-50",{variants:{appearance:{ghost:"text-strong focus-visible:ring-focus-accent not-disabled:hover:bg-neutral-500/10 not-disabled:hover:text-strong not-disabled:active:bg-neutral-500/15 not-disabled:active: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 not-disabled:active:border-neutral-400 not-disabled:active:bg-neutral-500/10 not-disabled:active:text-strong focus-visible:not-disabled:active:border-accent-600"},isLoading:{false:"",true:"opacity-50"},size:{xs:"size-7 sm:size-6",sm:"size-9 sm:size-7",md:"size-11 sm:size-9"}},defaultVariants:{appearance:"outlined",size:"md"}}),N=M(({"aria-disabled":c,appearance:u,asChild:b=!1,children:p,className:m,disabled:f,icon:v,isLoading:e=!1,label:h,size:n,type:g,...y},B)=>{let i=l(c??f??e),r=e?t(V,{className:"animate-spin"}):v,s={"aria-disabled":i,className:d("icon-button",E({appearance:u,isLoading:e,size:n}),m),"data-loading":e,"data-size":n,disabled:i,ref:B,...y};if(b){let a=H.only(p),x=T(a);return t(z,{...s,children:x&&I(a,{},t(o,{svg:r}))})}return A("button",{...s,type:g,children:[t("span",{className:"sr-only",children:h}),t(o,{svg:r})]})});N.displayName="IconButton";export{N as a};
|
|
2
|
+
//# sourceMappingURL=chunk-E4ORUHXM.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as t}from"./chunk-EW5CFGXT.js";import{Children as i,cloneElement as m,forwardRef as c,isValidElement as p}from"react";import l from"tiny-invariant";import{Fragment as f,jsx as g}from"react/jsx-runtime";var R=c(({className:s,style:o,svg:r,...n},a)=>{let e=i.only(r);return l(p(e),"Icon must be passed a single SVG icon as a JSX tag."),g(f,{children:m(e,{...n,className:t("shrink-0",e.props.className,s),style:{...e.props.style,...o},ref:a})})});export{R as a};
|
|
2
|
+
//# sourceMappingURL=chunk-JTS7CKVJ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/icon/_icon-base.tsx"],"sourcesContent":["import type { ElementRef, ReactElement, ReactNode } from \"react\";\nimport { Children, cloneElement, forwardRef, isValidElement } from \"react\";\nimport invariant from \"tiny-invariant\";\nimport { cx } from \"../../utils/cx/cx.js\";\nimport type { SvgAttributes } from \"./types.js\";\n\ntype IconBaseProps = Omit<SvgAttributes, \"children\"> & {\n\t/**\n\t * A single SVG icon element.\n\t */\n\tsvg: ReactNode;\n};\n\n/**\n * @private Internal component for Icon, should not be exported from mantle. Can be used in other mantle components if needed.\n * The main difference between Icon and IconBase is that IconBase does not apply any default sizing styles, only `shrink-0`.\n *\n * Decorates an svg icon with automatic sizing styles.\n * Merges `className` selectors with the following order of precedence (last one wins):\n * 1. Icon base classes\n * 2. svg className\n * 3. Icon className\n */\nconst IconBase = forwardRef<ElementRef<\"svg\">, IconBaseProps>(({ className, style, svg, ...props }, ref) => {\n\tconst icon = Children.only(svg) as ReactElement<SvgAttributes>;\n\tinvariant(isValidElement<SvgAttributes>(icon), \"Icon must be passed a single SVG icon as a JSX tag.\");\n\n\treturn (\n\t\t<>\n\t\t\t{cloneElement(icon, {\n\t\t\t\t...props,\n\t\t\t\tclassName: cx(\"shrink-0\", icon.props.className, className),\n\t\t\t\tstyle: { ...icon.props.style, ...style },\n\t\t\t\tref,\n\t\t\t})}\n\t\t</>\n\t);\n});\n\nexport {\n\t//,\n\tIconBase,\n};\n"],"mappings":"wCACA,OAAS,YAAAA,EAAU,gBAAAC,EAAc,cAAAC,EAAY,kBAAAC,MAAsB,QACnE,OAAOC,MAAe,iBA0BpB,mBAAAC,EAAA,OAAAC,MAAA,oBALF,IAAMC,EAAWC,EAA6C,CAAC,CAAE,UAAAC,EAAW,MAAAC,EAAO,IAAAC,EAAK,GAAGC,CAAM,EAAGC,IAAQ,CAC3G,IAAMC,EAAOC,EAAS,KAAKJ,CAAG,EAC9B,OAAAK,EAAUC,EAA8BH,CAAI,EAAG,qDAAqD,EAGnGR,EAAAD,EAAA,CACE,SAAAa,EAAaJ,EAAM,CACnB,GAAGF,EACH,UAAWO,EAAG,WAAYL,EAAK,MAAM,UAAWL,CAAS,EACzD,MAAO,CAAE,GAAGK,EAAK,MAAM,MAAO,GAAGJ,CAAM,EACvC,IAAAG,CACD,CAAC,EACF,CAEF,CAAC","names":["Children","cloneElement","forwardRef","isValidElement","invariant","Fragment","jsx","IconBase","forwardRef","className","style","svg","props","ref","icon","Children","invariant","isValidElement","cloneElement","cx"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as p}from"./chunk-RDMTCZPT.js";import{a as g}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as p}from"./chunk-RDMTCZPT.js";import{a as g}from"./chunk-BGJBYKS4.js";import{a as u}from"./chunk-EW5CFGXT.js";import{CircleNotch as H}from"@phosphor-icons/react/CircleNotch";import{Slot as M}from"@radix-ui/react-slot";import{cva as N}from"class-variance-authority";import f from"clsx";import{Children as T,cloneElement as E,forwardRef as I,isValidElement as L}from"react";import k from"tiny-invariant";import{jsx as t,jsxs as S}from"react/jsx-runtime";var w=N("inline-flex cursor-pointer items-center justify-center gap-1.5 whitespace-nowrap rounded-md text-base focus-within:outline-none focus-visible:ring-4 disabled:cursor-default disabled:opacity-50 sm:text-sm [&>*]:focus-within:outline-none",{variants:{appearance:{filled:"bg-filled-accent text-on-filled focus-visible:border-accent-600 focus-visible:ring-focus-accent not-disabled:hover:bg-filled-accent-hover not-disabled:active:bg-filled-accent-active h-11 border border-transparent px-3 font-medium sm:h-9",ghost:"text-accent-600 focus-visible:ring-focus-accent not-disabled:hover:bg-accent-500/10 not-disabled:hover:text-accent-700 not-disabled:active:bg-accent-500/15 not-disabled:active:text-accent-700 h-11 border border-transparent px-3 font-medium sm:h-9",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 not-disabled:active:border-accent-700 not-disabled:active:bg-accent-500/15 not-disabled:active:text-accent-700 h-11 border px-3 font-medium sm:h-9",link:"text-accent-600 focus-visible:ring-focus-accent not-disabled:hover:underline group border-transparent"},isLoading:{false:"",true:"opacity-50"},priority:{danger:"",default:"",neutral:""}},defaultVariants:{appearance:"outlined",isLoading:!1,priority:"default"},compoundVariants:[{appearance:"ghost",priority:"danger",class:"text-danger-600 focus-visible:ring-focus-danger not-disabled:hover:bg-danger-500/10 not-disabled:hover:text-danger-700 not-disabled:active:bg-danger-500/15 not-disabled:active:text-danger-700 border-transparent"},{appearance:"outlined",priority:"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 not-disabled:active:border-danger-700 not-disabled:active:bg-danger-500/15 not-disabled:active:text-danger-700"},{appearance:"filled",priority:"danger",class:"bg-filled-danger focus-visible:border-danger-600 focus-visible:ring-focus-danger not-disabled:hover:bg-filled-danger-hover not-disabled:active:bg-filled-danger-active border-transparent"},{appearance:"link",priority:"danger",class:"text-danger-600 focus-visible:ring-focus-danger"},{appearance:"ghost",priority:"neutral",class:"text-strong focus-visible:ring-focus-accent not-disabled:hover:bg-neutral-500/10 not-disabled:hover:text-strong not-disabled:active:bg-neutral-500/15 not-disabled:active:text-strong border-transparent"},{appearance:"outlined",priority:"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 not-disabled:active:border-neutral-400 not-disabled:active:bg-neutral-500/10 not-disabled:active:text-strong focus-visible:not-disabled:active:border-accent-600"},{appearance:"filled",priority:"neutral",class:"bg-filled-neutral focus-visible:ring-focus-neutral not-disabled:hover:bg-filled-neutral-hover not-disabled:active:bg-filled-neutral-active border-transparent focus-visible:border-neutral-600"},{appearance:"link",priority:"neutral",class:"text-strong focus-visible:ring-focus-accent"}]}),A=I(({"aria-disabled":i,appearance:e="outlined",asChild:n,children:r,className:m,disabled:h,icon:x,iconPlacement:a="start",isLoading:o=!1,priority:y="default",type:B,...P},C)=>{let l=p(i??h??o),s=o?t(H,{className:"animate-spin"}):x,c=s&&e!=="link",b={"aria-disabled":l,className:u(w({appearance:e,priority:y,isLoading:o}),c&&a==="start"&&"ps-2.5",c&&a==="end"&&"pe-2.5",m),"data-loading":o,disabled:l,ref:C,...P};if(n){let d=T.only(r);k(L(d),"When using `asChild`, Button must be passed a single child as a JSX tag.");let V=d.props?.children;return t(M,{...b,children:E(d,{},t(v,{appearance:e,icon:s,iconPlacement:a,children:V}))})}return t("button",{...b,type:B,children:t(v,{appearance:e,icon:s,iconPlacement:a,children:r})})});A.displayName="Button";var v=({appearance:i,children:e,icon:n,iconPlacement:r})=>S("span",{className:f("inline-flex items-center gap-1.5 focus-within:outline-none focus-visible:outline-none",i==="link"&&"not-disabled:group-hover:underline"),children:[n&&t(g,{svg:n,className:f(r==="end"&&"order-last")}),e]});export{w as a,A as b};
|
|
2
|
+
//# sourceMappingURL=chunk-LGKHTPYA.js.map
|
package/dist/dialog.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as m}from"./chunk-
|
|
1
|
+
import{a as m}from"./chunk-E4ORUHXM.js";import"./chunk-4LSFAAZW.js";import"./chunk-RDMTCZPT.js";import"./chunk-BGJBYKS4.js";import"./chunk-JTS7CKVJ.js";import{a as l}from"./chunk-EW5CFGXT.js";import{X as u}from"@phosphor-icons/react/X";import*as e from"@radix-ui/react-dialog";import{forwardRef as r}from"react";import{jsx as i,jsxs as N}from"react/jsx-runtime";var P=e.Root,x=e.Trigger,g=e.Portal,C=e.Close,s=r(({className:o,...t},a)=>i(e.Overlay,{ref:a,className:l("bg-overlay data-state-closed:animate-out data-state-closed:fade-out-0 data-state-open:animate-in data-state-open:fade-in-0 fixed inset-0 z-50 backdrop-blur-sm",o),...t}));s.displayName=e.Overlay.displayName;var d=r(({className:o,children:t,...a},n)=>N(g,{children:[i(s,{}),i("div",{className:"fixed inset-4 z-50 flex items-center justify-center",children:i(e.Content,{className:l("flex max-h-full w-full max-w-lg flex-1 flex-col","outline-none focus-within:outline-none","border-dialog bg-dialog rounded-xl border shadow-lg transition-transform duration-200","data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 data-state-open:animate-in data-state-open:fade-in-0 data-state-open:zoom-in-95",o),ref:n,...a,children:t})})]}));d.displayName=e.Content.displayName;var p=({className:o,children:t,...a})=>i("div",{className:l("border-dialog-muted text-strong relative flex shrink-0 items-center justify-between gap-2 border-b px-6 py-4","has-[.icon-button]:pr-4",o),...a,children:t});p.displayName="DialogHeader";var b=({size:o="md",type:t="button",label:a="Close Dialog",appearance:n="ghost",...y})=>i(e.Close,{asChild:!0,children:i(m,{appearance:n,icon:i(u,{}),label:a,size:o,type:t,...y})}),D=({className:o,...t})=>i("div",{className:l("scrollbar text-body flex-1 overflow-y-auto p-6",o),...t});D.displayName="DialogBody";var c=({className:o,...t})=>i("div",{className:l("border-dialog-muted flex shrink-0 flex-row-reverse gap-2 border-t px-6 py-4",o),...t});c.displayName="DialogFooter";var f=r(({className:o,...t},a)=>i(e.Title,{ref:a,className:l("text-strong truncate text-lg font-medium",o),...t}));f.displayName=e.Title.displayName;var v=r(({className:o,...t},a)=>i(e.Description,{ref:a,className:l("text-muted",o),...t}));v.displayName=e.Description.displayName;export{P as Dialog,D as DialogBody,C as DialogClose,b as DialogCloseIconButton,d as DialogContent,v as DialogDescription,c as DialogFooter,p as DialogHeader,s as DialogOverlay,g as DialogPortal,f as DialogTitle,x as DialogTrigger};
|
|
2
2
|
//# sourceMappingURL=dialog.js.map
|
package/dist/icon.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import {
|
|
3
|
-
import { W as WithStyleProps } from './with-style-props-VnLWm0Yd.js';
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
4
3
|
|
|
5
|
-
type
|
|
4
|
+
type SvgAttributes = ComponentProps<"svg"> & {
|
|
5
|
+
focusable?: "true" | "false";
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
type IconProps = Omit<SvgAttributes, "children"> & {
|
|
6
9
|
/**
|
|
7
10
|
* A single SVG icon element.
|
|
8
11
|
*/
|
|
@@ -15,10 +18,6 @@ type IconProps = WithStyleProps & {
|
|
|
15
18
|
* 2. svg className
|
|
16
19
|
* 3. Icon className
|
|
17
20
|
*/
|
|
18
|
-
declare const Icon:
|
|
19
|
-
|
|
20
|
-
type SvgAttributes = HTMLAttributes<SVGElement> & {
|
|
21
|
-
focusable?: "true" | "false";
|
|
22
|
-
};
|
|
21
|
+
declare const Icon: react.ForwardRefExoticComponent<Omit<IconProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
|
|
23
22
|
|
|
24
23
|
export { Icon, type IconProps, type SvgAttributes };
|
package/dist/icon.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-BGJBYKS4.js";import"./chunk-JTS7CKVJ.js";import"./chunk-EW5CFGXT.js";export{a as Icon};
|
|
2
2
|
//# sourceMappingURL=icon.js.map
|
package/dist/pagination.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as b,c as v,d as x,e as y,g as h}from"./chunk-E6LNHWJ3.js";import{b as z}from"./chunk-CXQLUXDJ.js";import{a as d}from"./chunk-VTEPKCRP.js";import{a as m}from"./chunk-
|
|
1
|
+
import{a as b,c as v,d as x,e as y,g as h}from"./chunk-E6LNHWJ3.js";import{b as z}from"./chunk-CXQLUXDJ.js";import{a as d}from"./chunk-VTEPKCRP.js";import{a as m}from"./chunk-E4ORUHXM.js";import"./chunk-LGKHTPYA.js";import"./chunk-4LSFAAZW.js";import"./chunk-RDMTCZPT.js";import"./chunk-BGJBYKS4.js";import"./chunk-JTS7CKVJ.js";import"./chunk-5E73VWJX.js";import{a as p}from"./chunk-EW5CFGXT.js";import{CaretLeft as j}from"@phosphor-icons/react/dist/icons/CaretLeft";import{CaretRight as k}from"@phosphor-icons/react/dist/icons/CaretRight";import{Slot as A}from"@radix-ui/react-slot";import{createContext as F,forwardRef as f,useContext as N,useState as W}from"react";import P from"tiny-invariant";import{jsx as s,jsxs as l}from"react/jsx-runtime";var c=F(void 0),O=f(({className:n,children:o,defaultPageSize:a,...e},i)=>{let[t,r]=W(a);return s(c.Provider,{value:{defaultPageSize:a,pageSize:t,setPageSize:r},children:s("div",{className:p("inline-flex items-center justify-between gap-2",n),ref:i,...e,children:o})})});O.displayName="CursorPagination";var B=f(({hasNextPage:n,hasPreviousPage:o,onNextPage:a,onPreviousPage:e,...i},t)=>l(d,{appearance:"panel",ref:t,...i,children:[s(m,{appearance:"ghost",disabled:!o,icon:s(j,{}),label:"Previous page",onClick:e,size:"sm",type:"button"}),s(z,{orientation:"vertical",className:"min-h-5"}),s(m,{appearance:"ghost",disabled:!n,icon:s(k,{}),label:"Next page",onClick:a,size:"sm",type:"button"})]}));B.displayName="CursorButtons";var $=[5,10,20,50,100],T=f(({className:n,pageSizes:o=$,onChangePageSize:a,...e},i)=>{let t=N(c);return P(t,"CursorPageSizeSelect must be used as a child of a CursorPagination component"),P(o.includes(t.defaultPageSize),"CursorPagination.defaultPageSize must be included in CursorPageSizeSelect.pageSizes"),P(o.includes(t.pageSize),"CursorPagination.pageSize must be included in CursorPageSizeSelect.pageSizes"),l(b,{defaultValue:`${t.pageSize}`,onChange:r=>{let g=Number.parseInt(r,10);Number.isNaN(g)&&(g=t.defaultPageSize),t.setPageSize(g),a?.(g)},children:[s(x,{ref:i,className:p("w-auto min-w-36",n),value:t.pageSize,...e,children:s(v,{})}),s(y,{width:"trigger",children:o.map(r=>l(h,{value:`${r}`,children:[r," per page"]},r))})]})});T.displayName="CursorPageSizeSelect";function D({asChild:n=!1,className:o,...a}){let e=N(c);return P(e,"CursorPageSizeValue must be used as a child of a CursorPagination component"),l(n?A:"span",{className:p("text-muted text-sm font-normal",o),...a,children:[e.pageSize," per page"]})}import{useEffect as V,useState as w}from"react";function H({listSize:n,pageSize:o}){let[a,e]=w(1),[i,t]=w(o);V(()=>{t(o),e(1)},[o]),V(()=>{e(1)},[n]);let r=Math.ceil(n/i),g=(a-1)*i,S=a>1,C=a<r;function M(u){let U=Math.max(1,Math.min(u,r));e(U)}function E(){C&&e(u=>Math.min(u+1,r))}function R(){S&&e(u=>Math.max(u-1,1))}function G(u){t(u),e(1)}function I(){e(r)}function L(){e(1)}return{currentPage:a,goToFirstPage:L,goToLastPage:I,goToPage:M,hasNextPage:C,hasPreviousPage:S,nextPage:E,offset:g,pageSize:i,previousPage:R,setPageSize:G,totalPages:r}}export{B as CursorButtons,T as CursorPageSizeSelect,D as CursorPageSizeValue,O as CursorPagination,H as useOffsetPagination};
|
|
2
2
|
//# sourceMappingURL=pagination.js.map
|
package/dist/sheet.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as d}from"./chunk-
|
|
1
|
+
import{a as d}from"./chunk-E4ORUHXM.js";import"./chunk-4LSFAAZW.js";import"./chunk-RDMTCZPT.js";import"./chunk-BGJBYKS4.js";import"./chunk-JTS7CKVJ.js";import{a}from"./chunk-EW5CFGXT.js";import{X as v}from"@phosphor-icons/react/X";import*as e from"@radix-ui/react-dialog";import{cva as y}from"class-variance-authority";import{forwardRef as n}from"react";import{jsx as r,jsxs as H}from"react/jsx-runtime";var P=e.Root,b=e.Trigger,g=e.Close,p=e.Portal,m=n(({className:t,...o},i)=>r(e.Overlay,{className:a("bg-overlay data-state-closed:animate-out data-state-closed:fade-out-0 data-state-open:animate-in data-state-open:fade-in-0 fixed inset-0 z-40 backdrop-blur-sm",t),...o,ref:i}));m.displayName=e.Overlay.displayName;var C=y("bg-dialog data-state-closed:duration-100 data-state-closed:animate-out data-state-open:duration-100 data-state-open:animate-in fixed z-40 flex flex-col shadow-lg outline-none transition ease-in-out focus-within:outline-none",{variants:{side:{top:"border-dialog data-state-closed:slide-out-to-top data-state-open:slide-in-from-top inset-x-0 top-0 border-b",bottom:"border-dialog data-state-closed:slide-out-to-bottom data-state-open:slide-in-from-bottom inset-x-0 bottom-0 border-t",left:"border-dialog data-state-closed:slide-out-to-left data-state-open:slide-in-from-left inset-y-0 left-0 h-full w-full border-r sm:max-w-[30rem]",right:"border-dialog data-state-closed:slide-out-to-right data-state-open:slide-in-from-right inset-y-0 right-0 h-full w-full border-l sm:max-w-[30rem]"}},defaultVariants:{side:"right"}}),h=n(({side:t="right",className:o,children:i,...s},l)=>H(p,{children:[r(m,{}),r(e.Content,{ref:l,className:a(C({side:t}),o),...s,children:i})]}));h.displayName=e.Content.displayName;var x=({size:t="md",type:o="button",label:i="Close Sheet",appearance:s="ghost",...l})=>r(e.Close,{asChild:!0,children:r(d,{appearance:s,icon:r(v,{}),label:i,size:t,type:o,...l})}),T=({className:t,...o})=>r("div",{className:a("scrollbar text-body flex-1 overflow-y-auto p-6",t),...o}),N=({className:t,...o})=>r("div",{className:a("border-dialog-muted flex shrink-0 flex-col gap-2 border-b py-4 pl-6 pr-4","has-[.icon-button]:pr-4",t),...o}),R=({className:t,...o})=>r("div",{className:a("border-dialog-muted flex shrink-0 justify-end gap-2 border-t px-6 py-2.5",t),...o}),f=n(({className:t,...o},i)=>r(e.Title,{ref:i,className:a("text-strong flex-1 truncate text-lg font-medium",t),...o}));f.displayName=e.Title.displayName;var c=n(({children:t,className:o,...i},s)=>r("div",{className:a("flex items-center justify-between gap-2",o),...i,ref:s,children:t}));c.displayName="SheetTitleGroup";var S=n(({className:t,...o},i)=>r(e.Description,{ref:i,className:a("text-body text-sm",t),...o}));S.displayName=e.Description.displayName;var u=n(({children:t,className:o,...i},s)=>r("div",{className:a("flex h-full items-center gap-2",o),...i,ref:s,children:t}));u.displayName="SheetActions";export{P as Sheet,u as SheetActions,T as SheetBody,g as SheetClose,x as SheetCloseIconButton,h as SheetContent,S as SheetDescription,R as SheetFooter,N as SheetHeader,m as SheetOverlay,p as SheetPortal,f as SheetTitle,c as SheetTitleGroup,b as SheetTrigger};
|
|
2
2
|
//# sourceMappingURL=sheet.js.map
|
package/package.json
CHANGED
package/dist/chunk-6EMCH2HX.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/icon/icon.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport type { WithStyleProps } from \"../../types/with-style-props.js\";\nimport { cx } from \"../../utils/cx/cx.js\";\nimport { IconBase } from \"./_icon-base.js\";\n\ntype IconProps = WithStyleProps & {\n\t/**\n\t * A single SVG icon element.\n\t */\n\tsvg: ReactNode;\n};\n/**\n * Decorates an svg icon with automatic sizing styles.\n * Merges `className` selectors with the following order of precedence (last one wins):\n * 1. Icon base classes\n * 2. svg className\n * 3. Icon className\n */\nconst Icon = ({ className, style, svg }: IconProps) => (\n\t<IconBase className={cx(\"size-6 sm:size-5\", className)} style={style} svg={svg} />\n);\n\nexport { Icon };\nexport type { IconProps };\n"],"mappings":"gFAmBC,cAAAA,MAAA,oBADD,IAAMC,EAAO,CAAC,CAAE,UAAAC,EAAW,MAAAC,EAAO,IAAAC,CAAI,IACrCJ,EAACK,EAAA,CAAS,UAAWC,EAAG,mBAAoBJ,CAAS,EAAG,MAAOC,EAAO,IAAKC,EAAK","names":["jsx","Icon","className","style","svg","IconBase","cx"]}
|
package/dist/chunk-ZOQ33WW5.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./chunk-EW5CFGXT.js";import{Children as p,cloneElement as a,isValidElement as i}from"react";import n from"tiny-invariant";import{Fragment as m,jsx as c}from"react/jsx-runtime";var S=({className:s,style:o,svg:r})=>{let t=p.only(r);return n(i(t),"Icon must be passed a single SVG icon as a JSX tag."),c(m,{children:a(t,{className:e("shrink-0",t.props.className,s),style:{...t.props.style,...o}})})};export{S as a};
|
|
2
|
-
//# sourceMappingURL=chunk-ZOQ33WW5.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/icon/_icon-base.tsx"],"sourcesContent":["import type { ReactElement, ReactNode } from \"react\";\nimport { Children, cloneElement, isValidElement } from \"react\";\nimport invariant from \"tiny-invariant\";\nimport type { WithStyleProps } from \"../../types/with-style-props.js\";\nimport { cx } from \"../../utils/cx/cx.js\";\nimport type { SvgAttributes } from \"./types.js\";\n\ntype IconBaseProps = WithStyleProps & {\n\t/**\n\t * A single SVG icon element.\n\t */\n\tsvg: ReactNode;\n};\n\n/**\n * @private Internal component for Icon, should not be exported from mantle. Can be used in other mantle components if needed.\n * The main difference between Icon and IconBase is that IconBase does not apply any default sizing styles, only `shrink-0`.\n *\n * Decorates an svg icon with automatic sizing styles.\n * Merges `className` selectors with the following order of precedence (last one wins):\n * 1. Icon base classes\n * 2. svg className\n * 3. Icon className\n */\nconst IconBase = ({ className, style, svg }: IconBaseProps) => {\n\tconst icon = Children.only(svg) as ReactElement;\n\tinvariant(isValidElement<SvgAttributes>(icon), \"Icon must be passed a single SVG icon as a JSX tag.\");\n\n\treturn (\n\t\t<>\n\t\t\t{cloneElement(icon, {\n\t\t\t\tclassName: cx(\"shrink-0\", icon.props.className, className),\n\t\t\t\tstyle: { ...icon.props.style, ...style },\n\t\t\t})}\n\t\t</>\n\t);\n};\n\nexport { IconBase };\n"],"mappings":"wCACA,OAAS,YAAAA,EAAU,gBAAAC,EAAc,kBAAAC,MAAsB,QACvD,OAAOC,MAAe,iBA2BpB,mBAAAC,EAAA,OAAAC,MAAA,oBALF,IAAMC,EAAW,CAAC,CAAE,UAAAC,EAAW,MAAAC,EAAO,IAAAC,CAAI,IAAqB,CAC9D,IAAMC,EAAOC,EAAS,KAAKF,CAAG,EAC9B,OAAAG,EAAUC,EAA8BH,CAAI,EAAG,qDAAqD,EAGnGL,EAAAD,EAAA,CACE,SAAAU,EAAaJ,EAAM,CACnB,UAAWK,EAAG,WAAYL,EAAK,MAAM,UAAWH,CAAS,EACzD,MAAO,CAAE,GAAGG,EAAK,MAAM,MAAO,GAAGF,CAAM,CACxC,CAAC,EACF,CAEF","names":["Children","cloneElement","isValidElement","invariant","Fragment","jsx","IconBase","className","style","svg","icon","Children","invariant","isValidElement","cloneElement","cx"]}
|
|
File without changes
|
|
File without changes
|