@gnome-ui/react 1.45.1 → 1.45.2
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 +2 -3
- 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 +2 -3
- 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 +2 -2
- 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.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 +2 -2
- 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 +2 -2
- 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 +2 -3
- 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
|
@@ -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;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(
|
|
1
|
+
const e=require("../../hooks/useBreakpoint.cjs"),t=require("./OverlaySplitView.module.css.cjs");let n=require("react"),r=require("react/jsx-runtime");var i=({sidebar:i,content:a,showSidebar:o=!1,onClose:s,collapsed:c=!1,sidebarPosition:l=`start`,minSidebarWidth:u=180,maxSidebarWidth:d=280,sidebarWidthFraction:f=.25,className:p,style:m,...h})=>{let{isNarrow:g}=e.useBreakpoint(),_=(0,n.useRef)(null),v=`clamp(${u}px, ${f*100}%, ${d}px)`;(0,n.useEffect)(()=>{if(!g||!o)return;let e=e=>{e.key===`Escape`&&s?.()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[g,o,s]),(0,n.useEffect)(()=>{!g||!o||(_.current?.querySelector(`button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])`))?.focus()},[g,o]);let y=l===`end`;return(0,n.useEffect)(()=>{if(!g||!o)return;let e=_.current;if(!e)return;let t=0,n=e=>{t=e.touches[0].clientX},r=e=>{let n=e.changedTouches[0].clientX-t;(y?n>80:n<-80)&&s?.()};return e.addEventListener(`touchstart`,n,{passive:!0}),e.addEventListener(`touchend`,r,{passive:!0}),()=>{e.removeEventListener(`touchstart`,n),e.removeEventListener(`touchend`,r)}},[g,o,y,s]),(0,r.jsxs)(`div`,{className:[t.default.root,g?t.default.narrow:t.default.wide,!g&&c?t.default.collapsed:null,y?t.default.end:t.default.start,p].filter(Boolean).join(` `),style:{"--sidebar-width":v,...m},...h,children:[g&&(0,r.jsx)(`div`,{className:[t.default.backdrop,o?t.default.backdropVisible:null].filter(Boolean).join(` `),"aria-hidden":`true`,onClick:s}),(0,r.jsx)(`div`,{ref:_,className:[t.default.sidebar,g?o?t.default.sidebarOpen:t.default.sidebarClosed:null].filter(Boolean).join(` `),"aria-hidden":g&&!o,children:i}),(0,r.jsx)(`div`,{className:t.default.content,children:a})]})};exports.OverlaySplitView=i;
|
|
2
2
|
//# sourceMappingURL=OverlaySplitView.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OverlaySplitView.cjs","names":[],"sources":["../../../src/components/OverlaySplitView/OverlaySplitView.tsx"],"sourcesContent":["import { type CSSProperties, type HTMLAttributes, type ReactNode, useEffect, useRef } from 'react';\n\nimport { useBreakpoint } from '../../hooks/useBreakpoint';\n\nimport styles from './OverlaySplitView.module.css';\n\nexport interface OverlaySplitViewProps extends Omit<HTMLAttributes<HTMLDivElement>, 'content'> {\n /**\n * The sidebar pane.\n * On wide screens it sits beside the content.\n * On narrow screens it slides over the content as an overlay.\n */\n sidebar: ReactNode;\n /** The main content pane — always visible. */\n content: ReactNode;\n /**\n * Whether the sidebar is shown.\n * - Wide screens: always both visible; this prop is ignored.\n * - Narrow screens (≤ 400 px): controls whether the overlay is open.\n */\n showSidebar?: boolean;\n /**\n * Called when the user clicks the backdrop (narrow screens only).\n * Use this to set `showSidebar` to false.\n */\n onClose?: () => void;\n /**\n * When `true`, collapses the sidebar to icon-only width on wide screens.\n * Has no effect in narrow (overlay) mode.\n * Pair with `collapsed` on the inner `<Sidebar>` component to hide labels.\n */\n collapsed?: boolean;\n /**\n * Which side the sidebar appears on. Defaults to `\"start\"` (left in LTR).\n */\n sidebarPosition?: 'start' | 'end';\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. Defaults to `0.25`.\n */\n sidebarWidthFraction?: number;\n}\n\n/**\n * Sidebar + content layout where the sidebar becomes a slide-over overlay\n * on narrow screens, mirroring the Adwaita `AdwOverlaySplitView` pattern.\n *\n * On **wide** screens (> 400 px) sidebar and content are side-by-side.\n * On **narrow** screens (≤ 400 px) the content fills the full width and\n * the sidebar slides in as an overlay when `showSidebar` is true,\n * with a translucent backdrop behind it.\n *\n * @example\n * const [open, setOpen] = useState(false);\n * <OverlaySplitView\n * showSidebar={open}\n * onClose={() => setOpen(false)}\n * sidebar={<Nav />}\n * content={<MainContent onMenuClick={() => setOpen(true)} />}\n * />\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.OverlaySplitView.html\n */\nexport
|
|
1
|
+
{"version":3,"file":"OverlaySplitView.cjs","names":[],"sources":["../../../src/components/OverlaySplitView/OverlaySplitView.tsx"],"sourcesContent":["import { type CSSProperties, type HTMLAttributes, type ReactNode, useEffect, useRef } from 'react';\n\nimport { useBreakpoint } from '../../hooks/useBreakpoint';\n\nimport styles from './OverlaySplitView.module.css';\n\nexport interface OverlaySplitViewProps extends Omit<HTMLAttributes<HTMLDivElement>, 'content'> {\n /**\n * The sidebar pane.\n * On wide screens it sits beside the content.\n * On narrow screens it slides over the content as an overlay.\n */\n sidebar: ReactNode;\n /** The main content pane — always visible. */\n content: ReactNode;\n /**\n * Whether the sidebar is shown.\n * - Wide screens: always both visible; this prop is ignored.\n * - Narrow screens (≤ 400 px): controls whether the overlay is open.\n */\n showSidebar?: boolean;\n /**\n * Called when the user clicks the backdrop (narrow screens only).\n * Use this to set `showSidebar` to false.\n */\n onClose?: () => void;\n /**\n * When `true`, collapses the sidebar to icon-only width on wide screens.\n * Has no effect in narrow (overlay) mode.\n * Pair with `collapsed` on the inner `<Sidebar>` component to hide labels.\n */\n collapsed?: boolean;\n /**\n * Which side the sidebar appears on. Defaults to `\"start\"` (left in LTR).\n */\n sidebarPosition?: 'start' | 'end';\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. Defaults to `0.25`.\n */\n sidebarWidthFraction?: number;\n}\n\n/**\n * Sidebar + content layout where the sidebar becomes a slide-over overlay\n * on narrow screens, mirroring the Adwaita `AdwOverlaySplitView` pattern.\n *\n * On **wide** screens (> 400 px) sidebar and content are side-by-side.\n * On **narrow** screens (≤ 400 px) the content fills the full width and\n * the sidebar slides in as an overlay when `showSidebar` is true,\n * with a translucent backdrop behind it.\n *\n * @example\n * const [open, setOpen] = useState(false);\n * <OverlaySplitView\n * showSidebar={open}\n * onClose={() => setOpen(false)}\n * sidebar={<Nav />}\n * content={<MainContent onMenuClick={() => setOpen(true)} />}\n * />\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.OverlaySplitView.html\n */\nexport const OverlaySplitView = ({\n sidebar,\n content,\n showSidebar = false,\n onClose,\n collapsed = false,\n sidebarPosition = 'start',\n minSidebarWidth = 180,\n maxSidebarWidth = 280,\n sidebarWidthFraction = 0.25,\n className,\n style,\n ...props\n}: OverlaySplitViewProps) => {\n const { isNarrow } = useBreakpoint();\n const sidebarRef = useRef<HTMLDivElement>(null);\n\n const sidebarWidth = `clamp(${minSidebarWidth}px, ${sidebarWidthFraction * 100}%, ${maxSidebarWidth}px)`;\n\n // Close on Escape in overlay mode\n useEffect(() => {\n if (!isNarrow || !showSidebar) {\n return;\n }\n\n const handler = (e: KeyboardEvent) => {\n if (e.key === 'Escape') {\n onClose?.();\n }\n };\n\n document.addEventListener('keydown', handler);\n\n return () => document.removeEventListener('keydown', handler);\n }, [isNarrow, showSidebar, onClose]);\n\n // Trap focus inside sidebar when open in overlay mode\n useEffect(() => {\n if (!isNarrow || !showSidebar) {\n return;\n }\n\n const first = sidebarRef.current?.querySelector<HTMLElement>(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])',\n );\n\n first?.focus();\n }, [isNarrow, showSidebar]);\n\n const isEnd = sidebarPosition === 'end';\n\n // Swipe-to-dismiss: drag the sidebar in the close direction to trigger onClose\n useEffect(() => {\n if (!isNarrow || !showSidebar) {\n return;\n }\n\n const el = sidebarRef.current;\n\n if (!el) {\n return;\n }\n\n let startX = 0;\n const THRESHOLD = 80;\n\n const onTouchStart = (e: TouchEvent) => {\n startX = e.touches[0].clientX;\n };\n const onTouchEnd = (e: TouchEvent) => {\n const dx = e.changedTouches[0].clientX - startX;\n const closeSwipe = isEnd ? dx > THRESHOLD : dx < -THRESHOLD;\n\n if (closeSwipe) {\n onClose?.();\n }\n };\n\n el.addEventListener('touchstart', onTouchStart, { passive: true });\n el.addEventListener('touchend', onTouchEnd, { passive: true });\n\n return () => {\n el.removeEventListener('touchstart', onTouchStart);\n el.removeEventListener('touchend', onTouchEnd);\n };\n }, [isNarrow, showSidebar, isEnd, onClose]);\n\n return (\n <div\n className={[\n styles.root,\n isNarrow ? styles.narrow : styles.wide,\n !isNarrow && collapsed ? styles.collapsed : null,\n isEnd ? styles.end : styles.start,\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n style={{ '--sidebar-width': sidebarWidth, ...style } as CSSProperties}\n {...props}\n >\n {/* Backdrop — narrow mode only */}\n {isNarrow && (\n <div\n className={[styles.backdrop, showSidebar ? styles.backdropVisible : null]\n .filter(Boolean)\n .join(' ')}\n aria-hidden=\"true\"\n onClick={onClose}\n />\n )}\n\n {/* Sidebar */}\n <div\n ref={sidebarRef}\n className={[\n styles.sidebar,\n isNarrow ? (showSidebar ? styles.sidebarOpen : styles.sidebarClosed) : null,\n ]\n .filter(Boolean)\n .join(' ')}\n aria-hidden={isNarrow && !showSidebar}\n >\n {sidebar}\n </div>\n\n {/* Content */}\n <div className={styles.content}>{content}</div>\n </div>\n );\n};\n"],"mappings":"sJAsEA,IAAa,GAAoB,CAC/B,UACA,UACA,cAAc,GACd,UACA,YAAY,GACZ,kBAAkB,QAClB,kBAAkB,IAClB,kBAAkB,IAClB,uBAAuB,IACvB,YACA,QACA,GAAG,KACwB,CAC3B,GAAM,CAAE,YAAa,EAAA,cAAc,EAC7B,GAAA,EAAA,EAAA,QAAoC,IAAI,EAExC,EAAe,SAAS,EAAgB,MAAM,EAAuB,IAAI,KAAK,EAAgB,MAGpG,EAAA,EAAA,eAAgB,CACd,GAAI,CAAC,GAAY,CAAC,EAChB,OAGF,IAAM,EAAW,GAAqB,CAChC,EAAE,MAAQ,UACZ,IAAU,CAEd,EAIA,OAFA,SAAS,iBAAiB,UAAW,CAAO,MAE/B,SAAS,oBAAoB,UAAW,CAAO,CAC9D,EAAG,CAAC,EAAU,EAAa,CAAO,CAAC,GAGnC,EAAA,EAAA,eAAgB,CACV,CAAC,GAAY,CAAC,IAIJ,EAAW,SAAS,cAChC,0EACF,IAEO,MAAM,CACf,EAAG,CAAC,EAAU,CAAW,CAAC,EAE1B,IAAM,EAAQ,IAAoB,MAsClC,OAnCA,EAAA,EAAA,eAAgB,CACd,GAAI,CAAC,GAAY,CAAC,EAChB,OAGF,IAAM,EAAK,EAAW,QAEtB,GAAI,CAAC,EACH,OAGF,IAAI,EAAS,EAGP,EAAgB,GAAkB,CACtC,EAAS,EAAE,QAAQ,GAAG,OACxB,EACM,EAAc,GAAkB,CACpC,IAAM,EAAK,EAAE,eAAe,GAAG,QAAU,GACtB,EAAQ,EAAK,GAAY,EAAK,MAG/C,IAAU,CAEd,EAKA,OAHA,EAAG,iBAAiB,aAAc,EAAc,CAAE,QAAS,EAAK,CAAC,EACjE,EAAG,iBAAiB,WAAY,EAAY,CAAE,QAAS,EAAK,CAAC,MAEhD,CACX,EAAG,oBAAoB,aAAc,CAAY,EACjD,EAAG,oBAAoB,WAAY,CAAU,CAC/C,CACF,EAAG,CAAC,EAAU,EAAa,EAAO,CAAO,CAAC,GAGxC,EAAA,EAAA,MAAC,MAAD,CACE,UAAW,CACT,EAAA,QAAO,KACP,EAAW,EAAA,QAAO,OAAS,EAAA,QAAO,KAClC,CAAC,GAAY,EAAY,EAAA,QAAO,UAAY,KAC5C,EAAQ,EAAA,QAAO,IAAM,EAAA,QAAO,MAC5B,CACF,EACG,OAAO,OAAO,EACd,KAAK,GAAG,EACX,MAAO,CAAE,kBAAmB,EAAc,GAAG,CAAM,EACnD,GAAI,WAXN,CAcG,IACC,EAAA,EAAA,KAAC,MAAD,CACE,UAAW,CAAC,EAAA,QAAO,SAAU,EAAc,EAAA,QAAO,gBAAkB,IAAI,EACrE,OAAO,OAAO,EACd,KAAK,GAAG,EACX,cAAY,OACZ,QAAS,CACV,CAAA,GAIH,EAAA,EAAA,KAAC,MAAD,CACE,IAAK,EACL,UAAW,CACT,EAAA,QAAO,QACP,EAAY,EAAc,EAAA,QAAO,YAAc,EAAA,QAAO,cAAiB,IACzE,EACG,OAAO,OAAO,EACd,KAAK,GAAG,EACX,cAAa,GAAY,CAAC,WAEzB,CACE,CAAA,GAGL,EAAA,EAAA,KAAC,MAAD,CAAK,UAAW,EAAA,QAAO,iBAAU,CAAa,CAAA,CAC3C,GAET"}
|
|
@@ -62,4 +62,4 @@ export interface OverlaySplitViewProps extends Omit<HTMLAttributes<HTMLDivElemen
|
|
|
62
62
|
*
|
|
63
63
|
* @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.OverlaySplitView.html
|
|
64
64
|
*/
|
|
65
|
-
export declare
|
|
65
|
+
export declare const OverlaySplitView: ({ sidebar, content, showSidebar, onClose, collapsed, sidebarPosition, minSidebarWidth, maxSidebarWidth, sidebarWidthFraction, className, style, ...props }: OverlaySplitViewProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,7 +3,7 @@ import t from "./OverlaySplitView.module.css.js";
|
|
|
3
3
|
import { useEffect as n, useRef as r } from "react";
|
|
4
4
|
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/OverlaySplitView/OverlaySplitView.tsx
|
|
6
|
-
|
|
6
|
+
var o = ({ sidebar: o, content: s, showSidebar: c = !1, onClose: l, collapsed: u = !1, sidebarPosition: d = "start", minSidebarWidth: f = 180, maxSidebarWidth: p = 280, sidebarWidthFraction: m = .25, className: h, style: g, ..._ }) => {
|
|
7
7
|
let { isNarrow: v } = e(), y = r(null), b = `clamp(${f}px, ${m * 100}%, ${p}px)`;
|
|
8
8
|
n(() => {
|
|
9
9
|
if (!v || !c) return;
|
|
@@ -68,7 +68,7 @@ function o({ sidebar: o, content: s, showSidebar: c = !1, onClose: l, collapsed:
|
|
|
68
68
|
})
|
|
69
69
|
]
|
|
70
70
|
});
|
|
71
|
-
}
|
|
71
|
+
};
|
|
72
72
|
//#endregion
|
|
73
73
|
export { o as OverlaySplitView };
|
|
74
74
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OverlaySplitView.js","names":[],"sources":["../../../src/components/OverlaySplitView/OverlaySplitView.tsx"],"sourcesContent":["import { type CSSProperties, type HTMLAttributes, type ReactNode, useEffect, useRef } from 'react';\n\nimport { useBreakpoint } from '../../hooks/useBreakpoint';\n\nimport styles from './OverlaySplitView.module.css';\n\nexport interface OverlaySplitViewProps extends Omit<HTMLAttributes<HTMLDivElement>, 'content'> {\n /**\n * The sidebar pane.\n * On wide screens it sits beside the content.\n * On narrow screens it slides over the content as an overlay.\n */\n sidebar: ReactNode;\n /** The main content pane — always visible. */\n content: ReactNode;\n /**\n * Whether the sidebar is shown.\n * - Wide screens: always both visible; this prop is ignored.\n * - Narrow screens (≤ 400 px): controls whether the overlay is open.\n */\n showSidebar?: boolean;\n /**\n * Called when the user clicks the backdrop (narrow screens only).\n * Use this to set `showSidebar` to false.\n */\n onClose?: () => void;\n /**\n * When `true`, collapses the sidebar to icon-only width on wide screens.\n * Has no effect in narrow (overlay) mode.\n * Pair with `collapsed` on the inner `<Sidebar>` component to hide labels.\n */\n collapsed?: boolean;\n /**\n * Which side the sidebar appears on. Defaults to `\"start\"` (left in LTR).\n */\n sidebarPosition?: 'start' | 'end';\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. Defaults to `0.25`.\n */\n sidebarWidthFraction?: number;\n}\n\n/**\n * Sidebar + content layout where the sidebar becomes a slide-over overlay\n * on narrow screens, mirroring the Adwaita `AdwOverlaySplitView` pattern.\n *\n * On **wide** screens (> 400 px) sidebar and content are side-by-side.\n * On **narrow** screens (≤ 400 px) the content fills the full width and\n * the sidebar slides in as an overlay when `showSidebar` is true,\n * with a translucent backdrop behind it.\n *\n * @example\n * const [open, setOpen] = useState(false);\n * <OverlaySplitView\n * showSidebar={open}\n * onClose={() => setOpen(false)}\n * sidebar={<Nav />}\n * content={<MainContent onMenuClick={() => setOpen(true)} />}\n * />\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.OverlaySplitView.html\n */\nexport
|
|
1
|
+
{"version":3,"file":"OverlaySplitView.js","names":[],"sources":["../../../src/components/OverlaySplitView/OverlaySplitView.tsx"],"sourcesContent":["import { type CSSProperties, type HTMLAttributes, type ReactNode, useEffect, useRef } from 'react';\n\nimport { useBreakpoint } from '../../hooks/useBreakpoint';\n\nimport styles from './OverlaySplitView.module.css';\n\nexport interface OverlaySplitViewProps extends Omit<HTMLAttributes<HTMLDivElement>, 'content'> {\n /**\n * The sidebar pane.\n * On wide screens it sits beside the content.\n * On narrow screens it slides over the content as an overlay.\n */\n sidebar: ReactNode;\n /** The main content pane — always visible. */\n content: ReactNode;\n /**\n * Whether the sidebar is shown.\n * - Wide screens: always both visible; this prop is ignored.\n * - Narrow screens (≤ 400 px): controls whether the overlay is open.\n */\n showSidebar?: boolean;\n /**\n * Called when the user clicks the backdrop (narrow screens only).\n * Use this to set `showSidebar` to false.\n */\n onClose?: () => void;\n /**\n * When `true`, collapses the sidebar to icon-only width on wide screens.\n * Has no effect in narrow (overlay) mode.\n * Pair with `collapsed` on the inner `<Sidebar>` component to hide labels.\n */\n collapsed?: boolean;\n /**\n * Which side the sidebar appears on. Defaults to `\"start\"` (left in LTR).\n */\n sidebarPosition?: 'start' | 'end';\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. Defaults to `0.25`.\n */\n sidebarWidthFraction?: number;\n}\n\n/**\n * Sidebar + content layout where the sidebar becomes a slide-over overlay\n * on narrow screens, mirroring the Adwaita `AdwOverlaySplitView` pattern.\n *\n * On **wide** screens (> 400 px) sidebar and content are side-by-side.\n * On **narrow** screens (≤ 400 px) the content fills the full width and\n * the sidebar slides in as an overlay when `showSidebar` is true,\n * with a translucent backdrop behind it.\n *\n * @example\n * const [open, setOpen] = useState(false);\n * <OverlaySplitView\n * showSidebar={open}\n * onClose={() => setOpen(false)}\n * sidebar={<Nav />}\n * content={<MainContent onMenuClick={() => setOpen(true)} />}\n * />\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.OverlaySplitView.html\n */\nexport const OverlaySplitView = ({\n sidebar,\n content,\n showSidebar = false,\n onClose,\n collapsed = false,\n sidebarPosition = 'start',\n minSidebarWidth = 180,\n maxSidebarWidth = 280,\n sidebarWidthFraction = 0.25,\n className,\n style,\n ...props\n}: OverlaySplitViewProps) => {\n const { isNarrow } = useBreakpoint();\n const sidebarRef = useRef<HTMLDivElement>(null);\n\n const sidebarWidth = `clamp(${minSidebarWidth}px, ${sidebarWidthFraction * 100}%, ${maxSidebarWidth}px)`;\n\n // Close on Escape in overlay mode\n useEffect(() => {\n if (!isNarrow || !showSidebar) {\n return;\n }\n\n const handler = (e: KeyboardEvent) => {\n if (e.key === 'Escape') {\n onClose?.();\n }\n };\n\n document.addEventListener('keydown', handler);\n\n return () => document.removeEventListener('keydown', handler);\n }, [isNarrow, showSidebar, onClose]);\n\n // Trap focus inside sidebar when open in overlay mode\n useEffect(() => {\n if (!isNarrow || !showSidebar) {\n return;\n }\n\n const first = sidebarRef.current?.querySelector<HTMLElement>(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])',\n );\n\n first?.focus();\n }, [isNarrow, showSidebar]);\n\n const isEnd = sidebarPosition === 'end';\n\n // Swipe-to-dismiss: drag the sidebar in the close direction to trigger onClose\n useEffect(() => {\n if (!isNarrow || !showSidebar) {\n return;\n }\n\n const el = sidebarRef.current;\n\n if (!el) {\n return;\n }\n\n let startX = 0;\n const THRESHOLD = 80;\n\n const onTouchStart = (e: TouchEvent) => {\n startX = e.touches[0].clientX;\n };\n const onTouchEnd = (e: TouchEvent) => {\n const dx = e.changedTouches[0].clientX - startX;\n const closeSwipe = isEnd ? dx > THRESHOLD : dx < -THRESHOLD;\n\n if (closeSwipe) {\n onClose?.();\n }\n };\n\n el.addEventListener('touchstart', onTouchStart, { passive: true });\n el.addEventListener('touchend', onTouchEnd, { passive: true });\n\n return () => {\n el.removeEventListener('touchstart', onTouchStart);\n el.removeEventListener('touchend', onTouchEnd);\n };\n }, [isNarrow, showSidebar, isEnd, onClose]);\n\n return (\n <div\n className={[\n styles.root,\n isNarrow ? styles.narrow : styles.wide,\n !isNarrow && collapsed ? styles.collapsed : null,\n isEnd ? styles.end : styles.start,\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n style={{ '--sidebar-width': sidebarWidth, ...style } as CSSProperties}\n {...props}\n >\n {/* Backdrop — narrow mode only */}\n {isNarrow && (\n <div\n className={[styles.backdrop, showSidebar ? styles.backdropVisible : null]\n .filter(Boolean)\n .join(' ')}\n aria-hidden=\"true\"\n onClick={onClose}\n />\n )}\n\n {/* Sidebar */}\n <div\n ref={sidebarRef}\n className={[\n styles.sidebar,\n isNarrow ? (showSidebar ? styles.sidebarOpen : styles.sidebarClosed) : null,\n ]\n .filter(Boolean)\n .join(' ')}\n aria-hidden={isNarrow && !showSidebar}\n >\n {sidebar}\n </div>\n\n {/* Content */}\n <div className={styles.content}>{content}</div>\n </div>\n );\n};\n"],"mappings":";;;;;AAsEA,IAAa,KAAoB,EAC/B,YACA,YACA,iBAAc,IACd,YACA,eAAY,IACZ,qBAAkB,SAClB,qBAAkB,KAClB,qBAAkB,KAClB,0BAAuB,KACvB,cACA,UACA,GAAG,QACwB;CAC3B,IAAM,EAAE,gBAAa,EAAc,GAC7B,IAAa,EAAuB,IAAI,GAExC,IAAe,SAAS,EAAgB,MAAM,IAAuB,IAAI,KAAK,EAAgB;CAoBpG,AAjBA,QAAgB;EACd,IAAI,CAAC,KAAY,CAAC,GAChB;EAGF,IAAM,KAAW,MAAqB;GACpC,AAAI,EAAE,QAAQ,YACZ,IAAU;EAEd;EAIA,OAFA,SAAS,iBAAiB,WAAW,CAAO,SAE/B,SAAS,oBAAoB,WAAW,CAAO;CAC9D,GAAG;EAAC;EAAU;EAAa;CAAO,CAAC,GAGnC,QAAgB;EACV,CAAC,KAAY,CAAC,MAIJ,EAAW,SAAS,cAChC,4EACF,IAEO,MAAM;CACf,GAAG,CAAC,GAAU,CAAW,CAAC;CAE1B,IAAM,IAAQ,MAAoB;CAsClC,OAnCA,QAAgB;EACd,IAAI,CAAC,KAAY,CAAC,GAChB;EAGF,IAAM,IAAK,EAAW;EAEtB,IAAI,CAAC,GACH;EAGF,IAAI,IAAS,GAGP,KAAgB,MAAkB;GACtC,IAAS,EAAE,QAAQ,GAAG;EACxB,GACM,KAAc,MAAkB;GACpC,IAAM,IAAK,EAAE,eAAe,GAAG,UAAU;GAGzC,CAFmB,IAAQ,IAAK,KAAY,IAAK,QAG/C,IAAU;EAEd;EAKA,OAHA,EAAG,iBAAiB,cAAc,GAAc,EAAE,SAAS,GAAK,CAAC,GACjE,EAAG,iBAAiB,YAAY,GAAY,EAAE,SAAS,GAAK,CAAC,SAEhD;GAEX,AADA,EAAG,oBAAoB,cAAc,CAAY,GACjD,EAAG,oBAAoB,YAAY,CAAU;EAC/C;CACF,GAAG;EAAC;EAAU;EAAa;EAAO;CAAO,CAAC,GAGxC,kBAAC,OAAD;EACE,WAAW;GACT,EAAO;GACP,IAAW,EAAO,SAAS,EAAO;GAClC,CAAC,KAAY,IAAY,EAAO,YAAY;GAC5C,IAAQ,EAAO,MAAM,EAAO;GAC5B;EACF,EACG,OAAO,OAAO,EACd,KAAK,GAAG;EACX,OAAO;GAAE,mBAAmB;GAAc,GAAG;EAAM;EACnD,GAAI;YAXN;GAcG,KACC,kBAAC,OAAD;IACE,WAAW,CAAC,EAAO,UAAU,IAAc,EAAO,kBAAkB,IAAI,EACrE,OAAO,OAAO,EACd,KAAK,GAAG;IACX,eAAY;IACZ,SAAS;GACV,CAAA;GAIH,kBAAC,OAAD;IACE,KAAK;IACL,WAAW,CACT,EAAO,SACP,IAAY,IAAc,EAAO,cAAc,EAAO,gBAAiB,IACzE,EACG,OAAO,OAAO,EACd,KAAK,GAAG;IACX,eAAa,KAAY,CAAC;cAEzB;GACE,CAAA;GAGL,kBAAC,OAAD;IAAK,WAAW,EAAO;cAAU;GAAa,CAAA;EAC3C;;AAET"}
|