From a61be7d01ac45f4e2a3d76cfbda4bfe17281d2fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Dudak?= Date: Fri, 15 Nov 2024 15:36:49 +0100 Subject: [PATCH 1/7] Add data-pressed to MenuTrigger and PopoverTrigger --- .../system/index.tsx | 2 +- .../src/Menu/Trigger/MenuTrigger.test.tsx | 21 ++++++++++- .../mui-base/src/Menu/Trigger/MenuTrigger.tsx | 13 ++++++- .../Popover/Trigger/PopoverTrigger.test.tsx | 36 +++++++++++++++++++ .../src/Popover/Trigger/PopoverTrigger.tsx | 18 ++++++++-- .../src/utils/popupOpenStateMapping.ts | 24 +++++++------ 6 files changed, 99 insertions(+), 15 deletions(-) diff --git a/docs/data/components/popover/UnstyledPopoverIntroduction/system/index.tsx b/docs/data/components/popover/UnstyledPopoverIntroduction/system/index.tsx index 97a02c1339..45f729950b 100644 --- a/docs/data/components/popover/UnstyledPopoverIntroduction/system/index.tsx +++ b/docs/data/components/popover/UnstyledPopoverIntroduction/system/index.tsx @@ -5,7 +5,7 @@ import { styled } from '@mui/system'; export default function UnstyledPopoverIntroduction() { return ( - + Trigger diff --git a/packages/mui-base/src/Menu/Trigger/MenuTrigger.test.tsx b/packages/mui-base/src/Menu/Trigger/MenuTrigger.test.tsx index 836cb1488e..3c199cc104 100644 --- a/packages/mui-base/src/Menu/Trigger/MenuTrigger.test.tsx +++ b/packages/mui-base/src/Menu/Trigger/MenuTrigger.test.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { FloatingRootContext, FloatingTree } from '@floating-ui/react'; import userEvent from '@testing-library/user-event'; -import { act } from '@mui/internal-test-utils'; +import { act, screen } from '@mui/internal-test-utils'; import { Menu } from '@base_ui/react/Menu'; import { describeConformance, createRenderer } from '#test-utils'; import { MenuRootContext } from '../Root/MenuRootContext'; @@ -164,4 +164,23 @@ describe('', () => { expect(button).to.have.attribute('aria-expanded', 'true'); }); }); + + describe('style hooks', () => { + it('should have the data-popup-open and data-pressed attributes when open', async () => { + await render( + + + , + ); + + const trigger = screen.getByRole('button'); + + await act(async () => { + trigger.click(); + }); + + expect(trigger).to.have.attribute('data-popup-open'); + expect(trigger).to.have.attribute('data-pressed'); + }); + }); }); diff --git a/packages/mui-base/src/Menu/Trigger/MenuTrigger.tsx b/packages/mui-base/src/Menu/Trigger/MenuTrigger.tsx index 4c800e0957..121ea24e23 100644 --- a/packages/mui-base/src/Menu/Trigger/MenuTrigger.tsx +++ b/packages/mui-base/src/Menu/Trigger/MenuTrigger.tsx @@ -7,6 +7,17 @@ import { useMenuRootContext } from '../Root/MenuRootContext'; import { triggerOpenStateMapping } from '../../utils/popupOpenStateMapping'; import { useComponentRenderer } from '../../utils/useComponentRenderer'; import { BaseUIComponentProps } from '../../utils/types'; +import { CustomStyleHookMapping } from '../../utils/getStyleHookProps'; + +const customStyleHookMapping: CustomStyleHookMapping<{ open: boolean }> = { + open(value) { + if (value) { + return { ...triggerOpenStateMapping.open(value), 'data-pressed': '' }; + } + + return triggerOpenStateMapping.open(value); + }, +}; /** * @@ -52,7 +63,7 @@ const MenuTrigger = React.forwardRef(function MenuTrigger( className, ownerState, propGetter: (externalProps) => getTriggerProps(getRootProps(externalProps)), - customStyleHookMapping: triggerOpenStateMapping, + customStyleHookMapping, extraProps: other, }); diff --git a/packages/mui-base/src/Popover/Trigger/PopoverTrigger.test.tsx b/packages/mui-base/src/Popover/Trigger/PopoverTrigger.test.tsx index 9bb0c77738..f8299771ef 100644 --- a/packages/mui-base/src/Popover/Trigger/PopoverTrigger.test.tsx +++ b/packages/mui-base/src/Popover/Trigger/PopoverTrigger.test.tsx @@ -1,6 +1,8 @@ import * as React from 'react'; import { Popover } from '@base_ui/react/Popover'; import { createRenderer, describeConformance } from '#test-utils'; +import { expect } from 'chai'; +import { act, screen } from '@mui/internal-test-utils'; describe('', () => { const { render } = createRenderer(); @@ -15,4 +17,38 @@ describe('', () => { ); }, })); + + describe('style hooks', () => { + it('should have the data-popup-open and data-pressed attributes when open by clicking', async () => { + await render( + + + , + ); + + const trigger = screen.getByRole('button'); + + await act(async () => { + trigger.click(); + }); + + expect(trigger).to.have.attribute('data-popup-open'); + expect(trigger).to.have.attribute('data-pressed'); + }); + + it('should have the data-popup-open but not the data-pressed attribute when open by hover', async () => { + const { user } = await render( + + + , + ); + + const trigger = screen.getByRole('button'); + + await user.hover(trigger); + + expect(trigger).to.have.attribute('data-popup-open'); + expect(trigger).not.to.have.attribute('data-pressed'); + }); + }); }); diff --git a/packages/mui-base/src/Popover/Trigger/PopoverTrigger.tsx b/packages/mui-base/src/Popover/Trigger/PopoverTrigger.tsx index 42906c985f..98cf31b012 100644 --- a/packages/mui-base/src/Popover/Trigger/PopoverTrigger.tsx +++ b/packages/mui-base/src/Popover/Trigger/PopoverTrigger.tsx @@ -6,6 +6,7 @@ import { useComponentRenderer } from '../../utils/useComponentRenderer'; import { useForkRef } from '../../utils/useForkRef'; import type { BaseUIComponentProps } from '../../utils/types'; import { triggerOpenStateMapping } from '../../utils/popupOpenStateMapping'; +import { CustomStyleHookMapping } from '../../utils/getStyleHookProps'; /** * Renders a trigger element that opens the popover. @@ -24,12 +25,25 @@ const PopoverTrigger = React.forwardRef(function PopoverTrigger( ) { const { render, className, ...otherProps } = props; - const { open, setTriggerElement, getRootTriggerProps } = usePopoverRootContext(); + const { open, setTriggerElement, getRootTriggerProps, openOnHover } = usePopoverRootContext(); const ownerState: PopoverTrigger.OwnerState = React.useMemo(() => ({ open }), [open]); const mergedRef = useForkRef(forwardedRef, setTriggerElement); + const customStyleHookMapping: CustomStyleHookMapping<{ open: boolean }> = React.useMemo( + () => ({ + open(value) { + if (value && !openOnHover) { + return { ...triggerOpenStateMapping.open(value), 'data-pressed': '' }; + } + + return triggerOpenStateMapping.open(value); + }, + }), + [openOnHover], + ); + const { renderElement } = useComponentRenderer({ propGetter: getRootTriggerProps, render: render ?? 'button', @@ -37,7 +51,7 @@ const PopoverTrigger = React.forwardRef(function PopoverTrigger( ownerState, ref: mergedRef, extraProps: otherProps, - customStyleHookMapping: triggerOpenStateMapping, + customStyleHookMapping, }); return renderElement(); diff --git a/packages/mui-base/src/utils/popupOpenStateMapping.ts b/packages/mui-base/src/utils/popupOpenStateMapping.ts index a17d2248f4..c1f8ae51ce 100644 --- a/packages/mui-base/src/utils/popupOpenStateMapping.ts +++ b/packages/mui-base/src/utils/popupOpenStateMapping.ts @@ -1,23 +1,27 @@ import type { CustomStyleHookMapping } from './getStyleHookProps'; -export const triggerOpenStateMapping: CustomStyleHookMapping<{ open: boolean }> = { +const TRIGGER_HOOK = { + 'data-popup-open': '', +}; + +const POPUP_HOOK = { + 'data-open': '', +}; + +export const triggerOpenStateMapping = { open(value) { if (value) { - return { - 'data-popup-open': '', - }; + return TRIGGER_HOOK; } return null; }, -}; +} satisfies CustomStyleHookMapping<{ open: boolean }>; -export const popupOpenStateMapping: CustomStyleHookMapping<{ open: boolean }> = { +export const popupOpenStateMapping = { open(value) { if (value) { - return { - 'data-open': '', - }; + return POPUP_HOOK; } return null; }, -}; +} satisfies CustomStyleHookMapping<{ open: boolean }>; From 19a38c3b7109a3b87d1cbb9b2fa7d2360bd7880e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Dudak?= Date: Fri, 15 Nov 2024 21:21:36 +0100 Subject: [PATCH 2/7] Revert demo change --- .../popover/UnstyledPopoverIntroduction/system/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/data/components/popover/UnstyledPopoverIntroduction/system/index.tsx b/docs/data/components/popover/UnstyledPopoverIntroduction/system/index.tsx index 45f729950b..97a02c1339 100644 --- a/docs/data/components/popover/UnstyledPopoverIntroduction/system/index.tsx +++ b/docs/data/components/popover/UnstyledPopoverIntroduction/system/index.tsx @@ -5,7 +5,7 @@ import { styled } from '@mui/system'; export default function UnstyledPopoverIntroduction() { return ( - + Trigger From 0e33eba29b2976dee7026dfaaf317ca373161b0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Dudak?= Date: Fri, 15 Nov 2024 21:37:28 +0100 Subject: [PATCH 3/7] Handle clicks when Popover's `openOnHover` is set --- .../mui-base/src/Popover/Root/PopoverRoot.tsx | 3 +++ .../src/Popover/Root/PopoverRootContext.ts | 1 + .../src/Popover/Root/usePopoverRoot.ts | 10 ++++++++++ .../Popover/Trigger/PopoverTrigger.test.tsx | 18 ++++++++++++++++++ .../src/Popover/Trigger/PopoverTrigger.tsx | 6 +++--- 5 files changed, 35 insertions(+), 3 deletions(-) diff --git a/packages/mui-base/src/Popover/Root/PopoverRoot.tsx b/packages/mui-base/src/Popover/Root/PopoverRoot.tsx index 7a52ac417a..354645c25b 100644 --- a/packages/mui-base/src/Popover/Root/PopoverRoot.tsx +++ b/packages/mui-base/src/Popover/Root/PopoverRoot.tsx @@ -40,6 +40,7 @@ const PopoverRoot: React.FC = function PopoverRoot(props) { descriptionId, setDescriptionId, openMethod, + openReason, } = usePopoverRoot({ openOnHover, delay: delayWithDefault, @@ -73,6 +74,7 @@ const PopoverRoot: React.FC = function PopoverRoot(props) { getRootPopupProps, getRootTriggerProps, openMethod, + openReason, }), [ openOnHover, @@ -96,6 +98,7 @@ const PopoverRoot: React.FC = function PopoverRoot(props) { getRootPopupProps, getRootTriggerProps, openMethod, + openReason, ], ); diff --git a/packages/mui-base/src/Popover/Root/PopoverRootContext.ts b/packages/mui-base/src/Popover/Root/PopoverRootContext.ts index 9efaa21b9d..7850e5e252 100644 --- a/packages/mui-base/src/Popover/Root/PopoverRootContext.ts +++ b/packages/mui-base/src/Popover/Root/PopoverRootContext.ts @@ -27,6 +27,7 @@ export interface PopoverRootContext { getRootTriggerProps: (externalProps?: GenericHTMLProps) => GenericHTMLProps; getRootPopupProps: (externalProps?: GenericHTMLProps) => GenericHTMLProps; openMethod: InteractionType | null; + openReason: OpenChangeReason | null; } export const PopoverRootContext = React.createContext(undefined); diff --git a/packages/mui-base/src/Popover/Root/usePopoverRoot.ts b/packages/mui-base/src/Popover/Root/usePopoverRoot.ts index d91198215c..4368f9173d 100644 --- a/packages/mui-base/src/Popover/Root/usePopoverRoot.ts +++ b/packages/mui-base/src/Popover/Root/usePopoverRoot.ts @@ -42,6 +42,7 @@ export function usePopoverRoot(params: usePopoverRoot.Parameters): usePopoverRoo const [descriptionId, setDescriptionId] = React.useState(); const [triggerElement, setTriggerElement] = React.useState(null); const [positionerElement, setPositionerElement] = React.useState(null); + const [openReason, setOpenReason] = React.useState(null); const popupRef = React.useRef(null); @@ -69,6 +70,12 @@ export function usePopoverRoot(params: usePopoverRoot.Parameters): usePopoverRoo setMounted(false); } } + + if (nextOpen) { + setOpenReason(reason ?? null); + } else { + setOpenReason(null); + } }, ); @@ -138,6 +145,7 @@ export function usePopoverRoot(params: usePopoverRoot.Parameters): usePopoverRoo floatingRootContext: context, instantType, openMethod, + openReason, }), [ mounted, @@ -154,6 +162,7 @@ export function usePopoverRoot(params: usePopoverRoot.Parameters): usePopoverRoo instantType, openMethod, triggerProps, + openReason, ], ); } @@ -222,5 +231,6 @@ export namespace usePopoverRoot { setPositionerElement: React.Dispatch>; popupRef: React.RefObject; openMethod: InteractionType | null; + openReason: OpenChangeReason | null; } } diff --git a/packages/mui-base/src/Popover/Trigger/PopoverTrigger.test.tsx b/packages/mui-base/src/Popover/Trigger/PopoverTrigger.test.tsx index f8299771ef..53b6e382f0 100644 --- a/packages/mui-base/src/Popover/Trigger/PopoverTrigger.test.tsx +++ b/packages/mui-base/src/Popover/Trigger/PopoverTrigger.test.tsx @@ -50,5 +50,23 @@ describe('', () => { expect(trigger).to.have.attribute('data-popup-open'); expect(trigger).not.to.have.attribute('data-pressed'); }); + + it('should have the data-popup-open and data-pressed attributes when open by click when `openOnHover=true`', async () => { + const { user } = await render( + + + , + ); + + const trigger = screen.getByRole('button'); + + await user.hover(trigger); + await act(async () => { + trigger.click(); + }); + + expect(trigger).to.have.attribute('data-popup-open'); + expect(trigger).to.have.attribute('data-pressed'); + }); }); }); diff --git a/packages/mui-base/src/Popover/Trigger/PopoverTrigger.tsx b/packages/mui-base/src/Popover/Trigger/PopoverTrigger.tsx index 98cf31b012..9af15ba7b7 100644 --- a/packages/mui-base/src/Popover/Trigger/PopoverTrigger.tsx +++ b/packages/mui-base/src/Popover/Trigger/PopoverTrigger.tsx @@ -25,7 +25,7 @@ const PopoverTrigger = React.forwardRef(function PopoverTrigger( ) { const { render, className, ...otherProps } = props; - const { open, setTriggerElement, getRootTriggerProps, openOnHover } = usePopoverRootContext(); + const { open, setTriggerElement, getRootTriggerProps, openReason } = usePopoverRootContext(); const ownerState: PopoverTrigger.OwnerState = React.useMemo(() => ({ open }), [open]); @@ -34,14 +34,14 @@ const PopoverTrigger = React.forwardRef(function PopoverTrigger( const customStyleHookMapping: CustomStyleHookMapping<{ open: boolean }> = React.useMemo( () => ({ open(value) { - if (value && !openOnHover) { + if (value && openReason === 'click') { return { ...triggerOpenStateMapping.open(value), 'data-pressed': '' }; } return triggerOpenStateMapping.open(value); }, }), - [openOnHover], + [openReason], ); const { renderElement } = useComponentRenderer({ From 13d899a4a1d59e9fce6e571805f66a3e0f022338 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Dudak?= Date: Fri, 15 Nov 2024 21:51:52 +0100 Subject: [PATCH 4/7] Handle Select --- .../mui-base/src/Menu/Trigger/MenuTrigger.tsx | 15 +------ .../src/Select/Trigger/SelectTrigger.test.tsx | 39 +++++++++++++++++++ .../src/Select/Trigger/SelectTrigger.tsx | 4 +- .../src/utils/popupOpenStateMapping.ts | 14 +++++++ 4 files changed, 57 insertions(+), 15 deletions(-) create mode 100644 packages/mui-base/src/Select/Trigger/SelectTrigger.test.tsx diff --git a/packages/mui-base/src/Menu/Trigger/MenuTrigger.tsx b/packages/mui-base/src/Menu/Trigger/MenuTrigger.tsx index 121ea24e23..eb0ba70bef 100644 --- a/packages/mui-base/src/Menu/Trigger/MenuTrigger.tsx +++ b/packages/mui-base/src/Menu/Trigger/MenuTrigger.tsx @@ -4,20 +4,9 @@ import PropTypes from 'prop-types'; import { useFloatingTree } from '@floating-ui/react'; import { useMenuTrigger } from './useMenuTrigger'; import { useMenuRootContext } from '../Root/MenuRootContext'; -import { triggerOpenStateMapping } from '../../utils/popupOpenStateMapping'; +import { pressableTriggerOpenStateMapping } from '../../utils/popupOpenStateMapping'; import { useComponentRenderer } from '../../utils/useComponentRenderer'; import { BaseUIComponentProps } from '../../utils/types'; -import { CustomStyleHookMapping } from '../../utils/getStyleHookProps'; - -const customStyleHookMapping: CustomStyleHookMapping<{ open: boolean }> = { - open(value) { - if (value) { - return { ...triggerOpenStateMapping.open(value), 'data-pressed': '' }; - } - - return triggerOpenStateMapping.open(value); - }, -}; /** * @@ -63,7 +52,7 @@ const MenuTrigger = React.forwardRef(function MenuTrigger( className, ownerState, propGetter: (externalProps) => getTriggerProps(getRootProps(externalProps)), - customStyleHookMapping, + customStyleHookMapping: pressableTriggerOpenStateMapping, extraProps: other, }); diff --git a/packages/mui-base/src/Select/Trigger/SelectTrigger.test.tsx b/packages/mui-base/src/Select/Trigger/SelectTrigger.test.tsx new file mode 100644 index 0000000000..f4c0b1e8c9 --- /dev/null +++ b/packages/mui-base/src/Select/Trigger/SelectTrigger.test.tsx @@ -0,0 +1,39 @@ +import * as React from 'react'; +import { Select } from '@base_ui/react/Select'; +import { createRenderer, describeConformance } from '#test-utils'; +import { expect } from 'chai'; +import { act, screen } from '@mui/internal-test-utils'; + +describe('', () => { + const { render } = createRenderer(); + + describeConformance(, () => ({ + refInstanceof: window.HTMLDivElement, + render(node) { + return render( + + {node} + , + ); + }, + })); + + describe('style hooks', () => { + it('should have the data-popup-open and data-pressed attributes when open', async () => { + await render( + + + , + ); + + const trigger = screen.getByRole('combobox'); + + await act(async () => { + trigger.click(); + }); + + expect(trigger).to.have.attribute('data-popup-open'); + expect(trigger).to.have.attribute('data-pressed'); + }); + }); +}); diff --git a/packages/mui-base/src/Select/Trigger/SelectTrigger.tsx b/packages/mui-base/src/Select/Trigger/SelectTrigger.tsx index 909706b9ad..856ac0dbe5 100644 --- a/packages/mui-base/src/Select/Trigger/SelectTrigger.tsx +++ b/packages/mui-base/src/Select/Trigger/SelectTrigger.tsx @@ -6,7 +6,7 @@ import { useSelectRootContext } from '../Root/SelectRootContext'; import { useComponentRenderer } from '../../utils/useComponentRenderer'; import { BaseUIComponentProps } from '../../utils/types'; import { useFieldRootContext } from '../../Field/Root/FieldRootContext'; -import { triggerOpenStateMapping } from '../../utils/popupOpenStateMapping'; +import { pressableTriggerOpenStateMapping } from '../../utils/popupOpenStateMapping'; /** * @@ -55,7 +55,7 @@ const SelectTrigger = React.forwardRef(function SelectTrigger( className, ownerState, propGetter: (externalProps) => getTriggerProps(getRootTriggerProps(externalProps)), - customStyleHookMapping: triggerOpenStateMapping, + customStyleHookMapping: pressableTriggerOpenStateMapping, extraProps: otherProps, }); diff --git a/packages/mui-base/src/utils/popupOpenStateMapping.ts b/packages/mui-base/src/utils/popupOpenStateMapping.ts index c1f8ae51ce..07e4ef00fe 100644 --- a/packages/mui-base/src/utils/popupOpenStateMapping.ts +++ b/packages/mui-base/src/utils/popupOpenStateMapping.ts @@ -4,6 +4,11 @@ const TRIGGER_HOOK = { 'data-popup-open': '', }; +const PRESSABLE_TRIGGER_HOOK = { + 'data-popup-open': '', + 'data-pressed': '', +}; + const POPUP_HOOK = { 'data-open': '', }; @@ -17,6 +22,15 @@ export const triggerOpenStateMapping = { }, } satisfies CustomStyleHookMapping<{ open: boolean }>; +export const pressableTriggerOpenStateMapping = { + open(value) { + if (value) { + return PRESSABLE_TRIGGER_HOOK; + } + return null; + }, +} satisfies CustomStyleHookMapping<{ open: boolean }>; + export const popupOpenStateMapping = { open(value) { if (value) { From 6177c93ba093719c01f29613b36c681a45e25e99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Dudak?= Date: Fri, 15 Nov 2024 21:59:18 +0100 Subject: [PATCH 5/7] Refactor --- packages/mui-base/src/Popover/Trigger/PopoverTrigger.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/mui-base/src/Popover/Trigger/PopoverTrigger.tsx b/packages/mui-base/src/Popover/Trigger/PopoverTrigger.tsx index 9af15ba7b7..1d9057c2d1 100644 --- a/packages/mui-base/src/Popover/Trigger/PopoverTrigger.tsx +++ b/packages/mui-base/src/Popover/Trigger/PopoverTrigger.tsx @@ -5,7 +5,10 @@ import { usePopoverRootContext } from '../Root/PopoverRootContext'; import { useComponentRenderer } from '../../utils/useComponentRenderer'; import { useForkRef } from '../../utils/useForkRef'; import type { BaseUIComponentProps } from '../../utils/types'; -import { triggerOpenStateMapping } from '../../utils/popupOpenStateMapping'; +import { + triggerOpenStateMapping, + pressableTriggerOpenStateMapping, +} from '../../utils/popupOpenStateMapping'; import { CustomStyleHookMapping } from '../../utils/getStyleHookProps'; /** @@ -35,7 +38,7 @@ const PopoverTrigger = React.forwardRef(function PopoverTrigger( () => ({ open(value) { if (value && openReason === 'click') { - return { ...triggerOpenStateMapping.open(value), 'data-pressed': '' }; + return pressableTriggerOpenStateMapping.open(value); } return triggerOpenStateMapping.open(value); From 133db846a19602ef81a5457c9cd8697f27f5a6b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Dudak?= Date: Mon, 18 Nov 2024 12:01:58 +0100 Subject: [PATCH 6/7] docs:api --- docs/data/api/select-trigger.json | 3 + .../reference/generated/accordion-header.json | 14 --- docs/reference/generated/accordion-item.json | 23 ----- docs/reference/generated/accordion-panel.json | 19 ---- docs/reference/generated/accordion-root.json | 47 ---------- .../generated/accordion-trigger.json | 14 --- .../generated/alert-dialog-backdrop.json | 19 ---- .../generated/alert-dialog-close.json | 14 --- .../generated/alert-dialog-description.json | 14 --- .../generated/alert-dialog-popup.json | 31 ------- .../generated/alert-dialog-root.json | 23 ----- .../generated/alert-dialog-title.json | 14 --- .../generated/alert-dialog-trigger.json | 14 --- .../generated/checkbox-group-root.json | 40 --------- .../generated/checkbox-indicator.json | 19 ---- docs/reference/generated/checkbox-root.json | 62 ------------- .../generated/collapsible-panel.json | 19 ---- .../reference/generated/collapsible-root.json | 37 -------- .../generated/collapsible-trigger.json | 14 --- docs/reference/generated/dialog-backdrop.json | 33 ------- docs/reference/generated/dialog-close.json | 14 --- .../generated/dialog-description.json | 14 --- docs/reference/generated/dialog-popup.json | 58 ------------ docs/reference/generated/dialog-root.json | 33 ------- docs/reference/generated/dialog-title.json | 14 --- docs/reference/generated/dialog-trigger.json | 22 ----- docs/reference/generated/field-control.json | 18 ---- .../generated/field-description.json | 14 --- docs/reference/generated/field-error.json | 22 ----- docs/reference/generated/field-label.json | 14 --- docs/reference/generated/field-root.json | 41 --------- docs/reference/generated/field-validity.json | 10 --- docs/reference/generated/fieldset-legend.json | 14 --- docs/reference/generated/fieldset-root.json | 14 --- docs/reference/generated/form-root.json | 22 ----- docs/reference/generated/menu-arrow.json | 19 ---- .../menu-checkbox-item-indicator.json | 19 ---- .../generated/menu-checkbox-item.json | 28 ------ .../reference/generated/menu-group-label.json | 14 --- docs/reference/generated/menu-group.json | 18 ---- docs/reference/generated/menu-item.json | 28 ------ docs/reference/generated/menu-popup.json | 18 ---- docs/reference/generated/menu-positioner.json | 77 ---------------- .../reference/generated/menu-radio-group.json | 31 ------- .../generated/menu-radio-item-indicator.json | 19 ---- docs/reference/generated/menu-radio-item.json | 33 ------- docs/reference/generated/menu-root.json | 58 ------------ docs/reference/generated/menu-trigger.json | 23 ----- docs/reference/generated/no-ssr.json | 20 ----- .../generated/number-field-decrement.json | 14 --- .../generated/number-field-group.json | 14 --- .../generated/number-field-increment.json | 14 --- .../generated/number-field-input.json | 14 --- .../generated/number-field-root.json | 90 ------------------- .../number-field-scrub-area-cursor.json | 14 --- .../generated/number-field-scrub-area.json | 28 ------ docs/reference/generated/popover-arrow.json | 19 ---- .../reference/generated/popover-backdrop.json | 24 ----- docs/reference/generated/popover-close.json | 14 --- .../generated/popover-description.json | 14 --- docs/reference/generated/popover-popup.json | 14 --- .../generated/popover-positioner.json | 85 ------------------ docs/reference/generated/popover-root.json | 40 --------- docs/reference/generated/popover-title.json | 14 --- docs/reference/generated/popover-trigger.json | 14 --- .../generated/preview-card-arrow.json | 19 ---- .../generated/preview-card-backdrop.json | 23 ----- .../generated/preview-card-popup.json | 14 --- .../generated/preview-card-positioner.json | 77 ---------------- .../generated/preview-card-root.json | 35 -------- .../generated/preview-card-trigger.json | 14 --- .../generated/progress-indicator.json | 14 --- docs/reference/generated/progress-root.json | 54 ----------- docs/reference/generated/progress-track.json | 14 --- .../reference/generated/radio-group-root.json | 45 ---------- docs/reference/generated/radio-indicator.json | 19 ---- docs/reference/generated/radio-root.json | 34 ------- .../generated/scroll-area-corner.json | 14 --- .../reference/generated/scroll-area-root.json | 19 ---- .../generated/scroll-area-scrollbar.json | 24 ----- .../generated/scroll-area-thumb.json | 14 --- .../generated/scroll-area-viewport.json | 14 --- docs/reference/generated/select-arrow.json | 19 ---- docs/reference/generated/select-backdrop.json | 24 ----- .../generated/select-group-label.json | 14 --- docs/reference/generated/select-group.json | 14 --- docs/reference/generated/select-icon.json | 14 --- .../generated/select-option-indicator.json | 19 ---- .../generated/select-option-text.json | 5 -- docs/reference/generated/select-option.json | 20 ----- docs/reference/generated/select-popup.json | 18 ---- .../generated/select-positioner.json | 77 ---------------- docs/reference/generated/select-root.json | 61 ------------- .../generated/select-scroll-down-arrow.json | 11 --- .../generated/select-scroll-up-arrow.json | 11 --- docs/reference/generated/select-trigger.json | 28 ------ docs/reference/generated/select-value.json | 18 ---- docs/reference/generated/separator-root.json | 14 --- docs/reference/generated/slider-control.json | 14 --- .../reference/generated/slider-indicator.json | 14 --- docs/reference/generated/slider-output.json | 14 --- docs/reference/generated/slider-root.json | 59 ------------ docs/reference/generated/slider-thumb.json | 30 ------- docs/reference/generated/slider-track.json | 14 --- docs/reference/generated/submenu-trigger.json | 23 ----- docs/reference/generated/switch-root.json | 49 ---------- docs/reference/generated/switch-thumb.json | 14 --- docs/reference/generated/tab-indicator.json | 19 ---- docs/reference/generated/tab-panel.json | 23 ----- docs/reference/generated/tab.json | 18 ---- docs/reference/generated/tabs-list.json | 24 ----- docs/reference/generated/tabs-root.json | 36 -------- docs/reference/generated/text-input.json | 14 --- docs/reference/generated/tooltip-arrow.json | 19 ---- docs/reference/generated/tooltip-popup.json | 14 --- .../generated/tooltip-positioner.json | 77 ---------------- .../reference/generated/tooltip-provider.json | 19 ---- docs/reference/generated/tooltip-root.json | 45 ---------- docs/reference/generated/tooltip-trigger.json | 14 --- 119 files changed, 3 insertions(+), 2992 deletions(-) delete mode 100644 docs/reference/generated/accordion-header.json delete mode 100644 docs/reference/generated/accordion-item.json delete mode 100644 docs/reference/generated/accordion-panel.json delete mode 100644 docs/reference/generated/accordion-root.json delete mode 100644 docs/reference/generated/accordion-trigger.json delete mode 100644 docs/reference/generated/alert-dialog-backdrop.json delete mode 100644 docs/reference/generated/alert-dialog-close.json delete mode 100644 docs/reference/generated/alert-dialog-description.json delete mode 100644 docs/reference/generated/alert-dialog-popup.json delete mode 100644 docs/reference/generated/alert-dialog-root.json delete mode 100644 docs/reference/generated/alert-dialog-title.json delete mode 100644 docs/reference/generated/alert-dialog-trigger.json delete mode 100644 docs/reference/generated/checkbox-group-root.json delete mode 100644 docs/reference/generated/checkbox-indicator.json delete mode 100644 docs/reference/generated/checkbox-root.json delete mode 100644 docs/reference/generated/collapsible-panel.json delete mode 100644 docs/reference/generated/collapsible-root.json delete mode 100644 docs/reference/generated/collapsible-trigger.json delete mode 100644 docs/reference/generated/dialog-backdrop.json delete mode 100644 docs/reference/generated/dialog-close.json delete mode 100644 docs/reference/generated/dialog-description.json delete mode 100644 docs/reference/generated/dialog-popup.json delete mode 100644 docs/reference/generated/dialog-root.json delete mode 100644 docs/reference/generated/dialog-title.json delete mode 100644 docs/reference/generated/dialog-trigger.json delete mode 100644 docs/reference/generated/field-control.json delete mode 100644 docs/reference/generated/field-description.json delete mode 100644 docs/reference/generated/field-error.json delete mode 100644 docs/reference/generated/field-label.json delete mode 100644 docs/reference/generated/field-root.json delete mode 100644 docs/reference/generated/field-validity.json delete mode 100644 docs/reference/generated/fieldset-legend.json delete mode 100644 docs/reference/generated/fieldset-root.json delete mode 100644 docs/reference/generated/form-root.json delete mode 100644 docs/reference/generated/menu-arrow.json delete mode 100644 docs/reference/generated/menu-checkbox-item-indicator.json delete mode 100644 docs/reference/generated/menu-checkbox-item.json delete mode 100644 docs/reference/generated/menu-group-label.json delete mode 100644 docs/reference/generated/menu-group.json delete mode 100644 docs/reference/generated/menu-item.json delete mode 100644 docs/reference/generated/menu-popup.json delete mode 100644 docs/reference/generated/menu-positioner.json delete mode 100644 docs/reference/generated/menu-radio-group.json delete mode 100644 docs/reference/generated/menu-radio-item-indicator.json delete mode 100644 docs/reference/generated/menu-radio-item.json delete mode 100644 docs/reference/generated/menu-root.json delete mode 100644 docs/reference/generated/menu-trigger.json delete mode 100644 docs/reference/generated/no-ssr.json delete mode 100644 docs/reference/generated/number-field-decrement.json delete mode 100644 docs/reference/generated/number-field-group.json delete mode 100644 docs/reference/generated/number-field-increment.json delete mode 100644 docs/reference/generated/number-field-input.json delete mode 100644 docs/reference/generated/number-field-root.json delete mode 100644 docs/reference/generated/number-field-scrub-area-cursor.json delete mode 100644 docs/reference/generated/number-field-scrub-area.json delete mode 100644 docs/reference/generated/popover-arrow.json delete mode 100644 docs/reference/generated/popover-backdrop.json delete mode 100644 docs/reference/generated/popover-close.json delete mode 100644 docs/reference/generated/popover-description.json delete mode 100644 docs/reference/generated/popover-popup.json delete mode 100644 docs/reference/generated/popover-positioner.json delete mode 100644 docs/reference/generated/popover-root.json delete mode 100644 docs/reference/generated/popover-title.json delete mode 100644 docs/reference/generated/popover-trigger.json delete mode 100644 docs/reference/generated/preview-card-arrow.json delete mode 100644 docs/reference/generated/preview-card-backdrop.json delete mode 100644 docs/reference/generated/preview-card-popup.json delete mode 100644 docs/reference/generated/preview-card-positioner.json delete mode 100644 docs/reference/generated/preview-card-root.json delete mode 100644 docs/reference/generated/preview-card-trigger.json delete mode 100644 docs/reference/generated/progress-indicator.json delete mode 100644 docs/reference/generated/progress-root.json delete mode 100644 docs/reference/generated/progress-track.json delete mode 100644 docs/reference/generated/radio-group-root.json delete mode 100644 docs/reference/generated/radio-indicator.json delete mode 100644 docs/reference/generated/radio-root.json delete mode 100644 docs/reference/generated/scroll-area-corner.json delete mode 100644 docs/reference/generated/scroll-area-root.json delete mode 100644 docs/reference/generated/scroll-area-scrollbar.json delete mode 100644 docs/reference/generated/scroll-area-thumb.json delete mode 100644 docs/reference/generated/scroll-area-viewport.json delete mode 100644 docs/reference/generated/select-arrow.json delete mode 100644 docs/reference/generated/select-backdrop.json delete mode 100644 docs/reference/generated/select-group-label.json delete mode 100644 docs/reference/generated/select-group.json delete mode 100644 docs/reference/generated/select-icon.json delete mode 100644 docs/reference/generated/select-option-indicator.json delete mode 100644 docs/reference/generated/select-option-text.json delete mode 100644 docs/reference/generated/select-option.json delete mode 100644 docs/reference/generated/select-popup.json delete mode 100644 docs/reference/generated/select-positioner.json delete mode 100644 docs/reference/generated/select-root.json delete mode 100644 docs/reference/generated/select-scroll-down-arrow.json delete mode 100644 docs/reference/generated/select-scroll-up-arrow.json delete mode 100644 docs/reference/generated/select-trigger.json delete mode 100644 docs/reference/generated/select-value.json delete mode 100644 docs/reference/generated/separator-root.json delete mode 100644 docs/reference/generated/slider-control.json delete mode 100644 docs/reference/generated/slider-indicator.json delete mode 100644 docs/reference/generated/slider-output.json delete mode 100644 docs/reference/generated/slider-root.json delete mode 100644 docs/reference/generated/slider-thumb.json delete mode 100644 docs/reference/generated/slider-track.json delete mode 100644 docs/reference/generated/submenu-trigger.json delete mode 100644 docs/reference/generated/switch-root.json delete mode 100644 docs/reference/generated/switch-thumb.json delete mode 100644 docs/reference/generated/tab-indicator.json delete mode 100644 docs/reference/generated/tab-panel.json delete mode 100644 docs/reference/generated/tab.json delete mode 100644 docs/reference/generated/tabs-list.json delete mode 100644 docs/reference/generated/tabs-root.json delete mode 100644 docs/reference/generated/text-input.json delete mode 100644 docs/reference/generated/tooltip-arrow.json delete mode 100644 docs/reference/generated/tooltip-popup.json delete mode 100644 docs/reference/generated/tooltip-positioner.json delete mode 100644 docs/reference/generated/tooltip-provider.json delete mode 100644 docs/reference/generated/tooltip-root.json delete mode 100644 docs/reference/generated/tooltip-trigger.json diff --git a/docs/data/api/select-trigger.json b/docs/data/api/select-trigger.json index 92239a7615..f816e4ed5e 100644 --- a/docs/data/api/select-trigger.json +++ b/docs/data/api/select-trigger.json @@ -11,7 +11,10 @@ "import { Select } from '@base_ui/react/Select';\nconst SelectTrigger = Select.Trigger;" ], "classes": [], + "spread": true, + "themeDefaultProps": true, "muiName": "SelectTrigger", + "forwardsRefTo": "HTMLDivElement", "filename": "/packages/mui-base/src/Select/Trigger/SelectTrigger.tsx", "inheritance": null, "demos": "", diff --git a/docs/reference/generated/accordion-header.json b/docs/reference/generated/accordion-header.json deleted file mode 100644 index eacd7eb1c2..0000000000 --- a/docs/reference/generated/accordion-header.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "AccordionHeader", - "description": "", - "props": { - "className": { - "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." - }, - "render": { - "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." - } - } -} diff --git a/docs/reference/generated/accordion-item.json b/docs/reference/generated/accordion-item.json deleted file mode 100644 index 28ced50f2a..0000000000 --- a/docs/reference/generated/accordion-item.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "AccordionItem", - "description": "", - "props": { - "className": { - "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." - }, - "disabled": { - "type": "boolean", - "default": "false", - "description": "If `true`, the component is disabled." - }, - "onOpenChange": { - "type": "(open) => void", - "description": "Callback fired when the Collapsible is opened or closed." - }, - "render": { - "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." - } - } -} diff --git a/docs/reference/generated/accordion-panel.json b/docs/reference/generated/accordion-panel.json deleted file mode 100644 index bf46dde288..0000000000 --- a/docs/reference/generated/accordion-panel.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "AccordionPanel", - "description": "", - "props": { - "className": { - "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." - }, - "hiddenUntilFound": { - "type": "boolean", - "default": "false", - "description": "If `true`, sets `hidden=\"until-found\"` when closed.\nIf `false`, sets `hidden` when closed." - }, - "render": { - "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." - } - } -} diff --git a/docs/reference/generated/accordion-root.json b/docs/reference/generated/accordion-root.json deleted file mode 100644 index 222d772f12..0000000000 --- a/docs/reference/generated/accordion-root.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "AccordionRoot", - "description": "", - "props": { - "animated": { - "type": "boolean", - "default": "true", - "description": "If `true`, the component supports CSS/JS-based animations and transitions." - }, - "className": { - "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." - }, - "defaultValue": { - "type": "Array", - "default": "0", - "description": "The default value representing the currently open `Accordion.Item`\nThis is the uncontrolled counterpart of `value`." - }, - "disabled": { - "type": "boolean", - "default": "false", - "description": "If `true`, the component is disabled." - }, - "loop": { - "type": "boolean", - "default": "true", - "description": "If `true`, focus will loop when moving focus between `Trigger`s using\nthe arrow keys." - }, - "onValueChange": { - "type": "(value) => void", - "description": "Callback fired when an Accordion section is opened or closed.\nThe value representing the involved section is provided as an argument." - }, - "openMultiple": { - "type": "boolean", - "default": "true", - "description": "Whether multiple Accordion sections can be opened at the same time" - }, - "render": { - "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." - }, - "value": { - "type": "Array", - "description": "The value of the currently open `Accordion.Item`\nThis is the controlled counterpart of `defaultValue`." - } - } -} diff --git a/docs/reference/generated/accordion-trigger.json b/docs/reference/generated/accordion-trigger.json deleted file mode 100644 index f6e6ae66f4..0000000000 --- a/docs/reference/generated/accordion-trigger.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "AccordionTrigger", - "description": "", - "props": { - "className": { - "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." - }, - "render": { - "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." - } - } -} diff --git a/docs/reference/generated/alert-dialog-backdrop.json b/docs/reference/generated/alert-dialog-backdrop.json deleted file mode 100644 index a09e5f6699..0000000000 --- a/docs/reference/generated/alert-dialog-backdrop.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "AlertDialogBackdrop", - "description": "", - "props": { - "className": { - "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." - }, - "keepMounted": { - "type": "boolean", - "default": "false", - "description": "If `true`, the backdrop element is kept in the DOM when closed." - }, - "render": { - "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." - } - } -} diff --git a/docs/reference/generated/alert-dialog-close.json b/docs/reference/generated/alert-dialog-close.json deleted file mode 100644 index c050448528..0000000000 --- a/docs/reference/generated/alert-dialog-close.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "AlertDialogClose", - "description": "", - "props": { - "className": { - "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." - }, - "render": { - "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." - } - } -} diff --git a/docs/reference/generated/alert-dialog-description.json b/docs/reference/generated/alert-dialog-description.json deleted file mode 100644 index b4f0642384..0000000000 --- a/docs/reference/generated/alert-dialog-description.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "AlertDialogDescription", - "description": "", - "props": { - "className": { - "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." - }, - "render": { - "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." - } - } -} diff --git a/docs/reference/generated/alert-dialog-popup.json b/docs/reference/generated/alert-dialog-popup.json deleted file mode 100644 index ac6fde4db5..0000000000 --- a/docs/reference/generated/alert-dialog-popup.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "AlertDialogPopup", - "description": "", - "props": { - "className": { - "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." - }, - "container": { - "type": "React.Ref | HTMLElement | null", - "description": "The container element to which the popup is appended to." - }, - "finalFocus": { - "type": "React.Ref", - "description": "Determines an element to focus after the dialog is closed.\nIf not provided, the focus returns to the trigger." - }, - "initialFocus": { - "type": "React.Ref | (interactionType => HTMLElement | null)", - "description": "Determines an element to focus when the dialog is opened.\nIt can be either a ref to the element or a function that returns such a ref.\nIf not provided, the first focusable element is focused." - }, - "keepMounted": { - "type": "boolean", - "default": "false", - "description": "If `true`, the dialog element is kept in the DOM when closed." - }, - "render": { - "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." - } - } -} diff --git a/docs/reference/generated/alert-dialog-root.json b/docs/reference/generated/alert-dialog-root.json deleted file mode 100644 index 7e6420324b..0000000000 --- a/docs/reference/generated/alert-dialog-root.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "AlertDialogRoot", - "description": "", - "props": { - "animated": { - "type": "boolean", - "default": "true", - "description": "If `true`, the dialog supports CSS-based animations and transitions.\nIt is kept in the DOM until the animation completes." - }, - "defaultOpen": { - "type": "boolean", - "description": "Determines whether the dialog is initally open.\nThis is an uncontrolled equivalent of the `open` prop." - }, - "onOpenChange": { - "type": "(open, event) => void", - "description": "Callback invoked when the dialog is being opened or closed." - }, - "open": { - "type": "boolean", - "description": "Determines whether the dialog is open." - } - } -} diff --git a/docs/reference/generated/alert-dialog-title.json b/docs/reference/generated/alert-dialog-title.json deleted file mode 100644 index 92e7c0c382..0000000000 --- a/docs/reference/generated/alert-dialog-title.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "AlertDialogTitle", - "description": "", - "props": { - "className": { - "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." - }, - "render": { - "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." - } - } -} diff --git a/docs/reference/generated/alert-dialog-trigger.json b/docs/reference/generated/alert-dialog-trigger.json deleted file mode 100644 index 24fd03d968..0000000000 --- a/docs/reference/generated/alert-dialog-trigger.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "AlertDialogTrigger", - "description": "", - "props": { - "className": { - "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." - }, - "render": { - "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." - } - } -} diff --git a/docs/reference/generated/checkbox-group-root.json b/docs/reference/generated/checkbox-group-root.json deleted file mode 100644 index 5d96c99720..0000000000 --- a/docs/reference/generated/checkbox-group-root.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "CheckboxGroupRoot", - "description": "The foundation for building custom-styled checkbox groups.", - "props": { - "allValues": { - "type": "string[]", - "description": "All values of the checkboxes in the group." - }, - "className": { - "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." - }, - "defaultValue": { - "type": "string[]", - "description": "The default checked values of the checkbox group. Use when uncontrolled." - }, - "disabled": { - "type": "boolean", - "default": "false", - "description": "Whether the checkbox group is disabled." - }, - "onValueChange": { - "type": "(value, event) => void", - "description": "A callback function that is called when the value of the checkbox group changes.\nUse when controlled." - }, - "preserveChildStates": { - "type": "boolean", - "default": "false", - "description": "Whether the parent checkbox should preserve its child states when checked/unchecked, leading\nto a tri-state checkbox group." - }, - "render": { - "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." - }, - "value": { - "type": "string[]", - "description": "The currently checked values of the checkbox group. Use when controlled." - } - } -} diff --git a/docs/reference/generated/checkbox-indicator.json b/docs/reference/generated/checkbox-indicator.json deleted file mode 100644 index 48378078b8..0000000000 --- a/docs/reference/generated/checkbox-indicator.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "CheckboxIndicator", - "description": "The indicator part of the Checkbox.", - "props": { - "className": { - "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." - }, - "keepMounted": { - "type": "boolean", - "default": "true", - "description": "If `true`, the indicator stays mounted when unchecked. Useful for CSS animations." - }, - "render": { - "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." - } - } -} diff --git a/docs/reference/generated/checkbox-root.json b/docs/reference/generated/checkbox-root.json deleted file mode 100644 index dccc75e2d2..0000000000 --- a/docs/reference/generated/checkbox-root.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "name": "CheckboxRoot", - "description": "The foundation for building custom-styled checkboxes.", - "props": { - "checked": { - "type": "boolean", - "default": "undefined", - "description": "If `true`, the component is checked." - }, - "className": { - "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." - }, - "defaultChecked": { - "type": "boolean", - "default": "false", - "description": "The default checked state. Use when the component is not controlled." - }, - "disabled": { - "type": "boolean", - "default": "false", - "description": "If `true`, the component is disabled." - }, - "indeterminate": { - "type": "boolean", - "default": "false", - "description": "If `true`, the checkbox will be indeterminate." - }, - "inputRef": { - "type": "React.Ref", - "description": "The ref to the input element." - }, - "name": { - "type": "string", - "default": "undefined", - "description": "Name of the underlying input element." - }, - "onCheckedChange": { - "type": "(checked, event) => void", - "description": "Callback fired when the checked state is changed." - }, - "parent": { - "type": "boolean", - "default": "false", - "description": "If `true`, the checkbox is a parent checkbox for a group of child checkboxes." - }, - "readOnly": { - "type": "boolean", - "default": "false", - "description": "If `true`, the component is read only." - }, - "render": { - "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." - }, - "required": { - "type": "boolean", - "default": "false", - "description": "If `true`, the `input` element is required." - } - } -} diff --git a/docs/reference/generated/collapsible-panel.json b/docs/reference/generated/collapsible-panel.json deleted file mode 100644 index 56966e8771..0000000000 --- a/docs/reference/generated/collapsible-panel.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "CollapsiblePanel", - "description": "", - "props": { - "className": { - "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." - }, - "hiddenUntilFound": { - "type": "boolean", - "default": "false", - "description": "If `true`, sets `hidden=\"until-found\"` when closed.\nIf `false`, sets `hidden` when closed." - }, - "render": { - "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." - } - } -} diff --git a/docs/reference/generated/collapsible-root.json b/docs/reference/generated/collapsible-root.json deleted file mode 100644 index 060f5a225d..0000000000 --- a/docs/reference/generated/collapsible-root.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "CollapsibleRoot", - "description": "", - "props": { - "animated": { - "type": "boolean", - "default": "true", - "description": "If `true`, the component supports CSS/JS-based animations and transitions." - }, - "className": { - "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." - }, - "defaultOpen": { - "type": "boolean", - "default": "true", - "description": "If `true`, the Collapsible is initially open.\nThis is the uncontrolled counterpart of `open`." - }, - "disabled": { - "type": "boolean", - "default": "false", - "description": "If `true`, the component is disabled." - }, - "onOpenChange": { - "type": "(open) => void", - "description": "Callback fired when the Collapsible is opened or closed." - }, - "open": { - "type": "boolean", - "description": "If `true`, the Collapsible is initially open.\nThis is the controlled counterpart of `defaultOpen`." - }, - "render": { - "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." - } - } -} diff --git a/docs/reference/generated/collapsible-trigger.json b/docs/reference/generated/collapsible-trigger.json deleted file mode 100644 index 903a24d148..0000000000 --- a/docs/reference/generated/collapsible-trigger.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "CollapsibleTrigger", - "description": "", - "props": { - "className": { - "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." - }, - "render": { - "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." - } - } -} diff --git a/docs/reference/generated/dialog-backdrop.json b/docs/reference/generated/dialog-backdrop.json deleted file mode 100644 index 7ac90105e9..0000000000 --- a/docs/reference/generated/dialog-backdrop.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "DialogBackdrop", - "description": "An overlay displayed beneath the popup. Renders a `
` element.", - "props": { - "className": { - "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." - }, - "keepMounted": { - "type": "boolean", - "default": "false", - "description": "If `true`, the backdrop element is kept in the DOM when closed." - }, - "render": { - "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." - } - }, - "attributes": { - "[data-open]": { - "description": "Present when the dialog is open." - }, - "[data-closed]": { - "description": "Present when the dialog is closed." - }, - "[data-entering]": { - "description": "Present when the dialog is animating in." - }, - "[data-exiting]": { - "description": "Present when the dialog is animating out." - } - } -} diff --git a/docs/reference/generated/dialog-close.json b/docs/reference/generated/dialog-close.json deleted file mode 100644 index 575df807eb..0000000000 --- a/docs/reference/generated/dialog-close.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "DialogClose", - "description": "", - "props": { - "className": { - "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." - }, - "render": { - "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." - } - } -} diff --git a/docs/reference/generated/dialog-description.json b/docs/reference/generated/dialog-description.json deleted file mode 100644 index 2dfee8fd53..0000000000 --- a/docs/reference/generated/dialog-description.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "DialogDescription", - "description": "A paragraph with additional information about the dialog. Renders a `

` element.", - "props": { - "className": { - "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." - }, - "render": { - "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." - } - } -} diff --git a/docs/reference/generated/dialog-popup.json b/docs/reference/generated/dialog-popup.json deleted file mode 100644 index 789b2b1c37..0000000000 --- a/docs/reference/generated/dialog-popup.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "DialogPopup", - "description": "A container for the dialog contents. Renders a `

` element.", - "props": { - "className": { - "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." - }, - "container": { - "type": "React.Ref | HTMLElement | null", - "description": "The container element to which the popup is appended to." - }, - "finalFocus": { - "type": "React.Ref", - "description": "Determines an element to focus after the dialog is closed.\nIf not provided, the focus returns to the trigger." - }, - "initialFocus": { - "type": "React.Ref | (interactionType => HTMLElement | null)", - "description": "Determines an element to focus when the dialog is opened.\nIt can be either a ref to the element or a function that returns such a ref.\nIf not provided, the first focusable element is focused." - }, - "keepMounted": { - "type": "boolean", - "default": "false", - "description": "If `true`, the dialog element is kept in the DOM when closed." - }, - "render": { - "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." - } - }, - "attributes": { - "[data-open]": { - "description": "Present when the dialog is open." - }, - "[data-closed]": { - "description": "Present when the dialog is closed." - }, - "[data-entering]": { - "description": "Present when the dialog is animating in." - }, - "[data-exiting]": { - "description": "Present when the dialog is animating out." - }, - "[data-modal]": { - "description": "Present when the dialog is modal." - }, - "[data-nested-dialogs]": { - "type": "number", - "description": "Indicates how many dialogs are nested within." - } - }, - "cssVariables": { - "--nested-dialogs": { - "type": "number", - "description": "Indicates how many dialogs are nested within." - } - } -} diff --git a/docs/reference/generated/dialog-root.json b/docs/reference/generated/dialog-root.json deleted file mode 100644 index af19098732..0000000000 --- a/docs/reference/generated/dialog-root.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "DialogRoot", - "description": "Groups all parts of the dialog. Doesn’t render its own HTML element.", - "props": { - "animated": { - "type": "boolean", - "default": "true", - "description": "If `true`, the dialog supports CSS-based animations and transitions.\nIt is kept in the DOM until the animation completes." - }, - "defaultOpen": { - "type": "boolean", - "description": "Determines whether the dialog is initally open.\nThis is an uncontrolled equivalent of the `open` prop." - }, - "dismissible": { - "type": "boolean", - "default": "true", - "description": "Determines whether the dialog should close when clicking outside of it." - }, - "modal": { - "type": "boolean", - "default": "true", - "description": "Determines whether the dialog is modal." - }, - "onOpenChange": { - "type": "(open, event) => void", - "description": "Callback invoked when the dialog is being opened or closed." - }, - "open": { - "type": "boolean", - "description": "Determines whether the dialog is open." - } - } -} diff --git a/docs/reference/generated/dialog-title.json b/docs/reference/generated/dialog-title.json deleted file mode 100644 index 3afaead6da..0000000000 --- a/docs/reference/generated/dialog-title.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "DialogTitle", - "description": "A heading that labels the dialog. Renders an `

` element.", - "props": { - "className": { - "type": "string | (state) => string", - "description": "Class names applied to the element or a function that returns them based on the component's state." - }, - "render": { - "type": "React.ReactElement | (props, state) => React.ReactElement", - "description": "A function to customize rendering of the component." - } - } -} diff --git a/docs/reference/generated/dialog-trigger.json b/docs/reference/generated/dialog-trigger.json deleted file mode 100644 index 0336866143..0000000000 --- a/docs/reference/generated/dialog-trigger.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "DialogTrigger", - "description": "A button that opens the dialog. Renders a `