@gnome-ui/react 1.45.1 → 1.46.0
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/components/AboutDialog/AboutDialog.cjs +1 -1
- package/dist/components/AboutDialog/AboutDialog.cjs.map +1 -1
- package/dist/components/AboutDialog/AboutDialog.d.ts +1 -1
- package/dist/components/AboutDialog/AboutDialog.js +106 -108
- package/dist/components/AboutDialog/AboutDialog.js.map +1 -1
- package/dist/components/AboutDialog/AboutDialog.module.css.cjs +1 -1
- package/dist/components/AboutDialog/AboutDialog.module.css.js +28 -29
- package/dist/components/AboutDialog.cjs +1 -1
- package/dist/components/ActionRow/ActionRow.cjs +1 -1
- package/dist/components/ActionRow/ActionRow.cjs.map +1 -1
- package/dist/components/ActionRow/ActionRow.d.ts +1 -1
- package/dist/components/ActionRow/ActionRow.js +2 -2
- package/dist/components/ActionRow/ActionRow.js.map +1 -1
- package/dist/components/ActionRow.cjs +1 -1
- package/dist/components/Avatar/Avatar.cjs +1 -1
- package/dist/components/Avatar/Avatar.cjs.map +1 -1
- package/dist/components/Avatar/Avatar.d.ts +1 -1
- package/dist/components/Avatar/Avatar.js +2 -2
- package/dist/components/Avatar/Avatar.js.map +1 -1
- package/dist/components/Avatar.cjs +1 -1
- package/dist/components/AvatarRotator/AvatarRotator.cjs +1 -1
- package/dist/components/AvatarRotator/AvatarRotator.cjs.map +1 -1
- package/dist/components/AvatarRotator/AvatarRotator.d.ts +1 -1
- package/dist/components/AvatarRotator/AvatarRotator.js +2 -2
- package/dist/components/AvatarRotator/AvatarRotator.js.map +1 -1
- package/dist/components/AvatarRotator.cjs +1 -1
- package/dist/components/Badge/Badge.cjs +1 -1
- package/dist/components/Badge/Badge.cjs.map +1 -1
- package/dist/components/Badge/Badge.d.ts +1 -1
- package/dist/components/Badge/Badge.js +2 -2
- package/dist/components/Badge/Badge.js.map +1 -1
- package/dist/components/Badge.cjs +1 -1
- package/dist/components/Banner/Banner.cjs +1 -1
- package/dist/components/Banner/Banner.cjs.map +1 -1
- package/dist/components/Banner/Banner.d.ts +1 -1
- package/dist/components/Banner/Banner.js +34 -36
- package/dist/components/Banner/Banner.js.map +1 -1
- package/dist/components/Banner/Banner.module.css.cjs +1 -1
- package/dist/components/Banner/Banner.module.css.js +11 -12
- package/dist/components/Banner.cjs +1 -1
- package/dist/components/Bin/Bin.cjs +1 -1
- package/dist/components/Bin/Bin.cjs.map +1 -1
- package/dist/components/Bin/Bin.d.ts +1 -1
- package/dist/components/Bin/Bin.js +4 -6
- package/dist/components/Bin/Bin.js.map +1 -1
- package/dist/components/Bin.cjs +1 -1
- package/dist/components/Blockquote/Blockquote.cjs +1 -1
- package/dist/components/Blockquote/Blockquote.cjs.map +1 -1
- package/dist/components/Blockquote/Blockquote.d.ts +1 -1
- package/dist/components/Blockquote/Blockquote.js +24 -26
- package/dist/components/Blockquote/Blockquote.js.map +1 -1
- package/dist/components/Blockquote.cjs +1 -1
- package/dist/components/BottomSheet/BottomSheet.cjs +1 -1
- package/dist/components/BottomSheet/BottomSheet.cjs.map +1 -1
- package/dist/components/BottomSheet/BottomSheet.d.ts +1 -1
- package/dist/components/BottomSheet/BottomSheet.js +37 -38
- package/dist/components/BottomSheet/BottomSheet.js.map +1 -1
- package/dist/components/BottomSheet/BottomSheet.module.css.cjs +1 -1
- package/dist/components/BottomSheet/BottomSheet.module.css.js +8 -9
- package/dist/components/BottomSheet.cjs +1 -1
- package/dist/components/Box/Box.cjs +1 -1
- package/dist/components/Box/Box.cjs.map +1 -1
- package/dist/components/Box/Box.d.ts +1 -1
- package/dist/components/Box/Box.js +2 -2
- package/dist/components/Box/Box.js.map +1 -1
- package/dist/components/Box.cjs +1 -1
- package/dist/components/BoxedList/BoxedList.cjs +1 -1
- package/dist/components/BoxedList/BoxedList.cjs.map +1 -1
- package/dist/components/BoxedList/BoxedList.d.ts +1 -1
- package/dist/components/BoxedList/BoxedList.js +2 -2
- package/dist/components/BoxedList/BoxedList.js.map +1 -1
- package/dist/components/BoxedList.cjs +1 -1
- package/dist/components/BreakpointBin/BreakpointBin.cjs +1 -1
- package/dist/components/BreakpointBin/BreakpointBin.cjs.map +1 -1
- package/dist/components/BreakpointBin/BreakpointBin.d.ts +1 -1
- package/dist/components/BreakpointBin/BreakpointBin.js +2 -2
- package/dist/components/BreakpointBin/BreakpointBin.js.map +1 -1
- package/dist/components/BreakpointBin.cjs +1 -1
- package/dist/components/Button/Button.cjs +1 -1
- package/dist/components/Button/Button.cjs.map +1 -1
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Button.cjs +1 -1
- package/dist/components/ButtonContent/ButtonContent.cjs +1 -1
- package/dist/components/ButtonContent/ButtonContent.cjs.map +1 -1
- package/dist/components/ButtonContent/ButtonContent.d.ts +1 -1
- package/dist/components/ButtonContent/ButtonContent.js +24 -26
- package/dist/components/ButtonContent/ButtonContent.js.map +1 -1
- package/dist/components/ButtonContent.cjs +1 -1
- package/dist/components/ButtonRow/ButtonRow.cjs +1 -1
- package/dist/components/ButtonRow/ButtonRow.cjs.map +1 -1
- package/dist/components/ButtonRow/ButtonRow.d.ts +1 -1
- package/dist/components/ButtonRow/ButtonRow.js +22 -24
- package/dist/components/ButtonRow/ButtonRow.js.map +1 -1
- package/dist/components/ButtonRow.cjs +1 -1
- package/dist/components/Card/Card.cjs +1 -1
- package/dist/components/Card/Card.cjs.map +1 -1
- package/dist/components/Card/Card.d.ts +1 -1
- package/dist/components/Card/Card.js +10 -12
- package/dist/components/Card/Card.js.map +1 -1
- package/dist/components/Card/Card.module.css.cjs +1 -1
- package/dist/components/Card/Card.module.css.js +4 -5
- package/dist/components/Card.cjs +1 -1
- package/dist/components/Carousel/Carousel.cjs +1 -1
- package/dist/components/Carousel/Carousel.cjs.map +1 -1
- package/dist/components/Carousel/Carousel.d.ts +3 -3
- package/dist/components/Carousel/Carousel.js +28 -34
- package/dist/components/Carousel/Carousel.js.map +1 -1
- package/dist/components/Carousel.cjs +1 -1
- package/dist/components/CheckRow/CheckRow.cjs +1 -1
- package/dist/components/CheckRow/CheckRow.cjs.map +1 -1
- package/dist/components/CheckRow/CheckRow.d.ts +1 -1
- package/dist/components/CheckRow/CheckRow.js +7 -7
- package/dist/components/CheckRow/CheckRow.js.map +1 -1
- package/dist/components/CheckRow.cjs +1 -1
- package/dist/components/Checkbox/Checkbox.cjs +1 -1
- package/dist/components/Checkbox/Checkbox.cjs.map +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts +1 -1
- package/dist/components/Checkbox/Checkbox.js +2 -2
- package/dist/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/Checkbox.cjs +1 -1
- package/dist/components/Chip/Chip.cjs +1 -1
- package/dist/components/Chip/Chip.cjs.map +1 -1
- package/dist/components/Chip/Chip.d.ts +1 -1
- package/dist/components/Chip/Chip.js +2 -2
- package/dist/components/Chip/Chip.js.map +1 -1
- package/dist/components/Chip.cjs +1 -1
- package/dist/components/Clamp/Clamp.cjs +1 -1
- package/dist/components/Clamp/Clamp.cjs.map +1 -1
- package/dist/components/Clamp/Clamp.d.ts +1 -1
- package/dist/components/Clamp/Clamp.js +9 -11
- package/dist/components/Clamp/Clamp.js.map +1 -1
- package/dist/components/Clamp.cjs +1 -1
- package/dist/components/ColorPicker/ColorPicker.cjs +1 -1
- package/dist/components/ColorPicker/ColorPicker.cjs.map +1 -1
- package/dist/components/ColorPicker/ColorPicker.d.ts +2 -2
- package/dist/components/ColorPicker/ColorPicker.js +33 -37
- package/dist/components/ColorPicker/ColorPicker.js.map +1 -1
- package/dist/components/ColorPicker/ColorPicker.module.css.cjs +1 -1
- package/dist/components/ColorPicker/ColorPicker.module.css.js +9 -10
- package/dist/components/ColorPicker.cjs +1 -1
- package/dist/components/ColumnView/ColumnView.cjs +1 -1
- package/dist/components/ColumnView/ColumnView.cjs.map +1 -1
- package/dist/components/ColumnView/ColumnView.d.ts +1 -1
- package/dist/components/ColumnView/ColumnView.js +24 -28
- package/dist/components/ColumnView/ColumnView.js.map +1 -1
- package/dist/components/ColumnView.cjs +1 -1
- package/dist/components/ComboRow/ComboRow.cjs +1 -1
- package/dist/components/ComboRow/ComboRow.cjs.map +1 -1
- package/dist/components/ComboRow/ComboRow.d.ts +1 -1
- package/dist/components/ComboRow/ComboRow.js +2 -2
- package/dist/components/ComboRow/ComboRow.js.map +1 -1
- package/dist/components/ComboRow/ComboRow.module.css.cjs +1 -1
- package/dist/components/ComboRow/ComboRow.module.css.js +24 -25
- package/dist/components/ComboRow.cjs +1 -1
- package/dist/components/ContributionGraph/ContributionGraph.cjs +1 -1
- package/dist/components/ContributionGraph/ContributionGraph.cjs.map +1 -1
- package/dist/components/ContributionGraph/ContributionGraph.d.ts +1 -1
- package/dist/components/ContributionGraph/ContributionGraph.js +2 -2
- package/dist/components/ContributionGraph/ContributionGraph.js.map +1 -1
- package/dist/components/ContributionGraph.cjs +1 -1
- package/dist/components/CountDownTimer/CountDownTimer.cjs +1 -1
- package/dist/components/CountDownTimer/CountDownTimer.cjs.map +1 -1
- package/dist/components/CountDownTimer/CountDownTimer.d.ts +1 -1
- package/dist/components/CountDownTimer/CountDownTimer.js +2 -2
- package/dist/components/CountDownTimer/CountDownTimer.js.map +1 -1
- package/dist/components/CountDownTimer.cjs +1 -1
- package/dist/components/Dialog/Dialog.cjs +1 -1
- package/dist/components/Dialog/Dialog.cjs.map +1 -1
- package/dist/components/Dialog/Dialog.d.ts +1 -1
- package/dist/components/Dialog/Dialog.js +51 -52
- package/dist/components/Dialog/Dialog.js.map +1 -1
- package/dist/components/Dialog/Dialog.module.css.cjs +1 -1
- package/dist/components/Dialog/Dialog.module.css.js +8 -9
- package/dist/components/Dialog/dialogUtils.cjs +1 -1
- package/dist/components/Dialog/dialogUtils.cjs.map +1 -1
- package/dist/components/Dialog/dialogUtils.d.ts +6 -0
- package/dist/components/Dialog/dialogUtils.js +11 -2
- package/dist/components/Dialog/dialogUtils.js.map +1 -1
- package/dist/components/Dialog.cjs +1 -1
- package/dist/components/Drawer/Drawer.cjs +1 -1
- package/dist/components/Drawer/Drawer.cjs.map +1 -1
- package/dist/components/Drawer/Drawer.d.ts +1 -1
- package/dist/components/Drawer/Drawer.js +2 -2
- package/dist/components/Drawer/Drawer.js.map +1 -1
- package/dist/components/Drawer/Drawer.module.css.cjs +1 -1
- package/dist/components/Drawer/Drawer.module.css.js +11 -12
- package/dist/components/Drawer.cjs +1 -1
- package/dist/components/Dropdown/Dropdown.cjs +1 -1
- package/dist/components/Dropdown/Dropdown.cjs.map +1 -1
- package/dist/components/Dropdown/Dropdown.d.ts +1 -1
- package/dist/components/Dropdown/Dropdown.js +89 -85
- package/dist/components/Dropdown/Dropdown.js.map +1 -1
- package/dist/components/Dropdown/Dropdown.module.css.cjs +1 -1
- package/dist/components/Dropdown/Dropdown.module.css.js +20 -21
- package/dist/components/Dropdown.cjs +1 -1
- package/dist/components/EntryRow/EntryRow.cjs +1 -1
- package/dist/components/EntryRow/EntryRow.cjs.map +1 -1
- package/dist/components/EntryRow/EntryRow.d.ts +1 -1
- package/dist/components/EntryRow/EntryRow.js +2 -2
- package/dist/components/EntryRow/EntryRow.js.map +1 -1
- package/dist/components/EntryRow.cjs +1 -1
- package/dist/components/ExpanderRow/ExpanderRow.cjs +1 -1
- package/dist/components/ExpanderRow/ExpanderRow.cjs.map +1 -1
- package/dist/components/ExpanderRow/ExpanderRow.d.ts +1 -1
- package/dist/components/ExpanderRow/ExpanderRow.js +2 -2
- package/dist/components/ExpanderRow/ExpanderRow.js.map +1 -1
- package/dist/components/ExpanderRow.cjs +1 -1
- package/dist/components/Footer/Footer.cjs +1 -1
- package/dist/components/Footer/Footer.cjs.map +1 -1
- package/dist/components/Footer/Footer.d.ts +1 -1
- package/dist/components/Footer/Footer.js +22 -24
- package/dist/components/Footer/Footer.js.map +1 -1
- package/dist/components/Footer.cjs +1 -1
- package/dist/components/Frame/Frame.cjs +1 -1
- package/dist/components/Frame/Frame.cjs.map +1 -1
- package/dist/components/Frame/Frame.d.ts +1 -1
- package/dist/components/Frame/Frame.js +5 -7
- package/dist/components/Frame/Frame.js.map +1 -1
- package/dist/components/Frame.cjs +1 -1
- package/dist/components/GnomeProvider/GnomeContext.cjs +1 -1
- package/dist/components/GnomeProvider/GnomeContext.cjs.map +1 -1
- package/dist/components/GnomeProvider/GnomeContext.js.map +1 -1
- package/dist/components/GnomeProvider/GnomeProvider.cjs +1 -1
- package/dist/components/GnomeProvider/GnomeProvider.cjs.map +1 -1
- package/dist/components/GnomeProvider/GnomeProvider.d.ts +1 -1
- package/dist/components/GnomeProvider/GnomeProvider.js +2 -2
- package/dist/components/GnomeProvider/GnomeProvider.js.map +1 -1
- package/dist/components/HeaderBar/HeaderBar.cjs +1 -1
- package/dist/components/HeaderBar/HeaderBar.cjs.map +1 -1
- package/dist/components/HeaderBar/HeaderBar.d.ts +1 -1
- package/dist/components/HeaderBar/HeaderBar.js +26 -28
- package/dist/components/HeaderBar/HeaderBar.js.map +1 -1
- package/dist/components/HeaderBar.cjs +1 -1
- package/dist/components/Icon/Icon.cjs +1 -1
- package/dist/components/Icon/Icon.cjs.map +1 -1
- package/dist/components/Icon/Icon.d.ts +1 -1
- package/dist/components/Icon/Icon.js +2 -2
- package/dist/components/Icon/Icon.js.map +1 -1
- package/dist/components/Icon.cjs +1 -1
- package/dist/components/IconButton/IconButton.cjs +1 -1
- package/dist/components/IconButton/IconButton.cjs.map +1 -1
- package/dist/components/IconButton/IconButton.js +4 -4
- package/dist/components/IconButton/IconButton.js.map +1 -1
- package/dist/components/IconButton.cjs +1 -1
- package/dist/components/InlineViewSwitcher/InlineViewSwitcher.cjs +1 -1
- package/dist/components/InlineViewSwitcher/InlineViewSwitcher.cjs.map +1 -1
- package/dist/components/InlineViewSwitcher/InlineViewSwitcher.d.ts +1 -1
- package/dist/components/InlineViewSwitcher/InlineViewSwitcher.js +2 -2
- package/dist/components/InlineViewSwitcher/InlineViewSwitcher.js.map +1 -1
- package/dist/components/InlineViewSwitcher/InlineViewSwitcherItem.cjs +1 -1
- package/dist/components/InlineViewSwitcher/InlineViewSwitcherItem.cjs.map +1 -1
- package/dist/components/InlineViewSwitcher/InlineViewSwitcherItem.d.ts +1 -1
- package/dist/components/InlineViewSwitcher/InlineViewSwitcherItem.js +2 -2
- package/dist/components/InlineViewSwitcher/InlineViewSwitcherItem.js.map +1 -1
- package/dist/components/InlineViewSwitcher.cjs +1 -1
- package/dist/components/Link/Link.cjs +1 -1
- package/dist/components/Link/Link.cjs.map +1 -1
- package/dist/components/Link/Link.d.ts +1 -1
- package/dist/components/Link/Link.js +2 -2
- package/dist/components/Link/Link.js.map +1 -1
- package/dist/components/Link.cjs +1 -1
- package/dist/components/LinkedGroup/LinkedGroup.cjs +1 -1
- package/dist/components/LinkedGroup/LinkedGroup.cjs.map +1 -1
- package/dist/components/LinkedGroup/LinkedGroup.d.ts +1 -1
- package/dist/components/LinkedGroup/LinkedGroup.js +9 -11
- package/dist/components/LinkedGroup/LinkedGroup.js.map +1 -1
- package/dist/components/LinkedGroup.cjs +1 -1
- package/dist/components/NavigationSplitView/NavigationSplitView.cjs +1 -1
- package/dist/components/NavigationSplitView/NavigationSplitView.cjs.map +1 -1
- package/dist/components/NavigationSplitView/NavigationSplitView.d.ts +1 -1
- package/dist/components/NavigationSplitView/NavigationSplitView.js +2 -2
- package/dist/components/NavigationSplitView/NavigationSplitView.js.map +1 -1
- package/dist/components/NavigationSplitView.cjs +1 -1
- package/dist/components/NavigationView/NavigationView.cjs +1 -1
- package/dist/components/NavigationView/NavigationView.cjs.map +1 -1
- package/dist/components/NavigationView/NavigationView.d.ts +2 -2
- package/dist/components/NavigationView/NavigationView.js +3 -4
- package/dist/components/NavigationView/NavigationView.js.map +1 -1
- package/dist/components/NavigationView/NavigationView.module.css.cjs +1 -1
- package/dist/components/NavigationView/NavigationView.module.css.js +9 -10
- package/dist/components/NavigationView.cjs +1 -1
- package/dist/components/OverlaySplitView/OverlaySplitView.cjs +1 -1
- package/dist/components/OverlaySplitView/OverlaySplitView.cjs.map +1 -1
- package/dist/components/OverlaySplitView/OverlaySplitView.d.ts +1 -1
- package/dist/components/OverlaySplitView/OverlaySplitView.js +2 -2
- package/dist/components/OverlaySplitView/OverlaySplitView.js.map +1 -1
- package/dist/components/OverlaySplitView.cjs +1 -1
- package/dist/components/PasswordEntryRow/PasswordEntryRow.cjs +1 -1
- package/dist/components/PasswordEntryRow/PasswordEntryRow.cjs.map +1 -1
- package/dist/components/PasswordEntryRow/PasswordEntryRow.d.ts +1 -1
- package/dist/components/PasswordEntryRow/PasswordEntryRow.js +11 -10
- package/dist/components/PasswordEntryRow/PasswordEntryRow.js.map +1 -1
- package/dist/components/PasswordEntryRow.cjs +1 -1
- package/dist/components/PathBar/PathBar.cjs +1 -1
- package/dist/components/PathBar/PathBar.cjs.map +1 -1
- package/dist/components/PathBar/PathBar.d.ts +1 -1
- package/dist/components/PathBar/PathBar.js +48 -50
- package/dist/components/PathBar/PathBar.js.map +1 -1
- package/dist/components/PathBar.cjs +1 -1
- package/dist/components/Popover/Popover.cjs +1 -1
- package/dist/components/Popover/Popover.cjs.map +1 -1
- package/dist/components/Popover/Popover.d.ts +1 -1
- package/dist/components/Popover/Popover.js +5 -5
- package/dist/components/Popover/Popover.js.map +1 -1
- package/dist/components/Popover.cjs +1 -1
- package/dist/components/PreferencesDialog/PreferencesDialog.cjs +1 -1
- package/dist/components/PreferencesDialog/PreferencesDialog.cjs.map +1 -1
- package/dist/components/PreferencesDialog/PreferencesDialog.d.ts +1 -1
- package/dist/components/PreferencesDialog/PreferencesDialog.js +2 -2
- package/dist/components/PreferencesDialog/PreferencesDialog.js.map +1 -1
- package/dist/components/PreferencesDialog/PreferencesDialog.module.css.cjs +1 -1
- package/dist/components/PreferencesDialog/PreferencesDialog.module.css.js +18 -19
- package/dist/components/PreferencesDialog.cjs +1 -1
- package/dist/components/PreferencesGroup/PreferencesGroup.cjs +1 -1
- package/dist/components/PreferencesGroup/PreferencesGroup.cjs.map +1 -1
- package/dist/components/PreferencesGroup/PreferencesGroup.d.ts +1 -1
- package/dist/components/PreferencesGroup/PreferencesGroup.js +2 -2
- package/dist/components/PreferencesGroup/PreferencesGroup.js.map +1 -1
- package/dist/components/PreferencesGroup.cjs +1 -1
- package/dist/components/PreferencesPage/PreferencesPage.cjs +1 -1
- package/dist/components/PreferencesPage/PreferencesPage.cjs.map +1 -1
- package/dist/components/PreferencesPage/PreferencesPage.d.ts +1 -1
- package/dist/components/PreferencesPage/PreferencesPage.js +9 -11
- package/dist/components/PreferencesPage/PreferencesPage.js.map +1 -1
- package/dist/components/PreferencesPage.cjs +1 -1
- package/dist/components/ProgressBar/ProgressBar.cjs +1 -1
- package/dist/components/ProgressBar/ProgressBar.cjs.map +1 -1
- package/dist/components/ProgressBar/ProgressBar.d.ts +1 -1
- package/dist/components/ProgressBar/ProgressBar.js +2 -2
- package/dist/components/ProgressBar/ProgressBar.js.map +1 -1
- package/dist/components/ProgressBar.cjs +1 -1
- package/dist/components/RadioButton/RadioButton.cjs +1 -1
- package/dist/components/RadioButton/RadioButton.cjs.map +1 -1
- package/dist/components/RadioButton/RadioButton.d.ts +1 -1
- package/dist/components/RadioButton/RadioButton.js +5 -7
- package/dist/components/RadioButton/RadioButton.js.map +1 -1
- package/dist/components/RadioButton.cjs +1 -1
- package/dist/components/SearchBar/SearchBar.cjs +1 -1
- package/dist/components/SearchBar/SearchBar.cjs.map +1 -1
- package/dist/components/SearchBar/SearchBar.d.ts +1 -1
- package/dist/components/SearchBar/SearchBar.js +2 -2
- package/dist/components/SearchBar/SearchBar.js.map +1 -1
- package/dist/components/SearchBar.cjs +1 -1
- package/dist/components/SegmentedBar/SegmentedBar.cjs +1 -1
- package/dist/components/SegmentedBar/SegmentedBar.cjs.map +1 -1
- package/dist/components/SegmentedBar/SegmentedBar.js.map +1 -1
- package/dist/components/SegmentedBar.cjs +1 -1
- package/dist/components/Separator/Separator.cjs +1 -1
- package/dist/components/Separator/Separator.cjs.map +1 -1
- package/dist/components/Separator/Separator.d.ts +1 -1
- package/dist/components/Separator/Separator.js +2 -2
- package/dist/components/Separator/Separator.js.map +1 -1
- package/dist/components/Separator.cjs +1 -1
- package/dist/components/ShortcutLabel/ShortcutLabel.cjs +1 -1
- package/dist/components/ShortcutLabel/ShortcutLabel.cjs.map +1 -1
- package/dist/components/ShortcutLabel/ShortcutLabel.d.ts +1 -1
- package/dist/components/ShortcutLabel/ShortcutLabel.js +2 -3
- package/dist/components/ShortcutLabel/ShortcutLabel.js.map +1 -1
- package/dist/components/ShortcutLabel.cjs +1 -1
- package/dist/components/ShortcutsDialog/ShortcutsDialog.cjs +1 -1
- package/dist/components/ShortcutsDialog/ShortcutsDialog.cjs.map +1 -1
- package/dist/components/ShortcutsDialog/ShortcutsDialog.d.ts +1 -1
- package/dist/components/ShortcutsDialog/ShortcutsDialog.js +75 -76
- package/dist/components/ShortcutsDialog/ShortcutsDialog.js.map +1 -1
- package/dist/components/ShortcutsDialog/ShortcutsDialog.module.css.cjs +1 -1
- package/dist/components/ShortcutsDialog/ShortcutsDialog.module.css.js +21 -22
- package/dist/components/ShortcutsDialog.cjs +1 -1
- package/dist/components/Sidebar/Sidebar.cjs +1 -1
- package/dist/components/Sidebar/Sidebar.cjs.map +1 -1
- package/dist/components/Sidebar/Sidebar.d.ts +1 -1
- package/dist/components/Sidebar/Sidebar.js +2 -3
- package/dist/components/Sidebar/Sidebar.js.map +1 -1
- package/dist/components/Sidebar/Sidebar.module.css.cjs +1 -1
- package/dist/components/Sidebar/Sidebar.module.css.js +33 -34
- package/dist/components/Sidebar/SidebarItem.cjs +1 -1
- package/dist/components/Sidebar/SidebarItem.cjs.map +1 -1
- package/dist/components/Sidebar/SidebarItem.d.ts +1 -1
- package/dist/components/Sidebar/SidebarItem.js +16 -16
- package/dist/components/Sidebar/SidebarItem.js.map +1 -1
- package/dist/components/Sidebar/SidebarSection.cjs +1 -1
- package/dist/components/Sidebar/SidebarSection.cjs.map +1 -1
- package/dist/components/Sidebar/SidebarSection.js.map +1 -1
- package/dist/components/Sidebar.cjs +1 -1
- package/dist/components/Skeleton/Skeleton.cjs +1 -1
- package/dist/components/Skeleton/Skeleton.cjs.map +1 -1
- package/dist/components/Skeleton/Skeleton.d.ts +1 -1
- package/dist/components/Skeleton/Skeleton.js +9 -10
- package/dist/components/Skeleton/Skeleton.js.map +1 -1
- package/dist/components/Skeleton.cjs +1 -1
- package/dist/components/Slider/Slider.cjs +1 -1
- package/dist/components/Slider/Slider.cjs.map +1 -1
- package/dist/components/Slider/Slider.d.ts +1 -1
- package/dist/components/Slider/Slider.js +2 -2
- package/dist/components/Slider/Slider.js.map +1 -1
- package/dist/components/Slider.cjs +1 -1
- package/dist/components/SpinButton/SpinButton.cjs +1 -1
- package/dist/components/SpinButton/SpinButton.cjs.map +1 -1
- package/dist/components/SpinButton/SpinButton.d.ts +1 -1
- package/dist/components/SpinButton/SpinButton.js +2 -2
- package/dist/components/SpinButton/SpinButton.js.map +1 -1
- package/dist/components/SpinButton.cjs +1 -1
- package/dist/components/SpinRow/SpinRow.cjs +1 -1
- package/dist/components/SpinRow/SpinRow.cjs.map +1 -1
- package/dist/components/SpinRow/SpinRow.d.ts +1 -1
- package/dist/components/SpinRow/SpinRow.js +2 -2
- package/dist/components/SpinRow/SpinRow.js.map +1 -1
- package/dist/components/SpinRow.cjs +1 -1
- package/dist/components/Spinner/Spinner.cjs +1 -1
- package/dist/components/Spinner/Spinner.cjs.map +1 -1
- package/dist/components/Spinner/Spinner.d.ts +1 -1
- package/dist/components/Spinner/Spinner.js +2 -2
- package/dist/components/Spinner/Spinner.js.map +1 -1
- package/dist/components/Spinner.cjs +1 -1
- package/dist/components/SplitButton/SplitButton.cjs +1 -1
- package/dist/components/SplitButton/SplitButton.cjs.map +1 -1
- package/dist/components/SplitButton/SplitButton.d.ts +1 -1
- package/dist/components/SplitButton/SplitButton.js +2 -2
- package/dist/components/SplitButton/SplitButton.js.map +1 -1
- package/dist/components/SplitButton.cjs +1 -1
- package/dist/components/StatusBadge/StatusBadge.cjs +1 -1
- package/dist/components/StatusBadge/StatusBadge.cjs.map +1 -1
- package/dist/components/StatusBadge/StatusBadge.d.ts +1 -1
- package/dist/components/StatusBadge/StatusBadge.js +9 -11
- package/dist/components/StatusBadge/StatusBadge.js.map +1 -1
- package/dist/components/StatusBadge.cjs +1 -1
- package/dist/components/StatusPage/StatusPage.cjs +1 -1
- package/dist/components/StatusPage/StatusPage.cjs.map +1 -1
- package/dist/components/StatusPage/StatusPage.d.ts +1 -1
- package/dist/components/StatusPage/StatusPage.js +2 -2
- package/dist/components/StatusPage/StatusPage.js.map +1 -1
- package/dist/components/StatusPage.cjs +1 -1
- package/dist/components/Switch/Switch.cjs +1 -1
- package/dist/components/Switch/Switch.cjs.map +1 -1
- package/dist/components/Switch/Switch.d.ts +1 -1
- package/dist/components/Switch/Switch.js +6 -8
- package/dist/components/Switch/Switch.js.map +1 -1
- package/dist/components/Switch.cjs +1 -1
- package/dist/components/SwitchRow/SwitchRow.cjs +1 -1
- package/dist/components/SwitchRow/SwitchRow.cjs.map +1 -1
- package/dist/components/SwitchRow/SwitchRow.d.ts +1 -1
- package/dist/components/SwitchRow/SwitchRow.js +7 -7
- package/dist/components/SwitchRow/SwitchRow.js.map +1 -1
- package/dist/components/SwitchRow.cjs +1 -1
- package/dist/components/Tabs/TabBar.cjs +1 -1
- package/dist/components/Tabs/TabBar.cjs.map +1 -1
- package/dist/components/Tabs/TabBar.d.ts +1 -1
- package/dist/components/Tabs/TabBar.js +2 -2
- package/dist/components/Tabs/TabBar.js.map +1 -1
- package/dist/components/Tabs/TabItem.cjs +1 -1
- package/dist/components/Tabs/TabItem.cjs.map +1 -1
- package/dist/components/Tabs/TabItem.js.map +1 -1
- package/dist/components/Tabs/TabPanel.cjs +1 -1
- package/dist/components/Tabs/TabPanel.cjs.map +1 -1
- package/dist/components/Tabs/TabPanel.d.ts +1 -1
- package/dist/components/Tabs/TabPanel.js +8 -10
- package/dist/components/Tabs/TabPanel.js.map +1 -1
- package/dist/components/Tabs.cjs +1 -1
- package/dist/components/TerminalView/TerminalView.cjs +1 -1
- package/dist/components/TerminalView/TerminalView.cjs.map +1 -1
- package/dist/components/TerminalView/TerminalView.d.ts +1 -1
- package/dist/components/TerminalView/TerminalView.js +2 -2
- package/dist/components/TerminalView/TerminalView.js.map +1 -1
- package/dist/components/TerminalView.cjs +1 -1
- package/dist/components/Text/Text.cjs +1 -1
- package/dist/components/Text/Text.cjs.map +1 -1
- package/dist/components/Text/Text.d.ts +1 -1
- package/dist/components/Text/Text.js +10 -13
- package/dist/components/Text/Text.js.map +1 -1
- package/dist/components/Text/Text.module.css.cjs +1 -1
- package/dist/components/Text/Text.module.css.js +9 -10
- package/dist/components/Text.cjs +1 -1
- package/dist/components/TextField/TextField.cjs +1 -1
- package/dist/components/TextField/TextField.cjs.map +1 -1
- package/dist/components/TextField/TextField.d.ts +1 -1
- package/dist/components/TextField/TextField.js +2 -2
- package/dist/components/TextField/TextField.js.map +1 -1
- package/dist/components/TextField.cjs +1 -1
- package/dist/components/Timeline/Timeline.cjs +1 -1
- package/dist/components/Timeline/Timeline.cjs.map +1 -1
- package/dist/components/Timeline/Timeline.d.ts +1 -1
- package/dist/components/Timeline/Timeline.js +2 -2
- package/dist/components/Timeline/Timeline.js.map +1 -1
- package/dist/components/Timeline.cjs +1 -1
- package/dist/components/Toast/Toast.cjs +1 -1
- package/dist/components/Toast/Toast.cjs.map +1 -1
- package/dist/components/Toast/Toast.d.ts +1 -1
- package/dist/components/Toast/Toast.js +2 -2
- package/dist/components/Toast/Toast.js.map +1 -1
- package/dist/components/Toast/Toast.module.css.cjs +1 -1
- package/dist/components/Toast/Toast.module.css.js +10 -11
- package/dist/components/Toast/Toaster.cjs +1 -1
- package/dist/components/Toast/Toaster.cjs.map +1 -1
- package/dist/components/Toast/Toaster.d.ts +1 -1
- package/dist/components/Toast/Toaster.js +2 -2
- package/dist/components/Toast/Toaster.js.map +1 -1
- package/dist/components/Toast.cjs +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.cjs +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.cjs.map +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.d.ts +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.js +2 -2
- package/dist/components/ToggleGroup/ToggleGroup.js.map +1 -1
- package/dist/components/ToggleGroup/ToggleGroupItem.cjs +1 -1
- package/dist/components/ToggleGroup/ToggleGroupItem.cjs.map +1 -1
- package/dist/components/ToggleGroup/ToggleGroupItem.d.ts +1 -1
- package/dist/components/ToggleGroup/ToggleGroupItem.js +2 -2
- package/dist/components/ToggleGroup/ToggleGroupItem.js.map +1 -1
- package/dist/components/ToggleGroup.cjs +1 -1
- package/dist/components/Toolbar/Spacer.cjs +1 -1
- package/dist/components/Toolbar/Spacer.cjs.map +1 -1
- package/dist/components/Toolbar/Spacer.d.ts +1 -1
- package/dist/components/Toolbar/Spacer.js +5 -7
- package/dist/components/Toolbar/Spacer.js.map +1 -1
- package/dist/components/Toolbar/Toolbar.cjs +1 -1
- package/dist/components/Toolbar/Toolbar.cjs.map +1 -1
- package/dist/components/Toolbar/Toolbar.d.ts +1 -1
- package/dist/components/Toolbar/Toolbar.js +5 -7
- package/dist/components/Toolbar/Toolbar.js.map +1 -1
- package/dist/components/Toolbar.cjs +1 -1
- package/dist/components/ToolbarView/ToolbarView.cjs +1 -1
- package/dist/components/ToolbarView/ToolbarView.cjs.map +1 -1
- package/dist/components/ToolbarView/ToolbarView.d.ts +1 -1
- package/dist/components/ToolbarView/ToolbarView.js +18 -20
- package/dist/components/ToolbarView/ToolbarView.js.map +1 -1
- package/dist/components/ToolbarView.cjs +1 -1
- package/dist/components/Tooltip/Tooltip.cjs +1 -1
- package/dist/components/Tooltip/Tooltip.cjs.map +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +1 -1
- package/dist/components/Tooltip/Tooltip.js +2 -2
- package/dist/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/components/Tooltip.cjs +1 -1
- package/dist/components/ViewSwitcher/ViewSwitcher.cjs +1 -1
- package/dist/components/ViewSwitcher/ViewSwitcher.cjs.map +1 -1
- package/dist/components/ViewSwitcher/ViewSwitcher.d.ts +1 -1
- package/dist/components/ViewSwitcher/ViewSwitcher.js +2 -2
- package/dist/components/ViewSwitcher/ViewSwitcher.js.map +1 -1
- package/dist/components/ViewSwitcher/ViewSwitcherItem.cjs +1 -1
- package/dist/components/ViewSwitcher/ViewSwitcherItem.cjs.map +1 -1
- package/dist/components/ViewSwitcher/ViewSwitcherItem.d.ts +1 -1
- package/dist/components/ViewSwitcher/ViewSwitcherItem.js +24 -26
- package/dist/components/ViewSwitcher/ViewSwitcherItem.js.map +1 -1
- package/dist/components/ViewSwitcher.cjs +1 -1
- package/dist/components/ViewSwitcherBar/ViewSwitcherBar.cjs +1 -1
- package/dist/components/ViewSwitcherBar/ViewSwitcherBar.cjs.map +1 -1
- package/dist/components/ViewSwitcherBar/ViewSwitcherBar.d.ts +1 -1
- package/dist/components/ViewSwitcherBar/ViewSwitcherBar.js +7 -9
- package/dist/components/ViewSwitcherBar/ViewSwitcherBar.js.map +1 -1
- package/dist/components/ViewSwitcherBar.cjs +1 -1
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebar.cjs +1 -1
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebar.cjs.map +1 -1
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebar.d.ts +1 -1
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebar.js +2 -2
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebar.js.map +1 -1
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebarItem.cjs +1 -1
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebarItem.cjs.map +1 -1
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebarItem.d.ts +1 -1
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebarItem.js +2 -2
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebarItem.js.map +1 -1
- package/dist/components/ViewSwitcherSidebar.cjs +1 -1
- package/dist/components/WindowTitle/WindowTitle.cjs +1 -1
- package/dist/components/WindowTitle/WindowTitle.cjs.map +1 -1
- package/dist/components/WindowTitle/WindowTitle.d.ts +1 -1
- package/dist/components/WindowTitle/WindowTitle.js +11 -13
- package/dist/components/WindowTitle/WindowTitle.js.map +1 -1
- package/dist/components/WindowTitle.cjs +1 -1
- package/dist/components/WrapBox/WrapBox.cjs +1 -1
- package/dist/components/WrapBox/WrapBox.cjs.map +1 -1
- package/dist/components/WrapBox/WrapBox.d.ts +1 -1
- package/dist/components/WrapBox/WrapBox.js +5 -5
- package/dist/components/WrapBox/WrapBox.js.map +1 -1
- package/dist/components/WrapBox.cjs +1 -1
- package/dist/hooks/useBreakpoint.cjs +1 -1
- package/dist/hooks/useBreakpoint.cjs.map +1 -1
- package/dist/hooks/useBreakpoint.js.map +1 -1
- package/dist/hooks.cjs +1 -1
- package/dist/index.cjs +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./IconButton/IconButton.cjs");exports.IconButton=e.IconButton;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(
|
|
1
|
+
const e=require("./InlineViewSwitcher.module.css.cjs");let t=require("react"),n=require("react/jsx-runtime");var r=(0,t.createContext)(null);function i(){let e=(0,t.useContext)(r);if(!e)throw Error(`InlineViewSwitcherItem must be used inside InlineViewSwitcher`);return e}var a=({value:i,onValueChange:a,variant:o=`default`,"aria-label":s=`View switcher`,children:c,className:l,...u})=>{let d=(0,t.useRef)(null);function f(e){let t=Array.from(d.current?.querySelectorAll(`[role=radio]:not(:disabled)`)??[]),n=document.activeElement,r=n instanceof HTMLButtonElement?t.indexOf(n):-1;if(r===-1)return;let i=r;if(e.key===`ArrowRight`||e.key===`ArrowDown`)i=(r+1)%t.length;else if(e.key===`ArrowLeft`||e.key===`ArrowUp`)i=(r-1+t.length)%t.length;else if(e.key===`Home`)i=0;else if(e.key===`End`)i=t.length-1;else return;e.preventDefault(),t[i].focus(),t[i].click()}return(0,n.jsx)(r.Provider,{value:{value:i,onValueChange:a},children:(0,n.jsx)(`div`,{ref:d,role:`radiogroup`,"aria-label":s,onKeyDown:f,className:[e.default.switcher,e.default[o],l].filter(Boolean).join(` `),...u,children:c})})};exports.InlineViewSwitcher=a,exports.useInlineViewSwitcher=i;
|
|
2
2
|
//# sourceMappingURL=InlineViewSwitcher.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InlineViewSwitcher.cjs","names":[],"sources":["../../../src/components/InlineViewSwitcher/InlineViewSwitcher.tsx"],"sourcesContent":["import {\n createContext,\n type HTMLAttributes,\n type KeyboardEvent,\n type ReactNode,\n useContext,\n useRef,\n} from 'react';\n\nimport styles from './InlineViewSwitcher.module.css';\n\nexport type InlineViewSwitcherVariant = 'default' | 'flat' | 'round' | 'pill';\n\n// ─── Internal context ──────────────────────────────────────────────────────────\n\ninterface InlineViewSwitcherContextValue {\n value: string;\n onValueChange: (value: string) => void;\n}\n\nconst InlineViewSwitcherContext = createContext<InlineViewSwitcherContextValue | null>(null);\n\n// eslint-disable-next-line react-refresh/only-export-components\nexport function useInlineViewSwitcher() {\n const ctx = useContext(InlineViewSwitcherContext);\n\n if (!ctx) {\n throw new Error('InlineViewSwitcherItem must be used inside InlineViewSwitcher');\n }\n\n return ctx;\n}\n\n// ─── InlineViewSwitcher ────────────────────────────────────────────────────────\n\nexport interface InlineViewSwitcherProps extends HTMLAttributes<HTMLDivElement> {\n /** Currently active view name. */\n value: string;\n /** Called with the new value when a view is selected. */\n onValueChange: (value: string) => void;\n /**\n * Visual style of the switcher.\n * - `default` — card background with border and shadow (same as `ToggleGroup`).\n * - `flat` — no background or border; active indicator only.\n * - `round` — pill-shaped container and items.\n * - `pill` — segmented-control style; active item appears lifted, no accent color.\n */\n variant?: InlineViewSwitcherVariant;\n /** Accessible label for the group. */\n 'aria-label'?: string;\n children?: ReactNode;\n}\n\n/**\n * Compact inline view switcher for placing inside content areas, cards, or\n * toolbars — wherever `ViewSwitcher` (header-bar sized) would be too heavy.\n *\n * Built on `ToggleGroup` internals with `flat` and `round` style variants.\n * Mirrors `AdwInlineViewSwitcher` (libadwaita 1.7 / GNOME 48).\n *\n * Compose with `InlineViewSwitcherItem`. Keyboard: ← / → cycle, Home / End jump.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.InlineViewSwitcher.html\n */\nexport
|
|
1
|
+
{"version":3,"file":"InlineViewSwitcher.cjs","names":[],"sources":["../../../src/components/InlineViewSwitcher/InlineViewSwitcher.tsx"],"sourcesContent":["import {\n createContext,\n type HTMLAttributes,\n type KeyboardEvent,\n type ReactNode,\n useContext,\n useRef,\n} from 'react';\n\nimport styles from './InlineViewSwitcher.module.css';\n\nexport type InlineViewSwitcherVariant = 'default' | 'flat' | 'round' | 'pill';\n\n// ─── Internal context ──────────────────────────────────────────────────────────\n\ninterface InlineViewSwitcherContextValue {\n value: string;\n onValueChange: (value: string) => void;\n}\n\nconst InlineViewSwitcherContext = createContext<InlineViewSwitcherContextValue | null>(null);\n\n// eslint-disable-next-line react-refresh/only-export-components\nexport function useInlineViewSwitcher() {\n const ctx = useContext(InlineViewSwitcherContext);\n\n if (!ctx) {\n throw new Error('InlineViewSwitcherItem must be used inside InlineViewSwitcher');\n }\n\n return ctx;\n}\n\n// ─── InlineViewSwitcher ────────────────────────────────────────────────────────\n\nexport interface InlineViewSwitcherProps extends HTMLAttributes<HTMLDivElement> {\n /** Currently active view name. */\n value: string;\n /** Called with the new value when a view is selected. */\n onValueChange: (value: string) => void;\n /**\n * Visual style of the switcher.\n * - `default` — card background with border and shadow (same as `ToggleGroup`).\n * - `flat` — no background or border; active indicator only.\n * - `round` — pill-shaped container and items.\n * - `pill` — segmented-control style; active item appears lifted, no accent color.\n */\n variant?: InlineViewSwitcherVariant;\n /** Accessible label for the group. */\n 'aria-label'?: string;\n children?: ReactNode;\n}\n\n/**\n * Compact inline view switcher for placing inside content areas, cards, or\n * toolbars — wherever `ViewSwitcher` (header-bar sized) would be too heavy.\n *\n * Built on `ToggleGroup` internals with `flat` and `round` style variants.\n * Mirrors `AdwInlineViewSwitcher` (libadwaita 1.7 / GNOME 48).\n *\n * Compose with `InlineViewSwitcherItem`. Keyboard: ← / → cycle, Home / End jump.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.InlineViewSwitcher.html\n */\nexport const InlineViewSwitcher = ({\n value,\n onValueChange,\n variant = 'default',\n 'aria-label': ariaLabel = 'View switcher',\n children,\n className,\n ...props\n}: InlineViewSwitcherProps) => {\n const groupRef = useRef<HTMLDivElement>(null);\n\n function handleKeyDown(e: KeyboardEvent<HTMLDivElement>) {\n const items = Array.from(\n groupRef.current?.querySelectorAll<HTMLButtonElement>('[role=radio]:not(:disabled)') ?? [],\n );\n const activeElement = document.activeElement;\n const idx = activeElement instanceof HTMLButtonElement ? items.indexOf(activeElement) : -1;\n\n if (idx === -1) {\n return;\n }\n\n let next = idx;\n if (e.key === 'ArrowRight' || e.key === 'ArrowDown') {\n next = (idx + 1) % items.length;\n } else if (e.key === 'ArrowLeft' || e.key === 'ArrowUp') {\n next = (idx - 1 + items.length) % items.length;\n } else if (e.key === 'Home') {\n next = 0;\n } else if (e.key === 'End') {\n next = items.length - 1;\n } else {\n return;\n }\n\n e.preventDefault();\n items[next].focus();\n items[next].click();\n }\n\n return (\n <InlineViewSwitcherContext.Provider value={{ value, onValueChange }}>\n <div\n ref={groupRef}\n role=\"radiogroup\"\n aria-label={ariaLabel}\n onKeyDown={handleKeyDown}\n className={[styles.switcher, styles[variant], className].filter(Boolean).join(' ')}\n {...props}\n >\n {children}\n </div>\n </InlineViewSwitcherContext.Provider>\n );\n};\n"],"mappings":"6GAoBA,IAAM,GAAA,EAAA,EAAA,eAAiF,IAAI,EAG3F,SAAgB,GAAwB,CACtC,IAAM,GAAA,EAAA,EAAA,YAAiB,CAAyB,EAEhD,GAAI,CAAC,EACH,MAAU,MAAM,+DAA+D,EAGjF,OAAO,CACT,CAiCA,IAAa,GAAsB,CACjC,QACA,gBACA,UAAU,UACV,aAAc,EAAY,gBAC1B,WACA,YACA,GAAG,KAC0B,CAC7B,IAAM,GAAA,EAAA,EAAA,QAAkC,IAAI,EAE5C,SAAS,EAAc,EAAkC,CACvD,IAAM,EAAQ,MAAM,KAClB,EAAS,SAAS,iBAAoC,6BAA6B,GAAK,CAAC,CAC3F,EACM,EAAgB,SAAS,cACzB,EAAM,aAAyB,kBAAoB,EAAM,QAAQ,CAAa,EAAI,GAExF,GAAI,IAAQ,GACV,OAGF,IAAI,EAAO,EACX,GAAI,EAAE,MAAQ,cAAgB,EAAE,MAAQ,YACtC,GAAQ,EAAM,GAAK,EAAM,YACpB,GAAI,EAAE,MAAQ,aAAe,EAAE,MAAQ,UAC5C,GAAQ,EAAM,EAAI,EAAM,QAAU,EAAM,YACnC,GAAI,EAAE,MAAQ,OACnB,EAAO,OACF,GAAI,EAAE,MAAQ,MACnB,EAAO,EAAM,OAAS,OAEtB,OAGF,EAAE,eAAe,EACjB,EAAM,GAAM,MAAM,EAClB,EAAM,GAAM,MAAM,CACpB,CAEA,OACE,EAAA,EAAA,KAAC,EAA0B,SAA3B,CAAoC,MAAO,CAAE,QAAO,eAAc,YAChE,EAAA,EAAA,KAAC,MAAD,CACE,IAAK,EACL,KAAK,aACL,aAAY,EACZ,UAAW,EACX,UAAW,CAAC,EAAA,QAAO,SAAU,EAAA,QAAO,GAAU,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,EACjF,GAAI,EAEH,UACE,CAAA,CAC6B,CAAA,CAExC"}
|
|
@@ -33,5 +33,5 @@ export interface InlineViewSwitcherProps extends HTMLAttributes<HTMLDivElement>
|
|
|
33
33
|
*
|
|
34
34
|
* @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.InlineViewSwitcher.html
|
|
35
35
|
*/
|
|
36
|
-
export declare
|
|
36
|
+
export declare const InlineViewSwitcher: ({ value, onValueChange, variant, "aria-label": ariaLabel, children, className, ...props }: InlineViewSwitcherProps) => import("react/jsx-runtime").JSX.Element;
|
|
37
37
|
export {};
|
|
@@ -8,7 +8,7 @@ function o() {
|
|
|
8
8
|
if (!e) throw Error("InlineViewSwitcherItem must be used inside InlineViewSwitcher");
|
|
9
9
|
return e;
|
|
10
10
|
}
|
|
11
|
-
|
|
11
|
+
var s = ({ value: t, onValueChange: n, variant: o = "default", "aria-label": s = "View switcher", children: c, className: l, ...u }) => {
|
|
12
12
|
let d = r(null);
|
|
13
13
|
function f(e) {
|
|
14
14
|
let t = Array.from(d.current?.querySelectorAll("[role=radio]:not(:disabled)") ?? []), n = document.activeElement, r = n instanceof HTMLButtonElement ? t.indexOf(n) : -1;
|
|
@@ -40,7 +40,7 @@ function s({ value: t, onValueChange: n, variant: o = "default", "aria-label": s
|
|
|
40
40
|
children: c
|
|
41
41
|
})
|
|
42
42
|
});
|
|
43
|
-
}
|
|
43
|
+
};
|
|
44
44
|
//#endregion
|
|
45
45
|
export { s as InlineViewSwitcher, o as useInlineViewSwitcher };
|
|
46
46
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InlineViewSwitcher.js","names":[],"sources":["../../../src/components/InlineViewSwitcher/InlineViewSwitcher.tsx"],"sourcesContent":["import {\n createContext,\n type HTMLAttributes,\n type KeyboardEvent,\n type ReactNode,\n useContext,\n useRef,\n} from 'react';\n\nimport styles from './InlineViewSwitcher.module.css';\n\nexport type InlineViewSwitcherVariant = 'default' | 'flat' | 'round' | 'pill';\n\n// ─── Internal context ──────────────────────────────────────────────────────────\n\ninterface InlineViewSwitcherContextValue {\n value: string;\n onValueChange: (value: string) => void;\n}\n\nconst InlineViewSwitcherContext = createContext<InlineViewSwitcherContextValue | null>(null);\n\n// eslint-disable-next-line react-refresh/only-export-components\nexport function useInlineViewSwitcher() {\n const ctx = useContext(InlineViewSwitcherContext);\n\n if (!ctx) {\n throw new Error('InlineViewSwitcherItem must be used inside InlineViewSwitcher');\n }\n\n return ctx;\n}\n\n// ─── InlineViewSwitcher ────────────────────────────────────────────────────────\n\nexport interface InlineViewSwitcherProps extends HTMLAttributes<HTMLDivElement> {\n /** Currently active view name. */\n value: string;\n /** Called with the new value when a view is selected. */\n onValueChange: (value: string) => void;\n /**\n * Visual style of the switcher.\n * - `default` — card background with border and shadow (same as `ToggleGroup`).\n * - `flat` — no background or border; active indicator only.\n * - `round` — pill-shaped container and items.\n * - `pill` — segmented-control style; active item appears lifted, no accent color.\n */\n variant?: InlineViewSwitcherVariant;\n /** Accessible label for the group. */\n 'aria-label'?: string;\n children?: ReactNode;\n}\n\n/**\n * Compact inline view switcher for placing inside content areas, cards, or\n * toolbars — wherever `ViewSwitcher` (header-bar sized) would be too heavy.\n *\n * Built on `ToggleGroup` internals with `flat` and `round` style variants.\n * Mirrors `AdwInlineViewSwitcher` (libadwaita 1.7 / GNOME 48).\n *\n * Compose with `InlineViewSwitcherItem`. Keyboard: ← / → cycle, Home / End jump.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.InlineViewSwitcher.html\n */\nexport
|
|
1
|
+
{"version":3,"file":"InlineViewSwitcher.js","names":[],"sources":["../../../src/components/InlineViewSwitcher/InlineViewSwitcher.tsx"],"sourcesContent":["import {\n createContext,\n type HTMLAttributes,\n type KeyboardEvent,\n type ReactNode,\n useContext,\n useRef,\n} from 'react';\n\nimport styles from './InlineViewSwitcher.module.css';\n\nexport type InlineViewSwitcherVariant = 'default' | 'flat' | 'round' | 'pill';\n\n// ─── Internal context ──────────────────────────────────────────────────────────\n\ninterface InlineViewSwitcherContextValue {\n value: string;\n onValueChange: (value: string) => void;\n}\n\nconst InlineViewSwitcherContext = createContext<InlineViewSwitcherContextValue | null>(null);\n\n// eslint-disable-next-line react-refresh/only-export-components\nexport function useInlineViewSwitcher() {\n const ctx = useContext(InlineViewSwitcherContext);\n\n if (!ctx) {\n throw new Error('InlineViewSwitcherItem must be used inside InlineViewSwitcher');\n }\n\n return ctx;\n}\n\n// ─── InlineViewSwitcher ────────────────────────────────────────────────────────\n\nexport interface InlineViewSwitcherProps extends HTMLAttributes<HTMLDivElement> {\n /** Currently active view name. */\n value: string;\n /** Called with the new value when a view is selected. */\n onValueChange: (value: string) => void;\n /**\n * Visual style of the switcher.\n * - `default` — card background with border and shadow (same as `ToggleGroup`).\n * - `flat` — no background or border; active indicator only.\n * - `round` — pill-shaped container and items.\n * - `pill` — segmented-control style; active item appears lifted, no accent color.\n */\n variant?: InlineViewSwitcherVariant;\n /** Accessible label for the group. */\n 'aria-label'?: string;\n children?: ReactNode;\n}\n\n/**\n * Compact inline view switcher for placing inside content areas, cards, or\n * toolbars — wherever `ViewSwitcher` (header-bar sized) would be too heavy.\n *\n * Built on `ToggleGroup` internals with `flat` and `round` style variants.\n * Mirrors `AdwInlineViewSwitcher` (libadwaita 1.7 / GNOME 48).\n *\n * Compose with `InlineViewSwitcherItem`. Keyboard: ← / → cycle, Home / End jump.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.InlineViewSwitcher.html\n */\nexport const InlineViewSwitcher = ({\n value,\n onValueChange,\n variant = 'default',\n 'aria-label': ariaLabel = 'View switcher',\n children,\n className,\n ...props\n}: InlineViewSwitcherProps) => {\n const groupRef = useRef<HTMLDivElement>(null);\n\n function handleKeyDown(e: KeyboardEvent<HTMLDivElement>) {\n const items = Array.from(\n groupRef.current?.querySelectorAll<HTMLButtonElement>('[role=radio]:not(:disabled)') ?? [],\n );\n const activeElement = document.activeElement;\n const idx = activeElement instanceof HTMLButtonElement ? items.indexOf(activeElement) : -1;\n\n if (idx === -1) {\n return;\n }\n\n let next = idx;\n if (e.key === 'ArrowRight' || e.key === 'ArrowDown') {\n next = (idx + 1) % items.length;\n } else if (e.key === 'ArrowLeft' || e.key === 'ArrowUp') {\n next = (idx - 1 + items.length) % items.length;\n } else if (e.key === 'Home') {\n next = 0;\n } else if (e.key === 'End') {\n next = items.length - 1;\n } else {\n return;\n }\n\n e.preventDefault();\n items[next].focus();\n items[next].click();\n }\n\n return (\n <InlineViewSwitcherContext.Provider value={{ value, onValueChange }}>\n <div\n ref={groupRef}\n role=\"radiogroup\"\n aria-label={ariaLabel}\n onKeyDown={handleKeyDown}\n className={[styles.switcher, styles[variant], className].filter(Boolean).join(' ')}\n {...props}\n >\n {children}\n </div>\n </InlineViewSwitcherContext.Provider>\n );\n};\n"],"mappings":";;;;AAoBA,IAAM,IAA4B,EAAqD,IAAI;AAG3F,SAAgB,IAAwB;CACtC,IAAM,IAAM,EAAW,CAAyB;CAEhD,IAAI,CAAC,GACH,MAAU,MAAM,+DAA+D;CAGjF,OAAO;AACT;AAiCA,IAAa,KAAsB,EACjC,UACA,kBACA,aAAU,WACV,cAAc,IAAY,iBAC1B,aACA,cACA,GAAG,QAC0B;CAC7B,IAAM,IAAW,EAAuB,IAAI;CAE5C,SAAS,EAAc,GAAkC;EACvD,IAAM,IAAQ,MAAM,KAClB,EAAS,SAAS,iBAAoC,6BAA6B,KAAK,CAAC,CAC3F,GACM,IAAgB,SAAS,eACzB,IAAM,aAAyB,oBAAoB,EAAM,QAAQ,CAAa,IAAI;EAExF,IAAI,MAAQ,IACV;EAGF,IAAI,IAAO;EACX,IAAI,EAAE,QAAQ,gBAAgB,EAAE,QAAQ,aACtC,KAAQ,IAAM,KAAK,EAAM;OACpB,IAAI,EAAE,QAAQ,eAAe,EAAE,QAAQ,WAC5C,KAAQ,IAAM,IAAI,EAAM,UAAU,EAAM;OACnC,IAAI,EAAE,QAAQ,QACnB,IAAO;OACF,IAAI,EAAE,QAAQ,OACnB,IAAO,EAAM,SAAS;OAEtB;EAKF,AAFA,EAAE,eAAe,GACjB,EAAM,GAAM,MAAM,GAClB,EAAM,GAAM,MAAM;CACpB;CAEA,OACE,kBAAC,EAA0B,UAA3B;EAAoC,OAAO;GAAE;GAAO;EAAc;YAChE,kBAAC,OAAD;GACE,KAAK;GACL,MAAK;GACL,cAAY;GACZ,WAAW;GACX,WAAW;IAAC,EAAO;IAAU,EAAO;IAAU;GAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;GACjF,GAAI;GAEH;EACE,CAAA;CAC6B,CAAA;AAExC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(
|
|
1
|
+
const e=require("../Icon/Icon.cjs"),t=require("./InlineViewSwitcher.module.css.cjs"),n=require("./InlineViewSwitcher.cjs");let r=require("react/jsx-runtime");var i=({name:i,label:a,icon:o,disabled:s,className:c,...l})=>{let{value:u,onValueChange:d}=n.useInlineViewSwitcher(),f=u===i,p=o&&!a;return(0,r.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":f,tabIndex:f?0:-1,disabled:s,onClick:()=>d(i),className:[t.default.item,f?t.default.active:null,p?t.default.iconOnly:null,c].filter(Boolean).join(` `),...l,children:[o&&(0,r.jsx)(`span`,{className:t.default.itemIcon,children:(0,r.jsx)(e.Icon,{icon:o,size:`md`,"aria-hidden":!0})}),a&&(0,r.jsx)(`span`,{className:t.default.itemLabel,children:a})]})};exports.InlineViewSwitcherItem=i;
|
|
2
2
|
//# sourceMappingURL=InlineViewSwitcherItem.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InlineViewSwitcherItem.cjs","names":[],"sources":["../../../src/components/InlineViewSwitcher/InlineViewSwitcherItem.tsx"],"sourcesContent":["import type { IconDefinition } from '@gnome-ui/icons';\nimport type { ButtonHTMLAttributes } from 'react';\n\nimport { Icon } from '../Icon';\n\nimport { useInlineViewSwitcher } from './InlineViewSwitcher';\nimport styles from './InlineViewSwitcher.module.css';\n\nexport interface InlineViewSwitcherItemProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n /** String identifier — used as the switcher's `value` when this item is active. */\n name: string;\n /** Visible label. */\n label?: string;\n /** Icon from `@gnome-ui/icons`. */\n icon?: IconDefinition;\n}\n\n/**\n * Individual view option inside an `InlineViewSwitcher`.\n *\n * Can be icon-only, label-only, or icon + label. For icon-only items always\n * provide an `aria-label` so screen readers can identify the view.\n */\nexport
|
|
1
|
+
{"version":3,"file":"InlineViewSwitcherItem.cjs","names":[],"sources":["../../../src/components/InlineViewSwitcher/InlineViewSwitcherItem.tsx"],"sourcesContent":["import type { IconDefinition } from '@gnome-ui/icons';\nimport type { ButtonHTMLAttributes } from 'react';\n\nimport { Icon } from '../Icon';\n\nimport { useInlineViewSwitcher } from './InlineViewSwitcher';\nimport styles from './InlineViewSwitcher.module.css';\n\nexport interface InlineViewSwitcherItemProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n /** String identifier — used as the switcher's `value` when this item is active. */\n name: string;\n /** Visible label. */\n label?: string;\n /** Icon from `@gnome-ui/icons`. */\n icon?: IconDefinition;\n}\n\n/**\n * Individual view option inside an `InlineViewSwitcher`.\n *\n * Can be icon-only, label-only, or icon + label. For icon-only items always\n * provide an `aria-label` so screen readers can identify the view.\n */\nexport const InlineViewSwitcherItem = ({\n name,\n label,\n icon,\n disabled,\n className,\n ...props\n}: InlineViewSwitcherItemProps) => {\n const { value, onValueChange } = useInlineViewSwitcher();\n const active = value === name;\n const iconOnly = icon && !label;\n\n return (\n <button\n type=\"button\"\n role=\"radio\"\n aria-checked={active}\n tabIndex={active ? 0 : -1}\n disabled={disabled}\n onClick={() => onValueChange(name)}\n className={[\n styles.item,\n active ? styles.active : null,\n iconOnly ? styles.iconOnly : null,\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n >\n {icon && (\n <span className={styles.itemIcon}>\n <Icon icon={icon} size=\"md\" aria-hidden />\n </span>\n )}\n {label && <span className={styles.itemLabel}>{label}</span>}\n </button>\n );\n};\n"],"mappings":"8JAuBA,IAAa,GAA0B,CACrC,OACA,QACA,OACA,WACA,YACA,GAAG,KAC8B,CACjC,GAAM,CAAE,QAAO,iBAAkB,EAAA,sBAAsB,EACjD,EAAS,IAAU,EACnB,EAAW,GAAQ,CAAC,EAE1B,OACE,EAAA,EAAA,MAAC,SAAD,CACE,KAAK,SACL,KAAK,QACL,eAAc,EACd,SAAU,EAAS,EAAI,GACb,WACV,YAAe,EAAc,CAAI,EACjC,UAAW,CACT,EAAA,QAAO,KACP,EAAS,EAAA,QAAO,OAAS,KACzB,EAAW,EAAA,QAAO,SAAW,KAC7B,CACF,EACG,OAAO,OAAO,EACd,KAAK,GAAG,EACX,GAAI,WAfN,CAiBG,IACC,EAAA,EAAA,KAAC,OAAD,CAAM,UAAW,EAAA,QAAO,mBACtB,EAAA,EAAA,KAAC,EAAA,KAAD,CAAY,OAAM,KAAK,KAAK,cAAA,EAAa,CAAA,CACrC,CAAA,EAEP,IAAS,EAAA,EAAA,KAAC,OAAD,CAAM,UAAW,EAAA,QAAO,mBAAY,CAAY,CAAA,CACpD,GAEZ"}
|
|
@@ -14,4 +14,4 @@ export interface InlineViewSwitcherItemProps extends ButtonHTMLAttributes<HTMLBu
|
|
|
14
14
|
* Can be icon-only, label-only, or icon + label. For icon-only items always
|
|
15
15
|
* provide an `aria-label` so screen readers can identify the view.
|
|
16
16
|
*/
|
|
17
|
-
export declare
|
|
17
|
+
export declare const InlineViewSwitcherItem: ({ name, label, icon, disabled, className, ...props }: InlineViewSwitcherItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,7 +3,7 @@ import t from "./InlineViewSwitcher.module.css.js";
|
|
|
3
3
|
import { useInlineViewSwitcher as n } from "./InlineViewSwitcher.js";
|
|
4
4
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/InlineViewSwitcher/InlineViewSwitcherItem.tsx
|
|
6
|
-
|
|
6
|
+
var a = ({ name: a, label: o, icon: s, disabled: c, className: l, ...u }) => {
|
|
7
7
|
let { value: d, onValueChange: f } = n(), p = d === a, m = s && !o;
|
|
8
8
|
return /* @__PURE__ */ i("button", {
|
|
9
9
|
type: "button",
|
|
@@ -31,7 +31,7 @@ function a({ name: a, label: o, icon: s, disabled: c, className: l, ...u }) {
|
|
|
31
31
|
children: o
|
|
32
32
|
})]
|
|
33
33
|
});
|
|
34
|
-
}
|
|
34
|
+
};
|
|
35
35
|
//#endregion
|
|
36
36
|
export { a as InlineViewSwitcherItem };
|
|
37
37
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InlineViewSwitcherItem.js","names":[],"sources":["../../../src/components/InlineViewSwitcher/InlineViewSwitcherItem.tsx"],"sourcesContent":["import type { IconDefinition } from '@gnome-ui/icons';\nimport type { ButtonHTMLAttributes } from 'react';\n\nimport { Icon } from '../Icon';\n\nimport { useInlineViewSwitcher } from './InlineViewSwitcher';\nimport styles from './InlineViewSwitcher.module.css';\n\nexport interface InlineViewSwitcherItemProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n /** String identifier — used as the switcher's `value` when this item is active. */\n name: string;\n /** Visible label. */\n label?: string;\n /** Icon from `@gnome-ui/icons`. */\n icon?: IconDefinition;\n}\n\n/**\n * Individual view option inside an `InlineViewSwitcher`.\n *\n * Can be icon-only, label-only, or icon + label. For icon-only items always\n * provide an `aria-label` so screen readers can identify the view.\n */\nexport
|
|
1
|
+
{"version":3,"file":"InlineViewSwitcherItem.js","names":[],"sources":["../../../src/components/InlineViewSwitcher/InlineViewSwitcherItem.tsx"],"sourcesContent":["import type { IconDefinition } from '@gnome-ui/icons';\nimport type { ButtonHTMLAttributes } from 'react';\n\nimport { Icon } from '../Icon';\n\nimport { useInlineViewSwitcher } from './InlineViewSwitcher';\nimport styles from './InlineViewSwitcher.module.css';\n\nexport interface InlineViewSwitcherItemProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n /** String identifier — used as the switcher's `value` when this item is active. */\n name: string;\n /** Visible label. */\n label?: string;\n /** Icon from `@gnome-ui/icons`. */\n icon?: IconDefinition;\n}\n\n/**\n * Individual view option inside an `InlineViewSwitcher`.\n *\n * Can be icon-only, label-only, or icon + label. For icon-only items always\n * provide an `aria-label` so screen readers can identify the view.\n */\nexport const InlineViewSwitcherItem = ({\n name,\n label,\n icon,\n disabled,\n className,\n ...props\n}: InlineViewSwitcherItemProps) => {\n const { value, onValueChange } = useInlineViewSwitcher();\n const active = value === name;\n const iconOnly = icon && !label;\n\n return (\n <button\n type=\"button\"\n role=\"radio\"\n aria-checked={active}\n tabIndex={active ? 0 : -1}\n disabled={disabled}\n onClick={() => onValueChange(name)}\n className={[\n styles.item,\n active ? styles.active : null,\n iconOnly ? styles.iconOnly : null,\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n >\n {icon && (\n <span className={styles.itemIcon}>\n <Icon icon={icon} size=\"md\" aria-hidden />\n </span>\n )}\n {label && <span className={styles.itemLabel}>{label}</span>}\n </button>\n );\n};\n"],"mappings":";;;;;AAuBA,IAAa,KAA0B,EACrC,SACA,UACA,SACA,aACA,cACA,GAAG,QAC8B;CACjC,IAAM,EAAE,UAAO,qBAAkB,EAAsB,GACjD,IAAS,MAAU,GACnB,IAAW,KAAQ,CAAC;CAE1B,OACE,kBAAC,UAAD;EACE,MAAK;EACL,MAAK;EACL,gBAAc;EACd,UAAU,IAAS,IAAI;EACb;EACV,eAAe,EAAc,CAAI;EACjC,WAAW;GACT,EAAO;GACP,IAAS,EAAO,SAAS;GACzB,IAAW,EAAO,WAAW;GAC7B;EACF,EACG,OAAO,OAAO,EACd,KAAK,GAAG;EACX,GAAI;YAfN,CAiBG,KACC,kBAAC,QAAD;GAAM,WAAW,EAAO;aACtB,kBAAC,GAAD;IAAY;IAAM,MAAK;IAAK,eAAA;GAAa,CAAA;EACrC,CAAA,GAEP,KAAS,kBAAC,QAAD;GAAM,WAAW,EAAO;aAAY;EAAY,CAAA,CACpD;;AAEZ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./InlineViewSwitcher/InlineViewSwitcher.cjs"),t=require("./InlineViewSwitcher/InlineViewSwitcherItem.cjs");exports.InlineViewSwitcher=e.InlineViewSwitcher,exports.InlineViewSwitcherItem=t.InlineViewSwitcherItem;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(
|
|
1
|
+
const e=require("./Link.module.css.cjs");let t=require("react/jsx-runtime");var n=({external:n=!1,children:r,className:i,target:a,rel:o,...s})=>{let c=n||a===`_blank`;return(0,t.jsxs)(`a`,{className:[e.default.link,i].filter(Boolean).join(` `),target:c?`_blank`:a,rel:c?`noopener noreferrer`:o,...s,children:[r,c&&(0,t.jsx)(`span`,{className:e.default.externalIcon,"aria-label":`(opens in new tab)`,children:`↗`})]})};exports.Link=n;
|
|
2
2
|
//# sourceMappingURL=Link.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.cjs","names":[],"sources":["../../../src/components/Link/Link.tsx"],"sourcesContent":["import type { AnchorHTMLAttributes, ReactNode } from 'react';\n\nimport styles from './Link.module.css';\n\nexport interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {\n /**\n * When true the link is treated as external: opens in a new tab,\n * adds `rel=\"noopener noreferrer\"`, and shows a trailing ↗ icon.\n */\n external?: boolean;\n children?: ReactNode;\n}\n\n/**\n * Inline hyperlink following GNOME HIG.\n *\n * - Uses the accent colour and shows an underline on hover.\n * - `external` opens a new tab safely and appends a visual ↗ indicator.\n *\n * @see https://developer.gnome.org/hig/patterns/controls/links.html\n */\nexport
|
|
1
|
+
{"version":3,"file":"Link.cjs","names":[],"sources":["../../../src/components/Link/Link.tsx"],"sourcesContent":["import type { AnchorHTMLAttributes, ReactNode } from 'react';\n\nimport styles from './Link.module.css';\n\nexport interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {\n /**\n * When true the link is treated as external: opens in a new tab,\n * adds `rel=\"noopener noreferrer\"`, and shows a trailing ↗ icon.\n */\n external?: boolean;\n children?: ReactNode;\n}\n\n/**\n * Inline hyperlink following GNOME HIG.\n *\n * - Uses the accent colour and shows an underline on hover.\n * - `external` opens a new tab safely and appends a visual ↗ indicator.\n *\n * @see https://developer.gnome.org/hig/patterns/controls/links.html\n */\nexport const Link = ({\n external = false,\n children,\n className,\n target,\n rel,\n ...props\n}: LinkProps) => {\n const isExternal = external || target === '_blank';\n\n return (\n <a\n className={[styles.link, className].filter(Boolean).join(' ')}\n target={isExternal ? '_blank' : target}\n rel={isExternal ? 'noopener noreferrer' : rel}\n {...props}\n >\n {children}\n {isExternal && (\n <span className={styles.externalIcon} aria-label=\"(opens in new tab)\">\n ↗\n </span>\n )}\n </a>\n );\n};\n"],"mappings":"4EAqBA,IAAa,GAAQ,CACnB,WAAW,GACX,WACA,YACA,SACA,MACA,GAAG,KACY,CACf,IAAM,EAAa,GAAY,IAAW,SAE1C,OACE,EAAA,EAAA,MAAC,IAAD,CACE,UAAW,CAAC,EAAA,QAAO,KAAM,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,EAC5D,OAAQ,EAAa,SAAW,EAChC,IAAK,EAAa,sBAAwB,EAC1C,GAAI,WAJN,CAMG,EACA,IACC,EAAA,EAAA,KAAC,OAAD,CAAM,UAAW,EAAA,QAAO,aAAc,aAAW,8BAAqB,GAEhE,CAAA,CAEP,GAEP"}
|
|
@@ -15,4 +15,4 @@ export interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
|
15
15
|
*
|
|
16
16
|
* @see https://developer.gnome.org/hig/patterns/controls/links.html
|
|
17
17
|
*/
|
|
18
|
-
export declare
|
|
18
|
+
export declare const Link: ({ external, children, className, target, rel, ...props }: LinkProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e from "./Link.module.css.js";
|
|
2
2
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
3
|
//#region src/components/Link/Link.tsx
|
|
4
|
-
|
|
4
|
+
var r = ({ external: r = !1, children: i, className: a, target: o, rel: s, ...c }) => {
|
|
5
5
|
let l = r || o === "_blank";
|
|
6
6
|
return /* @__PURE__ */ n("a", {
|
|
7
7
|
className: [e.link, a].filter(Boolean).join(" "),
|
|
@@ -14,7 +14,7 @@ function r({ external: r = !1, children: i, className: a, target: o, rel: s, ...
|
|
|
14
14
|
children: "↗"
|
|
15
15
|
})]
|
|
16
16
|
});
|
|
17
|
-
}
|
|
17
|
+
};
|
|
18
18
|
//#endregion
|
|
19
19
|
export { r as Link };
|
|
20
20
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.js","names":[],"sources":["../../../src/components/Link/Link.tsx"],"sourcesContent":["import type { AnchorHTMLAttributes, ReactNode } from 'react';\n\nimport styles from './Link.module.css';\n\nexport interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {\n /**\n * When true the link is treated as external: opens in a new tab,\n * adds `rel=\"noopener noreferrer\"`, and shows a trailing ↗ icon.\n */\n external?: boolean;\n children?: ReactNode;\n}\n\n/**\n * Inline hyperlink following GNOME HIG.\n *\n * - Uses the accent colour and shows an underline on hover.\n * - `external` opens a new tab safely and appends a visual ↗ indicator.\n *\n * @see https://developer.gnome.org/hig/patterns/controls/links.html\n */\nexport
|
|
1
|
+
{"version":3,"file":"Link.js","names":[],"sources":["../../../src/components/Link/Link.tsx"],"sourcesContent":["import type { AnchorHTMLAttributes, ReactNode } from 'react';\n\nimport styles from './Link.module.css';\n\nexport interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {\n /**\n * When true the link is treated as external: opens in a new tab,\n * adds `rel=\"noopener noreferrer\"`, and shows a trailing ↗ icon.\n */\n external?: boolean;\n children?: ReactNode;\n}\n\n/**\n * Inline hyperlink following GNOME HIG.\n *\n * - Uses the accent colour and shows an underline on hover.\n * - `external` opens a new tab safely and appends a visual ↗ indicator.\n *\n * @see https://developer.gnome.org/hig/patterns/controls/links.html\n */\nexport const Link = ({\n external = false,\n children,\n className,\n target,\n rel,\n ...props\n}: LinkProps) => {\n const isExternal = external || target === '_blank';\n\n return (\n <a\n className={[styles.link, className].filter(Boolean).join(' ')}\n target={isExternal ? '_blank' : target}\n rel={isExternal ? 'noopener noreferrer' : rel}\n {...props}\n >\n {children}\n {isExternal && (\n <span className={styles.externalIcon} aria-label=\"(opens in new tab)\">\n ↗\n </span>\n )}\n </a>\n );\n};\n"],"mappings":";;;AAqBA,IAAa,KAAQ,EACnB,cAAW,IACX,aACA,cACA,WACA,QACA,GAAG,QACY;CACf,IAAM,IAAa,KAAY,MAAW;CAE1C,OACE,kBAAC,KAAD;EACE,WAAW,CAAC,EAAO,MAAM,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;EAC5D,QAAQ,IAAa,WAAW;EAChC,KAAK,IAAa,wBAAwB;EAC1C,GAAI;YAJN,CAMG,GACA,KACC,kBAAC,QAAD;GAAM,WAAW,EAAO;GAAc,cAAW;aAAqB;EAEhE,CAAA,CAEP;;AAEP"}
|
package/dist/components/Link.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./Link/Link.cjs");exports.Link=e.Link;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(
|
|
1
|
+
const e=require("./LinkedGroup.module.css.cjs");let t=require("react/jsx-runtime");var n=({children:n,vertical:r=!1,className:i,...a})=>(0,t.jsx)(`div`,{className:[e.default.linked,r?e.default.vertical:null,i].filter(Boolean).join(` `),...a,children:n});exports.LinkedGroup=n;
|
|
2
2
|
//# sourceMappingURL=LinkedGroup.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkedGroup.cjs","names":[],"sources":["../../../src/components/LinkedGroup/LinkedGroup.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\n\nimport styles from './LinkedGroup.module.css';\n\nexport interface LinkedGroupProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode;\n /**\n * Stack children vertically instead of horizontally.\n * Useful for stacked input or button groups.\n */\n vertical?: boolean;\n}\n\n/**\n * Renders children as a single visually-connected unit with no gap and\n * merged borders — the canonical GNOME pattern for button groups and\n * segmented inputs.\n *\n * Mirrors the libadwaita `.linked` style class.\n *\n * - First child gets left (or top) border radius.\n * - Last child gets right (or bottom) border radius.\n * - Adjacent borders are collapsed to a single pixel.\n * - Hover and focus bring the active child to the front via `z-index`.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/1-latest/style-classes.html#linked-style-class\n *\n * @example\n * <LinkedGroup>\n * <Button>Cut</Button>\n * <Button>Copy</Button>\n * <Button>Paste</Button>\n * </LinkedGroup>\n */\nexport
|
|
1
|
+
{"version":3,"file":"LinkedGroup.cjs","names":[],"sources":["../../../src/components/LinkedGroup/LinkedGroup.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\n\nimport styles from './LinkedGroup.module.css';\n\nexport interface LinkedGroupProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode;\n /**\n * Stack children vertically instead of horizontally.\n * Useful for stacked input or button groups.\n */\n vertical?: boolean;\n}\n\n/**\n * Renders children as a single visually-connected unit with no gap and\n * merged borders — the canonical GNOME pattern for button groups and\n * segmented inputs.\n *\n * Mirrors the libadwaita `.linked` style class.\n *\n * - First child gets left (or top) border radius.\n * - Last child gets right (or bottom) border radius.\n * - Adjacent borders are collapsed to a single pixel.\n * - Hover and focus bring the active child to the front via `z-index`.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/1-latest/style-classes.html#linked-style-class\n *\n * @example\n * <LinkedGroup>\n * <Button>Cut</Button>\n * <Button>Copy</Button>\n * <Button>Paste</Button>\n * </LinkedGroup>\n */\nexport const LinkedGroup = ({\n children,\n vertical = false,\n className,\n ...props\n}: LinkedGroupProps) => {\n const classes = [styles.linked, vertical ? styles.vertical : null, className]\n .filter(Boolean)\n .join(' ');\n\n return (\n <div className={classes} {...props}>\n {children}\n </div>\n );\n};\n"],"mappings":"mFAkCA,IAAa,GAAe,CAC1B,WACA,WAAW,GACX,YACA,GAAG,MAOD,EAAA,EAAA,KAAC,MAAD,CAAK,UALS,CAAC,EAAA,QAAO,OAAQ,EAAW,EAAA,QAAO,SAAW,KAAM,CAAS,EACzE,OAAO,OAAO,EACd,KAAK,GAGU,EAAS,GAAI,EAC1B,UACE,CAAA"}
|
|
@@ -28,4 +28,4 @@ export interface LinkedGroupProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
28
28
|
* <Button>Paste</Button>
|
|
29
29
|
* </LinkedGroup>
|
|
30
30
|
*/
|
|
31
|
-
export declare
|
|
31
|
+
export declare const LinkedGroup: ({ children, vertical, className, ...props }: LinkedGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import e from "./LinkedGroup.module.css.js";
|
|
2
2
|
import { jsx as t } from "react/jsx-runtime";
|
|
3
3
|
//#region src/components/LinkedGroup/LinkedGroup.tsx
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
});
|
|
14
|
-
}
|
|
4
|
+
var n = ({ children: n, vertical: r = !1, className: i, ...a }) => /* @__PURE__ */ t("div", {
|
|
5
|
+
className: [
|
|
6
|
+
e.linked,
|
|
7
|
+
r ? e.vertical : null,
|
|
8
|
+
i
|
|
9
|
+
].filter(Boolean).join(" "),
|
|
10
|
+
...a,
|
|
11
|
+
children: n
|
|
12
|
+
});
|
|
15
13
|
//#endregion
|
|
16
14
|
export { n as LinkedGroup };
|
|
17
15
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkedGroup.js","names":[],"sources":["../../../src/components/LinkedGroup/LinkedGroup.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\n\nimport styles from './LinkedGroup.module.css';\n\nexport interface LinkedGroupProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode;\n /**\n * Stack children vertically instead of horizontally.\n * Useful for stacked input or button groups.\n */\n vertical?: boolean;\n}\n\n/**\n * Renders children as a single visually-connected unit with no gap and\n * merged borders — the canonical GNOME pattern for button groups and\n * segmented inputs.\n *\n * Mirrors the libadwaita `.linked` style class.\n *\n * - First child gets left (or top) border radius.\n * - Last child gets right (or bottom) border radius.\n * - Adjacent borders are collapsed to a single pixel.\n * - Hover and focus bring the active child to the front via `z-index`.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/1-latest/style-classes.html#linked-style-class\n *\n * @example\n * <LinkedGroup>\n * <Button>Cut</Button>\n * <Button>Copy</Button>\n * <Button>Paste</Button>\n * </LinkedGroup>\n */\nexport
|
|
1
|
+
{"version":3,"file":"LinkedGroup.js","names":[],"sources":["../../../src/components/LinkedGroup/LinkedGroup.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\n\nimport styles from './LinkedGroup.module.css';\n\nexport interface LinkedGroupProps extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode;\n /**\n * Stack children vertically instead of horizontally.\n * Useful for stacked input or button groups.\n */\n vertical?: boolean;\n}\n\n/**\n * Renders children as a single visually-connected unit with no gap and\n * merged borders — the canonical GNOME pattern for button groups and\n * segmented inputs.\n *\n * Mirrors the libadwaita `.linked` style class.\n *\n * - First child gets left (or top) border radius.\n * - Last child gets right (or bottom) border radius.\n * - Adjacent borders are collapsed to a single pixel.\n * - Hover and focus bring the active child to the front via `z-index`.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/1-latest/style-classes.html#linked-style-class\n *\n * @example\n * <LinkedGroup>\n * <Button>Cut</Button>\n * <Button>Copy</Button>\n * <Button>Paste</Button>\n * </LinkedGroup>\n */\nexport const LinkedGroup = ({\n children,\n vertical = false,\n className,\n ...props\n}: LinkedGroupProps) => {\n const classes = [styles.linked, vertical ? styles.vertical : null, className]\n .filter(Boolean)\n .join(' ');\n\n return (\n <div className={classes} {...props}>\n {children}\n </div>\n );\n};\n"],"mappings":";;;AAkCA,IAAa,KAAe,EAC1B,aACA,cAAW,IACX,cACA,GAAG,QAOD,kBAAC,OAAD;CAAK,WALS;EAAC,EAAO;EAAQ,IAAW,EAAO,WAAW;EAAM;CAAS,EACzE,OAAO,OAAO,EACd,KAAK,GAGU;CAAS,GAAI;CAC1B;AACE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./LinkedGroup/LinkedGroup.cjs");exports.LinkedGroup=e.LinkedGroup;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(
|
|
1
|
+
const e=require("../../hooks/useBreakpoint.cjs"),t=require("./NavigationSplitView.module.css.cjs");let n=require("react/jsx-runtime");var r=({sidebar:r,content:i,showContent:a=!1,minSidebarWidth:o=180,maxSidebarWidth:s=280,sidebarWidthFraction:c=.25,className:l,style:u,...d})=>{let{isNarrow:f}=e.useBreakpoint(),p=`clamp(${o}px, ${c*100}%, ${s}px)`;return(0,n.jsxs)(`div`,{className:[t.default.root,f?t.default.collapsed:t.default.expanded,l].filter(Boolean).join(` `),style:{"--sidebar-width":p,...u},...d,children:[(0,n.jsx)(`div`,{className:[t.default.sidebar,f&&a?t.default.paneHidden:t.default.paneVisible].filter(Boolean).join(` `),"aria-hidden":f&&a,children:r}),!f&&(0,n.jsx)(`div`,{className:t.default.divider,"aria-hidden":`true`}),(0,n.jsx)(`div`,{className:[t.default.contentPane,f&&!a?t.default.paneHidden:t.default.paneVisible].filter(Boolean).join(` `),"aria-hidden":f&&!a,children:i})]})};exports.NavigationSplitView=r;
|
|
2
2
|
//# sourceMappingURL=NavigationSplitView.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationSplitView.cjs","names":[],"sources":["../../../src/components/NavigationSplitView/NavigationSplitView.tsx"],"sourcesContent":["import type { CSSProperties, HTMLAttributes, ReactNode } from 'react';\n\nimport { useBreakpoint } from '../../hooks/useBreakpoint';\n\nimport styles from './NavigationSplitView.module.css';\n\nexport interface NavigationSplitViewProps extends Omit<HTMLAttributes<HTMLDivElement>, 'content'> {\n /**\n * The sidebar / list pane (left side on wide screens).\n * On narrow screens this is the \"list\" view shown when `showContent` is false.\n */\n sidebar: ReactNode;\n /**\n * The detail / content pane (right side on wide screens).\n * On narrow screens this is the \"detail\" view shown when `showContent` is true.\n */\n content: ReactNode;\n /**\n * Controls which pane is visible on narrow screens (≤ 400 px).\n * - `false` (default) — show the sidebar list.\n * - `true` — show the content detail.\n *\n * Has no effect on wide screens where both panes are visible simultaneously.\n */\n showContent?: boolean;\n /**\n * Minimum sidebar width in px. Defaults to `180`.\n */\n minSidebarWidth?: number;\n /**\n * Maximum sidebar width in px. Defaults to `280`.\n */\n maxSidebarWidth?: number;\n /**\n * Fraction of total width given to the sidebar (0–1). Defaults to `0.25`.\n */\n sidebarWidthFraction?: number;\n}\n\n/**\n * Two-pane sidebar + content layout following the Adwaita\n * `AdwNavigationSplitView` pattern.\n *\n * On **wide** screens (> 400 px) both panes are visible side-by-side.\n * On **narrow** screens (≤ 400 px) only one pane is shown at a time;\n * use `showContent` to switch between the sidebar list and the detail view.\n *\n * The sidebar width is constrained between `minSidebarWidth` and\n * `maxSidebarWidth`, gravitating toward `sidebarWidthFraction` of the total.\n *\n * @example\n * const [showContent, setShowContent] = useState(false);\n * <NavigationSplitView\n * showContent={showContent}\n * sidebar={<MailList onSelect={() => setShowContent(true)} />}\n * content={<MailDetail onBack={() => setShowContent(false)} />}\n * />\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.NavigationSplitView.html\n */\nexport
|
|
1
|
+
{"version":3,"file":"NavigationSplitView.cjs","names":[],"sources":["../../../src/components/NavigationSplitView/NavigationSplitView.tsx"],"sourcesContent":["import type { CSSProperties, HTMLAttributes, ReactNode } from 'react';\n\nimport { useBreakpoint } from '../../hooks/useBreakpoint';\n\nimport styles from './NavigationSplitView.module.css';\n\nexport interface NavigationSplitViewProps extends Omit<HTMLAttributes<HTMLDivElement>, 'content'> {\n /**\n * The sidebar / list pane (left side on wide screens).\n * On narrow screens this is the \"list\" view shown when `showContent` is false.\n */\n sidebar: ReactNode;\n /**\n * The detail / content pane (right side on wide screens).\n * On narrow screens this is the \"detail\" view shown when `showContent` is true.\n */\n content: ReactNode;\n /**\n * Controls which pane is visible on narrow screens (≤ 400 px).\n * - `false` (default) — show the sidebar list.\n * - `true` — show the content detail.\n *\n * Has no effect on wide screens where both panes are visible simultaneously.\n */\n showContent?: boolean;\n /**\n * Minimum sidebar width in px. Defaults to `180`.\n */\n minSidebarWidth?: number;\n /**\n * Maximum sidebar width in px. Defaults to `280`.\n */\n maxSidebarWidth?: number;\n /**\n * Fraction of total width given to the sidebar (0–1). Defaults to `0.25`.\n */\n sidebarWidthFraction?: number;\n}\n\n/**\n * Two-pane sidebar + content layout following the Adwaita\n * `AdwNavigationSplitView` pattern.\n *\n * On **wide** screens (> 400 px) both panes are visible side-by-side.\n * On **narrow** screens (≤ 400 px) only one pane is shown at a time;\n * use `showContent` to switch between the sidebar list and the detail view.\n *\n * The sidebar width is constrained between `minSidebarWidth` and\n * `maxSidebarWidth`, gravitating toward `sidebarWidthFraction` of the total.\n *\n * @example\n * const [showContent, setShowContent] = useState(false);\n * <NavigationSplitView\n * showContent={showContent}\n * sidebar={<MailList onSelect={() => setShowContent(true)} />}\n * content={<MailDetail onBack={() => setShowContent(false)} />}\n * />\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.NavigationSplitView.html\n */\nexport const NavigationSplitView = ({\n sidebar,\n content,\n showContent = false,\n minSidebarWidth = 180,\n maxSidebarWidth = 280,\n sidebarWidthFraction = 0.25,\n className,\n style,\n ...props\n}: NavigationSplitViewProps) => {\n const { isNarrow } = useBreakpoint();\n\n // CSS custom property drives the sidebar width clamp\n const sidebarWidth = `clamp(${minSidebarWidth}px, ${sidebarWidthFraction * 100}%, ${maxSidebarWidth}px)`;\n\n return (\n <div\n className={[styles.root, isNarrow ? styles.collapsed : styles.expanded, className]\n .filter(Boolean)\n .join(' ')}\n style={{ '--sidebar-width': sidebarWidth, ...style } as CSSProperties}\n {...props}\n >\n {/* Sidebar pane */}\n <div\n className={[\n styles.sidebar,\n isNarrow && showContent ? styles.paneHidden : styles.paneVisible,\n ]\n .filter(Boolean)\n .join(' ')}\n aria-hidden={isNarrow && showContent}\n >\n {sidebar}\n </div>\n\n {/* Separator — only on wide screens */}\n {!isNarrow && <div className={styles.divider} aria-hidden=\"true\" />}\n\n {/* Content pane */}\n <div\n className={[\n styles.contentPane,\n isNarrow && !showContent ? styles.paneHidden : styles.paneVisible,\n ]\n .filter(Boolean)\n .join(' ')}\n aria-hidden={isNarrow && !showContent}\n >\n {content}\n </div>\n </div>\n );\n};\n"],"mappings":"sIA4DA,IAAa,GAAuB,CAClC,UACA,UACA,cAAc,GACd,kBAAkB,IAClB,kBAAkB,IAClB,uBAAuB,IACvB,YACA,QACA,GAAG,KAC2B,CAC9B,GAAM,CAAE,YAAa,EAAA,cAAc,EAG7B,EAAe,SAAS,EAAgB,MAAM,EAAuB,IAAI,KAAK,EAAgB,KAEpG,OACE,EAAA,EAAA,MAAC,MAAD,CACE,UAAW,CAAC,EAAA,QAAO,KAAM,EAAW,EAAA,QAAO,UAAY,EAAA,QAAO,SAAU,CAAS,EAC9E,OAAO,OAAO,EACd,KAAK,GAAG,EACX,MAAO,CAAE,kBAAmB,EAAc,GAAG,CAAM,EACnD,GAAI,WALN,EAQE,EAAA,EAAA,KAAC,MAAD,CACE,UAAW,CACT,EAAA,QAAO,QACP,GAAY,EAAc,EAAA,QAAO,WAAa,EAAA,QAAO,WACvD,EACG,OAAO,OAAO,EACd,KAAK,GAAG,EACX,cAAa,GAAY,WAExB,CACE,CAAA,EAGJ,CAAC,IAAY,EAAA,EAAA,KAAC,MAAD,CAAK,UAAW,EAAA,QAAO,QAAS,cAAY,MAAQ,CAAA,GAGlE,EAAA,EAAA,KAAC,MAAD,CACE,UAAW,CACT,EAAA,QAAO,YACP,GAAY,CAAC,EAAc,EAAA,QAAO,WAAa,EAAA,QAAO,WACxD,EACG,OAAO,OAAO,EACd,KAAK,GAAG,EACX,cAAa,GAAY,CAAC,WAEzB,CACE,CAAA,CACF,GAET"}
|
|
@@ -52,4 +52,4 @@ export interface NavigationSplitViewProps extends Omit<HTMLAttributes<HTMLDivEle
|
|
|
52
52
|
*
|
|
53
53
|
* @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.NavigationSplitView.html
|
|
54
54
|
*/
|
|
55
|
-
export declare
|
|
55
|
+
export declare const NavigationSplitView: ({ sidebar, content, showContent, minSidebarWidth, maxSidebarWidth, sidebarWidthFraction, className, style, ...props }: NavigationSplitViewProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,7 +2,7 @@ import { useBreakpoint as e } from "../../hooks/useBreakpoint.js";
|
|
|
2
2
|
import t from "./NavigationSplitView.module.css.js";
|
|
3
3
|
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/NavigationSplitView/NavigationSplitView.tsx
|
|
5
|
-
|
|
5
|
+
var i = ({ sidebar: i, content: a, showContent: o = !1, minSidebarWidth: s = 180, maxSidebarWidth: c = 280, sidebarWidthFraction: l = .25, className: u, style: d, ...f }) => {
|
|
6
6
|
let { isNarrow: p } = e(), m = `clamp(${s}px, ${l * 100}%, ${c}px)`;
|
|
7
7
|
return /* @__PURE__ */ r("div", {
|
|
8
8
|
className: [
|
|
@@ -32,7 +32,7 @@ function i({ sidebar: i, content: a, showContent: o = !1, minSidebarWidth: s = 1
|
|
|
32
32
|
})
|
|
33
33
|
]
|
|
34
34
|
});
|
|
35
|
-
}
|
|
35
|
+
};
|
|
36
36
|
//#endregion
|
|
37
37
|
export { i as NavigationSplitView };
|
|
38
38
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationSplitView.js","names":[],"sources":["../../../src/components/NavigationSplitView/NavigationSplitView.tsx"],"sourcesContent":["import type { CSSProperties, HTMLAttributes, ReactNode } from 'react';\n\nimport { useBreakpoint } from '../../hooks/useBreakpoint';\n\nimport styles from './NavigationSplitView.module.css';\n\nexport interface NavigationSplitViewProps extends Omit<HTMLAttributes<HTMLDivElement>, 'content'> {\n /**\n * The sidebar / list pane (left side on wide screens).\n * On narrow screens this is the \"list\" view shown when `showContent` is false.\n */\n sidebar: ReactNode;\n /**\n * The detail / content pane (right side on wide screens).\n * On narrow screens this is the \"detail\" view shown when `showContent` is true.\n */\n content: ReactNode;\n /**\n * Controls which pane is visible on narrow screens (≤ 400 px).\n * - `false` (default) — show the sidebar list.\n * - `true` — show the content detail.\n *\n * Has no effect on wide screens where both panes are visible simultaneously.\n */\n showContent?: boolean;\n /**\n * Minimum sidebar width in px. Defaults to `180`.\n */\n minSidebarWidth?: number;\n /**\n * Maximum sidebar width in px. Defaults to `280`.\n */\n maxSidebarWidth?: number;\n /**\n * Fraction of total width given to the sidebar (0–1). Defaults to `0.25`.\n */\n sidebarWidthFraction?: number;\n}\n\n/**\n * Two-pane sidebar + content layout following the Adwaita\n * `AdwNavigationSplitView` pattern.\n *\n * On **wide** screens (> 400 px) both panes are visible side-by-side.\n * On **narrow** screens (≤ 400 px) only one pane is shown at a time;\n * use `showContent` to switch between the sidebar list and the detail view.\n *\n * The sidebar width is constrained between `minSidebarWidth` and\n * `maxSidebarWidth`, gravitating toward `sidebarWidthFraction` of the total.\n *\n * @example\n * const [showContent, setShowContent] = useState(false);\n * <NavigationSplitView\n * showContent={showContent}\n * sidebar={<MailList onSelect={() => setShowContent(true)} />}\n * content={<MailDetail onBack={() => setShowContent(false)} />}\n * />\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.NavigationSplitView.html\n */\nexport
|
|
1
|
+
{"version":3,"file":"NavigationSplitView.js","names":[],"sources":["../../../src/components/NavigationSplitView/NavigationSplitView.tsx"],"sourcesContent":["import type { CSSProperties, HTMLAttributes, ReactNode } from 'react';\n\nimport { useBreakpoint } from '../../hooks/useBreakpoint';\n\nimport styles from './NavigationSplitView.module.css';\n\nexport interface NavigationSplitViewProps extends Omit<HTMLAttributes<HTMLDivElement>, 'content'> {\n /**\n * The sidebar / list pane (left side on wide screens).\n * On narrow screens this is the \"list\" view shown when `showContent` is false.\n */\n sidebar: ReactNode;\n /**\n * The detail / content pane (right side on wide screens).\n * On narrow screens this is the \"detail\" view shown when `showContent` is true.\n */\n content: ReactNode;\n /**\n * Controls which pane is visible on narrow screens (≤ 400 px).\n * - `false` (default) — show the sidebar list.\n * - `true` — show the content detail.\n *\n * Has no effect on wide screens where both panes are visible simultaneously.\n */\n showContent?: boolean;\n /**\n * Minimum sidebar width in px. Defaults to `180`.\n */\n minSidebarWidth?: number;\n /**\n * Maximum sidebar width in px. Defaults to `280`.\n */\n maxSidebarWidth?: number;\n /**\n * Fraction of total width given to the sidebar (0–1). Defaults to `0.25`.\n */\n sidebarWidthFraction?: number;\n}\n\n/**\n * Two-pane sidebar + content layout following the Adwaita\n * `AdwNavigationSplitView` pattern.\n *\n * On **wide** screens (> 400 px) both panes are visible side-by-side.\n * On **narrow** screens (≤ 400 px) only one pane is shown at a time;\n * use `showContent` to switch between the sidebar list and the detail view.\n *\n * The sidebar width is constrained between `minSidebarWidth` and\n * `maxSidebarWidth`, gravitating toward `sidebarWidthFraction` of the total.\n *\n * @example\n * const [showContent, setShowContent] = useState(false);\n * <NavigationSplitView\n * showContent={showContent}\n * sidebar={<MailList onSelect={() => setShowContent(true)} />}\n * content={<MailDetail onBack={() => setShowContent(false)} />}\n * />\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.NavigationSplitView.html\n */\nexport const NavigationSplitView = ({\n sidebar,\n content,\n showContent = false,\n minSidebarWidth = 180,\n maxSidebarWidth = 280,\n sidebarWidthFraction = 0.25,\n className,\n style,\n ...props\n}: NavigationSplitViewProps) => {\n const { isNarrow } = useBreakpoint();\n\n // CSS custom property drives the sidebar width clamp\n const sidebarWidth = `clamp(${minSidebarWidth}px, ${sidebarWidthFraction * 100}%, ${maxSidebarWidth}px)`;\n\n return (\n <div\n className={[styles.root, isNarrow ? styles.collapsed : styles.expanded, className]\n .filter(Boolean)\n .join(' ')}\n style={{ '--sidebar-width': sidebarWidth, ...style } as CSSProperties}\n {...props}\n >\n {/* Sidebar pane */}\n <div\n className={[\n styles.sidebar,\n isNarrow && showContent ? styles.paneHidden : styles.paneVisible,\n ]\n .filter(Boolean)\n .join(' ')}\n aria-hidden={isNarrow && showContent}\n >\n {sidebar}\n </div>\n\n {/* Separator — only on wide screens */}\n {!isNarrow && <div className={styles.divider} aria-hidden=\"true\" />}\n\n {/* Content pane */}\n <div\n className={[\n styles.contentPane,\n isNarrow && !showContent ? styles.paneHidden : styles.paneVisible,\n ]\n .filter(Boolean)\n .join(' ')}\n aria-hidden={isNarrow && !showContent}\n >\n {content}\n </div>\n </div>\n );\n};\n"],"mappings":";;;;AA4DA,IAAa,KAAuB,EAClC,YACA,YACA,iBAAc,IACd,qBAAkB,KAClB,qBAAkB,KAClB,0BAAuB,KACvB,cACA,UACA,GAAG,QAC2B;CAC9B,IAAM,EAAE,gBAAa,EAAc,GAG7B,IAAe,SAAS,EAAgB,MAAM,IAAuB,IAAI,KAAK,EAAgB;CAEpG,OACE,kBAAC,OAAD;EACE,WAAW;GAAC,EAAO;GAAM,IAAW,EAAO,YAAY,EAAO;GAAU;EAAS,EAC9E,OAAO,OAAO,EACd,KAAK,GAAG;EACX,OAAO;GAAE,mBAAmB;GAAc,GAAG;EAAM;EACnD,GAAI;YALN;GAQE,kBAAC,OAAD;IACE,WAAW,CACT,EAAO,SACP,KAAY,IAAc,EAAO,aAAa,EAAO,WACvD,EACG,OAAO,OAAO,EACd,KAAK,GAAG;IACX,eAAa,KAAY;cAExB;GACE,CAAA;GAGJ,CAAC,KAAY,kBAAC,OAAD;IAAK,WAAW,EAAO;IAAS,eAAY;GAAQ,CAAA;GAGlE,kBAAC,OAAD;IACE,WAAW,CACT,EAAO,aACP,KAAY,CAAC,IAAc,EAAO,aAAa,EAAO,WACxD,EACG,OAAO,OAAO,EACd,KAAK,GAAG;IACX,eAAa,KAAY,CAAC;cAEzB;GACE,CAAA;EACF;;AAET"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./NavigationSplitView/NavigationSplitView.cjs");exports.NavigationSplitView=e.NavigationSplitView;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(
|
|
1
|
+
const e=require("./NavigationView.module.css.cjs");let t=require("react"),n=require("react/jsx-runtime");var r=(0,t.createContext)({navigate:()=>{},pop:()=>{},canGoBack:!1,currentTag:``,direction:`forward`});function i(){return(0,t.useContext)(r)}var a=({tag:i,title:a,children:o,className:s,...c})=>{let{currentTag:l,direction:u}=(0,t.useContext)(r);return l===i?(0,n.jsxs)(`div`,{className:[e.default.page,u===`forward`?e.default.enterForward:e.default.enterBack,s].filter(Boolean).join(` `),...c,children:[(0,n.jsx)(`div`,{className:e.default.pageHeader,children:(0,n.jsx)(`span`,{className:e.default.pageTitle,children:a})}),(0,n.jsx)(`div`,{className:e.default.pageContent,children:o})]}):null},o=({initialPage:i,children:a,className:o,...s})=>{let[c,l]=(0,t.useState)([i]),u=c[c.length-1],d=c.length>1,[f,p]=(0,t.useState)(`forward`);return(0,n.jsx)(r.Provider,{value:{navigate:e=>{p(`forward`),l(t=>[...t,e])},pop:()=>{c.length<=1||(p(`back`),l(e=>e.slice(0,-1)))},canGoBack:d,currentTag:u,direction:f},children:(0,n.jsx)(`div`,{className:[e.default.view,o].filter(Boolean).join(` `),...s,children:a})})};exports.NavigationPage=a,exports.NavigationView=o,exports.useNavigation=i;
|
|
2
2
|
//# sourceMappingURL=NavigationView.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationView.cjs","names":[],"sources":["../../../src/components/NavigationView/NavigationView.tsx"],"sourcesContent":["import { createContext, type HTMLAttributes, type ReactNode, useContext, useState } from 'react';\n\nimport styles from './NavigationView.module.css';\n\n// ─── Context ─────────────────────────────────────────────────────────────────\n\ninterface NavigationContextValue {\n /** Navigate to a page by its `tag`. Pushes onto the stack. */\n navigate: (tag: string) => void;\n /** Go back one page. No-op if already at the root. */\n pop: () => void;\n /** `true` when there is at least one page to go back to. */\n canGoBack: boolean;\n /** Tag of the currently visible page. */\n currentTag: string;\n /** Direction of the last transition (`\"forward\"` or `\"back\"`). */\n direction: 'forward' | 'back';\n}\n\nconst NavigationContext = createContext<NavigationContextValue>({\n navigate: () => {},\n pop: () => {},\n canGoBack: false,\n currentTag: '',\n direction: 'forward',\n});\n\n/** Access the nearest `NavigationView`'s navigation functions. */\n// eslint-disable-next-line react-refresh/only-export-components\nexport function useNavigation() {\n return useContext(NavigationContext);\n}\n\n// ─── NavigationPage ───────────────────────────────────────────────────────────\n\nexport interface NavigationPageProps extends HTMLAttributes<HTMLDivElement> {\n /** Unique identifier used with `navigate()`. */\n tag: string;\n /** Page heading shown in a `HeaderBar`-style title bar. */\n title: string;\n children?: ReactNode;\n}\n\n/**\n * A single page inside a `NavigationView`.\n * Only visible when its `tag` matches the current page in the stack.\n */\nexport
|
|
1
|
+
{"version":3,"file":"NavigationView.cjs","names":[],"sources":["../../../src/components/NavigationView/NavigationView.tsx"],"sourcesContent":["import { createContext, type HTMLAttributes, type ReactNode, useContext, useState } from 'react';\n\nimport styles from './NavigationView.module.css';\n\n// ─── Context ─────────────────────────────────────────────────────────────────\n\ninterface NavigationContextValue {\n /** Navigate to a page by its `tag`. Pushes onto the stack. */\n navigate: (tag: string) => void;\n /** Go back one page. No-op if already at the root. */\n pop: () => void;\n /** `true` when there is at least one page to go back to. */\n canGoBack: boolean;\n /** Tag of the currently visible page. */\n currentTag: string;\n /** Direction of the last transition (`\"forward\"` or `\"back\"`). */\n direction: 'forward' | 'back';\n}\n\nconst NavigationContext = createContext<NavigationContextValue>({\n navigate: () => {},\n pop: () => {},\n canGoBack: false,\n currentTag: '',\n direction: 'forward',\n});\n\n/** Access the nearest `NavigationView`'s navigation functions. */\n// eslint-disable-next-line react-refresh/only-export-components\nexport function useNavigation() {\n return useContext(NavigationContext);\n}\n\n// ─── NavigationPage ───────────────────────────────────────────────────────────\n\nexport interface NavigationPageProps extends HTMLAttributes<HTMLDivElement> {\n /** Unique identifier used with `navigate()`. */\n tag: string;\n /** Page heading shown in a `HeaderBar`-style title bar. */\n title: string;\n children?: ReactNode;\n}\n\n/**\n * A single page inside a `NavigationView`.\n * Only visible when its `tag` matches the current page in the stack.\n */\nexport const NavigationPage = ({\n tag,\n title,\n children,\n className,\n ...props\n}: NavigationPageProps) => {\n const { currentTag, direction } = useContext(NavigationContext);\n\n if (currentTag !== tag) {\n return null;\n }\n\n return (\n <div\n className={[\n styles.page,\n direction === 'forward' ? styles.enterForward : styles.enterBack,\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n >\n <div className={styles.pageHeader}>\n <span className={styles.pageTitle}>{title}</span>\n </div>\n <div className={styles.pageContent}>{children}</div>\n </div>\n );\n};\n\n// ─── NavigationView ───────────────────────────────────────────────────────────\n\nexport interface NavigationViewProps extends HTMLAttributes<HTMLDivElement> {\n /** Tag of the first page to show. */\n initialPage: string;\n children?: ReactNode;\n}\n\n/**\n * Single-pane push/pop navigation stack.\n *\n * Mirrors `AdwNavigationView` — the mobile-first counterpart to\n * `NavigationSplitView`. Each \"screen\" is a `NavigationPage` with a unique\n * `tag`. Use `useNavigation()` inside pages to call `navigate(tag)` and `pop()`.\n *\n * @example\n * ```tsx\n * <NavigationView initialPage=\"home\">\n * <NavigationPage tag=\"home\" title=\"Home\">\n * <Button onClick={() => navigate(\"details\")}>Open</Button>\n * </NavigationPage>\n * <NavigationPage tag=\"details\" title=\"Details\">\n * <Button onClick={pop}>Back</Button>\n * </NavigationPage>\n * </NavigationView>\n * ```\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.NavigationView.html\n */\nexport const NavigationView = ({\n initialPage,\n children,\n className,\n ...props\n}: NavigationViewProps) => {\n const [stack, setStack] = useState<string[]>([initialPage]);\n\n const currentTag = stack[stack.length - 1];\n const canGoBack = stack.length > 1;\n const [direction, setDirection] = useState<'forward' | 'back'>('forward');\n\n const navigate = (tag: string) => {\n setDirection('forward');\n setStack((s) => [...s, tag]);\n };\n\n const pop = () => {\n if (stack.length <= 1) {\n return;\n }\n\n setDirection('back');\n setStack((s) => s.slice(0, -1));\n };\n\n return (\n <NavigationContext.Provider value={{ navigate, pop, canGoBack, currentTag, direction }}>\n <div className={[styles.view, className].filter(Boolean).join(' ')} {...props}>\n {children}\n </div>\n </NavigationContext.Provider>\n );\n};\n"],"mappings":"yGAmBA,IAAM,GAAA,EAAA,EAAA,eAA0D,CAC9D,aAAgB,CAAC,EACjB,QAAW,CAAC,EACZ,UAAW,GACX,WAAY,GACZ,UAAW,SACb,CAAC,EAID,SAAgB,GAAgB,CAC9B,OAAA,EAAA,EAAA,YAAkB,CAAiB,CACrC,CAgBA,IAAa,GAAkB,CAC7B,MACA,QACA,WACA,YACA,GAAG,KACsB,CACzB,GAAM,CAAE,aAAY,cAAA,EAAA,EAAA,YAAyB,CAAiB,EAM9D,OAJI,IAAe,GAKjB,EAAA,EAAA,MAAC,MAAD,CACE,UAAW,CACT,EAAA,QAAO,KACP,IAAc,UAAY,EAAA,QAAO,aAAe,EAAA,QAAO,UACvD,CACF,EACG,OAAO,OAAO,EACd,KAAK,GAAG,EACX,GAAI,WARN,EAUE,EAAA,EAAA,KAAC,MAAD,CAAK,UAAW,EAAA,QAAO,qBACrB,EAAA,EAAA,KAAC,OAAD,CAAM,UAAW,EAAA,QAAO,mBAAY,CAAY,CAAA,CAC7C,CAAA,GACL,EAAA,EAAA,KAAC,MAAD,CAAK,UAAW,EAAA,QAAO,YAAc,UAAc,CAAA,CAChD,IAlBE,IAoBX,EA+Ba,GAAkB,CAC7B,cACA,WACA,YACA,GAAG,KACsB,CACzB,GAAM,CAAC,EAAO,IAAA,EAAA,EAAA,UAA+B,CAAC,CAAW,CAAC,EAEpD,EAAa,EAAM,EAAM,OAAS,GAClC,EAAY,EAAM,OAAS,EAC3B,CAAC,EAAW,IAAA,EAAA,EAAA,UAA6C,SAAS,EAgBxE,OACE,EAAA,EAAA,KAAC,EAAkB,SAAnB,CAA4B,MAAO,CAAE,SAfrB,GAAgB,CAChC,EAAa,SAAS,EACtB,EAAU,GAAM,CAAC,GAAG,EAAG,CAAG,CAAC,CAC7B,EAYiD,QAV/B,CACZ,EAAM,QAAU,IAIpB,EAAa,MAAM,EACnB,EAAU,GAAM,EAAE,MAAM,EAAG,EAAE,CAAC,EAChC,EAGsD,YAAW,aAAY,WAAU,YACnF,EAAA,EAAA,KAAC,MAAD,CAAK,UAAW,CAAC,EAAA,QAAO,KAAM,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,EAAG,GAAI,EACrE,UACE,CAAA,CACqB,CAAA,CAEhC"}
|
|
@@ -24,7 +24,7 @@ export interface NavigationPageProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
24
24
|
* A single page inside a `NavigationView`.
|
|
25
25
|
* Only visible when its `tag` matches the current page in the stack.
|
|
26
26
|
*/
|
|
27
|
-
export declare
|
|
27
|
+
export declare const NavigationPage: ({ tag, title, children, className, ...props }: NavigationPageProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
28
28
|
export interface NavigationViewProps extends HTMLAttributes<HTMLDivElement> {
|
|
29
29
|
/** Tag of the first page to show. */
|
|
30
30
|
initialPage: string;
|
|
@@ -51,5 +51,5 @@ export interface NavigationViewProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
51
51
|
*
|
|
52
52
|
* @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.NavigationView.html
|
|
53
53
|
*/
|
|
54
|
-
export declare
|
|
54
|
+
export declare const NavigationView: ({ initialPage, children, className, ...props }: NavigationViewProps) => import("react/jsx-runtime").JSX.Element;
|
|
55
55
|
export {};
|
|
@@ -12,7 +12,7 @@ var o = t({
|
|
|
12
12
|
function s() {
|
|
13
13
|
return n(o);
|
|
14
14
|
}
|
|
15
|
-
|
|
15
|
+
var c = ({ tag: t, title: r, children: s, className: c, ...l }) => {
|
|
16
16
|
let { currentTag: u, direction: d } = n(o);
|
|
17
17
|
return u === t ? /* @__PURE__ */ a("div", {
|
|
18
18
|
className: [
|
|
@@ -32,8 +32,7 @@ function c({ tag: t, title: r, children: s, className: c, ...l }) {
|
|
|
32
32
|
children: s
|
|
33
33
|
})]
|
|
34
34
|
}) : null;
|
|
35
|
-
}
|
|
36
|
-
function l({ initialPage: t, children: n, className: a, ...s }) {
|
|
35
|
+
}, l = ({ initialPage: t, children: n, className: a, ...s }) => {
|
|
37
36
|
let [c, l] = r([t]), u = c[c.length - 1], d = c.length > 1, [f, p] = r("forward");
|
|
38
37
|
return /* @__PURE__ */ i(o.Provider, {
|
|
39
38
|
value: {
|
|
@@ -53,7 +52,7 @@ function l({ initialPage: t, children: n, className: a, ...s }) {
|
|
|
53
52
|
children: n
|
|
54
53
|
})
|
|
55
54
|
});
|
|
56
|
-
}
|
|
55
|
+
};
|
|
57
56
|
//#endregion
|
|
58
57
|
export { c as NavigationPage, l as NavigationView, s as useNavigation };
|
|
59
58
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationView.js","names":[],"sources":["../../../src/components/NavigationView/NavigationView.tsx"],"sourcesContent":["import { createContext, type HTMLAttributes, type ReactNode, useContext, useState } from 'react';\n\nimport styles from './NavigationView.module.css';\n\n// ─── Context ─────────────────────────────────────────────────────────────────\n\ninterface NavigationContextValue {\n /** Navigate to a page by its `tag`. Pushes onto the stack. */\n navigate: (tag: string) => void;\n /** Go back one page. No-op if already at the root. */\n pop: () => void;\n /** `true` when there is at least one page to go back to. */\n canGoBack: boolean;\n /** Tag of the currently visible page. */\n currentTag: string;\n /** Direction of the last transition (`\"forward\"` or `\"back\"`). */\n direction: 'forward' | 'back';\n}\n\nconst NavigationContext = createContext<NavigationContextValue>({\n navigate: () => {},\n pop: () => {},\n canGoBack: false,\n currentTag: '',\n direction: 'forward',\n});\n\n/** Access the nearest `NavigationView`'s navigation functions. */\n// eslint-disable-next-line react-refresh/only-export-components\nexport function useNavigation() {\n return useContext(NavigationContext);\n}\n\n// ─── NavigationPage ───────────────────────────────────────────────────────────\n\nexport interface NavigationPageProps extends HTMLAttributes<HTMLDivElement> {\n /** Unique identifier used with `navigate()`. */\n tag: string;\n /** Page heading shown in a `HeaderBar`-style title bar. */\n title: string;\n children?: ReactNode;\n}\n\n/**\n * A single page inside a `NavigationView`.\n * Only visible when its `tag` matches the current page in the stack.\n */\nexport
|
|
1
|
+
{"version":3,"file":"NavigationView.js","names":[],"sources":["../../../src/components/NavigationView/NavigationView.tsx"],"sourcesContent":["import { createContext, type HTMLAttributes, type ReactNode, useContext, useState } from 'react';\n\nimport styles from './NavigationView.module.css';\n\n// ─── Context ─────────────────────────────────────────────────────────────────\n\ninterface NavigationContextValue {\n /** Navigate to a page by its `tag`. Pushes onto the stack. */\n navigate: (tag: string) => void;\n /** Go back one page. No-op if already at the root. */\n pop: () => void;\n /** `true` when there is at least one page to go back to. */\n canGoBack: boolean;\n /** Tag of the currently visible page. */\n currentTag: string;\n /** Direction of the last transition (`\"forward\"` or `\"back\"`). */\n direction: 'forward' | 'back';\n}\n\nconst NavigationContext = createContext<NavigationContextValue>({\n navigate: () => {},\n pop: () => {},\n canGoBack: false,\n currentTag: '',\n direction: 'forward',\n});\n\n/** Access the nearest `NavigationView`'s navigation functions. */\n// eslint-disable-next-line react-refresh/only-export-components\nexport function useNavigation() {\n return useContext(NavigationContext);\n}\n\n// ─── NavigationPage ───────────────────────────────────────────────────────────\n\nexport interface NavigationPageProps extends HTMLAttributes<HTMLDivElement> {\n /** Unique identifier used with `navigate()`. */\n tag: string;\n /** Page heading shown in a `HeaderBar`-style title bar. */\n title: string;\n children?: ReactNode;\n}\n\n/**\n * A single page inside a `NavigationView`.\n * Only visible when its `tag` matches the current page in the stack.\n */\nexport const NavigationPage = ({\n tag,\n title,\n children,\n className,\n ...props\n}: NavigationPageProps) => {\n const { currentTag, direction } = useContext(NavigationContext);\n\n if (currentTag !== tag) {\n return null;\n }\n\n return (\n <div\n className={[\n styles.page,\n direction === 'forward' ? styles.enterForward : styles.enterBack,\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n >\n <div className={styles.pageHeader}>\n <span className={styles.pageTitle}>{title}</span>\n </div>\n <div className={styles.pageContent}>{children}</div>\n </div>\n );\n};\n\n// ─── NavigationView ───────────────────────────────────────────────────────────\n\nexport interface NavigationViewProps extends HTMLAttributes<HTMLDivElement> {\n /** Tag of the first page to show. */\n initialPage: string;\n children?: ReactNode;\n}\n\n/**\n * Single-pane push/pop navigation stack.\n *\n * Mirrors `AdwNavigationView` — the mobile-first counterpart to\n * `NavigationSplitView`. Each \"screen\" is a `NavigationPage` with a unique\n * `tag`. Use `useNavigation()` inside pages to call `navigate(tag)` and `pop()`.\n *\n * @example\n * ```tsx\n * <NavigationView initialPage=\"home\">\n * <NavigationPage tag=\"home\" title=\"Home\">\n * <Button onClick={() => navigate(\"details\")}>Open</Button>\n * </NavigationPage>\n * <NavigationPage tag=\"details\" title=\"Details\">\n * <Button onClick={pop}>Back</Button>\n * </NavigationPage>\n * </NavigationView>\n * ```\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.NavigationView.html\n */\nexport const NavigationView = ({\n initialPage,\n children,\n className,\n ...props\n}: NavigationViewProps) => {\n const [stack, setStack] = useState<string[]>([initialPage]);\n\n const currentTag = stack[stack.length - 1];\n const canGoBack = stack.length > 1;\n const [direction, setDirection] = useState<'forward' | 'back'>('forward');\n\n const navigate = (tag: string) => {\n setDirection('forward');\n setStack((s) => [...s, tag]);\n };\n\n const pop = () => {\n if (stack.length <= 1) {\n return;\n }\n\n setDirection('back');\n setStack((s) => s.slice(0, -1));\n };\n\n return (\n <NavigationContext.Provider value={{ navigate, pop, canGoBack, currentTag, direction }}>\n <div className={[styles.view, className].filter(Boolean).join(' ')} {...props}>\n {children}\n </div>\n </NavigationContext.Provider>\n );\n};\n"],"mappings":";;;;AAmBA,IAAM,IAAoB,EAAsC;CAC9D,gBAAgB,CAAC;CACjB,WAAW,CAAC;CACZ,WAAW;CACX,YAAY;CACZ,WAAW;AACb,CAAC;AAID,SAAgB,IAAgB;CAC9B,OAAO,EAAW,CAAiB;AACrC;AAgBA,IAAa,KAAkB,EAC7B,QACA,UACA,aACA,cACA,GAAG,QACsB;CACzB,IAAM,EAAE,eAAY,iBAAc,EAAW,CAAiB;CAM9D,OAJI,MAAe,IAKjB,kBAAC,OAAD;EACE,WAAW;GACT,EAAO;GACP,MAAc,YAAY,EAAO,eAAe,EAAO;GACvD;EACF,EACG,OAAO,OAAO,EACd,KAAK,GAAG;EACX,GAAI;YARN,CAUE,kBAAC,OAAD;GAAK,WAAW,EAAO;aACrB,kBAAC,QAAD;IAAM,WAAW,EAAO;cAAY;GAAY,CAAA;EAC7C,CAAA,GACL,kBAAC,OAAD;GAAK,WAAW,EAAO;GAAc;EAAc,CAAA,CAChD;MAlBE;AAoBX,GA+Ba,KAAkB,EAC7B,gBACA,aACA,cACA,GAAG,QACsB;CACzB,IAAM,CAAC,GAAO,KAAY,EAAmB,CAAC,CAAW,CAAC,GAEpD,IAAa,EAAM,EAAM,SAAS,IAClC,IAAY,EAAM,SAAS,GAC3B,CAAC,GAAW,KAAgB,EAA6B,SAAS;CAgBxE,OACE,kBAAC,EAAkB,UAAnB;EAA4B,OAAO;GAAE,WAfrB,MAAgB;IAEhC,AADA,EAAa,SAAS,GACtB,GAAU,MAAM,CAAC,GAAG,GAAG,CAAG,CAAC;GAC7B;GAYiD,WAV/B;IACZ,EAAM,UAAU,MAIpB,EAAa,MAAM,GACnB,GAAU,MAAM,EAAE,MAAM,GAAG,EAAE,CAAC;GAChC;GAGsD;GAAW;GAAY;EAAU;YACnF,kBAAC,OAAD;GAAK,WAAW,CAAC,EAAO,MAAM,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;GAAG,GAAI;GACrE;EACE,CAAA;CACqB,CAAA;AAEhC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e
|
|
1
|
+
var e={view:`_view_18zs8_3`,page:`_page_18zs8_12`,pageHeader:`_pageHeader_18zs8_23`,pageTitle:`_pageTitle_18zs8_34`,pageContent:`_pageContent_18zs8_43`,enterForward:`_enterForward_18zs8_52`,"slide-in-right":`_slide-in-right_18zs8_1`,enterBack:`_enterBack_18zs8_57`,"slide-in-left":`_slide-in-left_18zs8_1`};exports.default=e;
|
|
2
2
|
//# sourceMappingURL=NavigationView.module.css.cjs.map
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
enterForward: a,
|
|
1
|
+
var e = {
|
|
2
|
+
view: "_view_18zs8_3",
|
|
3
|
+
page: "_page_18zs8_12",
|
|
4
|
+
pageHeader: "_pageHeader_18zs8_23",
|
|
5
|
+
pageTitle: "_pageTitle_18zs8_34",
|
|
6
|
+
pageContent: "_pageContent_18zs8_43",
|
|
7
|
+
enterForward: "_enterForward_18zs8_52",
|
|
9
8
|
"slide-in-right": "_slide-in-right_18zs8_1",
|
|
10
|
-
enterBack:
|
|
9
|
+
enterBack: "_enterBack_18zs8_57",
|
|
11
10
|
"slide-in-left": "_slide-in-left_18zs8_1"
|
|
12
11
|
};
|
|
13
12
|
//#endregion
|
|
14
|
-
export {
|
|
13
|
+
export { e as default };
|
|
15
14
|
|
|
16
15
|
//# sourceMappingURL=NavigationView.module.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./NavigationView/NavigationView.cjs");exports.NavigationPage=e.NavigationPage,exports.NavigationView=e.NavigationView,exports.useNavigation=e.useNavigation;
|