a45cb6ff6a
* remove `DialogBackdrop` and `DialogOverlay` We deprecated those components in v1.6, since they are no longer documented and this is a major release, we can safely get rid of it. * update changelog * migrate playground example to use `Dialog.Panel`
97 lines
1.5 KiB
TypeScript
97 lines
1.5 KiB
TypeScript
import * as HeadlessUI from './index'
|
|
|
|
/**
|
|
* Looks a bit of a silly test, however this ensures that we don't accidentally expose something to
|
|
* the outside world that we didn't want!
|
|
*/
|
|
it('should expose the correct components', () => {
|
|
expect(Object.keys(HeadlessUI).sort((a, z) => a.localeCompare(z))).toEqual([
|
|
'Button',
|
|
|
|
'Checkbox',
|
|
|
|
'CloseButton',
|
|
|
|
'Combobox',
|
|
'ComboboxButton',
|
|
'ComboboxInput',
|
|
'ComboboxLabel',
|
|
'ComboboxOption',
|
|
'ComboboxOptions',
|
|
|
|
'DataInteractive',
|
|
|
|
'Description',
|
|
|
|
'Dialog',
|
|
'DialogDescription',
|
|
'DialogPanel',
|
|
'DialogTitle',
|
|
|
|
'Disclosure',
|
|
'DisclosureButton',
|
|
'DisclosurePanel',
|
|
|
|
'Field',
|
|
'Fieldset',
|
|
|
|
'FocusTrap',
|
|
'FocusTrapFeatures',
|
|
|
|
'Input',
|
|
|
|
'Label',
|
|
|
|
'Legend',
|
|
|
|
'Listbox',
|
|
'ListboxButton',
|
|
'ListboxLabel',
|
|
'ListboxOption',
|
|
'ListboxOptions',
|
|
'ListboxSelectedOption',
|
|
|
|
'Menu',
|
|
'MenuButton',
|
|
'MenuHeading',
|
|
'MenuItem',
|
|
'MenuItems',
|
|
'MenuSection',
|
|
'MenuSeparator',
|
|
|
|
'Popover',
|
|
'PopoverButton',
|
|
'PopoverGroup',
|
|
'PopoverOverlay',
|
|
'PopoverPanel',
|
|
|
|
'Portal',
|
|
|
|
'Radio',
|
|
'RadioGroup',
|
|
'RadioGroupDescription',
|
|
'RadioGroupLabel',
|
|
'RadioGroupOption',
|
|
|
|
'Select',
|
|
|
|
'Switch',
|
|
'SwitchDescription',
|
|
'SwitchGroup',
|
|
'SwitchLabel',
|
|
|
|
'Tab',
|
|
'TabGroup',
|
|
'TabList',
|
|
'TabPanel',
|
|
'TabPanels',
|
|
|
|
'Textarea',
|
|
|
|
'Transition',
|
|
'TransitionChild',
|
|
|
|
'useClose',
|
|
])
|
|
})
|