@basic-ui/core 0.0.54 → 0.0.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/build/cjs/index.js +364 -591
- package/build/cjs/index.js.map +1 -1
- package/build/esm/Accordion/Accordion.d.ts +9 -9
- package/build/esm/Accordion/Accordion.js +20 -29
- package/build/esm/Accordion/Accordion.js.map +1 -1
- package/build/esm/Accordion/AccordionBody.d.ts +6 -6
- package/build/esm/Accordion/AccordionBody.js +18 -32
- package/build/esm/Accordion/AccordionBody.js.map +1 -1
- package/build/esm/Accordion/AccordionHeader.d.ts +7 -7
- package/build/esm/Accordion/AccordionHeader.js +37 -74
- package/build/esm/Accordion/AccordionHeader.js.map +1 -1
- package/build/esm/Accordion/AccordionItem.d.ts +9 -9
- package/build/esm/Accordion/AccordionItem.js +19 -22
- package/build/esm/Accordion/AccordionItem.js.map +1 -1
- package/build/esm/Accordion/context.d.ts +19 -19
- package/build/esm/Accordion/context.js +16 -13
- package/build/esm/Accordion/context.js.map +1 -1
- package/build/esm/Accordion/index.d.ts +4 -4
- package/build/esm/Accordion/index.js.map +1 -1
- package/build/esm/Accordion/scopeQuery.d.ts +2 -2
- package/build/esm/Accordion/scopeQuery.js.map +1 -1
- package/build/esm/CheckBox/CheckBox.d.ts +7 -7
- package/build/esm/CheckBox/CheckBox.js +15 -25
- package/build/esm/CheckBox/CheckBox.js.map +1 -1
- package/build/esm/CheckBox/index.d.ts +1 -1
- package/build/esm/CheckBox/index.js.map +1 -1
- package/build/esm/ComboBox/Combobox.d.ts +18 -18
- package/build/esm/ComboBox/Combobox.js +52 -59
- package/build/esm/ComboBox/Combobox.js.map +1 -1
- package/build/esm/ComboBox/ComboboxButton.d.ts +9 -9
- package/build/esm/ComboBox/ComboboxButton.js +23 -28
- package/build/esm/ComboBox/ComboboxButton.js.map +1 -1
- package/build/esm/ComboBox/ComboboxInput.d.ts +17 -17
- package/build/esm/ComboBox/ComboboxInput.js +67 -70
- package/build/esm/ComboBox/ComboboxInput.js.map +1 -1
- package/build/esm/ComboBox/ComboboxLabel.d.ts +7 -7
- package/build/esm/ComboBox/ComboboxLabel.js +15 -17
- package/build/esm/ComboBox/ComboboxLabel.js.map +1 -1
- package/build/esm/ComboBox/ComboboxList.d.ts +8 -8
- package/build/esm/ComboBox/ComboboxList.js +19 -20
- package/build/esm/ComboBox/ComboboxList.js.map +1 -1
- package/build/esm/ComboBox/ComboboxOption.d.ts +11 -11
- package/build/esm/ComboBox/ComboboxOption.js +41 -45
- package/build/esm/ComboBox/ComboboxOption.js.map +1 -1
- package/build/esm/ComboBox/ComboboxPopover.d.ts +9 -9
- package/build/esm/ComboBox/ComboboxPopover.js +22 -21
- package/build/esm/ComboBox/ComboboxPopover.js.map +1 -1
- package/build/esm/ComboBox/cities.d.ts +5 -5
- package/build/esm/ComboBox/cities.js.map +1 -1
- package/build/esm/ComboBox/context.d.ts +30 -30
- package/build/esm/ComboBox/context.js +5 -6
- package/build/esm/ComboBox/context.js.map +1 -1
- package/build/esm/ComboBox/hooks.d.ts +37 -37
- package/build/esm/ComboBox/hooks.js +175 -148
- package/build/esm/ComboBox/hooks.js.map +1 -1
- package/build/esm/ComboBox/index.d.ts +8 -8
- package/build/esm/ComboBox/index.js.map +1 -1
- package/build/esm/ComboBox/makeHash.d.ts +1 -1
- package/build/esm/ComboBox/makeHash.js +3 -6
- package/build/esm/ComboBox/makeHash.js.map +1 -1
- package/build/esm/ComboBox/scopeQuery.d.ts +1 -1
- package/build/esm/ComboBox/scopeQuery.js.map +1 -1
- package/build/esm/FocusLock/FocusLock.d.ts +9 -9
- package/build/esm/FocusLock/FocusLock.js +26 -32
- package/build/esm/FocusLock/FocusLock.js.map +1 -1
- package/build/esm/FocusLock/index.d.ts +1 -1
- package/build/esm/FocusLock/index.js.map +1 -1
- package/build/esm/FocusLock/tabUtils.d.ts +3 -3
- package/build/esm/FocusLock/tabUtils.js +5 -7
- package/build/esm/FocusLock/tabUtils.js.map +1 -1
- package/build/esm/FocusLock/useFocusLock.d.ts +7 -7
- package/build/esm/FocusLock/useFocusLock.js +14 -19
- package/build/esm/FocusLock/useFocusLock.js.map +1 -1
- package/build/esm/List/List.d.ts +7 -7
- package/build/esm/List/List.js +9 -11
- package/build/esm/List/List.js.map +1 -1
- package/build/esm/List/ListItem.d.ts +7 -7
- package/build/esm/List/ListItem.js +9 -11
- package/build/esm/List/ListItem.js.map +1 -1
- package/build/esm/List/context.d.ts +4 -4
- package/build/esm/List/context.js +6 -6
- package/build/esm/List/context.js.map +1 -1
- package/build/esm/List/index.d.ts +2 -2
- package/build/esm/List/index.js.map +1 -1
- package/build/esm/Menu/ContextMenuTrigger.d.ts +11 -11
- package/build/esm/Menu/ContextMenuTrigger.js +32 -37
- package/build/esm/Menu/ContextMenuTrigger.js.map +1 -1
- package/build/esm/Menu/Menu.d.ts +10 -10
- package/build/esm/Menu/Menu.js +33 -49
- package/build/esm/Menu/Menu.js.map +1 -1
- package/build/esm/Menu/MenuButton.d.ts +11 -11
- package/build/esm/Menu/MenuButton.js +28 -44
- package/build/esm/Menu/MenuButton.js.map +1 -1
- package/build/esm/Menu/MenuItem.d.ts +8 -8
- package/build/esm/Menu/MenuItem.js +29 -38
- package/build/esm/Menu/MenuItem.js.map +1 -1
- package/build/esm/Menu/MenuList.d.ts +7 -7
- package/build/esm/Menu/MenuList.js +61 -116
- package/build/esm/Menu/MenuList.js.map +1 -1
- package/build/esm/Menu/MenuPopover.d.ts +8 -8
- package/build/esm/Menu/MenuPopover.js +16 -19
- package/build/esm/Menu/MenuPopover.js.map +1 -1
- package/build/esm/Menu/context.d.ts +25 -25
- package/build/esm/Menu/context.js +14 -12
- package/build/esm/Menu/context.js.map +1 -1
- package/build/esm/Menu/fixtures/countryList.d.ts +1 -1
- package/build/esm/Menu/fixtures/countryList.js +1 -1
- package/build/esm/Menu/fixtures/countryList.js.map +1 -1
- package/build/esm/Menu/index.d.ts +6 -6
- package/build/esm/Menu/index.js.map +1 -1
- package/build/esm/Menu/scope.d.ts +1 -1
- package/build/esm/Menu/scope.js.map +1 -1
- package/build/esm/Modal/Modal.d.ts +9 -9
- package/build/esm/Modal/Modal.js +13 -18
- package/build/esm/Modal/Modal.js.map +1 -1
- package/build/esm/Modal/ModalBackdrop.d.ts +10 -10
- package/build/esm/Modal/ModalBackdrop.js +24 -33
- package/build/esm/Modal/ModalBackdrop.js.map +1 -1
- package/build/esm/Modal/index.d.ts +2 -2
- package/build/esm/Modal/index.js.map +1 -1
- package/build/esm/Popper/Popper.d.ts +35 -35
- package/build/esm/Popper/Popper.js +44 -60
- package/build/esm/Popper/Popper.js.map +1 -1
- package/build/esm/Popper/PopperArrow.d.ts +6 -6
- package/build/esm/Popper/PopperArrow.js +11 -16
- package/build/esm/Popper/PopperArrow.js.map +1 -1
- package/build/esm/Popper/context.d.ts +6 -6
- package/build/esm/Popper/context.js +3 -5
- package/build/esm/Popper/context.js.map +1 -1
- package/build/esm/Popper/index.d.ts +3 -3
- package/build/esm/Popper/index.js.map +1 -1
- package/build/esm/Portal/Portal.d.ts +7 -7
- package/build/esm/Portal/Portal.js +9 -11
- package/build/esm/Portal/Portal.js.map +1 -1
- package/build/esm/Portal/PortalSelectorProvider.d.ts +8 -8
- package/build/esm/Portal/PortalSelectorProvider.js +6 -4
- package/build/esm/Portal/PortalSelectorProvider.js.map +1 -1
- package/build/esm/Portal/index.d.ts +2 -2
- package/build/esm/Portal/index.js.map +1 -1
- package/build/esm/RadioButton/RadioButton.d.ts +10 -10
- package/build/esm/RadioButton/RadioButton.js +17 -23
- package/build/esm/RadioButton/RadioButton.js.map +1 -1
- package/build/esm/RadioButton/RadioGroup.d.ts +12 -12
- package/build/esm/RadioButton/RadioGroup.js +19 -28
- package/build/esm/RadioButton/RadioGroup.js.map +1 -1
- package/build/esm/RadioButton/context.d.ts +9 -9
- package/build/esm/RadioButton/context.js +8 -6
- package/build/esm/RadioButton/context.js.map +1 -1
- package/build/esm/RadioButton/index.d.ts +2 -2
- package/build/esm/RadioButton/index.js.map +1 -1
- package/build/esm/SkipNav/SkipNav.d.ts +7 -7
- package/build/esm/SkipNav/SkipNav.js +9 -11
- package/build/esm/SkipNav/SkipNav.js.map +1 -1
- package/build/esm/SkipNav/index.d.ts +1 -1
- package/build/esm/SkipNav/index.js.map +1 -1
- package/build/esm/Slider/Slider.d.ts +197 -197
- package/build/esm/Slider/Slider.js +422 -489
- package/build/esm/Slider/Slider.js.map +1 -1
- package/build/esm/Slider/index.d.ts +1 -1
- package/build/esm/Slider/index.js.map +1 -1
- package/build/esm/Spinner/Spinner.d.ts +12 -12
- package/build/esm/Spinner/Spinner.js +31 -59
- package/build/esm/Spinner/Spinner.js.map +1 -1
- package/build/esm/Spinner/SpinnerButton.d.ts +8 -8
- package/build/esm/Spinner/SpinnerButton.js +14 -19
- package/build/esm/Spinner/SpinnerButton.js.map +1 -1
- package/build/esm/Spinner/context.d.ts +12 -12
- package/build/esm/Spinner/context.js +8 -7
- package/build/esm/Spinner/context.js.map +1 -1
- package/build/esm/Spinner/index.d.ts +2 -2
- package/build/esm/Spinner/index.js.map +1 -1
- package/build/esm/Tabs/Tab.d.ts +7 -7
- package/build/esm/Tabs/Tab.js +32 -50
- package/build/esm/Tabs/Tab.js.map +1 -1
- package/build/esm/Tabs/TabList.d.ts +9 -9
- package/build/esm/Tabs/TabList.js +24 -34
- package/build/esm/Tabs/TabList.js.map +1 -1
- package/build/esm/Tabs/TabPanel.d.ts +8 -8
- package/build/esm/Tabs/TabPanel.js +16 -23
- package/build/esm/Tabs/TabPanel.js.map +1 -1
- package/build/esm/Tabs/TabPanels.d.ts +8 -8
- package/build/esm/Tabs/TabPanels.js +15 -20
- package/build/esm/Tabs/TabPanels.js.map +1 -1
- package/build/esm/Tabs/Tabs.d.ts +10 -10
- package/build/esm/Tabs/Tabs.js +17 -33
- package/build/esm/Tabs/Tabs.js.map +1 -1
- package/build/esm/Tabs/context.d.ts +17 -17
- package/build/esm/Tabs/context.js +16 -13
- package/build/esm/Tabs/context.js.map +1 -1
- package/build/esm/Tabs/index.d.ts +5 -5
- package/build/esm/Tabs/index.js.map +1 -1
- package/build/esm/Tabs/scopeQuery.d.ts +1 -1
- package/build/esm/Tabs/scopeQuery.js.map +1 -1
- package/build/esm/Tooltip/Tooltip.d.ts +10 -10
- package/build/esm/Tooltip/Tooltip.js +20 -30
- package/build/esm/Tooltip/Tooltip.js.map +1 -1
- package/build/esm/Tooltip/index.d.ts +1 -1
- package/build/esm/Tooltip/index.js.map +1 -1
- package/build/esm/Tooltip/stateMachine.d.ts +28 -28
- package/build/esm/Tooltip/stateMachine.js +95 -81
- package/build/esm/Tooltip/stateMachine.js.map +1 -1
- package/build/esm/Tooltip/useTooltip.d.ts +10 -10
- package/build/esm/Tooltip/useTooltip.js +38 -50
- package/build/esm/Tooltip/useTooltip.js.map +1 -1
- package/build/esm/hooks/index.d.ts +13 -13
- package/build/esm/hooks/index.js.map +1 -1
- package/build/esm/hooks/useAutoFocus.d.ts +2 -2
- package/build/esm/hooks/useAutoFocus.js +3 -3
- package/build/esm/hooks/useAutoFocus.js.map +1 -1
- package/build/esm/hooks/useChildrenCounter.d.ts +7 -7
- package/build/esm/hooks/useChildrenCounter.js +6 -8
- package/build/esm/hooks/useChildrenCounter.js.map +1 -1
- package/build/esm/hooks/useControlledState.d.ts +3 -3
- package/build/esm/hooks/useControlledState.js +6 -16
- package/build/esm/hooks/useControlledState.js.map +1 -1
- package/build/esm/hooks/useFocusReturn.d.ts +2 -2
- package/build/esm/hooks/useFocusReturn.js +8 -12
- package/build/esm/hooks/useFocusReturn.js.map +1 -1
- package/build/esm/hooks/useFocusState.d.ts +11 -11
- package/build/esm/hooks/useFocusState.js +9 -15
- package/build/esm/hooks/useFocusState.js.map +1 -1
- package/build/esm/hooks/useGestureHandlers.d.ts +52 -52
- package/build/esm/hooks/useGestureHandlers.js +80 -100
- package/build/esm/hooks/useGestureHandlers.js.map +1 -1
- package/build/esm/hooks/useMeasure.d.ts +7 -7
- package/build/esm/hooks/useMeasure.js +7 -15
- package/build/esm/hooks/useMeasure.js.map +1 -1
- package/build/esm/hooks/useOnClickOutside.d.ts +2 -2
- package/build/esm/hooks/useOnClickOutside.js +4 -6
- package/build/esm/hooks/useOnClickOutside.js.map +1 -1
- package/build/esm/hooks/useOnKeyDown.d.ts +1 -1
- package/build/esm/hooks/useOnKeyDown.js +3 -4
- package/build/esm/hooks/useOnKeyDown.js.map +1 -1
- package/build/esm/hooks/useReducerMachine.d.ts +24 -24
- package/build/esm/hooks/useReducerMachine.js +15 -26
- package/build/esm/hooks/useReducerMachine.js.map +1 -1
- package/build/esm/hooks/useRemoveBodyScroll.d.ts +2 -2
- package/build/esm/hooks/useRemoveBodyScroll.js +9 -14
- package/build/esm/hooks/useRemoveBodyScroll.js.map +1 -1
- package/build/esm/hooks/useScope.d.ts +11 -11
- package/build/esm/hooks/useScope.js +12 -14
- package/build/esm/hooks/useScope.js.map +1 -1
- package/build/esm/hooks/useThrottle.d.ts +1 -1
- package/build/esm/hooks/useThrottle.js +5 -10
- package/build/esm/hooks/useThrottle.js.map +1 -1
- package/build/esm/index.d.ts +15 -15
- package/build/esm/index.js +4 -2
- package/build/esm/index.js.map +1 -1
- package/build/esm/styles.d.js +2 -0
- package/build/esm/styles.d.js.map +1 -0
- package/build/esm/utils/assign-ref.d.ts +3 -3
- package/build/esm/utils/assign-ref.js +3 -5
- package/build/esm/utils/assign-ref.js.map +1 -1
- package/build/esm/utils/can-use-dom.d.ts +1 -1
- package/build/esm/utils/can-use-dom.js.map +1 -1
- package/build/esm/utils/clamp.d.ts +1 -1
- package/build/esm/utils/clamp.js.map +1 -1
- package/build/esm/utils/context.d.ts +7 -7
- package/build/esm/utils/context.js +13 -20
- package/build/esm/utils/context.js.map +1 -1
- package/build/esm/utils/create-subscription.d.ts +4 -4
- package/build/esm/utils/create-subscription.js +5 -10
- package/build/esm/utils/create-subscription.js.map +1 -1
- package/build/esm/utils/get-circular-index.d.ts +1 -1
- package/build/esm/utils/get-circular-index.js +0 -1
- package/build/esm/utils/get-circular-index.js.map +1 -1
- package/build/esm/utils/index.d.ts +10 -10
- package/build/esm/utils/index.js.map +1 -1
- package/build/esm/utils/is-right-click.d.ts +6 -6
- package/build/esm/utils/is-right-click.js +4 -4
- package/build/esm/utils/is-right-click.js.map +1 -1
- package/build/esm/utils/owner-document.d.ts +7 -7
- package/build/esm/utils/owner-document.js +6 -6
- package/build/esm/utils/owner-document.js.map +1 -1
- package/build/esm/utils/polymorphic.d.ts +39 -39
- package/build/esm/utils/polymorphic.js.map +1 -1
- package/build/esm/utils/rubber-band-clamp.d.ts +2 -2
- package/build/esm/utils/rubber-band-clamp.js +2 -5
- package/build/esm/utils/rubber-band-clamp.js.map +1 -1
- package/build/esm/utils/use-stable-callback.d.ts +16 -16
- package/build/esm/utils/use-stable-callback.js +24 -26
- package/build/esm/utils/use-stable-callback.js.map +1 -1
- package/build/esm/utils/wrap-event.d.ts +3 -3
- package/build/esm/utils/wrap-event.js +2 -5
- package/build/esm/utils/wrap-event.js.map +1 -1
- package/build/tsconfig-build.tsbuildinfo +1 -1
- package/package.json +7 -11
- package/src/Accordion/Accordion.story.tsx +74 -74
- package/src/Accordion/Accordion.tsx +59 -59
- package/src/Accordion/AccordionBody.tsx +52 -52
- package/src/Accordion/AccordionHeader.tsx +166 -167
- package/src/Accordion/AccordionItem.tsx +50 -50
- package/src/Accordion/context.ts +37 -37
- package/src/Accordion/index.ts +4 -4
- package/src/Accordion/scopeQuery.ts +7 -7
- package/src/Accordion/styles.css +21 -21
- package/src/CheckBox/CheckBox.tsx +41 -41
- package/src/CheckBox/index.ts +1 -1
- package/src/ComboBox/ComboBox.story.tsx +120 -120
- package/src/ComboBox/Combobox.tsx +148 -148
- package/src/ComboBox/ComboboxButton.tsx +61 -61
- package/src/ComboBox/ComboboxInput.tsx +187 -187
- package/src/ComboBox/ComboboxLabel.tsx +33 -33
- package/src/ComboBox/ComboboxList.tsx +47 -47
- package/src/ComboBox/ComboboxOption.tsx +110 -111
- package/src/ComboBox/ComboboxPopover.tsx +64 -64
- package/src/ComboBox/cities.ts +23194 -23194
- package/src/ComboBox/context.ts +35 -35
- package/src/ComboBox/hooks.tsx +448 -451
- package/src/ComboBox/index.ts +8 -8
- package/src/ComboBox/makeHash.ts +19 -19
- package/src/ComboBox/scopeQuery.ts +6 -6
- package/src/ComboBox/styles.css +32 -32
- package/src/FocusLock/FocusLock.tsx +66 -66
- package/src/FocusLock/index.ts +1 -1
- package/src/FocusLock/tabUtils.ts +40 -40
- package/src/FocusLock/useFocusLock.ts +55 -56
- package/src/List/List.story.tsx +18 -18
- package/src/List/List.tsx +17 -17
- package/src/List/ListItem.tsx +23 -23
- package/src/List/context.ts +19 -19
- package/src/List/index.ts +2 -2
- package/src/Menu/ContextMenu.story.tsx +73 -73
- package/src/Menu/ContextMenuTrigger.tsx +76 -76
- package/src/Menu/Menu.story.tsx +160 -160
- package/src/Menu/Menu.tsx +82 -83
- package/src/Menu/MenuButton.tsx +83 -83
- package/src/Menu/MenuComplex.story.tsx +58 -58
- package/src/Menu/MenuItem.tsx +87 -88
- package/src/Menu/MenuList.tsx +254 -254
- package/src/Menu/MenuPopover.tsx +35 -35
- package/src/Menu/context.ts +44 -44
- package/src/Menu/fixtures/countryList.ts +198 -198
- package/src/Menu/index.ts +6 -6
- package/src/Menu/scope.ts +7 -7
- package/src/Menu/styles.css +42 -42
- package/src/Modal/Modal.story.tsx +262 -258
- package/src/Modal/Modal.tsx +48 -48
- package/src/Modal/ModalBackdrop.tsx +78 -78
- package/src/Modal/NavDrawer.story.tsx +161 -158
- package/src/Modal/index.ts +2 -2
- package/src/Modal/styles.css +46 -46
- package/src/Popper/Popper.story.tsx +279 -263
- package/src/Popper/Popper.tsx +1 -1
- package/src/Popper/PopperArrow.tsx +35 -35
- package/src/Popper/context.ts +10 -10
- package/src/Popper/index.ts +3 -3
- package/src/Popper/styles.css +60 -60
- package/src/RadioButton/RadioButton.story.tsx +78 -77
- package/src/RadioButton/RadioButton.tsx +55 -55
- package/src/RadioButton/RadioGroup.tsx +60 -60
- package/src/RadioButton/context.ts +17 -17
- package/src/RadioButton/index.ts +2 -2
- package/src/SkipNav/SkipNav.tsx +16 -16
- package/src/SkipNav/index.tsx +1 -1
- package/src/Slider/Slider.story.tsx +45 -45
- package/src/Slider/Slider.tsx +1115 -1120
- package/src/Slider/index.ts +1 -1
- package/src/Slider/styles.css +131 -131
- package/src/Spinner/Spinner.story.tsx +31 -31
- package/src/Spinner/Spinner.tsx +117 -117
- package/src/Spinner/SpinnerButton.tsx +54 -54
- package/src/Spinner/context.ts +20 -20
- package/src/Spinner/index.ts +2 -2
- package/src/Spinner/styles.css +23 -23
- package/src/Tabs/Tab.story.tsx +80 -80
- package/src/Tabs/Tab.tsx +136 -136
- package/src/Tabs/TabList.tsx +71 -71
- package/src/Tabs/TabPanel.tsx +53 -53
- package/src/Tabs/TabPanels.tsx +30 -30
- package/src/Tabs/Tabs.tsx +46 -46
- package/src/Tabs/context.ts +30 -30
- package/src/Tabs/index.tsx +5 -5
- package/src/Tabs/scopeQuery.ts +6 -6
- package/src/Tooltip/Tooltip.story.tsx +61 -61
- package/src/Tooltip/Tooltip.tsx +53 -50
- package/src/Tooltip/index.ts +1 -1
- package/src/Tooltip/stateMachine.ts +192 -192
- package/src/Tooltip/styles.css +17 -17
- package/src/Tooltip/useTooltip.ts +136 -136
- package/src/hooks/index.ts +13 -13
- package/src/hooks/useAutoFocus.ts +22 -22
- package/src/hooks/useChildrenCounter.ts +51 -51
- package/src/hooks/useControlledState.ts +1 -6
- package/src/hooks/useFocusReturn.ts +43 -43
- package/src/hooks/useFocusState.ts +30 -30
- package/src/hooks/useGestureHandlers.ts +282 -286
- package/src/hooks/useMeasure.ts +33 -33
- package/src/hooks/useOnClickOutside.ts +32 -32
- package/src/hooks/useOnKeyDown.ts +19 -19
- package/src/hooks/useReducerMachine.ts +60 -60
- package/src/hooks/useRemoveBodyScroll.ts +38 -39
- package/src/hooks/useScope.ts +52 -52
- package/src/hooks/useThrottle.ts +19 -19
- package/src/index.ts +20 -20
- package/src/styles.d.ts +1 -0
- package/src/utils/assign-ref.ts +27 -27
- package/src/utils/can-use-dom.ts +7 -7
- package/src/utils/clamp.ts +3 -3
- package/src/utils/context.tsx +48 -48
- package/src/utils/create-subscription.ts +16 -16
- package/src/utils/get-circular-index.ts +7 -7
- package/src/utils/index.ts +10 -10
- package/src/utils/is-right-click.ts +14 -14
- package/src/utils/owner-document.ts +13 -13
- package/src/utils/polymorphic.ts +82 -78
- package/src/utils/rubber-band-clamp.ts +25 -25
- package/src/utils/use-stable-callback.ts +57 -58
- package/src/utils/wrap-event.ts +22 -22
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import { useContext, createContext } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
2
|
+
|
|
3
|
+
// AccordionGroup Component
|
|
4
|
+
|
|
5
|
+
const accordionContext = /*#__PURE__*/createContext(null);
|
|
6
|
+
export const {
|
|
7
|
+
Provider: AccordionProvider
|
|
8
|
+
} = accordionContext;
|
|
9
|
+
export const useAccordionContext = () => useContext(accordionContext);
|
|
10
|
+
|
|
11
|
+
// Accordion Component
|
|
12
|
+
|
|
13
|
+
const accordionItemContext = /*#__PURE__*/createContext(null);
|
|
14
|
+
export const {
|
|
15
|
+
Provider: AccordionItemProvider
|
|
16
|
+
} = accordionItemContext;
|
|
17
|
+
export const useAccordionItemContext = () => useContext(accordionItemContext);
|
|
15
18
|
//# sourceMappingURL=context.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","names":["useContext","createContext","accordionContext","
|
|
1
|
+
{"version":3,"file":"context.js","names":["useContext","createContext","accordionContext","Provider","AccordionProvider","useAccordionContext","accordionItemContext","AccordionItemProvider","useAccordionItemContext"],"sources":["../../../src/Accordion/context.ts"],"sourcesContent":["import type { KeyboardEvent, MouseEvent } from 'react';\nimport { useContext, createContext } from 'react';\n\nimport type { Scope } from '../hooks/useScope';\n\n// AccordionGroup Component\nexport interface AccordionContextProps {\n childrenHeaderHasFocus: boolean;\n setChildrenHeaderHasFocus: (value: boolean) => void;\n scope: Scope<HTMLElement>;\n expandedIndex: number;\n onChange?: (\n e: KeyboardEvent<HTMLDivElement> | MouseEvent<HTMLDivElement>,\n index: number\n ) => void;\n}\n\nconst accordionContext = createContext<AccordionContextProps | null>(null);\nexport const { Provider: AccordionProvider } = accordionContext;\nexport const useAccordionContext = () => useContext(accordionContext);\n\n// Accordion Component\nexport interface AccordionItemContextProps {\n headerId: string | undefined;\n bodyId: string | undefined;\n expanded: boolean;\n onChange?: (\n e: KeyboardEvent<HTMLDivElement> | MouseEvent<HTMLDivElement>,\n value: boolean\n ) => void;\n}\n\nconst accordionItemContext = createContext<AccordionItemContextProps | null>(\n null\n);\nexport const { Provider: AccordionItemProvider } = accordionItemContext;\nexport const useAccordionItemContext = () => useContext(accordionItemContext);\n"],"mappings":"AACA,SAASA,UAAU,EAAEC,aAAa,QAAQ,OAAO;;AAIjD;;AAYA,MAAMC,gBAAgB,gBAAGD,aAAa,CAA+B,IAAI,CAAC;AAC1E,OAAO,MAAM;EAAEE,QAAQ,EAAEC;AAAkB,CAAC,GAAGF,gBAAgB;AAC/D,OAAO,MAAMG,mBAAmB,GAAGA,CAAA,KAAML,UAAU,CAACE,gBAAgB,CAAC;;AAErE;;AAWA,MAAMI,oBAAoB,gBAAGL,aAAa,CACxC,IACF,CAAC;AACD,OAAO,MAAM;EAAEE,QAAQ,EAAEI;AAAsB,CAAC,GAAGD,oBAAoB;AACvE,OAAO,MAAME,uBAAuB,GAAGA,CAAA,KAAMR,UAAU,CAACM,oBAAoB,CAAC","ignoreList":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './Accordion';
|
|
2
|
-
export * from './AccordionItem';
|
|
3
|
-
export * from './AccordionHeader';
|
|
4
|
-
export * from './AccordionBody';
|
|
1
|
+
export * from './Accordion';
|
|
2
|
+
export * from './AccordionItem';
|
|
3
|
+
export * from './AccordionHeader';
|
|
4
|
+
export * from './AccordionBody';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/Accordion/index.ts"],"sourcesContent":["export * from './Accordion';\
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/Accordion/index.ts"],"sourcesContent":["export * from './Accordion';\nexport * from './AccordionItem';\nexport * from './AccordionHeader';\nexport * from './AccordionBody';\n"],"mappings":"AAAA,cAAc,aAAa;AAC3B,cAAc,iBAAiB;AAC/B,cAAc,mBAAmB;AACjC,cAAc,iBAAiB","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function headerScopeQuery(type: string, props: Record<string, unknown>): boolean;
|
|
2
|
-
export declare function bodyScopeQuery(type: string, props: Record<string, unknown>): boolean;
|
|
1
|
+
export declare function headerScopeQuery(type: string, props: Record<string, unknown>): boolean;
|
|
2
|
+
export declare function bodyScopeQuery(type: string, props: Record<string, unknown>): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scopeQuery.js","names":["headerScopeQuery","type","props","bodyScopeQuery"],"sources":["../../../src/Accordion/scopeQuery.ts"],"sourcesContent":["export function headerScopeQuery(type: string, props: Record<string, unknown>) {\
|
|
1
|
+
{"version":3,"file":"scopeQuery.js","names":["headerScopeQuery","type","props","bodyScopeQuery"],"sources":["../../../src/Accordion/scopeQuery.ts"],"sourcesContent":["export function headerScopeQuery(type: string, props: Record<string, unknown>) {\n return props['data-accordion-header'] === '';\n}\n\nexport function bodyScopeQuery(type: string, props: Record<string, unknown>) {\n return props['data-accordion-body'] === '';\n}\n"],"mappings":"AAAA,OAAO,SAASA,gBAAgBA,CAACC,IAAY,EAAEC,KAA8B,EAAE;EAC7E,OAAOA,KAAK,CAAC,uBAAuB,CAAC,KAAK,EAAE;AAC9C;AAEA,OAAO,SAASC,cAAcA,CAACF,IAAY,EAAEC,KAA8B,EAAE;EAC3E,OAAOA,KAAK,CAAC,qBAAqB,CAAC,KAAK,EAAE;AAC5C","ignoreList":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { ElementType, InputHTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
export interface CheckBoxProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
3
|
-
as?: ElementType<any>;
|
|
4
|
-
innerAs?: ElementType<any>;
|
|
5
|
-
children?: ReactNode;
|
|
6
|
-
}
|
|
7
|
-
export declare const CheckBox: import("react").ForwardRefExoticComponent<CheckBoxProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
1
|
+
import type { ElementType, InputHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export interface CheckBoxProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
3
|
+
as?: ElementType<any>;
|
|
4
|
+
innerAs?: ElementType<any>;
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare const CheckBox: import("react").ForwardRefExoticComponent<CheckBoxProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -1,34 +1,24 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["as", "checked", "defaultChecked", "onChange"];
|
|
5
1
|
import { forwardRef } from 'react';
|
|
6
2
|
import { useControlledState } from '../hooks';
|
|
7
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
};
|
|
21
|
-
}),
|
|
22
|
-
_useControlledState2 = _slicedToArray(_useControlledState, 2),
|
|
23
|
-
checked = _useControlledState2[0],
|
|
24
|
-
onChange = _useControlledState2[1];
|
|
25
|
-
|
|
26
|
-
return /*#__PURE__*/_jsx(Comp, _extends({
|
|
4
|
+
export const CheckBox = /*#__PURE__*/forwardRef(function CheckBox(props, forwardedRef) {
|
|
5
|
+
const {
|
|
6
|
+
as: Comp = 'input',
|
|
7
|
+
checked: checkedProp,
|
|
8
|
+
defaultChecked = false,
|
|
9
|
+
onChange: onChangeProp,
|
|
10
|
+
...otherProps
|
|
11
|
+
} = props;
|
|
12
|
+
const [checked, onChange] = useControlledState(checkedProp, onChangeProp, defaultChecked, setValue => e => {
|
|
13
|
+
setValue(e.target.checked);
|
|
14
|
+
});
|
|
15
|
+
return /*#__PURE__*/_jsx(Comp, {
|
|
27
16
|
ref: forwardedRef,
|
|
28
17
|
type: "checkbox",
|
|
29
18
|
checked: checked,
|
|
30
19
|
"aria-checked": checked,
|
|
31
|
-
onChange: onChange
|
|
32
|
-
|
|
20
|
+
onChange: onChange,
|
|
21
|
+
...otherProps
|
|
22
|
+
});
|
|
33
23
|
});
|
|
34
24
|
//# sourceMappingURL=CheckBox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckBox.js","names":["forwardRef","useControlledState","CheckBox","props","forwardedRef","as","Comp","
|
|
1
|
+
{"version":3,"file":"CheckBox.js","names":["forwardRef","useControlledState","jsx","_jsx","CheckBox","props","forwardedRef","as","Comp","checked","checkedProp","defaultChecked","onChange","onChangeProp","otherProps","setValue","e","target","ref","type"],"sources":["../../../src/CheckBox/CheckBox.tsx"],"sourcesContent":["import type { ElementType, InputHTMLAttributes, ReactNode } from 'react';\nimport { forwardRef } from 'react';\n\nimport { useControlledState } from '../hooks';\n\nexport interface CheckBoxProps extends InputHTMLAttributes<HTMLInputElement> {\n as?: ElementType<any>;\n innerAs?: ElementType<any>;\n children?: ReactNode;\n}\n\nexport const CheckBox = forwardRef<HTMLInputElement, CheckBoxProps>(\n function CheckBox(props, forwardedRef) {\n const {\n as: Comp = 'input',\n checked: checkedProp,\n defaultChecked = false,\n onChange: onChangeProp,\n ...otherProps\n } = props;\n const [checked, onChange] = useControlledState(\n checkedProp,\n onChangeProp,\n defaultChecked,\n (setValue) => (e) => {\n setValue(e.target.checked);\n }\n );\n\n return (\n <Comp\n ref={forwardedRef}\n type=\"checkbox\"\n checked={checked}\n aria-checked={checked}\n onChange={onChange}\n {...otherProps}\n />\n );\n }\n);\n"],"mappings":"AACA,SAASA,UAAU,QAAQ,OAAO;AAElC,SAASC,kBAAkB,QAAQ,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAQ9C,OAAO,MAAMC,QAAQ,gBAAGJ,UAAU,CAChC,SAASI,QAAQA,CAACC,KAAK,EAAEC,YAAY,EAAE;EACrC,MAAM;IACJC,EAAE,EAAEC,IAAI,GAAG,OAAO;IAClBC,OAAO,EAAEC,WAAW;IACpBC,cAAc,GAAG,KAAK;IACtBC,QAAQ,EAAEC,YAAY;IACtB,GAAGC;EACL,CAAC,GAAGT,KAAK;EACT,MAAM,CAACI,OAAO,EAAEG,QAAQ,CAAC,GAAGX,kBAAkB,CAC5CS,WAAW,EACXG,YAAY,EACZF,cAAc,EACbI,QAAQ,IAAMC,CAAC,IAAK;IACnBD,QAAQ,CAACC,CAAC,CAACC,MAAM,CAACR,OAAO,CAAC;EAC5B,CACF,CAAC;EAED,oBACEN,IAAA,CAACK,IAAI;IACHU,GAAG,EAAEZ,YAAa;IAClBa,IAAI,EAAC,UAAU;IACfV,OAAO,EAAEA,OAAQ;IACjB,gBAAcA,OAAQ;IACtBG,QAAQ,EAAEA,QAAS;IAAA,GACfE;EAAU,CACf,CAAC;AAEN,CACF,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './CheckBox';
|
|
1
|
+
export * from './CheckBox';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/CheckBox/index.ts"],"sourcesContent":["export * from './CheckBox';\
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/CheckBox/index.ts"],"sourcesContent":["export * from './CheckBox';\n"],"mappings":"AAAA,cAAc,YAAY","ignoreList":[]}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import type { HTMLAttributes, ReactNode, ElementType } from 'react';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
onSelect?: SelectEventHandler;
|
|
5
|
-
openOnFocus?: boolean;
|
|
6
|
-
selectOnBlur?: boolean;
|
|
7
|
-
children?: ReactNode;
|
|
8
|
-
as?: ElementType<any>;
|
|
9
|
-
innerAs?: ElementType<any>;
|
|
10
|
-
};
|
|
11
|
-
export declare const Combobox: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>, "onSelect"> & {
|
|
12
|
-
onSelect?: SelectEventHandler
|
|
13
|
-
openOnFocus?: boolean
|
|
14
|
-
selectOnBlur?: boolean
|
|
15
|
-
children?: ReactNode;
|
|
16
|
-
as?: ElementType<any
|
|
17
|
-
innerAs?: ElementType<any
|
|
18
|
-
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
1
|
+
import type { HTMLAttributes, ReactNode, ElementType } from 'react';
|
|
2
|
+
export type SelectEventHandler = (text: string, itemId: string, obj: any) => void;
|
|
3
|
+
export type ComboboxProps = Omit<HTMLAttributes<HTMLDivElement>, 'onSelect'> & {
|
|
4
|
+
onSelect?: SelectEventHandler;
|
|
5
|
+
openOnFocus?: boolean;
|
|
6
|
+
selectOnBlur?: boolean;
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
as?: ElementType<any>;
|
|
9
|
+
innerAs?: ElementType<any>;
|
|
10
|
+
};
|
|
11
|
+
export declare const Combobox: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>, "onSelect"> & {
|
|
12
|
+
onSelect?: SelectEventHandler;
|
|
13
|
+
openOnFocus?: boolean;
|
|
14
|
+
selectOnBlur?: boolean;
|
|
15
|
+
children?: ReactNode;
|
|
16
|
+
as?: ElementType<any>;
|
|
17
|
+
innerAs?: ElementType<any>;
|
|
18
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["onSelect", "openOnFocus", "selectOnBlur", "children", "as", "innerAs"];
|
|
5
1
|
import { forwardRef, useRef, useMemo, useId } from 'react';
|
|
6
2
|
import { stateChart, comboboxReducer, isVisible, INIT } from './hooks';
|
|
7
3
|
import { ComboBoxProvider } from './context';
|
|
8
4
|
import { useReducerMachine } from '../hooks/useReducerMachine';
|
|
9
5
|
import { getScope } from '../hooks';
|
|
10
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
-
export
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
7
|
+
export const Combobox = /*#__PURE__*/forwardRef(function Combobox(_ref, ref) {
|
|
8
|
+
let {
|
|
9
|
+
// Called whenever the user selects an item from the list
|
|
10
|
+
onSelect,
|
|
11
|
+
// opens the list when the input receives focused (but only if there are
|
|
12
|
+
// items in the list)
|
|
13
|
+
openOnFocus = false,
|
|
14
|
+
// if set to true, it will select an item after blurring
|
|
15
|
+
selectOnBlur = false,
|
|
16
|
+
children,
|
|
17
|
+
as: Comp = 'div',
|
|
18
|
+
innerAs,
|
|
19
|
+
...rest
|
|
20
|
+
} = _ref;
|
|
23
21
|
// We store the values of all the ComboboxOptions on this ref. This makes it
|
|
24
22
|
// possible to perform the keyboard navigation from the input on the list. We
|
|
25
23
|
// manipulate this array through context so that we don't have to enforce a
|
|
26
24
|
// parent/child relationship between ComboboxList and ComboboxOption.
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
const optionsRef = useRef({});
|
|
26
|
+
const listScope = useRef(getScope({
|
|
29
27
|
current: null
|
|
30
|
-
}));
|
|
28
|
+
}));
|
|
29
|
+
|
|
30
|
+
// Need this to focus it
|
|
31
|
+
const inputRef = useRef(null);
|
|
32
|
+
const popoverRef = useRef(null);
|
|
33
|
+
const buttonRef = useRef(null);
|
|
31
34
|
|
|
32
|
-
|
|
33
|
-
var popoverRef = useRef(null);
|
|
34
|
-
var buttonRef = useRef(null); // When <ComboboxInput autocomplete={false} /> we don't want cycle back to
|
|
35
|
+
// When <ComboboxInput autocomplete={false} /> we don't want cycle back to
|
|
35
36
|
// the user's value while navigating (because it's always the user's value),
|
|
36
37
|
// but we need to know this in useKeyDown which is far away from the prop
|
|
37
38
|
// here, so we do something sneaky and write it to this ref on context so we
|
|
38
39
|
// can use it anywhere else 😛. Another new trick for me and I'm excited
|
|
39
40
|
// about this one too!
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
var defaultData = {
|
|
41
|
+
const autocompletePropRef = useRef(false);
|
|
42
|
+
const persistSelectionRef = useRef(false);
|
|
43
|
+
const clearOnEscapeRef = useRef(false);
|
|
44
|
+
const listboxIdRef = useRef(undefined);
|
|
45
|
+
const labelIdRef = useRef(undefined);
|
|
46
|
+
const defaultData = {
|
|
47
47
|
// initial state
|
|
48
48
|
state: stateChart.initial,
|
|
49
49
|
// the value the user has typed, we derived this also when the developer is
|
|
@@ -57,39 +57,32 @@ export var Combobox = /*#__PURE__*/forwardRef(function Combobox(_ref, ref) {
|
|
|
57
57
|
// the last submitted action
|
|
58
58
|
lastActionType: INIT
|
|
59
59
|
};
|
|
60
|
-
|
|
61
|
-
var _useReducerMachine = useReducerMachine(stateChart, comboboxReducer, defaultData),
|
|
62
|
-
_useReducerMachine2 = _slicedToArray(_useReducerMachine, 3),
|
|
63
|
-
state = _useReducerMachine2[0],
|
|
64
|
-
data = _useReducerMachine2[1],
|
|
65
|
-
transition = _useReducerMachine2[2];
|
|
66
|
-
|
|
60
|
+
const [state, data, transition] = useReducerMachine(stateChart, comboboxReducer, defaultData);
|
|
67
61
|
listboxIdRef.current = useId();
|
|
68
62
|
labelIdRef.current = useId();
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
};
|
|
89
|
-
}, [data, onSelect, listScope, state, transition, openOnFocus, selectOnBlur]);
|
|
63
|
+
const context = useMemo(() => ({
|
|
64
|
+
data,
|
|
65
|
+
inputRef,
|
|
66
|
+
popoverRef,
|
|
67
|
+
buttonRef,
|
|
68
|
+
onSelect,
|
|
69
|
+
optionsRef,
|
|
70
|
+
listScope,
|
|
71
|
+
state,
|
|
72
|
+
transition,
|
|
73
|
+
listboxIdRef,
|
|
74
|
+
labelIdRef,
|
|
75
|
+
autocompletePropRef,
|
|
76
|
+
persistSelectionRef,
|
|
77
|
+
clearOnEscapeRef,
|
|
78
|
+
isVisible: isVisible(state),
|
|
79
|
+
openOnFocus,
|
|
80
|
+
selectOnBlur
|
|
81
|
+
}), [data, onSelect, listScope, state, transition, openOnFocus, selectOnBlur]);
|
|
90
82
|
return /*#__PURE__*/_jsx(ComboBoxProvider, {
|
|
91
83
|
value: context,
|
|
92
|
-
children: /*#__PURE__*/_jsx(Comp,
|
|
84
|
+
children: /*#__PURE__*/_jsx(Comp, {
|
|
85
|
+
...rest,
|
|
93
86
|
as: innerAs,
|
|
94
87
|
"data-reach-combobox": "",
|
|
95
88
|
ref: ref,
|
|
@@ -98,7 +91,7 @@ export var Combobox = /*#__PURE__*/forwardRef(function Combobox(_ref, ref) {
|
|
|
98
91
|
"aria-owns": listboxIdRef.current,
|
|
99
92
|
"aria-expanded": context.isVisible,
|
|
100
93
|
children: children
|
|
101
|
-
})
|
|
94
|
+
})
|
|
102
95
|
});
|
|
103
96
|
});
|
|
104
97
|
//# sourceMappingURL=Combobox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Combobox.js","names":["forwardRef","useRef","useMemo","useId","stateChart","comboboxReducer","isVisible","INIT","ComboBoxProvider","useReducerMachine","getScope","Combobox","ref","onSelect","openOnFocus","selectOnBlur","children","as","Comp","innerAs","rest","optionsRef","listScope","current","inputRef","popoverRef","buttonRef","autocompletePropRef","persistSelectionRef","clearOnEscapeRef","listboxIdRef","labelIdRef","defaultData","state","initial","text","item","navigationItem","lastActionType","data","transition","context"],"sources":["../../../src/ComboBox/Combobox.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode, ElementType } from 'react';\
|
|
1
|
+
{"version":3,"file":"Combobox.js","names":["forwardRef","useRef","useMemo","useId","stateChart","comboboxReducer","isVisible","INIT","ComboBoxProvider","useReducerMachine","getScope","jsx","_jsx","Combobox","_ref","ref","onSelect","openOnFocus","selectOnBlur","children","as","Comp","innerAs","rest","optionsRef","listScope","current","inputRef","popoverRef","buttonRef","autocompletePropRef","persistSelectionRef","clearOnEscapeRef","listboxIdRef","undefined","labelIdRef","defaultData","state","initial","text","item","navigationItem","lastActionType","data","transition","context","value","role"],"sources":["../../../src/ComboBox/Combobox.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode, ElementType } from 'react';\nimport { forwardRef, useRef, useMemo, useId } from 'react';\n\nimport type { ActionTypes } from './hooks';\nimport { stateChart, comboboxReducer, isVisible, INIT } from './hooks';\nimport type { ComboBoxContextProps } from './context';\nimport { ComboBoxProvider } from './context';\nimport { useReducerMachine } from '../hooks/useReducerMachine';\nimport type { Scope } from '../hooks';\nimport { getScope } from '../hooks';\n\nexport type SelectEventHandler = (\n text: string,\n itemId: string,\n obj: any\n) => void;\n\nexport type ComboboxProps = Omit<HTMLAttributes<HTMLDivElement>, 'onSelect'> & {\n onSelect?: SelectEventHandler;\n openOnFocus?: boolean;\n selectOnBlur?: boolean;\n children?: ReactNode;\n as?: ElementType<any>;\n innerAs?: ElementType<any>;\n};\n\nexport const Combobox = forwardRef<HTMLDivElement, ComboboxProps>(\n function Combobox(\n {\n // Called whenever the user selects an item from the list\n onSelect,\n\n // opens the list when the input receives focused (but only if there are\n // items in the list)\n openOnFocus = false,\n\n // if set to true, it will select an item after blurring\n selectOnBlur = false,\n\n children,\n as: Comp = 'div',\n innerAs,\n ...rest\n }: ComboboxProps,\n ref\n ) {\n // We store the values of all the ComboboxOptions on this ref. This makes it\n // possible to perform the keyboard navigation from the input on the list. We\n // manipulate this array through context so that we don't have to enforce a\n // parent/child relationship between ComboboxList and ComboboxOption.\n const optionsRef = useRef<{\n [itemId: string]: {\n value: string | unknown;\n text: string;\n };\n }>({});\n\n const listScope: Scope<HTMLElement> = useRef(getScope({ current: null }));\n\n // Need this to focus it\n const inputRef = useRef<HTMLInputElement>(null);\n\n const popoverRef = useRef<HTMLDivElement>(null);\n\n const buttonRef = useRef<HTMLButtonElement>(null);\n\n // When <ComboboxInput autocomplete={false} /> we don't want cycle back to\n // the user's value while navigating (because it's always the user's value),\n // but we need to know this in useKeyDown which is far away from the prop\n // here, so we do something sneaky and write it to this ref on context so we\n // can use it anywhere else 😛. Another new trick for me and I'm excited\n // about this one too!\n const autocompletePropRef = useRef<boolean>(false);\n\n const persistSelectionRef = useRef<boolean>(false);\n\n const clearOnEscapeRef = useRef<boolean>(false);\n\n const listboxIdRef = useRef<string | undefined>(undefined);\n\n const labelIdRef = useRef<string | undefined>(undefined);\n\n const defaultData = {\n // initial state\n state: stateChart.initial,\n // the value the user has typed, we derived this also when the developer is\n // controlling the value of ComboboxInput\n text: '',\n // the index the user has typed, we derived this also when the developer is\n // controlling the value of ComboboxInput\n item: '',\n // the hash of the currently navigated item\n navigationItem: '',\n // the last submitted action\n lastActionType: INIT as ActionTypes,\n };\n\n const [state, data, transition] = useReducerMachine(\n stateChart,\n comboboxReducer,\n defaultData\n );\n\n listboxIdRef.current = useId();\n\n labelIdRef.current = useId();\n\n const context = useMemo(\n (): ComboBoxContextProps => ({\n data,\n inputRef,\n popoverRef,\n buttonRef,\n onSelect,\n optionsRef,\n listScope,\n state,\n transition,\n listboxIdRef,\n labelIdRef,\n autocompletePropRef,\n persistSelectionRef,\n clearOnEscapeRef,\n isVisible: isVisible(state),\n openOnFocus,\n selectOnBlur,\n }),\n [data, onSelect, listScope, state, transition, openOnFocus, selectOnBlur]\n );\n\n return (\n <ComboBoxProvider value={context}>\n <Comp\n {...rest}\n as={innerAs}\n data-reach-combobox=\"\"\n ref={ref}\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n aria-owns={listboxIdRef.current}\n aria-expanded={context.isVisible}\n >\n {children}\n </Comp>\n </ComboBoxProvider>\n );\n }\n);\n"],"mappings":"AACA,SAASA,UAAU,EAAEC,MAAM,EAAEC,OAAO,EAAEC,KAAK,QAAQ,OAAO;AAG1D,SAASC,UAAU,EAAEC,eAAe,EAAEC,SAAS,EAAEC,IAAI,QAAQ,SAAS;AAEtE,SAASC,gBAAgB,QAAQ,WAAW;AAC5C,SAASC,iBAAiB,QAAQ,4BAA4B;AAE9D,SAASC,QAAQ,QAAQ,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAiBpC,OAAO,MAAMC,QAAQ,gBAAGb,UAAU,CAChC,SAASa,QAAQA,CAAAC,IAAA,EAiBfC,GAAG,EACH;EAAA,IAjBA;IACE;IACAC,QAAQ;IAER;IACA;IACAC,WAAW,GAAG,KAAK;IAEnB;IACAC,YAAY,GAAG,KAAK;IAEpBC,QAAQ;IACRC,EAAE,EAAEC,IAAI,GAAG,KAAK;IAChBC,OAAO;IACP,GAAGC;EACU,CAAC,GAAAT,IAAA;EAGhB;EACA;EACA;EACA;EACA,MAAMU,UAAU,GAAGvB,MAAM,CAKtB,CAAC,CAAC,CAAC;EAEN,MAAMwB,SAA6B,GAAGxB,MAAM,CAACS,QAAQ,CAAC;IAAEgB,OAAO,EAAE;EAAK,CAAC,CAAC,CAAC;;EAEzE;EACA,MAAMC,QAAQ,GAAG1B,MAAM,CAAmB,IAAI,CAAC;EAE/C,MAAM2B,UAAU,GAAG3B,MAAM,CAAiB,IAAI,CAAC;EAE/C,MAAM4B,SAAS,GAAG5B,MAAM,CAAoB,IAAI,CAAC;;EAEjD;EACA;EACA;EACA;EACA;EACA;EACA,MAAM6B,mBAAmB,GAAG7B,MAAM,CAAU,KAAK,CAAC;EAElD,MAAM8B,mBAAmB,GAAG9B,MAAM,CAAU,KAAK,CAAC;EAElD,MAAM+B,gBAAgB,GAAG/B,MAAM,CAAU,KAAK,CAAC;EAE/C,MAAMgC,YAAY,GAAGhC,MAAM,CAAqBiC,SAAS,CAAC;EAE1D,MAAMC,UAAU,GAAGlC,MAAM,CAAqBiC,SAAS,CAAC;EAExD,MAAME,WAAW,GAAG;IAClB;IACAC,KAAK,EAAEjC,UAAU,CAACkC,OAAO;IACzB;IACA;IACAC,IAAI,EAAE,EAAE;IACR;IACA;IACAC,IAAI,EAAE,EAAE;IACR;IACAC,cAAc,EAAE,EAAE;IAClB;IACAC,cAAc,EAAEnC;EAClB,CAAC;EAED,MAAM,CAAC8B,KAAK,EAAEM,IAAI,EAAEC,UAAU,CAAC,GAAGnC,iBAAiB,CACjDL,UAAU,EACVC,eAAe,EACf+B,WACF,CAAC;EAEDH,YAAY,CAACP,OAAO,GAAGvB,KAAK,CAAC,CAAC;EAE9BgC,UAAU,CAACT,OAAO,GAAGvB,KAAK,CAAC,CAAC;EAE5B,MAAM0C,OAAO,GAAG3C,OAAO,CACrB,OAA6B;IAC3ByC,IAAI;IACJhB,QAAQ;IACRC,UAAU;IACVC,SAAS;IACTb,QAAQ;IACRQ,UAAU;IACVC,SAAS;IACTY,KAAK;IACLO,UAAU;IACVX,YAAY;IACZE,UAAU;IACVL,mBAAmB;IACnBC,mBAAmB;IACnBC,gBAAgB;IAChB1B,SAAS,EAAEA,SAAS,CAAC+B,KAAK,CAAC;IAC3BpB,WAAW;IACXC;EACF,CAAC,CAAC,EACF,CAACyB,IAAI,EAAE3B,QAAQ,EAAES,SAAS,EAAEY,KAAK,EAAEO,UAAU,EAAE3B,WAAW,EAAEC,YAAY,CAC1E,CAAC;EAED,oBACEN,IAAA,CAACJ,gBAAgB;IAACsC,KAAK,EAAED,OAAQ;IAAA1B,QAAA,eAC/BP,IAAA,CAACS,IAAI;MAAA,GACCE,IAAI;MACRH,EAAE,EAAEE,OAAQ;MACZ,uBAAoB,EAAE;MACtBP,GAAG,EAAEA,GAAI;MACTgC,IAAI,EAAC,UAAU;MACf,iBAAc,SAAS;MACvB,aAAWd,YAAY,CAACP,OAAQ;MAChC,iBAAemB,OAAO,CAACvC,SAAU;MAAAa,QAAA,EAEhCA;IAAQ,CACL;EAAC,CACS,CAAC;AAEvB,CACF,CAAC","ignoreList":[]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { ButtonHTMLAttributes, ElementType, KeyboardEventHandler, MouseEventHandler, ReactNode } from 'react';
|
|
2
|
-
export interface ComboboxButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
3
|
-
as?: ElementType<any>;
|
|
4
|
-
innerAs?: ElementType<any>;
|
|
5
|
-
onClick?: MouseEventHandler<HTMLButtonElement>;
|
|
6
|
-
onKeyDown?: KeyboardEventHandler<HTMLButtonElement>;
|
|
7
|
-
children?: ReactNode;
|
|
8
|
-
}
|
|
9
|
-
export declare const ComboboxButton: import("react").ForwardRefExoticComponent<ComboboxButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
1
|
+
import type { ButtonHTMLAttributes, ElementType, KeyboardEventHandler, MouseEventHandler, ReactNode } from 'react';
|
|
2
|
+
export interface ComboboxButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
3
|
+
as?: ElementType<any>;
|
|
4
|
+
innerAs?: ElementType<any>;
|
|
5
|
+
onClick?: MouseEventHandler<HTMLButtonElement>;
|
|
6
|
+
onKeyDown?: KeyboardEventHandler<HTMLButtonElement>;
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export declare const ComboboxButton: import("react").ForwardRefExoticComponent<ComboboxButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,43 +1,37 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["as", "innerAs", "onClick", "onKeyDown"];
|
|
4
1
|
import { forwardRef } from 'react';
|
|
5
2
|
import { useComboBoxContext } from './context';
|
|
6
3
|
import { useKeyDown, IDLE, OPEN_WITH_BUTTON, CLOSE_WITH_BUTTON } from './hooks';
|
|
7
4
|
import { wrapEvent } from '../utils/wrap-event';
|
|
8
5
|
import { assignMultipleRefs } from '../utils/assign-ref';
|
|
9
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
var payload = {
|
|
7
|
+
export const ComboboxButton = /*#__PURE__*/forwardRef(function ComboboxButton(_ref, ref) {
|
|
8
|
+
let {
|
|
9
|
+
as: Comp = 'button',
|
|
10
|
+
innerAs,
|
|
11
|
+
onClick,
|
|
12
|
+
onKeyDown,
|
|
13
|
+
...props
|
|
14
|
+
} = _ref;
|
|
15
|
+
const {
|
|
16
|
+
transition,
|
|
17
|
+
data,
|
|
18
|
+
state,
|
|
19
|
+
buttonRef,
|
|
20
|
+
listboxIdRef,
|
|
21
|
+
isVisible
|
|
22
|
+
} = useComboBoxContext();
|
|
23
|
+
const handleKeyDown = useKeyDown();
|
|
24
|
+
const handleClick = () => {
|
|
25
|
+
const payload = {
|
|
30
26
|
item: data.navigationItem
|
|
31
27
|
};
|
|
32
|
-
|
|
33
28
|
if (state === IDLE) {
|
|
34
29
|
transition(OPEN_WITH_BUTTON, payload);
|
|
35
30
|
} else {
|
|
36
31
|
transition(CLOSE_WITH_BUTTON, payload);
|
|
37
32
|
}
|
|
38
33
|
};
|
|
39
|
-
|
|
40
|
-
return /*#__PURE__*/_jsx(Comp, _extends({
|
|
34
|
+
return /*#__PURE__*/_jsx(Comp, {
|
|
41
35
|
as: innerAs,
|
|
42
36
|
"data-reach-combobox-button": "",
|
|
43
37
|
"aria-controls": listboxIdRef.current,
|
|
@@ -45,7 +39,8 @@ export var ComboboxButton = /*#__PURE__*/forwardRef(function ComboboxButton(_ref
|
|
|
45
39
|
"aria-expanded": isVisible,
|
|
46
40
|
ref: assignMultipleRefs(ref, buttonRef),
|
|
47
41
|
onClick: wrapEvent(onClick, handleClick),
|
|
48
|
-
onKeyDown: wrapEvent(onKeyDown, handleKeyDown)
|
|
49
|
-
|
|
42
|
+
onKeyDown: wrapEvent(onKeyDown, handleKeyDown),
|
|
43
|
+
...props
|
|
44
|
+
});
|
|
50
45
|
});
|
|
51
46
|
//# sourceMappingURL=ComboboxButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComboboxButton.js","names":["forwardRef","useComboBoxContext","useKeyDown","IDLE","OPEN_WITH_BUTTON","CLOSE_WITH_BUTTON","wrapEvent","assignMultipleRefs","ComboboxButton","ref","as","Comp","innerAs","onClick","onKeyDown","props","transition","data","state","buttonRef","listboxIdRef","isVisible","handleKeyDown","handleClick","payload","item","navigationItem","current"],"sources":["../../../src/ComboBox/ComboboxButton.tsx"],"sourcesContent":["import type {\
|
|
1
|
+
{"version":3,"file":"ComboboxButton.js","names":["forwardRef","useComboBoxContext","useKeyDown","IDLE","OPEN_WITH_BUTTON","CLOSE_WITH_BUTTON","wrapEvent","assignMultipleRefs","jsx","_jsx","ComboboxButton","_ref","ref","as","Comp","innerAs","onClick","onKeyDown","props","transition","data","state","buttonRef","listboxIdRef","isVisible","handleKeyDown","handleClick","payload","item","navigationItem","current"],"sources":["../../../src/ComboBox/ComboboxButton.tsx"],"sourcesContent":["import type {\n ButtonHTMLAttributes,\n ElementType,\n KeyboardEventHandler,\n MouseEventHandler,\n ReactNode,\n} from 'react';\nimport { forwardRef } from 'react';\n\nimport { useComboBoxContext } from './context';\nimport { useKeyDown, IDLE, OPEN_WITH_BUTTON, CLOSE_WITH_BUTTON } from './hooks';\nimport { wrapEvent } from '../utils/wrap-event';\nimport { assignMultipleRefs } from '../utils/assign-ref';\n\nexport interface ComboboxButtonProps\n extends ButtonHTMLAttributes<HTMLButtonElement> {\n as?: ElementType<any>;\n innerAs?: ElementType<any>;\n onClick?: MouseEventHandler<HTMLButtonElement>;\n onKeyDown?: KeyboardEventHandler<HTMLButtonElement>;\n children?: ReactNode;\n}\n\nexport const ComboboxButton = forwardRef<\n HTMLButtonElement,\n ComboboxButtonProps\n>(function ComboboxButton(\n { as: Comp = 'button', innerAs, onClick, onKeyDown, ...props },\n ref\n) {\n const { transition, data, state, buttonRef, listboxIdRef, isVisible } =\n useComboBoxContext();\n\n const handleKeyDown = useKeyDown();\n\n const handleClick = () => {\n const payload = {\n item: data.navigationItem,\n };\n\n if (state === IDLE) {\n transition(OPEN_WITH_BUTTON, payload);\n } else {\n transition(CLOSE_WITH_BUTTON, payload);\n }\n };\n\n return (\n <Comp\n as={innerAs}\n data-reach-combobox-button=\"\"\n aria-controls={listboxIdRef.current}\n aria-haspopup=\"listbox\"\n aria-expanded={isVisible}\n ref={assignMultipleRefs(ref, buttonRef)}\n onClick={wrapEvent(onClick, handleClick)}\n onKeyDown={wrapEvent(onKeyDown, handleKeyDown)}\n {...props}\n />\n );\n});\n"],"mappings":"AAOA,SAASA,UAAU,QAAQ,OAAO;AAElC,SAASC,kBAAkB,QAAQ,WAAW;AAC9C,SAASC,UAAU,EAAEC,IAAI,EAAEC,gBAAgB,EAAEC,iBAAiB,QAAQ,SAAS;AAC/E,SAASC,SAAS,QAAQ,qBAAqB;AAC/C,SAASC,kBAAkB,QAAQ,qBAAqB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAWzD,OAAO,MAAMC,cAAc,gBAAGV,UAAU,CAGtC,SAASU,cAAcA,CAAAC,IAAA,EAEvBC,GAAG,EACH;EAAA,IAFA;IAAEC,EAAE,EAAEC,IAAI,GAAG,QAAQ;IAAEC,OAAO;IAAEC,OAAO;IAAEC,SAAS;IAAE,GAAGC;EAAM,CAAC,GAAAP,IAAA;EAG9D,MAAM;IAAEQ,UAAU;IAAEC,IAAI;IAAEC,KAAK;IAAEC,SAAS;IAAEC,YAAY;IAAEC;EAAU,CAAC,GACnEvB,kBAAkB,CAAC,CAAC;EAEtB,MAAMwB,aAAa,GAAGvB,UAAU,CAAC,CAAC;EAElC,MAAMwB,WAAW,GAAGA,CAAA,KAAM;IACxB,MAAMC,OAAO,GAAG;MACdC,IAAI,EAAER,IAAI,CAACS;IACb,CAAC;IAED,IAAIR,KAAK,KAAKlB,IAAI,EAAE;MAClBgB,UAAU,CAACf,gBAAgB,EAAEuB,OAAO,CAAC;IACvC,CAAC,MAAM;MACLR,UAAU,CAACd,iBAAiB,EAAEsB,OAAO,CAAC;IACxC;EACF,CAAC;EAED,oBACElB,IAAA,CAACK,IAAI;IACHD,EAAE,EAAEE,OAAQ;IACZ,8BAA2B,EAAE;IAC7B,iBAAeQ,YAAY,CAACO,OAAQ;IACpC,iBAAc,SAAS;IACvB,iBAAeN,SAAU;IACzBZ,GAAG,EAAEL,kBAAkB,CAACK,GAAG,EAAEU,SAAS,CAAE;IACxCN,OAAO,EAAEV,SAAS,CAACU,OAAO,EAAEU,WAAW,CAAE;IACzCT,SAAS,EAAEX,SAAS,CAACW,SAAS,EAAEQ,aAAa,CAAE;IAAA,GAC3CP;EAAK,CACV,CAAC;AAEN,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import type { ChangeEventHandler, ElementType, FocusEventHandler, InputHTMLAttributes, KeyboardEventHandler, MouseEventHandler } from 'react';
|
|
2
|
-
export interface ComboboxInputProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
3
|
-
clearOnEscape?: boolean;
|
|
4
|
-
selectOnClick?: boolean;
|
|
5
|
-
autocomplete?: boolean;
|
|
6
|
-
defaultValue?: string;
|
|
7
|
-
value?: string;
|
|
8
|
-
onClick?: MouseEventHandler<HTMLInputElement>;
|
|
9
|
-
onChange?: ChangeEventHandler<HTMLInputElement>;
|
|
10
|
-
onKeyDown?: KeyboardEventHandler<HTMLInputElement>;
|
|
11
|
-
onBlur?: FocusEventHandler<HTMLInputElement>;
|
|
12
|
-
onFocus?: FocusEventHandler<HTMLInputElement>;
|
|
13
|
-
as?: ElementType<any>;
|
|
14
|
-
innerAs?: ElementType<any>;
|
|
15
|
-
id?: string;
|
|
16
|
-
}
|
|
17
|
-
export declare const ComboboxInput: import("react").ForwardRefExoticComponent<ComboboxInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
1
|
+
import type { ChangeEventHandler, ElementType, FocusEventHandler, InputHTMLAttributes, KeyboardEventHandler, MouseEventHandler } from 'react';
|
|
2
|
+
export interface ComboboxInputProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
3
|
+
clearOnEscape?: boolean;
|
|
4
|
+
selectOnClick?: boolean;
|
|
5
|
+
autocomplete?: boolean;
|
|
6
|
+
defaultValue?: string;
|
|
7
|
+
value?: string;
|
|
8
|
+
onClick?: MouseEventHandler<HTMLInputElement>;
|
|
9
|
+
onChange?: ChangeEventHandler<HTMLInputElement>;
|
|
10
|
+
onKeyDown?: KeyboardEventHandler<HTMLInputElement>;
|
|
11
|
+
onBlur?: FocusEventHandler<HTMLInputElement>;
|
|
12
|
+
onFocus?: FocusEventHandler<HTMLInputElement>;
|
|
13
|
+
as?: ElementType<any>;
|
|
14
|
+
innerAs?: ElementType<any>;
|
|
15
|
+
id?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare const ComboboxInput: import("react").ForwardRefExoticComponent<ComboboxInputProps & import("react").RefAttributes<HTMLInputElement>>;
|