@adgytec/adgytec-web-ui-components 2.3.0 → 2.3.1
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/dist/App.d.ts +2 -2
- package/dist/assets/CalendarCell.css +1 -1
- package/dist/assets/CalendarMenuItem.css +1 -1
- package/dist/assets/ListTrailingText.css +1 -0
- package/dist/assets/SideSheet.css +1 -1
- package/dist/assets/core7.css +1 -1
- package/dist/chunks/ActionDialog.map +1 -1
- package/dist/chunks/AppBar +42 -42
- package/dist/chunks/AppBar.map +1 -1
- package/dist/chunks/AppBarAction.map +1 -1
- package/dist/chunks/AppBarAvatar.map +1 -1
- package/dist/chunks/AppBarHeadline.map +1 -1
- package/dist/chunks/BaseCalendar +69 -63
- package/dist/chunks/BaseCalendar.map +1 -1
- package/dist/chunks/BottomSheet.map +1 -1
- package/dist/chunks/BottomSheetModal.map +1 -1
- package/dist/chunks/ButtonGroup.map +1 -1
- package/dist/chunks/CalendarCell +25 -39
- package/dist/chunks/CalendarCell.map +1 -1
- package/dist/chunks/CalendarGrid.map +1 -1
- package/dist/chunks/CalendarMenuItem +1 -1
- package/dist/chunks/CalendarMenuItem.map +1 -1
- package/dist/chunks/Card.map +1 -1
- package/dist/chunks/CardIcon.map +1 -1
- package/dist/chunks/CenteredSlider.map +1 -1
- package/dist/chunks/ComboBox.map +1 -1
- package/dist/chunks/ComboBoxPopover.map +1 -1
- package/dist/chunks/ComboBoxTrigger +592 -62
- package/dist/chunks/ComboBoxTrigger.map +1 -1
- package/dist/chunks/ConnectedButtonGroup +13 -10
- package/dist/chunks/ConnectedButtonGroup.map +1 -1
- package/dist/chunks/Dialog.map +1 -1
- package/dist/chunks/Disclosure.map +1 -1
- package/dist/chunks/DisclosureGroup.map +1 -1
- package/dist/chunks/DisclosureHeader.map +1 -1
- package/dist/chunks/DisclosurePanel.map +1 -1
- package/dist/chunks/Divider.map +1 -1
- package/dist/chunks/FieldError.map +1 -1
- package/dist/chunks/GridBackgroundDecorator.map +1 -1
- package/dist/chunks/Icon.map +1 -1
- package/dist/chunks/Input.map +1 -1
- package/dist/chunks/Input2 +2 -1
- package/dist/chunks/Input2.map +1 -1
- package/dist/chunks/ListAction +13 -0
- package/dist/chunks/ListAction.map +1 -0
- package/dist/chunks/ListAvatar.map +1 -1
- package/dist/chunks/ListBox.map +1 -1
- package/dist/chunks/ListIcon.map +1 -1
- package/dist/chunks/ListItem.map +1 -1
- package/dist/chunks/ListLabelText.map +1 -1
- package/dist/chunks/ListMedia.map +1 -1
- package/dist/chunks/ListOverlineText.map +1 -1
- package/dist/chunks/ListSupportingText.map +1 -1
- package/dist/chunks/ListTrailingText +21 -0
- package/dist/chunks/ListTrailingText.map +1 -0
- package/dist/chunks/Loader.map +1 -1
- package/dist/chunks/MenuPopover.map +1 -1
- package/dist/chunks/Modal.map +1 -1
- package/dist/chunks/ModalOverlay.map +1 -1
- package/dist/chunks/Navigation.map +1 -1
- package/dist/chunks/NavigationScrollContainer +5 -2
- package/dist/chunks/NavigationScrollContainer.map +1 -1
- package/dist/chunks/NavigationSection.map +1 -1
- package/dist/chunks/NavigationSectionLabel.map +1 -1
- package/dist/chunks/Popover.map +1 -1
- package/dist/chunks/RadialGlowDecorator.map +1 -1
- package/dist/chunks/Radio.map +1 -1
- package/dist/chunks/RichTooltip.map +1 -1
- package/dist/chunks/RichTooltipActions.map +1 -1
- package/dist/chunks/RichTooltipInfo.map +1 -1
- package/dist/chunks/SearchField.map +1 -1
- package/dist/chunks/SelectPopover.map +1 -1
- package/dist/chunks/SelectTrigger.map +1 -1
- package/dist/chunks/SideSheet +7 -7
- package/dist/chunks/SideSheet.map +1 -1
- package/dist/chunks/SideSheetModal.map +1 -1
- package/dist/chunks/Slider.map +1 -1
- package/dist/chunks/SliderOutput.map +1 -1
- package/dist/chunks/SliderStops +3 -3
- package/dist/chunks/SliderStops.map +1 -1
- package/dist/chunks/SliderThumb.map +1 -1
- package/dist/chunks/Snackbar.map +1 -1
- package/dist/chunks/SplitButton +13 -10
- package/dist/chunks/SplitButton.map +1 -1
- package/dist/chunks/SplitButtonTrigger +8 -7
- package/dist/chunks/SplitButtonTrigger.map +1 -1
- package/dist/chunks/SubmenuPopover.map +1 -1
- package/dist/chunks/Switch.map +1 -1
- package/dist/chunks/Tab.map +1 -1
- package/dist/chunks/TabList.map +1 -1
- package/dist/chunks/TabPanel.map +1 -1
- package/dist/chunks/TabPanels.map +1 -1
- package/dist/chunks/Tabs.map +1 -1
- package/dist/chunks/Tag.map +1 -1
- package/dist/chunks/ThemeSelector +75 -71
- package/dist/chunks/ThemeSelector.map +1 -1
- package/dist/chunks/Toolbar.map +1 -1
- package/dist/chunks/Tooltip.map +1 -1
- package/dist/chunks/base.map +1 -1
- package/dist/chunks/compiler-runtime +2 -2
- package/dist/chunks/compiler-runtime.map +1 -1
- package/dist/chunks/context.map +1 -1
- package/dist/chunks/core +27 -25
- package/dist/chunks/core.map +1 -1
- package/dist/chunks/core2.map +1 -1
- package/dist/chunks/core3.map +1 -1
- package/dist/chunks/core4.map +1 -1
- package/dist/chunks/core5.map +1 -1
- package/dist/chunks/core6 +11 -11
- package/dist/chunks/core6.map +1 -1
- package/dist/chunks/core7.map +1 -1
- package/dist/chunks/core8.map +1 -1
- package/dist/chunks/core9.map +1 -1
- package/dist/chunks/navContext.map +1 -1
- package/dist/chunks/tapTarget.map +1 -1
- package/dist/chunks/types.map +1 -1
- package/dist/chunks/useHover +460 -153
- package/dist/chunks/useHover.map +1 -1
- package/dist/chunks/useSplash +17 -19
- package/dist/chunks/useSplash.map +1 -1
- package/dist/components/AppBar/AppBar/AppBar.d.ts +29 -0
- package/dist/components/AppBar/AppBar/types.d.ts +29 -4
- package/dist/components/AppBar/AppBarAction/AppBarAction.d.ts +19 -1
- package/dist/components/AppBar/AppBarAvatar/AppBarAvatar.d.ts +20 -1
- package/dist/components/AppBar/AppBarHeadline/AppBarHeadline.d.ts +19 -1
- package/dist/components/AppBar/AppBarState/AppBarState.d.ts +28 -2
- package/dist/components/AppBar/AppBarState/context.d.ts +37 -0
- package/dist/components/AppBar/AppBarState/index.js +16 -10
- package/dist/components/AppBar/AppBarState/index.js.map +1 -1
- package/dist/components/AppBar/core/alignment.d.ts +6 -0
- package/dist/components/AppBar/core/context.d.ts +16 -0
- package/dist/components/AppBar/core/index.js.map +1 -1
- package/dist/components/AppBar/core/size.d.ts +13 -0
- package/dist/components/AppBar/index.js +7 -7
- package/dist/components/Button/Button/Button.d.ts +17 -0
- package/dist/components/Button/Button/index.js.map +1 -1
- package/dist/components/Button/Button/types.d.ts +4 -0
- package/dist/components/Button/ButtonGroups/ButtonGroup/ButtonGroup.d.ts +17 -0
- package/dist/components/Button/ButtonGroups/ButtonGroup/types.d.ts +24 -0
- package/dist/components/Button/ButtonGroups/ButtonGroupContext/context.d.ts +22 -0
- package/dist/components/Button/ButtonGroups/ButtonGroupContext/index.js.map +1 -1
- package/dist/components/Button/ButtonGroups/ButtonGroupContext/useButtonGroupContext.d.ts +5 -0
- package/dist/components/Button/ButtonGroups/ButtonGroupContext/useConnectedButtonGroupContext.d.ts +5 -0
- package/dist/components/Button/ButtonGroups/ConnectedButton/ConnectedButton.d.ts +13 -0
- package/dist/components/Button/ButtonGroups/ConnectedButton/types.d.ts +19 -1
- package/dist/components/Button/ButtonGroups/ConnectedButtonGroup/ConnectedButtonGroup.d.ts +18 -0
- package/dist/components/Button/ButtonGroups/ConnectedButtonGroup/types.d.ts +24 -0
- package/dist/components/Button/IconButton/IconButton.d.ts +21 -0
- package/dist/components/Button/IconButton/index.js.map +1 -1
- package/dist/components/Button/IconButton/types.d.ts +4 -0
- package/dist/components/Button/LinkButton/LinkButton.d.ts +15 -0
- package/dist/components/Button/LinkButton/index.js.map +1 -1
- package/dist/components/Button/LinkButton/types.d.ts +4 -0
- package/dist/components/Button/LinkIconButton/LinkIconButton.d.ts +19 -0
- package/dist/components/Button/LinkIconButton/index.js.map +1 -1
- package/dist/components/Button/LinkIconButton/types.d.ts +4 -0
- package/dist/components/Button/SplitButton/SplitButton/SplitButton.d.ts +24 -0
- package/dist/components/Button/SplitButton/SplitButton/types.d.ts +23 -0
- package/dist/components/Button/SplitButton/SplitButtonContext/context.d.ts +11 -0
- package/dist/components/Button/SplitButton/SplitButtonContext/index.js.map +1 -1
- package/dist/components/Button/SplitButton/SplitButtonContext/useSplitButtonContext.d.ts +5 -0
- package/dist/components/Button/SplitButton/SplitButtonPrimary/SplitButtonPrimary.d.ts +15 -0
- package/dist/components/Button/SplitButton/SplitButtonPrimary/index.js +2 -2
- package/dist/components/Button/SplitButton/SplitButtonPrimary/index.js.map +1 -1
- package/dist/components/Button/SplitButton/SplitButtonPrimary/types.d.ts +11 -0
- package/dist/components/Button/SplitButton/SplitButtonTrigger/SplitButtonTrigger.d.ts +19 -0
- package/dist/components/Button/SplitButton/SplitButtonTrigger/types.d.ts +5 -0
- package/dist/components/Button/SplitButton/core/size.d.ts +13 -0
- package/dist/components/Button/ToggleButton/ToggleButton.d.ts +21 -0
- package/dist/components/Button/ToggleButton/index.js.map +1 -1
- package/dist/components/Button/ToggleButton/types.d.ts +14 -0
- package/dist/components/Button/ToggleIconButton/ToggleIconButton.d.ts +21 -0
- package/dist/components/Button/ToggleIconButton/index.js.map +1 -1
- package/dist/components/Button/ToggleIconButton/types.d.ts +9 -0
- package/dist/components/Button/core/button.d.ts +33 -0
- package/dist/components/Button/core/color.d.ts +38 -0
- package/dist/components/Button/core/shape.d.ts +6 -0
- package/dist/components/Button/core/sizes.d.ts +26 -0
- package/dist/components/Button/core/useButtonConfig.d.ts +25 -0
- package/dist/components/Button/core/variant.d.ts +6 -0
- package/dist/components/Button/core/width.d.ts +7 -0
- package/dist/components/Button/core/withTooltip.d.ts +9 -2
- package/dist/components/Calendar/BaseCalendar/BaseCalendar.d.ts +23 -2
- package/dist/components/Calendar/Calendar/Calendar.d.ts +39 -2
- package/dist/components/Calendar/Calendar/index.js +18 -12
- package/dist/components/Calendar/Calendar/index.js.map +1 -1
- package/dist/components/Calendar/CalendarCell/CalendarCell.d.ts +14 -2
- package/dist/components/Calendar/CalendarGrid/CalendarGrid.d.ts +12 -2
- package/dist/components/Calendar/CalendarMenuItem/CalendarMenuItem.d.ts +12 -1
- package/dist/components/Calendar/CalendarMonthMenu/CalendarMonthMenu.d.ts +14 -2
- package/dist/components/Calendar/CalendarMonthMenu/index.js +2 -2
- package/dist/components/Calendar/CalendarMonthMenu/index.js.map +1 -1
- package/dist/components/Calendar/CalendarYearMenu/CalendarYearMenu.d.ts +14 -2
- package/dist/components/Calendar/CalendarYearMenu/index.js.map +1 -1
- package/dist/components/Calendar/RangeCalendar/RangeCalendar.d.ts +40 -2
- package/dist/components/Calendar/RangeCalendar/index.js +19 -15
- package/dist/components/Calendar/RangeCalendar/index.js.map +1 -1
- package/dist/components/Calendar/core/calendar.d.ts +26 -0
- package/dist/components/Calendar/core/useCalendarState.d.ts +15 -0
- package/dist/components/Calendar/index.d.ts +1 -0
- package/dist/components/Calendar/index.js +4 -3
- package/dist/components/Card/Card/Card.d.ts +20 -0
- package/dist/components/Card/Card/types.d.ts +23 -0
- package/dist/components/Card/CardIcon/CardIcon.d.ts +25 -1
- package/dist/components/Decorators/GridBackgroundDecorator/GridBackgroundDecorator.d.ts +46 -7
- package/dist/components/Decorators/RadialGlowDecorator/RadialGlowDecorator.d.ts +53 -6
- package/dist/components/Dialog/ActionDialog/ActionDialog.d.ts +33 -0
- package/dist/components/Dialog/ActionDialog/types.d.ts +28 -2
- package/dist/components/Dialog/Dialog/Dialog.d.ts +32 -1
- package/dist/components/Dialog/Modal/Modal.d.ts +24 -1
- package/dist/components/Dialog/ModalOverlay/ModalOverlay.d.ts +25 -1
- package/dist/components/Dialog/core/context.d.ts +8 -0
- package/dist/components/Dialog/core/index.js.map +1 -1
- package/dist/components/Dialog/core/typography.d.ts +9 -0
- package/dist/components/Disclosure/Disclosure/Disclosure.d.ts +25 -1
- package/dist/components/Disclosure/DisclosureGroup/DisclosureGroup.d.ts +50 -2
- package/dist/components/Disclosure/DisclosureHeader/DisclosureHeader.d.ts +31 -2
- package/dist/components/Disclosure/DisclosurePanel/DisclosurePanel.d.ts +31 -2
- package/dist/components/Disclosure/context/context.d.ts +11 -2
- package/dist/components/Disclosure/context/index.js.map +1 -1
- package/dist/components/Disclosure/context/useDisclosureTypographyContext.d.ts +18 -2
- package/dist/components/Divider/Divider.d.ts +30 -1
- package/dist/components/Icon/Icon.d.ts +29 -0
- package/dist/components/Icon/types.d.ts +28 -0
- package/dist/components/Input/CharacterCount/CharacterCount.d.ts +11 -2
- package/dist/components/Input/CharacterCount/index.js.map +1 -1
- package/dist/components/Input/Checkbox/Checkbox.d.ts +15 -0
- package/dist/components/Input/Checkbox/CheckboxGroup.d.ts +17 -0
- package/dist/components/Input/Checkbox/context.d.ts +10 -2
- package/dist/components/Input/Checkbox/types.d.ts +42 -0
- package/dist/components/Input/DateField/DateField.d.ts +17 -1
- package/dist/components/Input/DateField/index.js.map +1 -1
- package/dist/components/Input/DateField/types.d.ts +4 -0
- package/dist/components/Input/DatePicker/DatePicker/DatePicker.d.ts +17 -1
- package/dist/components/Input/DatePicker/DatePicker/index.js.map +1 -1
- package/dist/components/Input/DatePicker/DatePicker/types.d.ts +10 -0
- package/dist/components/Input/DatePicker/DateRangePicker/DateRangePicker.d.ts +17 -1
- package/dist/components/Input/DatePicker/DateRangePicker/index.js.map +1 -1
- package/dist/components/Input/DatePicker/DateRangePicker/types.d.ts +10 -0
- package/dist/components/Input/DatePicker/core/datePicker.d.ts +3 -0
- package/dist/components/Input/Description/Description.d.ts +12 -1
- package/dist/components/Input/Description/index.js.map +1 -1
- package/dist/components/Input/FieldError/FieldError.d.ts +12 -1
- package/dist/components/Input/Input/Input.d.ts +27 -0
- package/dist/components/Input/Input/InputButton.d.ts +10 -1
- package/dist/components/Input/Input/handleInputButton.d.ts +6 -0
- package/dist/components/Input/Input/types.d.ts +20 -0
- package/dist/components/Input/Label/Label.d.ts +12 -1
- package/dist/components/Input/Label/index.js.map +1 -1
- package/dist/components/Input/Radio/Radio.d.ts +16 -0
- package/dist/components/Input/Radio/RadioGroup.d.ts +17 -0
- package/dist/components/Input/Radio/context.d.ts +10 -2
- package/dist/components/Input/Radio/types.d.ts +40 -0
- package/dist/components/Input/SearchField/SearchField.d.ts +16 -0
- package/dist/components/Input/SearchField/types.d.ts +9 -0
- package/dist/components/Input/Select/ComboBox/ComboBox.d.ts +29 -1
- package/dist/components/Input/Select/ComboBox/context.d.ts +3 -0
- package/dist/components/Input/Select/ComboBox/types.d.ts +9 -0
- package/dist/components/Input/Select/ComboBoxPopover/ComboBoxPopover.d.ts +10 -1
- package/dist/components/Input/Select/ComboBoxTrigger/ComboBoxTrigger.d.ts +10 -2
- package/dist/components/Input/Select/Select/Select.d.ts +29 -1
- package/dist/components/Input/Select/Select/index.js.map +1 -1
- package/dist/components/Input/Select/Select/types.d.ts +4 -0
- package/dist/components/Input/Select/SelectItem/SelectItem.d.ts +19 -0
- package/dist/components/Input/Select/SelectItem/index.js.map +1 -1
- package/dist/components/Input/Select/SelectItem/types.d.ts +9 -0
- package/dist/components/Input/Select/SelectList/SelectList.d.ts +14 -2
- package/dist/components/Input/Select/SelectList/index.js.map +1 -1
- package/dist/components/Input/Select/SelectListSection/SelectListSection.d.ts +4 -1
- package/dist/components/Input/Select/SelectListSection/index.js.map +1 -1
- package/dist/components/Input/Select/SelectListSectionHeader/SelectListSectionHeader.d.ts +3 -0
- package/dist/components/Input/Select/SelectListSectionHeader/index.js.map +1 -1
- package/dist/components/Input/Select/SelectPopover/SelectPopover.d.ts +10 -1
- package/dist/components/Input/Select/SelectTrigger/SelectTrigger.d.ts +10 -1
- package/dist/components/Input/Slider/CenteredSlider/CenteredSlider.d.ts +23 -1
- package/dist/components/Input/Slider/CenteredSlider/types.d.ts +6 -0
- package/dist/components/Input/Slider/RangeSlider/RangeSlider.d.ts +24 -1
- package/dist/components/Input/Slider/RangeSlider/index.js.map +1 -1
- package/dist/components/Input/Slider/RangeSlider/types.d.ts +9 -0
- package/dist/components/Input/Slider/Slider/Slider.d.ts +24 -1
- package/dist/components/Input/Slider/Slider/types.d.ts +13 -0
- package/dist/components/Input/Slider/SliderOutput/SliderOutput.d.ts +19 -1
- package/dist/components/Input/Slider/SliderStops/SliderStops.d.ts +18 -0
- package/dist/components/Input/Slider/SliderStops/core.d.ts +54 -10
- package/dist/components/Input/Slider/SliderStops/types.d.ts +38 -0
- package/dist/components/Input/Slider/SliderThumb/SliderThumb.d.ts +32 -2
- package/dist/components/Input/Slider/SliderThumb/context.d.ts +20 -0
- package/dist/components/Input/Slider/core/color.d.ts +1 -0
- package/dist/components/Input/Slider/core/size.d.ts +12 -0
- package/dist/components/Input/Slider/core/slider.d.ts +44 -0
- package/dist/components/Input/Slider/core/variant.d.ts +10 -0
- package/dist/components/Input/Switch/Switch.d.ts +15 -0
- package/dist/components/Input/Switch/types.d.ts +33 -0
- package/dist/components/Input/TextArea/TextArea.d.ts +19 -0
- package/dist/components/Input/TextArea/index.js.map +1 -1
- package/dist/components/Input/TextArea/types.d.ts +11 -0
- package/dist/components/Input/TimeField/TimeField.d.ts +17 -1
- package/dist/components/Input/TimeField/index.js.map +1 -1
- package/dist/components/Input/TimeField/types.d.ts +4 -0
- package/dist/components/Input/core/input.d.ts +15 -0
- package/dist/components/Input/core/textField.d.ts +13 -0
- package/dist/components/Input/hooks/index.js.map +1 -1
- package/dist/components/Input/hooks/useControllableState.d.ts +17 -2
- package/dist/components/List/ListAction/ListAction.d.ts +23 -1
- package/dist/components/List/ListAction/index.d.ts +1 -1
- package/dist/components/List/ListAction/index.js +2 -0
- package/dist/components/List/ListAvatar/ListAvatar.d.ts +23 -1
- package/dist/components/List/ListBox/ListBox.d.ts +28 -1
- package/dist/components/List/ListBox/types.d.ts +15 -0
- package/dist/components/List/ListIcon/ListIcon.d.ts +19 -1
- package/dist/components/List/ListItem/ListItem.d.ts +34 -0
- package/dist/components/List/ListItem/types.d.ts +21 -0
- package/dist/components/List/ListLabelText/ListLabelText.d.ts +16 -1
- package/dist/components/List/ListMedia/ListMedia.d.ts +20 -0
- package/dist/components/List/ListMedia/types.d.ts +32 -0
- package/dist/components/List/ListOverlineText/ListOverlineText.d.ts +16 -1
- package/dist/components/List/ListSupportingText/ListSupportingText.d.ts +16 -1
- package/dist/components/List/ListTrailingText/ListTrailingText.d.ts +16 -1
- package/dist/components/List/ListTrailingText/index.d.ts +1 -1
- package/dist/components/List/ListTrailingText/index.js +2 -0
- package/dist/components/List/index.js +11 -9
- package/dist/components/Loader/Loader.d.ts +26 -1
- package/dist/components/Menu/Menu/Menu.d.ts +31 -1
- package/dist/components/Menu/Menu/index.js.map +1 -1
- package/dist/components/Menu/Menu/types.d.ts +18 -0
- package/dist/components/Menu/MenuItem/MenuItem.d.ts +22 -0
- package/dist/components/Menu/MenuItem/index.js.map +1 -1
- package/dist/components/Menu/MenuItem/types.d.ts +24 -0
- package/dist/components/Menu/MenuPopover/MenuPopover.d.ts +21 -1
- package/dist/components/Menu/MenuSection/MenuSection.d.ts +23 -1
- package/dist/components/Menu/MenuSection/index.js.map +1 -1
- package/dist/components/Menu/MenuSectionHeader/MenuSectionHeader.d.ts +16 -1
- package/dist/components/Menu/MenuSectionHeader/index.js.map +1 -1
- package/dist/components/Menu/MenuShortcut/MenuShortcut.d.ts +16 -1
- package/dist/components/Menu/MenuShortcut/index.js.map +1 -1
- package/dist/components/Menu/MenuTrailingText/MenuTrailingText.d.ts +16 -1
- package/dist/components/Menu/MenuTrailingText/index.js.map +1 -1
- package/dist/components/Menu/MenuTrigger/MenuTrigger.d.ts +43 -2
- package/dist/components/Menu/MenuTrigger/index.js.map +1 -1
- package/dist/components/Menu/SubmenuPopover/SubmenuPopover.d.ts +22 -1
- package/dist/components/Menu/context/context.d.ts +13 -0
- package/dist/components/Menu/context/index.js.map +1 -1
- package/dist/components/Menu/context/useMenuConfigContext.d.ts +6 -0
- package/dist/components/Menu/core/color.d.ts +20 -0
- package/dist/components/Menu/core/layout.d.ts +17 -0
- package/dist/components/Menu/core/menu.d.ts +18 -0
- package/dist/components/Navigation/Navigation/Navigation.d.ts +28 -0
- package/dist/components/Navigation/Navigation/navContext.d.ts +19 -0
- package/dist/components/Navigation/Navigation/navRenderingContext.d.ts +16 -0
- package/dist/components/Navigation/Navigation/types.d.ts +28 -0
- package/dist/components/Navigation/NavigationItem/NavigationButton/NavigationButton.d.ts +15 -0
- package/dist/components/Navigation/NavigationItem/NavigationButton/index.js.map +1 -1
- package/dist/components/Navigation/NavigationItem/NavigationButton/types.d.ts +9 -0
- package/dist/components/Navigation/NavigationItem/NavigationItemIconRenderer/NavigationItemIconRenderer.d.ts +21 -2
- package/dist/components/Navigation/NavigationItem/NavigationItemIconRenderer/index.js.map +1 -1
- package/dist/components/Navigation/NavigationItem/NavigationLink/NavigationLink.d.ts +15 -0
- package/dist/components/Navigation/NavigationItem/NavigationLink/index.js.map +1 -1
- package/dist/components/Navigation/NavigationItem/NavigationLink/types.d.ts +5 -0
- package/dist/components/Navigation/NavigationItem/core/navigationItem.d.ts +22 -0
- package/dist/components/Navigation/NavigationScrollContainer/NavigationScrollContainer.d.ts +22 -1
- package/dist/components/Navigation/NavigationSection/NavigationSection/NavigationSection.d.ts +24 -1
- package/dist/components/Navigation/NavigationSection/NavigationSectionLabel/NavigationSectionLabel.d.ts +16 -1
- package/dist/components/Navigation/NavigationState/NavigationState.d.ts +27 -2
- package/dist/components/Navigation/NavigationState/context.d.ts +31 -0
- package/dist/components/Navigation/NavigationState/index.d.ts +1 -0
- package/dist/components/Navigation/NavigationState/index.js.map +1 -1
- package/dist/components/Navigation/NavigationState/types.d.ts +12 -0
- package/dist/components/Navigation/SubNavigation/SubNavigation/SubNavigation.d.ts +35 -2
- package/dist/components/Navigation/SubNavigation/SubNavigation/index.js.map +1 -1
- package/dist/components/Navigation/SubNavigation/SubNavigationTrigger/SubNavigationTrigger.d.ts +40 -2
- package/dist/components/Navigation/SubNavigation/SubNavigationTrigger/index.js.map +1 -1
- package/dist/components/Navigation/core/navLabelContext.d.ts +6 -0
- package/dist/components/Navigation/core/navigation.d.ts +9 -0
- package/dist/components/Navigation/core/navigationInfo.d.ts +19 -0
- package/dist/components/Popover/Popover.d.ts +34 -1
- package/dist/components/Sheets/BottomSheet/BottomSheet.d.ts +40 -2
- package/dist/components/Sheets/BottomSheet/index.d.ts +1 -0
- package/dist/components/Sheets/BottomSheet/types.d.ts +37 -0
- package/dist/components/Sheets/BottomSheetModal/BottomSheetModal.d.ts +34 -0
- package/dist/components/Sheets/BottomSheetModal/context.d.ts +10 -0
- package/dist/components/Sheets/BottomSheetModal/types.d.ts +38 -0
- package/dist/components/Sheets/SideSheet/SideSheet.d.ts +46 -0
- package/dist/components/Sheets/SideSheet/SideSheetDialog.d.ts +43 -0
- package/dist/components/Sheets/SideSheet/types.d.ts +96 -2
- package/dist/components/Sheets/SideSheetModal/SideSheetModal.d.ts +34 -0
- package/dist/components/Sheets/SideSheetModal/context.d.ts +13 -0
- package/dist/components/Sheets/SideSheetModal/types.d.ts +49 -0
- package/dist/components/Sheets/core/layout.d.ts +11 -0
- package/dist/components/Snackbar/SnackbarRegion.d.ts +50 -0
- package/dist/components/Snackbar/context.d.ts +38 -0
- package/dist/components/Snackbar/types.d.ts +69 -0
- package/dist/components/Splash/Splash.d.ts +6 -0
- package/dist/components/Splash/types.d.ts +10 -0
- package/dist/components/Splash/useSplash.d.ts +21 -0
- package/dist/components/Tabs/Tab/Tab.d.ts +33 -2
- package/dist/components/Tabs/TabList/TabList.d.ts +42 -1
- package/dist/components/Tabs/TabPanel/TabPanel.d.ts +28 -1
- package/dist/components/Tabs/TabPanels/TabPanels.d.ts +28 -1
- package/dist/components/Tabs/Tabs/Tabs.d.ts +43 -1
- package/dist/components/Tag/Tag.d.ts +37 -0
- package/dist/components/Tag/core.d.ts +6 -0
- package/dist/components/Tag/types.d.ts +48 -2
- package/dist/components/ThemeSelector/ThemeItem.d.ts +46 -2
- package/dist/components/ThemeSelector/ThemeProvider.d.ts +29 -2
- package/dist/components/ThemeSelector/ThemeSelector.d.ts +24 -0
- package/dist/components/ThemeSelector/core.d.ts +58 -0
- package/dist/components/ThemeSelector/index.d.ts +2 -0
- package/dist/components/ThemeSelector/index.js +2 -2
- package/dist/components/ThemeSelector/types.d.ts +69 -2
- package/dist/components/Toolbar/Toolbar.d.ts +47 -0
- package/dist/components/Toolbar/ToolbarToggleButtonGroup.d.ts +35 -1
- package/dist/components/Toolbar/types.d.ts +60 -0
- package/dist/components/Tooltip/RichTooltip/RichTooltip/RichTooltip.d.ts +56 -1
- package/dist/components/Tooltip/RichTooltip/RichTooltipActions/RichTooltipActions.d.ts +27 -1
- package/dist/components/Tooltip/RichTooltip/RichTooltipInfo/RichTooltipInfo/RichTooltipInfo.d.ts +31 -1
- package/dist/components/Tooltip/RichTooltip/RichTooltipInfo/RichTooltipSubhead/RichTooltipSubhead.d.ts +22 -1
- package/dist/components/Tooltip/RichTooltip/RichTooltipInfo/RichTooltipSubhead/index.js.map +1 -1
- package/dist/components/Tooltip/RichTooltip/RichTooltipInfo/RichTooltipText/RichTooltipText.d.ts +26 -1
- package/dist/components/Tooltip/RichTooltip/RichTooltipInfo/RichTooltipText/index.js.map +1 -1
- package/dist/components/Tooltip/Tooltip/Tooltip.d.ts +35 -1
- package/dist/components/Tooltip/TooltipTrigger/TooltipTrigger.d.ts +29 -1
- package/dist/components/Tooltip/TooltipTrigger/index.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +129 -137
- package/dist/index.js.map +1 -1
- package/dist/utils/gradients/gradients.d.ts +97 -0
- package/dist/utils/index.d.ts +0 -1
- package/dist/utils/ref/ref.d.ts +35 -2
- package/dist/utils/scroll/scroll.d.ts +67 -4
- package/dist/utils/tapTarget/tapTarget.d.ts +57 -0
- package/dist/utils/theme/build.d.ts +24 -0
- package/dist/utils/theme/types.d.ts +70 -0
- package/dist/utils/theme/useTheme.d.ts +40 -0
- package/dist/utils/typography/base.d.ts +68 -0
- package/dist/utils/typography/core.d.ts +16 -0
- package/dist/utils/typography/fluid.d.ts +36 -0
- package/package.json +23 -25
- package/dist/chunks/useGlobalListeners +0 -294
- package/dist/chunks/useGlobalListeners.map +0 -1
- package/dist/chunks/usePress +0 -535
- package/dist/chunks/usePress.map +0 -1
- package/dist/components/Image/Image.d.ts +0 -2
- package/dist/components/Image/index.d.ts +0 -2
- package/dist/components/Image/index.js +0 -29
- package/dist/components/Image/index.js.map +0 -1
- package/dist/components/Image/types.d.ts +0 -9
- package/dist/utils/form/form.d.ts +0 -13
- package/dist/utils/form/index.d.ts +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["icon","activeIcon","buttonActive","buttonLabel"],"sources":["../../../../../src/components/Navigation/NavigationItem/NavigationButton/NavigationButton.tsx"],"sourcesContent":["import { clsx } from \"clsx\";\nimport { useContext } from \"react\";\nimport { Button } from \"react-aria-components\";\nimport { NavLabelContext } from \"../../core\";\nimport { useNavigationContext } from \"../../Navigation/navContext\";\nimport { NavigationItemLabelTypography, NavigationItemStyles } from \"../core\";\nimport { NavigationItemIconRenderer } from \"../NavigationItemIconRenderer\";\nimport type { NavigationButtonProps } from \"./types\";\n\nexport const NavigationButton: React.FC<NavigationButtonProps> = ({\n className,\n icon,\n activeIcon,\n label,\n prefix,\n isActive,\n ...props\n}) => {\n const { isButtonActive } = useNavigationContext();\n const buttonActive =\n typeof isActive === \"function\"\n ? isActive(prefix)\n : (isActive ?? isButtonActive?.(prefix));\n\n const triggerLabel = useContext(NavLabelContext);\n const buttonLabel = label ?? triggerLabel;\n\n return (\n <Button\n className={(renderProps) =>\n clsx(\n NavigationItemStyles,\n NavigationItemLabelTypography,\n typeof className === \"function\"\n ? className(renderProps)\n : className\n )\n }\n {...props}\n slot=\"open\"\n data-active={buttonActive || undefined}\n >\n <NavigationItemIconRenderer\n icon={icon}\n activeIcon={activeIcon}\n isActive={buttonActive}\n />\n {buttonLabel}\n </Button>\n );\n};\n"],"mappings":";;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","names":["icon","activeIcon","buttonActive","buttonLabel","_c","require_compiler_runtime","NavigationItemStyles","NavigationItemLabelTypography","import_compiler_runtime","NavigationButton","$","activeIcon","className","icon","isActive","label","prefix","props","t0","useNavigationContext","t1","isButtonActive","buttonActive","triggerLabel","useContext","NavLabelContext","buttonLabel","t2","clsx","renderProps","t3","t4","NavigationItemIconRenderer","t5","Button"],"sources":["../../../../../src/components/Navigation/NavigationItem/NavigationButton/NavigationButton.tsx"],"sourcesContent":["import { clsx } from \"clsx\";\nimport { useContext } from \"react\";\nimport { Button } from \"react-aria-components\";\nimport { NavLabelContext } from \"../../core\";\nimport { useNavigationContext } from \"../../Navigation/navContext\";\nimport { NavigationItemLabelTypography, NavigationItemStyles } from \"../core\";\nimport { NavigationItemIconRenderer } from \"../NavigationItemIconRenderer\";\nimport type { NavigationButtonProps } from \"./types\";\n\n/**\n * Button navigation item component.\n *\n * Typically used as an action trigger within a [`SubNavigationTrigger`](file:///home/rohan/work/adgytec/adgytec-web-ui-components/src/components/Navigation/SubNavigation/SubNavigationTrigger/SubNavigationTrigger.tsx)\n * to open a nested sub-navigation panel. Automatically evaluates active state matching based on its `prefix`,\n * switches between resting and active icons, and inherits labels from parent triggers.\n *\n * @example\n * ```tsx\n * import { NavigationButton } from \"@adgytec/web-ui-components\";\n * import { Briefcase } from \"lucide-react\";\n *\n * <NavigationButton icon={Briefcase} prefix=\"/projects\" label=\"Projects\" />\n * ```\n */\nexport const NavigationButton: React.FC<NavigationButtonProps> = ({\n className,\n icon,\n activeIcon,\n label,\n prefix,\n isActive,\n ...props\n}) => {\n const { isButtonActive } = useNavigationContext();\n const buttonActive =\n typeof isActive === \"function\"\n ? isActive(prefix)\n : (isActive ?? isButtonActive?.(prefix));\n\n const triggerLabel = useContext(NavLabelContext);\n const buttonLabel = label ?? triggerLabel;\n\n return (\n <Button\n className={(renderProps) =>\n clsx(\n NavigationItemStyles,\n NavigationItemLabelTypography,\n typeof className === \"function\"\n ? className(renderProps)\n : className\n )\n }\n {...props}\n slot=\"open\"\n data-active={buttonActive || undefined}\n >\n <NavigationItemIconRenderer\n icon={icon}\n activeIcon={activeIcon}\n isActive={buttonActive}\n />\n {buttonLabel}\n </Button>\n );\n};\n"],"mappings":";;;;;;;;;;aAwBaS,KAAoD,MAAA;CAAA,IAAAC,KAAA,GAAAN,EAAAA,EAAAA,CAAA,EAAA,GAAAO,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC;CAAA,AAAAP,EAAA,OAAAQ,KAQhE,IAAAR,EAAA,IAAA,IAAAA,EAAA,IAAA,IAAAA,EAAA,IAAA,IAAAA,EAAA,IAAA,IAAAA,EAAA,IAAA,IAAAA,EAAA,IAAA,IAAAA,EAAA,OARiE,yEAAA,GAAAO,KAAAC,GAQjE,EAAA,KAAAA,GAAA,EAAA,KAAAP,GAAA,EAAA,KAAAC,GAAA,EAAA,KAAAC,GAAA,EAAA,KAAAC,GAAA,EAAA,KAAAC,GAAA,EAAA,KAAAC,GAAA,EAAA,KAAAC;CACG,IAAA,EAAA,sBAA2BE,EAAqB,GAAEC;CAAA,AAAAV,EAAA,OAAAI,KAAAJ,EAAA,OAAAW,KAAAX,EAAA,QAAAM,KAE9C,IAAA,OAAOF,KAAa,aACdA,EAASE,CAC4B,IAApCF,KAAYO,IAAiBL,CAAM,GAAE,EAAA,KAAAF,GAAA,EAAA,KAAAO,GAAA,EAAA,MAAAL,GAAA,EAAA,MAAAI,KAAA,IAAAV,EAAA;CAHhD,IAAAY,IACIF,GAIJG,IAAqBC,EAAWC,CAAe,GAC/CC,IAAoBX,KAAAQ,GAAsBI;CAAA,AAAAjB,EAAA,QAAAE,IAW7B,IAAAF,EAAA,OAPM,KAAA,MACPkB,EACItB,GACAC,GACA,OAAOK,KAAc,aACfA,EAAUiB,CACF,IAFdjB,CAGJ,GAAC,EAAA,MAAAA,GAAA,EAAA,MAAAe;CAIQ,IAAAG,IAAAR,KAAA,KAAA,GAAyBS;CAAA,AAAArB,EAAA,QAAAC,KAAAD,EAAA,QAAAY,KAAAZ,EAAA,QAAAG,KAEtC,IAAA,kBAACmB,GAAD;EACU;EACM;EACF9B,UAAAoB;CAAY,CAAA,GACxB,EAAA,MAAAX,GAAA,EAAA,MAAAW,GAAA,EAAA,MAAAT,GAAA,EAAA,MAAAkB,KAAA,IAAArB,EAAA;CAAA,IAAAuB;CAEG,OAFHvB,EAAA,QAAAgB,KAAAhB,EAAA,QAAAO,KAAAP,EAAA,QAAAiB,KAAAjB,EAAA,QAAAoB,KAAApB,EAAA,QAAAqB,KAlBN,IAAA,kBAACG,GAAD;EACe,WAAAP;EAON,GAEDV;EACC,MAAA;EACQ,eAAAa;EAZjB,UAAA,CAcIC,GAKCL,CAnBE;KAoBE,EAAA,MAAAA,GAAA,EAAA,MAAAT,GAAA,EAAA,MAAAU,GAAA,EAAA,MAAAG,GAAA,EAAA,MAAAC,GAAA,EAAA,MAAAE,KAAA,IAAAvB,EAAA,KApBTuB;AAoBS"}
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { Button } from 'react-aria-components';
|
|
3
3
|
import { NavigationItemProps } from '../core';
|
|
4
|
+
/**
|
|
5
|
+
* Props for the [`NavigationButton`](file:///home/rohan/work/adgytec/adgytec-web-ui-components/src/components/Navigation/NavigationItem/NavigationButton/NavigationButton.tsx) component.
|
|
6
|
+
*/
|
|
4
7
|
export interface NavigationButtonProps extends Omit<React.ComponentPropsWithRef<typeof Button>, "children" | "slot">, Omit<NavigationItemProps, "label"> {
|
|
8
|
+
/**
|
|
9
|
+
* URL path prefix evaluated by `isButtonActive` to determine the button's active state.
|
|
10
|
+
*/
|
|
5
11
|
prefix?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Button label content. If omitted, falls back to the label provided to [`SubNavigationTrigger`](file:///home/rohan/work/adgytec/adgytec-web-ui-components/src/components/Navigation/SubNavigation/SubNavigationTrigger/SubNavigationTrigger.tsx).
|
|
14
|
+
*/
|
|
6
15
|
label?: ReactNode;
|
|
7
16
|
}
|
|
@@ -1,6 +1,25 @@
|
|
|
1
1
|
import { LucideIcon } from 'lucide-react';
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Props for the [`NavigationItemIconRenderer`](file:///home/rohan/work/adgytec/adgytec-web-ui-components/src/components/Navigation/NavigationItem/NavigationItemIconRenderer/NavigationItemIconRenderer.tsx) component.
|
|
4
|
+
*/
|
|
5
|
+
export interface NavigationItemIconRendererProps {
|
|
6
|
+
/**
|
|
7
|
+
* Icon displayed when the item is in its inactive/resting state.
|
|
8
|
+
*/
|
|
3
9
|
icon?: LucideIcon;
|
|
10
|
+
/**
|
|
11
|
+
* Alternate icon displayed when the item is active.
|
|
12
|
+
*/
|
|
4
13
|
activeIcon?: LucideIcon;
|
|
14
|
+
/**
|
|
15
|
+
* Whether the parent navigation item is currently active.
|
|
16
|
+
*/
|
|
5
17
|
isActive?: boolean;
|
|
6
|
-
}
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Internal icon renderer for navigation items.
|
|
21
|
+
*
|
|
22
|
+
* Renders a standard 24px icon with automatic fallback between `activeIcon` (when `isActive` is true)
|
|
23
|
+
* and the resting `icon`.
|
|
24
|
+
*/
|
|
25
|
+
export declare const NavigationItemIconRenderer: React.FC<NavigationItemIconRendererProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["icon","activeIcon"],"sources":["../../../../../src/components/Navigation/NavigationItem/NavigationItemIconRenderer/NavigationItemIconRenderer.tsx"],"sourcesContent":["import type { LucideIcon } from \"lucide-react\";\nimport { Icon } from \"@/components/Icon\";\n\nconst IconRenderer: React.FC<{ icon: LucideIcon }> = ({ icon }) => {\n return <Icon icon={icon} size={24} data-nav-icon />;\n};\n\
|
|
1
|
+
{"version":3,"file":"index.js","names":["icon","activeIcon","_c","require_compiler_runtime","import_compiler_runtime","IconRenderer","$","t0","t1","icon","Icon","NavigationItemIconRenderer","isActive","activeIcon"],"sources":["../../../../../src/components/Navigation/NavigationItem/NavigationItemIconRenderer/NavigationItemIconRenderer.tsx"],"sourcesContent":["import type { LucideIcon } from \"lucide-react\";\nimport { Icon } from \"@/components/Icon\";\n\nconst IconRenderer: React.FC<{ icon: LucideIcon }> = ({ icon }) => {\n return <Icon icon={icon} size={24} data-nav-icon />;\n};\n\n/**\n * Props for the [`NavigationItemIconRenderer`](file:///home/rohan/work/adgytec/adgytec-web-ui-components/src/components/Navigation/NavigationItem/NavigationItemIconRenderer/NavigationItemIconRenderer.tsx) component.\n */\nexport interface NavigationItemIconRendererProps {\n /**\n * Icon displayed when the item is in its inactive/resting state.\n */\n icon?: LucideIcon;\n\n /**\n * Alternate icon displayed when the item is active.\n */\n activeIcon?: LucideIcon;\n\n /**\n * Whether the parent navigation item is currently active.\n */\n isActive?: boolean;\n}\n\n/**\n * Internal icon renderer for navigation items.\n *\n * Renders a standard 24px icon with automatic fallback between `activeIcon` (when `isActive` is true)\n * and the resting `icon`.\n */\nexport const NavigationItemIconRenderer: React.FC<\n NavigationItemIconRendererProps\n> = ({ icon, activeIcon, isActive }) => {\n if (isActive) {\n if (activeIcon) return <IconRenderer icon={activeIcon} />;\n if (icon) return <IconRenderer icon={icon} />;\n\n return null;\n }\n\n if (icon) return <IconRenderer icon={icon} />;\n return null;\n};\n"],"mappings":";;;;aAGMK,KAA+C,MAAA;CAAA,IAAAC,KAAA,GAAAJ,EAAAA,EAAAA,CAAA,CAAA,GAAC,EAAA,YAAAK,GAAQC;CACP,OADOF,EAAA,OAAAG,IACP,IAAAH,EAAA,MAA5C,IAAA,kBAACI,GAAD;EAAY;EAAY,MAAA;EAAI,iBAAA;CAAa,CAAA,GAAG,EAAA,KAAAD,GAAA,EAAA,KAAAD,IAA5CA;AAA4C,GA6B1CG,KAET,MAAA;CAAA,IAAAL,KAAA,GAAAJ,EAAAA,EAAAA,CAAA,CAAA,GAAC,EAAA,SAAA,eAAA,gBAAAK;CACD,IAAIK,GAAQ;EACR,IAAIC,GAAU;GAAA,IAAAL;GAA2C,OAA3CF,EAAA,OAAAO,IAA2C,IAAAP,EAAA,MAAlC,IAAA,kBAACD,GAAD,EAAoBJ,MAAAY,EAAU,CAAA,GAAI,EAAA,KAAAA,GAAA,EAAA,KAAAL,IAAlCA;EAAkC;EACzD,IAAIC,GAAI;GAAA,IAAAD;GAAqC,OAArCF,EAAA,OAAAG,IAAqC,IAAAH,EAAA,MAA5B,IAAA,kBAACD,GAAD,EAAoB,QAAI,CAAA,GAAI,EAAA,KAAAI,GAAA,EAAA,KAAAD,IAA5BA;EAA4B;EAAC,OAEvC;CAAI;CAGf,IAAIC,GAAI;EAAA,IAAAD;EAAqC,OAArCF,EAAA,OAAAG,IAAqC,IAAAH,EAAA,MAA5B,IAAA,kBAACD,GAAD,EAAoB,QAAI,CAAA,GAAI,EAAA,KAAAI,GAAA,EAAA,KAAAD,IAA5BA;CAA4B;CAAC,OACvC;AAAI"}
|
|
@@ -1,2 +1,17 @@
|
|
|
1
1
|
import { NavigationLinkProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Anchor-based navigation item component.
|
|
4
|
+
*
|
|
5
|
+
* Renders an accessible navigation link that evaluates active URL state matching (using `href`),
|
|
6
|
+
* automatically toggles between resting and active icons, and applies Material Design 3
|
|
7
|
+
* active state pill backgrounds.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* import { NavigationLink } from "@adgytec/web-ui-components";
|
|
12
|
+
* import { Home } from "lucide-react";
|
|
13
|
+
*
|
|
14
|
+
* <NavigationLink href="/dashboard" label="Dashboard" icon={Home} />
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
2
17
|
export declare const NavigationLink: React.FC<NavigationLinkProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["icon","activeIcon","linkActive","href","label"],"sources":["../../../../../src/components/Navigation/NavigationItem/NavigationLink/NavigationLink.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { Link } from \"react-aria-components\";\nimport { useNavigationContext } from \"../../Navigation/navContext\";\nimport { NavigationItemLabelTypography, NavigationItemStyles } from \"../core\";\nimport { NavigationItemIconRenderer } from \"../NavigationItemIconRenderer\";\nimport type { NavigationLinkProps } from \"./types\";\n\nexport const NavigationLink: React.FC<NavigationLinkProps> = ({\n className,\n icon,\n activeIcon,\n label,\n href,\n isActive,\n ...props\n}) => {\n const { isLinkActive } = useNavigationContext();\n const linkActive =\n typeof isActive === \"function\"\n ? isActive(href)\n : (isActive ?? isLinkActive?.(href));\n\n return (\n <Link\n className={(renderProps) =>\n clsx(\n NavigationItemStyles,\n NavigationItemLabelTypography,\n typeof className === \"function\"\n ? className(renderProps)\n : className\n )\n }\n href={href}\n {...props}\n data-active={linkActive || undefined}\n >\n <NavigationItemIconRenderer\n icon={icon}\n activeIcon={activeIcon}\n isActive={linkActive}\n />\n {label}\n </Link>\n );\n};\n"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","names":["icon","activeIcon","linkActive","href","label","_c","clsx","require_compiler_runtime","useNavigationContext","NavigationItemLabelTypography","clsx$1","import_compiler_runtime","NavigationLink","$","activeIcon","className","href","icon","isActive","label","props","t0","t1","isLinkActive","linkActive","t2","NavigationItemStyles","renderProps","t3","t4","NavigationItemIconRenderer","t5","Link"],"sources":["../../../../../src/components/Navigation/NavigationItem/NavigationLink/NavigationLink.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { Link } from \"react-aria-components\";\nimport { useNavigationContext } from \"../../Navigation/navContext\";\nimport { NavigationItemLabelTypography, NavigationItemStyles } from \"../core\";\nimport { NavigationItemIconRenderer } from \"../NavigationItemIconRenderer\";\nimport type { NavigationLinkProps } from \"./types\";\n\n/**\n * Anchor-based navigation item component.\n *\n * Renders an accessible navigation link that evaluates active URL state matching (using `href`),\n * automatically toggles between resting and active icons, and applies Material Design 3\n * active state pill backgrounds.\n *\n * @example\n * ```tsx\n * import { NavigationLink } from \"@adgytec/web-ui-components\";\n * import { Home } from \"lucide-react\";\n *\n * <NavigationLink href=\"/dashboard\" label=\"Dashboard\" icon={Home} />\n * ```\n */\nexport const NavigationLink: React.FC<NavigationLinkProps> = ({\n className,\n icon,\n activeIcon,\n label,\n href,\n isActive,\n ...props\n}) => {\n const { isLinkActive } = useNavigationContext();\n const linkActive =\n typeof isActive === \"function\"\n ? isActive(href)\n : (isActive ?? isLinkActive?.(href));\n\n return (\n <Link\n className={(renderProps) =>\n clsx(\n NavigationItemStyles,\n NavigationItemLabelTypography,\n typeof className === \"function\"\n ? className(renderProps)\n : className\n )\n }\n href={href}\n {...props}\n data-active={linkActive || undefined}\n >\n <NavigationItemIconRenderer\n icon={icon}\n activeIcon={activeIcon}\n isActive={linkActive}\n />\n {label}\n </Link>\n );\n};\n"],"mappings":";;;;;;;;aAsBaY,KAAgD,MAAA;CAAA,IAAAC,KAAA,GAAAR,EAAAA,EAAAA,CAAA,EAAA,GAAAS,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC;CAAA,AAAAP,EAAA,OAAAQ,KAQ5D,IAAAR,EAAA,IAAA,IAAAA,EAAA,IAAA,IAAAA,EAAA,IAAA,IAAAA,EAAA,IAAA,IAAAA,EAAA,IAAA,IAAAA,EAAA,IAAA,IAAAA,EAAA,OAR6D,uEAAA,GAAAO,KAAAC,GAQ7D,EAAA,KAAAA,GAAA,EAAA,KAAAP,GAAA,EAAA,KAAAC,GAAA,EAAA,KAAAC,GAAA,EAAA,KAAAC,GAAA,EAAA,KAAAC,GAAA,EAAA,KAAAC,GAAA,EAAA,KAAAC;CACG,IAAA,EAAA,oBAAyBZ,EAAqB,GAAEc;CAAA,AAAAT,EAAA,OAAAG,KAAAH,EAAA,OAAAK,KAAAL,EAAA,QAAAU,KAE5C,IAAA,OAAOL,KAAa,aACdA,EAASF,CACwB,IAAhCE,KAAYK,IAAeP,CAAI,GAAE,EAAA,KAAAA,GAAA,EAAA,KAAAE,GAAA,EAAA,MAAAK,GAAA,EAAA,MAAAD,KAAA,IAAAT,EAAA;CAH5C,IAAAW,IACIF,GAEyCG;CAAA,AAAAZ,EAAA,QAAAE,IAWhC,IAAAF,EAAA,OAPM,KAAA,MACPP,EACIoB,GACAjB,GACA,OAAOM,KAAc,aACfA,EAAUY,CACF,IAFdZ,CAGJ,GAAC,EAAA,MAAAA,GAAA,EAAA,MAAAU;CAIQ,IAAAG,IAAAJ,KAAA,KAAA,GAAuBK;CAAA,AAAAhB,EAAA,QAAAC,KAAAD,EAAA,QAAAI,KAAAJ,EAAA,QAAAW,KAEpC,IAAA,kBAACM,GAAD;EACU;EACM;EACF5B,UAAAsB;CAAU,CAAA,GACtB,EAAA,MAAAV,GAAA,EAAA,MAAAG,GAAA,EAAA,MAAAO,GAAA,EAAA,MAAAK,KAAA,IAAAhB,EAAA;CAAA,IAAAkB;CAEC,OAFDlB,EAAA,QAAAG,KAAAH,EAAA,QAAAM,KAAAN,EAAA,QAAAO,KAAAP,EAAA,QAAAY,KAAAZ,EAAA,QAAAe,KAAAf,EAAA,QAAAgB,KAlBN,IAAA,kBAACG,GAAD;EACe,WAAAP;EASL;EAAI,GACNL;EACS,eAAAQ;EAZjB,UAAA,CAcIC,GAKCV,CAnBA;KAoBE,EAAA,MAAAH,GAAA,EAAA,MAAAG,GAAA,EAAA,MAAAC,GAAA,EAAA,MAAAK,GAAA,EAAA,MAAAG,GAAA,EAAA,MAAAC,GAAA,EAAA,MAAAE,KAAA,IAAAlB,EAAA,KApBPkB;AAoBO"}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { Link } from 'react-aria-components';
|
|
2
2
|
import { NavigationItemProps } from '../core';
|
|
3
|
+
/**
|
|
4
|
+
* Props for the [`NavigationLink`](file:///home/rohan/work/adgytec/adgytec-web-ui-components/src/components/Navigation/NavigationItem/NavigationLink/NavigationLink.tsx) component.
|
|
5
|
+
*
|
|
6
|
+
* Extends React Aria's `Link` properties and [`NavigationItemProps`](file:///home/rohan/work/adgytec/adgytec-web-ui-components/src/components/Navigation/NavigationItem/core/navigationItem.ts#L8).
|
|
7
|
+
*/
|
|
3
8
|
export interface NavigationLinkProps extends Omit<React.ComponentPropsWithRef<typeof Link>, "children">, NavigationItemProps {
|
|
4
9
|
}
|
|
@@ -1,10 +1,32 @@
|
|
|
1
1
|
import { LucideIcon } from 'lucide-react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* Common configuration properties shared across navigation items ([`NavigationLink`](file:///home/rohan/work/adgytec/adgytec-web-ui-components/src/components/Navigation/NavigationItem/NavigationLink/NavigationLink.tsx)
|
|
5
|
+
* and [`NavigationButton`](file:///home/rohan/work/adgytec/adgytec-web-ui-components/src/components/Navigation/NavigationItem/NavigationButton/NavigationButton.tsx)).
|
|
6
|
+
*/
|
|
3
7
|
export interface NavigationItemProps {
|
|
8
|
+
/**
|
|
9
|
+
* Primary label content for the navigation item.
|
|
10
|
+
*/
|
|
4
11
|
label: ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* Optional icon displayed when the navigation item is in its inactive state.
|
|
14
|
+
*/
|
|
5
15
|
icon?: LucideIcon;
|
|
16
|
+
/**
|
|
17
|
+
* Optional alternate icon displayed when the navigation item is in its active state.
|
|
18
|
+
*/
|
|
6
19
|
activeIcon?: LucideIcon;
|
|
20
|
+
/**
|
|
21
|
+
* Override flag or predicate function evaluating whether the item is currently active.
|
|
22
|
+
*/
|
|
7
23
|
isActive?: boolean | ((value?: string) => boolean);
|
|
8
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* Standard typography style (`titleSmall`) for navigation item label text.
|
|
27
|
+
*/
|
|
9
28
|
export declare const NavigationItemLabelTypography: "typography-title-small";
|
|
29
|
+
/**
|
|
30
|
+
* CSS class for individual navigation item styling, interactive state layers, and padding.
|
|
31
|
+
*/
|
|
10
32
|
export declare const NavigationItemStyles: string;
|
|
@@ -1 +1,22 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Props for the [`NavigationScrollContainer`](file:///home/rohan/work/adgytec/adgytec-web-ui-components/src/components/Navigation/NavigationScrollContainer/NavigationScrollContainer.tsx) component.
|
|
3
|
+
*/
|
|
4
|
+
export interface NavigationScrollContainerProps extends React.ComponentPropsWithRef<"div"> {
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Scrollable viewport container for navigation items and sections.
|
|
8
|
+
*
|
|
9
|
+
* Automatically records and restores scroll progress on mount and scroll events,
|
|
10
|
+
* coordinating with [`NavigationState`](file:///home/rohan/work/adgytec/adgytec-web-ui-components/src/components/Navigation/NavigationState/NavigationState.tsx)
|
|
11
|
+
* to keep scroll positions synchronized when navigating into and out of sub-menus.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```tsx
|
|
15
|
+
* <NavigationScrollContainer>
|
|
16
|
+
* <NavigationSection>
|
|
17
|
+
* <NavigationLink href="/" label="Home" />
|
|
18
|
+
* </NavigationSection>
|
|
19
|
+
* </NavigationScrollContainer>
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare const NavigationScrollContainer: React.FC<NavigationScrollContainerProps>;
|
package/dist/components/Navigation/NavigationSection/NavigationSection/NavigationSection.d.ts
CHANGED
|
@@ -1 +1,24 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Props for the [`NavigationSection`](file:///home/rohan/work/adgytec/adgytec-web-ui-components/src/components/Navigation/NavigationSection/NavigationSection/NavigationSection.tsx) component.
|
|
3
|
+
*/
|
|
4
|
+
export interface NavigationSectionProps extends React.ComponentPropsWithRef<"section"> {
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Semantic container used to group related navigation items and an optional section heading.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* import {
|
|
12
|
+
* NavigationSection,
|
|
13
|
+
* NavigationSectionLabel,
|
|
14
|
+
* NavigationLink,
|
|
15
|
+
* } from "@adgytec/web-ui-components";
|
|
16
|
+
* import { Settings } from "lucide-react";
|
|
17
|
+
*
|
|
18
|
+
* <NavigationSection>
|
|
19
|
+
* <NavigationSectionLabel>Preferences</NavigationSectionLabel>
|
|
20
|
+
* <NavigationLink href="/settings" label="Settings" icon={Settings} />
|
|
21
|
+
* </NavigationSection>
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export declare const NavigationSection: React.FC<NavigationSectionProps>;
|
|
@@ -1,2 +1,17 @@
|
|
|
1
1
|
import { Heading } from 'react-aria-components';
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Props for the [`NavigationSectionLabel`](file:///home/rohan/work/adgytec/adgytec-web-ui-components/src/components/Navigation/NavigationSection/NavigationSectionLabel/NavigationSectionLabel.tsx) component.
|
|
4
|
+
*/
|
|
5
|
+
export interface NavigationSectionLabelProps extends React.ComponentPropsWithRef<typeof Heading> {
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Styled title heading for a [`NavigationSection`](file:///home/rohan/work/adgytec/adgytec-web-ui-components/src/components/Navigation/NavigationSection/NavigationSection/NavigationSection.tsx).
|
|
9
|
+
*
|
|
10
|
+
* Rendered with Material Design 3 `titleSmall` typography and accessible heading semantics.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* <NavigationSectionLabel>Workspaces</NavigationSectionLabel>
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export declare const NavigationSectionLabel: React.FC<NavigationSectionLabelProps>;
|
|
@@ -1,4 +1,29 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Props for the [`NavigationState`](file:///home/rohan/work/adgytec/adgytec-web-ui-components/src/components/Navigation/NavigationState/NavigationState.tsx) component.
|
|
4
|
+
*/
|
|
5
|
+
export interface NavigationStateProps {
|
|
6
|
+
/**
|
|
7
|
+
* Child elements, typically one or more [`Navigation`](file:///home/rohan/work/adgytec/adgytec-web-ui-components/src/components/Navigation/Navigation/Navigation.tsx) instances.
|
|
8
|
+
*/
|
|
3
9
|
children?: ReactNode;
|
|
4
|
-
}
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Global navigation state coordinator component.
|
|
13
|
+
*
|
|
14
|
+
* Coordinates active sub-navigation panel stacks, tracks inert states for covered panels,
|
|
15
|
+
* and maintains scroll position synchronization across multiple navigation instances
|
|
16
|
+
* (such as a persistent desktop sidebar and a mobile drawer).
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```tsx
|
|
20
|
+
* import { NavigationState, Navigation } from "@adgytec/web-ui-components";
|
|
21
|
+
*
|
|
22
|
+
* <NavigationState>
|
|
23
|
+
* <Navigation label="Main Navigation">
|
|
24
|
+
* {...}
|
|
25
|
+
* </Navigation>
|
|
26
|
+
* </NavigationState>
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export declare const NavigationState: React.FC<NavigationStateProps>;
|
|
@@ -1,10 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Context value managing sub-navigation transitions, inert state tracking, and scroll progress synchronization.
|
|
3
|
+
*/
|
|
1
4
|
export type NavigationStateContextType = {
|
|
5
|
+
/**
|
|
6
|
+
* Opens a sub-navigation panel at the specified depth level.
|
|
7
|
+
*/
|
|
2
8
|
openSubNavigation: (id: string, depth: number) => void;
|
|
9
|
+
/**
|
|
10
|
+
* Closes the sub-navigation panel matching `id` and any panels nested deeper.
|
|
11
|
+
*/
|
|
3
12
|
closeSubNavigation: (id: string) => void;
|
|
13
|
+
/**
|
|
14
|
+
* Saves scroll progress (0 to 1) for the navigation level matching `id`.
|
|
15
|
+
*/
|
|
4
16
|
saveNavigationScrollTopProgress: (id: string, progress: number) => void;
|
|
17
|
+
/**
|
|
18
|
+
* Checks whether a given sub-navigation panel is currently open.
|
|
19
|
+
*/
|
|
5
20
|
isSubNavigationOpen: (id: string) => boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Checks whether a given depth level should be inert (i.e. covered by a deeper active sub-navigation panel).
|
|
23
|
+
*/
|
|
6
24
|
isInert: (depth: number) => boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Retrieves the saved scroll progress (0 to 1) for the navigation level matching `id`.
|
|
27
|
+
*/
|
|
7
28
|
getNavigationScrollProgress: (id: string) => number;
|
|
8
29
|
};
|
|
30
|
+
/**
|
|
31
|
+
* React context coordinating navigation transition stacks, inert states, and scroll synchronization.
|
|
32
|
+
*/
|
|
9
33
|
export declare const NavigationStateContext: import('react').Context<NavigationStateContextType | null>;
|
|
34
|
+
/**
|
|
35
|
+
* Hook to access the current navigation state manager.
|
|
36
|
+
*
|
|
37
|
+
* @throws If called outside of a [`NavigationState`](file:///home/rohan/work/adgytec/adgytec-web-ui-components/src/components/Navigation/NavigationState/NavigationState.tsx)
|
|
38
|
+
* or [`Navigation`](file:///home/rohan/work/adgytec/adgytec-web-ui-components/src/components/Navigation/Navigation/Navigation.tsx) component.
|
|
39
|
+
* @returns The current {@link NavigationStateContextType}.
|
|
40
|
+
*/
|
|
10
41
|
export declare function useNavigationState(): NavigationStateContextType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["id","item","x","prev","depth","children"],"sources":["../../../../src/components/Navigation/NavigationState/context.ts","../../../../src/components/Navigation/NavigationState/NavigationState.tsx"],"sourcesContent":["import { createContext, useContext } from \"react\";\n\nexport type NavigationStateContextType = {\n openSubNavigation: (id: string, depth: number) => void;\n closeSubNavigation: (id: string) => void;\n saveNavigationScrollTopProgress: (id: string, progress: number) => void;\n\n isSubNavigationOpen: (id: string) => boolean;\n isInert: (depth: number) => boolean;\n\n getNavigationScrollProgress: (id: string) => number;\n};\n\nexport const NavigationStateContext =\n createContext<NavigationStateContextType | null>(null);\n\nexport function useNavigationState() {\n const ctx = useContext(NavigationStateContext);\n if (ctx === null) {\n throw new Error(\n \"Missing navigation state. Ensure this component is rendered within Navigation component.\"\n );\n }\n\n return ctx;\n}\n","import { type ReactNode, useCallback, useRef, useState } from \"react\";\nimport { NavigationStateContext } from \"./context\";\nimport type { NavScrollInfo, SubNavItem } from \"./types\";\n\
|
|
1
|
+
{"version":3,"file":"index.js","names":["id","item","x","prev","depth","children","_c","require_compiler_runtime","NavigationStateContext","createContext","useNavigationState","ctx","useContext","import_compiler_runtime","NavigationState","$","t0","t1","openSubNavs","setOpenSubNavs","useState","t2","navScrollRef","useRef","t3","id","getNavigationScrollProgress","t4","prev","item","depth","id_0","openSubNavigation","t5","item_0","x","id_1","removedItems","x_0","removedItem","prev_0","x_1","closeSubNavigation","t6","id_2","progress","saveNavigationScrollTopProgress","t7","item_1","id_3","isSubNavigationOpen","t8","depth_0","isInert","t9","t10","children"],"sources":["../../../../src/components/Navigation/NavigationState/context.ts","../../../../src/components/Navigation/NavigationState/NavigationState.tsx"],"sourcesContent":["import { createContext, useContext } from \"react\";\n\n/**\n * Context value managing sub-navigation transitions, inert state tracking, and scroll progress synchronization.\n */\nexport type NavigationStateContextType = {\n /**\n * Opens a sub-navigation panel at the specified depth level.\n */\n openSubNavigation: (id: string, depth: number) => void;\n /**\n * Closes the sub-navigation panel matching `id` and any panels nested deeper.\n */\n closeSubNavigation: (id: string) => void;\n /**\n * Saves scroll progress (0 to 1) for the navigation level matching `id`.\n */\n saveNavigationScrollTopProgress: (id: string, progress: number) => void;\n\n /**\n * Checks whether a given sub-navigation panel is currently open.\n */\n isSubNavigationOpen: (id: string) => boolean;\n /**\n * Checks whether a given depth level should be inert (i.e. covered by a deeper active sub-navigation panel).\n */\n isInert: (depth: number) => boolean;\n\n /**\n * Retrieves the saved scroll progress (0 to 1) for the navigation level matching `id`.\n */\n getNavigationScrollProgress: (id: string) => number;\n};\n\n/**\n * React context coordinating navigation transition stacks, inert states, and scroll synchronization.\n */\nexport const NavigationStateContext =\n createContext<NavigationStateContextType | null>(null);\n\n/**\n * Hook to access the current navigation state manager.\n *\n * @throws If called outside of a [`NavigationState`](file:///home/rohan/work/adgytec/adgytec-web-ui-components/src/components/Navigation/NavigationState/NavigationState.tsx)\n * or [`Navigation`](file:///home/rohan/work/adgytec/adgytec-web-ui-components/src/components/Navigation/Navigation/Navigation.tsx) component.\n * @returns The current {@link NavigationStateContextType}.\n */\nexport function useNavigationState() {\n const ctx = useContext(NavigationStateContext);\n if (ctx === null) {\n throw new Error(\n \"Missing navigation state. Ensure this component is rendered within Navigation component.\"\n );\n }\n\n return ctx;\n}\n","import { type ReactNode, useCallback, useRef, useState } from \"react\";\nimport { NavigationStateContext } from \"./context\";\nimport type { NavScrollInfo, SubNavItem } from \"./types\";\n\n/**\n * Props for the [`NavigationState`](file:///home/rohan/work/adgytec/adgytec-web-ui-components/src/components/Navigation/NavigationState/NavigationState.tsx) component.\n */\nexport interface NavigationStateProps {\n /**\n * Child elements, typically one or more [`Navigation`](file:///home/rohan/work/adgytec/adgytec-web-ui-components/src/components/Navigation/Navigation/Navigation.tsx) instances.\n */\n children?: ReactNode;\n}\n\n/**\n * Global navigation state coordinator component.\n *\n * Coordinates active sub-navigation panel stacks, tracks inert states for covered panels,\n * and maintains scroll position synchronization across multiple navigation instances\n * (such as a persistent desktop sidebar and a mobile drawer).\n *\n * @example\n * ```tsx\n * import { NavigationState, Navigation } from \"@adgytec/web-ui-components\";\n *\n * <NavigationState>\n * <Navigation label=\"Main Navigation\">\n * {...}\n * </Navigation>\n * </NavigationState>\n * ```\n */\nexport const NavigationState: React.FC<NavigationStateProps> = ({\n children,\n}) => {\n const [openSubNavs, setOpenSubNavs] = useState<SubNavItem[]>([]);\n const navScrollRef = useRef<NavScrollInfo>({});\n\n const getNavigationScrollProgress = useCallback((id: string) => {\n return navScrollRef.current[id] ?? 0;\n }, []);\n\n const openSubNavigation = useCallback((id: string, depth: number) => {\n setOpenSubNavs((prev) => [\n ...prev.filter((item) => item.depth < depth),\n { id, depth },\n ]);\n }, []);\n\n const closeSubNavigation = useCallback(\n (id: string) => {\n const item = openSubNavs.find((x) => x.id === id);\n if (!item) {\n return;\n }\n\n const removedItems = openSubNavs.filter(\n (x) => x.depth >= item.depth\n );\n for (const removedItem of removedItems) {\n delete navScrollRef.current[removedItem.id];\n }\n\n setOpenSubNavs((prev) => prev.filter((x) => x.depth < item.depth));\n },\n [openSubNavs]\n );\n\n const saveNavigationScrollTopProgress = useCallback(\n (id: string, progress: number) => {\n navScrollRef.current[id] = progress;\n },\n []\n );\n\n const isSubNavigationOpen = useCallback(\n (id: string) => {\n return openSubNavs.some((item) => item.id === id);\n },\n [openSubNavs]\n );\n\n const isInert = useCallback(\n (depth: number) => {\n const activeDepth = openSubNavs[openSubNavs.length - 1]?.depth ?? 0;\n\n return depth < activeDepth;\n },\n [openSubNavs]\n );\n\n return (\n <NavigationStateContext\n value={{\n getNavigationScrollProgress,\n openSubNavigation,\n closeSubNavigation,\n saveNavigationScrollTopProgress,\n isSubNavigationOpen,\n isInert,\n }}\n >\n {children}\n </NavigationStateContext>\n );\n};\n"],"mappings":"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"}
|
|
@@ -1,5 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Map recording scroll progress values (0 to 1) keyed by navigation level identifier.
|
|
3
|
+
*/
|
|
1
4
|
export type NavScrollInfo = Record<string, number>;
|
|
5
|
+
/**
|
|
6
|
+
* Representation of an active sub-navigation panel in the navigation stack.
|
|
7
|
+
*/
|
|
2
8
|
export type SubNavItem = {
|
|
9
|
+
/**
|
|
10
|
+
* Unique identifier for the sub-navigation panel.
|
|
11
|
+
*/
|
|
3
12
|
id: string;
|
|
13
|
+
/**
|
|
14
|
+
* Nesting depth level of the sub-navigation panel.
|
|
15
|
+
*/
|
|
4
16
|
depth: number;
|
|
5
17
|
};
|
|
@@ -1,4 +1,37 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Props for the [`SubNavigation`](file:///home/rohan/work/adgytec/adgytec-web-ui-components/src/components/Navigation/SubNavigation/SubNavigation/SubNavigation.tsx) component.
|
|
4
|
+
*/
|
|
5
|
+
export interface SubNavigationProps extends React.ComponentPropsWithRef<"nav"> {
|
|
6
|
+
/**
|
|
7
|
+
* Heading title displayed at the top of the sub-navigation panel.
|
|
8
|
+
* If omitted, inherits the label provided to the ancestor
|
|
9
|
+
* [`SubNavigationTrigger`](file:///home/rohan/work/adgytec/adgytec-web-ui-components/src/components/Navigation/SubNavigation/SubNavigationTrigger/SubNavigationTrigger.tsx).
|
|
10
|
+
*/
|
|
3
11
|
label?: ReactNode;
|
|
4
|
-
}
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Secondary sliding navigation panel rendered into the root navigation container via a React Portal.
|
|
15
|
+
*
|
|
16
|
+
* Provides a dedicated header with an animated back button, accessible focus containment via `FocusScope`,
|
|
17
|
+
* slide-in transition animations, and independent scroll position synchronization.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```tsx
|
|
21
|
+
* import {
|
|
22
|
+
* SubNavigationTrigger,
|
|
23
|
+
* NavigationButton,
|
|
24
|
+
* SubNavigation,
|
|
25
|
+
* NavigationLink,
|
|
26
|
+
* } from "@adgytec/web-ui-components";
|
|
27
|
+
* import { Folder, Plus } from "lucide-react";
|
|
28
|
+
*
|
|
29
|
+
* <SubNavigationTrigger stateID="projects" label="Projects">
|
|
30
|
+
* <NavigationButton icon={Folder} />
|
|
31
|
+
* <SubNavigation>
|
|
32
|
+
* <NavigationLink href="/projects/new" label="New Project" icon={Plus} />
|
|
33
|
+
* </SubNavigation>
|
|
34
|
+
* </SubNavigationTrigger>
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export declare const SubNavigation: React.FC<SubNavigationProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["subNavRef","status","ArrowLeft","headerLabel","children"],"sources":["../../../../../src/components/Navigation/SubNavigation/SubNavigation/SubNavigation.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { ArrowLeft } from \"lucide-react\";\nimport { type ReactNode, useContext } from \"react\";\nimport { FocusScope, useObjectRef } from \"react-aria\";\nimport { Header, Heading } from \"react-aria-components\";\nimport { createPortal } from \"react-dom\";\nimport { Transition } from \"react-transition-group\";\nimport { IconButton } from \"@/components/Button\";\nimport { useInDialog } from \"@/components/Dialog\";\nimport { typography } from \"@/utils\";\nimport {\n NavigationStyles,\n NavLabelContext,\n SubNavigationHeaderStyles,\n useNavigationInfo,\n} from \"../../core\";\nimport { useNavigationContainer } from \"../../Navigation\";\nimport { NavigationScrollContainer } from \"../../NavigationScrollContainer\";\nimport { useNavigationState } from \"../../NavigationState\";\n\
|
|
1
|
+
{"version":3,"file":"index.js","names":["subNavRef","status","ArrowLeft","headerLabel","children","_c","clsx","require_compiler_runtime","typography","useNavigationInfo","NavLabelContext","useNavigationContainer","clsx$1","import_compiler_runtime","SubNavigation","$","children","className","inert","label","props","ref","style","t0","subNavRef","useObjectRef","isInModal","useInDialog","useNavigationState","triggerLabel","useContext","headerLabel","container","t1","t2","id","isSubNavigationOpen","t3","depth","isInert","FocusScope","NavigationStyles","status","Header","SubNavigationHeaderStyles","IconButton","ArrowLeft","Heading","NavigationScrollContainer","t4","Transition","t5","createPortal"],"sources":["../../../../../src/components/Navigation/SubNavigation/SubNavigation/SubNavigation.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { ArrowLeft } from \"lucide-react\";\nimport { type ReactNode, useContext } from \"react\";\nimport { FocusScope, useObjectRef } from \"react-aria\";\nimport { Header, Heading } from \"react-aria-components\";\nimport { createPortal } from \"react-dom\";\nimport { Transition } from \"react-transition-group\";\nimport { IconButton } from \"@/components/Button\";\nimport { useInDialog } from \"@/components/Dialog\";\nimport { typography } from \"@/utils\";\nimport {\n NavigationStyles,\n NavLabelContext,\n SubNavigationHeaderStyles,\n useNavigationInfo,\n} from \"../../core\";\nimport { useNavigationContainer } from \"../../Navigation\";\nimport { NavigationScrollContainer } from \"../../NavigationScrollContainer\";\nimport { useNavigationState } from \"../../NavigationState\";\n\n/**\n * Props for the [`SubNavigation`](file:///home/rohan/work/adgytec/adgytec-web-ui-components/src/components/Navigation/SubNavigation/SubNavigation/SubNavigation.tsx) component.\n */\nexport interface SubNavigationProps extends React.ComponentPropsWithRef<\"nav\"> {\n /**\n * Heading title displayed at the top of the sub-navigation panel.\n * If omitted, inherits the label provided to the ancestor\n * [`SubNavigationTrigger`](file:///home/rohan/work/adgytec/adgytec-web-ui-components/src/components/Navigation/SubNavigation/SubNavigationTrigger/SubNavigationTrigger.tsx).\n */\n label?: ReactNode;\n}\n\n/**\n * Secondary sliding navigation panel rendered into the root navigation container via a React Portal.\n *\n * Provides a dedicated header with an animated back button, accessible focus containment via `FocusScope`,\n * slide-in transition animations, and independent scroll position synchronization.\n *\n * @example\n * ```tsx\n * import {\n * SubNavigationTrigger,\n * NavigationButton,\n * SubNavigation,\n * NavigationLink,\n * } from \"@adgytec/web-ui-components\";\n * import { Folder, Plus } from \"lucide-react\";\n *\n * <SubNavigationTrigger stateID=\"projects\" label=\"Projects\">\n * <NavigationButton icon={Folder} />\n * <SubNavigation>\n * <NavigationLink href=\"/projects/new\" label=\"New Project\" icon={Plus} />\n * </SubNavigation>\n * </SubNavigationTrigger>\n * ```\n */\nexport const SubNavigation: React.FC<SubNavigationProps> = ({\n className,\n label,\n children,\n inert,\n ref,\n style,\n ...props\n}) => {\n const subNavRef = useObjectRef(ref);\n\n const isInModal = useInDialog();\n\n const { id, depth } = useNavigationInfo();\n const { isInert, isSubNavigationOpen } = useNavigationState();\n const { container } = useNavigationContainer();\n\n const triggerLabel = useContext(NavLabelContext);\n const headerLabel = label ?? triggerLabel;\n\n if (container === null) return null;\n\n return createPortal(\n <Transition\n nodeRef={subNavRef}\n timeout={{\n enter: 0,\n exit: 150,\n }}\n in={isSubNavigationOpen(id)}\n mountOnEnter\n unmountOnExit\n >\n {(status) => (\n <FocusScope restoreFocus>\n <nav\n ref={subNavRef}\n className={clsx(NavigationStyles, className)}\n {...props}\n style={{\n ...style,\n zIndex: depth + 1,\n }}\n inert={inert ?? isInert(depth)}\n data-header={true}\n data-status={status}\n data-sub-nav={true}\n data-modal={isInModal || undefined}\n >\n <Header className={clsx(SubNavigationHeaderStyles)}>\n <IconButton\n icon={ArrowLeft}\n color=\"standard\"\n slot=\"close\"\n data-close-button\n />\n\n {headerLabel && (\n <Heading\n className={clsx(typography.titleLarge)}\n data-heading\n >\n {headerLabel}\n </Heading>\n )}\n </Header>\n\n <NavigationScrollContainer>\n {children}\n </NavigationScrollContainer>\n </nav>\n </FocusScope>\n )}\n </Transition>,\n container\n );\n};\n"],"mappings":"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"}
|
package/dist/components/Navigation/SubNavigation/SubNavigationTrigger/SubNavigationTrigger.d.ts
CHANGED
|
@@ -1,6 +1,44 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Props for the [`SubNavigationTrigger`](file:///home/rohan/work/adgytec/adgytec-web-ui-components/src/components/Navigation/SubNavigation/SubNavigationTrigger/SubNavigationTrigger.tsx) component.
|
|
4
|
+
*/
|
|
5
|
+
export interface SubNavigationTriggerProps {
|
|
6
|
+
/**
|
|
7
|
+
* Unique state key used for referencing and animating this sub-navigation level.
|
|
8
|
+
*/
|
|
3
9
|
stateID: string;
|
|
10
|
+
/**
|
|
11
|
+
* Child elements, typically an opening trigger button and a [`SubNavigation`](file:///home/rohan/work/adgytec/adgytec-web-ui-components/src/components/Navigation/SubNavigation/SubNavigation/SubNavigation.tsx) panel.
|
|
12
|
+
*/
|
|
4
13
|
children?: ReactNode;
|
|
14
|
+
/**
|
|
15
|
+
* Text or node label passed down to the trigger button and child sub-navigation header.
|
|
16
|
+
*/
|
|
5
17
|
label: ReactNode;
|
|
6
|
-
}
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Orchestrator component tying together an opening action button and its sliding
|
|
21
|
+
* [`SubNavigation`](file:///home/rohan/work/adgytec/adgytec-web-ui-components/src/components/Navigation/SubNavigation/SubNavigation/SubNavigation.tsx) panel.
|
|
22
|
+
*
|
|
23
|
+
* Configures button click handlers to slide the sub-navigation panel into view, increments the
|
|
24
|
+
* depth counter, and passes down the section label.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```tsx
|
|
28
|
+
* import {
|
|
29
|
+
* SubNavigationTrigger,
|
|
30
|
+
* NavigationButton,
|
|
31
|
+
* SubNavigation,
|
|
32
|
+
* NavigationLink,
|
|
33
|
+
* } from "@adgytec/web-ui-components";
|
|
34
|
+
* import { Settings } from "lucide-react";
|
|
35
|
+
*
|
|
36
|
+
* <SubNavigationTrigger stateID="settings" label="Settings">
|
|
37
|
+
* <NavigationButton icon={Settings} />
|
|
38
|
+
* <SubNavigation>
|
|
39
|
+
* <NavigationLink href="/settings/profile" label="Profile" />
|
|
40
|
+
* </SubNavigation>
|
|
41
|
+
* </SubNavigationTrigger>
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
export declare const SubNavigationTrigger: React.FC<SubNavigationTriggerProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["children"],"sources":["../../../../../src/components/Navigation/SubNavigation/SubNavigationTrigger/SubNavigationTrigger.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { ButtonContext, DEFAULT_SLOT, Provider } from \"react-aria-components\";\nimport {\n NavigationInfoContext,\n NavLabelContext,\n useNavigationInfo,\n} from \"../../core\";\nimport { useNavigationState } from \"../../NavigationState\";\n\
|
|
1
|
+
{"version":3,"file":"index.js","names":["children","_c","require_compiler_runtime","NavigationInfoContext","useNavigationInfo","NavLabelContext","import_compiler_runtime","SubNavigationTrigger","$","t0","parentInfo","useNavigationState","subNavID","stateID","depth","t1","label","t2","t3","t4","openSubNavigation","t5","isSubNavigationOpen","t6","t7","closeSubNavigation","t8","ButtonContext","DEFAULT_SLOT","t9","t10","children","Provider"],"sources":["../../../../../src/components/Navigation/SubNavigation/SubNavigationTrigger/SubNavigationTrigger.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { ButtonContext, DEFAULT_SLOT, Provider } from \"react-aria-components\";\nimport {\n NavigationInfoContext,\n NavLabelContext,\n useNavigationInfo,\n} from \"../../core\";\nimport { useNavigationState } from \"../../NavigationState\";\n\n/**\n * Props for the [`SubNavigationTrigger`](file:///home/rohan/work/adgytec/adgytec-web-ui-components/src/components/Navigation/SubNavigation/SubNavigationTrigger/SubNavigationTrigger.tsx) component.\n */\nexport interface SubNavigationTriggerProps {\n /**\n * Unique state key used for referencing and animating this sub-navigation level.\n */\n stateID: string;\n\n /**\n * Child elements, typically an opening trigger button and a [`SubNavigation`](file:///home/rohan/work/adgytec/adgytec-web-ui-components/src/components/Navigation/SubNavigation/SubNavigation/SubNavigation.tsx) panel.\n */\n children?: ReactNode;\n\n /**\n * Text or node label passed down to the trigger button and child sub-navigation header.\n */\n label: ReactNode;\n}\n\n/**\n * Orchestrator component tying together an opening action button and its sliding\n * [`SubNavigation`](file:///home/rohan/work/adgytec/adgytec-web-ui-components/src/components/Navigation/SubNavigation/SubNavigation/SubNavigation.tsx) panel.\n *\n * Configures button click handlers to slide the sub-navigation panel into view, increments the\n * depth counter, and passes down the section label.\n *\n * @example\n * ```tsx\n * import {\n * SubNavigationTrigger,\n * NavigationButton,\n * SubNavigation,\n * NavigationLink,\n * } from \"@adgytec/web-ui-components\";\n * import { Settings } from \"lucide-react\";\n *\n * <SubNavigationTrigger stateID=\"settings\" label=\"Settings\">\n * <NavigationButton icon={Settings} />\n * <SubNavigation>\n * <NavigationLink href=\"/settings/profile\" label=\"Profile\" />\n * </SubNavigation>\n * </SubNavigationTrigger>\n * ```\n */\nexport const SubNavigationTrigger: React.FC<SubNavigationTriggerProps> = ({\n stateID,\n children,\n label,\n}) => {\n const parentInfo = useNavigationInfo();\n const { openSubNavigation, closeSubNavigation, isSubNavigationOpen } =\n useNavigationState();\n\n const subNavID = `${parentInfo.id}--${stateID}`;\n const depth = parentInfo.depth + 1;\n\n return (\n <Provider\n values={[\n [NavLabelContext, label],\n [NavigationInfoContext, { id: subNavID, depth }],\n [\n ButtonContext,\n {\n slots: {\n [DEFAULT_SLOT]: {},\n open: {\n onPress: () => {\n openSubNavigation(subNavID, depth);\n },\n isPressed: isSubNavigationOpen(subNavID),\n },\n close: {\n onPress: () => {\n closeSubNavigation(subNavID);\n },\n },\n },\n },\n ],\n ]}\n >\n {children}\n </Provider>\n );\n};\n"],"mappings":";;;;;;aAsDaO,KAA4D,MAAA;CAAA,IAAAC,KAAA,GAAAP,EAAAA,EAAAA,CAAA,EAAA,GAAC,EAAA,YAAA,aAAA,aAAAQ,GAKtEC,IAAmBN,EAAkB,GACrC,EAAA,sBAAA,uBAAA,2BACIO,EAAmB,GAEvBC,IAAiB,GAAGF,EAAU,GAAG,IAAKG,KACtCC,IAAcJ,EAAU,QAAS,GAAEK;CAAA,AAAAP,EAAA,OAAAQ,IAKC,IAAAR,EAAA,MAAxB,IAAA,CAACH,GAAiBW,CAAK,GAAC,EAAA,KAAAA,GAAA,EAAA,KAAAD;CAAA,IAAAE;CAAA,AAAAT,EAAA,OAAAM,KAAAN,EAAA,OAAAI,KACxB,IAAA,CAACT,GAAuB;EAAA,IAAMS;EAAQ;CAAQ,CAAC,GAAC,EAAA,KAAAE,GAAA,EAAA,KAAAF,GAAA,EAAA,KAAAK,KAAA,IAAAT,EAAA;CAAA,IAAAU;CAAA,AAAAV,EAAA,OAAA,OAAA,IAAA,2BAAA,KAKpB,IAAA,CAAC,GAAC,EAAA,KAAAU,KAAA,IAAAV,EAAA;CAAA,IAAAW;CAAA,AAAAX,EAAA,OAAAM,KAAAN,EAAA,OAAAY,KAAAZ,EAAA,OAAAI,KAEL,UAAA;EACL,EAAkBA,GAAUE,CAAK;CAAC,GACrC,EAAA,KAAAA,GAAA,EAAA,KAAAM,GAAA,EAAA,KAAAR,GAAA,EAAA,KAAAO,KAAA,IAAAX,EAAA;CAAA,IAAAa;CAAA,AAAAb,EAAA,QAAAc,KAAAd,EAAA,QAAAI,KACU,IAAAU,EAAoBV,CAAQ,GAAC,EAAA,MAAAU,GAAA,EAAA,MAAAV,GAAA,EAAA,MAAAS,KAAA,IAAAb,EAAA;CAAA,IAAAe;CAAA,AAAAf,EAAA,QAAAW,KAAAX,EAAA,QAAAa,KAJtC,IAAA;EAAA,SACOF;EAER,WACUE;CACf,GAAC,EAAA,MAAAF,GAAA,EAAA,MAAAE,GAAA,EAAA,MAAAE,KAAA,IAAAf,EAAA;CAAA,IAAAgB;CAAA,AAAAhB,EAAA,QAAAiB,KAAAjB,EAAA,QAAAI,KACM,IAAA,EAAA,eACM;EACL,EAAmBA,CAAQ;CAAC,EAEpC,GAAC,EAAA,MAAAa,GAAA,EAAA,MAAAb,GAAA,EAAA,MAAAY,KAAA,IAAAhB,EAAA;CAAA,IAAAkB;CAAA,AAAAlB,EAAA,QAAAe,KAAAf,EAAA,QAAAgB,KAfb,IAAA,CACIG,GACA,EAAA,OACW;GACFC,IAAeV;EAAE,MACZK;EAKL,OACMC;CAKX,EACJ,CAAC,GACJ,EAAA,MAAAD,GAAA,EAAA,MAAAC,GAAA,EAAA,MAAAE,KAAA,IAAAlB,EAAA;CAAA,IAAAqB;CAAA,AAAArB,EAAA,QAAAO,KAAAP,EAAA,QAAAS,KAAAT,EAAA,QAAAkB,KArBG,IAAA;EACJX;EACAE;EACAS;CAkBC,GACJ,EAAA,MAAAX,GAAA,EAAA,MAAAE,GAAA,EAAA,MAAAS,GAAA,EAAA,MAAAG,KAAA,IAAArB,EAAA;CAAA,IAAAsB;CAGM,OAHNtB,EAAA,QAAAuB,KAAAvB,EAAA,QAAAqB,KAvBL,IAAA,kBAACG,GAAD;EACY,QAAAH;EAwBP;CAzBI,CAAA,GA0BE,EAAA,MAAAE,GAAA,EAAA,MAAAF,GAAA,EAAA,MAAAC,KAAA,IAAAtB,EAAA,KA1BXsB;AA0BW"}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Context value representing the label inherited from a parent navigation trigger.
|
|
4
|
+
*/
|
|
2
5
|
export type NavLabelContextType = ReactNode;
|
|
6
|
+
/**
|
|
7
|
+
* React context providing the trigger label to descendant navigation items or sub-navigation panels.
|
|
8
|
+
*/
|
|
3
9
|
export declare const NavLabelContext: import('react').Context<ReactNode>;
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CSS class for the root navigation container layout and surface styling.
|
|
3
|
+
*/
|
|
1
4
|
export declare const NavigationStyles: string;
|
|
5
|
+
/**
|
|
6
|
+
* CSS class for the header area of a root [`Navigation`](file:///home/rohan/work/adgytec/adgytec-web-ui-components/src/components/Navigation/Navigation/Navigation.tsx) container.
|
|
7
|
+
*/
|
|
2
8
|
export declare const NavigationHeaderStyles: string;
|
|
9
|
+
/**
|
|
10
|
+
* CSS class for the header area of a sliding [`SubNavigation`](file:///home/rohan/work/adgytec/adgytec-web-ui-components/src/components/Navigation/SubNavigation/SubNavigation/SubNavigation.tsx) panel.
|
|
11
|
+
*/
|
|
3
12
|
export declare const SubNavigationHeaderStyles: string;
|
|
@@ -1,6 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Identifier and nesting depth information for the current navigation level.
|
|
3
|
+
*/
|
|
1
4
|
export type NavigationInfoContextType = {
|
|
5
|
+
/**
|
|
6
|
+
* Unique identifier for this navigation level/panel.
|
|
7
|
+
*/
|
|
2
8
|
id: string;
|
|
9
|
+
/**
|
|
10
|
+
* Current nesting hierarchy depth (root is 0, sub-navigations increment from 1).
|
|
11
|
+
*/
|
|
3
12
|
depth: number;
|
|
4
13
|
};
|
|
14
|
+
/**
|
|
15
|
+
* React context providing the current navigation level's ID and hierarchy depth.
|
|
16
|
+
*/
|
|
5
17
|
export declare const NavigationInfoContext: import('react').Context<NavigationInfoContextType | null>;
|
|
18
|
+
/**
|
|
19
|
+
* Hook to access the current navigation level's unique ID and nesting depth.
|
|
20
|
+
*
|
|
21
|
+
* @throws If rendered outside of a [`Navigation`](file:///home/rohan/work/adgytec/adgytec-web-ui-components/src/components/Navigation/Navigation/Navigation.tsx)
|
|
22
|
+
* or [`SubNavigation`](file:///home/rohan/work/adgytec/adgytec-web-ui-components/src/components/Navigation/SubNavigation/SubNavigation/SubNavigation.tsx) component.
|
|
23
|
+
* @returns The current {@link NavigationInfoContextType}.
|
|
24
|
+
*/
|
|
6
25
|
export declare function useNavigationInfo(): NavigationInfoContextType;
|