@ngrok/mantle 0.67.0 → 0.68.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/dist/accordion.d.ts +9 -9
- package/dist/alert-dialog.d.ts +31 -31
- package/dist/alert-dialog.js +1 -1
- package/dist/alert.d.ts +10 -10
- package/dist/alert.js +1 -1
- package/dist/alert.js.map +1 -1
- package/dist/anchor.d.ts +2 -2
- package/dist/badge.d.ts +3 -3
- package/dist/badge.js +1 -1
- package/dist/badge.js.map +1 -1
- package/dist/button-BKykcpgJ.js +2 -0
- package/dist/button-BKykcpgJ.js.map +1 -0
- package/dist/{button-B--2eT25.d.ts → button-BaNwe1ud.d.ts} +13 -13
- package/dist/button.d.ts +3 -3
- package/dist/button.js +1 -1
- package/dist/calendar.d.ts +2 -2
- package/dist/calendar.js +1 -1
- package/dist/card.d.ts +6 -6
- package/dist/checkbox.d.ts +3 -3
- package/dist/checkbox.js +1 -1
- package/dist/checkbox.js.map +1 -1
- package/dist/code-block.d.ts +15 -15
- package/dist/code-block.js +2 -2
- package/dist/code-block.js.map +1 -1
- package/dist/code.d.ts +2 -2
- package/dist/code.js +1 -1
- package/dist/code.js.map +1 -1
- package/dist/color.d.ts +1 -1
- package/dist/color.js +1 -1
- package/dist/color.js.map +1 -1
- package/dist/combobox.d.ts +11 -11
- package/dist/combobox.js +1 -1
- package/dist/combobox.js.map +1 -1
- package/dist/command.d.ts +33 -33
- package/dist/command.js +1 -1
- package/dist/command.js.map +1 -1
- package/dist/data-table.d.ts +14 -14
- package/dist/data-table.js +1 -1
- package/dist/data-table.js.map +1 -1
- package/dist/description-list.d.ts +5 -5
- package/dist/description-list.js +1 -1
- package/dist/description-list.js.map +1 -1
- package/dist/{dialog-PqWYibMO.js → dialog-DxkpMIzB.js} +2 -2
- package/dist/{dialog-PqWYibMO.js.map → dialog-DxkpMIzB.js.map} +1 -1
- package/dist/dialog.d.ts +17 -17
- package/dist/dialog.js +1 -1
- package/dist/{direction-C_bMxZXm.d.ts → direction-MVSxfKWx.d.ts} +2 -2
- package/dist/{dropdown-menu-slQCdKvp.d.ts → dropdown-menu-D6MiVSR-.d.ts} +23 -23
- package/dist/dropdown-menu.d.ts +1 -1
- package/dist/flag.d.ts +2 -2
- package/dist/hover-card.d.ts +6 -6
- package/dist/{icon-BkSBkfH9.d.ts → icon-Dh1ONyO_.d.ts} +3 -3
- package/dist/icon-button-CxxVPiKp.js +2 -0
- package/dist/icon-button-CxxVPiKp.js.map +1 -0
- package/dist/{icon-button-DMNdrMSf.d.ts → icon-button-gO-7F_MZ.d.ts} +6 -6
- package/dist/icon.d.ts +2 -2
- package/dist/icons.d.ts +8 -8
- package/dist/{index-Cxmuw3UT.d.ts → index-Bw97R9Kw.d.ts} +8 -8
- package/dist/{index-C0yxjFyf.d.ts → index-C3IiAC5H.d.ts} +3 -3
- package/dist/{index-CI-RDnHZ.d.ts → index-Cj2NX2Dg.d.ts} +5 -5
- package/dist/input.d.ts +1 -1
- package/dist/kbd.d.ts +2 -2
- package/dist/label.d.ts +3 -3
- package/dist/mantle-dark-high-contrast.css +18 -9
- package/dist/mantle-dark.css +37 -43
- package/dist/mantle-light-high-contrast.css +15 -9
- package/dist/mantle.css +108 -74
- package/dist/media-object.d.ts +4 -4
- package/dist/multi-select.d.ts +16 -16
- package/dist/pagination.d.ts +8 -8
- package/dist/pagination.js +1 -1
- package/dist/popover.d.ts +7 -7
- package/dist/{primitive-BmWrmUz1.d.ts → primitive-BqLYh79k.d.ts} +3 -3
- package/dist/progress.d.ts +5 -5
- package/dist/radio-group.d.ts +19 -19
- package/dist/radio-group.js +1 -1
- package/dist/radio-group.js.map +1 -1
- package/dist/sandboxed-on-click.d.ts +3 -3
- package/dist/{select-B3jxZhYg.d.ts → select-DJmjfGjt.d.ts} +14 -14
- package/dist/select.d.ts +1 -1
- package/dist/separator.d.ts +4 -4
- package/dist/sheet.d.ts +19 -19
- package/dist/sheet.js +1 -1
- package/dist/skeleton.d.ts +5 -5
- package/dist/slider.d.ts +2 -2
- package/dist/slider.js +1 -1
- package/dist/slider.js.map +1 -1
- package/dist/slot.d.ts +3 -3
- package/dist/split-button.d.ts +20 -20
- package/dist/split-button.js +1 -1
- package/dist/split-button.js.map +1 -1
- package/dist/{svg-only-BH9PBSGl.d.ts → svg-only-Db3eUPWM.d.ts} +3 -3
- package/dist/switch.d.ts +4 -4
- package/dist/switch.js +1 -1
- package/dist/switch.js.map +1 -1
- package/dist/{table-CU7zx1pH.d.ts → table-C7BejaFW.d.ts} +11 -11
- package/dist/table-CnYWz6IT.js +2 -0
- package/dist/table-CnYWz6IT.js.map +1 -0
- package/dist/table.d.ts +1 -1
- package/dist/table.js +1 -1
- package/dist/tabs.d.ts +9 -9
- package/dist/tabs.js +1 -1
- package/dist/tabs.js.map +1 -1
- package/dist/text-area.d.ts +2 -2
- package/dist/theme.d.ts +6 -6
- package/dist/toast.d.ts +8 -8
- package/dist/tooltip.d.ts +6 -6
- package/dist/utils.d.ts +1 -1
- package/package.json +14 -14
- package/dist/button-CdPMhyKg.js +0 -2
- package/dist/button-CdPMhyKg.js.map +0 -1
- package/dist/icon-button-CeeHZOhh.js +0 -2
- package/dist/icon-button-CeeHZOhh.js.map +0 -1
- package/dist/table-OYhLMxeE.js +0 -2
- package/dist/table-OYhLMxeE.js.map +0 -1
package/dist/radio-group.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as WithAsChild } from "./as-child-CRRsxi3Y.js";
|
|
2
|
-
import * as react from "react";
|
|
2
|
+
import * as _$react from "react";
|
|
3
3
|
import { HTMLAttributes, ReactNode } from "react";
|
|
4
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
5
|
import { RadioGroupProps, RadioProps } from "@headlessui/react";
|
|
6
6
|
|
|
7
7
|
//#region src/components/radio-group/radio-group.d.ts
|
|
@@ -56,9 +56,9 @@ declare const RadioGroup: {
|
|
|
56
56
|
* </RadioGroup.Root>
|
|
57
57
|
* ```
|
|
58
58
|
*/
|
|
59
|
-
readonly Button: react.ForwardRefExoticComponent<Omit<RadioProps, "children"> & {
|
|
59
|
+
readonly Button: _$react.ForwardRefExoticComponent<Omit<RadioProps, "children"> & {
|
|
60
60
|
children?: ReactNode | undefined;
|
|
61
|
-
} & react.RefAttributes<HTMLDivElement>>;
|
|
61
|
+
} & _$react.RefAttributes<HTMLDivElement>>;
|
|
62
62
|
/**
|
|
63
63
|
* An inline group of radio buttons. Use RadioGroup.Button as direct children for horizontal radio layouts.
|
|
64
64
|
*
|
|
@@ -76,9 +76,9 @@ declare const RadioGroup: {
|
|
|
76
76
|
* </RadioGroup.Root>
|
|
77
77
|
* ```
|
|
78
78
|
*/
|
|
79
|
-
readonly ButtonGroup: react.ForwardRefExoticComponent<Omit<RadioGroupProps, "children" | "as"> & {
|
|
79
|
+
readonly ButtonGroup: _$react.ForwardRefExoticComponent<Omit<RadioGroupProps, "children" | "as"> & {
|
|
80
80
|
children?: ReactNode | undefined;
|
|
81
|
-
} & react.RefAttributes<HTMLElement>>;
|
|
81
|
+
} & _$react.RefAttributes<HTMLElement>>;
|
|
82
82
|
/**
|
|
83
83
|
* A radio card item with enhanced styling. Use it as a child of RadioGroup for card-based radio options.
|
|
84
84
|
*
|
|
@@ -104,9 +104,9 @@ declare const RadioGroup: {
|
|
|
104
104
|
* </RadioGroup.Root>
|
|
105
105
|
* ```
|
|
106
106
|
*/
|
|
107
|
-
readonly Card: react.ForwardRefExoticComponent<Omit<RadioProps, "children"> & {
|
|
107
|
+
readonly Card: _$react.ForwardRefExoticComponent<Omit<RadioProps, "children"> & {
|
|
108
108
|
children?: ReactNode | undefined;
|
|
109
|
-
} & react.RefAttributes<HTMLDivElement>>;
|
|
109
|
+
} & _$react.RefAttributes<HTMLDivElement>>;
|
|
110
110
|
/**
|
|
111
111
|
* The selection indicator for any radio item. Shows the checked state with customizable appearance.
|
|
112
112
|
*
|
|
@@ -125,7 +125,7 @@ declare const RadioGroup: {
|
|
|
125
125
|
children,
|
|
126
126
|
className,
|
|
127
127
|
...props
|
|
128
|
-
}: RadioIndicatorProps): react_jsx_runtime0.JSX.Element;
|
|
128
|
+
}: RadioIndicatorProps): _$react_jsx_runtime0.JSX.Element;
|
|
129
129
|
displayName: string;
|
|
130
130
|
};
|
|
131
131
|
/**
|
|
@@ -154,7 +154,7 @@ declare const RadioGroup: {
|
|
|
154
154
|
onClick,
|
|
155
155
|
onKeyDown,
|
|
156
156
|
...props
|
|
157
|
-
}: RadioInputSandboxProps): react_jsx_runtime0.JSX.Element;
|
|
157
|
+
}: RadioInputSandboxProps): _$react_jsx_runtime0.JSX.Element;
|
|
158
158
|
displayName: string;
|
|
159
159
|
};
|
|
160
160
|
/**
|
|
@@ -170,9 +170,9 @@ declare const RadioGroup: {
|
|
|
170
170
|
* </RadioGroup.Item>
|
|
171
171
|
* ```
|
|
172
172
|
*/
|
|
173
|
-
readonly Item: react.ForwardRefExoticComponent<Omit<RadioProps, "children"> & {
|
|
173
|
+
readonly Item: _$react.ForwardRefExoticComponent<Omit<RadioProps, "children"> & {
|
|
174
174
|
children?: ReactNode | undefined;
|
|
175
|
-
} & react.RefAttributes<HTMLDivElement>>;
|
|
175
|
+
} & _$react.RefAttributes<HTMLDivElement>>;
|
|
176
176
|
/**
|
|
177
177
|
* The content wrapper for any radio item. Use it to wrap labels, descriptions, or content of a radio item.
|
|
178
178
|
*
|
|
@@ -197,7 +197,7 @@ declare const RadioGroup: {
|
|
|
197
197
|
children,
|
|
198
198
|
className,
|
|
199
199
|
...props
|
|
200
|
-
}: RadioItemContentProps): react_jsx_runtime0.JSX.Element;
|
|
200
|
+
}: RadioItemContentProps): _$react_jsx_runtime0.JSX.Element;
|
|
201
201
|
displayName: string;
|
|
202
202
|
};
|
|
203
203
|
/**
|
|
@@ -223,9 +223,9 @@ declare const RadioGroup: {
|
|
|
223
223
|
* </RadioGroup.Root>
|
|
224
224
|
* ```
|
|
225
225
|
*/
|
|
226
|
-
readonly List: react.ForwardRefExoticComponent<Omit<RadioGroupProps, "children" | "as"> & {
|
|
226
|
+
readonly List: _$react.ForwardRefExoticComponent<Omit<RadioGroupProps, "children" | "as"> & {
|
|
227
227
|
children?: ReactNode | undefined;
|
|
228
|
-
} & react.RefAttributes<HTMLElement>>;
|
|
228
|
+
} & _$react.RefAttributes<HTMLElement>>;
|
|
229
229
|
/**
|
|
230
230
|
* A radio list item that is used inside a RadioGroup.List for connected list-style radio options.
|
|
231
231
|
*
|
|
@@ -251,9 +251,9 @@ declare const RadioGroup: {
|
|
|
251
251
|
* </RadioGroup.Root>
|
|
252
252
|
* ```
|
|
253
253
|
*/
|
|
254
|
-
readonly ListItem: react.ForwardRefExoticComponent<Omit<RadioProps, "children"> & {
|
|
254
|
+
readonly ListItem: _$react.ForwardRefExoticComponent<Omit<RadioProps, "children"> & {
|
|
255
255
|
children?: ReactNode | undefined;
|
|
256
|
-
} & react.RefAttributes<HTMLDivElement>>;
|
|
256
|
+
} & _$react.RefAttributes<HTMLDivElement>>;
|
|
257
257
|
/**
|
|
258
258
|
* The root radio group component. Manages the state of the children radios where only one can be selected.
|
|
259
259
|
*
|
|
@@ -269,9 +269,9 @@ declare const RadioGroup: {
|
|
|
269
269
|
* </RadioGroup.Root>
|
|
270
270
|
* ```
|
|
271
271
|
*/
|
|
272
|
-
readonly Root: react.ForwardRefExoticComponent<Omit<RadioGroupProps, "children" | "as"> & {
|
|
272
|
+
readonly Root: _$react.ForwardRefExoticComponent<Omit<RadioGroupProps, "children" | "as"> & {
|
|
273
273
|
children?: ReactNode | undefined;
|
|
274
|
-
} & react.RefAttributes<HTMLElement>>;
|
|
274
|
+
} & _$react.RefAttributes<HTMLElement>>;
|
|
275
275
|
};
|
|
276
276
|
//#endregion
|
|
277
277
|
export { RadioGroup };
|
package/dist/radio-group.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t as e}from"./cx-D1HYnpvA.js";import{t}from"./slot-D_ZUrdEW.js";import{t as n}from"./is-input-CC_n6EGM.js";import{Children as r,cloneElement as i,createContext as a,forwardRef as o,isValidElement as s,useContext as c,useRef as l}from"react";import u from"clsx";import{Fragment as d,jsx as f}from"react/jsx-runtime";import{Radio as p,RadioGroup as m}from"@headlessui/react";const h=o((e,t)=>f(m,{...e,ref:t}));h.displayName=`RadioGroup`;const g=a({autofocus:!1,checked:!1,disabled:!1,focus:!1,hover:!1}),_=o(({children:t,className:n,...r},i)=>f(p,{className:e(`group/radio cursor-pointer aria-disabled:cursor-default [&_label]:cursor-inherit flex gap-2 py-1 text-sm focus:outline-hidden`,n),as:`div`,...r,ref:i,children:e=>f(g.Provider,{value:e,children:t})}));_.displayName=`RadioItem`;const v=({checked:t,disabled:n,focus:r,hover:i})=>f(`span`,{className:e(`border-form flex size-4 items-center justify-center rounded-full border shrink-0`,n&&`cursor-default opacity-50`,t&&`border-accent-
|
|
1
|
+
import{t as e}from"./cx-D1HYnpvA.js";import{t}from"./slot-D_ZUrdEW.js";import{t as n}from"./is-input-CC_n6EGM.js";import{Children as r,cloneElement as i,createContext as a,forwardRef as o,isValidElement as s,useContext as c,useRef as l}from"react";import u from"clsx";import{Fragment as d,jsx as f}from"react/jsx-runtime";import{Radio as p,RadioGroup as m}from"@headlessui/react";const h=o((e,t)=>f(m,{...e,ref:t}));h.displayName=`RadioGroup`;const g=a({autofocus:!1,checked:!1,disabled:!1,focus:!1,hover:!1}),_=o(({children:t,className:n,...r},i)=>f(p,{className:e(`group/radio cursor-pointer aria-disabled:cursor-default [&_label]:cursor-inherit flex gap-2 py-1 text-sm focus:outline-hidden`,n),as:`div`,...r,ref:i,children:e=>f(g.Provider,{value:e,children:t})}));_.displayName=`RadioItem`;const v=({checked:t,disabled:n,focus:r,hover:i})=>f(`span`,{className:e(`border-form flex size-4 items-center justify-center rounded-full border shrink-0`,n&&`cursor-default opacity-50`,t&&`border-accent-600 bg-accent-600`,r&&!n&&`border-accent-600 ring-focus-accent ring-4`,i&&`border-accent-600`),children:t&&f(`span`,{className:`size-2 rounded-full bg-white shrink-0`})}),y=({children:t,className:n,...r})=>{let i=c(g);return f(`div`,{className:e(`radio-indicator inline-flex size-5 select-none items-center justify-center shrink-0`,n),...r,children:t==null?f(v,{...i}):typeof t==`function`?t(i):t})};y.displayName=`RadioIndicator`;const b=o(({className:e,...t},n)=>f(h,{className:u(`-space-y-px`,e),...t,ref:n}));b.displayName=`RadioGroupList`;const x=o(({children:t,className:n,...r},i)=>f(p,{as:`div`,className:e(`group/radio border-form [&_label]:cursor-inherit relative flex select-none gap-2 border px-3 py-2 text-sm`,`cursor-pointer aria-disabled:cursor-default focus:outline-hidden`,`focus-visible:ring-focus-accent not-aria-disabled:focus-visible:border-accent-600 focus-visible:ring-4`,`first-of-type:rounded-tl-md first-of-type:rounded-tr-md last-of-type:rounded-bl-md last-of-type:rounded-br-md`,`aria-disabled:border-form/50 not-aria-disabled:hover:z-1 not-aria-disabled:hover:border-accent-600`,`aria-checked:z-1 aria-checked:border-accent-500/40 aria-checked:bg-accent-500/10 dark-high-contrast:aria-checked:border-accent-400 high-contrast:aria-checked:border-accent-400 not-aria-disabled:hover:aria-checked:border-accent-600`,`has-[.radio-indicator:first-child]:pl-2 has-[.radio-indicator:last-child]:pr-2`,n),ref:i,...r,children:e=>f(d,{children:f(g.Provider,{value:e,children:t})})}));x.displayName=`RadioListItem`;const S=o(({children:e,className:t,...n},r)=>f(p,{as:`div`,className:u(`group/radio border-card bg-card [&_label]:cursor-inherit relative rounded-md border p-4 text-sm`,`cursor-pointer aria-disabled:cursor-default focus:outline-hidden`,`focus-visible:ring-focus-accent not-aria-disabled:focus-visible:border-accent-600 focus-visible:ring-4`,`first-of-type:rounded-tl-md first-of-type:rounded-tr-md last-of-type:rounded-bl-md last-of-type:rounded-br-md`,`aria-disabled:border-form/50 not-aria-disabled:hover:z-1 not-aria-disabled:hover:border-accent-600`,`aria-checked:z-1 aria-checked:border-accent-600/50 aria-checked:bg-accent-500/10 not-aria-disabled:hover:aria-checked:border-accent-600 dark-high-contrast:aria-checked:border-accent-600 high-contrast:aria-checked:border-accent-600`,t),...n,ref:r,children:t=>f(d,{children:f(g.Provider,{value:t,children:e})})}));S.displayName=`RadioCard`;const C=({asChild:e=!1,children:n,className:r,...i})=>{let a=c(g);return f(e?t:`div`,{className:u(`min-w-0 flex-1`,a.disabled&&`opacity-50`,r),...i,children:n})};C.displayName=`RadioItemContent`;const w=o(({className:e,...t},n)=>f(h,{className:u(`flex flex-row flex-nowrap -space-x-px`,e),...t,ref:n}));w.displayName=`RadioButtonGroup`;const T=o(({children:t,className:n,...r},i)=>f(p,{as:`div`,className:e(`group/radio border-form [&_label]:cursor-inherit relative flex flex-1 select-none items-center justify-center gap-2 border px-3 text-sm`,`h-9`,`focus-visible:ring-focus-accent not-aria-disabled:focus-visible:border-accent-600 focus-visible:ring-4`,`cursor-pointer aria-disabled:cursor-default focus:outline-hidden`,`first-of-type:rounded-bl-md first-of-type:rounded-tl-md last-of-type:rounded-br-md last-of-type:rounded-tr-md`,`not-aria-disabled:hover:z-1 not-aria-disabled:hover:border-accent-600 aria-disabled:opacity-50`,`aria-checked:z-1 aria-checked:border-accent-600/40 aria-checked:bg-accent-500/10 not-aria-disabled:hover:aria-checked:border-accent-600`,`has-[.radio-indicator:first-child]:pl-2 has-[.radio-indicator:last-child]:pr-2`,n),ref:i,...r,children:e=>f(d,{children:f(g.Provider,{value:e,children:t})})}));T.displayName=`RadioButton`;const E=({children:e,onClick:t,onKeyDown:a,...o})=>{let u=l(null),d=c(g),p=r.only(e),m=d.disabled||!d.checked;return f(`div`,{role:`none`,ref:u,onKeyDown:e=>{if(d.disabled){e.stopPropagation(),e.preventDefault();return}switch(e.key){case`Enter`:case`Tab`:break;default:e.stopPropagation()}a?.(e)},onClick:e=>{if(d.disabled){e.stopPropagation(),e.preventDefault();return}let r=e.target;n(r)&&window.requestAnimationFrame(()=>{r.focus()}),t?.(e)},...o,children:s(p)?i(p,{disabled:d.disabled||p.props.disabled,tabIndex:m?-1:p.props.tabIndex}):null})};E.displayName=`RadioInputSandbox`;const D={Button:T,ButtonGroup:w,Card:S,Indicator:y,InputSandbox:E,Item:_,ItemContent:C,List:b,ListItem:x,Root:h};export{D as RadioGroup};
|
|
2
2
|
//# sourceMappingURL=radio-group.js.map
|
package/dist/radio-group.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-group.js","names":["HeadlessRadioGroup","HeadlessRadio","clsx"],"sources":["../src/components/radio-group/radio-group.tsx"],"sourcesContent":["\"use client\";\n\nimport { Radio as HeadlessRadio, RadioGroup as HeadlessRadioGroup } from \"@headlessui/react\";\nimport type {\n\tRadioGroupProps as HeadlessRadioGroupProps,\n\tRadioProps as HeadlessRadioProps,\n} from \"@headlessui/react\";\nimport clsx from \"clsx\";\nimport {\n\tChildren,\n\tcloneElement,\n\tcreateContext,\n\tforwardRef,\n\tisValidElement,\n\tuseContext,\n\tuseRef,\n} from \"react\";\nimport type { ComponentRef, HTMLAttributes, PropsWithChildren, ReactNode } from \"react\";\nimport type { WithAsChild } from \"../../types/as-child.js\";\nimport { cx } from \"../../utils/cx/cx.js\";\nimport { isInput } from \"../input/is-input.js\";\nimport { Slot } from \"../slot/index.js\";\n\ntype RadioGroupProps = PropsWithChildren<Omit<HeadlessRadioGroupProps, \"as\" | \"children\">>;\n\n/**\n * A group of radio items. It manages the state of the children radios. Unstyled and simple.\n * Used as the root component for grouping related radio items where only one can be selected.\n *\n * @see https://mantle.ngrok.com/components/radio-group#radiogrouproot\n *\n * @example\n * ```tsx\n * <RadioGroup value={value} onValueChange={setValue}>\n * <RadioGroup.Item value=\"option1\">\n * <RadioGroup.Indicator />\n * <span>Option 1</span>\n * </RadioGroup.Item>\n * <RadioGroup.Item value=\"option2\">\n * <RadioGroup.Indicator />\n * <span>Option 2</span>\n * </RadioGroup.Item>\n * </RadioGroup>\n * ```\n */\nconst Root = forwardRef<ComponentRef<typeof HeadlessRadioGroup>, RadioGroupProps>((props, ref) => (\n\t<HeadlessRadioGroup {...props} ref={ref} />\n));\nRoot.displayName = \"RadioGroup\";\n\n/**\n * The shape of the radio state context.\n */\ntype RadioStateContextValue = {\n\tautofocus: boolean;\n\tchecked: boolean;\n\tdisabled: boolean;\n\tfocus: boolean;\n\thover: boolean;\n};\n\n/**\n * The radio state. It's used to pass the state of the radio to its children components.\n * It's used internally by the radio components to manage the state/style of the radio items.\n * Used in place of css classes to avoid specificity issues and slightly improve performance.\n */\nconst RadioStateContext = createContext<RadioStateContextValue>({\n\tautofocus: false,\n\tchecked: false,\n\tdisabled: false,\n\tfocus: false,\n\thover: false,\n});\n\ntype RadioItemProps = Omit<HeadlessRadioProps, \"children\"> & PropsWithChildren;\n\n/**\n * A simple radio item that can be used inside a radio group. The \"conventional\" use-case.\n * Must be a child of `RadioGroup`.\n *\n * @see https://mantle.ngrok.com/components/radio-group#radiogroupitem\n *\n * @example\n * ```tsx\n * <RadioGroup value={value} onValueChange={setValue}>\n * <RadioGroup.Item value=\"option1\">\n * <RadioGroup.Indicator />\n * <span>Option 1</span>\n * </RadioGroup.Item>\n * </RadioGroup>\n * ```\n */\nconst Item = forwardRef<ComponentRef<\"div\">, RadioItemProps>(\n\t({ children, className, ...props }, ref) => (\n\t\t<HeadlessRadio\n\t\t\tclassName={cx(\n\t\t\t\t\"group/radio cursor-pointer aria-disabled:cursor-default [&_label]:cursor-inherit flex gap-2 py-1 text-sm focus:outline-hidden\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tas=\"div\"\n\t\t\t{...props}\n\t\t\tref={ref}\n\t\t>\n\t\t\t{(ctx) => <RadioStateContext.Provider value={ctx}>{children}</RadioStateContext.Provider>}\n\t\t</HeadlessRadio>\n\t),\n);\nItem.displayName = \"RadioItem\";\n\ntype RadioIndicatorProps = Omit<HTMLAttributes<HTMLDivElement>, \"children\"> & {\n\tchildren?: ReactNode | ((context: RadioStateContextValue) => ReactNode);\n};\n\n/**\n * The default radio indicator.\n * @private\n */\nconst DefaultRadioIndicator = ({ checked, disabled, focus, hover }: RadioStateContextValue) => (\n\t<span\n\t\tclassName={cx(\n\t\t\t\"border-form flex size-4 items-center justify-center rounded-full border shrink-0\",\n\t\t\tdisabled && \"cursor-default opacity-50\",\n\t\t\tchecked && \"border-accent-500 bg-accent-500\",\n\t\t\tfocus && !disabled && \"border-accent-600 ring-focus-accent ring-4\",\n\t\t\thover && \"border-accent-600\",\n\t\t)}\n\t>\n\t\t{checked && <span className=\"size-2 rounded-full bg-[#fff] shrink-0\" />}\n\t</span>\n);\n\n/**\n * The selection indicator for any radio item.\n * Use it as a child of `RadioGroup.Item`, `RadioGroup.ListItem`, or `RadioGroup.Card`.\n * By default, it's a circle that changes color when checked.\n * You can customize the indicator by passing children:\n * - a different component\n * - a render-props function that receives the radio state context and should return a component.\n *\n * @see https://mantle.ngrok.com/components/radio-group#radiogroupindicator\n *\n * @example\n * ```tsx\n * <RadioGroup.Item value=\"option1\">\n * <RadioGroup.Indicator />\n * <span>Option 1</span>\n * </RadioGroup.Item>\n * ```\n */\nconst Indicator = ({ children, className, ...props }: RadioIndicatorProps) => {\n\tconst ctx = useContext(RadioStateContext);\n\n\treturn (\n\t\t<div\n\t\t\tclassName={cx(\n\t\t\t\t\"radio-indicator inline-flex size-5 select-none items-center justify-center shrink-0\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children == null ? (\n\t\t\t\t<DefaultRadioIndicator {...ctx} />\n\t\t\t) : typeof children === \"function\" ? (\n\t\t\t\tchildren(ctx)\n\t\t\t) : (\n\t\t\t\tchildren\n\t\t\t)}\n\t\t</div>\n\t);\n};\nIndicator.displayName = \"RadioIndicator\";\n\n/**\n * A group of radio list items. Use RadioGroup.ListItem as direct children.\n */\nconst List = forwardRef<ComponentRef<typeof Root>, RadioGroupProps>(\n\t({ className, ...props }, ref) => {\n\t\treturn <Root className={clsx(\"-space-y-px\", className)} {...props} ref={ref} />;\n\t},\n);\nList.displayName = \"RadioGroupList\";\n\ntype RadioListItemProps = RadioItemProps;\n\n/**\n * A radio list item that is used inside a `RadioGroup.List`.\n */\nconst ListItem = forwardRef<ComponentRef<\"div\">, RadioListItemProps>(\n\t({ children, className, ...props }, ref) => {\n\t\treturn (\n\t\t\t<HeadlessRadio\n\t\t\t\tas=\"div\"\n\t\t\t\tclassName={cx(\n\t\t\t\t\t\"group/radio border-form [&_label]:cursor-inherit relative flex select-none gap-2 border px-3 py-2 text-sm\",\n\t\t\t\t\t\"cursor-pointer aria-disabled:cursor-default focus:outline-hidden\",\n\t\t\t\t\t\"focus-visible:ring-focus-accent not-aria-disabled:focus-visible:border-accent-600 focus-visible:ring-4\",\n\t\t\t\t\t\"first-of-type:rounded-tl-md first-of-type:rounded-tr-md last-of-type:rounded-bl-md last-of-type:rounded-br-md\",\n\t\t\t\t\t\"aria-disabled:border-form/50 not-aria-disabled:hover:z-1 not-aria-disabled:hover:border-accent-600\",\n\t\t\t\t\t\"aria-checked:z-1 aria-checked:border-accent-500/40 aria-checked:bg-accent-500/10 dark-high-contrast:aria-checked:border-accent-400 high-contrast:aria-checked:border-accent-400 not-aria-disabled:hover:aria-checked:border-accent-600\",\n\t\t\t\t\t\"has-[.radio-indicator:first-child]:pl-2 has-[.radio-indicator:last-child]:pr-2\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tref={ref}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{(ctx) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<RadioStateContext.Provider value={ctx}>{children}</RadioStateContext.Provider>\n\t\t\t\t\t</>\n\t\t\t\t)}\n\t\t\t</HeadlessRadio>\n\t\t);\n\t},\n);\nListItem.displayName = \"RadioListItem\";\n\ntype RadioItemContentProps = HTMLAttributes<HTMLDivElement> & WithAsChild;\n\ntype RadioCardProps = RadioItemProps;\n\n/**\n * A radio card item. Use it as a child of `RadioGroup`\n */\nconst Card = forwardRef<ComponentRef<\"div\">, RadioCardProps>(\n\t({ children, className, ...props }, ref) => {\n\t\treturn (\n\t\t\t<HeadlessRadio\n\t\t\t\tas=\"div\"\n\t\t\t\tclassName={clsx(\n\t\t\t\t\t\"group/radio border-card bg-card [&_label]:cursor-inherit relative rounded-md border p-4 text-sm\",\n\t\t\t\t\t\"cursor-pointer aria-disabled:cursor-default focus:outline-hidden\",\n\t\t\t\t\t\"focus-visible:ring-focus-accent not-aria-disabled:focus-visible:border-accent-600 focus-visible:ring-4\",\n\t\t\t\t\t\"first-of-type:rounded-tl-md first-of-type:rounded-tr-md last-of-type:rounded-bl-md last-of-type:rounded-br-md\",\n\t\t\t\t\t\"aria-disabled:border-form/50 not-aria-disabled:hover:z-1 not-aria-disabled:hover:border-accent-600\",\n\t\t\t\t\t\"aria-checked:z-1 aria-checked:border-accent-500/40 aria-checked:bg-accent-500/10 not-aria-disabled:hover:aria-checked:border-accent-600 dark-high-contrast:aria-checked:border-accent-400 high-contrast:aria-checked:border-accent-400\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t\tref={ref}\n\t\t\t>\n\t\t\t\t{(ctx) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<RadioStateContext.Provider value={ctx}>{children}</RadioStateContext.Provider>\n\t\t\t\t\t</>\n\t\t\t\t)}\n\t\t\t</HeadlessRadio>\n\t\t);\n\t},\n);\nCard.displayName = \"RadioCard\";\n\n/**\n * The content of any radio item. Use it to wrap any labels, descriptions, or content of a radio item.\n * Use it as a child of `RadioGroup.Item`, `RadioGroup.ListItem`, or `RadioGroup.Card`.\n */\nconst ItemContent = ({ asChild = false, children, className, ...props }: RadioItemContentProps) => {\n\tconst ctx = useContext(RadioStateContext);\n\tconst Component = asChild ? Slot : \"div\";\n\n\treturn (\n\t\t<Component\n\t\t\tclassName={clsx(\"min-w-0 flex-1\", ctx.disabled && \"opacity-50\", className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t</Component>\n\t);\n};\nItemContent.displayName = \"RadioItemContent\";\n\n/**\n * An inline group of radio buttons. Use RadioGroup.Button as direct children.\n */\nconst ButtonGroup = forwardRef<ComponentRef<typeof Root>, RadioGroupProps>(\n\t({ className, ...props }, ref) => {\n\t\treturn (\n\t\t\t<Root\n\t\t\t\tclassName={clsx(\"flex flex-row flex-nowrap -space-x-px\", className)}\n\t\t\t\t{...props}\n\t\t\t\tref={ref}\n\t\t\t/>\n\t\t);\n\t},\n);\nButtonGroup.displayName = \"RadioButtonGroup\";\n\ntype RadioButtonProps = RadioItemProps;\n\n/**\n * A radio button that is used inside a `RadioGroup.ButtonGroup`.\n */\nconst Button = forwardRef<ComponentRef<\"div\">, RadioButtonProps>(\n\t({ children, className, ...props }, ref) => {\n\t\treturn (\n\t\t\t<HeadlessRadio\n\t\t\t\tas=\"div\"\n\t\t\t\tclassName={cx(\n\t\t\t\t\t\"group/radio border-form [&_label]:cursor-inherit relative flex flex-1 select-none items-center justify-center gap-2 border px-3 text-sm\",\n\t\t\t\t\t\"h-9\",\n\t\t\t\t\t\"focus-visible:ring-focus-accent not-aria-disabled:focus-visible:border-accent-600 focus-visible:ring-4\",\n\t\t\t\t\t\"cursor-pointer aria-disabled:cursor-default focus:outline-hidden\",\n\t\t\t\t\t\"first-of-type:rounded-bl-md first-of-type:rounded-tl-md last-of-type:rounded-br-md last-of-type:rounded-tr-md\",\n\t\t\t\t\t\"not-aria-disabled:hover:z-1 not-aria-disabled:hover:border-accent-600 aria-disabled:opacity-50\",\n\t\t\t\t\t\"aria-checked:z-1 aria-checked:border-accent-500/40 aria-checked:bg-accent-500/10 not-aria-disabled:hover:aria-checked:border-accent-600\",\n\t\t\t\t\t\"has-[.radio-indicator:first-child]:pl-2 has-[.radio-indicator:last-child]:pr-2\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tref={ref}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{(ctx) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<RadioStateContext.Provider value={ctx}>{children}</RadioStateContext.Provider>\n\t\t\t\t\t</>\n\t\t\t\t)}\n\t\t\t</HeadlessRadio>\n\t\t);\n\t},\n);\nButton.displayName = \"RadioButton\";\n\ntype RadioInputSandboxProps = HTMLAttributes<HTMLDivElement>;\n\n/**\n * A sandbox container for input elements composed within radio group items.\n * It prevents the default behavior of the radio group when clicking on the input element or accepting keyboard input.\n */\nconst InputSandbox = ({ children, onClick, onKeyDown, ...props }: RadioInputSandboxProps) => {\n\tconst ref = useRef<HTMLDivElement>(null);\n\tconst ctx = useContext(RadioStateContext);\n\n\tconst singleChild = Children.only(children);\n\n\t// Prevent the child input from receiving focus when the parent radio group item is disabled or unchecked.\n\tconst shouldPreventTabIndex = ctx.disabled || !ctx.checked;\n\n\treturn (\n\t\t<div\n\t\t\trole=\"none\"\n\t\t\tref={ref}\n\t\t\tonKeyDown={(event) => {\n\t\t\t\tif (ctx.disabled) {\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tswitch (event.key) {\n\t\t\t\t\tcase \"Enter\":\n\t\t\t\t\tcase \"Tab\":\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t}\n\t\t\t\tonKeyDown?.(event);\n\t\t\t}}\n\t\t\tonClick={(event) => {\n\t\t\t\tif (ctx.disabled) {\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst target = event.target;\n\t\t\t\tif (isInput(target)) {\n\t\t\t\t\twindow.requestAnimationFrame(() => {\n\t\t\t\t\t\ttarget.focus();\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tonClick?.(event);\n\t\t\t}}\n\t\t\t{...props}\n\t\t>\n\t\t\t{isValidElement<HTMLInputElement>(singleChild)\n\t\t\t\t? cloneElement(singleChild, {\n\t\t\t\t\t\tdisabled: ctx.disabled || singleChild.props.disabled,\n\t\t\t\t\t\ttabIndex: shouldPreventTabIndex ? -1 : singleChild.props.tabIndex,\n\t\t\t\t\t})\n\t\t\t\t: null}\n\t\t</div>\n\t);\n};\nInputSandbox.displayName = \"RadioInputSandbox\";\n\n/**\n * A group of radio items. It manages the state of the children radios.\n *\n * @see https://mantle.ngrok.com/components/radio-group#radiogrouproot\n *\n * @example\n * ```tsx\n * <RadioGroup value={value} onValueChange={setValue}>\n * <RadioGroup.Item value=\"option1\">\n * <RadioGroup.Indicator />\n * <span>Option 1</span>\n * </RadioGroup.Item>\n * <RadioGroup.Item value=\"option2\">\n * <RadioGroup.Indicator />\n * <span>Option 2</span>\n * </RadioGroup.Item>\n * </RadioGroup>\n * ```\n */\nconst RadioGroup = {\n\t/**\n\t * A radio button that is used inside a RadioGroup.ButtonGroup for inline grouped radio options.\n\t *\n\t * @see https://mantle.ngrok.com/components/radio-group#radiogroupbutton\n\t *\n\t * @example\n\t * ```tsx\n\t * <RadioGroup.Root defaultValue=\"option1\">\n\t * <RadioGroup.ButtonGroup>\n\t * <RadioGroup.Button value=\"option1\">Option 1</RadioGroup.Button>\n\t * <RadioGroup.Button value=\"option2\">Option 2</RadioGroup.Button>\n\t * <RadioGroup.Button value=\"option3\">Option 3</RadioGroup.Button>\n\t * </RadioGroup.ButtonGroup>\n\t * </RadioGroup.Root>\n\t * ```\n\t */\n\tButton,\n\t/**\n\t * An inline group of radio buttons. Use RadioGroup.Button as direct children for horizontal radio layouts.\n\t *\n\t * @see https://mantle.ngrok.com/components/radio-group#radiogroupbuttongroup\n\t *\n\t * @example\n\t * ```tsx\n\t * <RadioGroup.Root defaultValue=\"small\">\n\t * <Label htmlFor=\"size-group\">Size</Label>\n\t * <RadioGroup.ButtonGroup>\n\t * <RadioGroup.Button value=\"small\">Small</RadioGroup.Button>\n\t * <RadioGroup.Button value=\"medium\">Medium</RadioGroup.Button>\n\t * <RadioGroup.Button value=\"large\">Large</RadioGroup.Button>\n\t * </RadioGroup.ButtonGroup>\n\t * </RadioGroup.Root>\n\t * ```\n\t */\n\tButtonGroup,\n\t/**\n\t * A radio card item with enhanced styling. Use it as a child of RadioGroup for card-based radio options.\n\t *\n\t * @see https://mantle.ngrok.com/components/radio-group#radiogroupcard\n\t *\n\t * @example\n\t * ```tsx\n\t * <RadioGroup.Root defaultValue=\"basic\">\n\t * <div className=\"space-y-3\">\n\t * <RadioGroup.Card value=\"basic\">\n\t * <RadioGroup.ItemContent>\n\t * <Text weight=\"strong\">Basic Plan</Text>\n\t * <Text>$10/month</Text>\n\t * </RadioGroup.ItemContent>\n\t * </RadioGroup.Card>\n\t * <RadioGroup.Card value=\"pro\">\n\t * <RadioGroup.ItemContent>\n\t * <Text weight=\"strong\">Pro Plan</Text>\n\t * <Text>$25/month</Text>\n\t * </RadioGroup.ItemContent>\n\t * </RadioGroup.Card>\n\t * </div>\n\t * </RadioGroup.Root>\n\t * ```\n\t */\n\tCard,\n\t/**\n\t * The selection indicator for any radio item. Shows the checked state with customizable appearance.\n\t *\n\t * @see https://mantle.ngrok.com/components/radio-group#radiogroupindicator\n\t *\n\t * @example\n\t * ```tsx\n\t * <RadioGroup.Item value=\"option1\">\n\t * <RadioGroup.Indicator />\n\t * <span>Option 1</span>\n\t * </RadioGroup.Item>\n\t * ```\n\t */\n\tIndicator,\n\t/**\n\t * A sandbox container for input elements composed within radio group items. Prevents default radio behavior.\n\t *\n\t * @see https://mantle.ngrok.com/components/radio-group#radiogroupinputsandbox\n\t *\n\t * @example\n\t * ```tsx\n\t * <RadioGroup.Root defaultValue=\"custom\">\n\t * <RadioGroup.Item value=\"custom\">\n\t * <RadioGroup.Indicator />\n\t * <RadioGroup.ItemContent>\n\t * <Text>Custom amount</Text>\n\t * <RadioGroup.InputSandbox>\n\t * <Input type=\"number\" placeholder=\"Enter amount\" />\n\t * </RadioGroup.InputSandbox>\n\t * </RadioGroup.ItemContent>\n\t * </RadioGroup.Item>\n\t * </RadioGroup.Root>\n\t * ```\n\t */\n\tInputSandbox,\n\t/**\n\t * A simple radio item that can be used inside a radio group. The conventional use-case for basic radio options.\n\t *\n\t * @see https://mantle.ngrok.com/components/radio-group#radiogroupitem\n\t *\n\t * @example\n\t * ```tsx\n\t * <RadioGroup.Item value=\"option1\">\n\t * <RadioGroup.Indicator />\n\t * <span>Option 1</span>\n\t * </RadioGroup.Item>\n\t * ```\n\t */\n\tItem,\n\t/**\n\t * The content wrapper for any radio item. Use it to wrap labels, descriptions, or content of a radio item.\n\t *\n\t * @see https://mantle.ngrok.com/components/radio-group#radiogroupitemcontent\n\t *\n\t * @example\n\t * ```tsx\n\t * <RadioGroup.Root defaultValue=\"option1\">\n\t * <RadioGroup.Item value=\"option1\">\n\t * <RadioGroup.Indicator />\n\t * <RadioGroup.ItemContent>\n\t * <Text weight=\"strong\">Option 1</Text>\n\t * <Text size=\"sm\">Description for option 1</Text>\n\t * </RadioGroup.ItemContent>\n\t * </RadioGroup.Item>\n\t * </RadioGroup.Root>\n\t * ```\n\t */\n\tItemContent,\n\t/**\n\t * A group of radio list items with connected borders. Use RadioGroup.ListItem as direct children.\n\t *\n\t * @see https://mantle.ngrok.com/components/radio-group#radiogrouplist\n\t *\n\t * @example\n\t * ```tsx\n\t * <RadioGroup.Root defaultValue=\"option1\">\n\t * <RadioGroup.List>\n\t * <RadioGroup.ListItem value=\"option1\">\n\t * <RadioGroup.ItemContent>\n\t * <Text>Option 1</Text>\n\t * </RadioGroup.ItemContent>\n\t * </RadioGroup.ListItem>\n\t * <RadioGroup.ListItem value=\"option2\">\n\t * <RadioGroup.ItemContent>\n\t * <Text>Option 2</Text>\n\t * </RadioGroup.ItemContent>\n\t * </RadioGroup.ListItem>\n\t * </RadioGroup.List>\n\t * </RadioGroup.Root>\n\t * ```\n\t */\n\tList,\n\t/**\n\t * A radio list item that is used inside a RadioGroup.List for connected list-style radio options.\n\t *\n\t * @see https://mantle.ngrok.com/components/radio-group#radiogrouplistitem\n\t *\n\t * @example\n\t * ```tsx\n\t * <RadioGroup.Root defaultValue=\"item1\">\n\t * <RadioGroup.List>\n\t * <RadioGroup.ListItem value=\"item1\">\n\t * <RadioGroup.ItemContent>\n\t * <Text>List Item 1</Text>\n\t * <Text size=\"sm\" className=\"text-muted\">First option</Text>\n\t * </RadioGroup.ItemContent>\n\t * </RadioGroup.ListItem>\n\t * <RadioGroup.ListItem value=\"item2\">\n\t * <RadioGroup.ItemContent>\n\t * <Text>List Item 2</Text>\n\t * <Text size=\"sm\" className=\"text-muted\">Second option</Text>\n\t * </RadioGroup.ItemContent>\n\t * </RadioGroup.ListItem>\n\t * </RadioGroup.List>\n\t * </RadioGroup.Root>\n\t * ```\n\t */\n\tListItem,\n\t/**\n\t * The root radio group component. Manages the state of the children radios where only one can be selected.\n\t *\n\t * @see https://mantle.ngrok.com/components/radio-group#radiogrouproot\n\t *\n\t * @example\n\t * ```tsx\n\t * <RadioGroup.Root value={value} onValueChange={setValue}>\n\t * <RadioGroup.Item value=\"option1\">\n\t * <RadioGroup.Indicator />\n\t * <span>Option 1</span>\n\t * </RadioGroup.Item>\n\t * </RadioGroup.Root>\n\t * ```\n\t */\n\tRoot,\n} as const;\n\nexport {\n\t//\n\tRadioGroup,\n};\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"radio-group.js","names":["HeadlessRadioGroup","HeadlessRadio","clsx"],"sources":["../src/components/radio-group/radio-group.tsx"],"sourcesContent":["\"use client\";\n\nimport { Radio as HeadlessRadio, RadioGroup as HeadlessRadioGroup } from \"@headlessui/react\";\nimport type {\n\tRadioGroupProps as HeadlessRadioGroupProps,\n\tRadioProps as HeadlessRadioProps,\n} from \"@headlessui/react\";\nimport clsx from \"clsx\";\nimport {\n\tChildren,\n\tcloneElement,\n\tcreateContext,\n\tforwardRef,\n\tisValidElement,\n\tuseContext,\n\tuseRef,\n} from \"react\";\nimport type { ComponentRef, HTMLAttributes, PropsWithChildren, ReactNode } from \"react\";\nimport type { WithAsChild } from \"../../types/as-child.js\";\nimport { cx } from \"../../utils/cx/cx.js\";\nimport { isInput } from \"../input/is-input.js\";\nimport { Slot } from \"../slot/index.js\";\n\ntype RadioGroupProps = PropsWithChildren<Omit<HeadlessRadioGroupProps, \"as\" | \"children\">>;\n\n/**\n * A group of radio items. It manages the state of the children radios. Unstyled and simple.\n * Used as the root component for grouping related radio items where only one can be selected.\n *\n * @see https://mantle.ngrok.com/components/radio-group#radiogrouproot\n *\n * @example\n * ```tsx\n * <RadioGroup value={value} onValueChange={setValue}>\n * <RadioGroup.Item value=\"option1\">\n * <RadioGroup.Indicator />\n * <span>Option 1</span>\n * </RadioGroup.Item>\n * <RadioGroup.Item value=\"option2\">\n * <RadioGroup.Indicator />\n * <span>Option 2</span>\n * </RadioGroup.Item>\n * </RadioGroup>\n * ```\n */\nconst Root = forwardRef<ComponentRef<typeof HeadlessRadioGroup>, RadioGroupProps>((props, ref) => (\n\t<HeadlessRadioGroup {...props} ref={ref} />\n));\nRoot.displayName = \"RadioGroup\";\n\n/**\n * The shape of the radio state context.\n */\ntype RadioStateContextValue = {\n\tautofocus: boolean;\n\tchecked: boolean;\n\tdisabled: boolean;\n\tfocus: boolean;\n\thover: boolean;\n};\n\n/**\n * The radio state. It's used to pass the state of the radio to its children components.\n * It's used internally by the radio components to manage the state/style of the radio items.\n * Used in place of css classes to avoid specificity issues and slightly improve performance.\n */\nconst RadioStateContext = createContext<RadioStateContextValue>({\n\tautofocus: false,\n\tchecked: false,\n\tdisabled: false,\n\tfocus: false,\n\thover: false,\n});\n\ntype RadioItemProps = Omit<HeadlessRadioProps, \"children\"> & PropsWithChildren;\n\n/**\n * A simple radio item that can be used inside a radio group. The \"conventional\" use-case.\n * Must be a child of `RadioGroup`.\n *\n * @see https://mantle.ngrok.com/components/radio-group#radiogroupitem\n *\n * @example\n * ```tsx\n * <RadioGroup value={value} onValueChange={setValue}>\n * <RadioGroup.Item value=\"option1\">\n * <RadioGroup.Indicator />\n * <span>Option 1</span>\n * </RadioGroup.Item>\n * </RadioGroup>\n * ```\n */\nconst Item = forwardRef<ComponentRef<\"div\">, RadioItemProps>(\n\t({ children, className, ...props }, ref) => (\n\t\t<HeadlessRadio\n\t\t\tclassName={cx(\n\t\t\t\t\"group/radio cursor-pointer aria-disabled:cursor-default [&_label]:cursor-inherit flex gap-2 py-1 text-sm focus:outline-hidden\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tas=\"div\"\n\t\t\t{...props}\n\t\t\tref={ref}\n\t\t>\n\t\t\t{(ctx) => <RadioStateContext.Provider value={ctx}>{children}</RadioStateContext.Provider>}\n\t\t</HeadlessRadio>\n\t),\n);\nItem.displayName = \"RadioItem\";\n\ntype RadioIndicatorProps = Omit<HTMLAttributes<HTMLDivElement>, \"children\"> & {\n\tchildren?: ReactNode | ((context: RadioStateContextValue) => ReactNode);\n};\n\n/**\n * The default radio indicator.\n * @private\n */\nconst DefaultRadioIndicator = ({ checked, disabled, focus, hover }: RadioStateContextValue) => (\n\t<span\n\t\tclassName={cx(\n\t\t\t\"border-form flex size-4 items-center justify-center rounded-full border shrink-0\",\n\t\t\tdisabled && \"cursor-default opacity-50\",\n\t\t\tchecked && \"border-accent-600 bg-accent-600\",\n\t\t\tfocus && !disabled && \"border-accent-600 ring-focus-accent ring-4\",\n\t\t\thover && \"border-accent-600\",\n\t\t)}\n\t>\n\t\t{checked && <span className=\"size-2 rounded-full bg-white shrink-0\" />}\n\t</span>\n);\n\n/**\n * The selection indicator for any radio item.\n * Use it as a child of `RadioGroup.Item`, `RadioGroup.ListItem`, or `RadioGroup.Card`.\n * By default, it's a circle that changes color when checked.\n * You can customize the indicator by passing children:\n * - a different component\n * - a render-props function that receives the radio state context and should return a component.\n *\n * @see https://mantle.ngrok.com/components/radio-group#radiogroupindicator\n *\n * @example\n * ```tsx\n * <RadioGroup.Item value=\"option1\">\n * <RadioGroup.Indicator />\n * <span>Option 1</span>\n * </RadioGroup.Item>\n * ```\n */\nconst Indicator = ({ children, className, ...props }: RadioIndicatorProps) => {\n\tconst ctx = useContext(RadioStateContext);\n\n\treturn (\n\t\t<div\n\t\t\tclassName={cx(\n\t\t\t\t\"radio-indicator inline-flex size-5 select-none items-center justify-center shrink-0\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children == null ? (\n\t\t\t\t<DefaultRadioIndicator {...ctx} />\n\t\t\t) : typeof children === \"function\" ? (\n\t\t\t\tchildren(ctx)\n\t\t\t) : (\n\t\t\t\tchildren\n\t\t\t)}\n\t\t</div>\n\t);\n};\nIndicator.displayName = \"RadioIndicator\";\n\n/**\n * A group of radio list items. Use RadioGroup.ListItem as direct children.\n */\nconst List = forwardRef<ComponentRef<typeof Root>, RadioGroupProps>(\n\t({ className, ...props }, ref) => {\n\t\treturn <Root className={clsx(\"-space-y-px\", className)} {...props} ref={ref} />;\n\t},\n);\nList.displayName = \"RadioGroupList\";\n\ntype RadioListItemProps = RadioItemProps;\n\n/**\n * A radio list item that is used inside a `RadioGroup.List`.\n */\nconst ListItem = forwardRef<ComponentRef<\"div\">, RadioListItemProps>(\n\t({ children, className, ...props }, ref) => {\n\t\treturn (\n\t\t\t<HeadlessRadio\n\t\t\t\tas=\"div\"\n\t\t\t\tclassName={cx(\n\t\t\t\t\t\"group/radio border-form [&_label]:cursor-inherit relative flex select-none gap-2 border px-3 py-2 text-sm\",\n\t\t\t\t\t\"cursor-pointer aria-disabled:cursor-default focus:outline-hidden\",\n\t\t\t\t\t\"focus-visible:ring-focus-accent not-aria-disabled:focus-visible:border-accent-600 focus-visible:ring-4\",\n\t\t\t\t\t\"first-of-type:rounded-tl-md first-of-type:rounded-tr-md last-of-type:rounded-bl-md last-of-type:rounded-br-md\",\n\t\t\t\t\t\"aria-disabled:border-form/50 not-aria-disabled:hover:z-1 not-aria-disabled:hover:border-accent-600\",\n\t\t\t\t\t\"aria-checked:z-1 aria-checked:border-accent-500/40 aria-checked:bg-accent-500/10 dark-high-contrast:aria-checked:border-accent-400 high-contrast:aria-checked:border-accent-400 not-aria-disabled:hover:aria-checked:border-accent-600\",\n\t\t\t\t\t\"has-[.radio-indicator:first-child]:pl-2 has-[.radio-indicator:last-child]:pr-2\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tref={ref}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{(ctx) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<RadioStateContext.Provider value={ctx}>{children}</RadioStateContext.Provider>\n\t\t\t\t\t</>\n\t\t\t\t)}\n\t\t\t</HeadlessRadio>\n\t\t);\n\t},\n);\nListItem.displayName = \"RadioListItem\";\n\ntype RadioItemContentProps = HTMLAttributes<HTMLDivElement> & WithAsChild;\n\ntype RadioCardProps = RadioItemProps;\n\n/**\n * A radio card item. Use it as a child of `RadioGroup`\n */\nconst Card = forwardRef<ComponentRef<\"div\">, RadioCardProps>(\n\t({ children, className, ...props }, ref) => {\n\t\treturn (\n\t\t\t<HeadlessRadio\n\t\t\t\tas=\"div\"\n\t\t\t\tclassName={clsx(\n\t\t\t\t\t\"group/radio border-card bg-card [&_label]:cursor-inherit relative rounded-md border p-4 text-sm\",\n\t\t\t\t\t\"cursor-pointer aria-disabled:cursor-default focus:outline-hidden\",\n\t\t\t\t\t\"focus-visible:ring-focus-accent not-aria-disabled:focus-visible:border-accent-600 focus-visible:ring-4\",\n\t\t\t\t\t\"first-of-type:rounded-tl-md first-of-type:rounded-tr-md last-of-type:rounded-bl-md last-of-type:rounded-br-md\",\n\t\t\t\t\t\"aria-disabled:border-form/50 not-aria-disabled:hover:z-1 not-aria-disabled:hover:border-accent-600\",\n\t\t\t\t\t\"aria-checked:z-1 aria-checked:border-accent-600/50 aria-checked:bg-accent-500/10 not-aria-disabled:hover:aria-checked:border-accent-600 dark-high-contrast:aria-checked:border-accent-600 high-contrast:aria-checked:border-accent-600\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t\tref={ref}\n\t\t\t>\n\t\t\t\t{(ctx) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<RadioStateContext.Provider value={ctx}>{children}</RadioStateContext.Provider>\n\t\t\t\t\t</>\n\t\t\t\t)}\n\t\t\t</HeadlessRadio>\n\t\t);\n\t},\n);\nCard.displayName = \"RadioCard\";\n\n/**\n * The content of any radio item. Use it to wrap any labels, descriptions, or content of a radio item.\n * Use it as a child of `RadioGroup.Item`, `RadioGroup.ListItem`, or `RadioGroup.Card`.\n */\nconst ItemContent = ({ asChild = false, children, className, ...props }: RadioItemContentProps) => {\n\tconst ctx = useContext(RadioStateContext);\n\tconst Component = asChild ? Slot : \"div\";\n\n\treturn (\n\t\t<Component\n\t\t\tclassName={clsx(\"min-w-0 flex-1\", ctx.disabled && \"opacity-50\", className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t</Component>\n\t);\n};\nItemContent.displayName = \"RadioItemContent\";\n\n/**\n * An inline group of radio buttons. Use RadioGroup.Button as direct children.\n */\nconst ButtonGroup = forwardRef<ComponentRef<typeof Root>, RadioGroupProps>(\n\t({ className, ...props }, ref) => {\n\t\treturn (\n\t\t\t<Root\n\t\t\t\tclassName={clsx(\"flex flex-row flex-nowrap -space-x-px\", className)}\n\t\t\t\t{...props}\n\t\t\t\tref={ref}\n\t\t\t/>\n\t\t);\n\t},\n);\nButtonGroup.displayName = \"RadioButtonGroup\";\n\ntype RadioButtonProps = RadioItemProps;\n\n/**\n * A radio button that is used inside a `RadioGroup.ButtonGroup`.\n */\nconst Button = forwardRef<ComponentRef<\"div\">, RadioButtonProps>(\n\t({ children, className, ...props }, ref) => {\n\t\treturn (\n\t\t\t<HeadlessRadio\n\t\t\t\tas=\"div\"\n\t\t\t\tclassName={cx(\n\t\t\t\t\t\"group/radio border-form [&_label]:cursor-inherit relative flex flex-1 select-none items-center justify-center gap-2 border px-3 text-sm\",\n\t\t\t\t\t\"h-9\",\n\t\t\t\t\t\"focus-visible:ring-focus-accent not-aria-disabled:focus-visible:border-accent-600 focus-visible:ring-4\",\n\t\t\t\t\t\"cursor-pointer aria-disabled:cursor-default focus:outline-hidden\",\n\t\t\t\t\t\"first-of-type:rounded-bl-md first-of-type:rounded-tl-md last-of-type:rounded-br-md last-of-type:rounded-tr-md\",\n\t\t\t\t\t\"not-aria-disabled:hover:z-1 not-aria-disabled:hover:border-accent-600 aria-disabled:opacity-50\",\n\t\t\t\t\t\"aria-checked:z-1 aria-checked:border-accent-600/40 aria-checked:bg-accent-500/10 not-aria-disabled:hover:aria-checked:border-accent-600\",\n\t\t\t\t\t\"has-[.radio-indicator:first-child]:pl-2 has-[.radio-indicator:last-child]:pr-2\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tref={ref}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{(ctx) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<RadioStateContext.Provider value={ctx}>{children}</RadioStateContext.Provider>\n\t\t\t\t\t</>\n\t\t\t\t)}\n\t\t\t</HeadlessRadio>\n\t\t);\n\t},\n);\nButton.displayName = \"RadioButton\";\n\ntype RadioInputSandboxProps = HTMLAttributes<HTMLDivElement>;\n\n/**\n * A sandbox container for input elements composed within radio group items.\n * It prevents the default behavior of the radio group when clicking on the input element or accepting keyboard input.\n */\nconst InputSandbox = ({ children, onClick, onKeyDown, ...props }: RadioInputSandboxProps) => {\n\tconst ref = useRef<HTMLDivElement>(null);\n\tconst ctx = useContext(RadioStateContext);\n\n\tconst singleChild = Children.only(children);\n\n\t// Prevent the child input from receiving focus when the parent radio group item is disabled or unchecked.\n\tconst shouldPreventTabIndex = ctx.disabled || !ctx.checked;\n\n\treturn (\n\t\t<div\n\t\t\trole=\"none\"\n\t\t\tref={ref}\n\t\t\tonKeyDown={(event) => {\n\t\t\t\tif (ctx.disabled) {\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tswitch (event.key) {\n\t\t\t\t\tcase \"Enter\":\n\t\t\t\t\tcase \"Tab\":\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t}\n\t\t\t\tonKeyDown?.(event);\n\t\t\t}}\n\t\t\tonClick={(event) => {\n\t\t\t\tif (ctx.disabled) {\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst target = event.target;\n\t\t\t\tif (isInput(target)) {\n\t\t\t\t\twindow.requestAnimationFrame(() => {\n\t\t\t\t\t\ttarget.focus();\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tonClick?.(event);\n\t\t\t}}\n\t\t\t{...props}\n\t\t>\n\t\t\t{isValidElement<HTMLInputElement>(singleChild)\n\t\t\t\t? cloneElement(singleChild, {\n\t\t\t\t\t\tdisabled: ctx.disabled || singleChild.props.disabled,\n\t\t\t\t\t\ttabIndex: shouldPreventTabIndex ? -1 : singleChild.props.tabIndex,\n\t\t\t\t\t})\n\t\t\t\t: null}\n\t\t</div>\n\t);\n};\nInputSandbox.displayName = \"RadioInputSandbox\";\n\n/**\n * A group of radio items. It manages the state of the children radios.\n *\n * @see https://mantle.ngrok.com/components/radio-group#radiogrouproot\n *\n * @example\n * ```tsx\n * <RadioGroup value={value} onValueChange={setValue}>\n * <RadioGroup.Item value=\"option1\">\n * <RadioGroup.Indicator />\n * <span>Option 1</span>\n * </RadioGroup.Item>\n * <RadioGroup.Item value=\"option2\">\n * <RadioGroup.Indicator />\n * <span>Option 2</span>\n * </RadioGroup.Item>\n * </RadioGroup>\n * ```\n */\nconst RadioGroup = {\n\t/**\n\t * A radio button that is used inside a RadioGroup.ButtonGroup for inline grouped radio options.\n\t *\n\t * @see https://mantle.ngrok.com/components/radio-group#radiogroupbutton\n\t *\n\t * @example\n\t * ```tsx\n\t * <RadioGroup.Root defaultValue=\"option1\">\n\t * <RadioGroup.ButtonGroup>\n\t * <RadioGroup.Button value=\"option1\">Option 1</RadioGroup.Button>\n\t * <RadioGroup.Button value=\"option2\">Option 2</RadioGroup.Button>\n\t * <RadioGroup.Button value=\"option3\">Option 3</RadioGroup.Button>\n\t * </RadioGroup.ButtonGroup>\n\t * </RadioGroup.Root>\n\t * ```\n\t */\n\tButton,\n\t/**\n\t * An inline group of radio buttons. Use RadioGroup.Button as direct children for horizontal radio layouts.\n\t *\n\t * @see https://mantle.ngrok.com/components/radio-group#radiogroupbuttongroup\n\t *\n\t * @example\n\t * ```tsx\n\t * <RadioGroup.Root defaultValue=\"small\">\n\t * <Label htmlFor=\"size-group\">Size</Label>\n\t * <RadioGroup.ButtonGroup>\n\t * <RadioGroup.Button value=\"small\">Small</RadioGroup.Button>\n\t * <RadioGroup.Button value=\"medium\">Medium</RadioGroup.Button>\n\t * <RadioGroup.Button value=\"large\">Large</RadioGroup.Button>\n\t * </RadioGroup.ButtonGroup>\n\t * </RadioGroup.Root>\n\t * ```\n\t */\n\tButtonGroup,\n\t/**\n\t * A radio card item with enhanced styling. Use it as a child of RadioGroup for card-based radio options.\n\t *\n\t * @see https://mantle.ngrok.com/components/radio-group#radiogroupcard\n\t *\n\t * @example\n\t * ```tsx\n\t * <RadioGroup.Root defaultValue=\"basic\">\n\t * <div className=\"space-y-3\">\n\t * <RadioGroup.Card value=\"basic\">\n\t * <RadioGroup.ItemContent>\n\t * <Text weight=\"strong\">Basic Plan</Text>\n\t * <Text>$10/month</Text>\n\t * </RadioGroup.ItemContent>\n\t * </RadioGroup.Card>\n\t * <RadioGroup.Card value=\"pro\">\n\t * <RadioGroup.ItemContent>\n\t * <Text weight=\"strong\">Pro Plan</Text>\n\t * <Text>$25/month</Text>\n\t * </RadioGroup.ItemContent>\n\t * </RadioGroup.Card>\n\t * </div>\n\t * </RadioGroup.Root>\n\t * ```\n\t */\n\tCard,\n\t/**\n\t * The selection indicator for any radio item. Shows the checked state with customizable appearance.\n\t *\n\t * @see https://mantle.ngrok.com/components/radio-group#radiogroupindicator\n\t *\n\t * @example\n\t * ```tsx\n\t * <RadioGroup.Item value=\"option1\">\n\t * <RadioGroup.Indicator />\n\t * <span>Option 1</span>\n\t * </RadioGroup.Item>\n\t * ```\n\t */\n\tIndicator,\n\t/**\n\t * A sandbox container for input elements composed within radio group items. Prevents default radio behavior.\n\t *\n\t * @see https://mantle.ngrok.com/components/radio-group#radiogroupinputsandbox\n\t *\n\t * @example\n\t * ```tsx\n\t * <RadioGroup.Root defaultValue=\"custom\">\n\t * <RadioGroup.Item value=\"custom\">\n\t * <RadioGroup.Indicator />\n\t * <RadioGroup.ItemContent>\n\t * <Text>Custom amount</Text>\n\t * <RadioGroup.InputSandbox>\n\t * <Input type=\"number\" placeholder=\"Enter amount\" />\n\t * </RadioGroup.InputSandbox>\n\t * </RadioGroup.ItemContent>\n\t * </RadioGroup.Item>\n\t * </RadioGroup.Root>\n\t * ```\n\t */\n\tInputSandbox,\n\t/**\n\t * A simple radio item that can be used inside a radio group. The conventional use-case for basic radio options.\n\t *\n\t * @see https://mantle.ngrok.com/components/radio-group#radiogroupitem\n\t *\n\t * @example\n\t * ```tsx\n\t * <RadioGroup.Item value=\"option1\">\n\t * <RadioGroup.Indicator />\n\t * <span>Option 1</span>\n\t * </RadioGroup.Item>\n\t * ```\n\t */\n\tItem,\n\t/**\n\t * The content wrapper for any radio item. Use it to wrap labels, descriptions, or content of a radio item.\n\t *\n\t * @see https://mantle.ngrok.com/components/radio-group#radiogroupitemcontent\n\t *\n\t * @example\n\t * ```tsx\n\t * <RadioGroup.Root defaultValue=\"option1\">\n\t * <RadioGroup.Item value=\"option1\">\n\t * <RadioGroup.Indicator />\n\t * <RadioGroup.ItemContent>\n\t * <Text weight=\"strong\">Option 1</Text>\n\t * <Text size=\"sm\">Description for option 1</Text>\n\t * </RadioGroup.ItemContent>\n\t * </RadioGroup.Item>\n\t * </RadioGroup.Root>\n\t * ```\n\t */\n\tItemContent,\n\t/**\n\t * A group of radio list items with connected borders. Use RadioGroup.ListItem as direct children.\n\t *\n\t * @see https://mantle.ngrok.com/components/radio-group#radiogrouplist\n\t *\n\t * @example\n\t * ```tsx\n\t * <RadioGroup.Root defaultValue=\"option1\">\n\t * <RadioGroup.List>\n\t * <RadioGroup.ListItem value=\"option1\">\n\t * <RadioGroup.ItemContent>\n\t * <Text>Option 1</Text>\n\t * </RadioGroup.ItemContent>\n\t * </RadioGroup.ListItem>\n\t * <RadioGroup.ListItem value=\"option2\">\n\t * <RadioGroup.ItemContent>\n\t * <Text>Option 2</Text>\n\t * </RadioGroup.ItemContent>\n\t * </RadioGroup.ListItem>\n\t * </RadioGroup.List>\n\t * </RadioGroup.Root>\n\t * ```\n\t */\n\tList,\n\t/**\n\t * A radio list item that is used inside a RadioGroup.List for connected list-style radio options.\n\t *\n\t * @see https://mantle.ngrok.com/components/radio-group#radiogrouplistitem\n\t *\n\t * @example\n\t * ```tsx\n\t * <RadioGroup.Root defaultValue=\"item1\">\n\t * <RadioGroup.List>\n\t * <RadioGroup.ListItem value=\"item1\">\n\t * <RadioGroup.ItemContent>\n\t * <Text>List Item 1</Text>\n\t * <Text size=\"sm\" className=\"text-muted\">First option</Text>\n\t * </RadioGroup.ItemContent>\n\t * </RadioGroup.ListItem>\n\t * <RadioGroup.ListItem value=\"item2\">\n\t * <RadioGroup.ItemContent>\n\t * <Text>List Item 2</Text>\n\t * <Text size=\"sm\" className=\"text-muted\">Second option</Text>\n\t * </RadioGroup.ItemContent>\n\t * </RadioGroup.ListItem>\n\t * </RadioGroup.List>\n\t * </RadioGroup.Root>\n\t * ```\n\t */\n\tListItem,\n\t/**\n\t * The root radio group component. Manages the state of the children radios where only one can be selected.\n\t *\n\t * @see https://mantle.ngrok.com/components/radio-group#radiogrouproot\n\t *\n\t * @example\n\t * ```tsx\n\t * <RadioGroup.Root value={value} onValueChange={setValue}>\n\t * <RadioGroup.Item value=\"option1\">\n\t * <RadioGroup.Indicator />\n\t * <span>Option 1</span>\n\t * </RadioGroup.Item>\n\t * </RadioGroup.Root>\n\t * ```\n\t */\n\tRoot,\n} as const;\n\nexport {\n\t//\n\tRadioGroup,\n};\n"],"mappings":"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"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as WithAsChild } from "./as-child-CRRsxi3Y.js";
|
|
2
|
-
import * as react from "react";
|
|
2
|
+
import * as _$react from "react";
|
|
3
3
|
import { ComponentProps, MouseEventHandler } from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/components/sandboxed-on-click/sandboxed-on-click.d.ts
|
|
@@ -42,7 +42,7 @@ declare const sandboxedOnClickProps: ({
|
|
|
42
42
|
* @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/presentation_role
|
|
43
43
|
*/
|
|
44
44
|
readonly role: "presentation";
|
|
45
|
-
readonly onClick: (event: react.MouseEvent<HTMLElement, MouseEvent>) => void;
|
|
45
|
+
readonly onClick: (event: _$react.MouseEvent<HTMLElement, MouseEvent>) => void;
|
|
46
46
|
};
|
|
47
47
|
type Props = ComponentProps<"div"> & WithAsChild & BaseProps;
|
|
48
48
|
/**
|
|
@@ -62,7 +62,7 @@ type Props = ComponentProps<"div"> & WithAsChild & BaseProps;
|
|
|
62
62
|
* </TableRowCell>
|
|
63
63
|
* </TableRow>
|
|
64
64
|
*/
|
|
65
|
-
declare const SandboxedOnClick: react.ForwardRefExoticComponent<Omit<Props, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
65
|
+
declare const SandboxedOnClick: _$react.ForwardRefExoticComponent<Omit<Props, "ref"> & _$react.RefAttributes<HTMLDivElement>>;
|
|
66
66
|
//#endregion
|
|
67
67
|
export { SandboxedOnClick, sandboxedOnClickProps };
|
|
68
68
|
//# sourceMappingURL=sandboxed-on-click.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as WithAsChild } from "./as-child-CRRsxi3Y.js";
|
|
2
2
|
import { o as WithValidation } from "./types-Cq6RWU7Q.js";
|
|
3
|
-
import * as react from "react";
|
|
3
|
+
import * as _$react from "react";
|
|
4
4
|
import { FocusEvent, ReactNode, SelectHTMLAttributes } from "react";
|
|
5
5
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
6
6
|
|
|
@@ -63,7 +63,7 @@ declare const Select: {
|
|
|
63
63
|
* </Select.Root>
|
|
64
64
|
* ```
|
|
65
65
|
*/
|
|
66
|
-
readonly Root: react.ForwardRefExoticComponent<{
|
|
66
|
+
readonly Root: _$react.ForwardRefExoticComponent<{
|
|
67
67
|
children?: ReactNode | undefined;
|
|
68
68
|
} & {
|
|
69
69
|
autoComplete?: string;
|
|
@@ -89,7 +89,7 @@ declare const Select: {
|
|
|
89
89
|
open?: boolean;
|
|
90
90
|
required?: boolean;
|
|
91
91
|
value?: string;
|
|
92
|
-
} & WithValidation & WithAriaInvalid & react.RefAttributes<HTMLButtonElement>>;
|
|
92
|
+
} & WithValidation & WithAriaInvalid & _$react.RefAttributes<HTMLButtonElement>>;
|
|
93
93
|
/**
|
|
94
94
|
* The component that pops out when the select is open as a portal adjacent to the trigger button.
|
|
95
95
|
* It contains a scrolling viewport of the select items.
|
|
@@ -108,14 +108,14 @@ declare const Select: {
|
|
|
108
108
|
* </Select.Content>
|
|
109
109
|
* </Select.Root>
|
|
110
110
|
*/
|
|
111
|
-
readonly Content: react.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & react.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
111
|
+
readonly Content: _$react.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & _$react.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
112
112
|
/**
|
|
113
113
|
* The width of the content. Defaults to the width of the trigger.
|
|
114
114
|
* If set to "content", the content will use the intrinsic content width; it will be the width of the longest/widest item.
|
|
115
115
|
* @default "trigger"
|
|
116
116
|
*/
|
|
117
117
|
width?: "trigger" | "content";
|
|
118
|
-
} & react.RefAttributes<HTMLDivElement>>;
|
|
118
|
+
} & _$react.RefAttributes<HTMLDivElement>>;
|
|
119
119
|
/**
|
|
120
120
|
* A group of related options within a select menu. Similar to an html `<optgroup>` element.
|
|
121
121
|
* Use in conjunction with Select.Label to ensure good accessibility via automatic labelling.
|
|
@@ -142,7 +142,7 @@ declare const Select: {
|
|
|
142
142
|
* </Select.Content>
|
|
143
143
|
* </Select.Root>
|
|
144
144
|
*/
|
|
145
|
-
readonly Group: react.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectGroupProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
145
|
+
readonly Group: _$react.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectGroupProps & _$react.RefAttributes<HTMLDivElement>, "ref"> & _$react.RefAttributes<HTMLDivElement>>;
|
|
146
146
|
/**
|
|
147
147
|
* An option within a select menu. Similar to an html `<option>` element.
|
|
148
148
|
* Has a required `value` prop that will be passed to the `onChange` handler of the `Select` component when this item is selected.
|
|
@@ -162,9 +162,9 @@ declare const Select: {
|
|
|
162
162
|
* </Select.Content>
|
|
163
163
|
* </Select.Root>
|
|
164
164
|
*/
|
|
165
|
-
readonly Item: react.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & react.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
165
|
+
readonly Item: _$react.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & _$react.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
166
166
|
icon?: ReactNode;
|
|
167
|
-
} & react.RefAttributes<HTMLDivElement>>;
|
|
167
|
+
} & _$react.RefAttributes<HTMLDivElement>>;
|
|
168
168
|
/**
|
|
169
169
|
* Used to render the label of a group. It won't be focusable using arrow keys.
|
|
170
170
|
*
|
|
@@ -190,7 +190,7 @@ declare const Select: {
|
|
|
190
190
|
* </Select.Content>
|
|
191
191
|
* </Select.Root>
|
|
192
192
|
*/
|
|
193
|
-
readonly Label: react.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
193
|
+
readonly Label: _$react.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & _$react.RefAttributes<HTMLDivElement>, "ref"> & _$react.RefAttributes<HTMLDivElement>>;
|
|
194
194
|
/**
|
|
195
195
|
* Used to visually separate items or groups of items in the select content.
|
|
196
196
|
*
|
|
@@ -217,10 +217,10 @@ declare const Select: {
|
|
|
217
217
|
* </Select.Content>
|
|
218
218
|
* </Select.Root>
|
|
219
219
|
*/
|
|
220
|
-
readonly Separator: react.ForwardRefExoticComponent<Omit<Omit<react.ClassAttributes<HTMLDivElement> & react.HTMLAttributes<HTMLDivElement> & WithAsChild & {
|
|
220
|
+
readonly Separator: _$react.ForwardRefExoticComponent<Omit<Omit<_$react.ClassAttributes<HTMLDivElement> & _$react.HTMLAttributes<HTMLDivElement> & WithAsChild & {
|
|
221
221
|
orientation?: "horizontal" | "vertical";
|
|
222
222
|
semantic?: boolean;
|
|
223
|
-
}, "ref"> & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
223
|
+
}, "ref"> & _$react.RefAttributes<HTMLDivElement>, "ref"> & _$react.RefAttributes<HTMLDivElement>>;
|
|
224
224
|
/**
|
|
225
225
|
* The button that toggles the select. The Select.Content will position itself adjacent to the trigger.
|
|
226
226
|
*
|
|
@@ -240,7 +240,7 @@ declare const Select: {
|
|
|
240
240
|
* </Select.Root>
|
|
241
241
|
* ```
|
|
242
242
|
*/
|
|
243
|
-
readonly Trigger: react.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & react.RefAttributes<HTMLButtonElement>, "ref"> & WithAriaInvalid & WithValidation & react.RefAttributes<HTMLButtonElement>>;
|
|
243
|
+
readonly Trigger: _$react.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & _$react.RefAttributes<HTMLButtonElement>, "ref"> & WithAriaInvalid & WithValidation & _$react.RefAttributes<HTMLButtonElement>>;
|
|
244
244
|
/**
|
|
245
245
|
* The part that reflects the selected value. By default the selected item's text will be rendered. if you require more control, you can instead control the select and pass your own children. It should not be styled to ensure correct positioning. An optional placeholder prop is also available for when the select has no value.
|
|
246
246
|
*
|
|
@@ -258,8 +258,8 @@ declare const Select: {
|
|
|
258
258
|
* </Select.Content>
|
|
259
259
|
* </Select.Root>
|
|
260
260
|
*/
|
|
261
|
-
readonly Value: react.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & react.RefAttributes<HTMLSpanElement>>;
|
|
261
|
+
readonly Value: _$react.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & _$react.RefAttributes<HTMLSpanElement>>;
|
|
262
262
|
};
|
|
263
263
|
//#endregion
|
|
264
264
|
export { Select as t };
|
|
265
|
-
//# sourceMappingURL=select-
|
|
265
|
+
//# sourceMappingURL=select-DJmjfGjt.d.ts.map
|
package/dist/select.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Select } from "./select-
|
|
1
|
+
import { t as Select } from "./select-DJmjfGjt.js";
|
|
2
2
|
export { Select };
|
package/dist/separator.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as WithAsChild } from "./as-child-CRRsxi3Y.js";
|
|
2
|
-
import * as react from "react";
|
|
2
|
+
import * as _$react from "react";
|
|
3
3
|
import { ComponentProps, HTMLAttributes } from "react";
|
|
4
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
5
|
|
|
6
6
|
//#region src/components/separator/separator.d.ts
|
|
7
7
|
declare const orientations: readonly ["horizontal", "vertical"];
|
|
@@ -37,7 +37,7 @@ declare const HorizontalSeparatorGroup: {
|
|
|
37
37
|
children,
|
|
38
38
|
asChild,
|
|
39
39
|
...props
|
|
40
|
-
}: HTMLAttributes<HTMLDivElement> & WithAsChild): react_jsx_runtime0.JSX.Element;
|
|
40
|
+
}: HTMLAttributes<HTMLDivElement> & WithAsChild): _$react_jsx_runtime0.JSX.Element;
|
|
41
41
|
displayName: string;
|
|
42
42
|
};
|
|
43
43
|
type SeparatorProps = ComponentProps<"div"> & WithAsChild & {
|
|
@@ -76,7 +76,7 @@ type SeparatorProps = ComponentProps<"div"> & WithAsChild & {
|
|
|
76
76
|
* </div>
|
|
77
77
|
* ```
|
|
78
78
|
*/
|
|
79
|
-
declare const Separator: react.ForwardRefExoticComponent<Omit<SeparatorProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
79
|
+
declare const Separator: _$react.ForwardRefExoticComponent<Omit<SeparatorProps, "ref"> & _$react.RefAttributes<HTMLDivElement>>;
|
|
80
80
|
//#endregion
|
|
81
81
|
export { HorizontalSeparatorGroup, Separator };
|
|
82
82
|
//# sourceMappingURL=separator.d.ts.map
|
package/dist/sheet.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { t as Root } from "./primitive-
|
|
2
|
-
import { n as IconButtonProps } from "./icon-button-
|
|
3
|
-
import * as react from "react";
|
|
1
|
+
import { t as Root } from "./primitive-BqLYh79k.js";
|
|
2
|
+
import { n as IconButtonProps } from "./icon-button-gO-7F_MZ.js";
|
|
3
|
+
import * as _$react from "react";
|
|
4
4
|
import { HTMLAttributes } from "react";
|
|
5
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
6
6
|
import { VariantProps } from "class-variance-authority";
|
|
7
|
-
import * as _radix_ui_react_dialog0 from "@radix-ui/react-dialog";
|
|
8
|
-
import * as class_variance_authority_types0 from "class-variance-authority/types";
|
|
7
|
+
import * as _$_radix_ui_react_dialog0 from "@radix-ui/react-dialog";
|
|
8
|
+
import * as _$class_variance_authority_types0 from "class-variance-authority/types";
|
|
9
9
|
|
|
10
10
|
//#region src/components/sheet/sheet.d.ts
|
|
11
11
|
type SheetCloseIconButtonProps = Partial<Omit<IconButtonProps, "icon">>;
|
|
@@ -152,7 +152,7 @@ declare const Sheet: {
|
|
|
152
152
|
* </Sheet.TitleGroup>
|
|
153
153
|
* ```
|
|
154
154
|
*/
|
|
155
|
-
readonly Actions: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & react.RefAttributes<HTMLDivElement>>;
|
|
155
|
+
readonly Actions: _$react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & _$react.RefAttributes<HTMLDivElement>>;
|
|
156
156
|
/**
|
|
157
157
|
* The body container for a `Sheet`. This is where you would typically place the main content of the sheet, such as forms or text.
|
|
158
158
|
* Should be rendered as a child of `Sheet.Content`.
|
|
@@ -180,7 +180,7 @@ declare const Sheet: {
|
|
|
180
180
|
({
|
|
181
181
|
className,
|
|
182
182
|
...props
|
|
183
|
-
}: HTMLAttributes<HTMLDivElement>): react_jsx_runtime0.JSX.Element;
|
|
183
|
+
}: HTMLAttributes<HTMLDivElement>): _$react_jsx_runtime0.JSX.Element;
|
|
184
184
|
displayName: string;
|
|
185
185
|
};
|
|
186
186
|
/**
|
|
@@ -199,7 +199,7 @@ declare const Sheet: {
|
|
|
199
199
|
* </Sheet.Footer>
|
|
200
200
|
* ```
|
|
201
201
|
*/
|
|
202
|
-
readonly Close: react.ForwardRefExoticComponent<_radix_ui_react_dialog0.DialogCloseProps & react.RefAttributes<HTMLButtonElement>>;
|
|
202
|
+
readonly Close: _$react.ForwardRefExoticComponent<_$_radix_ui_react_dialog0.DialogCloseProps & _$react.RefAttributes<HTMLButtonElement>>;
|
|
203
203
|
/**
|
|
204
204
|
* An icon button that closes the `Sheet` when clicked.
|
|
205
205
|
* Should be rendered within the `Sheet.Header` as a child of `Sheet.Actions`.
|
|
@@ -225,7 +225,7 @@ declare const Sheet: {
|
|
|
225
225
|
label,
|
|
226
226
|
appearance,
|
|
227
227
|
...props
|
|
228
|
-
}: SheetCloseIconButtonProps): react_jsx_runtime0.JSX.Element;
|
|
228
|
+
}: SheetCloseIconButtonProps): _$react_jsx_runtime0.JSX.Element;
|
|
229
229
|
displayName: string;
|
|
230
230
|
};
|
|
231
231
|
/**
|
|
@@ -259,9 +259,9 @@ declare const Sheet: {
|
|
|
259
259
|
* </Sheet.Root>
|
|
260
260
|
* ```
|
|
261
261
|
*/
|
|
262
|
-
readonly Content: react.ForwardRefExoticComponent<Omit<Omit<_radix_ui_react_dialog0.DialogContentProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>, "ref"> & VariantProps<(props?: ({
|
|
262
|
+
readonly Content: _$react.ForwardRefExoticComponent<Omit<Omit<_$_radix_ui_react_dialog0.DialogContentProps & _$react.RefAttributes<HTMLDivElement>, "ref"> & _$react.RefAttributes<HTMLDivElement>, "ref"> & VariantProps<(props?: ({
|
|
263
263
|
side?: "left" | "right" | null | undefined;
|
|
264
|
-
} & class_variance_authority_types0.ClassProp) | undefined) => string> & {
|
|
264
|
+
} & _$class_variance_authority_types0.ClassProp) | undefined) => string> & {
|
|
265
265
|
/**
|
|
266
266
|
* The preferred width of the `Sheet.Content` as a tailwind `max-w-` class.
|
|
267
267
|
*
|
|
@@ -272,7 +272,7 @@ declare const Sheet: {
|
|
|
272
272
|
* @default `sm:max-w-[30rem]`
|
|
273
273
|
*/
|
|
274
274
|
preferredWidth?: `sm:max-w-${string}`;
|
|
275
|
-
} & react.RefAttributes<HTMLDivElement>>;
|
|
275
|
+
} & _$react.RefAttributes<HTMLDivElement>>;
|
|
276
276
|
/**
|
|
277
277
|
* A description for a sheet. Typically rendered as a child of `Sheet.Header`.
|
|
278
278
|
*
|
|
@@ -293,7 +293,7 @@ declare const Sheet: {
|
|
|
293
293
|
* </Sheet.Header>
|
|
294
294
|
* ```
|
|
295
295
|
*/
|
|
296
|
-
readonly Description: react.ForwardRefExoticComponent<Omit<Omit<_radix_ui_react_dialog0.DialogDescriptionProps & react.RefAttributes<HTMLParagraphElement>, "ref"> & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
296
|
+
readonly Description: _$react.ForwardRefExoticComponent<Omit<Omit<_$_radix_ui_react_dialog0.DialogDescriptionProps & _$react.RefAttributes<HTMLParagraphElement>, "ref"> & _$react.RefAttributes<HTMLDivElement>, "ref"> & _$react.RefAttributes<HTMLDivElement>>;
|
|
297
297
|
/**
|
|
298
298
|
* The footer container for a `Sheet`. This is where you would typically place close and submit buttons.
|
|
299
299
|
* Should be rendered as a child of `Sheet.Content`.
|
|
@@ -329,7 +329,7 @@ declare const Sheet: {
|
|
|
329
329
|
({
|
|
330
330
|
className,
|
|
331
331
|
...props
|
|
332
|
-
}: HTMLAttributes<HTMLDivElement>): react_jsx_runtime0.JSX.Element;
|
|
332
|
+
}: HTMLAttributes<HTMLDivElement>): _$react_jsx_runtime0.JSX.Element;
|
|
333
333
|
displayName: string;
|
|
334
334
|
};
|
|
335
335
|
/**
|
|
@@ -359,7 +359,7 @@ declare const Sheet: {
|
|
|
359
359
|
({
|
|
360
360
|
className,
|
|
361
361
|
...props
|
|
362
|
-
}: HTMLAttributes<HTMLDivElement>): react_jsx_runtime0.JSX.Element;
|
|
362
|
+
}: HTMLAttributes<HTMLDivElement>): _$react_jsx_runtime0.JSX.Element;
|
|
363
363
|
displayName: string;
|
|
364
364
|
};
|
|
365
365
|
/**
|
|
@@ -380,7 +380,7 @@ declare const Sheet: {
|
|
|
380
380
|
* </Sheet.Header>
|
|
381
381
|
* ```
|
|
382
382
|
*/
|
|
383
|
-
readonly Title: react.ForwardRefExoticComponent<Omit<_radix_ui_react_dialog0.DialogTitleProps & react.RefAttributes<HTMLHeadingElement>, "ref"> & react.RefAttributes<HTMLHeadingElement>>;
|
|
383
|
+
readonly Title: _$react.ForwardRefExoticComponent<Omit<_$_radix_ui_react_dialog0.DialogTitleProps & _$react.RefAttributes<HTMLHeadingElement>, "ref"> & _$react.RefAttributes<HTMLHeadingElement>>;
|
|
384
384
|
/**
|
|
385
385
|
* A group container for the title and actions of a sheet. Typically rendered as a child of `Sheet.Header`.
|
|
386
386
|
*
|
|
@@ -398,7 +398,7 @@ declare const Sheet: {
|
|
|
398
398
|
* </Sheet.Header>
|
|
399
399
|
* ```
|
|
400
400
|
*/
|
|
401
|
-
readonly TitleGroup: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & react.RefAttributes<HTMLDivElement>>;
|
|
401
|
+
readonly TitleGroup: _$react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & _$react.RefAttributes<HTMLDivElement>>;
|
|
402
402
|
/**
|
|
403
403
|
* The button trigger for a `Sheet`. Should be rendered as a child of the `Sheet` component.
|
|
404
404
|
* Renders an unstyled button by default, but can be customized with the `asChild` prop.
|
|
@@ -419,7 +419,7 @@ declare const Sheet: {
|
|
|
419
419
|
* </Sheet.Root>
|
|
420
420
|
* ```
|
|
421
421
|
*/
|
|
422
|
-
readonly Trigger: react.ForwardRefExoticComponent<_radix_ui_react_dialog0.DialogTriggerProps & react.RefAttributes<HTMLButtonElement>>;
|
|
422
|
+
readonly Trigger: _$react.ForwardRefExoticComponent<_$_radix_ui_react_dialog0.DialogTriggerProps & _$react.RefAttributes<HTMLButtonElement>>;
|
|
423
423
|
};
|
|
424
424
|
//#endregion
|
|
425
425
|
export { Sheet };
|
package/dist/sheet.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t as e}from"./cx-D1HYnpvA.js";import{t}from"./icon-button-
|
|
1
|
+
import{t as e}from"./cx-D1HYnpvA.js";import{t}from"./icon-button-CxxVPiKp.js";import{a as n,c as r,i,n as a,o,r as s,s as c,t as l}from"./primitive-pggbsddf.js";import{forwardRef as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";import{XIcon as p}from"@phosphor-icons/react/X";import{cva as m}from"class-variance-authority";const h=o;h.displayName=`Sheet`;const g=r;g.displayName=`SheetTrigger`;const _=l;_.displayName=`SheetClose`;const v=n;v.displayName=`SheetPortal`;const y=u(({className:t,...n},r)=>d(i,{className: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-40 backdrop-blur-xs`,t),...n,ref:r}));y.displayName=i.displayName;const b=m(`bg-dialog border-dialog inset-y-0 h-full w-full fixed z-40 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`}}),x=u(({children:t,className:n,preferredWidth:r=`sm:max-w-[30rem]`,side:i=`right`,...o},s)=>f(v,{children:[d(y,{}),d(a,{"data-mantle-modal-content":!0,className:e(b({side:i}),r,n),ref:s,...o,children:t})]}));x.displayName=a.displayName;const S=({size:e=`md`,type:n=`button`,label:r=`Close Sheet`,appearance:i=`ghost`,...a})=>d(l,{asChild:!0,children:d(t,{appearance:i,icon:d(p,{}),label:r,size:e,type:n,...a})});S.displayName=`SheetCloseIconButton`;const C=({className:t,...n})=>d(`div`,{className:e(`scrollbar text-body flex-1 overflow-y-auto p-6`,t),...n});C.displayName=`SheetBody`;const w=({className:t,...n})=>d(`div`,{className:e(`border-dialog-muted flex shrink-0 flex-col gap-2 border-b py-4 pl-6 pr-4`,`has-[.icon-button]:pr-4`,t),...n});w.displayName=`SheetHeader`;const T=({className:t,...n})=>d(`div`,{className:e(`border-dialog-muted flex shrink-0 justify-end gap-2 border-t px-6 py-2.5`,t),...n});T.displayName=`SheetFooter`;const E=u(({className:t,...n},r)=>d(c,{ref:r,className:e(`text-strong flex-1 truncate text-lg font-medium`,t),...n}));E.displayName=c.displayName;const D=u(({children:t,className:n,...r},i)=>d(`div`,{className:e(`flex items-center justify-between gap-2`,n),...r,ref:i,children:t}));D.displayName=`SheetTitleGroup`;const O=u(({className:t,...n},r)=>d(s,{ref:r,className:e(`text-body text-sm`,t),...n}));O.displayName=s.displayName;const k=u(({children:t,className:n,...r},i)=>d(`div`,{className:e(`flex h-full items-center gap-2`,n),...r,ref:i,children:t}));k.displayName=`SheetActions`;const A={Root:h,Actions:k,Body:C,Close:_,CloseIconButton:S,Content:x,Description:O,Footer:T,Header:w,Title:E,TitleGroup:D,Trigger:g};export{A as Sheet};
|
|
2
2
|
//# sourceMappingURL=sheet.js.map
|
package/dist/skeleton.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as react from "react";
|
|
1
|
+
import * as _$react from "react";
|
|
2
2
|
|
|
3
3
|
//#region src/components/skeleton/skeleton.d.ts
|
|
4
4
|
/**
|
|
@@ -19,13 +19,13 @@ import * as react from "react";
|
|
|
19
19
|
* <Skeleton className="h-12 w-12 rounded-full" />
|
|
20
20
|
* ```
|
|
21
21
|
*/
|
|
22
|
-
declare const Skeleton: react.ForwardRefExoticComponent<(Omit<react.ClassAttributes<HTMLDivElement> & react.HTMLAttributes<HTMLDivElement> & {
|
|
22
|
+
declare const Skeleton: _$react.ForwardRefExoticComponent<(Omit<_$react.ClassAttributes<HTMLDivElement> & _$react.HTMLAttributes<HTMLDivElement> & {
|
|
23
23
|
asChild: true;
|
|
24
|
-
children: react.ReactNode;
|
|
25
|
-
}, "ref"> | Omit<react.ClassAttributes<HTMLDivElement> & react.HTMLAttributes<HTMLDivElement> & {
|
|
24
|
+
children: _$react.ReactNode;
|
|
25
|
+
}, "ref"> | Omit<_$react.ClassAttributes<HTMLDivElement> & _$react.HTMLAttributes<HTMLDivElement> & {
|
|
26
26
|
asChild?: false | undefined;
|
|
27
27
|
children?: undefined;
|
|
28
|
-
}, "ref">) & react.RefAttributes<HTMLDivElement>>;
|
|
28
|
+
}, "ref">) & _$react.RefAttributes<HTMLDivElement>>;
|
|
29
29
|
//#endregion
|
|
30
30
|
export { Skeleton };
|
|
31
31
|
//# sourceMappingURL=skeleton.d.ts.map
|
package/dist/slider.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentProps } from "react";
|
|
2
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
4
4
|
|
|
5
5
|
//#region src/components/slider/slider.d.ts
|
|
@@ -93,7 +93,7 @@ declare function Slider({
|
|
|
93
93
|
showTicks,
|
|
94
94
|
value,
|
|
95
95
|
...props
|
|
96
|
-
}: SliderProps): react_jsx_runtime0.JSX.Element;
|
|
96
|
+
}: SliderProps): _$react_jsx_runtime0.JSX.Element;
|
|
97
97
|
//#endregion
|
|
98
98
|
export { Slider, type SliderProps };
|
|
99
99
|
//# sourceMappingURL=slider.d.ts.map
|