+ }
}
const admonitionToAlertMapping: Record<
@@ -113,17 +117,29 @@ export const Admonition = forwardRef<
{label || title ? (
<>
{label || title}
- {description && {description}}
+ {description && (
+
+ {description}
+
+ )}
{/* // children is to handle Docs and MDX issues with children and elements */}
{children && (
-
+
{children}
)}
diff --git a/packages/ui-patterns/form/Layout/FormLayout.tsx b/packages/ui-patterns/form/Layout/FormLayout.tsx
index cd0f95b2f06..713ab2a026e 100644
--- a/packages/ui-patterns/form/Layout/FormLayout.tsx
+++ b/packages/ui-patterns/form/Layout/FormLayout.tsx
@@ -26,7 +26,7 @@ type Props = {
name?: string
}
-const ContainerVariants = cva('grid gap-2', {
+const ContainerVariants = cva('relative grid gap-2', {
variants: {
size: {
tiny: 'text-xs',
diff --git a/packages/ui-patterns/multi-select/multi-select.tsx b/packages/ui-patterns/multi-select/multi-select.tsx
index a993f9a9e37..9c99c467001 100644
--- a/packages/ui-patterns/multi-select/multi-select.tsx
+++ b/packages/ui-patterns/multi-select/multi-select.tsx
@@ -43,6 +43,7 @@ type MultiSelectorProps = {
values: string[]
onValuesChange: (value: string[]) => void
loop?: boolean
+ disabled?: boolean
} & React.ComponentPropsWithoutRef &
VariantProps
@@ -56,6 +57,7 @@ interface MultiSelectContextProps {
activeIndex: number
setActiveIndex: React.Dispatch>
size: MultiSelectorProps['size']
+ disabled?: boolean
}
const MultiSelectContext = createContext(null)
@@ -76,6 +78,7 @@ const MultiSelector = ({
children,
dir,
size = 'small',
+ disabled,
...props
}: MultiSelectorProps) => {
const [inputValue, setInputValue] = useState('')
@@ -154,6 +157,7 @@ const MultiSelector = ({
activeIndex,
setActiveIndex,
size: size || 'small',
+ disabled,
}}
>
(
({ className, children, ...props }, ref) => {
- const { value, onValueChange, activeIndex, size } = useMultiSelect()
+ const { value, onValueChange, activeIndex, size, disabled } = useMultiSelect()
const mousePreventDefault = useCallback((e: React.MouseEvent) => {
e.preventDefault()
@@ -214,6 +218,7 @@ const MultiSelectorTrigger = forwardRef(
ref={ref}
className={cn(
'flex flex-wrap gap-1 border border-control bg-foreground/[.026] rounded-lg px-1',
+ disabled && 'cursor-not-allowed opacity-50',
className
)}
{...props}
@@ -264,7 +269,8 @@ const MultiSelectorInput = forwardRef<
React.ElementRef,
React.ComponentPropsWithoutRef
>(({ className, ...props }, ref) => {
- const { setOpen, inputValue, setInputValue, activeIndex, setActiveIndex, size } = useMultiSelect()
+ const { setOpen, inputValue, setInputValue, activeIndex, setActiveIndex, size, disabled } =
+ useMultiSelect()
return (
setOpen(false)}
onFocus={() => setOpen(true)}
onClick={() => setActiveIndex(-1)}
+ disabled={disabled}
className={cn(
MultiSelectorInputVariants({ size }),
'text-sm bg-transparent border-none outline-none placeholder:text-foreground-muted flex-1',