diff --git a/frameworks/react/src/components/collapsible/use-collapsible.ts b/frameworks/react/src/components/collapsible/use-collapsible.ts index ae05608205..dc48f76eb9 100644 --- a/frameworks/react/src/components/collapsible/use-collapsible.ts +++ b/frameworks/react/src/components/collapsible/use-collapsible.ts @@ -10,7 +10,8 @@ export interface UseCollapsibleProps extends Optional, 'id'>, RenderStrategyProps { /** - * The initial open state of the collpasible. + * The initial open state of the collapsible when it is first rendered. + * Use when you do not need to control its open state. */ defaultOpen?: collapsible.Context['open'] } @@ -30,7 +31,7 @@ export const useCollapsible = (props: UseCollapsibleProps = {}): UseCollapsibleR id: useId(), getRootNode: useEnvironmentContext(), ...props, - open: props.defaultOpen ?? props.open, + open: props.open ?? props.defaultOpen, 'open.controlled': props.open !== undefined, } diff --git a/frameworks/react/src/components/color-picker/color-picker-root.tsx b/frameworks/react/src/components/color-picker/color-picker-root.tsx index 13064b33b9..57c6a446f5 100644 --- a/frameworks/react/src/components/color-picker/color-picker-root.tsx +++ b/frameworks/react/src/components/color-picker/color-picker-root.tsx @@ -22,6 +22,7 @@ export const ColorPickerRoot = forwardRef( colorPickerProps, [ 'closeOnSelect', + 'defaultOpen', 'defaultValue', 'disabled', 'format', diff --git a/frameworks/react/src/components/color-picker/use-color-picker.ts b/frameworks/react/src/components/color-picker/use-color-picker.ts index 5a0a60ff20..1af3a9d060 100644 --- a/frameworks/react/src/components/color-picker/use-color-picker.ts +++ b/frameworks/react/src/components/color-picker/use-color-picker.ts @@ -10,6 +10,11 @@ export interface UseColorPickerProps Omit, 'id' > { + /** + * The initial open state of the color picker when it is first rendered. + * Use when you do not need to control its open state. + */ + defaultOpen?: colorPicker.Context['open'] /** * The initial value of the color picker. */ @@ -28,6 +33,7 @@ export const useColorPicker = (props: UseColorPickerProps): UseColorPickerReturn getRootNode: useEnvironmentContext(), ...props, value: props.defaultValue ? colorPicker.parse(props.defaultValue) : undefined, + open: props.open ?? props.defaultOpen, 'open.controlled': props.open !== undefined, } diff --git a/frameworks/react/src/components/combobox/combobox-root.tsx b/frameworks/react/src/components/combobox/combobox-root.tsx index df5e268341..47f8c64984 100644 --- a/frameworks/react/src/components/combobox/combobox-root.tsx +++ b/frameworks/react/src/components/combobox/combobox-root.tsx @@ -25,6 +25,7 @@ const ComboboxImpl = ( 'allowCustomValue', 'autoFocus', 'closeOnSelect', + 'defaultOpen', 'defaultValue', 'disabled', 'dismissable', diff --git a/frameworks/react/src/components/combobox/use-combobox.ts b/frameworks/react/src/components/combobox/use-combobox.ts index 582d7497ae..36b99c156a 100644 --- a/frameworks/react/src/components/combobox/use-combobox.ts +++ b/frameworks/react/src/components/combobox/use-combobox.ts @@ -13,6 +13,11 @@ export interface UseComboboxProps Omit, 'dir' | 'getRootNode' | 'collection' | 'open.controlled'>, 'id' > { + /** + * The initial open state of the combobox when it is first rendered. + * Use when you do not need to control its open state. + */ + defaultOpen?: combobox.Context['open'] /** * the initial value of the combobox */ @@ -43,6 +48,7 @@ export const useCombobox = ( collection, ...comboboxProps, value: props.defaultValue, + open: props.open ?? props.defaultOpen, 'open.controlled': props.open !== undefined, } diff --git a/frameworks/react/src/components/date-picker/date-picker-root.tsx b/frameworks/react/src/components/date-picker/date-picker-root.tsx index af88453b30..301f453291 100644 --- a/frameworks/react/src/components/date-picker/date-picker-root.tsx +++ b/frameworks/react/src/components/date-picker/date-picker-root.tsx @@ -20,6 +20,7 @@ export const DatePickerRoot = forwardRef((p const [presenceProps, datePickerProps] = splitPresenceProps(props) const [useDatePickerProps, localProps] = createSplitProps()(datePickerProps, [ 'closeOnSelect', + 'defaultOpen', 'defaultValue', 'disabled', 'fixedWeeks', diff --git a/frameworks/react/src/components/date-picker/use-date-picker.ts b/frameworks/react/src/components/date-picker/use-date-picker.ts index 029eb9eca2..a64fa8583d 100644 --- a/frameworks/react/src/components/date-picker/use-date-picker.ts +++ b/frameworks/react/src/components/date-picker/use-date-picker.ts @@ -13,6 +13,11 @@ export interface UseDatePickerProps >, 'id' > { + /** + * The initial open state of the date picker when it is first rendered. + * Use when you do not need to control its open state. + */ + defaultOpen?: datePicker.Context['open'] /** * The initial value of the date picker */ @@ -46,6 +51,7 @@ export const useDatePicker = (props: UseDatePickerProps = {}): UseDatePickerRetu value: props.defaultValue ? datePicker.parse(props.defaultValue) : undefined, max: props.max ? datePicker.parse(props.max) : undefined, min: props.min ? datePicker.parse(props.min) : undefined, + open: props.open ?? props.defaultOpen, 'open.controlled': props.open !== undefined, } diff --git a/frameworks/react/src/components/dialog/use-dialog.ts b/frameworks/react/src/components/dialog/use-dialog.ts index be4c530828..08519836c5 100644 --- a/frameworks/react/src/components/dialog/use-dialog.ts +++ b/frameworks/react/src/components/dialog/use-dialog.ts @@ -7,7 +7,8 @@ import { useEvent } from '../../utils/use-event' export interface UseDialogProps extends Omit, 'open.controlled'> { /** - * The initial open state of the dialog. + * The initial open state of the dialog when it is first rendered. + * Use when you do not need to control its open state. */ defaultOpen?: dialog.Context['open'] } @@ -19,7 +20,7 @@ export const useDialog = (props: UseDialogProps = {}): UseDialogReturn => { id: useId(), getRootNode: useEnvironmentContext(), ...props, - open: props.defaultOpen ?? props.open, + open: props.open ?? props.defaultOpen, 'open.controlled': props.open !== undefined, } diff --git a/frameworks/react/src/components/hover-card/use-hover-card.ts b/frameworks/react/src/components/hover-card/use-hover-card.ts index 469a74f4e5..3263bed2b7 100644 --- a/frameworks/react/src/components/hover-card/use-hover-card.ts +++ b/frameworks/react/src/components/hover-card/use-hover-card.ts @@ -8,7 +8,8 @@ import { useEvent } from '../../utils/use-event' export interface UseHoverCardProps extends Omit, 'open.controlled'> { /** - * The initial open state of the hover card. + * The initial open state of the hover card when it is first rendered. + * Use when you do not need to control its open state. */ defaultOpen?: hoverCard.Context['open'] } @@ -20,7 +21,7 @@ export const useHoverCard = (props: UseHoverCardProps = {}): UseHoverCardReturn id: useId(), getRootNode: useEnvironmentContext(), ...props, - open: props.defaultOpen ?? props.open, + open: props.open ?? props.defaultOpen, 'open.controlled': props.open !== undefined, } diff --git a/frameworks/react/src/components/menu/menu-root.tsx b/frameworks/react/src/components/menu/menu-root.tsx index 8b11757c22..ce21a822a8 100644 --- a/frameworks/react/src/components/menu/menu-root.tsx +++ b/frameworks/react/src/components/menu/menu-root.tsx @@ -23,6 +23,7 @@ export const MenuRoot = (props: MenuRootProps) => { 'anchorPoint', 'aria-label', 'closeOnSelect', + 'defaultOpen', 'highlightedValue', 'id', 'ids', diff --git a/frameworks/react/src/components/menu/use-menu.ts b/frameworks/react/src/components/menu/use-menu.ts index 2593d0c653..0aea19ff8b 100644 --- a/frameworks/react/src/components/menu/use-menu.ts +++ b/frameworks/react/src/components/menu/use-menu.ts @@ -6,7 +6,13 @@ import type { Optional } from '../../types' import { useEvent } from '../../utils/use-event' export interface UseMenuProps - extends Optional, 'id'> {} + extends Optional, 'id'> { + /** + * The initial open state of the menu when it is first rendered. + * Use when you do not need to control its open state. + */ + defaultOpen?: menu.Context['open'] +} export interface UseMenuReturn { machine: menu.Service api: menu.Api @@ -19,6 +25,7 @@ export const useMenu = (props: UseMenuProps = {}): UseMenuReturn => { ...props, onOpenChange: useEvent(props.onOpenChange), onSelect: useEvent(props.onSelect), + open: props.open ?? props.defaultOpen, 'open.controlled': props.open !== undefined, } diff --git a/frameworks/react/src/components/popover/use-popover.ts b/frameworks/react/src/components/popover/use-popover.ts index 6fe9427111..8e0097e6ef 100644 --- a/frameworks/react/src/components/popover/use-popover.ts +++ b/frameworks/react/src/components/popover/use-popover.ts @@ -7,7 +7,8 @@ import { useEvent } from '../../utils/use-event' export interface UsePopoverProps extends Omit, 'open.controlled'> { /** - * The initial open state of the popover. + * The initial open state of the popover when it is first rendered. + * Use when you do not need to control its open state. */ defaultOpen?: popover.Context['open'] } @@ -19,7 +20,7 @@ export const usePopover = (props: UsePopoverProps = {}): UsePopoverReturn => { id: useId(), getRootNode: useEnvironmentContext(), ...props, - open: props.defaultOpen ?? props.open, + open: props.open ?? props.defaultOpen, 'open.controlled': props.open !== undefined, } diff --git a/frameworks/react/src/components/select/select-root.tsx b/frameworks/react/src/components/select/select-root.tsx index 269b350f12..a1abb3f727 100644 --- a/frameworks/react/src/components/select/select-root.tsx +++ b/frameworks/react/src/components/select/select-root.tsx @@ -23,6 +23,7 @@ const SelectImpl = ( const [presenceProps, selectProps] = splitPresenceProps(props) const [useSelectProps, localProps] = createSplitProps>()(selectProps, [ 'closeOnSelect', + 'defaultOpen', 'defaultValue', 'disabled', 'form', diff --git a/frameworks/react/src/components/select/use-select.ts b/frameworks/react/src/components/select/use-select.ts index ee559319f7..5279b08179 100644 --- a/frameworks/react/src/components/select/use-select.ts +++ b/frameworks/react/src/components/select/use-select.ts @@ -13,6 +13,11 @@ export interface UseSelectProps Omit, 'collection' | 'dir' | 'getRootNode' | 'open.controlled'>, 'id' > { + /** + * The initial open state of the select when it is first rendered. + * Use when you do not need to control its open state. + */ + defaultOpen?: select.Context['open'] /** * The initial value of the select. */ @@ -43,6 +48,7 @@ export const useSelect = ( collection, ...rest, value: props.defaultValue, + open: props.open ?? props.defaultOpen, 'open.controlled': props.open !== undefined, } diff --git a/frameworks/react/src/components/tooltip/use-tooltip.ts b/frameworks/react/src/components/tooltip/use-tooltip.ts index 3343d918e7..1a37223221 100644 --- a/frameworks/react/src/components/tooltip/use-tooltip.ts +++ b/frameworks/react/src/components/tooltip/use-tooltip.ts @@ -7,9 +7,10 @@ import { useEvent } from '../../utils/use-event' export interface UseTooltipProps extends Omit, 'open.controlled'> { /** - * The initial open state of the tooltip. + * The initial open state of the tooltip when it is first rendered. + * Use when you do not need to control its open state. */ - defaultOpen?: boolean + defaultOpen?: tooltip.Context['open'] } export interface UseTooltipReturn extends tooltip.Api {} @@ -19,7 +20,7 @@ export const useTooltip = (props: UseTooltipProps): UseTooltipReturn => { id: useId(), getRootNode: useEnvironmentContext(), ...props, - open: props.defaultOpen ?? props.open, + open: props.open ?? props.defaultOpen, 'open.controlled': props.open !== undefined, } diff --git a/frameworks/vue/src/components/collapsible/collapsible-root.vue b/frameworks/vue/src/components/collapsible/collapsible-root.vue index ea9abc2a12..3a00cfb1ac 100644 --- a/frameworks/vue/src/components/collapsible/collapsible-root.vue +++ b/frameworks/vue/src/components/collapsible/collapsible-root.vue @@ -10,7 +10,10 @@ import { ark, type PolymorphicProps } from '../factory' import { useCollapsible } from './use-collapsible' import { CollapsibleProvider } from './use-collapsible-context' -const props = withDefaults(defineProps(), { open: undefined }) +const props = withDefaults(defineProps(), { + defaultOpen: undefined, + open: undefined, +}) const emits = defineEmits() const collapsible = useCollapsible(props, emits) diff --git a/frameworks/vue/src/components/collapsible/collapsible.types.ts b/frameworks/vue/src/components/collapsible/collapsible.types.ts index 77383b27dc..d4851f81f7 100644 --- a/frameworks/vue/src/components/collapsible/collapsible.types.ts +++ b/frameworks/vue/src/components/collapsible/collapsible.types.ts @@ -1,6 +1,11 @@ import type * as collapsible from '@zag-js/collapsible' export interface RootProps { + /** + * The initial open state of the collapsible when it is first rendered. + * Use when you do not need to control its open state. + */ + defaultOpen?: boolean /** * Whether the collapsible is disabled */ diff --git a/frameworks/vue/src/components/collapsible/use-collapsible.ts b/frameworks/vue/src/components/collapsible/use-collapsible.ts index 164246bdb3..719417342d 100644 --- a/frameworks/vue/src/components/collapsible/use-collapsible.ts +++ b/frameworks/vue/src/components/collapsible/use-collapsible.ts @@ -10,7 +10,11 @@ import type { RootEmits } from './collapsible.types' export interface UseCollapsibleProps extends RenderStrategyProps, Optional, 'id'> { - defaultOpen?: boolean + /** + * The initial open state of the collapsible when it is first rendered. + * Use when you do not need to control its open state. + */ + defaultOpen?: collapsible.Context['open'] } interface Collapsible extends collapsible.Api { @@ -34,8 +38,9 @@ export const useCollapsible = ( collapsible.machine({ ...context.value, id: context.value.id ?? useId().value, - getRootNode: env?.value.getRootNode, + open: props.open ?? props.defaultOpen, 'open.controlled': props.open !== undefined, + getRootNode: env?.value.getRootNode, onExitComplete: () => emits('exitComplete'), onOpenChange: (details) => { emits('openChange', details) diff --git a/frameworks/vue/src/components/color-picker/color-picker-root.vue b/frameworks/vue/src/components/color-picker/color-picker-root.vue index 96eb3c34d9..ba8623fcd2 100644 --- a/frameworks/vue/src/components/color-picker/color-picker-root.vue +++ b/frameworks/vue/src/components/color-picker/color-picker-root.vue @@ -13,7 +13,10 @@ import { ColorPickerProvider } from './use-color-picker-context' import { RenderStrategyPropsProvider } from '../../utils' import { computed } from 'vue' -const props = withDefaults(defineProps(), { open: undefined }) +const props = withDefaults(defineProps(), { + defaultOpen: undefined, + open: undefined, +}) const emits = defineEmits() const colorPicker = useColorPicker(props, emits) diff --git a/frameworks/vue/src/components/color-picker/color-picker.types.ts b/frameworks/vue/src/components/color-picker/color-picker.types.ts index bbe7654917..db917fa111 100644 --- a/frameworks/vue/src/components/color-picker/color-picker.types.ts +++ b/frameworks/vue/src/components/color-picker/color-picker.types.ts @@ -9,6 +9,11 @@ export interface RootProps { * The direction of the color picker */ dir?: 'ltr' | 'rtl' + /** + * The initial open state of the color picker when it is first rendered. + * Use when you do not need to control its open state. + */ + defaultOpen?: boolean /** * Whether the color picker is disabled */ diff --git a/frameworks/vue/src/components/color-picker/use-color-picker.ts b/frameworks/vue/src/components/color-picker/use-color-picker.ts index 5409fce13f..0a09f41e66 100644 --- a/frameworks/vue/src/components/color-picker/use-color-picker.ts +++ b/frameworks/vue/src/components/color-picker/use-color-picker.ts @@ -12,6 +12,10 @@ export interface UseColorPickerProps 'id' > { modelValue?: string + /** + * The initial open state of the color picker. + */ + defaultOpen?: colorPicker.Context['open'] } export interface UseColorPickerReturn extends ComputedRef> {} @@ -26,6 +30,7 @@ export const useColorPicker = ( return { ...rest, value: modelValue ? colorPicker.parse(modelValue) : undefined, + open: props.open ?? props.defaultOpen, 'open.controlled': props.open !== undefined, } }) diff --git a/frameworks/vue/src/components/combobox/combobox-root.vue b/frameworks/vue/src/components/combobox/combobox-root.vue index 09d40bf8f9..91feea8608 100644 --- a/frameworks/vue/src/components/combobox/combobox-root.vue +++ b/frameworks/vue/src/components/combobox/combobox-root.vue @@ -15,8 +15,9 @@ import { useCombobox } from './use-combobox' import { ComboboxProvider } from './use-combobox-context' const props = withDefaults(defineProps(), { - open: undefined, closeOnSelect: true, + defaultOpen: undefined, + open: undefined, }) const emits = defineEmits() diff --git a/frameworks/vue/src/components/combobox/combobox.types.ts b/frameworks/vue/src/components/combobox/combobox.types.ts index c99fbed800..4b60528413 100644 --- a/frameworks/vue/src/components/combobox/combobox.types.ts +++ b/frameworks/vue/src/components/combobox/combobox.types.ts @@ -14,6 +14,11 @@ export interface RootProps { * Whether to close the combobox when an item is selected. */ closeOnSelect?: boolean + /** + * The initial open state of the combobox when it is first rendered. + * Use when you do not need to control its open state. + */ + defaultOpen?: boolean /** * Whether the combobox is disabled */ diff --git a/frameworks/vue/src/components/combobox/use-combobox.ts b/frameworks/vue/src/components/combobox/use-combobox.ts index 7448223025..489b38a26d 100644 --- a/frameworks/vue/src/components/combobox/use-combobox.ts +++ b/frameworks/vue/src/components/combobox/use-combobox.ts @@ -14,7 +14,11 @@ export interface UseComboboxProps 'id' > { modelValue?: combobox.Context['value'] - defaultOpen?: boolean + /** + * The initial open state of the combobox when it is first rendered. + * Use when you do not need to control its open state. + */ + defaultOpen?: combobox.Context['open'] } export interface UseComboboxReturn @@ -39,8 +43,9 @@ export const useCombobox = ( combobox.machine({ ...context.value, id: context.value.id ?? useId().value, - getRootNode: env?.value.getRootNode, + open: props.open ?? props.defaultOpen, 'open.controlled': props.open !== undefined, + getRootNode: env?.value.getRootNode, onFocusOutside: (details) => emit('focusOutside', details), onHighlightChange: (details) => emit('highlightChange', details), onInputValueChange: (details) => emit('inputValueChange', details), diff --git a/frameworks/vue/src/components/date-picker/date-picker-root.vue b/frameworks/vue/src/components/date-picker/date-picker-root.vue index 08e16c79ca..f5cf3dfda0 100644 --- a/frameworks/vue/src/components/date-picker/date-picker-root.vue +++ b/frameworks/vue/src/components/date-picker/date-picker-root.vue @@ -15,8 +15,9 @@ import { useDatePicker } from './use-date-picker' import { DatePickerProvider } from './use-date-picker-context' const props = withDefaults(defineProps(), { - open: undefined, closeOnSelect: true, + defaultOpen: undefined, + open: undefined, }) const emits = defineEmits() diff --git a/frameworks/vue/src/components/date-picker/date-picker.types.ts b/frameworks/vue/src/components/date-picker/date-picker.types.ts index 06bc78a009..751617e144 100644 --- a/frameworks/vue/src/components/date-picker/date-picker.types.ts +++ b/frameworks/vue/src/components/date-picker/date-picker.types.ts @@ -7,6 +7,11 @@ export interface RootProps { * @default true */ closeOnSelect?: boolean + /** + * The initial open state of the date picker when it is first rendered. + * Use when you do not need to control its open state. + */ + defaultOpen?: boolean /** * Whether the calendar is disabled. */ diff --git a/frameworks/vue/src/components/date-picker/use-date-picker.ts b/frameworks/vue/src/components/date-picker/use-date-picker.ts index 6d27718c4a..d5e7c714f2 100644 --- a/frameworks/vue/src/components/date-picker/use-date-picker.ts +++ b/frameworks/vue/src/components/date-picker/use-date-picker.ts @@ -30,7 +30,11 @@ export interface UseDatePickerProps * The maximum date for the date picker in the format yyyy-mm-dd */ max?: string - defaultOpen?: boolean + /** + * The initial open state of the date picker when it is first rendered. + * Use when you do not need to control its open state. + */ + defaultOpen?: datePicker.Context['open'] } export interface UseDatePickerReturn extends ComputedRef> {} @@ -48,6 +52,7 @@ export const useDatePicker = ( value: modelValue ? datePicker.parse(modelValue) : undefined, max: max ? datePicker.parse(max) : undefined, min: min ? datePicker.parse(min) : undefined, + open: props.open ?? props.defaultOpen, 'open.controlled': props.open !== undefined, } }) diff --git a/frameworks/vue/src/components/dialog/dialog-root.vue b/frameworks/vue/src/components/dialog/dialog-root.vue index ffda0658a5..c415731e41 100644 --- a/frameworks/vue/src/components/dialog/dialog-root.vue +++ b/frameworks/vue/src/components/dialog/dialog-root.vue @@ -12,7 +12,10 @@ import { RenderStrategyPropsProvider } from '../../utils' import { useDialog } from './use-dialog' import { DialogProvider } from './use-dialog-context' -const props = withDefaults(defineProps(), { open: undefined }) +const props = withDefaults(defineProps(), { + defaultOpen: undefined, + open: undefined, +}) const emits = defineEmits() const dialog = useDialog(props, emits) diff --git a/frameworks/vue/src/components/dialog/dialog.types.ts b/frameworks/vue/src/components/dialog/dialog.types.ts index 46ea1b0065..617d62e70a 100644 --- a/frameworks/vue/src/components/dialog/dialog.types.ts +++ b/frameworks/vue/src/components/dialog/dialog.types.ts @@ -14,7 +14,8 @@ export interface RootProps { */ closeOnInteractOutside?: boolean /** - * The initial open state of the dialog. + * The initial open state of the dialog when it is first rendered. + * Use when you do not need to control its open state. */ defaultOpen?: boolean /** diff --git a/frameworks/vue/src/components/dialog/use-dialog.ts b/frameworks/vue/src/components/dialog/use-dialog.ts index f5f5b20b2e..4b22384801 100644 --- a/frameworks/vue/src/components/dialog/use-dialog.ts +++ b/frameworks/vue/src/components/dialog/use-dialog.ts @@ -9,7 +9,8 @@ import type { RootEmits } from './dialog' export interface UseDialogProps extends Optional, 'id'> { /** - * The initial open state of the dialog. + * The initial open state of the dialog when it is first rendered. + * Use when you do not need to control its open state. */ defaultOpen?: dialog.Context['open'] } diff --git a/frameworks/vue/src/components/hover-card/hover-card-root.vue b/frameworks/vue/src/components/hover-card/hover-card-root.vue index 533f790572..d744dc09a7 100644 --- a/frameworks/vue/src/components/hover-card/hover-card-root.vue +++ b/frameworks/vue/src/components/hover-card/hover-card-root.vue @@ -12,7 +12,10 @@ import { RenderStrategyPropsProvider } from '../../utils' import { useHoverCard } from './use-hover-card' import { HoverCardProvider } from './use-hover-card-context' -const props = withDefaults(defineProps(), { open: undefined }) +const props = withDefaults(defineProps(), { + defaultOpen: undefined, + open: undefined, +}) const emits = defineEmits() const hoverCard = useHoverCard(props, emits) diff --git a/frameworks/vue/src/components/hover-card/hover-card.types.ts b/frameworks/vue/src/components/hover-card/hover-card.types.ts index 38adbd21a1..5dc29d73c8 100644 --- a/frameworks/vue/src/components/hover-card/hover-card.types.ts +++ b/frameworks/vue/src/components/hover-card/hover-card.types.ts @@ -6,10 +6,10 @@ export interface RootProps { */ closeDelay?: number /** - * The initial open state of the hover card. + * The initial open state of the hover card when it is first rendered. + * Use when you do not need to control its open state. */ defaultOpen?: boolean - /** * The unique identifier of the machine. */ diff --git a/frameworks/vue/src/components/hover-card/use-hover-card.ts b/frameworks/vue/src/components/hover-card/use-hover-card.ts index 342e07c310..bce3f0ac00 100644 --- a/frameworks/vue/src/components/hover-card/use-hover-card.ts +++ b/frameworks/vue/src/components/hover-card/use-hover-card.ts @@ -9,10 +9,10 @@ import type { RootEmits } from './hover-card.types' export interface UseHoverCardProps extends Optional, 'id'> { /** - * The initial open state of the hover card. + * The initial open state of the hover card when it is first rendered. + * Use when you do not need to control its open state. */ defaultOpen?: hoverCard.Context['open'] - 'onUpdate:open'?: (open: hoverCard.OpenChangeDetails['open']) => void } export interface UseHoverCardReturn extends ComputedRef> {} @@ -28,8 +28,8 @@ export const useHoverCard = ( ...context.value, id: context.value.id ?? useId().value, open: props.open ?? props.defaultOpen, - getRootNode: env?.value.getRootNode, 'open.controlled': props.open !== undefined, + getRootNode: env?.value.getRootNode, onOpenChange: (details) => { emit('openChange', details) emit('update:open', details.open) diff --git a/frameworks/vue/src/components/menu/menu-root.vue b/frameworks/vue/src/components/menu/menu-root.vue index 74afc33ad5..919490438d 100644 --- a/frameworks/vue/src/components/menu/menu-root.vue +++ b/frameworks/vue/src/components/menu/menu-root.vue @@ -15,7 +15,11 @@ import { MenuProvider, useMenuContext } from './use-menu-context' import { MenuMachineProvider, useMenuMachineContext } from './use-menu-machine-context' import { MenuTriggerItemProvider } from './use-menu-trigger-item-context' -const props = withDefaults(defineProps(), { open: undefined, closeOnSelect: true }) +const props = withDefaults(defineProps(), { + closeOnSelect: true, + defaultOpen: undefined, + open: undefined, +}) const emits = defineEmits() const { api, machine } = useMenu(props, emits) diff --git a/frameworks/vue/src/components/menu/menu.types.ts b/frameworks/vue/src/components/menu/menu.types.ts index 18144eddfd..cfdf3962a1 100644 --- a/frameworks/vue/src/components/menu/menu.types.ts +++ b/frameworks/vue/src/components/menu/menu.types.ts @@ -13,6 +13,11 @@ export interface RootProps { * Whether to close the menu when an option is selected */ closeOnSelect?: boolean + /** + * The initial open state of the menu when it is first rendered. + * Use when you do not need to control its open state. + */ + defaultOpen?: boolean /** * The value of the highlighted menu item. */ diff --git a/frameworks/vue/src/components/menu/use-menu.ts b/frameworks/vue/src/components/menu/use-menu.ts index d7a45caaa3..3c78e27052 100644 --- a/frameworks/vue/src/components/menu/use-menu.ts +++ b/frameworks/vue/src/components/menu/use-menu.ts @@ -8,6 +8,10 @@ import type { RootEmits } from './menu' export interface UseMenuProps extends Optional, 'id'> { + /** + * The initial open state of the menu when it is first rendered. + * Use when you do not need to control its open state. + */ defaultOpen?: menu.Context['open'] } @@ -24,8 +28,9 @@ export const useMenu = (props: UseMenuProps, emit: EmitFn): UseMenuRe menu.machine({ ...context.value, id: context.value.id || useId().value, - getRootNode: env?.value.getRootNode, + open: props.open ?? props.defaultOpen, 'open.controlled': props.open !== undefined, + getRootNode: env?.value.getRootNode, onOpenChange: (details) => { emit('openChange', details) emit('update:open', details.open) diff --git a/frameworks/vue/src/components/popover/popover-root.vue b/frameworks/vue/src/components/popover/popover-root.vue index 0d57502056..4266985b55 100644 --- a/frameworks/vue/src/components/popover/popover-root.vue +++ b/frameworks/vue/src/components/popover/popover-root.vue @@ -12,7 +12,10 @@ import { RenderStrategyPropsProvider } from '../../utils' import { usePopover } from './use-popover' import { PopoverProvider } from './use-popover-context' -const props = withDefaults(defineProps(), { open: undefined }) +const props = withDefaults(defineProps(), { + defaultOpen: undefined, + open: undefined, +}) const emits = defineEmits() const popover = usePopover(props, emits) diff --git a/frameworks/vue/src/components/popover/popover.types.ts b/frameworks/vue/src/components/popover/popover.types.ts index 4fa19aada0..01c6163e7a 100644 --- a/frameworks/vue/src/components/popover/popover.types.ts +++ b/frameworks/vue/src/components/popover/popover.types.ts @@ -15,7 +15,8 @@ export interface RootProps { */ closeOnInteractOutside?: boolean /** - * The initial open state of the popover. + * The initial open state of the popover when it is first rendered. + * Use when you do not need to control its open state. */ defaultOpen?: boolean /** diff --git a/frameworks/vue/src/components/popover/use-popover.ts b/frameworks/vue/src/components/popover/use-popover.ts index 49a7703ccd..412d1b87c1 100644 --- a/frameworks/vue/src/components/popover/use-popover.ts +++ b/frameworks/vue/src/components/popover/use-popover.ts @@ -9,7 +9,8 @@ import type { RootEmits } from './popover.types' export interface UsePopoverProps extends Optional, 'id'> { /** - * The initial open state of the popover. + * The initial open state of the popover when it is first rendered. + * Use when you do not need to control its open state. */ defaultOpen?: popover.Context['open'] } @@ -25,8 +26,8 @@ export const usePopover = (props: UsePopoverProps, emit: EmitFn) => { ...context.value, id: context.value.id || useId().value, open: props.open ?? props.defaultOpen, - getRootNode: env?.value.getRootNode, 'open.controlled': props.open !== undefined, + getRootNode: env?.value.getRootNode, onOpenChange: (details) => { emit('openChange', details) emit('update:open', details.open) diff --git a/frameworks/vue/src/components/select/select-root.vue b/frameworks/vue/src/components/select/select-root.vue index b76e76378a..ffff555a5b 100644 --- a/frameworks/vue/src/components/select/select-root.vue +++ b/frameworks/vue/src/components/select/select-root.vue @@ -14,7 +14,11 @@ import { ark } from '../factory' import { useSelect } from './use-select' import { SelectProvider } from './use-select-context' -const props = withDefaults(defineProps(), { open: undefined, closeOnSelect: true }) +const props = withDefaults(defineProps(), { + closeOnSelect: true, + defaultOpen: undefined, + open: undefined, +}) const emits = defineEmits() const select = useSelect(props, emits) diff --git a/frameworks/vue/src/components/select/select.types.ts b/frameworks/vue/src/components/select/select.types.ts index 6ef80f293d..9d6a9b4106 100644 --- a/frameworks/vue/src/components/select/select.types.ts +++ b/frameworks/vue/src/components/select/select.types.ts @@ -6,6 +6,11 @@ export interface RootProps { * Whether the select should close after an item is selected */ closeOnSelect?: boolean + /** + * The initial open state of the select when it is first rendered. + * Use when you do not need to control its open state. + */ + defaultOpen?: boolean /** * Whether the select is disabled */ @@ -14,7 +19,6 @@ export interface RootProps { * The associate form of the underlying select. */ form?: string - /** * The key of the highlighted item */ diff --git a/frameworks/vue/src/components/select/use-select.ts b/frameworks/vue/src/components/select/use-select.ts index 958211400f..f0be67c896 100644 --- a/frameworks/vue/src/components/select/use-select.ts +++ b/frameworks/vue/src/components/select/use-select.ts @@ -13,6 +13,11 @@ export interface UseSelectProps Omit, 'collection' | 'dir' | 'getRootNode' | 'open.controlled'>, 'id' > { + /** + * The initial open state of the select when it is first rendered. + * Use when you do not need to control its open state. + */ + defaultOpen?: select.Context['open'] modelValue?: select.Context['value'] } @@ -29,6 +34,7 @@ export const useSelect = ( ...rest, collection: select.collection({ items, itemToString, itemToValue, isItemDisabled }), value: modelValue, + open: props.open ?? props.defaultOpen, 'open.controlled': props.open !== undefined, } }) diff --git a/frameworks/vue/src/components/tooltip/tooltip-root.vue b/frameworks/vue/src/components/tooltip/tooltip-root.vue index 2c73c14838..b67c36dea9 100644 --- a/frameworks/vue/src/components/tooltip/tooltip-root.vue +++ b/frameworks/vue/src/components/tooltip/tooltip-root.vue @@ -12,7 +12,10 @@ import { RenderStrategyPropsProvider } from '../../utils' import { useTooltip } from './use-tooltip' import { TooltipProvider } from './use-tooltip-context' -const props = withDefaults(defineProps(), { open: undefined }) +const props = withDefaults(defineProps(), { + defaultOpen: undefined, + open: undefined, +}) const emits = defineEmits() const tooltip = useTooltip(props, emits) diff --git a/frameworks/vue/src/components/tooltip/tooltip.types.ts b/frameworks/vue/src/components/tooltip/tooltip.types.ts index 62f9376ee8..2e3b37b234 100644 --- a/frameworks/vue/src/components/tooltip/tooltip.types.ts +++ b/frameworks/vue/src/components/tooltip/tooltip.types.ts @@ -18,7 +18,8 @@ export interface RootProps { */ closeOnPointerDown?: boolean /** - * The initial open state of the tooltip. + * The initial open state of the tooltip when it is first rendered. + * Use when you do not need to control its open state. */ defaultOpen?: boolean /** diff --git a/frameworks/vue/src/components/tooltip/use-tooltip.ts b/frameworks/vue/src/components/tooltip/use-tooltip.ts index 2384df502a..4d2e0a0077 100644 --- a/frameworks/vue/src/components/tooltip/use-tooltip.ts +++ b/frameworks/vue/src/components/tooltip/use-tooltip.ts @@ -9,7 +9,8 @@ import type { RootEmits } from './tooltip.types' export interface UseTooltipProps extends Optional, 'id'> { /** - * The initial open state of the tooltip. + * The initial open state of the tooltip when it is first rendered. + * Use when you do not need to control its open state. */ defaultOpen?: tooltip.Context['open'] } diff --git a/website/src/content/types/react/accordion.types.json b/website/src/content/types/react/accordion.types.json index fe718ab471..2b154b1d6a 100644 --- a/website/src/content/types/react/accordion.types.json +++ b/website/src/content/types/react/accordion.types.json @@ -27,7 +27,7 @@ "defaultOpen": { "type": "boolean", "isRequired": false, - "description": "The initial open state of the collpasible." + "description": "The initial open state of the collapsible when it is first rendered.\nUse when you do not need to control its open state." }, "disabled": { "type": "boolean", diff --git a/website/src/content/types/react/collapsible.types.json b/website/src/content/types/react/collapsible.types.json index ac93de9844..7c7f090dac 100644 --- a/website/src/content/types/react/collapsible.types.json +++ b/website/src/content/types/react/collapsible.types.json @@ -15,7 +15,7 @@ "defaultOpen": { "type": "boolean", "isRequired": false, - "description": "The initial open state of the collpasible." + "description": "The initial open state of the collapsible when it is first rendered.\nUse when you do not need to control its open state." }, "disabled": { "type": "boolean", diff --git a/website/src/content/types/react/color-picker.types.json b/website/src/content/types/react/color-picker.types.json index d344b498c4..0fce2baa59 100644 --- a/website/src/content/types/react/color-picker.types.json +++ b/website/src/content/types/react/color-picker.types.json @@ -114,6 +114,11 @@ "isRequired": false, "description": "Whether to close the color picker when a swatch is selected" }, + "defaultOpen": { + "type": "boolean", + "isRequired": false, + "description": "The initial open state of the color picker when it is first rendered.\nUse when you do not need to control its open state." + }, "defaultValue": { "type": "string", "isRequired": false, diff --git a/website/src/content/types/react/combobox.types.json b/website/src/content/types/react/combobox.types.json index 36d8815fa2..be01e3705a 100644 --- a/website/src/content/types/react/combobox.types.json +++ b/website/src/content/types/react/combobox.types.json @@ -108,6 +108,11 @@ "isRequired": false, "description": "Whether to close the combobox when an item is selected." }, + "defaultOpen": { + "type": "boolean", + "isRequired": false, + "description": "The initial open state of the combobox when it is first rendered.\nUse when you do not need to control its open state." + }, "defaultValue": { "type": "string[]", "isRequired": false, diff --git a/website/src/content/types/react/date-picker.types.json b/website/src/content/types/react/date-picker.types.json index 08617edd7e..dafd9dfc06 100644 --- a/website/src/content/types/react/date-picker.types.json +++ b/website/src/content/types/react/date-picker.types.json @@ -90,6 +90,11 @@ "isRequired": false, "description": "Whether the calendar should close after the date selection is complete.\nThis is ignored when the selection mode is `multiple`." }, + "defaultOpen": { + "type": "boolean", + "isRequired": false, + "description": "The initial open state of the date picker when it is first rendered.\nUse when you do not need to control its open state." + }, "defaultValue": { "type": "string[]", "isRequired": false, diff --git a/website/src/content/types/react/dialog.types.json b/website/src/content/types/react/dialog.types.json index a3dde107a3..7d6c86057b 100644 --- a/website/src/content/types/react/dialog.types.json +++ b/website/src/content/types/react/dialog.types.json @@ -53,7 +53,7 @@ "defaultOpen": { "type": "boolean", "isRequired": false, - "description": "The initial open state of the dialog." + "description": "The initial open state of the dialog when it is first rendered.\nUse when you do not need to control its open state." }, "dir": { "type": "'rtl' | 'ltr'", diff --git a/website/src/content/types/react/hover-card.types.json b/website/src/content/types/react/hover-card.types.json index eaec8fece4..f0c415fa9a 100644 --- a/website/src/content/types/react/hover-card.types.json +++ b/website/src/content/types/react/hover-card.types.json @@ -36,7 +36,7 @@ "defaultOpen": { "type": "boolean", "isRequired": false, - "description": "The initial open state of the hover card." + "description": "The initial open state of the hover card when it is first rendered.\nUse when you do not need to control its open state." }, "dir": { "type": "'rtl' | 'ltr'", diff --git a/website/src/content/types/react/menu.types.json b/website/src/content/types/react/menu.types.json index d50454893d..99d5b719e1 100644 --- a/website/src/content/types/react/menu.types.json +++ b/website/src/content/types/react/menu.types.json @@ -183,6 +183,11 @@ "isRequired": false, "description": "Whether to close the menu when an option is selected" }, + "defaultOpen": { + "type": "boolean", + "isRequired": false, + "description": "The initial open state of the menu when it is first rendered.\nUse when you do not need to control its open state." + }, "highlightedValue": { "type": "string", "isRequired": false, diff --git a/website/src/content/types/react/popover.types.json b/website/src/content/types/react/popover.types.json index 38046b965b..4f20d841a5 100644 --- a/website/src/content/types/react/popover.types.json +++ b/website/src/content/types/react/popover.types.json @@ -74,7 +74,7 @@ "defaultOpen": { "type": "boolean", "isRequired": false, - "description": "The initial open state of the popover." + "description": "The initial open state of the popover when it is first rendered.\nUse when you do not need to control its open state." }, "dir": { "type": "'rtl' | 'ltr'", diff --git a/website/src/content/types/react/select.types.json b/website/src/content/types/react/select.types.json index a4177d6a52..329f406d65 100644 --- a/website/src/content/types/react/select.types.json +++ b/website/src/content/types/react/select.types.json @@ -93,6 +93,11 @@ "isRequired": false, "description": "Whether the select should close after an item is selected" }, + "defaultOpen": { + "type": "boolean", + "isRequired": false, + "description": "The initial open state of the select when it is first rendered.\nUse when you do not need to control its open state." + }, "defaultValue": { "type": "string[]", "isRequired": false, diff --git a/website/src/content/types/react/tooltip.types.json b/website/src/content/types/react/tooltip.types.json index 26f1e37a12..d75991152e 100644 --- a/website/src/content/types/react/tooltip.types.json +++ b/website/src/content/types/react/tooltip.types.json @@ -51,7 +51,7 @@ "defaultOpen": { "type": "boolean", "isRequired": false, - "description": "The initial open state of the tooltip." + "description": "The initial open state of the tooltip when it is first rendered.\nUse when you do not need to control its open state." }, "dir": { "type": "'rtl' | 'ltr'", diff --git a/website/src/content/types/solid/accordion.types.json b/website/src/content/types/solid/accordion.types.json index fe718ab471..2b154b1d6a 100644 --- a/website/src/content/types/solid/accordion.types.json +++ b/website/src/content/types/solid/accordion.types.json @@ -27,7 +27,7 @@ "defaultOpen": { "type": "boolean", "isRequired": false, - "description": "The initial open state of the collpasible." + "description": "The initial open state of the collapsible when it is first rendered.\nUse when you do not need to control its open state." }, "disabled": { "type": "boolean", diff --git a/website/src/content/types/solid/collapsible.types.json b/website/src/content/types/solid/collapsible.types.json index ac93de9844..7c7f090dac 100644 --- a/website/src/content/types/solid/collapsible.types.json +++ b/website/src/content/types/solid/collapsible.types.json @@ -15,7 +15,7 @@ "defaultOpen": { "type": "boolean", "isRequired": false, - "description": "The initial open state of the collpasible." + "description": "The initial open state of the collapsible when it is first rendered.\nUse when you do not need to control its open state." }, "disabled": { "type": "boolean", diff --git a/website/src/content/types/solid/color-picker.types.json b/website/src/content/types/solid/color-picker.types.json index d344b498c4..0fce2baa59 100644 --- a/website/src/content/types/solid/color-picker.types.json +++ b/website/src/content/types/solid/color-picker.types.json @@ -114,6 +114,11 @@ "isRequired": false, "description": "Whether to close the color picker when a swatch is selected" }, + "defaultOpen": { + "type": "boolean", + "isRequired": false, + "description": "The initial open state of the color picker when it is first rendered.\nUse when you do not need to control its open state." + }, "defaultValue": { "type": "string", "isRequired": false, diff --git a/website/src/content/types/solid/combobox.types.json b/website/src/content/types/solid/combobox.types.json index 36d8815fa2..be01e3705a 100644 --- a/website/src/content/types/solid/combobox.types.json +++ b/website/src/content/types/solid/combobox.types.json @@ -108,6 +108,11 @@ "isRequired": false, "description": "Whether to close the combobox when an item is selected." }, + "defaultOpen": { + "type": "boolean", + "isRequired": false, + "description": "The initial open state of the combobox when it is first rendered.\nUse when you do not need to control its open state." + }, "defaultValue": { "type": "string[]", "isRequired": false, diff --git a/website/src/content/types/solid/date-picker.types.json b/website/src/content/types/solid/date-picker.types.json index 08617edd7e..dafd9dfc06 100644 --- a/website/src/content/types/solid/date-picker.types.json +++ b/website/src/content/types/solid/date-picker.types.json @@ -90,6 +90,11 @@ "isRequired": false, "description": "Whether the calendar should close after the date selection is complete.\nThis is ignored when the selection mode is `multiple`." }, + "defaultOpen": { + "type": "boolean", + "isRequired": false, + "description": "The initial open state of the date picker when it is first rendered.\nUse when you do not need to control its open state." + }, "defaultValue": { "type": "string[]", "isRequired": false, diff --git a/website/src/content/types/solid/dialog.types.json b/website/src/content/types/solid/dialog.types.json index d2e4b1b79f..b6e54d7ff9 100644 --- a/website/src/content/types/solid/dialog.types.json +++ b/website/src/content/types/solid/dialog.types.json @@ -53,7 +53,7 @@ "defaultOpen": { "type": "boolean", "isRequired": false, - "description": "The initial open state of the dialog." + "description": "The initial open state of the dialog when it is first rendered.\nUse when you do not need to control its open state." }, "dir": { "type": "'rtl' | 'ltr'", diff --git a/website/src/content/types/solid/hover-card.types.json b/website/src/content/types/solid/hover-card.types.json index eb7303262a..550c89838c 100644 --- a/website/src/content/types/solid/hover-card.types.json +++ b/website/src/content/types/solid/hover-card.types.json @@ -36,7 +36,7 @@ "defaultOpen": { "type": "boolean", "isRequired": false, - "description": "The initial open state of the hover card." + "description": "The initial open state of the hover card when it is first rendered.\nUse when you do not need to control its open state." }, "dir": { "type": "'rtl' | 'ltr'", diff --git a/website/src/content/types/solid/menu.types.json b/website/src/content/types/solid/menu.types.json index d50454893d..99d5b719e1 100644 --- a/website/src/content/types/solid/menu.types.json +++ b/website/src/content/types/solid/menu.types.json @@ -183,6 +183,11 @@ "isRequired": false, "description": "Whether to close the menu when an option is selected" }, + "defaultOpen": { + "type": "boolean", + "isRequired": false, + "description": "The initial open state of the menu when it is first rendered.\nUse when you do not need to control its open state." + }, "highlightedValue": { "type": "string", "isRequired": false, diff --git a/website/src/content/types/solid/popover.types.json b/website/src/content/types/solid/popover.types.json index 87a549ea85..2e6dea13ab 100644 --- a/website/src/content/types/solid/popover.types.json +++ b/website/src/content/types/solid/popover.types.json @@ -74,7 +74,7 @@ "defaultOpen": { "type": "boolean", "isRequired": false, - "description": "The initial open state of the popover." + "description": "The initial open state of the popover when it is first rendered.\nUse when you do not need to control its open state." }, "dir": { "type": "'rtl' | 'ltr'", diff --git a/website/src/content/types/solid/select.types.json b/website/src/content/types/solid/select.types.json index a4177d6a52..329f406d65 100644 --- a/website/src/content/types/solid/select.types.json +++ b/website/src/content/types/solid/select.types.json @@ -93,6 +93,11 @@ "isRequired": false, "description": "Whether the select should close after an item is selected" }, + "defaultOpen": { + "type": "boolean", + "isRequired": false, + "description": "The initial open state of the select when it is first rendered.\nUse when you do not need to control its open state." + }, "defaultValue": { "type": "string[]", "isRequired": false, diff --git a/website/src/content/types/solid/tooltip.types.json b/website/src/content/types/solid/tooltip.types.json index 4e6477800e..ba37540c9a 100644 --- a/website/src/content/types/solid/tooltip.types.json +++ b/website/src/content/types/solid/tooltip.types.json @@ -51,7 +51,7 @@ "defaultOpen": { "type": "boolean", "isRequired": false, - "description": "The initial open state of the tooltip." + "description": "The initial open state of the tooltip when it is first rendered.\nUse when you do not need to control its open state." }, "dir": { "type": "'rtl' | 'ltr'", diff --git a/website/src/content/types/vue/accordion.types.json b/website/src/content/types/vue/accordion.types.json index fe718ab471..2b154b1d6a 100644 --- a/website/src/content/types/vue/accordion.types.json +++ b/website/src/content/types/vue/accordion.types.json @@ -27,7 +27,7 @@ "defaultOpen": { "type": "boolean", "isRequired": false, - "description": "The initial open state of the collpasible." + "description": "The initial open state of the collapsible when it is first rendered.\nUse when you do not need to control its open state." }, "disabled": { "type": "boolean", diff --git a/website/src/content/types/vue/collapsible.types.json b/website/src/content/types/vue/collapsible.types.json index ac93de9844..7c7f090dac 100644 --- a/website/src/content/types/vue/collapsible.types.json +++ b/website/src/content/types/vue/collapsible.types.json @@ -15,7 +15,7 @@ "defaultOpen": { "type": "boolean", "isRequired": false, - "description": "The initial open state of the collpasible." + "description": "The initial open state of the collapsible when it is first rendered.\nUse when you do not need to control its open state." }, "disabled": { "type": "boolean", diff --git a/website/src/content/types/vue/color-picker.types.json b/website/src/content/types/vue/color-picker.types.json index d344b498c4..0fce2baa59 100644 --- a/website/src/content/types/vue/color-picker.types.json +++ b/website/src/content/types/vue/color-picker.types.json @@ -114,6 +114,11 @@ "isRequired": false, "description": "Whether to close the color picker when a swatch is selected" }, + "defaultOpen": { + "type": "boolean", + "isRequired": false, + "description": "The initial open state of the color picker when it is first rendered.\nUse when you do not need to control its open state." + }, "defaultValue": { "type": "string", "isRequired": false, diff --git a/website/src/content/types/vue/combobox.types.json b/website/src/content/types/vue/combobox.types.json index 36d8815fa2..be01e3705a 100644 --- a/website/src/content/types/vue/combobox.types.json +++ b/website/src/content/types/vue/combobox.types.json @@ -108,6 +108,11 @@ "isRequired": false, "description": "Whether to close the combobox when an item is selected." }, + "defaultOpen": { + "type": "boolean", + "isRequired": false, + "description": "The initial open state of the combobox when it is first rendered.\nUse when you do not need to control its open state." + }, "defaultValue": { "type": "string[]", "isRequired": false, diff --git a/website/src/content/types/vue/date-picker.types.json b/website/src/content/types/vue/date-picker.types.json index 08617edd7e..dafd9dfc06 100644 --- a/website/src/content/types/vue/date-picker.types.json +++ b/website/src/content/types/vue/date-picker.types.json @@ -90,6 +90,11 @@ "isRequired": false, "description": "Whether the calendar should close after the date selection is complete.\nThis is ignored when the selection mode is `multiple`." }, + "defaultOpen": { + "type": "boolean", + "isRequired": false, + "description": "The initial open state of the date picker when it is first rendered.\nUse when you do not need to control its open state." + }, "defaultValue": { "type": "string[]", "isRequired": false, diff --git a/website/src/content/types/vue/dialog.types.json b/website/src/content/types/vue/dialog.types.json index e5bccf3678..ed77955dcc 100644 --- a/website/src/content/types/vue/dialog.types.json +++ b/website/src/content/types/vue/dialog.types.json @@ -53,7 +53,7 @@ "defaultOpen": { "type": "boolean", "isRequired": false, - "description": "The initial open state of the dialog." + "description": "The initial open state of the dialog when it is first rendered.\nUse when you do not need to control its open state." }, "dir": { "type": "'ltr' | 'rtl'", diff --git a/website/src/content/types/vue/hover-card.types.json b/website/src/content/types/vue/hover-card.types.json index 4c9007b683..bc4cdc31cd 100644 --- a/website/src/content/types/vue/hover-card.types.json +++ b/website/src/content/types/vue/hover-card.types.json @@ -36,7 +36,7 @@ "defaultOpen": { "type": "boolean", "isRequired": false, - "description": "The initial open state of the hover card." + "description": "The initial open state of the hover card when it is first rendered.\nUse when you do not need to control its open state." }, "dir": { "type": "'ltr' | 'rtl'", diff --git a/website/src/content/types/vue/menu.types.json b/website/src/content/types/vue/menu.types.json index d50454893d..99d5b719e1 100644 --- a/website/src/content/types/vue/menu.types.json +++ b/website/src/content/types/vue/menu.types.json @@ -183,6 +183,11 @@ "isRequired": false, "description": "Whether to close the menu when an option is selected" }, + "defaultOpen": { + "type": "boolean", + "isRequired": false, + "description": "The initial open state of the menu when it is first rendered.\nUse when you do not need to control its open state." + }, "highlightedValue": { "type": "string", "isRequired": false, diff --git a/website/src/content/types/vue/popover.types.json b/website/src/content/types/vue/popover.types.json index 0385692f43..8e9745b216 100644 --- a/website/src/content/types/vue/popover.types.json +++ b/website/src/content/types/vue/popover.types.json @@ -74,7 +74,7 @@ "defaultOpen": { "type": "boolean", "isRequired": false, - "description": "The initial open state of the popover." + "description": "The initial open state of the popover when it is first rendered.\nUse when you do not need to control its open state." }, "dir": { "type": "'ltr' | 'rtl'", diff --git a/website/src/content/types/vue/select.types.json b/website/src/content/types/vue/select.types.json index a4177d6a52..329f406d65 100644 --- a/website/src/content/types/vue/select.types.json +++ b/website/src/content/types/vue/select.types.json @@ -93,6 +93,11 @@ "isRequired": false, "description": "Whether the select should close after an item is selected" }, + "defaultOpen": { + "type": "boolean", + "isRequired": false, + "description": "The initial open state of the select when it is first rendered.\nUse when you do not need to control its open state." + }, "defaultValue": { "type": "string[]", "isRequired": false, diff --git a/website/src/content/types/vue/tooltip.types.json b/website/src/content/types/vue/tooltip.types.json index 7feafb912e..bd7e8b978b 100644 --- a/website/src/content/types/vue/tooltip.types.json +++ b/website/src/content/types/vue/tooltip.types.json @@ -51,7 +51,7 @@ "defaultOpen": { "type": "boolean", "isRequired": false, - "description": "The initial open state of the tooltip." + "description": "The initial open state of the tooltip when it is first rendered.\nUse when you do not need to control its open state." }, "dir": { "type": "'ltr' | 'rtl'",