@ngrok/mantle 0.88.0 → 0.89.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accordion.d.ts +10 -9
- package/dist/accordion.js +1 -1
- package/dist/agent.json +2 -1
- package/dist/{alert-DCVfviBx.d.ts → alert-BzPDUaU7.d.ts} +16 -15
- package/dist/alert-CZYYlx9q.js +1 -0
- package/dist/alert-center.d.ts +7 -7
- package/dist/alert-center.js +1 -1
- package/dist/alert-dialog.d.ts +17 -16
- package/dist/alert-dialog.js +1 -1
- package/dist/alert-vfeV_hso.js +1 -0
- package/dist/alert.d.ts +1 -1
- package/dist/alert.js +1 -1
- package/dist/anchor-CgcbWEUs.js +1 -0
- package/dist/anchor.js +1 -1
- package/dist/app-layout.d.ts +1128 -45
- package/dist/app-layout.js +1 -1
- package/dist/area-chart.d.ts +41 -18
- package/dist/area-chart.js +1 -1
- package/dist/avatar.js +1 -1
- package/dist/badge.d.ts +3 -2
- package/dist/badge.js +1 -1
- package/dist/bar-chart.d.ts +37 -13
- package/dist/bar-chart.js +1 -1
- package/dist/breadcrumb.js +1 -1
- package/dist/browser-only.js +1 -1
- package/dist/button-69InNC_m.js +1 -0
- package/dist/button-BMfUxs_j.js +1 -0
- package/dist/{button-DO53OA70.d.ts → button-CHoYpOzx.d.ts} +5 -4
- package/dist/{button-B52_vczK.js → button-D8rr-1AB.js} +1 -1
- package/dist/{button-crUf0hbR.d.ts → button-DL7V4bzW.d.ts} +5 -4
- package/dist/button-b2HKEIE2.js +1 -0
- package/dist/{button-B5i9n7Qp.d.ts → button-mzUR1U0Y.d.ts} +5 -4
- package/dist/button.d.ts +3 -3
- package/dist/button.js +1 -1
- package/dist/calendar.d.ts +3 -2
- package/dist/calendar.js +1 -1
- package/dist/card.d.ts +8 -7
- package/dist/card.js +1 -1
- package/dist/centered-layout.js +1 -1
- package/dist/{chart-DgaWVBqi.d.ts → chart-23KQ1ZNO.d.ts} +128 -62
- package/dist/chart-BRkJfptA.js +2 -0
- package/dist/checkbox-C3N2afhB.js +1 -0
- package/dist/checkbox.d.ts +3 -2
- package/dist/checkbox.js +1 -1
- package/dist/{choice-PESu-9s8.d.ts → choice-BCiyqLgO.d.ts} +12 -11
- package/dist/choice-DQmecLfy.js +1 -0
- package/dist/choice.d.ts +1 -1
- package/dist/choice.js +1 -1
- package/dist/code-block-4Esx_gV-.js +12 -0
- package/dist/code-block.d.ts +17 -16
- package/dist/code-block.js +6 -6
- package/dist/code-block_highlight-utils.js +1 -1
- package/dist/code.d.ts +2 -1
- package/dist/code.js +1 -1
- package/dist/combobox.d.ts +15 -14
- package/dist/combobox.js +1 -1
- package/dist/command.d.ts +13 -13
- package/dist/command.js +1 -1
- package/dist/cx-CK7o_rVv.js +1 -0
- package/dist/cx.js +1 -1
- package/dist/data-table.d.ts +32 -31
- package/dist/data-table.js +1 -1
- package/dist/description-list.d.ts +6 -6
- package/dist/description-list.js +1 -1
- package/dist/dialog-BDzapPLR.js +1 -0
- package/dist/{dialog-DXpqpdJj.d.ts → dialog-DQdeqvq-.d.ts} +28 -15
- package/dist/dialog.d.ts +1 -1
- package/dist/dialog.js +1 -1
- package/dist/dropdown-menu-CWUzGFgf.d.ts +1 -0
- package/dist/{dropdown-menu-BloQKE_y.d.ts → dropdown-menu-CpRsyt_F.d.ts} +17 -17
- package/dist/dropdown-menu-CutWQ0bl.js +1 -0
- package/dist/dropdown-menu.d.ts +2 -2
- package/dist/dropdown-menu.js +1 -1
- package/dist/empty.d.ts +7 -6
- package/dist/empty.js +1 -1
- package/dist/field.d.ts +16 -15
- package/dist/field.js +1 -1
- package/dist/flag.d.ts +3 -2
- package/dist/flag.js +1 -1
- package/dist/hooks.js +1 -1
- package/dist/hover-card.d.ts +5 -4
- package/dist/hover-card.js +1 -1
- package/dist/icon-BudQMD2S.js +1 -0
- package/dist/icon-kK0c-POG.js +1 -0
- package/dist/{icon-w0HUe7tr.d.ts → icon-r2NvfTWW.d.ts} +3 -2
- package/dist/{icon-BmJ57Tgh.d.ts → icon-ucVgZeXn.d.ts} +3 -2
- package/dist/icon.d.ts +2 -2
- package/dist/icon.js +1 -1
- package/dist/icons-BMZnm4hM.js +1 -0
- package/dist/{icons-Bu-2boul.js → icons-CH3tD_wq.js} +1 -1
- package/dist/icons-CSwTVV2m.js +1 -0
- package/dist/icons.js +1 -1
- package/dist/in-view-Dxv_GrUU.js +1 -0
- package/dist/input-D_DjD9lT.js +1 -0
- package/dist/{input-DpnC3Xgj.d.ts → input-bbB1tC0h.d.ts} +3 -2
- package/dist/input.d.ts +5 -4
- package/dist/input.js +1 -1
- package/dist/kbd-CLHsJ99p.js +1 -0
- package/dist/kbd.d.ts +2 -1
- package/dist/kbd.js +1 -1
- package/dist/label-5T8i7I4X.js +1 -0
- package/dist/{label-Bnfe9YJ6.d.ts → label-C-KbNls8.d.ts} +3 -2
- package/dist/label.d.ts +1 -1
- package/dist/label.js +1 -1
- package/dist/{layer-container-R7aux3n8.js → layer-container-DLf-6eBz.js} +1 -1
- package/dist/layer-container.js +1 -1
- package/dist/line-chart.d.ts +40 -15
- package/dist/line-chart.js +1 -1
- package/dist/list-DOVZoz9t.js +1 -0
- package/dist/list.d.ts +3 -2
- package/dist/list.js +1 -1
- package/dist/live-region-DQ1QLv3L.js +1 -0
- package/dist/live-region.d.ts +3 -2
- package/dist/live-region.js +1 -1
- package/dist/llms.txt +2 -1
- package/dist/{main-Dv2zuT_b.js → main-CC1L9IsH.js} +1 -1
- package/dist/main.js +1 -1
- package/dist/mantle.css +3 -0
- package/dist/media-object.js +1 -1
- package/dist/multi-select.d.ts +23 -22
- package/dist/multi-select.js +1 -1
- package/dist/otp-input.d.ts +9 -8
- package/dist/otp-input.js +1 -1
- package/dist/pagination.d.ts +9 -8
- package/dist/pagination.js +1 -1
- package/dist/{popover-Cco1nw8I.d.ts → popover-Dvls7-j4.d.ts} +5 -4
- package/dist/popover-oQDUvcZ2.js +1 -0
- package/dist/popover.d.ts +1 -1
- package/dist/popover.js +1 -1
- package/dist/primitive-B-6XILB2.js +1 -0
- package/dist/progress.d.ts +9 -8
- package/dist/progress.js +1 -1
- package/dist/qr-code.d.ts +9 -8
- package/dist/qr-code.js +1 -1
- package/dist/radio-group.d.ts +19 -18
- package/dist/radio-group.js +1 -1
- package/dist/sandbar.d.ts +7 -7
- package/dist/sandbar.js +1 -1
- package/dist/{sandboxed-on-click-BLvvSqOP.js → sandboxed-on-click-C7pPu-2M.js} +1 -1
- package/dist/sandboxed-on-click.js +1 -1
- package/dist/scatter-plot.d.ts +39 -14
- package/dist/scatter-plot.js +1 -1
- package/dist/{select-BITJP7I5.d.ts → select-CxXb3aiC.d.ts} +3 -3
- package/dist/select-DcL0-duV.js +1 -0
- package/dist/select.d.ts +1 -1
- package/dist/select.js +1 -1
- package/dist/selectable-list.d.ts +16 -15
- package/dist/selectable-list.js +1 -1
- package/dist/separator-DvPe27fH.js +1 -0
- package/dist/{separator-Bo4nY_3M.d.ts → separator-HzGvuD0B.d.ts} +4 -3
- package/dist/separator.d.ts +1 -1
- package/dist/separator.js +1 -1
- package/dist/sheet-DND_KjmS.js +1 -0
- package/dist/sheet.d.ts +13 -12
- package/dist/sheet.js +1 -1
- package/dist/sidebar.d.ts +147 -93
- package/dist/sidebar.js +1 -1
- package/dist/skeleton-zfqoDAxT.js +1 -0
- package/dist/skeleton.d.ts +3 -2
- package/dist/skeleton.js +1 -1
- package/dist/skip-to-main-link.js +1 -1
- package/dist/slider.d.ts +3 -2
- package/dist/slider.js +1 -1
- package/dist/{slot-BsvE2ntj.js → slot-DdYN1L1C.js} +1 -1
- package/dist/{slot-DdgxmuI5.d.ts → slot-Q996Hqk9.d.ts} +1 -1
- package/dist/slot.d.ts +1 -1
- package/dist/slot.js +1 -1
- package/dist/split-button.d.ts +6 -5
- package/dist/split-button.js +1 -1
- package/dist/switch.d.ts +3 -2
- package/dist/switch.js +1 -1
- package/dist/{table-DEI-qvSC.d.ts → table-BhzITa19.d.ts} +10 -9
- package/dist/table-DBbKqOVq.js +1 -0
- package/dist/table.d.ts +1 -1
- package/dist/table.js +1 -1
- package/dist/tabs.d.ts +2 -2
- package/dist/tabs.js +1 -1
- package/dist/text-area.d.ts +3 -2
- package/dist/text-area.js +1 -1
- package/dist/theme-BlCZHClJ.js +1 -0
- package/dist/theme-switcher.d.ts +3 -3
- package/dist/theme-switcher.js +1 -1
- package/dist/theme.js +1 -1
- package/dist/toast.d.ts +10 -9
- package/dist/toast.js +1 -1
- package/dist/{tooltip-nuUCoqq8.d.ts → tooltip-CngH7Kl6.d.ts} +7 -6
- package/dist/tooltip-NhYXqStK.js +1 -0
- package/dist/tooltip.d.ts +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/truncated-text.d.ts +138 -0
- package/dist/truncated-text.js +1 -0
- package/dist/types.js +1 -1
- package/dist/use-breakpoint--mo7kr9d.js +1 -0
- package/dist/use-is-hydrated-after-paint-r9Cl2mGp.js +1 -0
- package/dist/utils.js +1 -1
- package/dist/visually-hidden.d.ts +2 -1
- package/dist/visually-hidden.js +1 -1
- package/dist/well.d.ts +3 -2
- package/dist/well.js +1 -1
- package/package.json +16 -15
- package/dist/alert-OP_-aGJD.js +0 -1
- package/dist/anchor-BnMhJYS4.js +0 -1
- package/dist/button-BFpCB99R.js +0 -1
- package/dist/button-Dij5vCQG.js +0 -1
- package/dist/button-pwkdtR3U.js +0 -1
- package/dist/chart-aZLMj4xx.js +0 -2
- package/dist/checkbox-DbJSqSNN.js +0 -1
- package/dist/choice-SRyLguqU.js +0 -1
- package/dist/code-block-BE3Q0iAo.js +0 -12
- package/dist/cx-0HCjnNv1.js +0 -1
- package/dist/dialog-HIdb5d3I.js +0 -1
- package/dist/dropdown-menu-BR_AQNMj.js +0 -1
- package/dist/dropdown-menu-Dlpb7600.d.ts +0 -1
- package/dist/icon-BT8FnkkJ.js +0 -1
- package/dist/icon-U24NfYv7.js +0 -1
- package/dist/icons-BQRcOU6J.js +0 -1
- package/dist/icons-C3rVfpx9.js +0 -1
- package/dist/in-view-T_AAYaaF.js +0 -1
- package/dist/input-yq0jLE4e.js +0 -1
- package/dist/kbd-CJ8hNZfS.js +0 -1
- package/dist/label-BAy0Mg59.js +0 -1
- package/dist/list-BleZ-43e.js +0 -1
- package/dist/live-region-B2vJRvPH.js +0 -1
- package/dist/popover-BJ5XNwzD.js +0 -1
- package/dist/primitive-w3wFk2La.js +0 -1
- package/dist/select-CUWLEeuf.js +0 -1
- package/dist/separator-D98be0gY.js +0 -1
- package/dist/sheet-B5x8EO9Y.js +0 -1
- package/dist/skeleton-bVDP8BzY.js +0 -1
- package/dist/table-D2jh52KA.js +0 -1
- package/dist/theme-C1kFFdIk.js +0 -1
- package/dist/tooltip-H03l7E4Y.js +0 -1
- package/dist/use-is-hydrated-after-paint-Drj0lNi4.js +0 -1
- /package/dist/{types-D85fCNV3.js → css-properties-D85fCNV3.js} +0 -0
package/dist/toast.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { n as WithAsChild } from "./as-child-D23mGo4f.js";
|
|
2
|
+
import { t as WithDataSlot } from "./data-slot-CChfb_cv.js";
|
|
2
3
|
import { t as WithStyleProps } from "./with-style-props-Dq5Vntqy.js";
|
|
3
|
-
import { n as SvgOnlyProps } from "./icon-
|
|
4
|
+
import { n as SvgOnlyProps } from "./icon-r2NvfTWW.js";
|
|
4
5
|
import { ComponentProps, ReactNode } from "react";
|
|
5
6
|
import { Toaster as Toaster$1 } from "sonner";
|
|
6
7
|
//#region src/components/toast/toast.d.ts
|
|
@@ -88,7 +89,7 @@ type ToastProps = ComponentProps<"div"> & {
|
|
|
88
89
|
* The intent of the toast: the tone or status that the toast's color communicates.
|
|
89
90
|
*/
|
|
90
91
|
intent: ToastIntent;
|
|
91
|
-
};
|
|
92
|
+
} & WithDataSlot;
|
|
92
93
|
/**
|
|
93
94
|
* A succinct message with an intent that appears temporarily. The intent
|
|
94
95
|
* is the tone or status that the toast's color communicates.
|
|
@@ -121,8 +122,8 @@ type ToastProps = ComponentProps<"div"> & {
|
|
|
121
122
|
* </Toast.Root>
|
|
122
123
|
* ```
|
|
123
124
|
*/
|
|
124
|
-
declare const Root: ({ children, className, intent, ref, ...props }: ToastProps) => import("react").JSX.Element;
|
|
125
|
-
type ToastIconProps = Partial<SvgOnlyProps
|
|
125
|
+
declare const Root: ({ "data-slot": dataSlot, children, className, intent, ref, ...props }: ToastProps) => import("react").JSX.Element;
|
|
126
|
+
type ToastIconProps = Partial<SvgOnlyProps> & WithDataSlot;
|
|
126
127
|
/**
|
|
127
128
|
* An icon that visually represents the intent of the toast.
|
|
128
129
|
* If you do not pass an icon, the toast uses the default icon and color for the intent.
|
|
@@ -138,8 +139,8 @@ type ToastIconProps = Partial<SvgOnlyProps>;
|
|
|
138
139
|
* </Toast.Root>
|
|
139
140
|
* ```
|
|
140
141
|
*/
|
|
141
|
-
declare const Icon: ({ className, svg, ref, ...props }: ToastIconProps) => import("react").JSX.Element;
|
|
142
|
-
type ToastActionProps = ComponentProps<"button"> & WithAsChild;
|
|
142
|
+
declare const Icon: ({ "data-slot": dataSlot, className, svg, ref, ...props }: ToastIconProps) => import("react").JSX.Element;
|
|
143
|
+
type ToastActionProps = ComponentProps<"button"> & WithAsChild & WithDataSlot;
|
|
143
144
|
/**
|
|
144
145
|
* A button that dismisses the toast when clicked.
|
|
145
146
|
* You can prevent the toast from being dismissed `onClick` by calling `event.preventDefault()`
|
|
@@ -155,8 +156,8 @@ type ToastActionProps = ComponentProps<"button"> & WithAsChild;
|
|
|
155
156
|
* </Toast.Root>
|
|
156
157
|
* ```
|
|
157
158
|
*/
|
|
158
|
-
declare const Action: ({ asChild, className, onClick, ref, ...props }: ToastActionProps) => import("react").JSX.Element;
|
|
159
|
-
type ToastMessageProps = ComponentProps<"p"> & WithAsChild;
|
|
159
|
+
declare const Action: ({ "data-slot": dataSlot, asChild, className, onClick, ref, ...props }: ToastActionProps) => import("react").JSX.Element;
|
|
160
|
+
type ToastMessageProps = ComponentProps<"p"> & WithAsChild & WithDataSlot;
|
|
160
161
|
/**
|
|
161
162
|
* The message content of the toast.
|
|
162
163
|
*
|
|
@@ -171,7 +172,7 @@ type ToastMessageProps = ComponentProps<"p"> & WithAsChild;
|
|
|
171
172
|
* </Toast.Root>
|
|
172
173
|
* ```
|
|
173
174
|
*/
|
|
174
|
-
declare const Message: ({ asChild, className, ref, ...props }: ToastMessageProps) => import("react").JSX.Element;
|
|
175
|
+
declare const Message: ({ "data-slot": dataSlot, asChild, className, ref, ...props }: ToastMessageProps) => import("react").JSX.Element;
|
|
175
176
|
/**
|
|
176
177
|
* A succinct message that appears temporarily. Toasts give the user feedback
|
|
177
178
|
* without interrupting their workflow.
|
package/dist/toast.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-
|
|
1
|
+
import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./icon-kK0c-POG.js";import{t as r}from"./slot-DdYN1L1C.js";import{s as i}from"./theme-BlCZHClJ.js";import{c as a}from"react/compiler-runtime";import{createContext as o,useContext as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";import{CheckCircleIcon as u}from"@phosphor-icons/react/CheckCircle";import{InfoIcon as d}from"@phosphor-icons/react/Info";import{WarningIcon as f}from"@phosphor-icons/react/Warning";import{WarningDiamondIcon as p}from"@phosphor-icons/react/WarningDiamond";import{Toaster as m,toast as h}from"sonner";function g(e){return typeof e==`number`&&e<=0?1/0:e}const _=t=>{let n=a(13),{className:r,containerAriaLabel:o,dir:s,duration_ms:l,position:u,style:d}=t,f=l===void 0?4e3:l,p=u===void 0?`top-center`:u,h=i(),_;n[0]===r?_=n[1]:(_=e(`toaster overlay-prompt pointer-events-auto *:duration-200`,r),n[0]=r,n[1]=_);let v;n[2]===f?v=n[3]:(v=g(f),n[2]=f,n[3]=v);let y=p??`top-center`,b=h,x;n[4]===Symbol.for(`react.memo_cache_sentinel`)?(x={unstyled:!0},n[4]=x):x=n[4];let S;return n[5]!==o||n[6]!==s||n[7]!==d||n[8]!==_||n[9]!==v||n[10]!==y||n[11]!==b?(S=/* @__PURE__ */ c(m,{"data-slot":`toaster`,className:_,containerAriaLabel:o,dir:s,duration:v,gap:12,position:y,style:d,theme:b,toastOptions:x}),n[5]=o,n[6]=s,n[7]=d,n[8]=_,n[9]=v,n[10]=y,n[11]=b,n[12]=S):S=n[12],S},v=o(``);function y(e,t){let n=g(t?.duration_ms);return h.custom(t=>/* @__PURE__ */ c(v.Provider,{value:t,children:e}),{duration:n,...t?.id?{id:t.id}:{},unstyled:!0})}const b=o({intent:`info`}),x={Root:n=>{let r=a(27),i,o,s,u,d,f;r[0]===n?(i=r[1],o=r[2],s=r[3],u=r[4],d=r[5],f=r[6]):({"data-slot":s,children:i,className:o,intent:u,ref:f,...d}=n,r[0]=n,r[1]=i,r[2]=o,r[3]=s,r[4]=u,r[5]=d,r[6]=f);let p;r[7]===u?p=r[8]:(p={intent:u},r[7]=u,r[8]=p);let m=p,h;r[9]===s?h=r[10]:(h=t(s,`toast`),r[9]=s,r[10]=h);let g;r[11]===o?g=r[12]:(g=e(`relative flex items-start gap-2 text-sm font-sans`,`p-3 pl-3.75`,`bg-popover high-contrast:border-popover rounded rounded-r-[0.3125rem] border border-gray-500/35 shadow-lg`,o),r[11]=o,r[12]=g);let _;r[13]===u?_=r[14]:(_=/* @__PURE__ */ c(C,{intent:u}),r[13]=u,r[14]=_);let v;r[15]===i?v=r[16]:(v=/* @__PURE__ */ c(`div`,{"data-slot":`toast-label`,className:`contents`,children:i}),r[15]=i,r[16]=v);let y;r[17]!==d||r[18]!==f||r[19]!==h||r[20]!==g||r[21]!==_||r[22]!==v?(y=/* @__PURE__ */ l(`div`,{"data-slot":h,className:g,ref:f,...d,children:[_,v]}),r[17]=d,r[18]=f,r[19]=h,r[20]=g,r[21]=_,r[22]=v,r[23]=y):y=r[23];let x;return r[24]!==m||r[25]!==y?(x=/* @__PURE__ */ c(b.Provider,{value:m,children:y}),r[24]=m,r[25]=y,r[26]=x):x=r[26],x},Action:n=>{let i=a(21),o,l,u,d,f,p;i[0]===n?(o=i[1],l=i[2],u=i[3],d=i[4],f=i[5],p=i[6]):({"data-slot":u,asChild:o,className:l,onClick:d,ref:p,...f}=n,i[0]=n,i[1]=o,i[2]=l,i[3]=u,i[4]=d,i[5]=f,i[6]=p);let m=s(v),g=o?r:`button`,_;i[7]===u?_=i[8]:(_=t(u,`toast-action`),i[7]=u,i[8]=_);let y;i[9]===l?y=i[10]:(y=e(`shrink-0`,`data-icon-button:-mr-0.5 data-icon-button:-mt-0.5 data-icon-button:rounded-xs`,l),i[9]=l,i[10]=y);let b;i[11]!==m||i[12]!==d?(b=e=>{d?.(e),!e.defaultPrevented&&h.dismiss(m)},i[11]=m,i[12]=d,i[13]=b):b=i[13];let x;return i[14]!==g||i[15]!==f||i[16]!==p||i[17]!==_||i[18]!==y||i[19]!==b?(x=/* @__PURE__ */ c(g,{"data-slot":_,className:y,onClick:b,ref:p,...f}),i[14]=g,i[15]=f,i[16]=p,i[17]=_,i[18]=y,i[19]=b,i[20]=x):x=i[20],x},Icon:r=>{let i=a(54),o,l,m,h,g;i[0]===r?(o=i[1],l=i[2],m=i[3],h=i[4],g=i[5]):({"data-slot":l,className:o,svg:g,ref:h,...m}=r,i[0]=r,i[1]=o,i[2]=l,i[3]=m,i[4]=h,i[5]=g);let _=s(b);switch(_.intent){case`danger`:{let r;i[6]===l?r=i[7]:(r=t(l,`toast-icon`),i[6]=l,i[7]=r);let a;i[8]===o?a=i[9]:(a=e(`text-danger-600`,o),i[8]=o,i[9]=a);let s;i[10]===g?s=i[11]:(s=g??/* @__PURE__ */ c(f,{weight:`fill`}),i[10]=g,i[11]=s);let u;return i[12]!==m||i[13]!==h||i[14]!==r||i[15]!==a||i[16]!==s?(u=/* @__PURE__ */ c(n,{"data-slot":r,className:a,ref:h,svg:s,...m}),i[12]=m,i[13]=h,i[14]=r,i[15]=a,i[16]=s,i[17]=u):u=i[17],u}case`warning`:{let r;i[18]===l?r=i[19]:(r=t(l,`toast-icon`),i[18]=l,i[19]=r);let a;i[20]===o?a=i[21]:(a=e(`text-warning-600`,o),i[20]=o,i[21]=a);let s;i[22]===g?s=i[23]:(s=g??/* @__PURE__ */ c(p,{weight:`fill`}),i[22]=g,i[23]=s);let u;return i[24]!==m||i[25]!==h||i[26]!==r||i[27]!==a||i[28]!==s?(u=/* @__PURE__ */ c(n,{"data-slot":r,className:a,ref:h,svg:s,...m}),i[24]=m,i[25]=h,i[26]=r,i[27]=a,i[28]=s,i[29]=u):u=i[29],u}case`success`:{let r;i[30]===l?r=i[31]:(r=t(l,`toast-icon`),i[30]=l,i[31]=r);let a;i[32]===o?a=i[33]:(a=e(`text-success-600`,o),i[32]=o,i[33]=a);let s;i[34]===g?s=i[35]:(s=g??/* @__PURE__ */ c(u,{weight:`fill`}),i[34]=g,i[35]=s);let d;return i[36]!==m||i[37]!==h||i[38]!==r||i[39]!==a||i[40]!==s?(d=/* @__PURE__ */ c(n,{"data-slot":r,className:a,ref:h,svg:s,...m}),i[36]=m,i[37]=h,i[38]=r,i[39]=a,i[40]=s,i[41]=d):d=i[41],d}case`info`:{let r;i[42]===l?r=i[43]:(r=t(l,`toast-icon`),i[42]=l,i[43]=r);let a;i[44]===o?a=i[45]:(a=e(`text-accent-600`,o),i[44]=o,i[45]=a);let s;i[46]===g?s=i[47]:(s=g??/* @__PURE__ */ c(d,{weight:`fill`}),i[46]=g,i[47]=s);let u;return i[48]!==m||i[49]!==h||i[50]!==r||i[51]!==a||i[52]!==s?(u=/* @__PURE__ */ c(n,{"data-slot":r,className:a,ref:h,svg:s,...m}),i[48]=m,i[49]=h,i[50]=r,i[51]=a,i[52]=s,i[53]=u):u=i[53],u}default:throw Error(`Unreachable Case: ${_.intent}`)}},Message:n=>{let i=a(16),o,s,l,u,d;i[0]===n?(o=i[1],s=i[2],l=i[3],u=i[4],d=i[5]):({"data-slot":l,asChild:o,className:s,ref:d,...u}=n,i[0]=n,i[1]=o,i[2]=s,i[3]=l,i[4]=u,i[5]=d);let f=o?r:`p`,p;i[6]===l?p=i[7]:(p=t(l,`toast-message`),i[6]=l,i[7]=p);let m;i[8]===s?m=i[9]:(m=e(`text-strong flex-1 text-sm font-body`,s),i[8]=s,i[9]=m);let h;return i[10]!==f||i[11]!==u||i[12]!==d||i[13]!==p||i[14]!==m?(h=/* @__PURE__ */ c(f,{"data-slot":p,className:m,ref:d,...u}),i[10]=f,i[11]=u,i[12]=d,i[13]=p,i[14]=m,i[15]=h):h=i[15],h}},S={info:`bg-accent-600`,warning:`bg-warning-600`,success:`bg-success-600`,danger:`bg-danger-600`};function C(t){let n=a(10),r,i,o;n[0]===t?(r=n[1],i=n[2],o=n[3]):({className:r,intent:i,...o}=t,n[0]=t,n[1]=r,n[2]=i,n[3]=o);let s=S[i],l;n[4]!==r||n[5]!==s?(l=e(`z-1 absolute -inset-px right-auto w-1.5 rounded-l`,s,r),n[4]=r,n[5]=s,n[6]=l):l=n[6];let u;return n[7]!==o||n[8]!==l?(u=/* @__PURE__ */ c(`div`,{"aria-hidden":!0,className:l,...o}),n[7]=o,n[8]=l,n[9]=u):u=n[9],u}export{x as Toast,_ as Toaster,y as makeToast};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { t as WithDataSlot } from "./data-slot-CChfb_cv.js";
|
|
1
2
|
import { ComponentProps, ComponentPropsWithoutRef } from "react";
|
|
2
3
|
import { Content, Provider, Root, Trigger } from "@radix-ui/react-tooltip";
|
|
3
4
|
//#region src/components/tooltip/tooltip.d.ts
|
|
@@ -77,13 +78,13 @@ declare function Root$1(props: ComponentProps<typeof Root>): import("react").JSX
|
|
|
77
78
|
* </Tooltip.Root>
|
|
78
79
|
* ```
|
|
79
80
|
*/
|
|
80
|
-
declare function Trigger$1(props: ComponentProps<typeof Trigger>): import("react").JSX.Element;
|
|
81
|
+
declare function Trigger$1({ "data-slot": dataSlot, ...props }: ComponentProps<typeof Trigger> & WithDataSlot): import("react").JSX.Element;
|
|
81
82
|
/**
|
|
82
83
|
* Props for `Tooltip.Content`. `asChild` is omitted: the content renders its own
|
|
83
84
|
* arrow next to `children`, so a slot would receive more than one element and
|
|
84
|
-
* throw.
|
|
85
|
+
* throw. A `data-slot` from a composing part joins ahead of `tooltip-content`.
|
|
85
86
|
*/
|
|
86
|
-
type TooltipContentProps = Omit<ComponentProps<typeof Content>, "asChild"
|
|
87
|
+
type TooltipContentProps = Omit<ComponentProps<typeof Content>, "asChild"> & WithDataSlot;
|
|
87
88
|
/**
|
|
88
89
|
* The content to render inside the tooltip.
|
|
89
90
|
*
|
|
@@ -107,7 +108,7 @@ type TooltipContentProps = Omit<ComponentProps<typeof Content>, "asChild">;
|
|
|
107
108
|
*
|
|
108
109
|
* | Data Attribute | Value | Description |
|
|
109
110
|
* | ---------------- | -------------------------------------------------- | ------------------------------------------------- |
|
|
110
|
-
* | `data-slot` | `"tooltip-content"` | On the tooltip surface.
|
|
111
|
+
* | `data-slot` | `"tooltip-content"` | On the tooltip surface, with any composing part's chain ahead of it. |
|
|
111
112
|
* | `data-slot` | `"tooltip-label"` | On the `<div>` wrapping `children`. |
|
|
112
113
|
* | `data-state` | `"delayed-open"` \| `"instant-open"` \| `"closed"` | The open state Radix stamps on the surface. |
|
|
113
114
|
* | `data-side` | `"top"` \| `"right"` \| `"bottom"` \| `"left"` | Which side of the trigger the surface resolved to. |
|
|
@@ -128,7 +129,7 @@ type TooltipContentProps = Omit<ComponentProps<typeof Content>, "asChild">;
|
|
|
128
129
|
* </Tooltip.Root>
|
|
129
130
|
* ```
|
|
130
131
|
*/
|
|
131
|
-
declare const Content$1: ({ children, className, ref, sideOffset, ...props }: TooltipContentProps) => import("react").JSX.Element;
|
|
132
|
+
declare const Content$1: ({ children, className, "data-slot": dataSlot, ref, sideOffset, ...props }: TooltipContentProps) => import("react").JSX.Element;
|
|
132
133
|
/**
|
|
133
134
|
* A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it.
|
|
134
135
|
*
|
|
@@ -230,7 +231,7 @@ declare const Tooltip: {
|
|
|
230
231
|
*
|
|
231
232
|
* | Data Attribute | Value | Description |
|
|
232
233
|
* | ---------------- | -------------------------------------------------- | ------------------------------------------------- |
|
|
233
|
-
* | `data-slot` | `"tooltip-content"` | On the tooltip surface.
|
|
234
|
+
* | `data-slot` | `"tooltip-content"` | On the tooltip surface, with any composing part's chain ahead of it. |
|
|
234
235
|
* | `data-slot` | `"tooltip-label"` | On the `<div>` wrapping `children`. |
|
|
235
236
|
* | `data-state` | `"delayed-open"` \| `"instant-open"` \| `"closed"` | The open state Radix stamps on the surface. |
|
|
236
237
|
* | `data-side` | `"top"` \| `"right"` \| `"bottom"` \| `"left"` | Which side of the trigger the surface resolved to. |
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{r as n}from"./layer-container-DLf-6eBz.js";import{c as r}from"react/compiler-runtime";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{Arrow as o,Content as s,Portal as c,Provider as l,Root as u,Trigger as d}from"@radix-ui/react-tooltip";const f=e=>{let t=r(6),n,a;t[0]===e?(n=t[1],a=t[2]):({delayDuration:a,...n}=e,t[0]=e,t[1]=n,t[2]=a);let o=(a===void 0?0:a)??0,s;return t[3]!==n||t[4]!==o?(s=/* @__PURE__ */ i(l,{delayDuration:o,...n}),t[3]=n,t[4]=o,t[5]=s):s=t[5],s};function p(e){let t=r(2),n;return t[0]===e?n=t[1]:(n=/* @__PURE__ */ i(u,{...e}),t[0]=e,t[1]=n),n}function m(e){let n=r(8),a,o;n[0]===e?(a=n[1],o=n[2]):({"data-slot":a,...o}=e,n[0]=e,n[1]=a,n[2]=o);let s;n[3]===a?s=n[4]:(s=t(a,`tooltip-trigger`),n[3]=a,n[4]=s);let c;return n[5]!==o||n[6]!==s?(c=/* @__PURE__ */ i(d,{"data-slot":s,...o}),n[5]=o,n[6]=s,n[7]=c):c=n[7],c}const h={Root:p,Content:l=>{let u=r(24),d,f,p,m,h,g;u[0]===l?(d=u[1],f=u[2],p=u[3],m=u[4],h=u[5],g=u[6]):({children:d,className:f,"data-slot":p,ref:h,sideOffset:g,...m}=l,u[0]=l,u[1]=d,u[2]=f,u[3]=p,u[4]=m,u[5]=h,u[6]=g);let _=g===void 0?4:g,v=n(),y;u[7]===f?y=u[8]:(y=e(`bg-tooltip text-tooltip animate-in fade-in-0 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 data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 z-50 max-w-72 overflow-visible wrap-break-word rounded-md px-3 py-1.5 text-sm font-sans shadow`,f),u[7]=f,u[8]=y);let b;u[9]===p?b=u[10]:(b=t(p,`tooltip-content`),u[9]=p,u[10]=b);let x;u[11]===d?x=u[12]:(x=/* @__PURE__ */ i(`div`,{"data-slot":`tooltip-label`,className:`contents`,children:d}),u[11]=d,u[12]=x);let S;u[13]===Symbol.for(`react.memo_cache_sentinel`)?(S=/* @__PURE__ */ i(o,{asChild:!0,children:/* @__PURE__ */ i(`div`,{className:`bg-tooltip z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-xs`})}),u[13]=S):S=u[13];let C;u[14]!==m||u[15]!==h||u[16]!==_||u[17]!==y||u[18]!==b||u[19]!==x?(C=/* @__PURE__ */ a(s,{className:y,"data-slot":b,ref:h,sideOffset:_,...m,children:[x,S]}),u[14]=m,u[15]=h,u[16]=_,u[17]=y,u[18]=b,u[19]=x,u[20]=C):C=u[20];let w;return u[21]!==v||u[22]!==C?(w=/* @__PURE__ */ i(c,{container:v,children:C}),u[21]=v,u[22]=C,u[23]=w):w=u[23],w},Trigger:m};export{f as n,h as t};
|
package/dist/tooltip.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as TooltipProvider, t as Tooltip } from "./tooltip-
|
|
1
|
+
import { n as TooltipProvider, t as Tooltip } from "./tooltip-CngH7Kl6.js";
|
|
2
2
|
export { Tooltip, TooltipProvider };
|
package/dist/tooltip.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{t as Tooltip,n as TooltipProvider}from"./tooltip-NhYXqStK.js";
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { t as SelfClosingWithAsChild } from "./as-child-D23mGo4f.js";
|
|
2
|
+
import { t as WithDataSlot } from "./data-slot-CChfb_cv.js";
|
|
3
|
+
import { ComponentProps } from "react";
|
|
4
|
+
//#region src/components/truncated-text/truncated-text.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Props for `TruncatedText`. The type omits `children`: `value` is the content,
|
|
7
|
+
* and `asChild` takes the single element to render it in.
|
|
8
|
+
*/
|
|
9
|
+
type TruncatedTextProps = Omit<ComponentProps<"span">, "children" | "translate"> & SelfClosingWithAsChild & WithDataSlot & {
|
|
10
|
+
/**
|
|
11
|
+
* How many graphemes stay visible at the end of the value. Counts grapheme
|
|
12
|
+
* clusters, so an emoji or a letter with a combining mark counts once. Must
|
|
13
|
+
* be a non-negative integer.
|
|
14
|
+
*
|
|
15
|
+
* @default 8
|
|
16
|
+
*/
|
|
17
|
+
tail?: number;
|
|
18
|
+
/**
|
|
19
|
+
* Whether a browser translation engine may translate the value and its
|
|
20
|
+
* tooltip. When the value is prose, pass `"yes"`.
|
|
21
|
+
*
|
|
22
|
+
* @default "no"
|
|
23
|
+
*/
|
|
24
|
+
translate?: "yes" | "no";
|
|
25
|
+
/**
|
|
26
|
+
* The full value. A prop and not `children`, because the component splits
|
|
27
|
+
* it and renders the two parts itself.
|
|
28
|
+
*/
|
|
29
|
+
value: string;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Renders one long opaque value (a URL, a resource ID, an image reference, a
|
|
33
|
+
* token) on a single line. When the value overflows its container, the head
|
|
34
|
+
* clips with one ellipsis and the last `tail` graphemes stay visible, because
|
|
35
|
+
* the tail is the part that tells two values apart. When the value fits, it
|
|
36
|
+
* renders plain. A visually hidden copy of the value gives a screen reader the
|
|
37
|
+
* whole value as one string. A tooltip shows the full value on hover only while
|
|
38
|
+
* it overflows.
|
|
39
|
+
*
|
|
40
|
+
* **When to use**
|
|
41
|
+
* - A URL, an ID, an image reference, or a token in a table cell, a description
|
|
42
|
+
* list, or a card, where the end of the value matters.
|
|
43
|
+
*
|
|
44
|
+
* **When not to use**
|
|
45
|
+
* - For prose that may lose its end. Use the `truncate` utility.
|
|
46
|
+
* - For a value that may wrap over several lines. Let it wrap, or use
|
|
47
|
+
* {@link https://mantle.ngrok.com/components/data-display/code-block CodeBlock}.
|
|
48
|
+
* - For a short fragment of inline code. Use
|
|
49
|
+
* {@link https://mantle.ngrok.com/components/data-display/code Code}.
|
|
50
|
+
*
|
|
51
|
+
* **Layout.** The root is an `inline-block` that grows to its container's width
|
|
52
|
+
* and no further. The container decides the width:
|
|
53
|
+
* - A flex item needs `min-w-0`.
|
|
54
|
+
* - A grid track needs `minmax(0, 1fr)`.
|
|
55
|
+
* - An auto-layout table grows its column to the full value, even with a column
|
|
56
|
+
* width. Set `table-layout: fixed` on the table and give the table a width.
|
|
57
|
+
*
|
|
58
|
+
* When the container holds less than the tail and one cell, the ellipsis is all
|
|
59
|
+
* that remains of the head. The tail then clips at its start, so the end of the
|
|
60
|
+
* value is the last thing to go. A value no longer than `tail` has no head, so
|
|
61
|
+
* its tail draws the ellipsis itself. Give the value a line of its own: beside
|
|
62
|
+
* other inline text, an overflowing value wraps to the next line at the
|
|
63
|
+
* container's full width. The root sets `dir="ltr"`, because a URL, an ID, or
|
|
64
|
+
* a token reads left to right on an RTL page too; a `dir` prop wins. CSS draws
|
|
65
|
+
* the ellipsis, so a selection never contains it. The component sets no font,
|
|
66
|
+
* but it turns ligatures off, so a `//` or `=>` clips between its two
|
|
67
|
+
* characters. In a monospace font the clipped head sits flush against the
|
|
68
|
+
* tail; a proportional font leaves a gap smaller than one glyph.
|
|
69
|
+
*
|
|
70
|
+
* Until the first measurement, the tail reserves one `ch` per grapheme, which
|
|
71
|
+
* is exact in a monospace font. In another font the first paint of an
|
|
72
|
+
* overflowing value can be off by the difference: a tail of wide glyphs (CJK,
|
|
73
|
+
* emoji) can poke past the container, and a value that fits by less than the
|
|
74
|
+
* over-reserve of narrow glyphs can clip. The layout effect after mount
|
|
75
|
+
* replaces the estimate with the measured width.
|
|
76
|
+
*
|
|
77
|
+
* **Selection.** The root carries `user-select: all`, so one click selects the
|
|
78
|
+
* whole value across both segments, and a copy yields the full string. Pass
|
|
79
|
+
* `className="select-text"` to opt out.
|
|
80
|
+
*
|
|
81
|
+
* **Tooltip.** The tooltip shows the full value and opens only while the value
|
|
82
|
+
* overflows. It needs a `TooltipProvider` ancestor, like every mantle tooltip,
|
|
83
|
+
* and throws without one. The server render and the first client render assume
|
|
84
|
+
* no overflow; the measurement after mount adds the tooltip and `data-truncated`.
|
|
85
|
+
* While the value overflows, the root is focusable, so Tab reaches it, a screen
|
|
86
|
+
* reader announces the whole value, and the tooltip opens. A value that fits is
|
|
87
|
+
* not a tab stop. A `tabIndex` prop wins in both states.
|
|
88
|
+
*
|
|
89
|
+
* **Accessibility.** The two visible segments are `aria-hidden`, because
|
|
90
|
+
* Chromium puts a space between two inline-block boxes in an accessible name.
|
|
91
|
+
* A visually hidden `<span data-slot="truncated-text-value">` holds the whole
|
|
92
|
+
* value instead, with `user-select: none`, so one click still copies the value
|
|
93
|
+
* once. A page-wide select-all copies it twice, like any visually hidden label.
|
|
94
|
+
*
|
|
95
|
+
* **Translation.** The root and the tooltip carry `translate="no"` by default,
|
|
96
|
+
* because the component exists for values a reader copies. When the value is
|
|
97
|
+
* prose, pass `translate="yes"`.
|
|
98
|
+
*
|
|
99
|
+
* **Polymorphism.** Pass `asChild` to render the value inside a different
|
|
100
|
+
* element, such as a `<code>`. The child must have no children of its own,
|
|
101
|
+
* because `value` is the content, and it must render `children` directly, as
|
|
102
|
+
* `<code>` does.
|
|
103
|
+
*
|
|
104
|
+
* **Data attributes:**
|
|
105
|
+
*
|
|
106
|
+
* | Data Attribute | Value | Description |
|
|
107
|
+
* | ---------------- | -------------------------------------------------- | ---------------------------------------------------------------------------------- |
|
|
108
|
+
* | `data-slot` | `"truncated-text"` | On the root, and joined onto the child via `asChild`. |
|
|
109
|
+
* | `data-slot` | `"truncated-text-head"` | On the `<span>` that clips. Holds everything before the tail. |
|
|
110
|
+
* | `data-slot` | `"truncated-text-tail"` | On the `<span>` that stays visible. Holds the last `tail` graphemes. |
|
|
111
|
+
* | `data-slot` | `"truncated-text-value"` | On the visually hidden `<span>` that holds the whole value for assistive technology. |
|
|
112
|
+
* | `data-truncated` | present while the value overflows | Presence-only. Style with `data-truncated:`. Absent on the server render. |
|
|
113
|
+
* | `data-state` | `"closed"` \| `"delayed-open"` \| `"instant-open"` | The tooltip state Radix stamps on the root. |
|
|
114
|
+
*
|
|
115
|
+
* @see https://mantle.ngrok.com/components/data-display/truncated-text
|
|
116
|
+
*
|
|
117
|
+
* @example
|
|
118
|
+
* ```tsx
|
|
119
|
+
* import { TruncatedText } from "@ngrok/mantle/truncated-text";
|
|
120
|
+
*
|
|
121
|
+
* // A URL whose last path segment tells it apart from its neighbors.
|
|
122
|
+
* <TruncatedText
|
|
123
|
+
* className="font-mono text-sm"
|
|
124
|
+
* value="https://example.ngrok.app/api/items?filter=%7B%22name%22%3A%22x%22%7D&limit=200"
|
|
125
|
+
* />
|
|
126
|
+
*
|
|
127
|
+
* // Keep the six characters that tell two IDs apart.
|
|
128
|
+
* <TruncatedText className="font-mono text-sm" tail={6} value="ep_2abcdEFGhijKL123456" />
|
|
129
|
+
*
|
|
130
|
+
* // As a <code> element.
|
|
131
|
+
* <TruncatedText asChild tail={12} value="ghcr.io/ngrok/ngrok-operator:0.14.0">
|
|
132
|
+
* <code />
|
|
133
|
+
* </TruncatedText>
|
|
134
|
+
* ```
|
|
135
|
+
*/
|
|
136
|
+
declare const TruncatedText: ({ "aria-describedby": describedBy, asChild, children, className, "data-slot": dataSlot, onFocus, onPointerMove, ref, style, tabIndex, tail, translate, value, ...props }: TruncatedTextProps) => import("react").JSX.Element;
|
|
137
|
+
//#endregion
|
|
138
|
+
export { TruncatedText, type TruncatedTextProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./use-isomorphic-layout-effect-DdTRtMY-.js";import{n as t}from"./compose-refs-sFdxsL7k.js";import{t as n}from"./cx-CK7o_rVv.js";import{t as r}from"./data-slot-EM6s2WEU.js";import{t as i}from"./slot-DdYN1L1C.js";import{t as a}from"./css-properties-D85fCNV3.js";import{t as o}from"./tooltip-NhYXqStK.js";import{c as ee}from"react/compiler-runtime";import{Children as s,cloneElement as te,isValidElement as ne,useRef as re,useState as c}from"react";import l from"tiny-invariant";import{Fragment as ie,jsx as u,jsxs as ae}from"react/jsx-runtime";import{Root as oe,Trigger as se}from"@radix-ui/react-tooltip";let d;function ce(e,t){l(Number.isInteger(t)&&t>=0,`TruncatedText: \`tail\` must be a non-negative integer, received ${String(t)}.`),d??=new Intl.Segmenter(void 0,{granularity:`grapheme`});let n=Array.from(d.segment(e),e=>e.segment);if(n.length<=t)return{head:``,tail:e,tailGraphemes:n.length};let r=n.length-t;return{head:n.slice(0,r).join(``),tail:n.slice(r).join(``),tailGraphemes:t}}function f(e){let t=document.createRange();return t.selectNodeContents(e),t.getBoundingClientRect().width}function p(e){let t=getComputedStyle(e),n=[t.paddingLeft,t.paddingRight,t.borderLeftWidth,t.borderRightWidth].reduce((e,t)=>e+(Number.parseFloat(t)||0),0);return e.getBoundingClientRect().width-n}function le(e,t,n){let r=f(n);return{tailWidth:r,truncated:f(t)+r>p(e)+.5}}const ue=String.raw`inline-block overflow-hidden text-ellipsis whitespace-nowrap align-bottom before:content-['\200B'] max-w-[calc(100%_-_var(--_tail-width)_+_0.5px)] [[data-truncated]>&]:max-w-[max(1ch_+_0.5px,calc(round(down,100%_-_var(--_tail-width),1ch)_+_0.5px))]`,de=e=>{let t=ee(8),n,r,a;if(t[0]!==e){let{"aria-describedby":i,asChild:o,describedBy:ee,...s}=e;a=o,n=ee,r=s,t[0]=e,t[1]=n,t[2]=r,t[3]=a}else n=t[1],r=t[2],a=t[3];let o=a!==void 0&&a?i:`span`,s;return t[4]!==o||t[5]!==n||t[6]!==r?(s=/* @__PURE__ */ u(o,{"aria-describedby":n,...r}),t[4]=o,t[5]=n,t[6]=r,t[7]=s):s=t[7],s},m=i=>{let d=ee(79),f,p,m,h,g,_,v,y,b,x,S,C,w,T;d[0]===i?(f=d[1],p=d[2],m=d[3],h=d[4],g=d[5],_=d[6],v=d[7],y=d[8],b=d[9],x=d[10],S=d[11],C=d[12],w=d[13],T=d[14]):({"aria-describedby":h,asChild:x,children:f,className:p,"data-slot":m,onFocus:g,onPointerMove:_,ref:y,style:b,tabIndex:w,tail:S,translate:C,value:T,...v}=i,d[0]=i,d[1]=f,d[2]=p,d[3]=m,d[4]=h,d[5]=g,d[6]=_,d[7]=v,d[8]=y,d[9]=b,d[10]=x,d[11]=S,d[12]=C,d[13]=w,d[14]=T);let fe=x!==void 0&&x,E=S===void 0?8:S,D=C===void 0?`no`:C,O;d[15]!==E||d[16]!==T?(O=ce(T,E),d[15]=E,d[16]=T,d[17]=O):O=d[17];let{head:k,tail:A,tailGraphemes:pe}=O,[j,me]=c(null),he=re(null),ge=re(null),_e=t(y,me),[M,ve]=c(null),[ye,be]=c(!1),N=M?.truncated===!0,P;d[18]===j?P=d[19]:(P=()=>{let e=he.current,t=ge.current;if(j==null||e==null||t==null)return;let n=()=>{let n=le(j,e,t);ve(e=>e!=null&&e.tailWidth===n.tailWidth&&e.truncated===n.truncated?e:n),n.truncated||be(!1)};n();let r=new ResizeObserver(n);return r.observe(j),r.observe(t),()=>{r.disconnect()}},d[18]=j,d[19]=P);let F;d[20]!==j||d[21]!==E||d[22]!==T?(F=[j,T,E],d[20]=j,d[21]=E,d[22]=T,d[23]=F):F=d[23],e(P,F);let I=M==null?`${pe}ch`:`${M.tailWidth}px`,L;d[24]===T?L=d[25]:(L=/* @__PURE__ */ u(`span`,{"data-slot":`truncated-text-value`,className:`sr-only select-none`,children:T}),d[24]=T,d[25]=L);let R;d[26]===k?R=d[27]:(R=/* @__PURE__ */ u(`span`,{ref:he,"aria-hidden":!0,"data-slot":`truncated-text-head`,className:ue,children:k}),d[26]=k,d[27]=R);let z;d[28]===A?z=d[29]:(z=/* @__PURE__ */ u(`span`,{ref:ge,"aria-hidden":!0,"data-slot":`truncated-text-tail`,dir:`rtl`,className:`inline-block overflow-hidden whitespace-nowrap text-left align-bottom min-w-(--_tail-width) [[data-truncated]>&]:min-w-0 [[data-truncated]>&]:max-w-[calc(round(down,100%_-_1ch_-_var(--_tail-width),1ch)_+_var(--_tail-width))] [[data-truncated]>:empty+&]:max-w-[calc(round(down,100%_-_var(--_tail-width),1ch)_+_var(--_tail-width)_+_0.5px)] [[data-truncated]>:empty+&]:text-ellipsis`,children:/* @__PURE__ */ u(`span`,{dir:`ltr`,children:A})}),d[28]=A,d[29]=z);let B;d[30]!==L||d[31]!==R||d[32]!==z?(B=/* @__PURE__ */ ae(ie,{children:[L,R,z]}),d[30]=L,d[31]=R,d[32]=z,d[33]=B):B=d[33];let V=B,H;d[34]===m?H=d[35]:(H=r(m,`truncated-text`),d[34]=m,d[35]=H);let xe=N?``:void 0,U;d[36]===p?U=d[37]:(U=n(`inline-block min-w-0 max-w-full rounded whitespace-nowrap select-all [font-variant-ligatures:none] focus:outline-hidden focus-visible:ring-3 focus-visible:ring-focus-accent data-truncated:cursor-help`,p),d[36]=p,d[37]=U);let W;d[38]!==b||d[39]!==I?(W=a({"--_tail-width":I,...b}),d[38]=b,d[39]=I,d[40]=W):W=d[40];let Se=N?w??0:w,G;d[41]!==N||d[42]!==_?(G=e=>{_?.(e),N||e.preventDefault()},d[41]=N,d[42]=_,d[43]=G):G=d[43];let K;d[44]!==N||d[45]!==g?(K=e=>{g?.(e),N||e.preventDefault()},d[44]=N,d[45]=g,d[46]=K):K=d[46];let q;d[47]!==_e||d[48]!==v||d[49]!==H||d[50]!==xe||d[51]!==U||d[52]!==W||d[53]!==Se||d[54]!==G||d[55]!==K||d[56]!==D?(q={ref:_e,"data-slot":H,"data-truncated":xe,dir:`ltr`,className:U,style:W,tabIndex:Se,onPointerMove:G,onFocus:K,translate:D,...v},d[47]=_e,d[48]=v,d[49]=H,d[50]=xe,d[51]=U,d[52]=W,d[53]=Se,d[54]=G,d[55]=K,d[56]=D,d[57]=q):q=d[57];let J=q,Y;if(fe){let e;if(d[58]!==f||d[59]!==h||d[60]!==J||d[61]!==V){let t=s.only(f);l(ne(t),"When using `asChild`, TruncatedText must be passed a single child as a JSX tag."),l(t.props.children==null,"When using `asChild`, the child of TruncatedText must have no children of its own. `value` is the content."),e=/* @__PURE__ */ u(de,{asChild:!0,describedBy:h,...J,children:te(t,{},V)}),d[58]=f,d[59]=h,d[60]=J,d[61]=V,d[62]=e}else e=d[62];Y=e}else{let e;d[63]!==h||d[64]!==J||d[65]!==V?(e=/* @__PURE__ */ u(de,{describedBy:h,...J,children:V}),d[63]=h,d[64]=J,d[65]=V,d[66]=e):e=d[66],Y=e}let Ce=N&&ye,X;d[67]===N?X=d[68]:(X=e=>be(N&&e),d[67]=N,d[68]=X);let Z;d[69]===Y?Z=d[70]:(Z=/* @__PURE__ */ u(se,{asChild:!0,children:Y}),d[69]=Y,d[70]=Z);let Q;d[71]!==D||d[72]!==T?(Q=/* @__PURE__ */ u(o.Content,{className:`break-all`,translate:D,children:T}),d[71]=D,d[72]=T,d[73]=Q):Q=d[73];let $;return d[74]!==Ce||d[75]!==X||d[76]!==Z||d[77]!==Q?($=/* @__PURE__ */ ae(oe,{open:Ce,onOpenChange:X,children:[Z,Q]}),d[74]=Ce,d[75]=X,d[76]=Z,d[77]=Q,d[78]=$):$=d[78],$};export{m as TruncatedText};
|
package/dist/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./
|
|
1
|
+
import{t as e}from"./css-properties-D85fCNV3.js";import{t}from"./booleanish-BfvnW6vy.js";export{e as $cssProperties,t as parseBooleanish};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as e}from"react/compiler-runtime";import{useSyncExternalStore as t}from"react";const n=[`2xl`,`xl`,`lg`,`md`,`sm`,`xs`,`2xs`],r=[`default`,...n];function i(){return t(b,x,a)}function a(){return`default`}function o(n){let r=e(4),i;r[0]===n?i=r[1]:(i=C(n),r[0]=n,r[1]=i);let a;return r[2]===n?a=r[3]:(a=T(n),r[2]=n,r[3]=a),t(i,a,s)}function s(){return!1}const c={"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)`},l={"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 u=null,d=null;function f(){return u||={"2xl":window.matchMedia(c[`2xl`]),xl:window.matchMedia(c.xl),lg:window.matchMedia(c.lg),md:window.matchMedia(c.md),sm:window.matchMedia(c.sm),xs:window.matchMedia(c.xs),"2xs":window.matchMedia(c[`2xs`])},u}function p(e){return d||={"2xl":window.matchMedia(l[`2xl`]),xl:window.matchMedia(l.xl),lg:window.matchMedia(l.lg),md:window.matchMedia(l.md),sm:window.matchMedia(l.sm),xs:window.matchMedia(l.xs),"2xs":window.matchMedia(l[`2xs`])},d[e]}let m=`default`;const h=/* @__PURE__ */ new Set;let g=!1;function _(){let e=f();for(let t of n)if(e[t].matches)return t;return`default`}let v=!1;function y(){v||(v=!0,requestAnimationFrame(()=>{v=!1;let e=_();if(e!==m){m=e;for(let e of h)e()}}))}function b(e){if(h.add(e),!g){g=!0;let e=f();m=_();for(let t of Object.values(e))t.addEventListener(`change`,y)}return e(),()=>{if(h.delete(e),h.size===0&&g){g=!1;let e=f();for(let t of Object.values(e))t.removeEventListener(`change`,y)}}}function x(){return g||(m=_()),m}const S=/* @__PURE__ */ new Map;function C(e){let t=S.get(e);return t||(t=t=>{let n=p(e),r=!1,i=()=>{r||(r=!0,requestAnimationFrame(()=>{r=!1,t()}))};return n.addEventListener(`change`,i),()=>{n.removeEventListener(`change`,i)}},S.set(e,t),t)}const w=/* @__PURE__ */ new Map;function T(e){let t=w.get(e);return t||(t=()=>p(e).matches,w.set(e,t),t)}export{i as n,o as r,r as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as e}from"react/compiler-runtime";import{useEffect as t,useState as n}from"react";function r(){let r=e(2),[i,a]=n(!1),o,s;return r[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=()=>{let e=requestAnimationFrame(()=>{a(!0)});return()=>{cancelAnimationFrame(e)}},s=[],r[0]=o,r[1]=s):(o=r[0],s=r[1]),t(o,s),i}export{r as t};
|
package/dist/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./compose-refs-sFdxsL7k.js";import{t}from"./copy-to-clipboard-Cza2OT47.js";import{a as n,c as r,d as i,f as a,i as o,l as s,n as c,o as l,p as u,r as d,s as f,t as p,u as m}from"./direction-Wa9W2F61.js";import{t as h}from"./in-view-
|
|
1
|
+
import{t as e}from"./compose-refs-sFdxsL7k.js";import{t}from"./copy-to-clipboard-Cza2OT47.js";import{a as n,c as r,d as i,f as a,i as o,l as s,n as c,o as l,p as u,r as d,s as f,t as p,u as m}from"./direction-Wa9W2F61.js";import{t as h}from"./in-view-Dxv_GrUU.js";function g(e,t){return Math.sign(t.getTime()-e.getTime())}function _(e,t){return Math.sign(e.getTime()-t.getTime())}export{p as $alphanumericSortingDirection,c as $sortingDirection,d as $sortingMode,o as $timeSortingDirection,n as alphanumericSortingDirections,g as compareDatesNewestToOldest,_ as compareDatesOldestToNewest,e as composeRefs,t as copyToClipboard,h as inView,l as isAlphanumericSortingDirection,f as isSortingDirection,r as isSortingMode,s as isTimeSortingDirection,m as sortingDirections,i as sortingModes,a as timeSortingByDirection,u as timeSortingDirections};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { n as WithAsChild } from "./as-child-D23mGo4f.js";
|
|
2
|
+
import { t as WithDataSlot } from "./data-slot-CChfb_cv.js";
|
|
2
3
|
import { ComponentProps } from "react";
|
|
3
4
|
//#region src/components/visually-hidden/visually-hidden.d.ts
|
|
4
5
|
/**
|
|
@@ -36,6 +37,6 @@ import { ComponentProps } from "react";
|
|
|
36
37
|
* </a>
|
|
37
38
|
* ```
|
|
38
39
|
*/
|
|
39
|
-
declare const VisuallyHidden: ({ asChild, className, ref, ...props }: ComponentProps<"span"> & WithAsChild) => import("react").JSX.Element;
|
|
40
|
+
declare const VisuallyHidden: ({ "data-slot": dataSlot, asChild, className, ref, ...props }: ComponentProps<"span"> & WithAsChild & WithDataSlot) => import("react").JSX.Element;
|
|
40
41
|
//#endregion
|
|
41
42
|
export { VisuallyHidden };
|
package/dist/visually-hidden.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-
|
|
1
|
+
import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./slot-DdYN1L1C.js";import{c as r}from"react/compiler-runtime";import{jsx as i}from"react/jsx-runtime";const a=a=>{let o=r(16),s,c,l,u,d;o[0]===a?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5]):({"data-slot":l,asChild:s,className:c,ref:d,...u}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d);let f=s?n:`span`,p;o[6]===l?p=o[7]:(p=t(l,`visually-hidden`),o[6]=l,o[7]=p);let m;o[8]===c?m=o[9]:(m=e(`sr-only`,c),o[8]=c,o[9]=m);let h;return o[10]!==f||o[11]!==u||o[12]!==d||o[13]!==p||o[14]!==m?(h=/* @__PURE__ */ i(f,{ref:d,"data-slot":p,className:m,...u}),o[10]=f,o[11]=u,o[12]=d,o[13]=p,o[14]=m,o[15]=h):h=o[15],h};export{a as VisuallyHidden};
|
package/dist/well.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { n as WithAsChild } from "./as-child-D23mGo4f.js";
|
|
2
|
+
import { t as WithDataSlot } from "./data-slot-CChfb_cv.js";
|
|
2
3
|
import "./index-DA4ig3gj.js";
|
|
3
4
|
import { ComponentProps } from "react";
|
|
4
5
|
//#region src/components/well/well.d.ts
|
|
5
|
-
type WellProps = ComponentProps<"div"> & WithAsChild;
|
|
6
|
+
type WellProps = ComponentProps<"div"> & WithAsChild & WithDataSlot;
|
|
6
7
|
/**
|
|
7
8
|
* A recessed, inset container used to visually group and de-emphasize content
|
|
8
9
|
* relative to the surrounding surface, such as code samples, supplementary
|
|
@@ -28,6 +29,6 @@ type WellProps = ComponentProps<"div"> & WithAsChild;
|
|
|
28
29
|
* </Well>
|
|
29
30
|
* ```
|
|
30
31
|
*/
|
|
31
|
-
declare const Well: ({ asChild, className, ref, ...props }: WellProps) => import("react").JSX.Element;
|
|
32
|
+
declare const Well: ({ "data-slot": dataSlot, asChild, className, ref, ...props }: WellProps) => import("react").JSX.Element;
|
|
32
33
|
//#endregion
|
|
33
34
|
export { Well };
|
package/dist/well.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-
|
|
1
|
+
import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./slot-DdYN1L1C.js";import{c as r}from"react/compiler-runtime";import{jsx as i}from"react/jsx-runtime";const a=a=>{let o=r(16),s,c,l,u,d;o[0]===a?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5]):({"data-slot":c,asChild:d,className:s,ref:u,...l}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d);let f=d!==void 0&&d?n:`div`,p;o[6]===c?p=o[7]:(p=t(c,`well`),o[6]=c,o[7]=p);let m;o[8]===s?m=o[9]:(m=e(`border-card-muted bg-base relative rounded-md border shadow-inner`,s),o[8]=s,o[9]=m);let h;return o[10]!==f||o[11]!==l||o[12]!==u||o[13]!==p||o[14]!==m?(h=/* @__PURE__ */ i(f,{ref:u,"data-slot":p,className:m,...l}),o[10]=f,o[11]=l,o[12]=u,o[13]=p,o[14]=m,o[15]=h):h=o[15],h};export{a as Well};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ngrok/mantle",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.89.0",
|
|
4
4
|
"description": "mantle is ngrok's UI library and design system.",
|
|
5
5
|
"homepage": "https://mantle.ngrok.com",
|
|
6
6
|
"license": "MIT",
|
|
@@ -113,27 +113,28 @@
|
|
|
113
113
|
"./theme-switcher": "./dist/theme-switcher.js",
|
|
114
114
|
"./toast": "./dist/toast.js",
|
|
115
115
|
"./tooltip": "./dist/tooltip.js",
|
|
116
|
+
"./truncated-text": "./dist/truncated-text.js",
|
|
116
117
|
"./types": "./dist/types.js",
|
|
117
118
|
"./utils": "./dist/utils.js",
|
|
118
119
|
"./visually-hidden": "./dist/visually-hidden.js",
|
|
119
120
|
"./well": "./dist/well.js"
|
|
120
121
|
},
|
|
121
122
|
"dependencies": {
|
|
122
|
-
"@ariakit/react": "0.4.
|
|
123
|
+
"@ariakit/react": "0.4.41",
|
|
123
124
|
"@headlessui/react": "2.2.10",
|
|
124
|
-
"@radix-ui/react-dialog": "1.1
|
|
125
|
-
"@radix-ui/react-dropdown-menu": "2.1
|
|
126
|
-
"@radix-ui/react-hover-card": "1.1
|
|
127
|
-
"@radix-ui/react-popover": "1.1
|
|
128
|
-
"@radix-ui/react-progress": "1.1
|
|
129
|
-
"@radix-ui/react-select": "2.
|
|
130
|
-
"@radix-ui/react-slider": "1.
|
|
131
|
-
"@radix-ui/react-slot": "1.
|
|
132
|
-
"@radix-ui/react-switch": "1.
|
|
133
|
-
"@radix-ui/react-tabs": "1.1
|
|
134
|
-
"@radix-ui/react-tooltip": "1.
|
|
135
|
-
"@tanstack/react-table": "9.
|
|
136
|
-
"@tanstack/react-virtual": "3.14.
|
|
125
|
+
"@radix-ui/react-dialog": "1.3.1",
|
|
126
|
+
"@radix-ui/react-dropdown-menu": "2.2.1",
|
|
127
|
+
"@radix-ui/react-hover-card": "1.2.1",
|
|
128
|
+
"@radix-ui/react-popover": "1.3.1",
|
|
129
|
+
"@radix-ui/react-progress": "1.2.1",
|
|
130
|
+
"@radix-ui/react-select": "2.4.1",
|
|
131
|
+
"@radix-ui/react-slider": "1.6.1",
|
|
132
|
+
"@radix-ui/react-slot": "1.5.0",
|
|
133
|
+
"@radix-ui/react-switch": "1.4.1",
|
|
134
|
+
"@radix-ui/react-tabs": "1.2.1",
|
|
135
|
+
"@radix-ui/react-tooltip": "1.4.1",
|
|
136
|
+
"@tanstack/react-table": "9.3.1",
|
|
137
|
+
"@tanstack/react-virtual": "3.14.18",
|
|
137
138
|
"class-variance-authority": "0.7.1",
|
|
138
139
|
"cmdk": "1.1.1",
|
|
139
140
|
"d3-scale": "4.0.2",
|
package/dist/alert-OP_-aGJD.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./use-isomorphic-layout-effect-DdTRtMY-.js";import{n as t}from"./compose-refs-sFdxsL7k.js";import{t as n}from"./cx-0HCjnNv1.js";import{t as r}from"./icon-U24NfYv7.js";import{t as i}from"./slot-BsvE2ntj.js";import{t as a}from"./types-D85fCNV3.js";import{t as o}from"./button-Dij5vCQG.js";import{t as s}from"./button-pwkdtR3U.js";import{c}from"react/compiler-runtime";import{CaretDownIcon as l}from"@phosphor-icons/react/CaretDown";import{createContext as u,useContext as d,useEffect as f,useRef as p}from"react";import m from"tiny-invariant";import{jsx as h,jsxs as g}from"react/jsx-runtime";import{CheckCircleIcon as _}from"@phosphor-icons/react/CheckCircle";import{InfoIcon as v}from"@phosphor-icons/react/Info";import{MegaphoneIcon as y}from"@phosphor-icons/react/Megaphone";import{WarningIcon as b}from"@phosphor-icons/react/Warning";import{WarningDiamondIcon as x}from"@phosphor-icons/react/WarningDiamond";import{XIcon as S}from"@phosphor-icons/react/X";import{cva as C}from"class-variance-authority";function w(e){if(e.name===``)return!0;let t=Array.from(e.ownerDocument.querySelectorAll(`input`)).filter(t=>t.type===`radio`&&t.name===e.name&&t.form===e.form&&!t.disabled),n=t.find(e=>e.checked);return n==null?t[0]===e:n===e}function T(e){return!(!(e instanceof HTMLElement)||e.tabIndex<0||e.matches(`:disabled`)||e instanceof HTMLInputElement&&(e.type===`hidden`||e.type===`radio`&&!w(e))||e.closest(`[hidden], [inert]`)!=null||typeof e.checkVisibility==`function`&&!e.checkVisibility({visibilityProperty:!0}))}function E(e){let t=[],n=[];for(let r of e.ownerDocument.querySelectorAll(`a[href], area[href], button, input, select, textarea, iframe, summary, audio[controls], video[controls], [contenteditable]:not([contenteditable="false"]), [tabindex]`))!e.contains(r)&&T(r)&&((e.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_FOLLOWING)===0?n.push(r):t.push(r));return n.reverse(),[...t,...n]}const D=u(null),O=h(S,{});function k(){let e=d(D);return m(e,`useAlertContext hook used outside of Alert parent!`),e}const A=e=>{let t=c(6),{children:n,intent:r,redirectDismissFocus:i}=e,a=i===void 0||i,o;t[0]!==r||t[1]!==a?(o={intent:r,redirectDismissFocus:a},t[0]=r,t[1]=a,t[2]=o):o=t[2];let s=o,l;return t[3]!==n||t[4]!==s?(l=h(D.Provider,{value:s,children:n}),t[3]=n,t[4]=s,t[5]=l):l=t[5],l},j=C(`relative flex w-full gap-1.5 rounded-md border p-2.5 text-sm font-sans`,{variants:{intent:{danger:`border-danger-500/50 bg-danger-500/10 text-danger-700 [&_code]:bg-danger-500/10 [&_code]:border-danger-500/20 [&_code]:text-danger-900 [&_a:not([data-slot=button])]:text-danger-700 [&_a:not([data-slot=button])]:underline`,important:`border-important-500/50 bg-important-500/10 text-important-700 [&_code]:bg-important-500/10 [&_code]:border-important-500/20 [&_code]:text-important-900 [&_a:not([data-slot=button])]:text-important-700 [&_a:not([data-slot=button])]:underline`,info:`border-info-500/50 bg-info-500/10 text-info-700 [&_code]:bg-info-500/10 [&_code]:border-info-500/20 [&_code]:text-info-900 [&_a:not([data-slot=button])]:text-info-700 [&_a:not([data-slot=button])]:underline`,success:`border-success-500/50 bg-success-500/10 text-success-700 [&_code]:bg-success-500/10 [&_code]:border-success-500/20 [&_code]:text-success-900 [&_a:not([data-slot=button])]:text-success-700 [&_a:not([data-slot=button])]:underline`,warning:`border-warning-500/50 bg-warning-500/10 text-warning-700 [&_code]:bg-warning-500/10 [&_code]:border-warning-500/20 [&_code]:text-warning-900 [&_a:not([data-slot=button])]:text-warning-700 [&_a:not([data-slot=button])]:underline`},appearance:{banner:`border-x-0 border-t-0 rounded-none z-50 sticky`,default:``}}}),M=e=>{let t=c(22),r,i,o,s,l,u;t[0]===e?(r=t[1],i=t[2],o=t[3],s=t[4],l=t[5],u=t[6]):({appearance:u,className:r,intent:i,ref:s,style:l,...o}=e,t[0]=e,t[1]=r,t[2]=i,t[3]=o,t[4]=s,t[5]=l,t[6]=u);let d=u===void 0?`default`:u,f;t[7]!==d||t[8]!==r||t[9]!==i?(f=n(j({appearance:d,intent:i}),`has-data-alert-dismiss:pr-10`,`has-data-alert-expand:[&_[data-slot=alert-dismiss-icon-button]]:right-16`,`md:has-data-alert-expand:[&_[data-slot=alert-dismiss-icon-button]]:right-24`,`has-data-alert-expand:[&_[data-slot=alert-content]]:pr-12`,`md:has-data-alert-expand:[&_[data-slot=alert-content]]:pr-[5.5rem]`,r),t[7]=d,t[8]=r,t[9]=i,t[10]=f):f=t[10];let p;t[11]!==i||t[12]!==l?(p=a({"--alert-control-color":R(i),"--alert-control-hover-color":z(i),"--alert-control-hover-bg":B(i),...l}),t[11]=i,t[12]=l,t[13]=p):p=t[13];let m;t[14]!==o||t[15]!==s||t[16]!==f||t[17]!==p?(m=h(`div`,{ref:s,"data-slot":`alert`,className:f,style:p,...o}),t[14]=o,t[15]=s,t[16]=f,t[17]=p,t[18]=m):m=t[18];let g;return t[19]!==i||t[20]!==m?(g=h(A,{intent:i,children:m}),t[19]=i,t[20]=m,t[21]=g):g=t[21],g},N={danger:h(b,{}),important:h(y,{mirrored:!0}),info:h(v,{}),success:h(_,{}),warning:h(x,{})},P=e=>{let t=c(12),i,a,o,s;t[0]===e?(i=t[1],a=t[2],o=t[3],s=t[4]):({className:i,ref:o,svg:s,...a}=e,t[0]=e,t[1]=i,t[2]=a,t[3]=o,t[4]=s);let l=k(),u=N[l.intent],d;t[5]===i?d=t[6]:(d=n(`size-5`,i),t[5]=i,t[6]=d);let f=s??u,p;return t[7]!==a||t[8]!==o||t[9]!==d||t[10]!==f?(p=h(r,{ref:o,"data-slot":`alert-icon`,className:d,svg:f,...a}),t[7]=a,t[8]=o,t[9]=d,t[10]=f,t[11]=p):p=t[11],p},F=e=>{let t=c(10),r,i,a;t[0]===e?(r=t[1],i=t[2],a=t[3]):({className:r,ref:a,...i}=e,t[0]=e,t[1]=r,t[2]=i,t[3]=a);let o;t[4]===r?o=t[5]:(o=n(`min-w-0 flex-1 has-data-alert-dismiss:pr-6`,r),t[4]=r,t[5]=o);let s;return t[6]!==i||t[7]!==a||t[8]!==o?(s=h(`div`,{ref:a,"data-slot":`alert-content`,className:o,...i}),t[6]=i,t[7]=a,t[8]=o,t[9]=s):s=t[9],s},I=e=>{let t=c(12),r,a,o,s;t[0]===e?(r=t[1],a=t[2],o=t[3],s=t[4]):({asChild:s,className:r,ref:o,...a}=e,t[0]=e,t[1]=r,t[2]=a,t[3]=o,t[4]=s);let l=s!==void 0&&s?i:`h5`,u;t[5]===r?u=t[6]:(u=n(`font-medium`,r),t[5]=r,t[6]=u);let d;return t[7]!==l||t[8]!==a||t[9]!==o||t[10]!==u?(d=h(l,{ref:o,"data-slot":`alert-title`,className:u,...a}),t[7]=l,t[8]=a,t[9]=o,t[10]=u,t[11]=d):d=t[11],d},L=e=>{let t=c(12),r,a,o,s;t[0]===e?(r=t[1],a=t[2],o=t[3],s=t[4]):({asChild:s,className:r,ref:o,...a}=e,t[0]=e,t[1]=r,t[2]=a,t[3]=o,t[4]=s);let l=s!==void 0&&s?i:`div`,u;t[5]===r?u=t[6]:(u=n(`text-sm`,r),t[5]=r,t[6]=u);let d;return t[7]!==l||t[8]!==a||t[9]!==o||t[10]!==u?(d=h(l,{ref:o,"data-slot":`alert-description`,className:u,...a}),t[7]=l,t[8]=a,t[9]=o,t[10]=u,t[11]=d):d=t[11],d},R=e=>`var(--color-${e}-700)`,z=e=>`var(--color-${e}-800)`,B=e=>`color-mix(in oklab, var(--color-${e}-500) 10%, transparent)`;function V(t){let n=c(8),{buttonRef:r,enabled:i}=t,a;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=[],n[0]=a):a=n[0];let o=p(a),s,l;n[1]!==r||n[2]!==i?(s=()=>{if(i)return()=>{let e=r.current;if(e==null||document.activeElement!==e)return;let t=e.closest(`[data-slot~="alert"]`)??e;o.current=E(t)}},l=[r,i],n[1]=r,n[2]=i,n[3]=s,n[4]=l):(s=n[3],l=n[4]),e(s,l);let u,d;n[5]===i?(u=n[6],d=n[7]):(u=()=>{if(i)return()=>{let e=o.current;if(o.current=[],e.length===0)return;let{activeElement:t}=document;if(t==null||t===document.body){for(let t of e)if(t.isConnected&&T(t)&&(t.focus(),document.activeElement===t))return}}},d=[i],n[5]=i,n[6]=u,n[7]=d),f(u,d)}const H={Root:M,Content:F,ExpandButton:e=>{let t=c(21),r,i,a,s;t[0]===e?(r=t[1],i=t[2],a=t[3],s=t[4]):({count:i,expanded:a,className:r,...s}=e,t[0]=e,t[1]=r,t[2]=i,t[3]=a,t[4]=s);let u=a?`Collapse additional alerts`:`Show ${i} more ${i===1?`alert`:`alerts`}`,d=a&&`-rotate-180`,f;t[5]===d?f=t[6]:(f=n(`size-4 transition-transform ease-out duration-150`,d),t[5]=d,t[6]=f);let p;t[7]===f?p=t[8]:(p=h(l,{weight:`bold`,className:f}),t[7]=f,t[8]=p);let m;t[9]===r?m=t[10]:(m=n(`right-1.5 top-1.5 absolute gap-1 ps-1.5 pe-1`,`text-[var(--alert-control-color,currentColor)]`,`not-disabled:hover:bg-[var(--alert-control-hover-bg,transparent)] not-disabled:hover:text-[var(--alert-control-hover-color,currentColor)]`,r),t[9]=r,t[10]=m);let _;t[11]===i?_=t[12]:(_=g(`span`,{className:`min-w-[2ch] text-center tabular-nums`,children:[`+`,i]}),t[11]=i,t[12]=_);let v;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(v=h(`span`,{className:`hidden md:inline`,children:`more`}),t[13]=v):v=t[13];let y;return t[14]!==a||t[15]!==s||t[16]!==u||t[17]!==p||t[18]!==m||t[19]!==_?(y=g(o,{type:`button`,appearance:`ghost`,intent:`neutral`,size:`sm`,"aria-expanded":a,"aria-label":u,"data-slot":`alert-expand-button`,"data-alert-expand":!0,icon:p,iconPlacement:`end`,className:m,...s,children:[_,v]}),t[14]=a,t[15]=s,t[16]=u,t[17]=p,t[18]=m,t[19]=_,t[20]=y):y=t[20],y},Description:L,DismissIconButton:e=>{let r=c(22),i,a,o,l,u,f,m,g;r[0]===e?(i=r[1],a=r[2],o=r[3],l=r[4],u=r[5],f=r[6],m=r[7],g=r[8]):({size:l,type:u,label:f,appearance:m,className:i,icon:g,ref:o,...a}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=o,r[4]=l,r[5]=u,r[6]=f,r[7]=m,r[8]=g);let _=l===void 0?`sm`:l,v=u===void 0?`button`:u,y=f===void 0?`Dismiss Alert`:f,b=m===void 0?`ghost`:m,x=g===void 0?O:g,S=d(D),C=p(null),w=t(C,o),T=S?.redirectDismissFocus??!0,E;r[9]===T?E=r[10]:(E={buttonRef:C,enabled:T},r[9]=T,r[10]=E),V(E);let k;r[11]===i?k=r[12]:(k=n(`right-1.5 top-1.5 absolute`,`text-[var(--alert-control-color,currentColor)]`,`not-disabled:hover:bg-[var(--alert-control-hover-bg,transparent)] not-disabled:hover:text-[var(--alert-control-hover-color,currentColor)]`,i),r[11]=i,r[12]=k);let A;return r[13]!==b||r[14]!==w||r[15]!==x||r[16]!==y||r[17]!==a||r[18]!==_||r[19]!==k||r[20]!==v?(A=h(s,{ref:w,appearance:b,icon:x,intent:`neutral`,label:y,size:_,"data-slot":`alert-dismiss-icon-button`,"data-alert-dismiss":!0,className:k,type:v,...a}),r[13]=b,r[14]=w,r[15]=x,r[16]=y,r[17]=a,r[18]=_,r[19]=k,r[20]=v,r[21]=A):A=r[21],A},Icon:P,Title:I};export{A as n,H as t};
|
package/dist/anchor-BnMhJYS4.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./cx-0HCjnNv1.js";import{t}from"./icon-BT8FnkkJ.js";import{t as n}from"./data-slot-EM6s2WEU.js";import{t as r}from"./slot-BsvE2ntj.js";import{c as i}from"react/compiler-runtime";import{Children as a,cloneElement 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";const f=t=>e(`cursor-pointer rounded bg-transparent text-accent-600 hover:underline focus:outline-hidden focus-visible:ring-3 focus-visible:ring-focus-accent`,t),p=e=>{let p=i(72),g,_,v,y,b,x,S,C,w;p[0]===e?(g=p[1],_=p[2],v=p[3],y=p[4],b=p[5],x=p[6],S=p[7],C=p[8],w=p[9]):({"data-slot":y,asChild:g,children:_,className:v,rel:x,icon:b,iconPlacement:w,ref:C,...S}=e,p[0]=e,p[1]=g,p[2]=_,p[3]=v,p[4]=y,p[5]=b,p[6]=x,p[7]=S,p[8]=C,p[9]=w);let T=w===void 0?`start`:w,E;p[10]===x?E=p[11]:(E=h(x),p[10]=x,p[11]=E);let D=E;if(g){let e,i,h,g,x,w,E;if(p[12]!==_||p[13]!==v||p[14]!==y||p[15]!==b||p[16]!==T||p[17]!==S||p[18]!==C||p[19]!==D){let O=a.only(_);c(s(O),"When using `asChild`, Anchor must be passed a single child as a JSX tag.");let k=O.props?.children,A=S.target===`_blank`||O.props?.target===`_blank`;e=r,p[27]===y?i=p[28]:(i=n(y,`anchor`),p[27]=y,p[28]=i),p[29]===v?h=p[30]:(h=f(v),p[29]=v,p[30]=h),g=C,p[31]!==A||p[32]!==D?(x=D??m(A),p[31]=A,p[32]=D,p[33]=x):x=p[33],w=S;let j;p[34]!==b||p[35]!==T?(j=b&&T===`start`&&u(t,{className:`inline-block mr-1.5`,svg:b}),p[34]=b,p[35]=T,p[36]=j):j=p[36];let M;p[37]!==b||p[38]!==T?(M=b&&T===`end`&&u(t,{className:`inline-block ml-1.5`,svg:b}),p[37]=b,p[38]=T,p[39]=M):M=p[39],E=o(O,{},d(l,{children:[j,u(`span`,{"data-slot":`anchor-label`,children:k}),M]})),p[12]=_,p[13]=v,p[14]=y,p[15]=b,p[16]=T,p[17]=S,p[18]=C,p[19]=D,p[20]=e,p[21]=i,p[22]=h,p[23]=g,p[24]=x,p[25]=w,p[26]=E}else e=p[20],i=p[21],h=p[22],g=p[23],x=p[24],w=p[25],E=p[26];let O;return p[40]!==e||p[41]!==i||p[42]!==h||p[43]!==g||p[44]!==x||p[45]!==w||p[46]!==E?(O=u(e,{"data-slot":i,className:h,ref:g,rel:x,...w,children:E}),p[40]=e,p[41]=i,p[42]=h,p[43]=g,p[44]=x,p[45]=w,p[46]=E,p[47]=O):O=p[47],O}let O;p[48]===y?O=p[49]:(O=n(y,`anchor`),p[48]=y,p[49]=O);let k;p[50]===v?k=p[51]:(k=f(v),p[50]=v,p[51]=k);let A;p[52]!==S||p[53]!==D?(A=D??m(S.target===`_blank`),p[52]=S,p[53]=D,p[54]=A):A=p[54];let j;p[55]!==b||p[56]!==T?(j=b&&T===`start`&&u(t,{className:`inline-block mr-1.5`,svg:b}),p[55]=b,p[56]=T,p[57]=j):j=p[57];let M;p[58]===_?M=p[59]:(M=u(`span`,{"data-slot":`anchor-label`,children:_}),p[58]=_,p[59]=M);let N;p[60]!==b||p[61]!==T?(N=b&&T===`end`&&u(t,{className:`inline-block ml-1.5`,svg:b}),p[60]=b,p[61]=T,p[62]=N):N=p[62];let P;return p[63]!==S||p[64]!==C||p[65]!==O||p[66]!==k||p[67]!==A||p[68]!==j||p[69]!==M||p[70]!==N?(P=d(`a`,{"data-slot":O,className:k,ref:C,rel:A,...S,children:[j,M,N]}),p[63]=S,p[64]=C,p[65]=O,p[66]=k,p[67]=A,p[68]=j,p[69]=M,p[70]=N,p[71]=P):P=p[71],P};function m(e){return e?`noopener noreferrer`:void 0}function h(e){return Array.isArray(e)?[...new Set(e)].map(e=>e?.trim()).filter(Boolean).toSorted().join(` `)||void 0:e?.trim()||void 0}export{f as n,h as r,p as t};
|
package/dist/button-BFpCB99R.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./cx-0HCjnNv1.js";import{t}from"./slot-BsvE2ntj.js";import{c as n}from"react/compiler-runtime";import{jsx as r}from"react/jsx-runtime";import{cva as i}from"class-variance-authority";const a=i(`border-form inline-flex items-center rounded-md`,{variants:{appearance:{panel:`bg-form gap-0.5 border p-0.75 [--icon-button-border-radius:0.125rem] [&>.separator]:mx-px`,ghost:`gap-0.5`,outlined:``}}}),o=i=>{let o=n(16),s,c,l,u,d,f;o[0]===i?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5],f=o[6]):({appearance:s,asChild:c,className:u,children:l,ref:f,...d}=i,o[0]=i,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d,o[6]=f);let p=c?t:`div`,m;o[7]!==s||o[8]!==u?(m=e(a({appearance:s}),u),o[7]=s,o[8]=u,o[9]=m):m=o[9];let h;return o[10]!==p||o[11]!==l||o[12]!==d||o[13]!==f||o[14]!==m?(h=r(p,{"data-slot":`button-group`,className:m,ref:f,...d,children:l}),o[10]=p,o[11]=l,o[12]=d,o[13]=f,o[14]=m,o[15]=h):h=o[15],h};export{o as t};
|
package/dist/button-Dij5vCQG.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./cx-0HCjnNv1.js";import{t}from"./icon-BT8FnkkJ.js";import{t as n}from"./slot-BsvE2ntj.js";import{t as r}from"./booleanish-BfvnW6vy.js";import{t as i}from"./clsx-DUGZgXfJ.js";import{c as a}from"react/compiler-runtime";import{Children as o,cloneElement as s,isValidElement as c}from"react";import l from"tiny-invariant";import{Fragment as u,jsx as d,jsxs as f}from"react/jsx-runtime";import{cva as p}from"class-variance-authority";import{CircleNotchIcon as m}from"@phosphor-icons/react/CircleNotch";const h=p(``,{variants:{appearance:{filled:`bg-filled-accent text-white focus-visible:ring-focus-accent not-disabled:hover:bg-filled-accent-hover border border-transparent text-sm font-medium`,ghost:`text-accent-600 focus-visible:ring-focus-accent not-disabled:hover:bg-accent-500/10 not-disabled:hover:text-accent-700 border border-transparent text-sm font-medium`,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 border text-sm font-medium`,link:`text-accent-600 focus-visible:ring-focus-accent not-disabled:hover:underline group/button-link border-transparent`},isLoading:{false:``,true:`opacity-50`},intent:{accent:``,danger:``,neutral:``},size:{xs:``,sm:``,md:``,lg:``,xl:``}},defaultVariants:{isLoading:!1,size:`md`},compoundVariants:[{appearance:[`filled`,`ghost`,`outlined`],size:`xs`,class:`h-6 px-2`},{appearance:[`filled`,`ghost`,`outlined`],size:`sm`,class:`h-7 px-2.5`},{appearance:[`filled`,`ghost`,`outlined`],size:`md`,class:`h-9 px-3`},{appearance:[`filled`,`ghost`,`outlined`],size:`lg`,class:`h-10 px-3.5`},{appearance:[`filled`,`ghost`,`outlined`],size:`xl`,class:`h-12 px-4`},{appearance:`ghost`,intent:`danger`,class:`text-danger-600 focus-visible:ring-focus-danger not-disabled:hover:bg-danger-500/10 not-disabled:hover:text-danger-700 border-transparent`},{appearance:`outlined`,intent:`danger`,class:`border-danger-600 bg-form text-danger-600 focus-visible:ring-focus-danger not-disabled:hover:border-danger-700 not-disabled:hover:bg-danger-500/10 not-disabled:hover:text-danger-700`},{appearance:`filled`,intent:`danger`,class:`bg-filled-danger focus-visible:ring-focus-danger not-disabled:hover:bg-filled-danger-hover border-transparent`},{appearance:`link`,intent:`danger`,class:`text-danger-600 focus-visible:ring-focus-danger`},{appearance:`ghost`,intent:`neutral`,class:`text-strong focus-visible:ring-focus-accent not-disabled:hover:bg-neutral-500/10 not-disabled:hover:text-strong border-transparent`},{appearance:`outlined`,intent:`neutral`,class:`border-form bg-form text-strong focus-visible:border-accent-600 focus-visible:ring-focus-accent not-disabled:hover:border-neutral-400 not-disabled:hover:bg-form-hover not-disabled:hover:text-strong focus-visible:not-disabled:hover:border-accent-600 focus-visible:not-disabled:active:border-accent-600`},{appearance:`filled`,intent:`neutral`,class:`bg-filled-neutral not-disabled:hover:bg-filled-neutral-hover border-transparent focus-visible:border-transparent text-neutral-50`},{appearance:`link`,intent:`neutral`,class:`text-strong focus-visible:ring-focus-accent`}]}),g={xs:`ps-1.5`,sm:`ps-2`,md:`ps-2.5`,lg:`ps-3`,xl:`ps-3.5`},_={xs:`pe-1.5`,sm:`pe-2`,md:`pe-2.5`,lg:`pe-3`,xl:`pe-3.5`},v=p=>{let v=a(66),b,x,S,C,w,T,E,D,O,k,A,j,M,N;v[0]===p?(b=v[1],x=v[2],S=v[3],C=v[4],w=v[5],T=v[6],E=v[7],D=v[8],O=v[9],k=v[10],A=v[11],j=v[12],M=v[13],N=v[14]):({"aria-disabled":b,appearance:S,asChild:C,children:w,className:T,disabled:x,icon:D,iconPlacement:A,intent:E,isLoading:j,ref:k,size:M,type:N,...O}=p,v[0]=p,v[1]=b,v[2]=x,v[3]=S,v[4]=C,v[5]=w,v[6]=T,v[7]=E,v[8]=D,v[9]=O,v[10]=k,v[11]=A,v[12]=j,v[13]=M,v[14]=N);let P=A===void 0?`start`:A,F=j!==void 0&&j,I=M===void 0?`md`:M,L;v[15]!==b||v[16]!==x||v[17]!==F?(L=r(x??F)||r(b),v[15]=b,v[16]=x,v[17]=F,v[18]=L):L=v[18];let R=L,z;v[19]!==F||v[20]!==D?(z=F?d(m,{className:`animate-spin`}):D,v[19]=F,v[20]=D,v[21]=z):z=v[21];let B=z,V=B&&S!==`link`,H;v[22]!==S||v[23]!==T||v[24]!==V||v[25]!==P||v[26]!==E||v[27]!==F||v[28]!==I?(H=e(`inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-md`,`focus:outline-hidden focus-visible:ring-4`,`disabled:cursor-default disabled:opacity-50`,`aria-disabled:cursor-default aria-disabled:opacity-50`,`not-disabled:active:scale-97 ease-out transition-transform duration-150`,h({appearance:S,intent:E,isLoading:F,size:I}),S!==`link`&&`font-sans`,V&&P===`start`&&g[I],V&&P===`end`&&_[I],T),v[22]=S,v[23]=T,v[24]=V,v[25]=P,v[26]=E,v[27]=F,v[28]=I,v[29]=H):H=v[29];let U=S===`link`?void 0:I,W;v[30]!==S||v[31]!==R||v[32]!==E||v[33]!==F||v[34]!==O||v[35]!==k||v[36]!==H||v[37]!==U?(W={"aria-disabled":R,"data-slot":`button`,className:H,"data-appearance":S,"data-disabled":R,"data-intent":E,"data-loading":F,"data-size":U,ref:k,...O},v[30]=S,v[31]=R,v[32]=E,v[33]=F,v[34]=O,v[35]=k,v[36]=H,v[37]=U,v[38]=W):W=v[38];let G=W;if(C){l(c(w)&&o.only(w),"When using `asChild`, Button must be passed a single child as a JSX tag.");let e;if(v[39]!==w||v[40]!==R||v[41]!==B||v[42]!==P){let n;v[44]!==B||v[45]!==P?(n=B&&d(t,{svg:B,className:i(P===`end`&&`order-last`)}),v[44]=B,v[45]=P,v[46]=n):n=v[46];let r;v[47]===w.props.children?r=v[48]:(r=d(`span`,{"data-slot":`button-label`,className:`contents`,children:w.props.children}),v[47]=w.props.children,v[48]=r);let a;v[49]!==n||v[50]!==r?(a=f(u,{children:[n,r]}),v[49]=n,v[50]=r,v[51]=a):a=v[51],e=s(w,R?y:{},a),v[39]=w,v[40]=R,v[41]=B,v[42]=P,v[43]=e}else e=v[43];let r;return v[52]!==G||v[53]!==e?(r=d(n,{...G,children:e}),v[52]=G,v[53]=e,v[54]=r):r=v[54],r}let K=N??`button`,q;v[55]!==B||v[56]!==P?(q=B&&d(t,{svg:B,className:i(P===`end`&&`order-last`)}),v[55]=B,v[56]=P,v[57]=q):q=v[57];let J;v[58]===w?J=v[59]:(J=d(`span`,{"data-slot":`button-label`,className:`contents`,children:w}),v[58]=w,v[59]=J);let Y;return v[60]!==G||v[61]!==R||v[62]!==q||v[63]!==J||v[64]!==K?(Y=f(`button`,{...G,disabled:R,type:K,children:[q,J]}),v[60]=G,v[61]=R,v[62]=q,v[63]=J,v[64]=K,v[65]=Y):Y=v[65],Y},y={tabIndex:-1,onClickCapture:e=>{e.preventDefault(),e.stopPropagation()}};export{y as n,v as t};
|
package/dist/button-pwkdtR3U.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./cx-0HCjnNv1.js";import{t}from"./icon-BT8FnkkJ.js";import{t as n}from"./slot-BsvE2ntj.js";import{t as r}from"./booleanish-BfvnW6vy.js";import{n as i}from"./button-Dij5vCQG.js";import{t as a}from"./button-B52_vczK.js";import{c as o}from"react/compiler-runtime";import{Children as s,cloneElement as c,isValidElement as l}from"react";import u from"tiny-invariant";import{jsx as d}from"react/jsx-runtime";import{CircleNotchIcon as f}from"@phosphor-icons/react/CircleNotch";const p=p=>{let m=o(52),h,g,_,v,y,b,x,S,C,w,T,E,D,O;m[0]===p?(h=m[1],g=m[2],_=m[3],v=m[4],y=m[5],b=m[6],x=m[7],S=m[8],C=m[9],w=m[10],T=m[11],E=m[12],D=m[13],O=m[14]):({"aria-disabled":h,appearance:_,asChild:T,children:v,className:y,disabled:g,icon:S,intent:b,isLoading:E,label:x,ref:w,size:D,type:O,...C}=p,m[0]=p,m[1]=h,m[2]=g,m[3]=_,m[4]=v,m[5]=y,m[6]=b,m[7]=x,m[8]=S,m[9]=C,m[10]=w,m[11]=T,m[12]=E,m[13]=D,m[14]=O);let k=T!==void 0&&T,A=E!==void 0&&E,j=D===void 0?`md`:D,M;m[15]!==h||m[16]!==g||m[17]!==A?(M=r(g??A)||r(h),m[15]=h,m[16]=g,m[17]=A,m[18]=M):M=m[18];let N=M,P;m[19]!==A||m[20]!==S?(P=A?d(f,{className:`animate-spin`}):S,m[19]=A,m[20]=S,m[21]=P):P=m[21];let F=P,I;m[22]!==_||m[23]!==y||m[24]!==b||m[25]!==A||m[26]!==j?(I=e(a({appearance:_,intent:b,isLoading:A,size:j}),y),m[22]=_,m[23]=y,m[24]=b,m[25]=A,m[26]=j,m[27]=I):I=m[27];let L;m[28]!==_||m[29]!==N||m[30]!==b||m[31]!==A||m[32]!==x||m[33]!==C||m[34]!==w||m[35]!==j||m[36]!==I?(L={"aria-disabled":N,"data-slot":`icon-button`,className:I,"data-appearance":_,"data-disabled":N,"data-icon-button":!0,"data-intent":b,"data-loading":A,"data-size":j,ref:w,...C,"aria-label":x},m[28]=_,m[29]=N,m[30]=b,m[31]=A,m[32]=x,m[33]=C,m[34]=w,m[35]=j,m[36]=I,m[37]=L):L=m[37];let R=L,z;m[38]===F?z=m[39]:(z=d(t,{svg:F}),m[38]=F,m[39]=z);let B=z;if(k){u(l(v)&&s.only(v),"When using `asChild`, IconButton must be passed a single child as a JSX tag.");let e;m[40]!==v||m[41]!==N||m[42]!==B?(e=c(v,N?i:{},B),m[40]=v,m[41]=N,m[42]=B,m[43]=e):e=m[43];let t;return m[44]!==R||m[45]!==e?(t=d(n,{...R,children:e}),m[44]=R,m[45]=e,m[46]=t):t=m[46],t}let V=O??`button`,H;return m[47]!==R||m[48]!==N||m[49]!==B||m[50]!==V?(H=d(`button`,{...R,disabled:N,type:V,children:B}),m[47]=R,m[48]=N,m[49]=B,m[50]=V,m[51]=H):H=m[51],H};export{p as t};
|