@ngrok/mantle 0.86.2 → 0.86.3
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/agent.json +1 -1
- package/dist/alert-dialog.d.ts +1 -1
- package/dist/alert-dialog.js +1 -1
- package/dist/combobox.d.ts +13 -13
- package/dist/combobox.js +1 -1
- package/dist/command.d.ts +1 -1
- package/dist/command.js +1 -1
- package/dist/dialog-CZYD3xL-.d.ts +30 -0
- package/dist/{dialog-Ddhwzen3.js → dialog-D8Bb_pil.js} +1 -1
- package/dist/{dialog-CtLI_uex.d.ts → dialog-DXpqpdJj.d.ts} +1 -1
- package/dist/dialog.d.ts +2 -2
- package/dist/dialog.js +1 -1
- package/dist/dropdown-menu-BR_AQNMj.js +1 -0
- package/dist/{dropdown-menu-DhwzMnoH.d.ts → dropdown-menu-BloQKE_y.d.ts} +27 -27
- package/dist/dropdown-menu-Dlpb7600.d.ts +1 -0
- package/dist/dropdown-menu.d.ts +2 -2
- package/dist/dropdown-menu.js +1 -1
- package/dist/field.d.ts +1 -1
- package/dist/field.js +1 -1
- package/dist/hover-card.d.ts +12 -12
- package/dist/hover-card.js +1 -1
- package/dist/layer-container.d.ts +4 -4
- package/dist/llms.txt +1 -1
- package/dist/multi-select.d.ts +7 -7
- package/dist/multi-select.js +1 -1
- package/dist/pagination.d.ts +1 -1
- package/dist/pagination.js +1 -1
- package/dist/popover-BJ5XNwzD.js +1 -0
- package/dist/{popover-s2LhmzfQ.d.ts → popover-Cco1nw8I.d.ts} +11 -11
- package/dist/popover.d.ts +1 -1
- package/dist/popover.js +1 -1
- package/dist/primitive-vXDjYdbu.js +1 -0
- package/dist/progress.d.ts +10 -10
- package/dist/progress.js +1 -1
- package/dist/{select-DMlziWUZ.d.ts → select-BITJP7I5.d.ts} +19 -19
- package/dist/select-CUWLEeuf.js +1 -0
- package/dist/select.d.ts +1 -1
- package/dist/select.js +1 -1
- package/dist/{sheet-D8KGX4q1.js → sheet-CIgu6vwS.js} +1 -1
- package/dist/sheet.d.ts +1 -1
- package/dist/sheet.js +1 -1
- package/dist/sidebar.d.ts +1 -1
- package/dist/sidebar.js +1 -1
- package/dist/slider.d.ts +2 -2
- package/dist/slider.js +1 -1
- package/dist/split-button.d.ts +1 -1
- package/dist/split-button.js +1 -1
- package/dist/theme-switcher.d.ts +2 -2
- package/dist/theme-switcher.js +1 -1
- package/dist/toast.d.ts +2 -2
- package/dist/toast.js +1 -1
- package/dist/tooltip-H03l7E4Y.js +1 -0
- package/dist/{tooltip-CfsA_JPe.d.ts → tooltip-nuUCoqq8.d.ts} +9 -9
- package/dist/tooltip.d.ts +1 -1
- package/dist/tooltip.js +1 -1
- package/package.json +1 -1
- package/dist/dialog-B8YvfyIo.d.ts +0 -32
- package/dist/dropdown-menu-BSOdApBD.d.ts +0 -1
- package/dist/dropdown-menu-Bir-GKUs.js +0 -1
- package/dist/popover-H_1pLGLc.js +0 -1
- package/dist/primitive-C5AerOO8.js +0 -1
- package/dist/select-DX72zQN2.js +0 -1
- package/dist/tooltip-CHgJAU6j.js +0 -1
|
@@ -2,7 +2,7 @@ import { t as WithDataSlot } from "./data-slot-CChfb_cv.js";
|
|
|
2
2
|
import { o as WithValidation } from "./field-7QeiTFwl.js";
|
|
3
3
|
import { n as Separator } from "./separator-Bo4nY_3M.js";
|
|
4
4
|
import { ComponentProps, FocusEvent, PropsWithChildren, ReactNode, Ref, SelectHTMLAttributes } from "react";
|
|
5
|
-
import
|
|
5
|
+
import { Content, Group, Item, Label, Trigger, Value } from "@radix-ui/react-select";
|
|
6
6
|
//#region src/components/select/select.d.ts
|
|
7
7
|
type WithAriaInvalid = Pick<SelectHTMLAttributes<HTMLSelectElement>, "aria-invalid">;
|
|
8
8
|
type SelectProps = PropsWithChildren & {
|
|
@@ -124,7 +124,7 @@ type SelectProps = PropsWithChildren & {
|
|
|
124
124
|
* </Select.Root>
|
|
125
125
|
* ```
|
|
126
126
|
*/
|
|
127
|
-
declare const Root: ({ "aria-invalid": _ariaInvalid, children, id, validation, onBlur, onValueChange, onChange, ref, ...props }: SelectProps) => import("react").JSX.Element;
|
|
127
|
+
declare const Root$1: ({ "aria-invalid": _ariaInvalid, children, id, validation, onBlur, onValueChange, onChange, ref, ...props }: SelectProps) => import("react").JSX.Element;
|
|
128
128
|
/**
|
|
129
129
|
* A group of related options within a select menu. Similar to an html `<optgroup>` element.
|
|
130
130
|
* Pair it with `Select.Label`, which gives the group its accessible name.
|
|
@@ -158,8 +158,8 @@ declare const Root: ({ "aria-invalid": _ariaInvalid, children, id, validation, o
|
|
|
158
158
|
* </Select.Root>
|
|
159
159
|
* ```
|
|
160
160
|
*/
|
|
161
|
-
declare const Group: ({ className, "data-slot": dataSlot, ref, ...props }: ComponentProps<typeof
|
|
162
|
-
type SelectValueProps = ComponentProps<typeof
|
|
161
|
+
declare const Group$1: ({ className, "data-slot": dataSlot, ref, ...props }: ComponentProps<typeof Group> & WithDataSlot) => import("react").JSX.Element;
|
|
162
|
+
type SelectValueProps = ComponentProps<typeof Value> & WithDataSlot;
|
|
163
163
|
/**
|
|
164
164
|
* The part that reflects the selected value. Renders the selected item's text
|
|
165
165
|
* by default. For more control, control the select and pass your own children.
|
|
@@ -211,11 +211,11 @@ type SelectValueProps = ComponentProps<typeof SelectPrimitive.Value> & WithDataS
|
|
|
211
211
|
* </Select.Root>
|
|
212
212
|
* ```
|
|
213
213
|
*/
|
|
214
|
-
declare const Value: ({ asChild, children, "data-slot": dataSlot, placeholder, ref, ...props }: SelectValueProps) => import("react").JSX.Element;
|
|
214
|
+
declare const Value$1: ({ asChild, children, "data-slot": dataSlot, placeholder, ref, ...props }: SelectValueProps) => import("react").JSX.Element;
|
|
215
215
|
/**
|
|
216
216
|
* Props for `Select.Trigger`.
|
|
217
217
|
*/
|
|
218
|
-
type SelectTriggerProps = ComponentProps<typeof
|
|
218
|
+
type SelectTriggerProps = ComponentProps<typeof Trigger> & WithAriaInvalid & WithDataSlot & WithValidation;
|
|
219
219
|
/**
|
|
220
220
|
* The button that toggles the select. The Select.Content will position itself adjacent to the trigger.
|
|
221
221
|
* When composing with `Field.Item`, wrap `Select.Root` in `Field.Control`:
|
|
@@ -270,13 +270,13 @@ type SelectTriggerProps = ComponentProps<typeof SelectPrimitive.Trigger> & WithA
|
|
|
270
270
|
* </Select.Root>
|
|
271
271
|
* ```
|
|
272
272
|
*/
|
|
273
|
-
declare const Trigger: ({ "aria-invalid": ariaInValidProp, className, children, "data-slot": dataSlot, id: propId, onBlur, ref, validation: propValidation, ...props }: SelectTriggerProps) => import("react").JSX.Element;
|
|
273
|
+
declare const Trigger$1: ({ "aria-invalid": ariaInValidProp, className, children, "data-slot": dataSlot, id: propId, onBlur, ref, validation: propValidation, ...props }: SelectTriggerProps) => import("react").JSX.Element;
|
|
274
274
|
/**
|
|
275
275
|
* Props for `Select.Content`. `asChild` is omitted: the content renders its
|
|
276
276
|
* scroll buttons and viewport around `children`, so a slot would receive more
|
|
277
277
|
* than one element and throw.
|
|
278
278
|
*/
|
|
279
|
-
type SelectContentProps = Omit<ComponentProps<typeof
|
|
279
|
+
type SelectContentProps = Omit<ComponentProps<typeof Content>, "asChild"> & WithDataSlot & {
|
|
280
280
|
/**
|
|
281
281
|
* The width of the content. Defaults to the width of the trigger.
|
|
282
282
|
* If set to "content", the content takes its intrinsic width: the width of the widest item.
|
|
@@ -333,7 +333,7 @@ type SelectContentProps = Omit<ComponentProps<typeof SelectPrimitive.Content>, "
|
|
|
333
333
|
* </Select.Root>
|
|
334
334
|
* ```
|
|
335
335
|
*/
|
|
336
|
-
declare const Content: ({ className, children, "data-slot": dataSlot, position, ref, width, ...props }: SelectContentProps) => import("react").JSX.Element;
|
|
336
|
+
declare const Content$1: ({ className, children, "data-slot": dataSlot, position, ref, width, ...props }: SelectContentProps) => import("react").JSX.Element;
|
|
337
337
|
/**
|
|
338
338
|
* Used to render the label of a group. It won't be focusable using arrow keys.
|
|
339
339
|
*
|
|
@@ -366,11 +366,11 @@ declare const Content: ({ className, children, "data-slot": dataSlot, position,
|
|
|
366
366
|
* </Select.Root>
|
|
367
367
|
* ```
|
|
368
368
|
*/
|
|
369
|
-
declare const Label: ({ className, "data-slot": dataSlot, ref, ...props }: ComponentProps<typeof
|
|
369
|
+
declare const Label$1: ({ className, "data-slot": dataSlot, ref, ...props }: ComponentProps<typeof Label> & WithDataSlot) => import("react").JSX.Element;
|
|
370
370
|
/**
|
|
371
371
|
* Props for `Select.Item`.
|
|
372
372
|
*/
|
|
373
|
-
type SelectItemProps = ComponentProps<typeof
|
|
373
|
+
type SelectItemProps = ComponentProps<typeof Item> & WithDataSlot & {
|
|
374
374
|
/**
|
|
375
375
|
* An optional icon rendered before the item text.
|
|
376
376
|
*/
|
|
@@ -431,7 +431,7 @@ type SelectItemProps = ComponentProps<typeof SelectPrimitive.Item> & WithDataSlo
|
|
|
431
431
|
* </Select.Root>
|
|
432
432
|
* ```
|
|
433
433
|
*/
|
|
434
|
-
declare const Item: ({ className, children, "data-slot": dataSlot, icon, ref, translate, ...props }: SelectItemProps) => import("react").JSX.Element;
|
|
434
|
+
declare const Item$1: ({ className, children, "data-slot": dataSlot, icon, ref, translate, ...props }: SelectItemProps) => import("react").JSX.Element;
|
|
435
435
|
/**
|
|
436
436
|
* Used to visually separate items or groups of items in the select content.
|
|
437
437
|
*
|
|
@@ -565,7 +565,7 @@ declare const Select: {
|
|
|
565
565
|
* </Select.Root>
|
|
566
566
|
* ```
|
|
567
567
|
*/
|
|
568
|
-
readonly Root: typeof Root;
|
|
568
|
+
readonly Root: typeof Root$1;
|
|
569
569
|
/**
|
|
570
570
|
* The component that pops out when the select is open as a portal adjacent to the trigger button.
|
|
571
571
|
* It contains a scrolling viewport of the select items. `position` defaults to
|
|
@@ -615,7 +615,7 @@ declare const Select: {
|
|
|
615
615
|
* </Select.Root>
|
|
616
616
|
* ```
|
|
617
617
|
*/
|
|
618
|
-
readonly Content: typeof Content;
|
|
618
|
+
readonly Content: typeof Content$1;
|
|
619
619
|
/**
|
|
620
620
|
* A group of related options within a select menu. Similar to an html `<optgroup>` element.
|
|
621
621
|
* Pair it with `Select.Label`, which gives the group its accessible name.
|
|
@@ -649,7 +649,7 @@ declare const Select: {
|
|
|
649
649
|
* </Select.Root>
|
|
650
650
|
* ```
|
|
651
651
|
*/
|
|
652
|
-
readonly Group: typeof Group;
|
|
652
|
+
readonly Group: typeof Group$1;
|
|
653
653
|
/**
|
|
654
654
|
* An option within a select menu. Similar to an html `<option>` element.
|
|
655
655
|
* Has a required `value` prop. When a user selects this item, `Select.Root`
|
|
@@ -705,7 +705,7 @@ declare const Select: {
|
|
|
705
705
|
* </Select.Root>
|
|
706
706
|
* ```
|
|
707
707
|
*/
|
|
708
|
-
readonly Item: typeof Item;
|
|
708
|
+
readonly Item: typeof Item$1;
|
|
709
709
|
/**
|
|
710
710
|
* Used to render the label of a group. It won't be focusable using arrow keys.
|
|
711
711
|
*
|
|
@@ -738,7 +738,7 @@ declare const Select: {
|
|
|
738
738
|
* </Select.Root>
|
|
739
739
|
* ```
|
|
740
740
|
*/
|
|
741
|
-
readonly Label: typeof Label;
|
|
741
|
+
readonly Label: typeof Label$1;
|
|
742
742
|
/**
|
|
743
743
|
* Used to visually separate items or groups of items in the select content.
|
|
744
744
|
*
|
|
@@ -826,7 +826,7 @@ declare const Select: {
|
|
|
826
826
|
* </Select.Root>
|
|
827
827
|
* ```
|
|
828
828
|
*/
|
|
829
|
-
readonly Trigger: typeof Trigger;
|
|
829
|
+
readonly Trigger: typeof Trigger$1;
|
|
830
830
|
/**
|
|
831
831
|
* The part that reflects the selected value. Renders the selected item's text
|
|
832
832
|
* by default. For more control, control the select and pass your own children.
|
|
@@ -878,7 +878,7 @@ declare const Select: {
|
|
|
878
878
|
* </Select.Root>
|
|
879
879
|
* ```
|
|
880
880
|
*/
|
|
881
|
-
readonly Value: typeof Value;
|
|
881
|
+
readonly Value: typeof Value$1;
|
|
882
882
|
};
|
|
883
883
|
//#endregion
|
|
884
884
|
export { Select as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./compose-refs-sFdxsL7k.js";import{t}from"./cx-0HCjnNv1.js";import{t as n}from"./icon-BT8FnkkJ.js";import{t as r}from"./data-slot-EM6s2WEU.js";import{r as i}from"./layer-container-R7aux3n8.js";import{a,r as o}from"./field-Bpptk_9t.js";import{t as s}from"./field-B1wqeZr4.js";import{n as c}from"./separator-D98be0gY.js";import{c as l}from"react/compiler-runtime";import{CaretDownIcon as u}from"@phosphor-icons/react/CaretDown";import{createContext as d,useContext as f}from"react";import{jsx as p,jsxs as m}from"react/jsx-runtime";import{Slottable as h}from"@radix-ui/react-slot";import{CheckIcon as g}from"@phosphor-icons/react/Check";import{CaretUpIcon as _}from"@phosphor-icons/react/CaretUp";import{Content as v,Group as y,Icon as b,Item as x,ItemIndicator as S,ItemText as C,Label as w,Portal as T,Root as E,ScrollDownButton as D,ScrollUpButton as O,Trigger as k,Value as A,Viewport as j}from"@radix-ui/react-select";const M=d({}),N=e=>{let t=l(26),n,r,i,a,o,s,c,u,d;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7],u=t[8],d=t[9]):({"aria-invalid":n,children:r,id:i,validation:d,onBlur:a,onValueChange:s,onChange:o,ref:u,...c}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c,t[8]=u,t[9]=d);let f;t[10]!==n||t[11]!==i||t[12]!==a||t[13]!==u||t[14]!==d?(f={"aria-invalid":n,id:i,validation:d,onBlur:a,ref:u},t[10]=n,t[11]=i,t[12]=a,t[13]=u,t[14]=d,t[15]=f):f=t[15];let m=f,h;t[16]!==o||t[17]!==s?(h=e=>{o?.(e),s?.(e)},t[16]=o,t[17]=s,t[18]=h):h=t[18];let g;t[19]!==r||t[20]!==m?(g=p(M.Provider,{value:m,children:r}),t[19]=r,t[20]=m,t[21]=g):g=t[21];let _;return t[22]!==c||t[23]!==h||t[24]!==g?(_=p(E,{...c,onValueChange:h,children:g}),t[22]=c,t[23]=h,t[24]=g,t[25]=_):_=t[25],_},P=e=>{let n=l(14),i,a,o,s;n[0]===e?(i=n[1],a=n[2],o=n[3],s=n[4]):({className:i,"data-slot":a,ref:s,...o}=e,n[0]=e,n[1]=i,n[2]=a,n[3]=o,n[4]=s);let c;n[5]===a?c=n[6]:(c=r(a,`select-group`),n[5]=a,n[6]=c);let u;n[7]===i?u=n[8]:(u=t(`space-y-px`,i),n[7]=i,n[8]=u);let d;return n[9]!==o||n[10]!==s||n[11]!==c||n[12]!==u?(d=p(y,{ref:s,"data-slot":c,className:u,...o}),n[9]=o,n[10]=s,n[11]=c,n[12]=u,n[13]=d):d=n[13],d},F=e=>{let t=l(21),n,i,a,o,s,c;t[0]===e?(n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],c=t[6]):({asChild:n,children:i,"data-slot":a,placeholder:o,ref:c,...s}=e,t[0]=e,t[1]=n,t[2]=i,t[3]=a,t[4]=o,t[5]=s,t[6]=c);let u;t[7]===a?u=t[8]:(u=r(a,`select-value`),t[7]=a,t[8]=u);let d;t[9]===o?d=t[10]:(d=o!=null&&p(`span`,{"data-slot":`select-placeholder`,className:`contents`,children:o}),t[9]=o,t[10]=d);let f;t[11]!==n||t[12]!==i?(f=n||i==null?i:p(`span`,{"data-slot":`select-value-label`,className:`contents`,children:i}),t[11]=n,t[12]=i,t[13]=f):f=t[13];let m;return t[14]!==n||t[15]!==s||t[16]!==c||t[17]!==u||t[18]!==d||t[19]!==f?(m=p(A,{ref:c,asChild:n,"data-slot":u,placeholder:d,...s,children:f}),t[14]=n,t[15]=s,t[16]=c,t[17]=u,t[18]=d,t[19]=f,t[20]=m):m=t[20],m},I=i=>{let c=l(36),d,g,_,v,y,x,S,C,w;c[0]===i?(d=c[1],g=c[2],_=c[3],v=c[4],y=c[5],x=c[6],S=c[7],C=c[8],w=c[9]):({"aria-invalid":d,className:_,children:g,"data-slot":v,id:x,onBlur:y,ref:w,validation:S,...C}=i,c[0]=i,c[1]=d,c[2]=g,c[3]=_,c[4]=v,c[5]=y,c[6]=x,c[7]=S,c[8]=C,c[9]=w);let T=f(M),E=f(s),D=e(w,T.ref),O=a(),A=E?E[`aria-invalid`]:T[`aria-invalid`]??d,j=T.validation??S??O,N;c[10]!==A||c[11]!==j?(N=o({"aria-invalid":A,validation:j}),c[10]=A,c[11]=j,c[12]=N):N=c[12];let{ariaInvalid:P,validation:F}=N,I=E?E.id:T.id??x,L;c[13]===v?L=c[14]:(L=r(v,`select-trigger`),c[13]=v,c[14]=L);let R;c[15]===_?R=c[16]:(R=t(`h-9 text-sm`,`border-form bg-form text-strong font-sans placeholder:text-placeholder hover:bg-form-hover hover:text-strong flex w-full items-center justify-between gap-1.5 rounded-md border px-3 py-2 disabled:pointer-events-none disabled:opacity-50`,`[&>[data-slot=select-trigger-label]>span]:line-clamp-1 [&>[data-slot=select-trigger-label]>span]:text-left`,`hover:border-neutral-400`,`focus:outline-hidden focus:ring-4 aria-expanded:ring-4`,`focus:border-accent-600 focus:ring-focus-accent aria-expanded:border-accent-600 aria-expanded:ring-focus-accent`,`data-validation-success:border-success-600 data-validation-success:focus:border-success-600 data-validation-success:focus:ring-focus-success data-validation-success:aria-expanded:border-success-600 data-validation-success:aria-expanded:ring-focus-success`,`data-validation-warning:border-warning-600 data-validation-warning:focus:border-warning-600 data-validation-warning:focus:ring-focus-warning data-validation-warning:aria-expanded:border-warning-600 data-validation-warning:aria-expanded:ring-focus-warning`,`data-validation-error:border-danger-600 data-validation-error:focus:border-danger-600 data-validation-error:focus:ring-focus-danger data-validation-error:aria-expanded:border-danger-600 data-validation-error:aria-expanded:ring-focus-danger`,_),c[15]=_,c[16]=R);let z=F||void 0,V;c[17]!==T||c[18]!==y?(V=e=>{y?.(e),T.onBlur?.(e)},c[17]=T,c[18]=y,c[19]=V):V=c[19];let H;c[20]===E?H=c[21]:(H=E?{"aria-describedby":E[`aria-describedby`],"aria-errormessage":E[`aria-errormessage`]}:void 0,c[20]=E,c[21]=H);let U;c[22]===g?U=c[23]:(U=p(h,{child:g,children:B}),c[22]=g,c[23]=U);let W;c[24]===Symbol.for(`react.memo_cache_sentinel`)?(W=p(b,{asChild:!0,children:p(n,{svg:p(u,{weight:`bold`}),className:`size-4`})}),c[24]=W):W=c[24];let G;return c[25]!==P||c[26]!==I||c[27]!==C||c[28]!==L||c[29]!==R||c[30]!==z||c[31]!==V||c[32]!==H||c[33]!==U||c[34]!==D?(G=m(k,{"data-slot":L,className:R,"data-validation":z,id:I,ref:D,...C,onBlur:V,...H,"aria-invalid":P,children:[U,W]}),c[25]=P,c[26]=I,c[27]=C,c[28]=L,c[29]=R,c[30]=z,c[31]=V,c[32]=H,c[33]=U,c[34]=D,c[35]=G):G=c[35],G},L=e=>{let r=l(11),i,a,o;r[0]===e?(i=r[1],a=r[2],o=r[3]):({className:i,ref:o,...a}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=o);let s;r[4]===i?s=r[5]:(s=t(`flex cursor-default items-center justify-center py-1`,i),r[4]=i,r[5]=s);let c;r[6]===Symbol.for(`react.memo_cache_sentinel`)?(c=p(n,{svg:p(_,{weight:`bold`}),className:`size-4`}),r[6]=c):c=r[6];let u;return r[7]!==a||r[8]!==o||r[9]!==s?(u=p(O,{ref:o,className:s,...a,children:c}),r[7]=a,r[8]=o,r[9]=s,r[10]=u):u=r[10],u},R=e=>{let r=l(11),i,a,o;r[0]===e?(i=r[1],a=r[2],o=r[3]):({className:i,ref:o,...a}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=o);let s;r[4]===i?s=r[5]:(s=t(`flex cursor-default items-center justify-center py-1`,i),r[4]=i,r[5]=s);let c;r[6]===Symbol.for(`react.memo_cache_sentinel`)?(c=p(n,{svg:p(u,{weight:`bold`}),className:`size-4`}),r[6]=c):c=r[6];let d;return r[7]!==a||r[8]!==o||r[9]!==s?(d=p(D,{ref:o,className:s,...a,children:c}),r[7]=a,r[8]=o,r[9]=s,r[10]=d):d=r[10],d},z={Root:N,Content:e=>{let n=l(31),a,o,s,c,u,d,f;n[0]===e?(a=n[1],o=n[2],s=n[3],c=n[4],u=n[5],d=n[6],f=n[7]):({className:o,children:a,"data-slot":s,position:d,ref:u,width:f,...c}=e,n[0]=e,n[1]=a,n[2]=o,n[3]=s,n[4]=c,n[5]=u,n[6]=d,n[7]=f);let h=d===void 0?`popper`:d,g=f===void 0?`trigger`:f,_=i(),y;n[8]===s?y=n[9]:(y=r(s,`select-content`),n[8]=s,n[9]=y);let b=h===`popper`&&`data-side-bottom:translate-y-2 data-side-left:-translate-x-2 data-side-right:translate-x-2 data-side-top:-translate-y-2 max-h-(--radix-select-content-available-height)`,x=g===`trigger`&&`w-(--radix-select-trigger-width)`,S;n[10]!==o||n[11]!==b||n[12]!==x?(S=t(`border-popover 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 data-state-open:animate-in data-state-open:fade-in-0 data-state-open:zoom-in-95 motion-reduce:animate-none relative z-50 max-h-96 min-w-32 overflow-hidden rounded-md border shadow-md`,`bg-popover font-sans`,b,x,o),n[10]=o,n[11]=b,n[12]=x,n[13]=S):S=n[13];let C;n[14]===Symbol.for(`react.memo_cache_sentinel`)?(C=p(L,{}),n[14]=C):C=n[14];let w=h===`popper`&&`h-(--radix-select-trigger-height) w-full`,E;n[15]===w?E=n[16]:(E=t(`p-1 space-y-px`,w),n[15]=w,n[16]=E);let D;n[17]!==a||n[18]!==E?(D=p(j,{className:E,children:a}),n[17]=a,n[18]=E,n[19]=D):D=n[19];let O;n[20]===Symbol.for(`react.memo_cache_sentinel`)?(O=p(R,{}),n[20]=O):O=n[20];let k;n[21]!==h||n[22]!==c||n[23]!==u||n[24]!==D||n[25]!==y||n[26]!==S?(k=m(v,{ref:u,"data-slot":y,className:S,position:h,...c,children:[C,D,O]}),n[21]=h,n[22]=c,n[23]=u,n[24]=D,n[25]=y,n[26]=S,n[27]=k):k=n[27];let A;return n[28]!==_||n[29]!==k?(A=p(T,{container:_,children:k}),n[28]=_,n[29]=k,n[30]=A):A=n[30],A},Group:P,Item:e=>{let i=l(28),a,o,s,c,u,d,f;i[0]===e?(a=i[1],o=i[2],s=i[3],c=i[4],u=i[5],d=i[6],f=i[7]):({className:o,children:a,"data-slot":s,icon:c,ref:d,translate:f,...u}=e,i[0]=e,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=u,i[6]=d,i[7]=f);let _;i[8]===s?_=i[9]:(_=r(s,`select-item`),i[8]=s,i[9]=_);let v;i[10]===o?v=i[11]:(v=t(`relative flex gap-2 w-full cursor-pointer select-none items-center rounded-md py-1.5 pl-2 pr-8 text-strong text-sm outline-hidden`,`focus:bg-active-menu-item`,`data-disabled:pointer-events-none data-disabled:opacity-50`,`data-state-checked:bg-selected-menu-item`,`focus:data-state-checked:bg-active-selected-menu-item`,o),i[10]=o,i[11]=v);let y;i[12]===c?y=i[13]:(y=c&&p(n,{svg:c}),i[12]=c,i[13]=y);let b;i[14]===f?b=i[15]:(b=e=>p(C,{children:p(`span`,{"data-slot":`select-item-label`,className:`contents`,translate:f,children:e})}),i[14]=f,i[15]=b);let w;i[16]!==a||i[17]!==b?(w=p(h,{child:a,children:b}),i[16]=a,i[17]=b,i[18]=w):w=i[18];let T;i[19]===Symbol.for(`react.memo_cache_sentinel`)?(T=p(S,{className:`absolute right-2 flex h-3.5 w-3.5 items-center justify-center`,children:p(n,{svg:p(g,{weight:`bold`}),className:`size-4 text-accent-600`})}),i[19]=T):T=i[19];let E;return i[20]!==u||i[21]!==d||i[22]!==_||i[23]!==v||i[24]!==y||i[25]!==w||i[26]!==f?(E=m(x,{ref:d,"data-slot":_,translate:f,className:v,...u,children:[y,w,T]}),i[20]=u,i[21]=d,i[22]=_,i[23]=v,i[24]=y,i[25]=w,i[26]=f,i[27]=E):E=i[27],E},Label:e=>{let n=l(14),i,a,o,s;n[0]===e?(i=n[1],a=n[2],o=n[3],s=n[4]):({className:i,"data-slot":a,ref:s,...o}=e,n[0]=e,n[1]=i,n[2]=a,n[3]=o,n[4]=s);let c;n[5]===a?c=n[6]:(c=r(a,`select-label`),n[5]=a,n[6]=c);let u;n[7]===i?u=n[8]:(u=t(`px-2 py-1.5 text-sm font-medium`,i),n[7]=i,n[8]=u);let d;return n[9]!==o||n[10]!==s||n[11]!==c||n[12]!==u?(d=p(w,{ref:s,"data-slot":c,className:u,...o}),n[9]=o,n[10]=s,n[11]=c,n[12]=u,n[13]=d):d=n[13],d},Separator:e=>{let n=l(14),i,a,o,s;n[0]===e?(i=n[1],a=n[2],o=n[3],s=n[4]):({className:i,"data-slot":a,ref:s,...o}=e,n[0]=e,n[1]=i,n[2]=a,n[3]=o,n[4]=s);let u;n[5]===a?u=n[6]:(u=r(a,`select-separator`),n[5]=a,n[6]=u);let d;n[7]===i?d=n[8]:(d=t(`-mx-1 my-1 h-px w-auto`,i),n[7]=i,n[8]=d);let f;return n[9]!==o||n[10]!==s||n[11]!==u||n[12]!==d?(f=p(c,{ref:s,"data-slot":u,className:d,...o}),n[9]=o,n[10]=s,n[11]=u,n[12]=d,n[13]=f):f=n[13],f},Trigger:I,Value:F};function B(e){return p(`span`,{"data-slot":`select-trigger-label`,className:`contents`,children:e})}export{z as t};
|
package/dist/select.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Select } from "./select-
|
|
1
|
+
import { t as Select } from "./select-BITJP7I5.js";
|
|
2
2
|
export { Select };
|
package/dist/select.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./select-
|
|
1
|
+
import{t as e}from"./select-CUWLEeuf.js";export{e as Select};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-0HCjnNv1.js";import{t}from"./button-pwkdtR3U.js";import{t as n}from"./layer-container-R7aux3n8.js";import{a as r,c as i,i as a,n as o,o as s,r as c,s as l,t as u}from"./primitive-
|
|
1
|
+
import{t as e}from"./cx-0HCjnNv1.js";import{t}from"./button-pwkdtR3U.js";import{t as n}from"./layer-container-R7aux3n8.js";import{a as r,c as i,i as a,n as o,o as s,r as c,s as l,t as u}from"./primitive-vXDjYdbu.js";import{c as d}from"react/compiler-runtime";import{jsx as f,jsxs as p}from"react/jsx-runtime";import{XIcon as m}from"@phosphor-icons/react/X";import{cva as h}from"class-variance-authority";const g=s,_=i,v=u,y=r,b=t=>{let n=d(10),r,i,o;n[0]===t?(r=n[1],i=n[2],o=n[3]):({className:r,ref:o,...i}=t,n[0]=t,n[1]=r,n[2]=i,n[3]=o);let s;n[4]===r?s=n[5]:(s=e(`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-60 backdrop-blur-xs`,r),n[4]=r,n[5]=s);let c;return n[6]!==i||n[7]!==o||n[8]!==s?(c=f(a,{"data-slot":`sheet-overlay`,className:s,...i,ref:o}),n[6]=i,n[7]=o,n[8]=s,n[9]=c):c=n[9],c},x=h(`bg-dialog border-dialog inset-y-0 h-full w-full fixed flex flex-col shadow-lg outline-hidden transition ease-in-out focus-within:outline-hidden data-state-closed:duration-100 data-state-closed:animate-out data-state-open:duration-100 data-state-open:animate-in`,{variants:{side:{left:`data-state-closed:slide-out-to-left data-state-open:slide-in-from-left left-0 border-r`,right:`data-state-closed:slide-out-to-right data-state-open:slide-in-from-right right-0 border-l`}},defaultVariants:{side:`right`}}),S={Root:g,Actions:t=>{let n=d(12),r,i,a,o;n[0]===t?(r=n[1],i=n[2],a=n[3],o=n[4]):({children:r,className:i,ref:o,...a}=t,n[0]=t,n[1]=r,n[2]=i,n[3]=a,n[4]=o);let s;n[5]===i?s=n[6]:(s=e(`flex h-full items-center gap-2`,i),n[5]=i,n[6]=s);let c;return n[7]!==r||n[8]!==a||n[9]!==o||n[10]!==s?(c=f(`div`,{"data-slot":`sheet-actions`,className:s,...a,ref:o,children:r}),n[7]=r,n[8]=a,n[9]=o,n[10]=s,n[11]=c):c=n[11],c},Body:t=>{let n=d(8),r,i;n[0]===t?(r=n[1],i=n[2]):({className:r,...i}=t,n[0]=t,n[1]=r,n[2]=i);let a;n[3]===r?a=n[4]:(a=e(`scrollbar scrollbar-gutter-stable text-body flex-1 overflow-y-auto p-6`,r),n[3]=r,n[4]=a);let o;return n[5]!==i||n[6]!==a?(o=f(`div`,{"data-slot":`sheet-body`,className:a,...i}),n[5]=i,n[6]=a,n[7]=o):o=n[7],o},Close:v,CloseIconButton:e=>{let n=d(15),r,i,a,o,s,c;n[0]===e?(r=n[1],i=n[2],a=n[3],o=n[4],s=n[5],c=n[6]):({size:i,type:a,label:o,appearance:s,intent:c,...r}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a,n[4]=o,n[5]=s,n[6]=c);let l=i===void 0?`md`:i,p=a===void 0?`button`:a,h=o===void 0?`Close Sheet`:o,g=s===void 0?`ghost`:s,_=c===void 0?`neutral`:c,v;n[7]===Symbol.for(`react.memo_cache_sentinel`)?(v=f(m,{}),n[7]=v):v=n[7];let y;return n[8]!==g||n[9]!==_||n[10]!==h||n[11]!==r||n[12]!==l||n[13]!==p?(y=f(u,{asChild:!0,children:f(t,{"data-slot":`sheet-close-icon-button`,appearance:g,icon:v,intent:_,label:h,size:l,type:p,...r})}),n[8]=g,n[9]=_,n[10]=h,n[11]=r,n[12]=l,n[13]=p,n[14]=y):y=n[14],y},Content:t=>{let r=d(17),i,a,s,c,l,u;r[0]===t?(i=r[1],a=r[2],s=r[3],c=r[4],l=r[5],u=r[6]):({children:i,className:a,preferredWidth:l,side:u,ref:c,...s}=t,r[0]=t,r[1]=i,r[2]=a,r[3]=s,r[4]=c,r[5]=l,r[6]=u);let m=l===void 0?`sm:max-w-[30rem]`:l,h=u===void 0?`right`:u,g;r[7]===Symbol.for(`react.memo_cache_sentinel`)?(g=f(b,{}),r[7]=g):g=r[7];let _;r[8]!==a||r[9]!==m||r[10]!==h?(_=e(x({side:h}),m,a),r[8]=a,r[9]=m,r[10]=h,r[11]=_):_=r[11];let v;return r[12]!==i||r[13]!==s||r[14]!==c||r[15]!==_?(v=p(y,{children:[g,f(n,{"data-slot":`sheet-positioner`,className:`fixed z-60`,children:f(o,{"data-slot":`sheet-content`,"data-mantle-modal-content":!0,className:_,ref:c,...s,children:i})})]}),r[12]=i,r[13]=s,r[14]=c,r[15]=_,r[16]=v):v=r[16],v},Description:t=>{let n=d(10),r,i,a;n[0]===t?(r=n[1],i=n[2],a=n[3]):({className:r,ref:a,...i}=t,n[0]=t,n[1]=r,n[2]=i,n[3]=a);let o;n[4]===r?o=n[5]:(o=e(`text-body text-sm`,r),n[4]=r,n[5]=o);let s;return n[6]!==i||n[7]!==a||n[8]!==o?(s=f(c,{"data-slot":`sheet-description`,ref:a,className:o,...i}),n[6]=i,n[7]=a,n[8]=o,n[9]=s):s=n[9],s},Footer:t=>{let n=d(8),r,i;n[0]===t?(r=n[1],i=n[2]):({className:r,...i}=t,n[0]=t,n[1]=r,n[2]=i);let a;n[3]===r?a=n[4]:(a=e(`border-dialog-muted flex shrink-0 justify-end gap-2 border-t px-6 py-2.5`,r),n[3]=r,n[4]=a);let o;return n[5]!==i||n[6]!==a?(o=f(`div`,{"data-slot":`sheet-footer`,className:a,...i}),n[5]=i,n[6]=a,n[7]=o):o=n[7],o},Header:t=>{let n=d(8),r,i;n[0]===t?(r=n[1],i=n[2]):({className:r,...i}=t,n[0]=t,n[1]=r,n[2]=i);let a;n[3]===r?a=n[4]:(a=e(`border-dialog-muted flex shrink-0 flex-col gap-2 border-b py-4 pl-6 pr-4`,`has-[.icon-button]:pr-4`,r),n[3]=r,n[4]=a);let o;return n[5]!==i||n[6]!==a?(o=f(`div`,{"data-slot":`sheet-header`,className:a,...i}),n[5]=i,n[6]=a,n[7]=o):o=n[7],o},Title:t=>{let n=d(10),r,i,a;n[0]===t?(r=n[1],i=n[2],a=n[3]):({className:r,ref:a,...i}=t,n[0]=t,n[1]=r,n[2]=i,n[3]=a);let o;n[4]===r?o=n[5]:(o=e(`text-strong flex-1 truncate text-lg font-medium`,r),n[4]=r,n[5]=o);let s;return n[6]!==i||n[7]!==a||n[8]!==o?(s=f(l,{"data-slot":`sheet-title`,ref:a,className:o,...i}),n[6]=i,n[7]=a,n[8]=o,n[9]=s):s=n[9],s},TitleGroup:t=>{let n=d(12),r,i,a,o;n[0]===t?(r=n[1],i=n[2],a=n[3],o=n[4]):({children:r,className:i,ref:o,...a}=t,n[0]=t,n[1]=r,n[2]=i,n[3]=a,n[4]=o);let s;n[5]===i?s=n[6]:(s=e(`flex items-center justify-between gap-2`,i),n[5]=i,n[6]=s);let c;return n[7]!==r||n[8]!==a||n[9]!==o||n[10]!==s?(c=f(`div`,{"data-slot":`sheet-title-group`,className:s,...a,ref:o,children:r}),n[7]=r,n[8]=a,n[9]=o,n[10]=s,n[11]=c):c=n[11],c},Trigger:_};export{S as t};
|
package/dist/sheet.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as Content$1, r as Description$1, s as Title$1, u as primitive_d_exports } from "./dialog-B8YvfyIo.js";
|
|
2
1
|
import { i as IconButtonIntent, n as IconButtonProps, r as IconButtonAppearance } from "./button-crUf0hbR.js";
|
|
2
|
+
import { n as Content$1, r as Description$1, s as Title$1 } from "./dialog-CZYD3xL-.js";
|
|
3
3
|
import { ComponentProps, HTMLAttributes } from "react";
|
|
4
4
|
import { VariantProps } from "class-variance-authority";
|
|
5
5
|
//#region src/components/sheet/sheet.d.ts
|
package/dist/sheet.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./sheet-
|
|
1
|
+
import{t as e}from"./sheet-CIgu6vwS.js";export{e as Sheet};
|
package/dist/sidebar.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { n as WithAsChild } from "./as-child-D23mGo4f.js";
|
|
|
2
2
|
import { t as WithDataSlot } from "./data-slot-CChfb_cv.js";
|
|
3
3
|
import { n as IconButtonProps } from "./button-crUf0hbR.js";
|
|
4
4
|
import { n as Separator } from "./separator-Bo4nY_3M.js";
|
|
5
|
-
import { t as Tooltip } from "./tooltip-
|
|
5
|
+
import { t as Tooltip } from "./tooltip-nuUCoqq8.js";
|
|
6
6
|
import { ComponentProps, ReactElement, ReactNode } from "react";
|
|
7
7
|
//#region src/components/sidebar/sidebar.d.ts
|
|
8
8
|
/**
|
package/dist/sidebar.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-0HCjnNv1.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./slot-BsvE2ntj.js";import{t as r}from"./button-pwkdtR3U.js";import{t as i}from"./use-is-hydrated-DDCqXmju.js";import{n as a}from"./separator-D98be0gY.js";import{n as o,t as s}from"./use-is-apple-platform-CMPzIYjz.js";import{t as c}from"./use-callback-ref-BvVyI5K1.js";import{n as l}from"./cookie-ca4g5CKp.js";import{t as u}from"./sheet-D8KGX4q1.js";import{r as d}from"./use-breakpoint-CjyNk0fi.js";import{t as f}from"./tooltip-CHgJAU6j.js";import{c as p}from"react/compiler-runtime";import{createContext as m,useContext as h,useEffect as g,useId as _,useRef as v,useState as y}from"react";import b from"tiny-invariant";import{Fragment as x,jsx as S,jsxs as C}from"react/jsx-runtime";import{SidebarSimpleIcon as w}from"@phosphor-icons/react/SidebarSimple";const T={sm:`hidden sm:block`,md:`hidden md:block`,lg:`hidden lg:block`},E=m(null);function D(){let e=h(E);return b(e,`useSidebar must be used within Sidebar.Root.`),e}function O(e){let t=h(E);return b(t,`Sidebar.${e} must be rendered inside Sidebar.Root.`),t}const k=[];function A(e){return e instanceof HTMLElement?e.isContentEditable||e.tagName===`INPUT`||e.tagName===`TEXTAREA`||e.tagName===`SELECT`:!1}function j(){let e=Symbol(`sidebar-keyboard-shortcut`);return k.push(e),{isOwner:()=>k[0]===e,release:()=>{let t=k.indexOf(e);t!==-1&&k.splice(t,1)}}}const M=e=>{let t=p(34),{children:n,defaultOpen:r,keyboardShortcut:i,mobileBreakpoint:a,onOpenChange:s,onOpenMobileChange:l,open:u,openMobile:f}=e,m=r===void 0||r,h=i===void 0||i,b=a===void 0?`lg`:a,x=d(b),C=_(),w=u!=null,[T,D]=y(m),O=w?u:T,k;t[0]!==w||t[1]!==s?(k=e=>{w||D(e),s?.(e)},t[0]=w,t[1]=s,t[2]=k):k=t[2];let M=k,N=f!=null,[P,F]=y(!1),I=N?f:P,L;t[3]!==N||t[4]!==l?(L=e=>{N||F(e),l?.(e)},t[3]=N,t[4]=l,t[5]=L):L=t[5];let R=L,z=v(x),B,V;t[6]!==x||t[7]!==I||t[8]!==R?(B=()=>{let e=z.current&&!x;z.current=x,e&&I&&R(!1)},V=[x,I,R],t[6]=x,t[7]=I,t[8]=R,t[9]=B,t[10]=V):(B=t[9],V=t[10]),g(B,V);let H;t[11]!==x||t[12]!==O||t[13]!==I||t[14]!==M||t[15]!==R?(H=()=>{x?R(!I):M(!O)},t[11]=x,t[12]=O,t[13]=I,t[14]=M,t[15]=R,t[16]=H):H=t[16];let U=H,W=c(U),G,K;t[17]!==h||t[18]!==W?(K=()=>{if(!h)return;let e=j(),t=o(),n=n=>{if(!e.isOwner()||A(n.target))return;let r=t?n.metaKey:n.ctrlKey,i=t?n.ctrlKey:n.metaKey;n.key?.toLowerCase()===`b`&&r&&!i&&!n.altKey&&!n.shiftKey&&(n.preventDefault(),W())};return window.addEventListener(`keydown`,n),()=>{window.removeEventListener(`keydown`,n),e.release()}},G=[h,W],t[17]=h,t[18]=W,t[19]=G,t[20]=K):(G=t[19],K=t[20]),g(K,G);let q;t[21]!==x||t[22]!==h||t[23]!==b||t[24]!==C||t[25]!==O||t[26]!==I||t[27]!==M||t[28]!==R||t[29]!==U?(q={isMobile:x,keyboardShortcut:h,mobileBreakpoint:b,navId:C,open:O,openMobile:I,setOpen:M,setOpenMobile:R,toggle:U},t[21]=x,t[22]=h,t[23]=b,t[24]=C,t[25]=O,t[26]=I,t[27]=M,t[28]=R,t[29]=U,t[30]=q):q=t[30];let J=q,Y;return t[31]!==n||t[32]!==J?(Y=S(E.Provider,{value:J,children:n}),t[31]=n,t[32]=J,t[33]=Y):Y=t[33],Y},N=n=>{let r=p(49),a,o,s,c,l,d;r[0]===n?(a=r[1],o=r[2],s=r[3],c=r[4],l=r[5],d=r[6]):({"aria-label":a,"aria-labelledby":o,children:s,className:c,"data-slot":l,...d}=n,r[0]=n,r[1]=a,r[2]=o,r[3]=s,r[4]=c,r[5]=l,r[6]=d);let{isMobile:f,mobileBreakpoint:m,navId:h,open:g,openMobile:_,setOpenMobile:v}=O(`Nav`),y=i(),b=a??(o==null?`Main`:void 0);if(f){let n;r[7]===l?n=r[8]:(n=t(l,`sidebar-nav`),r[7]=l,r[8]=n);let i;r[9]===o?i=r[10]:(i=o==null?null:{"aria-labelledby":o},r[9]=o,r[10]=i);let a;r[11]===c?a=r[12]:(a=e(`bg-base w-(--sidebar-width-mobile,18rem) max-w-full p-0`,c),r[11]=c,r[12]=a);let f=b??`Sidebar`,p;r[13]===f?p=r[14]:(p=S(u.Title,{className:`sr-only`,children:f}),r[13]=f,r[14]=p);let m;r[15]!==b||r[16]!==o||r[17]!==s||r[18]!==h?(m=S(`nav`,{id:h,"aria-label":b,"aria-labelledby":o,className:`flex h-full w-full min-w-0 flex-col text-sm`,children:s}),r[15]=b,r[16]=o,r[17]=s,r[18]=h,r[19]=m):m=r[19];let g;r[20]!==d||r[21]!==n||r[22]!==i||r[23]!==a||r[24]!==p||r[25]!==m?(g=C(u.Content,{side:`left`,preferredWidth:`sm:max-w-(--sidebar-width-mobile,18rem)`,"data-slot":n,"data-mobile":``,...i,className:a,...d,children:[p,m]}),r[20]=d,r[21]=n,r[22]=i,r[23]=a,r[24]=p,r[25]=m,r[26]=g):g=r[26];let y;return r[27]!==_||r[28]!==v||r[29]!==g?(y=S(u.Root,{open:_,onOpenChange:v,children:g}),r[27]=_,r[28]=v,r[29]=g,r[30]=y):y=r[30],y}let x;r[31]===l?x=r[32]:(x=t(l,`sidebar-nav`),r[31]=l,r[32]=x);let w=g?`expanded`:`collapsed`,E=y?``:void 0,D=!y&&T[m],k=y&&`transition-[width] duration-200 ease-linear motion-reduce:transition-none`,A;r[33]!==c||r[34]!==D||r[35]!==k?(A=e(`group/sidebar-nav bg-base relative h-full w-(--sidebar-width,13rem) shrink-0 overflow-hidden`,`data-[state=collapsed]:w-(--sidebar-width-icon,3.25rem)`,D,k,c),r[33]=c,r[34]=D,r[35]=k,r[36]=A):A=r[36];let j;r[37]!==b||r[38]!==o||r[39]!==s||r[40]!==h?(j=S(`nav`,{id:h,"aria-label":b,"aria-labelledby":o,className:`absolute inset-y-0 left-0 flex w-full min-w-0 flex-col text-sm`,children:s}),r[37]=b,r[38]=o,r[39]=s,r[40]=h,r[41]=j):j=r[41];let M;return r[42]!==d||r[43]!==x||r[44]!==w||r[45]!==E||r[46]!==A||r[47]!==j?(M=S(`div`,{"data-slot":x,"data-state":w,"data-hydrated":E,className:A,...d,children:j}),r[42]=d,r[43]=x,r[44]=w,r[45]=E,r[46]=A,r[47]=j,r[48]=M):M=r[48],M},P=S(w,{}),F=e=>{let t=p(7),{label:n,shortcut:r}=e,i;t[0]===n?i=t[1]:(i=S(`span`,{"data-slot":`sidebar-tooltip-label`,className:`contents`,children:n}),t[0]=n,t[1]=i);let a;t[2]===r?a=t[3]:(a=r!=null&&S(`span`,{"aria-hidden":!0,"data-slot":`sidebar-tooltip-shortcut`,className:`inline-flex shrink-0 items-center gap-0.5 [&_kbd]:h-4 [&_kbd]:min-w-4 [&_kbd]:bg-neutral-500/25 [&_kbd]:px-0.5 [&_kbd]:text-xs`,children:r}),t[2]=r,t[3]=a);let o;return t[4]!==i||t[5]!==a?(o=C(`span`,{"data-slot":`sidebar-tooltip-row`,className:`flex items-center gap-1.5`,children:[i,a]}),t[4]=i,t[5]=a,t[6]=o):o=t[6],o},I=e=>{let n=p(32),i,a,o,c,l,u,d,m;n[0]===e?(i=n[1],a=n[2],o=n[3],c=n[4],l=n[5],u=n[6],d=n[7],m=n[8]):({appearance:l,"data-slot":i,icon:u,intent:d,label:m,onClick:a,shortcut:c,...o}=e,n[0]=e,n[1]=i,n[2]=a,n[3]=o,n[4]=c,n[5]=l,n[6]=u,n[7]=d,n[8]=m);let h=l===void 0?`ghost`:l,g=u===void 0?P:u,_=d===void 0?`neutral`:d,v=m===void 0?`Toggle Sidebar`:m,{isMobile:y,keyboardShortcut:b,navId:x,open:w,openMobile:T,toggle:E}=O(`Trigger`),D=s(),k=y?T:w,A=!y||T,j=b?c:void 0,M=D?`Meta+B`:`Control+B`,N=A?x:void 0,I=b?M:void 0,L;n[9]===i?L=n[10]:(L=t(i,`sidebar-trigger`),n[9]=i,n[10]=L);let R=k?`expanded`:`collapsed`,z;n[11]!==a||n[12]!==E?(z=e=>{a?.(e),e.defaultPrevented||E()},n[11]=a,n[12]=E,n[13]=z):z=n[13];let B;n[14]!==h||n[15]!==k||n[16]!==g||n[17]!==_||n[18]!==v||n[19]!==o||n[20]!==N||n[21]!==I||n[22]!==L||n[23]!==R||n[24]!==z?(B=S(f.Trigger,{asChild:!0,children:S(r,{appearance:h,"aria-controls":N,"aria-expanded":k,"aria-keyshortcuts":I,"data-slot":L,"data-state":R,icon:g,intent:_,label:v,onClick:z,...o})}),n[14]=h,n[15]=k,n[16]=g,n[17]=_,n[18]=v,n[19]=o,n[20]=N,n[21]=I,n[22]=L,n[23]=R,n[24]=z,n[25]=B):B=n[25];let V;n[26]!==j||n[27]!==v?(V=S(f.Content,{"data-slot":`sidebar-trigger-tooltip`,children:S(F,{label:v,shortcut:j})}),n[26]=j,n[27]=v,n[28]=V):V=n[28];let H;return n[29]!==B||n[30]!==V?(H=C(f.Root,{children:[B,V]}),n[29]=B,n[30]=V,n[31]=H):H=n[31],H},L=r=>{let i=p(16),a,o,s,c,l;i[0]===r?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({asChild:a,children:o,className:s,"data-slot":c,...l}=r,i[0]=r,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let u=a?n:`div`,d;i[6]===c?d=i[7]:(d=t(c,`sidebar-header`),i[6]=c,i[7]=d);let f;i[8]===s?f=i[9]:(f=e(`grid grid-cols-1 grid-rows-(--sidebar-header-height,4.5rem) shrink-0 items-center px-3`,`group-data-[state=expanded]/sidebar-nav:pr-1`,s),i[8]=s,i[9]=f);let m;return i[10]!==u||i[11]!==o||i[12]!==l||i[13]!==d||i[14]!==f?(m=S(u,{"data-slot":d,className:f,...l,children:o}),i[10]=u,i[11]=o,i[12]=l,i[13]=d,i[14]=f,i[15]=m):m=i[15],m},R=r=>{let i=p(16),a,o,s,c,l;i[0]===r?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({asChild:a,children:o,className:s,"data-slot":c,...l}=r,i[0]=r,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let u=a?n:`div`,d;i[6]===c?d=i[7]:(d=t(c,`sidebar-body`),i[6]=c,i[7]=d);let f;i[8]===s?f=i[9]:(f=e(`scrollbar scrollbar-gutter-stable scroll-fade-y flex-1 scroll-py-6 space-y-2 overflow-y-auto overflow-x-hidden px-3 pt-1.5 pb-4`,`group-data-[state=expanded]/sidebar-nav:pr-1`,`group-data-[state=collapsed]/sidebar-nav:scrollbar-none`,`group-data-[state=collapsed]/sidebar-nav:scrollbar-gutter-auto`,`group-data-[state=collapsed]/sidebar-nav:[&::-webkit-scrollbar]:hidden`,s),i[8]=s,i[9]=f);let m;return i[10]!==u||i[11]!==o||i[12]!==l||i[13]!==d||i[14]!==f?(m=S(u,{"data-slot":d,className:f,...l,children:o}),i[10]=u,i[11]=o,i[12]=l,i[13]=d,i[14]=f,i[15]=m):m=i[15],m},z=r=>{let i=p(16),a,o,s,c,l;i[0]===r?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({asChild:a,children:o,className:s,"data-slot":c,...l}=r,i[0]=r,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let u=a?n:`div`,d;i[6]===c?d=i[7]:(d=t(c,`sidebar-footer`),i[6]=c,i[7]=d);let f;i[8]===s?f=i[9]:(f=e(`shrink-0 px-3 pt-3 pb-3.5`,`group-data-[state=expanded]/sidebar-nav:pr-1`,s),i[8]=s,i[9]=f);let m;return i[10]!==u||i[11]!==o||i[12]!==l||i[13]!==d||i[14]!==f?(m=S(u,{"data-slot":d,className:f,...l,children:o}),i[10]=u,i[11]=o,i[12]=l,i[13]=d,i[14]=f,i[15]=m):m=i[15],m},B=m(null),V=r=>{let i=p(21),a,o,s,c,l;i[0]===r?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({asChild:a,children:o,className:s,"data-slot":c,...l}=r,i[0]=r,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let[u,d]=y(null),f;i[6]===u?f=i[7]:(f={mountedLabelId:u,setMountedLabelId:d},i[6]=u,i[7]=f);let m=f,h=a?n:`div`,g;i[8]===c?g=i[9]:(g=t(c,`sidebar-group`),i[8]=c,i[9]=g);let _;i[10]===s?_=i[11]:(_=e(`pt-0.5`,s),i[10]=s,i[11]=_);let v;i[12]!==h||i[13]!==o||i[14]!==l||i[15]!==g||i[16]!==_?(v=S(h,{"data-slot":g,className:_,...l,children:o}),i[12]=h,i[13]=o,i[14]=l,i[15]=g,i[16]=_,i[17]=v):v=i[17];let b;return i[18]!==m||i[19]!==v?(b=S(B.Provider,{value:m,children:v}),i[18]=m,i[19]=v,i[20]=b):b=i[20],b},H=r=>{let i=p(22),a,o,s,c,l,u;i[0]===r?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5],u=i[6]):({asChild:a,children:o,className:s,"data-slot":c,id:l,...u}=r,i[0]=r,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l,i[6]=u);let d=h(B),f=_(),m=l??(d==null?void 0:f),v=d?.setMountedLabelId,y,b;i[7]!==m||i[8]!==v?(y=()=>{if(v!=null&&m!=null)return v(m),()=>{v(null)}},b=[v,m],i[7]=m,i[8]=v,i[9]=y,i[10]=b):(y=i[9],b=i[10]),g(y,b);let x=a?n:`div`,C;i[11]===c?C=i[12]:(C=t(c,`sidebar-group-label`),i[11]=c,i[12]=C);let w;i[13]===s?w=i[14]:(w=e(`text-muted flex min-w-0 items-center gap-2 truncate px-2 py-1 text-xs font-medium`,`group-data-[state=collapsed]/sidebar-nav:opacity-0`,`group-data-[state=collapsed]/sidebar-nav:pointer-events-none`,`group-data-hydrated/sidebar-nav:transition-opacity group-data-hydrated/sidebar-nav:duration-200 group-data-hydrated/sidebar-nav:ease-linear group-data-hydrated/sidebar-nav:motion-reduce:transition-none`,s),i[13]=s,i[14]=w);let T;return i[15]!==x||i[16]!==o||i[17]!==m||i[18]!==u||i[19]!==C||i[20]!==w?(T=S(x,{id:m,"data-slot":C,className:w,...u,children:o}),i[15]=x,i[16]=o,i[17]=m,i[18]=u,i[19]=C,i[20]=w,i[21]=T):T=i[21],T},U=r=>{let i=p(18),a,o,s,c,l,u;i[0]===r?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5],u=i[6]):({"aria-labelledby":a,asChild:o,children:s,className:c,"data-slot":l,...u}=r,i[0]=r,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l,i[6]=u);let d=h(B),f=o?n:`ul`,m=a??d?.mountedLabelId??void 0,g;i[7]===l?g=i[8]:(g=t(l,`sidebar-list`),i[7]=l,i[8]=g);let _;i[9]===c?_=i[10]:(_=e(`mb-2 space-y-px`,c),i[9]=c,i[10]=_);let v;return i[11]!==f||i[12]!==s||i[13]!==u||i[14]!==m||i[15]!==g||i[16]!==_?(v=S(f,{"aria-labelledby":m,"data-slot":g,className:_,...u,children:s}),i[11]=f,i[12]=s,i[13]=u,i[14]=m,i[15]=g,i[16]=_,i[17]=v):v=i[17],v},W=r=>{let i=p(16),a,o,s,c,l;i[0]===r?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({asChild:a,children:o,className:s,"data-slot":c,...l}=r,i[0]=r,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let u=a?n:`li`,d;i[6]===c?d=i[7]:(d=t(c,`sidebar-item`),i[6]=c,i[7]=d);let f;i[8]===s?f=i[9]:(f=e(`list-none`,s),i[8]=s,i[9]=f);let m;return i[10]!==u||i[11]!==o||i[12]!==l||i[13]!==d||i[14]!==f?(m=S(u,{"data-slot":d,className:f,...l,children:o}),i[10]=u,i[11]=o,i[12]=l,i[13]=d,i[14]=f,i[15]=m):m=i[15],m},G=[`ring-focus-accent flex w-full min-w-0 items-center gap-2 truncate rounded-md px-2 py-1 text-left font-normal transition-none focus:outline-hidden focus-visible:ring-4`,`text-body hover:text-strong hover:bg-neutral-500/10`,`data-state-open:bg-neutral-500/15 data-state-open:text-strong`,`group-data-[state=collapsed]/sidebar-nav:ml-1`,`group-data-[state=collapsed]/sidebar-nav:w-7`,`group-data-[state=collapsed]/sidebar-nav:p-1`].join(` `),K={Root:M,Nav:N,Trigger:I,Header:L,Body:R,Footer:z,Group:V,GroupLabel:H,List:U,Item:W,ItemButton:r=>{let i=p(21),a,o,s,c,l,u,d;i[0]===r?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5],u=i[6],d=i[7]):({asChild:a,children:o,className:s,current:c,"data-slot":l,type:d,...u}=r,i[0]=r,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l,i[6]=u,i[7]=d);let f=a?n:`button`,m;i[8]===l?m=i[9]:(m=t(l,`sidebar-item-button`),i[8]=l,i[9]=m);let h=c?``:void 0,g=c?`page`:void 0,_=a?d:d??`button`,v;i[10]===s?v=i[11]:(v=e(G,`data-current:bg-neutral-500/15 data-current:text-strong`,`aria-[current=page]:bg-neutral-500/15 aria-[current=page]:text-strong`,`[&>svg]:text-muted hover:[&>svg]:text-strong data-current:[&>svg]:text-strong aria-[current=page]:[&>svg]:text-strong [&>svg:first-child]:size-5 [&>svg]:shrink-0`,s),i[10]=s,i[11]=v);let y;return i[12]!==f||i[13]!==o||i[14]!==u||i[15]!==m||i[16]!==h||i[17]!==g||i[18]!==_||i[19]!==v?(y=S(f,{"data-slot":m,"data-current":h,"aria-current":g,type:_,className:v,...u,children:o}),i[12]=f,i[13]=o,i[14]=u,i[15]=m,i[16]=h,i[17]=g,i[18]=_,i[19]=v,i[20]=y):y=i[20],y},SearchTrigger:r=>{let i=p(23),a,o,s,c,l,u,d;i[0]===r?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5],u=i[6],d=i[7]):({asChild:a,children:o,className:s,"data-slot":c,shortcut:u,type:d,...l}=r,i[0]=r,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l,i[6]=u,i[7]=d);let f=a?n:`button`,m;i[8]!==a||i[9]!==o||i[10]!==u?(m=a?o:C(x,{children:[S(`span`,{"data-slot":`sidebar-search-trigger-label`,className:`contents`,children:o}),S(`span`,{"aria-hidden":!0,"data-slot":`sidebar-search-trigger-shortcut`,className:e(`pointer-events-none -mr-1 ml-auto inline-flex shrink-0 items-center gap-0.5 opacity-0 select-none`,`group-hover:opacity-100 group-focus-visible:opacity-100`,`group-data-[state=collapsed]/sidebar-nav:hidden`,`[&_kbd]:text-body [&_kbd]:h-5 [&_kbd]:min-w-5 [&_kbd]:bg-neutral-500/20 [&_kbd]:px-1 [&_kbd]:text-xs [&_kbd]:font-normal`,`empty:hidden`),children:u})]}),i[8]=a,i[9]=o,i[10]=u,i[11]=m):m=i[11];let h=m,g;i[12]===c?g=i[13]:(g=t(c,`sidebar-search-trigger`),i[12]=c,i[13]=g);let _=a?d:d??`button`,v;i[14]===s?v=i[15]:(v=e(`group`,G,`[&>svg:first-child]:text-muted hover:[&>svg:first-child]:text-strong`,`[&>svg:first-child]:size-5`,`[&>[data-slot=sidebar-search-trigger-label]>svg:first-child]:text-muted`,`hover:[&>[data-slot=sidebar-search-trigger-label]>svg:first-child]:text-strong`,`[&>[data-slot=sidebar-search-trigger-label]>svg:first-child]:size-5`,`[&_svg]:shrink-0`,s),i[14]=s,i[15]=v);let y;return i[16]!==f||i[17]!==h||i[18]!==l||i[19]!==g||i[20]!==_||i[21]!==v?(y=S(f,{"data-slot":g,type:_,className:v,...l,children:h}),i[16]=f,i[17]=h,i[18]=l,i[19]=g,i[20]=_,i[21]=v,i[22]=y):y=i[22],y},SwitcherTrigger:r=>{let i=p(18),a,o,s,c,l,u;i[0]===r?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5],u=i[6]):({asChild:a,children:o,className:s,"data-slot":c,type:u,...l}=r,i[0]=r,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l,i[6]=u);let d=a?n:`button`,f;i[7]===c?f=i[8]:(f=t(c,`sidebar-switcher-trigger`),i[7]=c,i[8]=f);let m=a?u:u??`button`,h;i[9]===s?h=i[10]:(h=e(`text-body hover:text-strong hover:bg-neutral-500/10 flex w-full min-w-0 items-center gap-2 rounded-[0.625rem] py-1 pr-1.5 pl-1 text-left font-medium transition-none`,`data-state-open:bg-neutral-500/15 data-state-open:text-strong`,`ring-focus-accent focus:outline-hidden focus-visible:ring-4`,`*:first:size-7`,`group-data-[state=collapsed]/sidebar-nav:w-9`,`group-data-[state=collapsed]/sidebar-nav:p-1`,`group-data-[state=collapsed]/sidebar-nav:[&>:not(:first-child)]:sr-only`,s),i[9]=s,i[10]=h);let g;return i[11]!==d||i[12]!==o||i[13]!==l||i[14]!==f||i[15]!==m||i[16]!==h?(g=S(d,{"data-slot":f,type:m,className:h,...l,children:o}),i[11]=d,i[12]=o,i[13]=l,i[14]=f,i[15]=m,i[16]=h,i[17]=g):g=i[17],g},Tooltip:e=>{let n=p(26),r,i,a,o,s,c;n[0]===e?(r=n[1],i=n[2],a=n[3],o=n[4],s=n[5],c=n[6]):({children:r,"data-slot":i,label:a,shortcut:s,side:c,...o}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a,n[4]=o,n[5]=s,n[6]=c);let l=c===void 0?`right`:c,{isMobile:u,open:d}=O(`Tooltip`),m=!u&&!d,[h,g]=y(!1),[_,v]=y(m);_!==m&&(v(m),g(!1));let b;n[7]===m?b=n[8]:(b=e=>{g(e&&m)},n[7]=m,n[8]=b);let x=b,w=m&&h,T;n[9]===r?T=n[10]:(T=S(f.Trigger,{asChild:!0,children:r}),n[9]=r,n[10]=T);let E;n[11]===i?E=n[12]:(E=t(i,`sidebar-tooltip`),n[11]=i,n[12]=E);let D;n[13]!==a||n[14]!==s?(D=S(F,{label:a,shortcut:s}),n[13]=a,n[14]=s,n[15]=D):D=n[15];let k;n[16]!==o||n[17]!==l||n[18]!==E||n[19]!==D?(k=S(f.Content,{"data-slot":E,side:l,...o,children:D}),n[16]=o,n[17]=l,n[18]=E,n[19]=D,n[20]=k):k=n[20];let A;return n[21]!==x||n[22]!==w||n[23]!==T||n[24]!==k?(A=C(f.Root,{disableHoverableContent:!0,onOpenChange:x,open:w,children:[T,k]}),n[21]=x,n[22]=w,n[23]=T,n[24]=k,n[25]=A):A=n[25],A},Separator:n=>{let r=p(12),i,o,s;r[0]===n?(i=r[1],o=r[2],s=r[3]):({className:i,"data-slot":o,...s}=n,r[0]=n,r[1]=i,r[2]=o,r[3]=s);let c;r[4]===o?c=r[5]:(c=t(o,`sidebar-separator`),r[4]=o,r[5]=c);let l;r[6]===i?l=r[7]:(l=e(`my-3`,`group-data-[state=collapsed]/sidebar-nav:w-9`,i),r[6]=i,r[7]=l);let u;return r[8]!==s||r[9]!==c||r[10]!==l?(u=S(a,{"data-slot":c,className:l,...s}),r[8]=s,r[9]=c,r[10]=l,r[11]=u):u=r[11],u}},q=`mantle-sidebar-state`,J={collapsed:`collapsed`,expanded:`expanded`};function Y(e){let t=l(e,q);if(t===J.expanded)return!0;if(t===J.collapsed)return!1}function X(e,t={}){let{domain:n,maxAge:r=31536e3,path:i=`/`,sameSite:a=`Lax`,secure:o=!1}=t,s=e?J.expanded:J.collapsed,c=[`${q}=${s}`,`Max-Age=${r}`,`Path=${i}`];return n!=null&&c.push(`Domain=${n}`),c.push(`SameSite=${a}`),o&&c.push(`Secure`),c.join(`; `)}export{q as SIDEBAR_STATE_COOKIE_NAME,K as Sidebar,Y as extractSidebarStateCookie,X as serializeSidebarStateCookie,D as useSidebar};
|
|
1
|
+
import{t as e}from"./cx-0HCjnNv1.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./slot-BsvE2ntj.js";import{t as r}from"./button-pwkdtR3U.js";import{t as i}from"./use-is-hydrated-DDCqXmju.js";import{n as a}from"./separator-D98be0gY.js";import{n as o,t as s}from"./use-is-apple-platform-CMPzIYjz.js";import{t as c}from"./use-callback-ref-BvVyI5K1.js";import{n as l}from"./cookie-ca4g5CKp.js";import{t as u}from"./sheet-CIgu6vwS.js";import{r as d}from"./use-breakpoint-CjyNk0fi.js";import{t as f}from"./tooltip-H03l7E4Y.js";import{c as p}from"react/compiler-runtime";import{createContext as m,useContext as h,useEffect as g,useId as _,useRef as v,useState as y}from"react";import b from"tiny-invariant";import{Fragment as x,jsx as S,jsxs as C}from"react/jsx-runtime";import{SidebarSimpleIcon as w}from"@phosphor-icons/react/SidebarSimple";const T={sm:`hidden sm:block`,md:`hidden md:block`,lg:`hidden lg:block`},E=m(null);function D(){let e=h(E);return b(e,`useSidebar must be used within Sidebar.Root.`),e}function O(e){let t=h(E);return b(t,`Sidebar.${e} must be rendered inside Sidebar.Root.`),t}const k=[];function A(e){return e instanceof HTMLElement?e.isContentEditable||e.tagName===`INPUT`||e.tagName===`TEXTAREA`||e.tagName===`SELECT`:!1}function j(){let e=Symbol(`sidebar-keyboard-shortcut`);return k.push(e),{isOwner:()=>k[0]===e,release:()=>{let t=k.indexOf(e);t!==-1&&k.splice(t,1)}}}const M=e=>{let t=p(34),{children:n,defaultOpen:r,keyboardShortcut:i,mobileBreakpoint:a,onOpenChange:s,onOpenMobileChange:l,open:u,openMobile:f}=e,m=r===void 0||r,h=i===void 0||i,b=a===void 0?`lg`:a,x=d(b),C=_(),w=u!=null,[T,D]=y(m),O=w?u:T,k;t[0]!==w||t[1]!==s?(k=e=>{w||D(e),s?.(e)},t[0]=w,t[1]=s,t[2]=k):k=t[2];let M=k,N=f!=null,[P,F]=y(!1),I=N?f:P,L;t[3]!==N||t[4]!==l?(L=e=>{N||F(e),l?.(e)},t[3]=N,t[4]=l,t[5]=L):L=t[5];let R=L,z=v(x),B,V;t[6]!==x||t[7]!==I||t[8]!==R?(B=()=>{let e=z.current&&!x;z.current=x,e&&I&&R(!1)},V=[x,I,R],t[6]=x,t[7]=I,t[8]=R,t[9]=B,t[10]=V):(B=t[9],V=t[10]),g(B,V);let H;t[11]!==x||t[12]!==O||t[13]!==I||t[14]!==M||t[15]!==R?(H=()=>{x?R(!I):M(!O)},t[11]=x,t[12]=O,t[13]=I,t[14]=M,t[15]=R,t[16]=H):H=t[16];let U=H,W=c(U),G,K;t[17]!==h||t[18]!==W?(K=()=>{if(!h)return;let e=j(),t=o(),n=n=>{if(!e.isOwner()||A(n.target))return;let r=t?n.metaKey:n.ctrlKey,i=t?n.ctrlKey:n.metaKey;n.key?.toLowerCase()===`b`&&r&&!i&&!n.altKey&&!n.shiftKey&&(n.preventDefault(),W())};return window.addEventListener(`keydown`,n),()=>{window.removeEventListener(`keydown`,n),e.release()}},G=[h,W],t[17]=h,t[18]=W,t[19]=G,t[20]=K):(G=t[19],K=t[20]),g(K,G);let q;t[21]!==x||t[22]!==h||t[23]!==b||t[24]!==C||t[25]!==O||t[26]!==I||t[27]!==M||t[28]!==R||t[29]!==U?(q={isMobile:x,keyboardShortcut:h,mobileBreakpoint:b,navId:C,open:O,openMobile:I,setOpen:M,setOpenMobile:R,toggle:U},t[21]=x,t[22]=h,t[23]=b,t[24]=C,t[25]=O,t[26]=I,t[27]=M,t[28]=R,t[29]=U,t[30]=q):q=t[30];let J=q,Y;return t[31]!==n||t[32]!==J?(Y=S(E.Provider,{value:J,children:n}),t[31]=n,t[32]=J,t[33]=Y):Y=t[33],Y},N=n=>{let r=p(49),a,o,s,c,l,d;r[0]===n?(a=r[1],o=r[2],s=r[3],c=r[4],l=r[5],d=r[6]):({"aria-label":a,"aria-labelledby":o,children:s,className:c,"data-slot":l,...d}=n,r[0]=n,r[1]=a,r[2]=o,r[3]=s,r[4]=c,r[5]=l,r[6]=d);let{isMobile:f,mobileBreakpoint:m,navId:h,open:g,openMobile:_,setOpenMobile:v}=O(`Nav`),y=i(),b=a??(o==null?`Main`:void 0);if(f){let n;r[7]===l?n=r[8]:(n=t(l,`sidebar-nav`),r[7]=l,r[8]=n);let i;r[9]===o?i=r[10]:(i=o==null?null:{"aria-labelledby":o},r[9]=o,r[10]=i);let a;r[11]===c?a=r[12]:(a=e(`bg-base w-(--sidebar-width-mobile,18rem) max-w-full p-0`,c),r[11]=c,r[12]=a);let f=b??`Sidebar`,p;r[13]===f?p=r[14]:(p=S(u.Title,{className:`sr-only`,children:f}),r[13]=f,r[14]=p);let m;r[15]!==b||r[16]!==o||r[17]!==s||r[18]!==h?(m=S(`nav`,{id:h,"aria-label":b,"aria-labelledby":o,className:`flex h-full w-full min-w-0 flex-col text-sm`,children:s}),r[15]=b,r[16]=o,r[17]=s,r[18]=h,r[19]=m):m=r[19];let g;r[20]!==d||r[21]!==n||r[22]!==i||r[23]!==a||r[24]!==p||r[25]!==m?(g=C(u.Content,{side:`left`,preferredWidth:`sm:max-w-(--sidebar-width-mobile,18rem)`,"data-slot":n,"data-mobile":``,...i,className:a,...d,children:[p,m]}),r[20]=d,r[21]=n,r[22]=i,r[23]=a,r[24]=p,r[25]=m,r[26]=g):g=r[26];let y;return r[27]!==_||r[28]!==v||r[29]!==g?(y=S(u.Root,{open:_,onOpenChange:v,children:g}),r[27]=_,r[28]=v,r[29]=g,r[30]=y):y=r[30],y}let x;r[31]===l?x=r[32]:(x=t(l,`sidebar-nav`),r[31]=l,r[32]=x);let w=g?`expanded`:`collapsed`,E=y?``:void 0,D=!y&&T[m],k=y&&`transition-[width] duration-200 ease-linear motion-reduce:transition-none`,A;r[33]!==c||r[34]!==D||r[35]!==k?(A=e(`group/sidebar-nav bg-base relative h-full w-(--sidebar-width,13rem) shrink-0 overflow-hidden`,`data-[state=collapsed]:w-(--sidebar-width-icon,3.25rem)`,D,k,c),r[33]=c,r[34]=D,r[35]=k,r[36]=A):A=r[36];let j;r[37]!==b||r[38]!==o||r[39]!==s||r[40]!==h?(j=S(`nav`,{id:h,"aria-label":b,"aria-labelledby":o,className:`absolute inset-y-0 left-0 flex w-full min-w-0 flex-col text-sm`,children:s}),r[37]=b,r[38]=o,r[39]=s,r[40]=h,r[41]=j):j=r[41];let M;return r[42]!==d||r[43]!==x||r[44]!==w||r[45]!==E||r[46]!==A||r[47]!==j?(M=S(`div`,{"data-slot":x,"data-state":w,"data-hydrated":E,className:A,...d,children:j}),r[42]=d,r[43]=x,r[44]=w,r[45]=E,r[46]=A,r[47]=j,r[48]=M):M=r[48],M},P=S(w,{}),F=e=>{let t=p(7),{label:n,shortcut:r}=e,i;t[0]===n?i=t[1]:(i=S(`span`,{"data-slot":`sidebar-tooltip-label`,className:`contents`,children:n}),t[0]=n,t[1]=i);let a;t[2]===r?a=t[3]:(a=r!=null&&S(`span`,{"aria-hidden":!0,"data-slot":`sidebar-tooltip-shortcut`,className:`inline-flex shrink-0 items-center gap-0.5 [&_kbd]:h-4 [&_kbd]:min-w-4 [&_kbd]:bg-neutral-500/25 [&_kbd]:px-0.5 [&_kbd]:text-xs`,children:r}),t[2]=r,t[3]=a);let o;return t[4]!==i||t[5]!==a?(o=C(`span`,{"data-slot":`sidebar-tooltip-row`,className:`flex items-center gap-1.5`,children:[i,a]}),t[4]=i,t[5]=a,t[6]=o):o=t[6],o},I=e=>{let n=p(32),i,a,o,c,l,u,d,m;n[0]===e?(i=n[1],a=n[2],o=n[3],c=n[4],l=n[5],u=n[6],d=n[7],m=n[8]):({appearance:l,"data-slot":i,icon:u,intent:d,label:m,onClick:a,shortcut:c,...o}=e,n[0]=e,n[1]=i,n[2]=a,n[3]=o,n[4]=c,n[5]=l,n[6]=u,n[7]=d,n[8]=m);let h=l===void 0?`ghost`:l,g=u===void 0?P:u,_=d===void 0?`neutral`:d,v=m===void 0?`Toggle Sidebar`:m,{isMobile:y,keyboardShortcut:b,navId:x,open:w,openMobile:T,toggle:E}=O(`Trigger`),D=s(),k=y?T:w,A=!y||T,j=b?c:void 0,M=D?`Meta+B`:`Control+B`,N=A?x:void 0,I=b?M:void 0,L;n[9]===i?L=n[10]:(L=t(i,`sidebar-trigger`),n[9]=i,n[10]=L);let R=k?`expanded`:`collapsed`,z;n[11]!==a||n[12]!==E?(z=e=>{a?.(e),e.defaultPrevented||E()},n[11]=a,n[12]=E,n[13]=z):z=n[13];let B;n[14]!==h||n[15]!==k||n[16]!==g||n[17]!==_||n[18]!==v||n[19]!==o||n[20]!==N||n[21]!==I||n[22]!==L||n[23]!==R||n[24]!==z?(B=S(f.Trigger,{asChild:!0,children:S(r,{appearance:h,"aria-controls":N,"aria-expanded":k,"aria-keyshortcuts":I,"data-slot":L,"data-state":R,icon:g,intent:_,label:v,onClick:z,...o})}),n[14]=h,n[15]=k,n[16]=g,n[17]=_,n[18]=v,n[19]=o,n[20]=N,n[21]=I,n[22]=L,n[23]=R,n[24]=z,n[25]=B):B=n[25];let V;n[26]!==j||n[27]!==v?(V=S(f.Content,{"data-slot":`sidebar-trigger-tooltip`,children:S(F,{label:v,shortcut:j})}),n[26]=j,n[27]=v,n[28]=V):V=n[28];let H;return n[29]!==B||n[30]!==V?(H=C(f.Root,{children:[B,V]}),n[29]=B,n[30]=V,n[31]=H):H=n[31],H},L=r=>{let i=p(16),a,o,s,c,l;i[0]===r?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({asChild:a,children:o,className:s,"data-slot":c,...l}=r,i[0]=r,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let u=a?n:`div`,d;i[6]===c?d=i[7]:(d=t(c,`sidebar-header`),i[6]=c,i[7]=d);let f;i[8]===s?f=i[9]:(f=e(`grid grid-cols-1 grid-rows-(--sidebar-header-height,4.5rem) shrink-0 items-center px-3`,`group-data-[state=expanded]/sidebar-nav:pr-1`,s),i[8]=s,i[9]=f);let m;return i[10]!==u||i[11]!==o||i[12]!==l||i[13]!==d||i[14]!==f?(m=S(u,{"data-slot":d,className:f,...l,children:o}),i[10]=u,i[11]=o,i[12]=l,i[13]=d,i[14]=f,i[15]=m):m=i[15],m},R=r=>{let i=p(16),a,o,s,c,l;i[0]===r?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({asChild:a,children:o,className:s,"data-slot":c,...l}=r,i[0]=r,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let u=a?n:`div`,d;i[6]===c?d=i[7]:(d=t(c,`sidebar-body`),i[6]=c,i[7]=d);let f;i[8]===s?f=i[9]:(f=e(`scrollbar scrollbar-gutter-stable scroll-fade-y flex-1 scroll-py-6 space-y-2 overflow-y-auto overflow-x-hidden px-3 pt-1.5 pb-4`,`group-data-[state=expanded]/sidebar-nav:pr-1`,`group-data-[state=collapsed]/sidebar-nav:scrollbar-none`,`group-data-[state=collapsed]/sidebar-nav:scrollbar-gutter-auto`,`group-data-[state=collapsed]/sidebar-nav:[&::-webkit-scrollbar]:hidden`,s),i[8]=s,i[9]=f);let m;return i[10]!==u||i[11]!==o||i[12]!==l||i[13]!==d||i[14]!==f?(m=S(u,{"data-slot":d,className:f,...l,children:o}),i[10]=u,i[11]=o,i[12]=l,i[13]=d,i[14]=f,i[15]=m):m=i[15],m},z=r=>{let i=p(16),a,o,s,c,l;i[0]===r?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({asChild:a,children:o,className:s,"data-slot":c,...l}=r,i[0]=r,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let u=a?n:`div`,d;i[6]===c?d=i[7]:(d=t(c,`sidebar-footer`),i[6]=c,i[7]=d);let f;i[8]===s?f=i[9]:(f=e(`shrink-0 px-3 pt-3 pb-3.5`,`group-data-[state=expanded]/sidebar-nav:pr-1`,s),i[8]=s,i[9]=f);let m;return i[10]!==u||i[11]!==o||i[12]!==l||i[13]!==d||i[14]!==f?(m=S(u,{"data-slot":d,className:f,...l,children:o}),i[10]=u,i[11]=o,i[12]=l,i[13]=d,i[14]=f,i[15]=m):m=i[15],m},B=m(null),V=r=>{let i=p(21),a,o,s,c,l;i[0]===r?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({asChild:a,children:o,className:s,"data-slot":c,...l}=r,i[0]=r,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let[u,d]=y(null),f;i[6]===u?f=i[7]:(f={mountedLabelId:u,setMountedLabelId:d},i[6]=u,i[7]=f);let m=f,h=a?n:`div`,g;i[8]===c?g=i[9]:(g=t(c,`sidebar-group`),i[8]=c,i[9]=g);let _;i[10]===s?_=i[11]:(_=e(`pt-0.5`,s),i[10]=s,i[11]=_);let v;i[12]!==h||i[13]!==o||i[14]!==l||i[15]!==g||i[16]!==_?(v=S(h,{"data-slot":g,className:_,...l,children:o}),i[12]=h,i[13]=o,i[14]=l,i[15]=g,i[16]=_,i[17]=v):v=i[17];let b;return i[18]!==m||i[19]!==v?(b=S(B.Provider,{value:m,children:v}),i[18]=m,i[19]=v,i[20]=b):b=i[20],b},H=r=>{let i=p(22),a,o,s,c,l,u;i[0]===r?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5],u=i[6]):({asChild:a,children:o,className:s,"data-slot":c,id:l,...u}=r,i[0]=r,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l,i[6]=u);let d=h(B),f=_(),m=l??(d==null?void 0:f),v=d?.setMountedLabelId,y,b;i[7]!==m||i[8]!==v?(y=()=>{if(v!=null&&m!=null)return v(m),()=>{v(null)}},b=[v,m],i[7]=m,i[8]=v,i[9]=y,i[10]=b):(y=i[9],b=i[10]),g(y,b);let x=a?n:`div`,C;i[11]===c?C=i[12]:(C=t(c,`sidebar-group-label`),i[11]=c,i[12]=C);let w;i[13]===s?w=i[14]:(w=e(`text-muted flex min-w-0 items-center gap-2 truncate px-2 py-1 text-xs font-medium`,`group-data-[state=collapsed]/sidebar-nav:opacity-0`,`group-data-[state=collapsed]/sidebar-nav:pointer-events-none`,`group-data-hydrated/sidebar-nav:transition-opacity group-data-hydrated/sidebar-nav:duration-200 group-data-hydrated/sidebar-nav:ease-linear group-data-hydrated/sidebar-nav:motion-reduce:transition-none`,s),i[13]=s,i[14]=w);let T;return i[15]!==x||i[16]!==o||i[17]!==m||i[18]!==u||i[19]!==C||i[20]!==w?(T=S(x,{id:m,"data-slot":C,className:w,...u,children:o}),i[15]=x,i[16]=o,i[17]=m,i[18]=u,i[19]=C,i[20]=w,i[21]=T):T=i[21],T},U=r=>{let i=p(18),a,o,s,c,l,u;i[0]===r?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5],u=i[6]):({"aria-labelledby":a,asChild:o,children:s,className:c,"data-slot":l,...u}=r,i[0]=r,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l,i[6]=u);let d=h(B),f=o?n:`ul`,m=a??d?.mountedLabelId??void 0,g;i[7]===l?g=i[8]:(g=t(l,`sidebar-list`),i[7]=l,i[8]=g);let _;i[9]===c?_=i[10]:(_=e(`mb-2 space-y-px`,c),i[9]=c,i[10]=_);let v;return i[11]!==f||i[12]!==s||i[13]!==u||i[14]!==m||i[15]!==g||i[16]!==_?(v=S(f,{"aria-labelledby":m,"data-slot":g,className:_,...u,children:s}),i[11]=f,i[12]=s,i[13]=u,i[14]=m,i[15]=g,i[16]=_,i[17]=v):v=i[17],v},W=r=>{let i=p(16),a,o,s,c,l;i[0]===r?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({asChild:a,children:o,className:s,"data-slot":c,...l}=r,i[0]=r,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let u=a?n:`li`,d;i[6]===c?d=i[7]:(d=t(c,`sidebar-item`),i[6]=c,i[7]=d);let f;i[8]===s?f=i[9]:(f=e(`list-none`,s),i[8]=s,i[9]=f);let m;return i[10]!==u||i[11]!==o||i[12]!==l||i[13]!==d||i[14]!==f?(m=S(u,{"data-slot":d,className:f,...l,children:o}),i[10]=u,i[11]=o,i[12]=l,i[13]=d,i[14]=f,i[15]=m):m=i[15],m},G=[`ring-focus-accent flex w-full min-w-0 items-center gap-2 truncate rounded-md px-2 py-1 text-left font-normal transition-none focus:outline-hidden focus-visible:ring-4`,`text-body hover:text-strong hover:bg-neutral-500/10`,`data-state-open:bg-neutral-500/15 data-state-open:text-strong`,`group-data-[state=collapsed]/sidebar-nav:ml-1`,`group-data-[state=collapsed]/sidebar-nav:w-7`,`group-data-[state=collapsed]/sidebar-nav:p-1`].join(` `),K={Root:M,Nav:N,Trigger:I,Header:L,Body:R,Footer:z,Group:V,GroupLabel:H,List:U,Item:W,ItemButton:r=>{let i=p(21),a,o,s,c,l,u,d;i[0]===r?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5],u=i[6],d=i[7]):({asChild:a,children:o,className:s,current:c,"data-slot":l,type:d,...u}=r,i[0]=r,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l,i[6]=u,i[7]=d);let f=a?n:`button`,m;i[8]===l?m=i[9]:(m=t(l,`sidebar-item-button`),i[8]=l,i[9]=m);let h=c?``:void 0,g=c?`page`:void 0,_=a?d:d??`button`,v;i[10]===s?v=i[11]:(v=e(G,`data-current:bg-neutral-500/15 data-current:text-strong`,`aria-[current=page]:bg-neutral-500/15 aria-[current=page]:text-strong`,`[&>svg]:text-muted hover:[&>svg]:text-strong data-current:[&>svg]:text-strong aria-[current=page]:[&>svg]:text-strong [&>svg:first-child]:size-5 [&>svg]:shrink-0`,s),i[10]=s,i[11]=v);let y;return i[12]!==f||i[13]!==o||i[14]!==u||i[15]!==m||i[16]!==h||i[17]!==g||i[18]!==_||i[19]!==v?(y=S(f,{"data-slot":m,"data-current":h,"aria-current":g,type:_,className:v,...u,children:o}),i[12]=f,i[13]=o,i[14]=u,i[15]=m,i[16]=h,i[17]=g,i[18]=_,i[19]=v,i[20]=y):y=i[20],y},SearchTrigger:r=>{let i=p(23),a,o,s,c,l,u,d;i[0]===r?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5],u=i[6],d=i[7]):({asChild:a,children:o,className:s,"data-slot":c,shortcut:u,type:d,...l}=r,i[0]=r,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l,i[6]=u,i[7]=d);let f=a?n:`button`,m;i[8]!==a||i[9]!==o||i[10]!==u?(m=a?o:C(x,{children:[S(`span`,{"data-slot":`sidebar-search-trigger-label`,className:`contents`,children:o}),S(`span`,{"aria-hidden":!0,"data-slot":`sidebar-search-trigger-shortcut`,className:e(`pointer-events-none -mr-1 ml-auto inline-flex shrink-0 items-center gap-0.5 opacity-0 select-none`,`group-hover:opacity-100 group-focus-visible:opacity-100`,`group-data-[state=collapsed]/sidebar-nav:hidden`,`[&_kbd]:text-body [&_kbd]:h-5 [&_kbd]:min-w-5 [&_kbd]:bg-neutral-500/20 [&_kbd]:px-1 [&_kbd]:text-xs [&_kbd]:font-normal`,`empty:hidden`),children:u})]}),i[8]=a,i[9]=o,i[10]=u,i[11]=m):m=i[11];let h=m,g;i[12]===c?g=i[13]:(g=t(c,`sidebar-search-trigger`),i[12]=c,i[13]=g);let _=a?d:d??`button`,v;i[14]===s?v=i[15]:(v=e(`group`,G,`[&>svg:first-child]:text-muted hover:[&>svg:first-child]:text-strong`,`[&>svg:first-child]:size-5`,`[&>[data-slot=sidebar-search-trigger-label]>svg:first-child]:text-muted`,`hover:[&>[data-slot=sidebar-search-trigger-label]>svg:first-child]:text-strong`,`[&>[data-slot=sidebar-search-trigger-label]>svg:first-child]:size-5`,`[&_svg]:shrink-0`,s),i[14]=s,i[15]=v);let y;return i[16]!==f||i[17]!==h||i[18]!==l||i[19]!==g||i[20]!==_||i[21]!==v?(y=S(f,{"data-slot":g,type:_,className:v,...l,children:h}),i[16]=f,i[17]=h,i[18]=l,i[19]=g,i[20]=_,i[21]=v,i[22]=y):y=i[22],y},SwitcherTrigger:r=>{let i=p(18),a,o,s,c,l,u;i[0]===r?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5],u=i[6]):({asChild:a,children:o,className:s,"data-slot":c,type:u,...l}=r,i[0]=r,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l,i[6]=u);let d=a?n:`button`,f;i[7]===c?f=i[8]:(f=t(c,`sidebar-switcher-trigger`),i[7]=c,i[8]=f);let m=a?u:u??`button`,h;i[9]===s?h=i[10]:(h=e(`text-body hover:text-strong hover:bg-neutral-500/10 flex w-full min-w-0 items-center gap-2 rounded-[0.625rem] py-1 pr-1.5 pl-1 text-left font-medium transition-none`,`data-state-open:bg-neutral-500/15 data-state-open:text-strong`,`ring-focus-accent focus:outline-hidden focus-visible:ring-4`,`*:first:size-7`,`group-data-[state=collapsed]/sidebar-nav:w-9`,`group-data-[state=collapsed]/sidebar-nav:p-1`,`group-data-[state=collapsed]/sidebar-nav:[&>:not(:first-child)]:sr-only`,s),i[9]=s,i[10]=h);let g;return i[11]!==d||i[12]!==o||i[13]!==l||i[14]!==f||i[15]!==m||i[16]!==h?(g=S(d,{"data-slot":f,type:m,className:h,...l,children:o}),i[11]=d,i[12]=o,i[13]=l,i[14]=f,i[15]=m,i[16]=h,i[17]=g):g=i[17],g},Tooltip:e=>{let n=p(26),r,i,a,o,s,c;n[0]===e?(r=n[1],i=n[2],a=n[3],o=n[4],s=n[5],c=n[6]):({children:r,"data-slot":i,label:a,shortcut:s,side:c,...o}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a,n[4]=o,n[5]=s,n[6]=c);let l=c===void 0?`right`:c,{isMobile:u,open:d}=O(`Tooltip`),m=!u&&!d,[h,g]=y(!1),[_,v]=y(m);_!==m&&(v(m),g(!1));let b;n[7]===m?b=n[8]:(b=e=>{g(e&&m)},n[7]=m,n[8]=b);let x=b,w=m&&h,T;n[9]===r?T=n[10]:(T=S(f.Trigger,{asChild:!0,children:r}),n[9]=r,n[10]=T);let E;n[11]===i?E=n[12]:(E=t(i,`sidebar-tooltip`),n[11]=i,n[12]=E);let D;n[13]!==a||n[14]!==s?(D=S(F,{label:a,shortcut:s}),n[13]=a,n[14]=s,n[15]=D):D=n[15];let k;n[16]!==o||n[17]!==l||n[18]!==E||n[19]!==D?(k=S(f.Content,{"data-slot":E,side:l,...o,children:D}),n[16]=o,n[17]=l,n[18]=E,n[19]=D,n[20]=k):k=n[20];let A;return n[21]!==x||n[22]!==w||n[23]!==T||n[24]!==k?(A=C(f.Root,{disableHoverableContent:!0,onOpenChange:x,open:w,children:[T,k]}),n[21]=x,n[22]=w,n[23]=T,n[24]=k,n[25]=A):A=n[25],A},Separator:n=>{let r=p(12),i,o,s;r[0]===n?(i=r[1],o=r[2],s=r[3]):({className:i,"data-slot":o,...s}=n,r[0]=n,r[1]=i,r[2]=o,r[3]=s);let c;r[4]===o?c=r[5]:(c=t(o,`sidebar-separator`),r[4]=o,r[5]=c);let l;r[6]===i?l=r[7]:(l=e(`my-3`,`group-data-[state=collapsed]/sidebar-nav:w-9`,i),r[6]=i,r[7]=l);let u;return r[8]!==s||r[9]!==c||r[10]!==l?(u=S(a,{"data-slot":c,className:l,...s}),r[8]=s,r[9]=c,r[10]=l,r[11]=u):u=r[11],u}},q=`mantle-sidebar-state`,J={collapsed:`collapsed`,expanded:`expanded`};function Y(e){let t=l(e,q);if(t===J.expanded)return!0;if(t===J.collapsed)return!1}function X(e,t={}){let{domain:n,maxAge:r=31536e3,path:i=`/`,sameSite:a=`Lax`,secure:o=!1}=t,s=e?J.expanded:J.collapsed,c=[`${q}=${s}`,`Max-Age=${r}`,`Path=${i}`];return n!=null&&c.push(`Domain=${n}`),c.push(`SameSite=${a}`),o&&c.push(`Secure`),c.join(`; `)}export{q as SIDEBAR_STATE_COOKIE_NAME,K as Sidebar,Y as extractSidebarStateCookie,X as serializeSidebarStateCookie,D as useSidebar};
|
package/dist/slider.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ComponentProps } from "react";
|
|
2
|
-
import
|
|
2
|
+
import { Root } from "@radix-ui/react-slider";
|
|
3
3
|
//#region src/components/slider/slider.d.ts
|
|
4
|
-
type SliderBaseProps = Omit<ComponentProps<typeof
|
|
4
|
+
type SliderBaseProps = Omit<ComponentProps<typeof Root>, "defaultValue" | "value">;
|
|
5
5
|
/**
|
|
6
6
|
* Value props for the {@link Slider} component. Either both `defaultValue` and
|
|
7
7
|
* `value` must be the same type (both `number` or both `number[]`), or only one
|
package/dist/slider.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-0HCjnNv1.js";import{t}from"./field-B1wqeZr4.js";import{c as n}from"react/compiler-runtime";import{useContext as r}from"react";import{jsx as i,jsxs as a}from"react/jsx-runtime";import
|
|
1
|
+
import{t as e}from"./cx-0HCjnNv1.js";import{t}from"./field-B1wqeZr4.js";import{c as n}from"react/compiler-runtime";import{useContext as r}from"react";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{Range as o,Root as s,Thumb as c,Track as l}from"@radix-ui/react-slider";function u(u){let m=n(68),h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j;m[0]===u?(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],k=m[15],A=m[16],j=m[17]):({"aria-describedby":h,"aria-errormessage":g,"aria-invalid":_,"aria-label":v,"aria-labelledby":y,className:b,color:T,defaultValue:x,id:S,max:E,min:D,minStepsBetweenThumbs:O,name:C,step:k,showTicks:A,value:j,...w}=u,m[0]=u,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,m[15]=k,m[16]=A,m[17]=j);let M=T===void 0?`bg-accent-600`:T,N=E===void 0?100:E,P=D===void 0?0:D,F=O===void 0?1:O,I=k===void 0?1:k,L=A!==void 0&&A,R=r(t),z;m[18]===j?z=m[19]:(z=j==null?void 0:Array.isArray(j)?j:[j],m[18]=j,m[19]=z);let B=z,V;m[20]===x?V=m[21]:(V=x==null?void 0:Array.isArray(x)?x:[x],m[20]=x,m[21]=V);let H=V,U;m[22]!==P||m[23]!==H||m[24]!==B?(U=B??H??[P],m[22]=P,m[23]=H,m[24]=B,m[25]=U):U=m[25];let W=U,G;if(m[26]!==h||m[27]!==g||m[28]!==_||m[29]!==v||m[30]!==y||m[31]!==b||m[32]!==M||m[33]!==R||m[34]!==S||m[35]!==N||m[36]!==P||m[37]!==F||m[38]!==C||m[39]!==H||m[40]!==B||m[41]!==w||m[42]!==L||m[43]!==I||m[44]!==W.length){let t=f(L,P,N,I),n;m[46]!==h||m[47]!==g||m[48]!==_||m[49]!==R||m[50]!==S?(n=R?{}:{"aria-describedby":h,"aria-errormessage":g,"aria-invalid":_,id:S},m[46]=h,m[47]=g,m[48]=_,m[49]=R,m[50]=S,m[51]=n):n=m[51];let r=t>0&&`mb-3`,u;m[52]!==b||m[53]!==r?(u=e(`[--slider-thumb-size:--spacing(4.5)]`,`data-orientation-vertical:min-h-40 relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-orientation-vertical:h-full data-orientation-vertical:w-auto data-orientation-vertical:flex-col`,r,b),m[52]=b,m[53]=r,m[54]=u):u=m[54];let x;m[55]===Symbol.for(`react.memo_cache_sentinel`)?(x=e(`bg-neutral-300 rounded-full relative grow overflow-hidden`,`data-orientation-horizontal:h-1.5 data-orientation-horizontal:w-full`,`data-orientation-vertical:w-1.5 data-orientation-vertical:h-full`),m[55]=x):x=m[55];let T;m[56]===M?T=m[57]:(T=e(`absolute select-none data-orientation-horizontal:h-full data-orientation-vertical:w-full`,M),m[56]=M,m[57]=T);let E;m[58]===T?E=m[59]:(E=i(l,{"data-slot":`slider-track`,className:x,children:i(o,{"data-slot":`slider-range`,className:T})}),m[58]=T,m[59]=E);let D;m[60]!==h||m[61]!==g||m[62]!==_||m[63]!==v||m[64]!==y||m[65]!==R||m[66]!==W.length?(D=Array.from({length:W.length},(t,n)=>i(c,{"data-slot":`slider-thumb`,"aria-describedby":R?.[`aria-describedby`]??h,"aria-errormessage":R?.[`aria-errormessage`]??g,"aria-invalid":R?.[`aria-invalid`]??_,"aria-label":p({ariaLabel:v,index:n,thumbCount:W.length}),"aria-labelledby":y,id:n===0?R?.id:void 0,className:e(`bg-card border-card relative size-(--slider-thumb-size) rounded-full border`,`shadow-md transition-[color,box-shadow]`,`after:absolute after:-inset-2`,`focus-visible:ring-3 focus-visible:ring-accent-500/20 focus-visible:outline-hidden`,`block shrink-0 cursor-pointer select-none`,`data-disabled:pointer-events-none data-disabled:cursor-default`)},n)),m[60]=h,m[61]=g,m[62]=_,m[63]=v,m[64]=y,m[65]=R,m[66]=W.length,m[67]=D):D=m[67],G=a(s,{"data-slot":`slider`,defaultValue:H,value:B,...n,min:P,minStepsBetweenThumbs:F,max:N,name:C,step:I,className:u,...w,children:[E,D,t>0&&i(`div`,{"data-slot":`slider-ticks`,className:`absolute top-full mt-1.5 flex w-full justify-between px-[calc(var(--slider-thumb-size)/2)]`,"aria-hidden":`true`,children:Array.from({length:t},d)})]}),m[26]=h,m[27]=g,m[28]=_,m[29]=v,m[30]=y,m[31]=b,m[32]=M,m[33]=R,m[34]=S,m[35]=N,m[36]=P,m[37]=F,m[38]=C,m[39]=H,m[40]=B,m[41]=w,m[42]=L,m[43]=I,m[44]=W.length,m[45]=G}else G=m[45];return G}function d(e,t){return i(`span`,{"data-slot":`slider-tick`,className:`bg-card-border h-1.5 w-px`},t)}function f(e,t,n,r){let i=n-t;return!e||!Number.isFinite(i)||!Number.isFinite(r)||r<=0||i<=0?0:Math.floor(i/r)+1}function p({ariaLabel:e,index:t,thumbCount:n}){if(e)return n===1?e:n===2?`${t===0?`Minimum`:`Maximum`} ${e}`:`${e} ${t+1} of ${n}`}export{u as Slider};
|
package/dist/split-button.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as Button } from "./button-B5i9n7Qp.js";
|
|
2
2
|
import { t as IconButton } from "./button-crUf0hbR.js";
|
|
3
3
|
import { t as ButtonSize } from "./button-BCoI4bhP.js";
|
|
4
|
-
import { t as DropdownMenu } from "./dropdown-menu-
|
|
4
|
+
import { t as DropdownMenu } from "./dropdown-menu-BloQKE_y.js";
|
|
5
5
|
import { ComponentProps, ReactNode } from "react";
|
|
6
6
|
//#region src/components/split-button/split-button.d.ts
|
|
7
7
|
type RootProps = ComponentProps<typeof DropdownMenu.Root> & ComponentProps<"div"> & {
|
package/dist/split-button.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-0HCjnNv1.js";import{t}from"./icon-BT8FnkkJ.js";import{t as n}from"./button-Dij5vCQG.js";import{t as r}from"./button-pwkdtR3U.js";import{t as i}from"./dropdown-menu-
|
|
1
|
+
import{t as e}from"./cx-0HCjnNv1.js";import{t}from"./icon-BT8FnkkJ.js";import{t as n}from"./button-Dij5vCQG.js";import{t as r}from"./button-pwkdtR3U.js";import{t as i}from"./dropdown-menu-BR_AQNMj.js";import{c as a}from"react/compiler-runtime";import{CaretDownIcon as o}from"@phosphor-icons/react/CaretDown";import{createContext as s,useContext as c}from"react";import{jsx as l}from"react/jsx-runtime";const u=s({size:`md`}),d={Root:t=>{let n=a(31),r,o,s,c,d,f,p,m,h,g;n[0]===t?(r=n[1],o=n[2],s=n[3],c=n[4],d=n[5],f=n[6],p=n[7],m=n[8],h=n[9],g=n[10]):({className:o,children:r,dir:c,open:p,defaultOpen:s,onOpenChange:f,modal:d,size:g,ref:h,...m}=t,n[0]=t,n[1]=r,n[2]=o,n[3]=s,n[4]=c,n[5]=d,n[6]=f,n[7]=p,n[8]=m,n[9]=h,n[10]=g);let _=g===void 0?`md`:g,v;n[11]===_?v=n[12]:(v={size:_},n[11]=_,n[12]=v);let y=v,b;n[13]===o?b=n[14]:(b=e(`flex flex-row [&>*:first-child]:rounded-r-none [&>*:last-child]:rounded-l-none [&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:not(:first-child)]:-ml-px [&>*:focus]:relative [&>*:focus]:z-10 [&>*:hover]:relative [&>*:hover]:z-10 *:active:scale-100!`,o),n[13]=o,n[14]=b);let x;n[15]!==r||n[16]!==m||n[17]!==h||n[18]!==_||n[19]!==b?(x=l(`div`,{"data-slot":`split-button`,"data-size":_,className:b,ref:h,...m,children:r}),n[15]=r,n[16]=m,n[17]=h,n[18]=_,n[19]=b,n[20]=x):x=n[20];let S;n[21]!==y||n[22]!==x?(S=l(u.Provider,{value:y,children:x}),n[21]=y,n[22]=x,n[23]=S):S=n[23];let C;return n[24]!==s||n[25]!==c||n[26]!==d||n[27]!==f||n[28]!==p||n[29]!==S?(C=l(i.Root,{dir:c,open:p,defaultOpen:s,onOpenChange:f,modal:d,children:S}),n[24]=s,n[25]=c,n[26]=d,n[27]=f,n[28]=p,n[29]=S,n[30]=C):C=n[30],C},PrimaryAction:e=>{let t=a(3),{size:r}=c(u),i;return t[0]!==e||t[1]!==r?(i=l(n,{appearance:`outlined`,intent:`neutral`,size:r,...e}),t[0]=e,t[1]=r,t[2]=i):i=t[2],i},MenuTrigger:e=>{let n=a(9),s,d;n[0]===e?(s=n[1],d=n[2]):({icon:s,...d}=e,n[0]=e,n[1]=s,n[2]=d);let{size:f}=c(u),p;n[3]===s?p=n[4]:(p=s??l(t,{svg:l(o,{weight:`bold`,className:`size-4 group-data-[state=open]:-rotate-180 transition-transform ease-out duration-150`})}),n[3]=s,n[4]=p);let m;return n[5]!==d||n[6]!==f||n[7]!==p?(m=l(i.Trigger,{asChild:!0,className:`group`,children:l(r,{icon:p,appearance:`outlined`,intent:`neutral`,size:f,...d})}),n[5]=d,n[6]=f,n[7]=p,n[8]=m):m=n[8],m},MenuContent:e=>{let t=a(6),n,r;t[0]===e?(n=t[1],r=t[2]):({align:r,...n}=e,t[0]=e,t[1]=n,t[2]=r);let o=r===void 0?`end`:r,s;return t[3]!==o||t[4]!==n?(s=l(i.Content,{align:o,...n}),t[3]=o,t[4]=n,t[5]=s):s=t[5],s},MenuItem:t=>{let n=a(8),r,o;n[0]===t?(r=n[1],o=n[2]):({className:r,...o}=t,n[0]=t,n[1]=r,n[2]=o);let s;n[3]===r?s=n[4]:(s=e(`gap-2`,r),n[3]=r,n[4]=s);let c;return n[5]!==o||n[6]!==s?(c=l(i.Item,{className:s,...o}),n[5]=o,n[6]=s,n[7]=c):c=n[7],c}};export{d as SplitButton};
|
package/dist/theme-switcher.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as WithDataSlot } from "./data-slot-CChfb_cv.js";
|
|
2
2
|
import { t as WithStyleProps } from "./with-style-props-Dq5Vntqy.js";
|
|
3
3
|
import { n as IconButtonProps, r as IconButtonAppearance } from "./button-crUf0hbR.js";
|
|
4
|
-
import { t as DropdownMenu } from "./dropdown-menu-
|
|
5
|
-
import "./dropdown-menu-
|
|
4
|
+
import { t as DropdownMenu } from "./dropdown-menu-BloQKE_y.js";
|
|
5
|
+
import "./dropdown-menu-Dlpb7600.js";
|
|
6
6
|
import { ComponentProps } from "react";
|
|
7
7
|
//#region src/components/theme-switcher/theme-switcher.d.ts
|
|
8
8
|
/**
|
package/dist/theme-switcher.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./icon-BT8FnkkJ.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./button-pwkdtR3U.js";import{t as r}from"./browser-only-Crr3sgA0.js";import{t as i}from"./skeleton-bVDP8BzY.js";import{t as a}from"./dropdown-menu-
|
|
1
|
+
import{t as e}from"./icon-BT8FnkkJ.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./button-pwkdtR3U.js";import{t as r}from"./browser-only-Crr3sgA0.js";import{t as i}from"./skeleton-bVDP8BzY.js";import{t as a}from"./dropdown-menu-BR_AQNMj.js";import{d as o,h as s,l as c,p as l}from"./theme-C1kFFdIk.js";import{n as u,t as d}from"./icons-BQRcOU6J.js";import{c as f}from"react/compiler-runtime";import{jsx as p,jsxs as m}from"react/jsx-runtime";const h={system:`System Preference`,light:`Light Mode`,dark:`Dark Mode`,"light-high-contrast":`Light High Contrast`,"dark-high-contrast":`Dark High Contrast`},g=e=>{let t=f(10),{"aria-label":n,"aria-labelledby":r,className:i,style:o}=e,[u,d]=c(),m=r==null?n??`Theme`:n,h;t[0]===d?h=t[1]:(h=e=>{l(e)&&d(e)},t[0]=d,t[1]=h);let g;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(g=s.map(v),t[2]=g):g=t[2];let _;return t[3]!==r||t[4]!==i||t[5]!==u||t[6]!==o||t[7]!==m||t[8]!==h?(_=p(a.RadioGroup,{"aria-label":m,"aria-labelledby":r,"data-slot":`theme-dropdown-menu-radio-group`,className:i,style:o,value:u,onValueChange:h,children:g}),t[3]=r,t[4]=i,t[5]=u,t[6]=o,t[7]=m,t[8]=h,t[9]=_):_=t[9],_},_={Root:e=>{let t=f(2),n;return t[0]===e?n=t[1]:(n=p(a.Root,{...e}),t[0]=e,t[1]=n),n},Trigger:e=>{let o=f(20),s,c,l,u,d,m;o[0]===e?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5],m=o[6]):({appearance:d,"data-slot":s,disabled:c,label:m,ref:u,...l}=e,o[0]=e,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d,o[6]=m);let h=d===void 0?`ghost`:d,g=m===void 0?`Change Theme`:m,_;o[7]===s?_=o[8]:(_=t(s,`theme-switcher-trigger`),o[7]=s,o[8]=_);let v;o[9]===Symbol.for(`react.memo_cache_sentinel`)?(v=p(r,{fallback:p(i,{asChild:!0,className:`rounded-full size-5`,children:p(`span`,{})}),children:y}),o[9]=v):v=o[9];let b;o[10]!==h||o[11]!==c||o[12]!==g||o[13]!==l||o[14]!==u||o[15]!==_?(b=p(n,{ref:u,appearance:h,disabled:c,"data-slot":_,intent:`neutral`,icon:v,label:g,...l}),o[10]=h,o[11]=c,o[12]=g,o[13]=l,o[14]=u,o[15]=_,o[16]=b):b=o[16];let x;return o[17]!==c||o[18]!==b?(x=p(a.Trigger,{asChild:!0,disabled:c,children:b}),o[17]=c,o[18]=b,o[19]=x):x=o[19],x},Content:e=>{let n=f(12),r,i,o;n[0]===e?(r=n[1],i=n[2],o=n[3]):({children:r,"data-slot":i,...o}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=o);let s;n[4]===i?s=n[5]:(s=t(i,`theme-switcher-content`),n[4]=i,n[5]=s);let c;n[6]===r?c=n[7]:(c=r??p(g,{}),n[6]=r,n[7]=c);let l;return n[8]!==o||n[9]!==s||n[10]!==c?(l=p(a.Content,{"data-slot":s,...o,children:c}),n[8]=o,n[9]=s,n[10]=c,n[11]=l):l=n[11],l}};function v(t){return m(a.RadioItem,{value:o(t),children:[p(e,{svg:p(u,{theme:t})}),h[t]]},t)}function y(){return p(d,{className:`size-5`})}export{g as ThemeDropdownMenuRadioGroup,_ as ThemeSwitcher};
|
package/dist/toast.d.ts
CHANGED
|
@@ -2,9 +2,9 @@ import { n as WithAsChild } from "./as-child-D23mGo4f.js";
|
|
|
2
2
|
import { t as WithStyleProps } from "./with-style-props-Dq5Vntqy.js";
|
|
3
3
|
import { n as SvgOnlyProps } from "./icon-w0HUe7tr.js";
|
|
4
4
|
import { ComponentProps, ReactNode } from "react";
|
|
5
|
-
import
|
|
5
|
+
import { Toaster as Toaster$1 } from "sonner";
|
|
6
6
|
//#region src/components/toast/toast.d.ts
|
|
7
|
-
type ToasterPrimitiveProps = ComponentProps<typeof
|
|
7
|
+
type ToasterPrimitiveProps = ComponentProps<typeof Toaster$1>;
|
|
8
8
|
type ToasterProps = WithStyleProps & Pick<ToasterPrimitiveProps, "containerAriaLabel" | "dir" | "position"> & {
|
|
9
9
|
/**
|
|
10
10
|
* Time in milliseconds that should elapse before automatically dismissing toasts.
|
package/dist/toast.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-0HCjnNv1.js";import{t}from"./icon-BT8FnkkJ.js";import{t as n}from"./slot-BsvE2ntj.js";import{s as r}from"./theme-C1kFFdIk.js";import{c as i}from"react/compiler-runtime";import{createContext as a,useContext as o}from"react";import{jsx as s,jsxs as c}from"react/jsx-runtime";import{CheckCircleIcon as l}from"@phosphor-icons/react/CheckCircle";import{InfoIcon as u}from"@phosphor-icons/react/Info";import{WarningIcon as d}from"@phosphor-icons/react/Warning";import{WarningDiamondIcon as f}from"@phosphor-icons/react/WarningDiamond";import
|
|
1
|
+
import{t as e}from"./cx-0HCjnNv1.js";import{t}from"./icon-BT8FnkkJ.js";import{t as n}from"./slot-BsvE2ntj.js";import{s as r}from"./theme-C1kFFdIk.js";import{c as i}from"react/compiler-runtime";import{createContext as a,useContext as o}from"react";import{jsx as s,jsxs as c}from"react/jsx-runtime";import{CheckCircleIcon as l}from"@phosphor-icons/react/CheckCircle";import{InfoIcon as u}from"@phosphor-icons/react/Info";import{WarningIcon as d}from"@phosphor-icons/react/Warning";import{WarningDiamondIcon as f}from"@phosphor-icons/react/WarningDiamond";import{Toaster as p,toast as m}from"sonner";function h(e){return typeof e==`number`&&e<=0?1/0:e}const g=t=>{let n=i(13),{className:a,containerAriaLabel:o,dir:c,duration_ms:l,position:u,style:d}=t,f=l===void 0?4e3:l,m=u===void 0?`top-center`:u,g=r(),_;n[0]===a?_=n[1]:(_=e(`toaster overlay-prompt pointer-events-auto *:duration-200`,a),n[0]=a,n[1]=_);let v;n[2]===f?v=n[3]:(v=h(f),n[2]=f,n[3]=v);let y=m??`top-center`,b=g,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]!==c||n[7]!==d||n[8]!==_||n[9]!==v||n[10]!==y||n[11]!==b?(S=s(p,{"data-slot":`toaster`,className:_,containerAriaLabel:o,dir:c,duration:v,gap:12,position:y,style:d,theme:b,toastOptions:x}),n[5]=o,n[6]=c,n[7]=d,n[8]=_,n[9]=v,n[10]=y,n[11]=b,n[12]=S):S=n[12],S},_=a(``);function v(e,t){let n=h(t?.duration_ms);return m.custom(t=>s(_.Provider,{value:t,children:e}),{duration:n,...t?.id?{id:t.id}:{},unstyled:!0})}const y=a({intent:`info`}),b={Root:t=>{let n=i(23),r,a,o,l,u;n[0]===t?(r=n[1],a=n[2],o=n[3],l=n[4],u=n[5]):({children:r,className:a,intent:o,ref:u,...l}=t,n[0]=t,n[1]=r,n[2]=a,n[3]=o,n[4]=l,n[5]=u);let d;n[6]===o?d=n[7]:(d={intent:o},n[6]=o,n[7]=d);let f=d,p;n[8]===a?p=n[9]:(p=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`,a),n[8]=a,n[9]=p);let m;n[10]===o?m=n[11]:(m=s(S,{intent:o}),n[10]=o,n[11]=m);let h;n[12]===r?h=n[13]:(h=s(`div`,{"data-slot":`toast-label`,className:`contents`,children:r}),n[12]=r,n[13]=h);let g;n[14]!==l||n[15]!==u||n[16]!==p||n[17]!==m||n[18]!==h?(g=c(`div`,{"data-slot":`toast`,className:p,ref:u,...l,children:[m,h]}),n[14]=l,n[15]=u,n[16]=p,n[17]=m,n[18]=h,n[19]=g):g=n[19];let _;return n[20]!==f||n[21]!==g?(_=s(y.Provider,{value:f,children:g}),n[20]=f,n[21]=g,n[22]=_):_=n[22],_},Action:t=>{let r=i(17),a,c,l,u,d;r[0]===t?(a=r[1],c=r[2],l=r[3],u=r[4],d=r[5]):({asChild:a,className:c,onClick:l,ref:d,...u}=t,r[0]=t,r[1]=a,r[2]=c,r[3]=l,r[4]=u,r[5]=d);let f=o(_),p=a?n:`button`,h;r[6]===c?h=r[7]:(h=e(`shrink-0`,`data-icon-button:-mr-0.5 data-icon-button:-mt-0.5 data-icon-button:rounded-xs`,c),r[6]=c,r[7]=h);let g;r[8]!==f||r[9]!==l?(g=e=>{l?.(e),!e.defaultPrevented&&m.dismiss(f)},r[8]=f,r[9]=l,r[10]=g):g=r[10];let v;return r[11]!==p||r[12]!==u||r[13]!==d||r[14]!==h||r[15]!==g?(v=s(p,{"data-slot":`toast-action`,className:h,onClick:g,ref:d,...u}),r[11]=p,r[12]=u,r[13]=d,r[14]=h,r[15]=g,r[16]=v):v=r[16],v},Icon:n=>{let r=i(41),a,c,p,m;r[0]===n?(a=r[1],c=r[2],p=r[3],m=r[4]):({className:a,svg:m,ref:p,...c}=n,r[0]=n,r[1]=a,r[2]=c,r[3]=p,r[4]=m);let h=o(y);switch(h.intent){case`danger`:{let n;r[5]===a?n=r[6]:(n=e(`text-danger-600`,a),r[5]=a,r[6]=n);let i;r[7]===m?i=r[8]:(i=m??s(d,{weight:`fill`}),r[7]=m,r[8]=i);let o;return r[9]!==c||r[10]!==p||r[11]!==n||r[12]!==i?(o=s(t,{"data-slot":`toast-icon`,className:n,ref:p,svg:i,...c}),r[9]=c,r[10]=p,r[11]=n,r[12]=i,r[13]=o):o=r[13],o}case`warning`:{let n;r[14]===a?n=r[15]:(n=e(`text-warning-600`,a),r[14]=a,r[15]=n);let i;r[16]===m?i=r[17]:(i=m??s(f,{weight:`fill`}),r[16]=m,r[17]=i);let o;return r[18]!==c||r[19]!==p||r[20]!==n||r[21]!==i?(o=s(t,{"data-slot":`toast-icon`,className:n,ref:p,svg:i,...c}),r[18]=c,r[19]=p,r[20]=n,r[21]=i,r[22]=o):o=r[22],o}case`success`:{let n;r[23]===a?n=r[24]:(n=e(`text-success-600`,a),r[23]=a,r[24]=n);let i;r[25]===m?i=r[26]:(i=m??s(l,{weight:`fill`}),r[25]=m,r[26]=i);let o;return r[27]!==c||r[28]!==p||r[29]!==n||r[30]!==i?(o=s(t,{"data-slot":`toast-icon`,className:n,ref:p,svg:i,...c}),r[27]=c,r[28]=p,r[29]=n,r[30]=i,r[31]=o):o=r[31],o}case`info`:{let n;r[32]===a?n=r[33]:(n=e(`text-accent-600`,a),r[32]=a,r[33]=n);let i;r[34]===m?i=r[35]:(i=m??s(u,{weight:`fill`}),r[34]=m,r[35]=i);let o;return r[36]!==c||r[37]!==p||r[38]!==n||r[39]!==i?(o=s(t,{"data-slot":`toast-icon`,className:n,ref:p,svg:i,...c}),r[36]=c,r[37]=p,r[38]=n,r[39]=i,r[40]=o):o=r[40],o}default:throw Error(`Unreachable Case: ${h.intent}`)}},Message:t=>{let r=i(12),a,o,c,l;r[0]===t?(a=r[1],o=r[2],c=r[3],l=r[4]):({asChild:a,className:o,ref:l,...c}=t,r[0]=t,r[1]=a,r[2]=o,r[3]=c,r[4]=l);let u=a?n:`p`,d;r[5]===o?d=r[6]:(d=e(`text-strong flex-1 text-sm font-body`,o),r[5]=o,r[6]=d);let f;return r[7]!==u||r[8]!==c||r[9]!==l||r[10]!==d?(f=s(u,{"data-slot":`toast-message`,className:d,ref:l,...c}),r[7]=u,r[8]=c,r[9]=l,r[10]=d,r[11]=f):f=r[11],f}},x={info:`bg-accent-600`,warning:`bg-warning-600`,success:`bg-success-600`,danger:`bg-danger-600`};function S(t){let n=i(10),r,a,o;n[0]===t?(r=n[1],a=n[2],o=n[3]):({className:r,intent:a,...o}=t,n[0]=t,n[1]=r,n[2]=a,n[3]=o);let c=x[a],l;n[4]!==r||n[5]!==c?(l=e(`z-1 absolute -inset-px right-auto w-1.5 rounded-l`,c,r),n[4]=r,n[5]=c,n[6]=l):l=n[6];let u;return n[7]!==o||n[8]!==l?(u=s(`div`,{"aria-hidden":!0,className:l,...o}),n[7]=o,n[8]=l,n[9]=u):u=n[9],u}export{b as Toast,g as Toaster,v as makeToast};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./cx-0HCjnNv1.js";import{r as t}from"./layer-container-R7aux3n8.js";import{c as n}from"react/compiler-runtime";import{jsx as r,jsxs as i}from"react/jsx-runtime";import{Arrow as a,Content as o,Portal as s,Provider as c,Root as l,Trigger as u}from"@radix-ui/react-tooltip";const d=e=>{let t=n(6),i,a;t[0]===e?(i=t[1],a=t[2]):({delayDuration:a,...i}=e,t[0]=e,t[1]=i,t[2]=a);let o=(a===void 0?0:a)??0,s;return t[3]!==i||t[4]!==o?(s=r(c,{delayDuration:o,...i}),t[3]=i,t[4]=o,t[5]=s):s=t[5],s};function f(e){let t=n(2),i;return t[0]===e?i=t[1]:(i=r(l,{...e}),t[0]=e,t[1]=i),i}function p(e){let t=n(2),i;return t[0]===e?i=t[1]:(i=r(u,{"data-slot":`tooltip-trigger`,...e}),t[0]=e,t[1]=i),i}const m={Root:f,Content:c=>{let l=n(20),u,d,f,p,m;l[0]===c?(u=l[1],d=l[2],f=l[3],p=l[4],m=l[5]):({children:u,className:d,ref:p,sideOffset:m,...f}=c,l[0]=c,l[1]=u,l[2]=d,l[3]=f,l[4]=p,l[5]=m);let h=m===void 0?4:m,g=t(),_;l[6]===d?_=l[7]:(_=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`,d),l[6]=d,l[7]=_);let v;l[8]===u?v=l[9]:(v=r(`div`,{"data-slot":`tooltip-label`,className:`contents`,children:u}),l[8]=u,l[9]=v);let y;l[10]===Symbol.for(`react.memo_cache_sentinel`)?(y=r(a,{asChild:!0,children:r(`div`,{className:`bg-tooltip z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-xs`})}),l[10]=y):y=l[10];let b;l[11]!==f||l[12]!==p||l[13]!==h||l[14]!==_||l[15]!==v?(b=i(o,{className:_,"data-slot":`tooltip-content`,ref:p,sideOffset:h,...f,children:[v,y]}),l[11]=f,l[12]=p,l[13]=h,l[14]=_,l[15]=v,l[16]=b):b=l[16];let x;return l[17]!==g||l[18]!==b?(x=r(s,{container:g,children:b}),l[17]=g,l[18]=b,l[19]=x):x=l[19],x},Trigger:p};export{d as n,m as t};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentProps, ComponentPropsWithoutRef } from "react";
|
|
2
|
-
import
|
|
2
|
+
import { Content, Provider, Root, Trigger } from "@radix-ui/react-tooltip";
|
|
3
3
|
//#region src/components/tooltip/tooltip.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Wraps your app to set shared global behavior for your tooltips, such
|
|
@@ -27,7 +27,7 @@ import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
|
27
27
|
* </TooltipProvider>
|
|
28
28
|
* ```
|
|
29
29
|
*/
|
|
30
|
-
declare const TooltipProvider: ({ delayDuration, ...props }: ComponentPropsWithoutRef<typeof
|
|
30
|
+
declare const TooltipProvider: ({ delayDuration, ...props }: ComponentPropsWithoutRef<typeof Provider>) => import("react").JSX.Element;
|
|
31
31
|
/**
|
|
32
32
|
* A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it.
|
|
33
33
|
* This is the root, stateful component that manages the open/closed state of
|
|
@@ -57,7 +57,7 @@ declare const TooltipProvider: ({ delayDuration, ...props }: ComponentPropsWitho
|
|
|
57
57
|
* </Tooltip.Root>
|
|
58
58
|
* ```
|
|
59
59
|
*/
|
|
60
|
-
declare function Root(props: ComponentProps<typeof
|
|
60
|
+
declare function Root$1(props: ComponentProps<typeof Root>): import("react").JSX.Element;
|
|
61
61
|
/**
|
|
62
62
|
* The trigger button that opens the tooltip.
|
|
63
63
|
*
|
|
@@ -77,13 +77,13 @@ declare function Root(props: ComponentProps<typeof TooltipPrimitive.Root>): impo
|
|
|
77
77
|
* </Tooltip.Root>
|
|
78
78
|
* ```
|
|
79
79
|
*/
|
|
80
|
-
declare function Trigger(props: ComponentProps<typeof
|
|
80
|
+
declare function Trigger$1(props: ComponentProps<typeof Trigger>): import("react").JSX.Element;
|
|
81
81
|
/**
|
|
82
82
|
* Props for `Tooltip.Content`. `asChild` is omitted: the content renders its own
|
|
83
83
|
* arrow next to `children`, so a slot would receive more than one element and
|
|
84
84
|
* throw.
|
|
85
85
|
*/
|
|
86
|
-
type TooltipContentProps = Omit<ComponentProps<typeof
|
|
86
|
+
type TooltipContentProps = Omit<ComponentProps<typeof Content>, "asChild">;
|
|
87
87
|
/**
|
|
88
88
|
* The content to render inside the tooltip.
|
|
89
89
|
*
|
|
@@ -128,7 +128,7 @@ type TooltipContentProps = Omit<ComponentProps<typeof TooltipPrimitive.Content>,
|
|
|
128
128
|
* </Tooltip.Root>
|
|
129
129
|
* ```
|
|
130
130
|
*/
|
|
131
|
-
declare const Content: ({ children, className, ref, sideOffset, ...props }: TooltipContentProps) => import("react").JSX.Element;
|
|
131
|
+
declare const Content$1: ({ children, className, ref, sideOffset, ...props }: TooltipContentProps) => import("react").JSX.Element;
|
|
132
132
|
/**
|
|
133
133
|
* A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it.
|
|
134
134
|
*
|
|
@@ -206,7 +206,7 @@ declare const Tooltip: {
|
|
|
206
206
|
* </Tooltip.Root>
|
|
207
207
|
* ```
|
|
208
208
|
*/
|
|
209
|
-
readonly Root: typeof Root;
|
|
209
|
+
readonly Root: typeof Root$1;
|
|
210
210
|
/**
|
|
211
211
|
* The content to render inside the tooltip.
|
|
212
212
|
*
|
|
@@ -251,7 +251,7 @@ declare const Tooltip: {
|
|
|
251
251
|
* </Tooltip.Root>
|
|
252
252
|
* ```
|
|
253
253
|
*/
|
|
254
|
-
readonly Content: typeof Content;
|
|
254
|
+
readonly Content: typeof Content$1;
|
|
255
255
|
/**
|
|
256
256
|
* The trigger button that opens the tooltip.
|
|
257
257
|
*
|
|
@@ -271,7 +271,7 @@ declare const Tooltip: {
|
|
|
271
271
|
* </Tooltip.Root>
|
|
272
272
|
* ```
|
|
273
273
|
*/
|
|
274
|
-
readonly Trigger: typeof Trigger;
|
|
274
|
+
readonly Trigger: typeof Trigger$1;
|
|
275
275
|
};
|
|
276
276
|
//#endregion
|
|
277
277
|
export { TooltipProvider as n, Tooltip 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-nuUCoqq8.js";
|
|
2
2
|
export { Tooltip, TooltipProvider };
|
package/dist/tooltip.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,t}from"./tooltip-
|
|
1
|
+
import{n as e,t}from"./tooltip-H03l7E4Y.js";export{t as Tooltip,e as TooltipProvider};
|