myoperator-ui 0.0.188-beta.1 → 0.0.189
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/index.js +15 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8188,16 +8188,25 @@ export const AutoPaySetup = React.forwardRef<HTMLDivElement, AutoPaySetupProps>(
|
|
|
8188
8188
|
loading = false,
|
|
8189
8189
|
disabled = false,
|
|
8190
8190
|
defaultOpen = true,
|
|
8191
|
+
open,
|
|
8192
|
+
onOpenChange,
|
|
8191
8193
|
className,
|
|
8192
8194
|
},
|
|
8193
8195
|
ref
|
|
8194
8196
|
) => {
|
|
8197
|
+
const isControlled = open !== undefined;
|
|
8198
|
+
|
|
8195
8199
|
return (
|
|
8196
8200
|
<div ref={ref} className={cn("w-full", className)}>
|
|
8197
8201
|
<Accordion
|
|
8198
8202
|
type="single"
|
|
8199
8203
|
variant="bordered"
|
|
8200
|
-
|
|
8204
|
+
{...(isControlled
|
|
8205
|
+
? {
|
|
8206
|
+
value: open ? ["auto-pay-setup"] : [],
|
|
8207
|
+
onValueChange: (val) => onOpenChange?.(val.length > 0),
|
|
8208
|
+
}
|
|
8209
|
+
: { defaultValue: defaultOpen ? ["auto-pay-setup"] : [] })}
|
|
8201
8210
|
>
|
|
8202
8211
|
<AccordionItem value="auto-pay-setup">
|
|
8203
8212
|
<AccordionTrigger className="px-4 py-4">
|
|
@@ -8306,8 +8315,12 @@ export interface AutoPaySetupProps {
|
|
|
8306
8315
|
disabled?: boolean;
|
|
8307
8316
|
|
|
8308
8317
|
// Accordion
|
|
8309
|
-
/** Whether the accordion is open by default */
|
|
8318
|
+
/** Whether the accordion is open by default (uncontrolled) */
|
|
8310
8319
|
defaultOpen?: boolean;
|
|
8320
|
+
/** Controlled open state \u2014 use with onOpenChange for exclusive accordion behavior */
|
|
8321
|
+
open?: boolean;
|
|
8322
|
+
/** Callback fired when the panel is toggled \u2014 receives new open state */
|
|
8323
|
+
onOpenChange?: (open: boolean) => void;
|
|
8311
8324
|
|
|
8312
8325
|
// Styling
|
|
8313
8326
|
/** Additional className for the root element */
|