@adgytec/adgytec-web-ui-components 2.2.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/AppBarHeadline.css +1 -1
- package/dist/assets/CalendarCell.css +1 -1
- package/dist/assets/CalendarMenuItem.css +1 -1
- package/dist/assets/Card.css +1 -0
- package/dist/assets/CardIcon.css +1 -0
- package/dist/assets/ConnectedButtonGroup.css +1 -1
- package/dist/assets/ListAvatar.css +1 -0
- package/dist/assets/ListBox.css +1 -0
- package/dist/assets/ListIcon.css +1 -0
- package/dist/assets/ListItem.css +1 -0
- package/dist/assets/ListLabelText.css +1 -0
- package/dist/assets/ListMedia.css +1 -0
- package/dist/assets/ListOverlineText.css +1 -0
- package/dist/assets/ListSupportingText.css +1 -0
- package/dist/assets/ListTrailingText.css +1 -0
- package/dist/assets/NavigationScrollContainer.css +1 -1
- package/dist/assets/SideSheet.css +1 -1
- package/dist/assets/Snackbar.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 +2 -2
- 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 +22 -0
- package/dist/chunks/Card.map +1 -0
- package/dist/chunks/CardIcon +23 -0
- package/dist/chunks/CardIcon.map +1 -0
- 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 +19 -16
- 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 +20 -0
- package/dist/chunks/ListAvatar.map +1 -0
- package/dist/chunks/ListBox +16 -0
- package/dist/chunks/ListBox.map +1 -0
- package/dist/chunks/ListIcon +21 -0
- package/dist/chunks/ListIcon.map +1 -0
- package/dist/chunks/ListItem +63 -0
- package/dist/chunks/ListItem.map +1 -0
- package/dist/chunks/ListLabelText +22 -0
- package/dist/chunks/ListLabelText.map +1 -0
- package/dist/chunks/ListMedia +15 -0
- package/dist/chunks/ListMedia.map +1 -0
- package/dist/chunks/ListOverlineText +21 -0
- package/dist/chunks/ListOverlineText.map +1 -0
- package/dist/chunks/ListSupportingText +22 -0
- package/dist/chunks/ListSupportingText.map +1 -0
- 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 +20 -20
- package/dist/chunks/Navigation.map +1 -1
- package/dist/chunks/NavigationScrollContainer +48 -32
- 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 +18 -27
- 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 +6 -0
- package/dist/chunks/types.map +1 -0
- 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 +22 -0
- package/dist/components/{Image → Card/Card}/index.d.ts +1 -1
- package/dist/components/Card/Card/index.js +3 -0
- package/dist/components/Card/Card/types.d.ts +30 -0
- package/dist/components/Card/CardIcon/CardIcon.d.ts +26 -0
- package/dist/components/Card/CardIcon/index.d.ts +1 -0
- package/dist/components/Card/CardIcon/index.js +2 -0
- package/dist/components/Card/index.d.ts +2 -0
- package/dist/components/Card/index.js +4 -0
- 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 +24 -0
- package/dist/components/List/ListAction/index.d.ts +1 -0
- package/dist/components/List/ListAction/index.js +2 -0
- package/dist/components/List/ListAvatar/ListAvatar.d.ts +23 -0
- package/dist/components/List/ListAvatar/index.d.ts +1 -0
- package/dist/components/List/ListAvatar/index.js +2 -0
- package/dist/components/List/ListBox/ListBox.d.ts +29 -0
- package/dist/components/List/ListBox/index.d.ts +2 -0
- package/dist/components/List/ListBox/index.js +2 -0
- package/dist/components/List/ListBox/types.d.ts +20 -0
- package/dist/components/List/ListIcon/ListIcon.d.ts +20 -0
- package/dist/components/List/ListIcon/index.d.ts +1 -0
- package/dist/components/List/ListIcon/index.js +2 -0
- package/dist/components/List/ListItem/ListItem.d.ts +36 -0
- package/dist/components/List/ListItem/index.d.ts +2 -0
- package/dist/components/List/ListItem/index.js +2 -0
- package/dist/components/List/ListItem/types.d.ts +30 -0
- package/dist/components/List/ListLabelText/ListLabelText.d.ts +17 -0
- package/dist/components/List/ListLabelText/index.d.ts +1 -0
- package/dist/components/List/ListLabelText/index.js +2 -0
- package/dist/components/List/ListMedia/ListMedia.d.ts +22 -0
- package/dist/components/List/ListMedia/index.d.ts +2 -0
- package/dist/components/List/ListMedia/index.js +2 -0
- package/dist/components/List/ListMedia/types.d.ts +42 -0
- package/dist/components/List/ListOverlineText/ListOverlineText.d.ts +17 -0
- package/dist/components/List/ListOverlineText/index.d.ts +1 -0
- package/dist/components/List/ListOverlineText/index.js +2 -0
- package/dist/components/List/ListSupportingText/ListSupportingText.d.ts +17 -0
- package/dist/components/List/ListSupportingText/index.d.ts +1 -0
- package/dist/components/List/ListSupportingText/index.js +2 -0
- package/dist/components/List/ListTrailingText/ListTrailingText.d.ts +17 -0
- package/dist/components/List/ListTrailingText/index.d.ts +1 -0
- package/dist/components/List/ListTrailingText/index.js +2 -0
- package/dist/components/List/index.d.ts +10 -0
- package/dist/components/List/index.js +11 -0
- 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 +32 -1
- package/dist/components/Navigation/NavigationState/index.d.ts +1 -0
- package/dist/components/Navigation/NavigationState/index.js +61 -2
- package/dist/components/Navigation/NavigationState/index.js.map +1 -0
- 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 +4 -4
- 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 +5 -5
- 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/Navigation/index.js +2 -2
- 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 +2 -1
- package/dist/index.js +131 -125
- 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/NavigationState +0 -69
- package/dist/chunks/NavigationState.map +0 -1
- 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.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,10 +1,38 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Callback function signature used to determine whether a navigation link matching `href` is currently active.
|
|
4
|
+
*/
|
|
2
5
|
export type IsLinkActive = (href?: string) => boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Callback function signature used to determine whether a navigation button matching `prefix` is currently active.
|
|
8
|
+
*/
|
|
3
9
|
export type IsButtonActive = (prefix?: string) => boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Props for the root [`Navigation`](file:///home/rohan/work/adgytec/adgytec-web-ui-components/src/components/Navigation/Navigation/Navigation.tsx) container component.
|
|
12
|
+
*/
|
|
4
13
|
export interface NavigationProps extends React.ComponentPropsWithRef<"nav"> {
|
|
14
|
+
/**
|
|
15
|
+
* Header title or node displayed at the top of the navigation surface.
|
|
16
|
+
*/
|
|
5
17
|
label?: ReactNode;
|
|
18
|
+
/**
|
|
19
|
+
* Callback function used by child [`NavigationLink`](file:///home/rohan/work/adgytec/adgytec-web-ui-components/src/components/Navigation/NavigationItem/NavigationLink/NavigationLink.tsx)
|
|
20
|
+
* components to determine their active state from their `href`.
|
|
21
|
+
*/
|
|
6
22
|
isLinkActive?: IsLinkActive;
|
|
23
|
+
/**
|
|
24
|
+
* Callback function used by child [`NavigationButton`](file:///home/rohan/work/adgytec/adgytec-web-ui-components/src/components/Navigation/NavigationItem/NavigationButton/NavigationButton.tsx)
|
|
25
|
+
* components to determine their active state from their `prefix`.
|
|
26
|
+
*/
|
|
7
27
|
isButtonActive?: IsButtonActive;
|
|
28
|
+
/**
|
|
29
|
+
* Root state identifier used for depth tracking and scroll position synchronization.
|
|
30
|
+
*
|
|
31
|
+
* @default "__root__"
|
|
32
|
+
*/
|
|
8
33
|
stateID?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Optional CSS class applied to the outer container `<div>` wrapping the navigation surface.
|
|
36
|
+
*/
|
|
9
37
|
containerClassName?: string;
|
|
10
38
|
}
|
|
@@ -1,2 +1,17 @@
|
|
|
1
1
|
import { NavigationButtonProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Button navigation item component.
|
|
4
|
+
*
|
|
5
|
+
* 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)
|
|
6
|
+
* to open a nested sub-navigation panel. Automatically evaluates active state matching based on its `prefix`,
|
|
7
|
+
* switches between resting and active icons, and inherits labels from parent triggers.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* import { NavigationButton } from "@adgytec/web-ui-components";
|
|
12
|
+
* import { Briefcase } from "lucide-react";
|
|
13
|
+
*
|
|
14
|
+
* <NavigationButton icon={Briefcase} prefix="/projects" label="Projects" />
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
2
17
|
export declare const NavigationButton: React.FC<NavigationButtonProps>;
|
|
@@ -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;
|
|
5
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Checks whether a given sub-navigation panel is currently open.
|
|
19
|
+
*/
|
|
6
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
|
+
*/
|
|
7
24
|
isInert: (depth: number) => boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Retrieves the saved scroll progress (0 to 1) for the navigation level matching `id`.
|
|
27
|
+
*/
|
|
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,2 +1,61 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { t as e } from "../../../chunks/compiler-runtime";
|
|
2
|
+
import { createContext as t, useContext as n, useRef as r, useState as i } from "react";
|
|
3
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/Navigation/NavigationState/context.ts
|
|
5
|
+
var o = t(null);
|
|
6
|
+
function s() {
|
|
7
|
+
let e = n(o);
|
|
8
|
+
if (e === null) throw Error("Missing navigation state. Ensure this component is rendered within Navigation component.");
|
|
9
|
+
return e;
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region src/components/Navigation/NavigationState/NavigationState.tsx
|
|
13
|
+
var c = e(), l = (e) => {
|
|
14
|
+
let t = (0, c.c)(18), { children: n } = e, s;
|
|
15
|
+
t[0] === Symbol.for("react.memo_cache_sentinel") ? (s = [], t[0] = s) : s = t[0];
|
|
16
|
+
let [l, u] = i(s), d;
|
|
17
|
+
t[1] === Symbol.for("react.memo_cache_sentinel") ? (d = {}, t[1] = d) : d = t[1];
|
|
18
|
+
let f = r(d), p;
|
|
19
|
+
t[2] === Symbol.for("react.memo_cache_sentinel") ? (p = (e) => f.current[e] ?? 0, t[2] = p) : p = t[2];
|
|
20
|
+
let m = p, h;
|
|
21
|
+
t[3] === Symbol.for("react.memo_cache_sentinel") ? (h = (e, t) => {
|
|
22
|
+
u((n) => [...n.filter((e) => e.depth < t), {
|
|
23
|
+
id: e,
|
|
24
|
+
depth: t
|
|
25
|
+
}]);
|
|
26
|
+
}, t[3] = h) : h = t[3];
|
|
27
|
+
let g = h, _;
|
|
28
|
+
t[4] === l ? _ = t[5] : (_ = (e) => {
|
|
29
|
+
let t = l.find((t) => t.id === e);
|
|
30
|
+
if (!t) return;
|
|
31
|
+
let n = l.filter((e) => e.depth >= t.depth);
|
|
32
|
+
for (let e of n) delete f.current[e.id];
|
|
33
|
+
u((e) => e.filter((e) => e.depth < t.depth));
|
|
34
|
+
}, t[4] = l, t[5] = _);
|
|
35
|
+
let v = _, y;
|
|
36
|
+
t[6] === Symbol.for("react.memo_cache_sentinel") ? (y = (e, t) => {
|
|
37
|
+
f.current[e] = t;
|
|
38
|
+
}, t[6] = y) : y = t[6];
|
|
39
|
+
let b = y, x;
|
|
40
|
+
t[7] === l ? x = t[8] : (x = (e) => l.some((t) => t.id === e), t[7] = l, t[8] = x);
|
|
41
|
+
let S = x, C;
|
|
42
|
+
t[9] === l ? C = t[10] : (C = (e) => e < (l[l.length - 1]?.depth ?? 0), t[9] = l, t[10] = C);
|
|
43
|
+
let w = C, T;
|
|
44
|
+
t[11] !== v || t[12] !== w || t[13] !== S ? (T = {
|
|
45
|
+
getNavigationScrollProgress: m,
|
|
46
|
+
openSubNavigation: g,
|
|
47
|
+
closeSubNavigation: v,
|
|
48
|
+
saveNavigationScrollTopProgress: b,
|
|
49
|
+
isSubNavigationOpen: S,
|
|
50
|
+
isInert: w
|
|
51
|
+
}, t[11] = v, t[12] = w, t[13] = S, t[14] = T) : T = t[14];
|
|
52
|
+
let E;
|
|
53
|
+
return t[15] !== n || t[16] !== T ? (E = /* @__PURE__ */ a(o, {
|
|
54
|
+
value: T,
|
|
55
|
+
children: n
|
|
56
|
+
}), t[15] = n, t[16] = T, t[17] = E) : E = t[17], E;
|
|
57
|
+
};
|
|
58
|
+
//#endregion
|
|
59
|
+
export { l as NavigationState, o as NavigationStateContext, s as useNavigationState };
|
|
60
|
+
|
|
61
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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,10 +1,10 @@
|
|
|
1
1
|
import { t as e } from "../../../../chunks/compiler-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { t } from "../../../../chunks/NavigationScrollContainer";
|
|
3
3
|
import { t as n } from "../../../../chunks/base";
|
|
4
4
|
import { IconButton as r } from "../../../Button/IconButton/index.js";
|
|
5
5
|
import { useInDialog as i } from "../../../Dialog/core/index.js";
|
|
6
6
|
import { a, o, r as s, t as c } from "../../../../chunks/core8";
|
|
7
|
-
import {
|
|
7
|
+
import { useNavigationState as l } from "../../NavigationState/index.js";
|
|
8
8
|
import { r as u } from "../../../../chunks/Navigation";
|
|
9
9
|
import d from "clsx";
|
|
10
10
|
import { useContext as f } from "react";
|
|
@@ -18,7 +18,7 @@ import { createPortal as x } from "react-dom";
|
|
|
18
18
|
var S = e(), C = (e) => {
|
|
19
19
|
let C = (0, S.c)(30), w, T, E, D, O, k, A;
|
|
20
20
|
C[0] === e ? (w = C[1], T = C[2], E = C[3], D = C[4], O = C[5], k = C[6], A = C[7]) : ({className: T, label: D, children: w, inert: E, ref: k, style: A, ...O} = e, C[0] = e, C[1] = w, C[2] = T, C[3] = E, C[4] = D, C[5] = O, C[6] = k, C[7] = A);
|
|
21
|
-
let j = y(k), M = i(), { id: N, depth: P } = s(), { isInert: F, isSubNavigationOpen: I } =
|
|
21
|
+
let j = y(k), M = i(), { id: N, depth: P } = s(), { isInert: F, isSubNavigationOpen: I } = l(), { container: L } = u(), R = f(c), z = D ?? R;
|
|
22
22
|
if (L === null) return null;
|
|
23
23
|
let B;
|
|
24
24
|
C[8] === Symbol.for("react.memo_cache_sentinel") ? (B = {
|
|
@@ -55,7 +55,7 @@ var S = e(), C = (e) => {
|
|
|
55
55
|
"data-heading": !0,
|
|
56
56
|
children: z
|
|
57
57
|
})]
|
|
58
|
-
}), /* @__PURE__ */ p(
|
|
58
|
+
}), /* @__PURE__ */ p(t, { children: w })]
|
|
59
59
|
})
|
|
60
60
|
}), C[12] = w, C[13] = T, C[14] = P, C[15] = z, C[16] = E, C[17] = M, C[18] = F, C[19] = O, C[20] = A, C[21] = j, C[22] = H) : H = C[22];
|
|
61
61
|
let U;
|
|
@@ -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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"}
|