@gnome-ui/react 1.45.1 → 1.46.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AboutDialog/AboutDialog.cjs +1 -1
- package/dist/components/AboutDialog/AboutDialog.cjs.map +1 -1
- package/dist/components/AboutDialog/AboutDialog.d.ts +1 -1
- package/dist/components/AboutDialog/AboutDialog.js +106 -108
- package/dist/components/AboutDialog/AboutDialog.js.map +1 -1
- package/dist/components/AboutDialog/AboutDialog.module.css.cjs +1 -1
- package/dist/components/AboutDialog/AboutDialog.module.css.js +28 -29
- package/dist/components/AboutDialog.cjs +1 -1
- package/dist/components/ActionRow/ActionRow.cjs +1 -1
- package/dist/components/ActionRow/ActionRow.cjs.map +1 -1
- package/dist/components/ActionRow/ActionRow.d.ts +1 -1
- package/dist/components/ActionRow/ActionRow.js +2 -2
- package/dist/components/ActionRow/ActionRow.js.map +1 -1
- package/dist/components/ActionRow.cjs +1 -1
- package/dist/components/Avatar/Avatar.cjs +1 -1
- package/dist/components/Avatar/Avatar.cjs.map +1 -1
- package/dist/components/Avatar/Avatar.d.ts +1 -1
- package/dist/components/Avatar/Avatar.js +2 -2
- package/dist/components/Avatar/Avatar.js.map +1 -1
- package/dist/components/Avatar.cjs +1 -1
- package/dist/components/AvatarRotator/AvatarRotator.cjs +1 -1
- package/dist/components/AvatarRotator/AvatarRotator.cjs.map +1 -1
- package/dist/components/AvatarRotator/AvatarRotator.d.ts +1 -1
- package/dist/components/AvatarRotator/AvatarRotator.js +2 -2
- package/dist/components/AvatarRotator/AvatarRotator.js.map +1 -1
- package/dist/components/AvatarRotator.cjs +1 -1
- package/dist/components/Badge/Badge.cjs +1 -1
- package/dist/components/Badge/Badge.cjs.map +1 -1
- package/dist/components/Badge/Badge.d.ts +1 -1
- package/dist/components/Badge/Badge.js +2 -2
- package/dist/components/Badge/Badge.js.map +1 -1
- package/dist/components/Badge.cjs +1 -1
- package/dist/components/Banner/Banner.cjs +1 -1
- package/dist/components/Banner/Banner.cjs.map +1 -1
- package/dist/components/Banner/Banner.d.ts +1 -1
- package/dist/components/Banner/Banner.js +34 -36
- package/dist/components/Banner/Banner.js.map +1 -1
- package/dist/components/Banner/Banner.module.css.cjs +1 -1
- package/dist/components/Banner/Banner.module.css.js +11 -12
- package/dist/components/Banner.cjs +1 -1
- package/dist/components/Bin/Bin.cjs +1 -1
- package/dist/components/Bin/Bin.cjs.map +1 -1
- package/dist/components/Bin/Bin.d.ts +1 -1
- package/dist/components/Bin/Bin.js +4 -6
- package/dist/components/Bin/Bin.js.map +1 -1
- package/dist/components/Bin.cjs +1 -1
- package/dist/components/Blockquote/Blockquote.cjs +1 -1
- package/dist/components/Blockquote/Blockquote.cjs.map +1 -1
- package/dist/components/Blockquote/Blockquote.d.ts +1 -1
- package/dist/components/Blockquote/Blockquote.js +24 -26
- package/dist/components/Blockquote/Blockquote.js.map +1 -1
- package/dist/components/Blockquote.cjs +1 -1
- package/dist/components/BottomSheet/BottomSheet.cjs +1 -1
- package/dist/components/BottomSheet/BottomSheet.cjs.map +1 -1
- package/dist/components/BottomSheet/BottomSheet.d.ts +1 -1
- package/dist/components/BottomSheet/BottomSheet.js +37 -38
- package/dist/components/BottomSheet/BottomSheet.js.map +1 -1
- package/dist/components/BottomSheet/BottomSheet.module.css.cjs +1 -1
- package/dist/components/BottomSheet/BottomSheet.module.css.js +8 -9
- package/dist/components/BottomSheet.cjs +1 -1
- package/dist/components/Box/Box.cjs +1 -1
- package/dist/components/Box/Box.cjs.map +1 -1
- package/dist/components/Box/Box.d.ts +1 -1
- package/dist/components/Box/Box.js +2 -2
- package/dist/components/Box/Box.js.map +1 -1
- package/dist/components/Box.cjs +1 -1
- package/dist/components/BoxedList/BoxedList.cjs +1 -1
- package/dist/components/BoxedList/BoxedList.cjs.map +1 -1
- package/dist/components/BoxedList/BoxedList.d.ts +1 -1
- package/dist/components/BoxedList/BoxedList.js +2 -2
- package/dist/components/BoxedList/BoxedList.js.map +1 -1
- package/dist/components/BoxedList.cjs +1 -1
- package/dist/components/BreakpointBin/BreakpointBin.cjs +1 -1
- package/dist/components/BreakpointBin/BreakpointBin.cjs.map +1 -1
- package/dist/components/BreakpointBin/BreakpointBin.d.ts +1 -1
- package/dist/components/BreakpointBin/BreakpointBin.js +2 -2
- package/dist/components/BreakpointBin/BreakpointBin.js.map +1 -1
- package/dist/components/BreakpointBin.cjs +1 -1
- package/dist/components/Button/Button.cjs +1 -1
- package/dist/components/Button/Button.cjs.map +1 -1
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Button.cjs +1 -1
- package/dist/components/ButtonContent/ButtonContent.cjs +1 -1
- package/dist/components/ButtonContent/ButtonContent.cjs.map +1 -1
- package/dist/components/ButtonContent/ButtonContent.d.ts +1 -1
- package/dist/components/ButtonContent/ButtonContent.js +24 -26
- package/dist/components/ButtonContent/ButtonContent.js.map +1 -1
- package/dist/components/ButtonContent.cjs +1 -1
- package/dist/components/ButtonRow/ButtonRow.cjs +1 -1
- package/dist/components/ButtonRow/ButtonRow.cjs.map +1 -1
- package/dist/components/ButtonRow/ButtonRow.d.ts +1 -1
- package/dist/components/ButtonRow/ButtonRow.js +22 -24
- package/dist/components/ButtonRow/ButtonRow.js.map +1 -1
- package/dist/components/ButtonRow.cjs +1 -1
- package/dist/components/Card/Card.cjs +1 -1
- package/dist/components/Card/Card.cjs.map +1 -1
- package/dist/components/Card/Card.d.ts +1 -1
- package/dist/components/Card/Card.js +10 -12
- package/dist/components/Card/Card.js.map +1 -1
- package/dist/components/Card/Card.module.css.cjs +1 -1
- package/dist/components/Card/Card.module.css.js +4 -5
- package/dist/components/Card.cjs +1 -1
- package/dist/components/Carousel/Carousel.cjs +1 -1
- package/dist/components/Carousel/Carousel.cjs.map +1 -1
- package/dist/components/Carousel/Carousel.d.ts +3 -3
- package/dist/components/Carousel/Carousel.js +28 -34
- package/dist/components/Carousel/Carousel.js.map +1 -1
- package/dist/components/Carousel.cjs +1 -1
- package/dist/components/CheckRow/CheckRow.cjs +1 -1
- package/dist/components/CheckRow/CheckRow.cjs.map +1 -1
- package/dist/components/CheckRow/CheckRow.d.ts +1 -1
- package/dist/components/CheckRow/CheckRow.js +7 -7
- package/dist/components/CheckRow/CheckRow.js.map +1 -1
- package/dist/components/CheckRow.cjs +1 -1
- package/dist/components/Checkbox/Checkbox.cjs +1 -1
- package/dist/components/Checkbox/Checkbox.cjs.map +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts +1 -1
- package/dist/components/Checkbox/Checkbox.js +2 -2
- package/dist/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/Checkbox.cjs +1 -1
- package/dist/components/Chip/Chip.cjs +1 -1
- package/dist/components/Chip/Chip.cjs.map +1 -1
- package/dist/components/Chip/Chip.d.ts +1 -1
- package/dist/components/Chip/Chip.js +2 -2
- package/dist/components/Chip/Chip.js.map +1 -1
- package/dist/components/Chip.cjs +1 -1
- package/dist/components/Clamp/Clamp.cjs +1 -1
- package/dist/components/Clamp/Clamp.cjs.map +1 -1
- package/dist/components/Clamp/Clamp.d.ts +1 -1
- package/dist/components/Clamp/Clamp.js +9 -11
- package/dist/components/Clamp/Clamp.js.map +1 -1
- package/dist/components/Clamp.cjs +1 -1
- package/dist/components/ColorPicker/ColorPicker.cjs +1 -1
- package/dist/components/ColorPicker/ColorPicker.cjs.map +1 -1
- package/dist/components/ColorPicker/ColorPicker.d.ts +2 -2
- package/dist/components/ColorPicker/ColorPicker.js +33 -37
- package/dist/components/ColorPicker/ColorPicker.js.map +1 -1
- package/dist/components/ColorPicker/ColorPicker.module.css.cjs +1 -1
- package/dist/components/ColorPicker/ColorPicker.module.css.js +9 -10
- package/dist/components/ColorPicker.cjs +1 -1
- package/dist/components/ColumnView/ColumnView.cjs +1 -1
- package/dist/components/ColumnView/ColumnView.cjs.map +1 -1
- package/dist/components/ColumnView/ColumnView.d.ts +1 -1
- package/dist/components/ColumnView/ColumnView.js +24 -28
- package/dist/components/ColumnView/ColumnView.js.map +1 -1
- package/dist/components/ColumnView.cjs +1 -1
- package/dist/components/ComboRow/ComboRow.cjs +1 -1
- package/dist/components/ComboRow/ComboRow.cjs.map +1 -1
- package/dist/components/ComboRow/ComboRow.d.ts +1 -1
- package/dist/components/ComboRow/ComboRow.js +2 -2
- package/dist/components/ComboRow/ComboRow.js.map +1 -1
- package/dist/components/ComboRow/ComboRow.module.css.cjs +1 -1
- package/dist/components/ComboRow/ComboRow.module.css.js +24 -25
- package/dist/components/ComboRow.cjs +1 -1
- package/dist/components/ContributionGraph/ContributionGraph.cjs +1 -1
- package/dist/components/ContributionGraph/ContributionGraph.cjs.map +1 -1
- package/dist/components/ContributionGraph/ContributionGraph.d.ts +1 -1
- package/dist/components/ContributionGraph/ContributionGraph.js +2 -2
- package/dist/components/ContributionGraph/ContributionGraph.js.map +1 -1
- package/dist/components/ContributionGraph.cjs +1 -1
- package/dist/components/CountDownTimer/CountDownTimer.cjs +1 -1
- package/dist/components/CountDownTimer/CountDownTimer.cjs.map +1 -1
- package/dist/components/CountDownTimer/CountDownTimer.d.ts +1 -1
- package/dist/components/CountDownTimer/CountDownTimer.js +2 -2
- package/dist/components/CountDownTimer/CountDownTimer.js.map +1 -1
- package/dist/components/CountDownTimer.cjs +1 -1
- package/dist/components/Dialog/Dialog.cjs +1 -1
- package/dist/components/Dialog/Dialog.cjs.map +1 -1
- package/dist/components/Dialog/Dialog.d.ts +1 -1
- package/dist/components/Dialog/Dialog.js +51 -52
- package/dist/components/Dialog/Dialog.js.map +1 -1
- package/dist/components/Dialog/Dialog.module.css.cjs +1 -1
- package/dist/components/Dialog/Dialog.module.css.js +8 -9
- package/dist/components/Dialog/dialogUtils.cjs +1 -1
- package/dist/components/Dialog/dialogUtils.cjs.map +1 -1
- package/dist/components/Dialog/dialogUtils.d.ts +6 -0
- package/dist/components/Dialog/dialogUtils.js +11 -2
- package/dist/components/Dialog/dialogUtils.js.map +1 -1
- package/dist/components/Dialog.cjs +1 -1
- package/dist/components/Drawer/Drawer.cjs +1 -1
- package/dist/components/Drawer/Drawer.cjs.map +1 -1
- package/dist/components/Drawer/Drawer.d.ts +1 -1
- package/dist/components/Drawer/Drawer.js +2 -2
- package/dist/components/Drawer/Drawer.js.map +1 -1
- package/dist/components/Drawer/Drawer.module.css.cjs +1 -1
- package/dist/components/Drawer/Drawer.module.css.js +11 -12
- package/dist/components/Drawer.cjs +1 -1
- package/dist/components/Dropdown/Dropdown.cjs +1 -1
- package/dist/components/Dropdown/Dropdown.cjs.map +1 -1
- package/dist/components/Dropdown/Dropdown.d.ts +1 -1
- package/dist/components/Dropdown/Dropdown.js +89 -85
- package/dist/components/Dropdown/Dropdown.js.map +1 -1
- package/dist/components/Dropdown/Dropdown.module.css.cjs +1 -1
- package/dist/components/Dropdown/Dropdown.module.css.js +20 -21
- package/dist/components/Dropdown.cjs +1 -1
- package/dist/components/EntryRow/EntryRow.cjs +1 -1
- package/dist/components/EntryRow/EntryRow.cjs.map +1 -1
- package/dist/components/EntryRow/EntryRow.d.ts +1 -1
- package/dist/components/EntryRow/EntryRow.js +2 -2
- package/dist/components/EntryRow/EntryRow.js.map +1 -1
- package/dist/components/EntryRow.cjs +1 -1
- package/dist/components/ExpanderRow/ExpanderRow.cjs +1 -1
- package/dist/components/ExpanderRow/ExpanderRow.cjs.map +1 -1
- package/dist/components/ExpanderRow/ExpanderRow.d.ts +1 -1
- package/dist/components/ExpanderRow/ExpanderRow.js +2 -2
- package/dist/components/ExpanderRow/ExpanderRow.js.map +1 -1
- package/dist/components/ExpanderRow.cjs +1 -1
- package/dist/components/Footer/Footer.cjs +1 -1
- package/dist/components/Footer/Footer.cjs.map +1 -1
- package/dist/components/Footer/Footer.d.ts +1 -1
- package/dist/components/Footer/Footer.js +22 -24
- package/dist/components/Footer/Footer.js.map +1 -1
- package/dist/components/Footer.cjs +1 -1
- package/dist/components/Frame/Frame.cjs +1 -1
- package/dist/components/Frame/Frame.cjs.map +1 -1
- package/dist/components/Frame/Frame.d.ts +1 -1
- package/dist/components/Frame/Frame.js +5 -7
- package/dist/components/Frame/Frame.js.map +1 -1
- package/dist/components/Frame.cjs +1 -1
- package/dist/components/GnomeProvider/GnomeContext.cjs +1 -1
- package/dist/components/GnomeProvider/GnomeContext.cjs.map +1 -1
- package/dist/components/GnomeProvider/GnomeContext.js.map +1 -1
- package/dist/components/GnomeProvider/GnomeProvider.cjs +1 -1
- package/dist/components/GnomeProvider/GnomeProvider.cjs.map +1 -1
- package/dist/components/GnomeProvider/GnomeProvider.d.ts +1 -1
- package/dist/components/GnomeProvider/GnomeProvider.js +2 -2
- package/dist/components/GnomeProvider/GnomeProvider.js.map +1 -1
- package/dist/components/HeaderBar/HeaderBar.cjs +1 -1
- package/dist/components/HeaderBar/HeaderBar.cjs.map +1 -1
- package/dist/components/HeaderBar/HeaderBar.d.ts +1 -1
- package/dist/components/HeaderBar/HeaderBar.js +26 -28
- package/dist/components/HeaderBar/HeaderBar.js.map +1 -1
- package/dist/components/HeaderBar.cjs +1 -1
- package/dist/components/Icon/Icon.cjs +1 -1
- package/dist/components/Icon/Icon.cjs.map +1 -1
- package/dist/components/Icon/Icon.d.ts +1 -1
- package/dist/components/Icon/Icon.js +2 -2
- package/dist/components/Icon/Icon.js.map +1 -1
- package/dist/components/Icon.cjs +1 -1
- package/dist/components/IconButton/IconButton.cjs +1 -1
- package/dist/components/IconButton/IconButton.cjs.map +1 -1
- package/dist/components/IconButton/IconButton.js +4 -4
- package/dist/components/IconButton/IconButton.js.map +1 -1
- package/dist/components/IconButton.cjs +1 -1
- package/dist/components/InlineViewSwitcher/InlineViewSwitcher.cjs +1 -1
- package/dist/components/InlineViewSwitcher/InlineViewSwitcher.cjs.map +1 -1
- package/dist/components/InlineViewSwitcher/InlineViewSwitcher.d.ts +1 -1
- package/dist/components/InlineViewSwitcher/InlineViewSwitcher.js +2 -2
- package/dist/components/InlineViewSwitcher/InlineViewSwitcher.js.map +1 -1
- package/dist/components/InlineViewSwitcher/InlineViewSwitcherItem.cjs +1 -1
- package/dist/components/InlineViewSwitcher/InlineViewSwitcherItem.cjs.map +1 -1
- package/dist/components/InlineViewSwitcher/InlineViewSwitcherItem.d.ts +1 -1
- package/dist/components/InlineViewSwitcher/InlineViewSwitcherItem.js +2 -2
- package/dist/components/InlineViewSwitcher/InlineViewSwitcherItem.js.map +1 -1
- package/dist/components/InlineViewSwitcher.cjs +1 -1
- package/dist/components/Link/Link.cjs +1 -1
- package/dist/components/Link/Link.cjs.map +1 -1
- package/dist/components/Link/Link.d.ts +1 -1
- package/dist/components/Link/Link.js +2 -2
- package/dist/components/Link/Link.js.map +1 -1
- package/dist/components/Link.cjs +1 -1
- package/dist/components/LinkedGroup/LinkedGroup.cjs +1 -1
- package/dist/components/LinkedGroup/LinkedGroup.cjs.map +1 -1
- package/dist/components/LinkedGroup/LinkedGroup.d.ts +1 -1
- package/dist/components/LinkedGroup/LinkedGroup.js +9 -11
- package/dist/components/LinkedGroup/LinkedGroup.js.map +1 -1
- package/dist/components/LinkedGroup.cjs +1 -1
- package/dist/components/NavigationSplitView/NavigationSplitView.cjs +1 -1
- package/dist/components/NavigationSplitView/NavigationSplitView.cjs.map +1 -1
- package/dist/components/NavigationSplitView/NavigationSplitView.d.ts +1 -1
- package/dist/components/NavigationSplitView/NavigationSplitView.js +2 -2
- package/dist/components/NavigationSplitView/NavigationSplitView.js.map +1 -1
- package/dist/components/NavigationSplitView.cjs +1 -1
- package/dist/components/NavigationView/NavigationView.cjs +1 -1
- package/dist/components/NavigationView/NavigationView.cjs.map +1 -1
- package/dist/components/NavigationView/NavigationView.d.ts +2 -2
- package/dist/components/NavigationView/NavigationView.js +3 -4
- package/dist/components/NavigationView/NavigationView.js.map +1 -1
- package/dist/components/NavigationView/NavigationView.module.css.cjs +1 -1
- package/dist/components/NavigationView/NavigationView.module.css.js +9 -10
- package/dist/components/NavigationView.cjs +1 -1
- package/dist/components/OverlaySplitView/OverlaySplitView.cjs +1 -1
- package/dist/components/OverlaySplitView/OverlaySplitView.cjs.map +1 -1
- package/dist/components/OverlaySplitView/OverlaySplitView.d.ts +1 -1
- package/dist/components/OverlaySplitView/OverlaySplitView.js +2 -2
- package/dist/components/OverlaySplitView/OverlaySplitView.js.map +1 -1
- package/dist/components/OverlaySplitView.cjs +1 -1
- package/dist/components/PasswordEntryRow/PasswordEntryRow.cjs +1 -1
- package/dist/components/PasswordEntryRow/PasswordEntryRow.cjs.map +1 -1
- package/dist/components/PasswordEntryRow/PasswordEntryRow.d.ts +1 -1
- package/dist/components/PasswordEntryRow/PasswordEntryRow.js +11 -10
- package/dist/components/PasswordEntryRow/PasswordEntryRow.js.map +1 -1
- package/dist/components/PasswordEntryRow.cjs +1 -1
- package/dist/components/PathBar/PathBar.cjs +1 -1
- package/dist/components/PathBar/PathBar.cjs.map +1 -1
- package/dist/components/PathBar/PathBar.d.ts +1 -1
- package/dist/components/PathBar/PathBar.js +48 -50
- package/dist/components/PathBar/PathBar.js.map +1 -1
- package/dist/components/PathBar.cjs +1 -1
- package/dist/components/Popover/Popover.cjs +1 -1
- package/dist/components/Popover/Popover.cjs.map +1 -1
- package/dist/components/Popover/Popover.d.ts +1 -1
- package/dist/components/Popover/Popover.js +5 -5
- package/dist/components/Popover/Popover.js.map +1 -1
- package/dist/components/Popover.cjs +1 -1
- package/dist/components/PreferencesDialog/PreferencesDialog.cjs +1 -1
- package/dist/components/PreferencesDialog/PreferencesDialog.cjs.map +1 -1
- package/dist/components/PreferencesDialog/PreferencesDialog.d.ts +1 -1
- package/dist/components/PreferencesDialog/PreferencesDialog.js +2 -2
- package/dist/components/PreferencesDialog/PreferencesDialog.js.map +1 -1
- package/dist/components/PreferencesDialog/PreferencesDialog.module.css.cjs +1 -1
- package/dist/components/PreferencesDialog/PreferencesDialog.module.css.js +18 -19
- package/dist/components/PreferencesDialog.cjs +1 -1
- package/dist/components/PreferencesGroup/PreferencesGroup.cjs +1 -1
- package/dist/components/PreferencesGroup/PreferencesGroup.cjs.map +1 -1
- package/dist/components/PreferencesGroup/PreferencesGroup.d.ts +1 -1
- package/dist/components/PreferencesGroup/PreferencesGroup.js +2 -2
- package/dist/components/PreferencesGroup/PreferencesGroup.js.map +1 -1
- package/dist/components/PreferencesGroup.cjs +1 -1
- package/dist/components/PreferencesPage/PreferencesPage.cjs +1 -1
- package/dist/components/PreferencesPage/PreferencesPage.cjs.map +1 -1
- package/dist/components/PreferencesPage/PreferencesPage.d.ts +1 -1
- package/dist/components/PreferencesPage/PreferencesPage.js +9 -11
- package/dist/components/PreferencesPage/PreferencesPage.js.map +1 -1
- package/dist/components/PreferencesPage.cjs +1 -1
- package/dist/components/ProgressBar/ProgressBar.cjs +1 -1
- package/dist/components/ProgressBar/ProgressBar.cjs.map +1 -1
- package/dist/components/ProgressBar/ProgressBar.d.ts +1 -1
- package/dist/components/ProgressBar/ProgressBar.js +2 -2
- package/dist/components/ProgressBar/ProgressBar.js.map +1 -1
- package/dist/components/ProgressBar.cjs +1 -1
- package/dist/components/RadioButton/RadioButton.cjs +1 -1
- package/dist/components/RadioButton/RadioButton.cjs.map +1 -1
- package/dist/components/RadioButton/RadioButton.d.ts +1 -1
- package/dist/components/RadioButton/RadioButton.js +5 -7
- package/dist/components/RadioButton/RadioButton.js.map +1 -1
- package/dist/components/RadioButton.cjs +1 -1
- package/dist/components/SearchBar/SearchBar.cjs +1 -1
- package/dist/components/SearchBar/SearchBar.cjs.map +1 -1
- package/dist/components/SearchBar/SearchBar.d.ts +1 -1
- package/dist/components/SearchBar/SearchBar.js +2 -2
- package/dist/components/SearchBar/SearchBar.js.map +1 -1
- package/dist/components/SearchBar.cjs +1 -1
- package/dist/components/SegmentedBar/SegmentedBar.cjs +1 -1
- package/dist/components/SegmentedBar/SegmentedBar.cjs.map +1 -1
- package/dist/components/SegmentedBar/SegmentedBar.js.map +1 -1
- package/dist/components/SegmentedBar.cjs +1 -1
- package/dist/components/Separator/Separator.cjs +1 -1
- package/dist/components/Separator/Separator.cjs.map +1 -1
- package/dist/components/Separator/Separator.d.ts +1 -1
- package/dist/components/Separator/Separator.js +2 -2
- package/dist/components/Separator/Separator.js.map +1 -1
- package/dist/components/Separator.cjs +1 -1
- package/dist/components/ShortcutLabel/ShortcutLabel.cjs +1 -1
- package/dist/components/ShortcutLabel/ShortcutLabel.cjs.map +1 -1
- package/dist/components/ShortcutLabel/ShortcutLabel.d.ts +1 -1
- package/dist/components/ShortcutLabel/ShortcutLabel.js +2 -3
- package/dist/components/ShortcutLabel/ShortcutLabel.js.map +1 -1
- package/dist/components/ShortcutLabel.cjs +1 -1
- package/dist/components/ShortcutsDialog/ShortcutsDialog.cjs +1 -1
- package/dist/components/ShortcutsDialog/ShortcutsDialog.cjs.map +1 -1
- package/dist/components/ShortcutsDialog/ShortcutsDialog.d.ts +1 -1
- package/dist/components/ShortcutsDialog/ShortcutsDialog.js +75 -76
- package/dist/components/ShortcutsDialog/ShortcutsDialog.js.map +1 -1
- package/dist/components/ShortcutsDialog/ShortcutsDialog.module.css.cjs +1 -1
- package/dist/components/ShortcutsDialog/ShortcutsDialog.module.css.js +21 -22
- package/dist/components/ShortcutsDialog.cjs +1 -1
- package/dist/components/Sidebar/Sidebar.cjs +1 -1
- package/dist/components/Sidebar/Sidebar.cjs.map +1 -1
- package/dist/components/Sidebar/Sidebar.d.ts +1 -1
- package/dist/components/Sidebar/Sidebar.js +2 -3
- package/dist/components/Sidebar/Sidebar.js.map +1 -1
- package/dist/components/Sidebar/Sidebar.module.css.cjs +1 -1
- package/dist/components/Sidebar/Sidebar.module.css.js +33 -34
- package/dist/components/Sidebar/SidebarItem.cjs +1 -1
- package/dist/components/Sidebar/SidebarItem.cjs.map +1 -1
- package/dist/components/Sidebar/SidebarItem.d.ts +1 -1
- package/dist/components/Sidebar/SidebarItem.js +16 -16
- package/dist/components/Sidebar/SidebarItem.js.map +1 -1
- package/dist/components/Sidebar/SidebarSection.cjs +1 -1
- package/dist/components/Sidebar/SidebarSection.cjs.map +1 -1
- package/dist/components/Sidebar/SidebarSection.js.map +1 -1
- package/dist/components/Sidebar.cjs +1 -1
- package/dist/components/Skeleton/Skeleton.cjs +1 -1
- package/dist/components/Skeleton/Skeleton.cjs.map +1 -1
- package/dist/components/Skeleton/Skeleton.d.ts +1 -1
- package/dist/components/Skeleton/Skeleton.js +9 -10
- package/dist/components/Skeleton/Skeleton.js.map +1 -1
- package/dist/components/Skeleton.cjs +1 -1
- package/dist/components/Slider/Slider.cjs +1 -1
- package/dist/components/Slider/Slider.cjs.map +1 -1
- package/dist/components/Slider/Slider.d.ts +1 -1
- package/dist/components/Slider/Slider.js +2 -2
- package/dist/components/Slider/Slider.js.map +1 -1
- package/dist/components/Slider.cjs +1 -1
- package/dist/components/SpinButton/SpinButton.cjs +1 -1
- package/dist/components/SpinButton/SpinButton.cjs.map +1 -1
- package/dist/components/SpinButton/SpinButton.d.ts +1 -1
- package/dist/components/SpinButton/SpinButton.js +2 -2
- package/dist/components/SpinButton/SpinButton.js.map +1 -1
- package/dist/components/SpinButton.cjs +1 -1
- package/dist/components/SpinRow/SpinRow.cjs +1 -1
- package/dist/components/SpinRow/SpinRow.cjs.map +1 -1
- package/dist/components/SpinRow/SpinRow.d.ts +1 -1
- package/dist/components/SpinRow/SpinRow.js +2 -2
- package/dist/components/SpinRow/SpinRow.js.map +1 -1
- package/dist/components/SpinRow.cjs +1 -1
- package/dist/components/Spinner/Spinner.cjs +1 -1
- package/dist/components/Spinner/Spinner.cjs.map +1 -1
- package/dist/components/Spinner/Spinner.d.ts +1 -1
- package/dist/components/Spinner/Spinner.js +2 -2
- package/dist/components/Spinner/Spinner.js.map +1 -1
- package/dist/components/Spinner.cjs +1 -1
- package/dist/components/SplitButton/SplitButton.cjs +1 -1
- package/dist/components/SplitButton/SplitButton.cjs.map +1 -1
- package/dist/components/SplitButton/SplitButton.d.ts +1 -1
- package/dist/components/SplitButton/SplitButton.js +2 -2
- package/dist/components/SplitButton/SplitButton.js.map +1 -1
- package/dist/components/SplitButton.cjs +1 -1
- package/dist/components/StatusBadge/StatusBadge.cjs +1 -1
- package/dist/components/StatusBadge/StatusBadge.cjs.map +1 -1
- package/dist/components/StatusBadge/StatusBadge.d.ts +1 -1
- package/dist/components/StatusBadge/StatusBadge.js +9 -11
- package/dist/components/StatusBadge/StatusBadge.js.map +1 -1
- package/dist/components/StatusBadge.cjs +1 -1
- package/dist/components/StatusPage/StatusPage.cjs +1 -1
- package/dist/components/StatusPage/StatusPage.cjs.map +1 -1
- package/dist/components/StatusPage/StatusPage.d.ts +1 -1
- package/dist/components/StatusPage/StatusPage.js +2 -2
- package/dist/components/StatusPage/StatusPage.js.map +1 -1
- package/dist/components/StatusPage.cjs +1 -1
- package/dist/components/Switch/Switch.cjs +1 -1
- package/dist/components/Switch/Switch.cjs.map +1 -1
- package/dist/components/Switch/Switch.d.ts +1 -1
- package/dist/components/Switch/Switch.js +6 -8
- package/dist/components/Switch/Switch.js.map +1 -1
- package/dist/components/Switch.cjs +1 -1
- package/dist/components/SwitchRow/SwitchRow.cjs +1 -1
- package/dist/components/SwitchRow/SwitchRow.cjs.map +1 -1
- package/dist/components/SwitchRow/SwitchRow.d.ts +1 -1
- package/dist/components/SwitchRow/SwitchRow.js +7 -7
- package/dist/components/SwitchRow/SwitchRow.js.map +1 -1
- package/dist/components/SwitchRow.cjs +1 -1
- package/dist/components/Tabs/TabBar.cjs +1 -1
- package/dist/components/Tabs/TabBar.cjs.map +1 -1
- package/dist/components/Tabs/TabBar.d.ts +1 -1
- package/dist/components/Tabs/TabBar.js +2 -2
- package/dist/components/Tabs/TabBar.js.map +1 -1
- package/dist/components/Tabs/TabItem.cjs +1 -1
- package/dist/components/Tabs/TabItem.cjs.map +1 -1
- package/dist/components/Tabs/TabItem.js.map +1 -1
- package/dist/components/Tabs/TabPanel.cjs +1 -1
- package/dist/components/Tabs/TabPanel.cjs.map +1 -1
- package/dist/components/Tabs/TabPanel.d.ts +1 -1
- package/dist/components/Tabs/TabPanel.js +8 -10
- package/dist/components/Tabs/TabPanel.js.map +1 -1
- package/dist/components/Tabs.cjs +1 -1
- package/dist/components/TerminalView/TerminalView.cjs +1 -1
- package/dist/components/TerminalView/TerminalView.cjs.map +1 -1
- package/dist/components/TerminalView/TerminalView.d.ts +1 -1
- package/dist/components/TerminalView/TerminalView.js +2 -2
- package/dist/components/TerminalView/TerminalView.js.map +1 -1
- package/dist/components/TerminalView.cjs +1 -1
- package/dist/components/Text/Text.cjs +1 -1
- package/dist/components/Text/Text.cjs.map +1 -1
- package/dist/components/Text/Text.d.ts +1 -1
- package/dist/components/Text/Text.js +10 -13
- package/dist/components/Text/Text.js.map +1 -1
- package/dist/components/Text/Text.module.css.cjs +1 -1
- package/dist/components/Text/Text.module.css.js +9 -10
- package/dist/components/Text.cjs +1 -1
- package/dist/components/TextField/TextField.cjs +1 -1
- package/dist/components/TextField/TextField.cjs.map +1 -1
- package/dist/components/TextField/TextField.d.ts +1 -1
- package/dist/components/TextField/TextField.js +2 -2
- package/dist/components/TextField/TextField.js.map +1 -1
- package/dist/components/TextField.cjs +1 -1
- package/dist/components/Timeline/Timeline.cjs +1 -1
- package/dist/components/Timeline/Timeline.cjs.map +1 -1
- package/dist/components/Timeline/Timeline.d.ts +1 -1
- package/dist/components/Timeline/Timeline.js +2 -2
- package/dist/components/Timeline/Timeline.js.map +1 -1
- package/dist/components/Timeline.cjs +1 -1
- package/dist/components/Toast/Toast.cjs +1 -1
- package/dist/components/Toast/Toast.cjs.map +1 -1
- package/dist/components/Toast/Toast.d.ts +1 -1
- package/dist/components/Toast/Toast.js +2 -2
- package/dist/components/Toast/Toast.js.map +1 -1
- package/dist/components/Toast/Toast.module.css.cjs +1 -1
- package/dist/components/Toast/Toast.module.css.js +10 -11
- package/dist/components/Toast/Toaster.cjs +1 -1
- package/dist/components/Toast/Toaster.cjs.map +1 -1
- package/dist/components/Toast/Toaster.d.ts +1 -1
- package/dist/components/Toast/Toaster.js +2 -2
- package/dist/components/Toast/Toaster.js.map +1 -1
- package/dist/components/Toast.cjs +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.cjs +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.cjs.map +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.d.ts +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.js +2 -2
- package/dist/components/ToggleGroup/ToggleGroup.js.map +1 -1
- package/dist/components/ToggleGroup/ToggleGroupItem.cjs +1 -1
- package/dist/components/ToggleGroup/ToggleGroupItem.cjs.map +1 -1
- package/dist/components/ToggleGroup/ToggleGroupItem.d.ts +1 -1
- package/dist/components/ToggleGroup/ToggleGroupItem.js +2 -2
- package/dist/components/ToggleGroup/ToggleGroupItem.js.map +1 -1
- package/dist/components/ToggleGroup.cjs +1 -1
- package/dist/components/Toolbar/Spacer.cjs +1 -1
- package/dist/components/Toolbar/Spacer.cjs.map +1 -1
- package/dist/components/Toolbar/Spacer.d.ts +1 -1
- package/dist/components/Toolbar/Spacer.js +5 -7
- package/dist/components/Toolbar/Spacer.js.map +1 -1
- package/dist/components/Toolbar/Toolbar.cjs +1 -1
- package/dist/components/Toolbar/Toolbar.cjs.map +1 -1
- package/dist/components/Toolbar/Toolbar.d.ts +1 -1
- package/dist/components/Toolbar/Toolbar.js +5 -7
- package/dist/components/Toolbar/Toolbar.js.map +1 -1
- package/dist/components/Toolbar.cjs +1 -1
- package/dist/components/ToolbarView/ToolbarView.cjs +1 -1
- package/dist/components/ToolbarView/ToolbarView.cjs.map +1 -1
- package/dist/components/ToolbarView/ToolbarView.d.ts +1 -1
- package/dist/components/ToolbarView/ToolbarView.js +18 -20
- package/dist/components/ToolbarView/ToolbarView.js.map +1 -1
- package/dist/components/ToolbarView.cjs +1 -1
- package/dist/components/Tooltip/Tooltip.cjs +1 -1
- package/dist/components/Tooltip/Tooltip.cjs.map +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +1 -1
- package/dist/components/Tooltip/Tooltip.js +2 -2
- package/dist/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/components/Tooltip.cjs +1 -1
- package/dist/components/ViewSwitcher/ViewSwitcher.cjs +1 -1
- package/dist/components/ViewSwitcher/ViewSwitcher.cjs.map +1 -1
- package/dist/components/ViewSwitcher/ViewSwitcher.d.ts +1 -1
- package/dist/components/ViewSwitcher/ViewSwitcher.js +2 -2
- package/dist/components/ViewSwitcher/ViewSwitcher.js.map +1 -1
- package/dist/components/ViewSwitcher/ViewSwitcherItem.cjs +1 -1
- package/dist/components/ViewSwitcher/ViewSwitcherItem.cjs.map +1 -1
- package/dist/components/ViewSwitcher/ViewSwitcherItem.d.ts +1 -1
- package/dist/components/ViewSwitcher/ViewSwitcherItem.js +24 -26
- package/dist/components/ViewSwitcher/ViewSwitcherItem.js.map +1 -1
- package/dist/components/ViewSwitcher.cjs +1 -1
- package/dist/components/ViewSwitcherBar/ViewSwitcherBar.cjs +1 -1
- package/dist/components/ViewSwitcherBar/ViewSwitcherBar.cjs.map +1 -1
- package/dist/components/ViewSwitcherBar/ViewSwitcherBar.d.ts +1 -1
- package/dist/components/ViewSwitcherBar/ViewSwitcherBar.js +7 -9
- package/dist/components/ViewSwitcherBar/ViewSwitcherBar.js.map +1 -1
- package/dist/components/ViewSwitcherBar.cjs +1 -1
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebar.cjs +1 -1
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebar.cjs.map +1 -1
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebar.d.ts +1 -1
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebar.js +2 -2
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebar.js.map +1 -1
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebarItem.cjs +1 -1
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebarItem.cjs.map +1 -1
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebarItem.d.ts +1 -1
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebarItem.js +2 -2
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebarItem.js.map +1 -1
- package/dist/components/ViewSwitcherSidebar.cjs +1 -1
- package/dist/components/WindowTitle/WindowTitle.cjs +1 -1
- package/dist/components/WindowTitle/WindowTitle.cjs.map +1 -1
- package/dist/components/WindowTitle/WindowTitle.d.ts +1 -1
- package/dist/components/WindowTitle/WindowTitle.js +11 -13
- package/dist/components/WindowTitle/WindowTitle.js.map +1 -1
- package/dist/components/WindowTitle.cjs +1 -1
- package/dist/components/WrapBox/WrapBox.cjs +1 -1
- package/dist/components/WrapBox/WrapBox.cjs.map +1 -1
- package/dist/components/WrapBox/WrapBox.d.ts +1 -1
- package/dist/components/WrapBox/WrapBox.js +5 -5
- package/dist/components/WrapBox/WrapBox.js.map +1 -1
- package/dist/components/WrapBox.cjs +1 -1
- package/dist/hooks/useBreakpoint.cjs +1 -1
- package/dist/hooks/useBreakpoint.cjs.map +1 -1
- package/dist/hooks/useBreakpoint.js.map +1 -1
- package/dist/hooks.cjs +1 -1
- package/dist/index.cjs +1 -1
- package/package.json +2 -2
|
@@ -35,4 +35,4 @@ export interface ViewSwitcherBarProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
35
35
|
*
|
|
36
36
|
* @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.ViewSwitcherBar.html
|
|
37
37
|
*/
|
|
38
|
-
export declare
|
|
38
|
+
export declare const ViewSwitcherBar: ({ children, reveal, className, ...props }: ViewSwitcherBarProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import e from "./ViewSwitcherBar.module.css.js";
|
|
2
2
|
import { jsx as t } from "react/jsx-runtime";
|
|
3
3
|
//#region src/components/ViewSwitcherBar/ViewSwitcherBar.tsx
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}) : null;
|
|
12
|
-
}
|
|
4
|
+
var n = ({ children: n, reveal: r = !0, className: i, ...a }) => r ? /* @__PURE__ */ t("div", {
|
|
5
|
+
role: "navigation",
|
|
6
|
+
"aria-label": "Bottom navigation",
|
|
7
|
+
className: [e.bar, i].filter(Boolean).join(" "),
|
|
8
|
+
...a,
|
|
9
|
+
children: n
|
|
10
|
+
}) : null;
|
|
13
11
|
//#endregion
|
|
14
12
|
export { n as ViewSwitcherBar };
|
|
15
13
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewSwitcherBar.js","names":[],"sources":["../../../src/components/ViewSwitcherBar/ViewSwitcherBar.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\n\nimport styles from './ViewSwitcherBar.module.css';\n\nexport interface ViewSwitcherBarProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * `ViewSwitcherItem` elements to render in the bottom bar.\n * Use the same items you pass to the header-bar `ViewSwitcher`.\n */\n children: ReactNode;\n /**\n * Whether the bar is visible.\n * Typically tied to `useBreakpoint().isMedium` so it appears\n * automatically when the window is ≤ 550 px wide.\n */\n reveal?: boolean;\n}\n\n/**\n * Bottom navigation bar for `ViewSwitcher` items on narrow screens (≤ 550 px),\n * mirroring the Adwaita `AdwViewSwitcherBar` pattern.\n *\n * Use in tandem with a `ViewSwitcher` in the `HeaderBar`:\n * - **Wide** (> 550 px): show the `ViewSwitcher` in the header, hide the bar.\n * - **Narrow** (≤ 550 px): hide the header switcher, reveal the bar.\n *\n * @example\n * const { isMedium } = useBreakpoint();\n * <>\n * <HeaderBar\n * title={\n * !isMedium && (\n * <ViewSwitcher aria-label=\"View\">…items…</ViewSwitcher>\n * )\n * }\n * />\n * <ViewSwitcherBar reveal={isMedium}>…items…</ViewSwitcherBar>\n * </>\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.ViewSwitcherBar.html\n */\nexport
|
|
1
|
+
{"version":3,"file":"ViewSwitcherBar.js","names":[],"sources":["../../../src/components/ViewSwitcherBar/ViewSwitcherBar.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\n\nimport styles from './ViewSwitcherBar.module.css';\n\nexport interface ViewSwitcherBarProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * `ViewSwitcherItem` elements to render in the bottom bar.\n * Use the same items you pass to the header-bar `ViewSwitcher`.\n */\n children: ReactNode;\n /**\n * Whether the bar is visible.\n * Typically tied to `useBreakpoint().isMedium` so it appears\n * automatically when the window is ≤ 550 px wide.\n */\n reveal?: boolean;\n}\n\n/**\n * Bottom navigation bar for `ViewSwitcher` items on narrow screens (≤ 550 px),\n * mirroring the Adwaita `AdwViewSwitcherBar` pattern.\n *\n * Use in tandem with a `ViewSwitcher` in the `HeaderBar`:\n * - **Wide** (> 550 px): show the `ViewSwitcher` in the header, hide the bar.\n * - **Narrow** (≤ 550 px): hide the header switcher, reveal the bar.\n *\n * @example\n * const { isMedium } = useBreakpoint();\n * <>\n * <HeaderBar\n * title={\n * !isMedium && (\n * <ViewSwitcher aria-label=\"View\">…items…</ViewSwitcher>\n * )\n * }\n * />\n * <ViewSwitcherBar reveal={isMedium}>…items…</ViewSwitcherBar>\n * </>\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.ViewSwitcherBar.html\n */\nexport const ViewSwitcherBar = ({\n children,\n reveal = true,\n className,\n ...props\n}: ViewSwitcherBarProps) => {\n if (!reveal) {\n return null;\n }\n\n return (\n <div\n role=\"navigation\"\n aria-label=\"Bottom navigation\"\n className={[styles.bar, className].filter(Boolean).join(' ')}\n {...props}\n >\n {children}\n </div>\n );\n};\n"],"mappings":";;;AAyCA,IAAa,KAAmB,EAC9B,aACA,YAAS,IACT,cACA,GAAG,QAEE,IAKH,kBAAC,OAAD;CACE,MAAK;CACL,cAAW;CACX,WAAW,CAAC,EAAO,KAAK,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;CAC3D,GAAI;CAEH;AACE,CAAA,IAXE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./ViewSwitcherBar/ViewSwitcherBar.cjs");exports.ViewSwitcherBar=e.ViewSwitcherBar;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(
|
|
1
|
+
const e=require("./ViewSwitcherSidebar.module.css.cjs");let t=require("react"),n=require("react/jsx-runtime");var r=(0,t.createContext)(null);function i(){let e=(0,t.useContext)(r);if(!e)throw Error(`ViewSwitcherSidebarItem must be used inside ViewSwitcherSidebar`);return e}var a=({value:i,onValueChange:a,"aria-label":o=`Views`,collapsed:s=!1,header:c,footer:l,showHeaderSeparator:u=!0,showFooterSeparator:d=!0,children:f,className:p,...m})=>{let h=(0,t.useRef)(null);function g(e){let t=Array.from(h.current?.querySelectorAll(`[role=radio]:not(:disabled)`)??[]),n=document.activeElement,r=n instanceof HTMLButtonElement?t.indexOf(n):-1;if(r===-1)return;let i=r;if(e.key===`ArrowDown`||e.key===`ArrowRight`)i=(r+1)%t.length;else if(e.key===`ArrowUp`||e.key===`ArrowLeft`)i=(r-1+t.length)%t.length;else if(e.key===`Home`)i=0;else if(e.key===`End`)i=t.length-1;else return;e.preventDefault(),t[i].focus(),t[i].click()}return(0,n.jsx)(r.Provider,{value:{value:i,onValueChange:a,collapsed:s},children:(0,n.jsxs)(`nav`,{className:[e.default.sidebar,s?e.default.sidebarCollapsed:null,u?null:e.default.noHeaderSeparator,d?null:e.default.noFooterSeparator,p].filter(Boolean).join(` `),onKeyDown:g,...m,children:[c&&(0,n.jsx)(`div`,{className:e.default.header,children:c}),(0,n.jsx)(`ul`,{ref:h,role:`radiogroup`,"aria-label":o,className:e.default.list,children:f}),l&&(0,n.jsx)(`div`,{className:e.default.footer,children:l})]})})};exports.ViewSwitcherSidebar=a,exports.useViewSwitcherSidebar=i;
|
|
2
2
|
//# sourceMappingURL=ViewSwitcherSidebar.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewSwitcherSidebar.cjs","names":[],"sources":["../../../src/components/ViewSwitcherSidebar/ViewSwitcherSidebar.tsx"],"sourcesContent":["import {\n createContext,\n type HTMLAttributes,\n type KeyboardEvent,\n type ReactNode,\n useContext,\n useRef,\n} from 'react';\n\nimport styles from './ViewSwitcherSidebar.module.css';\n\n// ─── Context ──────────────────────────────────────────────────────────────────\n\ninterface ViewSwitcherSidebarContextValue {\n value: string;\n onValueChange: (value: string) => void;\n collapsed: boolean;\n}\n\nconst ViewSwitcherSidebarContext = createContext<ViewSwitcherSidebarContextValue | null>(null);\n\n// eslint-disable-next-line react-refresh/only-export-components\nexport function useViewSwitcherSidebar() {\n const ctx = useContext(ViewSwitcherSidebarContext);\n\n if (!ctx) {\n throw new Error('ViewSwitcherSidebarItem must be used inside ViewSwitcherSidebar');\n }\n\n return ctx;\n}\n\n// ─── Component ────────────────────────────────────────────────────────────────\n\nexport interface ViewSwitcherSidebarProps extends HTMLAttributes<HTMLElement> {\n /** Name of the currently active view. */\n value: string;\n /** Called with the new view name when the user selects an item. */\n onValueChange: (value: string) => void;\n /** Accessible label for the group. Defaults to `\"Views\"`. */\n 'aria-label'?: string;\n /**\n * When `true`, items render icon-only (labels hidden) and the sidebar\n * shrinks to its compact width. Used by `AdaptiveLayout` on tablet viewports.\n */\n collapsed?: boolean;\n /** Rendered above the scrollable item list (e.g. user card). */\n header?: ReactNode;\n /** Rendered below the scrollable item list (e.g. collapse toggle). */\n footer?: ReactNode;\n /** Show the separator line below the header slot. Defaults to `true`. */\n showHeaderSeparator?: boolean;\n /** Show the separator line above the footer slot. Defaults to `true`. */\n showFooterSeparator?: boolean;\n children?: ReactNode;\n}\n\n/**\n * Sidebar-style view switcher for apps with more than 4 top-level views,\n * or when the sidebar layout fits better than a header-bar `ViewSwitcher`.\n *\n * Mirrors `AdwViewSwitcherSidebar` (libadwaita 1.9 / GNOME 50), the modern\n * replacement for `GtkStackSidebar`.\n *\n * Compose with `ViewSwitcherSidebarItem` for each view. The active item is\n * highlighted with the accent colour; keyboard ↑ / ↓ cycles through items.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.ViewSwitcherSidebar.html\n *\n * @example\n * ```tsx\n * <ViewSwitcherSidebar value={view} onValueChange={setView}>\n * <ViewSwitcherSidebarItem name=\"photos\" label=\"Photos\" icon={MediaPlay} />\n * <ViewSwitcherSidebarItem name=\"albums\" label=\"Albums\" icon={Star} count={12} />\n * </ViewSwitcherSidebar>\n * ```\n */\nexport
|
|
1
|
+
{"version":3,"file":"ViewSwitcherSidebar.cjs","names":[],"sources":["../../../src/components/ViewSwitcherSidebar/ViewSwitcherSidebar.tsx"],"sourcesContent":["import {\n createContext,\n type HTMLAttributes,\n type KeyboardEvent,\n type ReactNode,\n useContext,\n useRef,\n} from 'react';\n\nimport styles from './ViewSwitcherSidebar.module.css';\n\n// ─── Context ──────────────────────────────────────────────────────────────────\n\ninterface ViewSwitcherSidebarContextValue {\n value: string;\n onValueChange: (value: string) => void;\n collapsed: boolean;\n}\n\nconst ViewSwitcherSidebarContext = createContext<ViewSwitcherSidebarContextValue | null>(null);\n\n// eslint-disable-next-line react-refresh/only-export-components\nexport function useViewSwitcherSidebar() {\n const ctx = useContext(ViewSwitcherSidebarContext);\n\n if (!ctx) {\n throw new Error('ViewSwitcherSidebarItem must be used inside ViewSwitcherSidebar');\n }\n\n return ctx;\n}\n\n// ─── Component ────────────────────────────────────────────────────────────────\n\nexport interface ViewSwitcherSidebarProps extends HTMLAttributes<HTMLElement> {\n /** Name of the currently active view. */\n value: string;\n /** Called with the new view name when the user selects an item. */\n onValueChange: (value: string) => void;\n /** Accessible label for the group. Defaults to `\"Views\"`. */\n 'aria-label'?: string;\n /**\n * When `true`, items render icon-only (labels hidden) and the sidebar\n * shrinks to its compact width. Used by `AdaptiveLayout` on tablet viewports.\n */\n collapsed?: boolean;\n /** Rendered above the scrollable item list (e.g. user card). */\n header?: ReactNode;\n /** Rendered below the scrollable item list (e.g. collapse toggle). */\n footer?: ReactNode;\n /** Show the separator line below the header slot. Defaults to `true`. */\n showHeaderSeparator?: boolean;\n /** Show the separator line above the footer slot. Defaults to `true`. */\n showFooterSeparator?: boolean;\n children?: ReactNode;\n}\n\n/**\n * Sidebar-style view switcher for apps with more than 4 top-level views,\n * or when the sidebar layout fits better than a header-bar `ViewSwitcher`.\n *\n * Mirrors `AdwViewSwitcherSidebar` (libadwaita 1.9 / GNOME 50), the modern\n * replacement for `GtkStackSidebar`.\n *\n * Compose with `ViewSwitcherSidebarItem` for each view. The active item is\n * highlighted with the accent colour; keyboard ↑ / ↓ cycles through items.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.ViewSwitcherSidebar.html\n *\n * @example\n * ```tsx\n * <ViewSwitcherSidebar value={view} onValueChange={setView}>\n * <ViewSwitcherSidebarItem name=\"photos\" label=\"Photos\" icon={MediaPlay} />\n * <ViewSwitcherSidebarItem name=\"albums\" label=\"Albums\" icon={Star} count={12} />\n * </ViewSwitcherSidebar>\n * ```\n */\nexport const ViewSwitcherSidebar = ({\n value,\n onValueChange,\n 'aria-label': ariaLabel = 'Views',\n collapsed = false,\n header,\n footer,\n showHeaderSeparator = true,\n showFooterSeparator = true,\n children,\n className,\n ...props\n}: ViewSwitcherSidebarProps) => {\n const groupRef = useRef<HTMLUListElement>(null);\n\n function handleKeyDown(e: KeyboardEvent<HTMLElement>) {\n const items = Array.from(\n groupRef.current?.querySelectorAll<HTMLButtonElement>('[role=radio]:not(:disabled)') ?? [],\n );\n const activeElement = document.activeElement;\n const idx = activeElement instanceof HTMLButtonElement ? items.indexOf(activeElement) : -1;\n\n if (idx === -1) {\n return;\n }\n\n let next = idx;\n if (e.key === 'ArrowDown' || e.key === 'ArrowRight') {\n next = (idx + 1) % items.length;\n } else if (e.key === 'ArrowUp' || e.key === 'ArrowLeft') {\n next = (idx - 1 + items.length) % items.length;\n } else if (e.key === 'Home') {\n next = 0;\n } else if (e.key === 'End') {\n next = items.length - 1;\n } else {\n return;\n }\n\n e.preventDefault();\n items[next].focus();\n items[next].click();\n }\n\n return (\n <ViewSwitcherSidebarContext.Provider value={{ value, onValueChange, collapsed }}>\n <nav\n className={[\n styles.sidebar,\n collapsed ? styles.sidebarCollapsed : null,\n !showHeaderSeparator ? styles.noHeaderSeparator : null,\n !showFooterSeparator ? styles.noFooterSeparator : null,\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n onKeyDown={handleKeyDown}\n {...props}\n >\n {header && <div className={styles.header}>{header}</div>}\n <ul ref={groupRef} role=\"radiogroup\" aria-label={ariaLabel} className={styles.list}>\n {children}\n </ul>\n {footer && <div className={styles.footer}>{footer}</div>}\n </nav>\n </ViewSwitcherSidebarContext.Provider>\n );\n};\n"],"mappings":"8GAmBA,IAAM,GAAA,EAAA,EAAA,eAAmF,IAAI,EAG7F,SAAgB,GAAyB,CACvC,IAAM,GAAA,EAAA,EAAA,YAAiB,CAA0B,EAEjD,GAAI,CAAC,EACH,MAAU,MAAM,iEAAiE,EAGnF,OAAO,CACT,CA+CA,IAAa,GAAuB,CAClC,QACA,gBACA,aAAc,EAAY,QAC1B,YAAY,GACZ,SACA,SACA,sBAAsB,GACtB,sBAAsB,GACtB,WACA,YACA,GAAG,KAC2B,CAC9B,IAAM,GAAA,EAAA,EAAA,QAAoC,IAAI,EAE9C,SAAS,EAAc,EAA+B,CACpD,IAAM,EAAQ,MAAM,KAClB,EAAS,SAAS,iBAAoC,6BAA6B,GAAK,CAAC,CAC3F,EACM,EAAgB,SAAS,cACzB,EAAM,aAAyB,kBAAoB,EAAM,QAAQ,CAAa,EAAI,GAExF,GAAI,IAAQ,GACV,OAGF,IAAI,EAAO,EACX,GAAI,EAAE,MAAQ,aAAe,EAAE,MAAQ,aACrC,GAAQ,EAAM,GAAK,EAAM,YACpB,GAAI,EAAE,MAAQ,WAAa,EAAE,MAAQ,YAC1C,GAAQ,EAAM,EAAI,EAAM,QAAU,EAAM,YACnC,GAAI,EAAE,MAAQ,OACnB,EAAO,OACF,GAAI,EAAE,MAAQ,MACnB,EAAO,EAAM,OAAS,OAEtB,OAGF,EAAE,eAAe,EACjB,EAAM,GAAM,MAAM,EAClB,EAAM,GAAM,MAAM,CACpB,CAEA,OACE,EAAA,EAAA,KAAC,EAA2B,SAA5B,CAAqC,MAAO,CAAE,QAAO,gBAAe,WAAU,YAC5E,EAAA,EAAA,MAAC,MAAD,CACE,UAAW,CACT,EAAA,QAAO,QACP,EAAY,EAAA,QAAO,iBAAmB,KACrC,EAAiD,KAA3B,EAAA,QAAO,kBAC7B,EAAiD,KAA3B,EAAA,QAAO,kBAC9B,CACF,EACG,OAAO,OAAO,EACd,KAAK,GAAG,EACX,UAAW,EACX,GAAI,WAXN,CAaG,IAAU,EAAA,EAAA,KAAC,MAAD,CAAK,UAAW,EAAA,QAAO,gBAAS,CAAY,CAAA,GACvD,EAAA,EAAA,KAAC,KAAD,CAAI,IAAK,EAAU,KAAK,aAAa,aAAY,EAAW,UAAW,EAAA,QAAO,KAC3E,UACC,CAAA,EACH,IAAU,EAAA,EAAA,KAAC,MAAD,CAAK,UAAW,EAAA,QAAO,gBAAS,CAAY,CAAA,CACpD,GAC8B,CAAA,CAEzC"}
|
|
@@ -47,5 +47,5 @@ export interface ViewSwitcherSidebarProps extends HTMLAttributes<HTMLElement> {
|
|
|
47
47
|
* </ViewSwitcherSidebar>
|
|
48
48
|
* ```
|
|
49
49
|
*/
|
|
50
|
-
export declare
|
|
50
|
+
export declare const ViewSwitcherSidebar: ({ value, onValueChange, "aria-label": ariaLabel, collapsed, header, footer, showHeaderSeparator, showFooterSeparator, children, className, ...props }: ViewSwitcherSidebarProps) => import("react/jsx-runtime").JSX.Element;
|
|
51
51
|
export {};
|
|
@@ -8,7 +8,7 @@ function s() {
|
|
|
8
8
|
if (!e) throw Error("ViewSwitcherSidebarItem must be used inside ViewSwitcherSidebar");
|
|
9
9
|
return e;
|
|
10
10
|
}
|
|
11
|
-
|
|
11
|
+
var c = ({ value: t, onValueChange: n, "aria-label": s = "Views", collapsed: c = !1, header: l, footer: u, showHeaderSeparator: d = !0, showFooterSeparator: f = !0, children: p, className: m, ...h }) => {
|
|
12
12
|
let g = r(null);
|
|
13
13
|
function _(e) {
|
|
14
14
|
let t = Array.from(g.current?.querySelectorAll("[role=radio]:not(:disabled)") ?? []), n = document.activeElement, r = n instanceof HTMLButtonElement ? t.indexOf(n) : -1;
|
|
@@ -56,7 +56,7 @@ function c({ value: t, onValueChange: n, "aria-label": s = "Views", collapsed: c
|
|
|
56
56
|
]
|
|
57
57
|
})
|
|
58
58
|
});
|
|
59
|
-
}
|
|
59
|
+
};
|
|
60
60
|
//#endregion
|
|
61
61
|
export { c as ViewSwitcherSidebar, s as useViewSwitcherSidebar };
|
|
62
62
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewSwitcherSidebar.js","names":[],"sources":["../../../src/components/ViewSwitcherSidebar/ViewSwitcherSidebar.tsx"],"sourcesContent":["import {\n createContext,\n type HTMLAttributes,\n type KeyboardEvent,\n type ReactNode,\n useContext,\n useRef,\n} from 'react';\n\nimport styles from './ViewSwitcherSidebar.module.css';\n\n// ─── Context ──────────────────────────────────────────────────────────────────\n\ninterface ViewSwitcherSidebarContextValue {\n value: string;\n onValueChange: (value: string) => void;\n collapsed: boolean;\n}\n\nconst ViewSwitcherSidebarContext = createContext<ViewSwitcherSidebarContextValue | null>(null);\n\n// eslint-disable-next-line react-refresh/only-export-components\nexport function useViewSwitcherSidebar() {\n const ctx = useContext(ViewSwitcherSidebarContext);\n\n if (!ctx) {\n throw new Error('ViewSwitcherSidebarItem must be used inside ViewSwitcherSidebar');\n }\n\n return ctx;\n}\n\n// ─── Component ────────────────────────────────────────────────────────────────\n\nexport interface ViewSwitcherSidebarProps extends HTMLAttributes<HTMLElement> {\n /** Name of the currently active view. */\n value: string;\n /** Called with the new view name when the user selects an item. */\n onValueChange: (value: string) => void;\n /** Accessible label for the group. Defaults to `\"Views\"`. */\n 'aria-label'?: string;\n /**\n * When `true`, items render icon-only (labels hidden) and the sidebar\n * shrinks to its compact width. Used by `AdaptiveLayout` on tablet viewports.\n */\n collapsed?: boolean;\n /** Rendered above the scrollable item list (e.g. user card). */\n header?: ReactNode;\n /** Rendered below the scrollable item list (e.g. collapse toggle). */\n footer?: ReactNode;\n /** Show the separator line below the header slot. Defaults to `true`. */\n showHeaderSeparator?: boolean;\n /** Show the separator line above the footer slot. Defaults to `true`. */\n showFooterSeparator?: boolean;\n children?: ReactNode;\n}\n\n/**\n * Sidebar-style view switcher for apps with more than 4 top-level views,\n * or when the sidebar layout fits better than a header-bar `ViewSwitcher`.\n *\n * Mirrors `AdwViewSwitcherSidebar` (libadwaita 1.9 / GNOME 50), the modern\n * replacement for `GtkStackSidebar`.\n *\n * Compose with `ViewSwitcherSidebarItem` for each view. The active item is\n * highlighted with the accent colour; keyboard ↑ / ↓ cycles through items.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.ViewSwitcherSidebar.html\n *\n * @example\n * ```tsx\n * <ViewSwitcherSidebar value={view} onValueChange={setView}>\n * <ViewSwitcherSidebarItem name=\"photos\" label=\"Photos\" icon={MediaPlay} />\n * <ViewSwitcherSidebarItem name=\"albums\" label=\"Albums\" icon={Star} count={12} />\n * </ViewSwitcherSidebar>\n * ```\n */\nexport
|
|
1
|
+
{"version":3,"file":"ViewSwitcherSidebar.js","names":[],"sources":["../../../src/components/ViewSwitcherSidebar/ViewSwitcherSidebar.tsx"],"sourcesContent":["import {\n createContext,\n type HTMLAttributes,\n type KeyboardEvent,\n type ReactNode,\n useContext,\n useRef,\n} from 'react';\n\nimport styles from './ViewSwitcherSidebar.module.css';\n\n// ─── Context ──────────────────────────────────────────────────────────────────\n\ninterface ViewSwitcherSidebarContextValue {\n value: string;\n onValueChange: (value: string) => void;\n collapsed: boolean;\n}\n\nconst ViewSwitcherSidebarContext = createContext<ViewSwitcherSidebarContextValue | null>(null);\n\n// eslint-disable-next-line react-refresh/only-export-components\nexport function useViewSwitcherSidebar() {\n const ctx = useContext(ViewSwitcherSidebarContext);\n\n if (!ctx) {\n throw new Error('ViewSwitcherSidebarItem must be used inside ViewSwitcherSidebar');\n }\n\n return ctx;\n}\n\n// ─── Component ────────────────────────────────────────────────────────────────\n\nexport interface ViewSwitcherSidebarProps extends HTMLAttributes<HTMLElement> {\n /** Name of the currently active view. */\n value: string;\n /** Called with the new view name when the user selects an item. */\n onValueChange: (value: string) => void;\n /** Accessible label for the group. Defaults to `\"Views\"`. */\n 'aria-label'?: string;\n /**\n * When `true`, items render icon-only (labels hidden) and the sidebar\n * shrinks to its compact width. Used by `AdaptiveLayout` on tablet viewports.\n */\n collapsed?: boolean;\n /** Rendered above the scrollable item list (e.g. user card). */\n header?: ReactNode;\n /** Rendered below the scrollable item list (e.g. collapse toggle). */\n footer?: ReactNode;\n /** Show the separator line below the header slot. Defaults to `true`. */\n showHeaderSeparator?: boolean;\n /** Show the separator line above the footer slot. Defaults to `true`. */\n showFooterSeparator?: boolean;\n children?: ReactNode;\n}\n\n/**\n * Sidebar-style view switcher for apps with more than 4 top-level views,\n * or when the sidebar layout fits better than a header-bar `ViewSwitcher`.\n *\n * Mirrors `AdwViewSwitcherSidebar` (libadwaita 1.9 / GNOME 50), the modern\n * replacement for `GtkStackSidebar`.\n *\n * Compose with `ViewSwitcherSidebarItem` for each view. The active item is\n * highlighted with the accent colour; keyboard ↑ / ↓ cycles through items.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.ViewSwitcherSidebar.html\n *\n * @example\n * ```tsx\n * <ViewSwitcherSidebar value={view} onValueChange={setView}>\n * <ViewSwitcherSidebarItem name=\"photos\" label=\"Photos\" icon={MediaPlay} />\n * <ViewSwitcherSidebarItem name=\"albums\" label=\"Albums\" icon={Star} count={12} />\n * </ViewSwitcherSidebar>\n * ```\n */\nexport const ViewSwitcherSidebar = ({\n value,\n onValueChange,\n 'aria-label': ariaLabel = 'Views',\n collapsed = false,\n header,\n footer,\n showHeaderSeparator = true,\n showFooterSeparator = true,\n children,\n className,\n ...props\n}: ViewSwitcherSidebarProps) => {\n const groupRef = useRef<HTMLUListElement>(null);\n\n function handleKeyDown(e: KeyboardEvent<HTMLElement>) {\n const items = Array.from(\n groupRef.current?.querySelectorAll<HTMLButtonElement>('[role=radio]:not(:disabled)') ?? [],\n );\n const activeElement = document.activeElement;\n const idx = activeElement instanceof HTMLButtonElement ? items.indexOf(activeElement) : -1;\n\n if (idx === -1) {\n return;\n }\n\n let next = idx;\n if (e.key === 'ArrowDown' || e.key === 'ArrowRight') {\n next = (idx + 1) % items.length;\n } else if (e.key === 'ArrowUp' || e.key === 'ArrowLeft') {\n next = (idx - 1 + items.length) % items.length;\n } else if (e.key === 'Home') {\n next = 0;\n } else if (e.key === 'End') {\n next = items.length - 1;\n } else {\n return;\n }\n\n e.preventDefault();\n items[next].focus();\n items[next].click();\n }\n\n return (\n <ViewSwitcherSidebarContext.Provider value={{ value, onValueChange, collapsed }}>\n <nav\n className={[\n styles.sidebar,\n collapsed ? styles.sidebarCollapsed : null,\n !showHeaderSeparator ? styles.noHeaderSeparator : null,\n !showFooterSeparator ? styles.noFooterSeparator : null,\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n onKeyDown={handleKeyDown}\n {...props}\n >\n {header && <div className={styles.header}>{header}</div>}\n <ul ref={groupRef} role=\"radiogroup\" aria-label={ariaLabel} className={styles.list}>\n {children}\n </ul>\n {footer && <div className={styles.footer}>{footer}</div>}\n </nav>\n </ViewSwitcherSidebarContext.Provider>\n );\n};\n"],"mappings":";;;;AAmBA,IAAM,IAA6B,EAAsD,IAAI;AAG7F,SAAgB,IAAyB;CACvC,IAAM,IAAM,EAAW,CAA0B;CAEjD,IAAI,CAAC,GACH,MAAU,MAAM,iEAAiE;CAGnF,OAAO;AACT;AA+CA,IAAa,KAAuB,EAClC,UACA,kBACA,cAAc,IAAY,SAC1B,eAAY,IACZ,WACA,WACA,yBAAsB,IACtB,yBAAsB,IACtB,aACA,cACA,GAAG,QAC2B;CAC9B,IAAM,IAAW,EAAyB,IAAI;CAE9C,SAAS,EAAc,GAA+B;EACpD,IAAM,IAAQ,MAAM,KAClB,EAAS,SAAS,iBAAoC,6BAA6B,KAAK,CAAC,CAC3F,GACM,IAAgB,SAAS,eACzB,IAAM,aAAyB,oBAAoB,EAAM,QAAQ,CAAa,IAAI;EAExF,IAAI,MAAQ,IACV;EAGF,IAAI,IAAO;EACX,IAAI,EAAE,QAAQ,eAAe,EAAE,QAAQ,cACrC,KAAQ,IAAM,KAAK,EAAM;OACpB,IAAI,EAAE,QAAQ,aAAa,EAAE,QAAQ,aAC1C,KAAQ,IAAM,IAAI,EAAM,UAAU,EAAM;OACnC,IAAI,EAAE,QAAQ,QACnB,IAAO;OACF,IAAI,EAAE,QAAQ,OACnB,IAAO,EAAM,SAAS;OAEtB;EAKF,AAFA,EAAE,eAAe,GACjB,EAAM,GAAM,MAAM,GAClB,EAAM,GAAM,MAAM;CACpB;CAEA,OACE,kBAAC,EAA2B,UAA5B;EAAqC,OAAO;GAAE;GAAO;GAAe;EAAU;YAC5E,kBAAC,OAAD;GACE,WAAW;IACT,EAAO;IACP,IAAY,EAAO,mBAAmB;IACrC,IAAiD,OAA3B,EAAO;IAC7B,IAAiD,OAA3B,EAAO;IAC9B;GACF,EACG,OAAO,OAAO,EACd,KAAK,GAAG;GACX,WAAW;GACX,GAAI;aAXN;IAaG,KAAU,kBAAC,OAAD;KAAK,WAAW,EAAO;eAAS;IAAY,CAAA;IACvD,kBAAC,MAAD;KAAI,KAAK;KAAU,MAAK;KAAa,cAAY;KAAW,WAAW,EAAO;KAC3E;IACC,CAAA;IACH,KAAU,kBAAC,OAAD;KAAK,WAAW,EAAO;eAAS;IAAY,CAAA;GACpD;;CAC8B,CAAA;AAEzC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(
|
|
1
|
+
const e=require("../Icon/Icon.cjs"),t=require("./ViewSwitcherSidebar.module.css.cjs"),n=require("./ViewSwitcherSidebar.cjs");let r=require("react/jsx-runtime");var i=({name:i,label:a,icon:o,count:s,suffix:c,disabled:l,className:u,...d})=>{let{value:f,onValueChange:p,collapsed:m}=n.useViewSwitcherSidebar(),h=f===i,g=c??s??null;return(0,r.jsx)(`li`,{className:t.default.item,children:(0,r.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":h,tabIndex:h?0:-1,disabled:l,onClick:()=>p(i),className:[t.default.itemBtn,h?t.default.active:null,u].filter(Boolean).join(` `),...d,children:[o&&(0,r.jsx)(`span`,{className:t.default.itemIcon,children:(0,r.jsx)(e.Icon,{icon:o,size:`md`,"aria-hidden":!0})}),!m&&(0,r.jsx)(`span`,{className:t.default.itemLabel,children:a}),!m&&g!=null&&(0,r.jsx)(`span`,{className:t.default.itemSuffix,children:typeof g==`number`?(0,r.jsx)(`span`,{className:t.default.count,children:g>99?`99+`:g}):g})]})})};exports.ViewSwitcherSidebarItem=i;
|
|
2
2
|
//# sourceMappingURL=ViewSwitcherSidebarItem.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewSwitcherSidebarItem.cjs","names":[],"sources":["../../../src/components/ViewSwitcherSidebar/ViewSwitcherSidebarItem.tsx"],"sourcesContent":["import type { IconDefinition } from '@gnome-ui/icons';\nimport type { ButtonHTMLAttributes, ReactNode } from 'react';\n\nimport { Icon } from '../Icon';\n\nimport { useViewSwitcherSidebar } from './ViewSwitcherSidebar';\nimport styles from './ViewSwitcherSidebar.module.css';\n\nexport interface ViewSwitcherSidebarItemProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n /** String identifier — matched against the group's `value`. */\n name: string;\n /** View label. */\n label: string;\n /** Icon from `@gnome-ui/icons`. */\n icon?: IconDefinition;\n /**\n * Optional trailing count (unread messages, items…).\n * Rendered as a small badge at the trailing edge.\n */\n count?: number;\n /**\n * Optional trailing widget. Takes precedence over `count`.\n * Use for custom badges, buttons, or status indicators.\n */\n suffix?: ReactNode;\n}\n\n/**\n * Individual view item inside a `ViewSwitcherSidebar`.\n *\n * Renders as `role=\"radio\"`. Only the active item is in the natural Tab order;\n * all others use `tabIndex={-1}` and are reached via arrow-key navigation.\n */\nexport
|
|
1
|
+
{"version":3,"file":"ViewSwitcherSidebarItem.cjs","names":[],"sources":["../../../src/components/ViewSwitcherSidebar/ViewSwitcherSidebarItem.tsx"],"sourcesContent":["import type { IconDefinition } from '@gnome-ui/icons';\nimport type { ButtonHTMLAttributes, ReactNode } from 'react';\n\nimport { Icon } from '../Icon';\n\nimport { useViewSwitcherSidebar } from './ViewSwitcherSidebar';\nimport styles from './ViewSwitcherSidebar.module.css';\n\nexport interface ViewSwitcherSidebarItemProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n /** String identifier — matched against the group's `value`. */\n name: string;\n /** View label. */\n label: string;\n /** Icon from `@gnome-ui/icons`. */\n icon?: IconDefinition;\n /**\n * Optional trailing count (unread messages, items…).\n * Rendered as a small badge at the trailing edge.\n */\n count?: number;\n /**\n * Optional trailing widget. Takes precedence over `count`.\n * Use for custom badges, buttons, or status indicators.\n */\n suffix?: ReactNode;\n}\n\n/**\n * Individual view item inside a `ViewSwitcherSidebar`.\n *\n * Renders as `role=\"radio\"`. Only the active item is in the natural Tab order;\n * all others use `tabIndex={-1}` and are reached via arrow-key navigation.\n */\nexport const ViewSwitcherSidebarItem = ({\n name,\n label,\n icon,\n count,\n suffix,\n disabled,\n className,\n ...props\n}: ViewSwitcherSidebarItemProps) => {\n const { value, onValueChange, collapsed } = useViewSwitcherSidebar();\n const active = value === name;\n const trailing = suffix ?? (count !== null && count !== undefined ? count : null);\n\n return (\n <li className={styles.item}>\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={[styles.itemBtn, active ? styles.active : null, className]\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 {!collapsed && <span className={styles.itemLabel}>{label}</span>}\n {!collapsed && trailing !== null && trailing !== undefined && (\n <span className={styles.itemSuffix}>\n {typeof trailing === 'number' ? (\n <span className={styles.count}>{trailing > 99 ? '99+' : trailing}</span>\n ) : (\n trailing\n )}\n </span>\n )}\n </button>\n </li>\n );\n};\n"],"mappings":"gKAiCA,IAAa,GAA2B,CACtC,OACA,QACA,OACA,QACA,SACA,WACA,YACA,GAAG,KAC+B,CAClC,GAAM,CAAE,QAAO,gBAAe,aAAc,EAAA,uBAAuB,EAC7D,EAAS,IAAU,EACnB,EAAW,GAAW,GAAgD,KAE5E,OACE,EAAA,EAAA,KAAC,KAAD,CAAI,UAAW,EAAA,QAAO,eACpB,EAAA,EAAA,MAAC,SAAD,CACE,KAAK,SACL,KAAK,QACL,eAAc,EACd,SAAU,EAAS,EAAI,GACb,WACV,YAAe,EAAc,CAAI,EACjC,UAAW,CAAC,EAAA,QAAO,QAAS,EAAS,EAAA,QAAO,OAAS,KAAM,CAAS,EACjE,OAAO,OAAO,EACd,KAAK,GAAG,EACX,GAAI,WAVN,CAYG,IACC,EAAA,EAAA,KAAC,OAAD,CAAM,UAAW,EAAA,QAAO,mBACtB,EAAA,EAAA,KAAC,EAAA,KAAD,CAAY,OAAM,KAAK,KAAK,cAAA,EAAa,CAAA,CACrC,CAAA,EAEP,CAAC,IAAa,EAAA,EAAA,KAAC,OAAD,CAAM,UAAW,EAAA,QAAO,mBAAY,CAAY,CAAA,EAC9D,CAAC,GAAa,GAAa,OAC1B,EAAA,EAAA,KAAC,OAAD,CAAM,UAAW,EAAA,QAAO,oBACrB,OAAO,GAAa,UACnB,EAAA,EAAA,KAAC,OAAD,CAAM,UAAW,EAAA,QAAO,eAAQ,EAAW,GAAK,MAAQ,CAAe,CAAA,EAEvE,CAEE,CAAA,CAEF,GACN,CAAA,CAER"}
|
|
@@ -24,4 +24,4 @@ export interface ViewSwitcherSidebarItemProps extends ButtonHTMLAttributes<HTMLB
|
|
|
24
24
|
* Renders as `role="radio"`. Only the active item is in the natural Tab order;
|
|
25
25
|
* all others use `tabIndex={-1}` and are reached via arrow-key navigation.
|
|
26
26
|
*/
|
|
27
|
-
export declare
|
|
27
|
+
export declare const ViewSwitcherSidebarItem: ({ name, label, icon, count, suffix, disabled, className, ...props }: ViewSwitcherSidebarItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,7 +3,7 @@ import t from "./ViewSwitcherSidebar.module.css.js";
|
|
|
3
3
|
import { useViewSwitcherSidebar as n } from "./ViewSwitcherSidebar.js";
|
|
4
4
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/ViewSwitcherSidebar/ViewSwitcherSidebarItem.tsx
|
|
6
|
-
|
|
6
|
+
var a = ({ name: a, label: o, icon: s, count: c, suffix: l, disabled: u, className: d, ...f }) => {
|
|
7
7
|
let { value: p, onValueChange: m, collapsed: h } = n(), g = p === a, _ = l ?? c ?? null;
|
|
8
8
|
return /* @__PURE__ */ r("li", {
|
|
9
9
|
className: t.item,
|
|
@@ -43,7 +43,7 @@ function a({ name: a, label: o, icon: s, count: c, suffix: l, disabled: u, class
|
|
|
43
43
|
]
|
|
44
44
|
})
|
|
45
45
|
});
|
|
46
|
-
}
|
|
46
|
+
};
|
|
47
47
|
//#endregion
|
|
48
48
|
export { a as ViewSwitcherSidebarItem };
|
|
49
49
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewSwitcherSidebarItem.js","names":[],"sources":["../../../src/components/ViewSwitcherSidebar/ViewSwitcherSidebarItem.tsx"],"sourcesContent":["import type { IconDefinition } from '@gnome-ui/icons';\nimport type { ButtonHTMLAttributes, ReactNode } from 'react';\n\nimport { Icon } from '../Icon';\n\nimport { useViewSwitcherSidebar } from './ViewSwitcherSidebar';\nimport styles from './ViewSwitcherSidebar.module.css';\n\nexport interface ViewSwitcherSidebarItemProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n /** String identifier — matched against the group's `value`. */\n name: string;\n /** View label. */\n label: string;\n /** Icon from `@gnome-ui/icons`. */\n icon?: IconDefinition;\n /**\n * Optional trailing count (unread messages, items…).\n * Rendered as a small badge at the trailing edge.\n */\n count?: number;\n /**\n * Optional trailing widget. Takes precedence over `count`.\n * Use for custom badges, buttons, or status indicators.\n */\n suffix?: ReactNode;\n}\n\n/**\n * Individual view item inside a `ViewSwitcherSidebar`.\n *\n * Renders as `role=\"radio\"`. Only the active item is in the natural Tab order;\n * all others use `tabIndex={-1}` and are reached via arrow-key navigation.\n */\nexport
|
|
1
|
+
{"version":3,"file":"ViewSwitcherSidebarItem.js","names":[],"sources":["../../../src/components/ViewSwitcherSidebar/ViewSwitcherSidebarItem.tsx"],"sourcesContent":["import type { IconDefinition } from '@gnome-ui/icons';\nimport type { ButtonHTMLAttributes, ReactNode } from 'react';\n\nimport { Icon } from '../Icon';\n\nimport { useViewSwitcherSidebar } from './ViewSwitcherSidebar';\nimport styles from './ViewSwitcherSidebar.module.css';\n\nexport interface ViewSwitcherSidebarItemProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n /** String identifier — matched against the group's `value`. */\n name: string;\n /** View label. */\n label: string;\n /** Icon from `@gnome-ui/icons`. */\n icon?: IconDefinition;\n /**\n * Optional trailing count (unread messages, items…).\n * Rendered as a small badge at the trailing edge.\n */\n count?: number;\n /**\n * Optional trailing widget. Takes precedence over `count`.\n * Use for custom badges, buttons, or status indicators.\n */\n suffix?: ReactNode;\n}\n\n/**\n * Individual view item inside a `ViewSwitcherSidebar`.\n *\n * Renders as `role=\"radio\"`. Only the active item is in the natural Tab order;\n * all others use `tabIndex={-1}` and are reached via arrow-key navigation.\n */\nexport const ViewSwitcherSidebarItem = ({\n name,\n label,\n icon,\n count,\n suffix,\n disabled,\n className,\n ...props\n}: ViewSwitcherSidebarItemProps) => {\n const { value, onValueChange, collapsed } = useViewSwitcherSidebar();\n const active = value === name;\n const trailing = suffix ?? (count !== null && count !== undefined ? count : null);\n\n return (\n <li className={styles.item}>\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={[styles.itemBtn, active ? styles.active : null, className]\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 {!collapsed && <span className={styles.itemLabel}>{label}</span>}\n {!collapsed && trailing !== null && trailing !== undefined && (\n <span className={styles.itemSuffix}>\n {typeof trailing === 'number' ? (\n <span className={styles.count}>{trailing > 99 ? '99+' : trailing}</span>\n ) : (\n trailing\n )}\n </span>\n )}\n </button>\n </li>\n );\n};\n"],"mappings":";;;;;AAiCA,IAAa,KAA2B,EACtC,SACA,UACA,SACA,UACA,WACA,aACA,cACA,GAAG,QAC+B;CAClC,IAAM,EAAE,UAAO,kBAAe,iBAAc,EAAuB,GAC7D,IAAS,MAAU,GACnB,IAAW,KAAW,KAAgD;CAE5E,OACE,kBAAC,MAAD;EAAI,WAAW,EAAO;YACpB,kBAAC,UAAD;GACE,MAAK;GACL,MAAK;GACL,gBAAc;GACd,UAAU,IAAS,IAAI;GACb;GACV,eAAe,EAAc,CAAI;GACjC,WAAW;IAAC,EAAO;IAAS,IAAS,EAAO,SAAS;IAAM;GAAS,EACjE,OAAO,OAAO,EACd,KAAK,GAAG;GACX,GAAI;aAVN;IAYG,KACC,kBAAC,QAAD;KAAM,WAAW,EAAO;eACtB,kBAAC,GAAD;MAAY;MAAM,MAAK;MAAK,eAAA;KAAa,CAAA;IACrC,CAAA;IAEP,CAAC,KAAa,kBAAC,QAAD;KAAM,WAAW,EAAO;eAAY;IAAY,CAAA;IAC9D,CAAC,KAAa,KAAa,QAC1B,kBAAC,QAAD;KAAM,WAAW,EAAO;eACrB,OAAO,KAAa,WACnB,kBAAC,QAAD;MAAM,WAAW,EAAO;gBAAQ,IAAW,KAAK,QAAQ;KAAe,CAAA,IAEvE;IAEE,CAAA;GAEF;;CACN,CAAA;AAER"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./ViewSwitcherSidebar/ViewSwitcherSidebar.cjs"),t=require("./ViewSwitcherSidebar/ViewSwitcherSidebarItem.cjs");exports.ViewSwitcherSidebar=e.ViewSwitcherSidebar,exports.ViewSwitcherSidebarItem=t.ViewSwitcherSidebarItem;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(
|
|
1
|
+
const e=require("./WindowTitle.module.css.cjs");let t=require("react/jsx-runtime");var n=({title:n,subtitle:r,className:i,...a})=>(0,t.jsxs)(`div`,{className:[e.default.windowTitle,i].filter(Boolean).join(` `),...a,children:[(0,t.jsx)(`span`,{className:e.default.title,children:n}),r&&(0,t.jsx)(`span`,{className:e.default.subtitle,children:r})]});exports.WindowTitle=n;
|
|
2
2
|
//# sourceMappingURL=WindowTitle.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WindowTitle.cjs","names":[],"sources":["../../../src/components/WindowTitle/WindowTitle.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react';\n\nimport styles from './WindowTitle.module.css';\n\nexport interface WindowTitleProps extends HTMLAttributes<HTMLDivElement> {\n /** Primary title — rendered in bold. */\n title: string;\n /** Secondary subtitle — rendered smaller and dimmed below the title. */\n subtitle?: string;\n}\n\n/**\n * Two-line title + subtitle widget for use inside a `HeaderBar`.\n *\n * Pass as the `title` prop of `HeaderBar` to get a centred two-line header\n * that shows an app name and current document/view name.\n *\n * Mirrors `AdwWindowTitle`.\n *\n * @example\n * ```tsx\n * <HeaderBar title={<WindowTitle title=\"Files\" subtitle=\"/home/user/Documents\" />} />\n * ```\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.WindowTitle.html\n */\nexport
|
|
1
|
+
{"version":3,"file":"WindowTitle.cjs","names":[],"sources":["../../../src/components/WindowTitle/WindowTitle.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react';\n\nimport styles from './WindowTitle.module.css';\n\nexport interface WindowTitleProps extends HTMLAttributes<HTMLDivElement> {\n /** Primary title — rendered in bold. */\n title: string;\n /** Secondary subtitle — rendered smaller and dimmed below the title. */\n subtitle?: string;\n}\n\n/**\n * Two-line title + subtitle widget for use inside a `HeaderBar`.\n *\n * Pass as the `title` prop of `HeaderBar` to get a centred two-line header\n * that shows an app name and current document/view name.\n *\n * Mirrors `AdwWindowTitle`.\n *\n * @example\n * ```tsx\n * <HeaderBar title={<WindowTitle title=\"Files\" subtitle=\"/home/user/Documents\" />} />\n * ```\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.WindowTitle.html\n */\nexport const WindowTitle = ({ title, subtitle, className, ...props }: WindowTitleProps) => {\n return (\n <div className={[styles.windowTitle, className].filter(Boolean).join(' ')} {...props}>\n <span className={styles.title}>{title}</span>\n {subtitle && <span className={styles.subtitle}>{subtitle}</span>}\n </div>\n );\n};\n"],"mappings":"mFA0BA,IAAa,GAAe,CAAE,QAAO,WAAU,YAAW,GAAG,MAEzD,EAAA,EAAA,MAAC,MAAD,CAAK,UAAW,CAAC,EAAA,QAAO,YAAa,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,EAAG,GAAI,WAA/E,EACE,EAAA,EAAA,KAAC,OAAD,CAAM,UAAW,EAAA,QAAO,eAAQ,CAAY,CAAA,EAC3C,IAAY,EAAA,EAAA,KAAC,OAAD,CAAM,UAAW,EAAA,QAAO,kBAAW,CAAe,CAAA,CAC5D"}
|
|
@@ -20,4 +20,4 @@ export interface WindowTitleProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
20
20
|
*
|
|
21
21
|
* @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.WindowTitle.html
|
|
22
22
|
*/
|
|
23
|
-
export declare
|
|
23
|
+
export declare const WindowTitle: ({ title, subtitle, className, ...props }: WindowTitleProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
import e from "./WindowTitle.module.css.js";
|
|
2
2
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
3
|
//#region src/components/WindowTitle/WindowTitle.tsx
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
});
|
|
16
|
-
}
|
|
4
|
+
var r = ({ title: r, subtitle: i, className: a, ...o }) => /* @__PURE__ */ n("div", {
|
|
5
|
+
className: [e.windowTitle, a].filter(Boolean).join(" "),
|
|
6
|
+
...o,
|
|
7
|
+
children: [/* @__PURE__ */ t("span", {
|
|
8
|
+
className: e.title,
|
|
9
|
+
children: r
|
|
10
|
+
}), i && /* @__PURE__ */ t("span", {
|
|
11
|
+
className: e.subtitle,
|
|
12
|
+
children: i
|
|
13
|
+
})]
|
|
14
|
+
});
|
|
17
15
|
//#endregion
|
|
18
16
|
export { r as WindowTitle };
|
|
19
17
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WindowTitle.js","names":[],"sources":["../../../src/components/WindowTitle/WindowTitle.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react';\n\nimport styles from './WindowTitle.module.css';\n\nexport interface WindowTitleProps extends HTMLAttributes<HTMLDivElement> {\n /** Primary title — rendered in bold. */\n title: string;\n /** Secondary subtitle — rendered smaller and dimmed below the title. */\n subtitle?: string;\n}\n\n/**\n * Two-line title + subtitle widget for use inside a `HeaderBar`.\n *\n * Pass as the `title` prop of `HeaderBar` to get a centred two-line header\n * that shows an app name and current document/view name.\n *\n * Mirrors `AdwWindowTitle`.\n *\n * @example\n * ```tsx\n * <HeaderBar title={<WindowTitle title=\"Files\" subtitle=\"/home/user/Documents\" />} />\n * ```\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.WindowTitle.html\n */\nexport
|
|
1
|
+
{"version":3,"file":"WindowTitle.js","names":[],"sources":["../../../src/components/WindowTitle/WindowTitle.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react';\n\nimport styles from './WindowTitle.module.css';\n\nexport interface WindowTitleProps extends HTMLAttributes<HTMLDivElement> {\n /** Primary title — rendered in bold. */\n title: string;\n /** Secondary subtitle — rendered smaller and dimmed below the title. */\n subtitle?: string;\n}\n\n/**\n * Two-line title + subtitle widget for use inside a `HeaderBar`.\n *\n * Pass as the `title` prop of `HeaderBar` to get a centred two-line header\n * that shows an app name and current document/view name.\n *\n * Mirrors `AdwWindowTitle`.\n *\n * @example\n * ```tsx\n * <HeaderBar title={<WindowTitle title=\"Files\" subtitle=\"/home/user/Documents\" />} />\n * ```\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.WindowTitle.html\n */\nexport const WindowTitle = ({ title, subtitle, className, ...props }: WindowTitleProps) => {\n return (\n <div className={[styles.windowTitle, className].filter(Boolean).join(' ')} {...props}>\n <span className={styles.title}>{title}</span>\n {subtitle && <span className={styles.subtitle}>{subtitle}</span>}\n </div>\n );\n};\n"],"mappings":";;;AA0BA,IAAa,KAAe,EAAE,UAAO,aAAU,cAAW,GAAG,QAEzD,kBAAC,OAAD;CAAK,WAAW,CAAC,EAAO,aAAa,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;CAAG,GAAI;WAA/E,CACE,kBAAC,QAAD;EAAM,WAAW,EAAO;YAAQ;CAAY,CAAA,GAC3C,KAAY,kBAAC,QAAD;EAAM,WAAW,EAAO;YAAW;CAAe,CAAA,CAC5D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./WindowTitle/WindowTitle.cjs");exports.WindowTitle=e.WindowTitle;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(
|
|
1
|
+
const e=require("./WrapBox.module.css.cjs");let t=require("react/jsx-runtime");var n=({childSpacing:n=6,lineSpacing:r,justify:i=`start`,align:a=`center`,wrapReverse:o=!1,children:s,className:c,style:l,...u})=>{let d=typeof n==`number`?`${n}px`:n,f={"--wrapbox-gap":d,"--wrapbox-row-gap":r==null?d:typeof r==`number`?`${r}px`:r,"--wrapbox-justify":i,"--wrapbox-align":a,...l};return(0,t.jsx)(`div`,{className:[e.default.wrapBox,o?e.default.reverse:null,c].filter(Boolean).join(` `),style:f,...u,children:s})};exports.WrapBox=n;
|
|
2
2
|
//# sourceMappingURL=WrapBox.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WrapBox.cjs","names":[],"sources":["../../../src/components/WrapBox/WrapBox.tsx"],"sourcesContent":["import type { CSSProperties, HTMLAttributes, ReactNode } from 'react';\n\nimport styles from './WrapBox.module.css';\n\nexport type WrapBoxJustify =\n | 'start'\n | 'center'\n | 'end'\n | 'space-between'\n | 'space-around'\n | 'space-evenly';\nexport type WrapBoxAlign = 'start' | 'center' | 'end' | 'stretch';\n\nexport interface WrapBoxProps extends HTMLAttributes<HTMLDivElement> {\n /** Gap between children on the same line. Default: `6`. */\n childSpacing?: number | string;\n /** Gap between lines. Defaults to `childSpacing`. */\n lineSpacing?: number | string;\n /** Horizontal distribution of children within each line. Default: `\"start\"`. */\n justify?: WrapBoxJustify;\n /** Cross-axis alignment of children within each line. Default: `\"center\"`. */\n align?: WrapBoxAlign;\n /** When true children wrap in the reverse direction (bottom to top). */\n wrapReverse?: boolean;\n children?: ReactNode;\n}\n\n/**\n * Flexible wrapping layout container.\n *\n * Children flow horizontally and wrap to new lines when they don't fit,\n * like words in a paragraph — without locking them into a grid.\n *\n * Mirrors `AdwWrapBox` (libadwaita 1.7 / GNOME 48).\n *\n * Pair with `Chip` for tag lists and filter rows.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.WrapBox.html\n */\nexport
|
|
1
|
+
{"version":3,"file":"WrapBox.cjs","names":[],"sources":["../../../src/components/WrapBox/WrapBox.tsx"],"sourcesContent":["import type { CSSProperties, HTMLAttributes, ReactNode } from 'react';\n\nimport styles from './WrapBox.module.css';\n\nexport type WrapBoxJustify =\n | 'start'\n | 'center'\n | 'end'\n | 'space-between'\n | 'space-around'\n | 'space-evenly';\nexport type WrapBoxAlign = 'start' | 'center' | 'end' | 'stretch';\n\nexport interface WrapBoxProps extends HTMLAttributes<HTMLDivElement> {\n /** Gap between children on the same line. Default: `6`. */\n childSpacing?: number | string;\n /** Gap between lines. Defaults to `childSpacing`. */\n lineSpacing?: number | string;\n /** Horizontal distribution of children within each line. Default: `\"start\"`. */\n justify?: WrapBoxJustify;\n /** Cross-axis alignment of children within each line. Default: `\"center\"`. */\n align?: WrapBoxAlign;\n /** When true children wrap in the reverse direction (bottom to top). */\n wrapReverse?: boolean;\n children?: ReactNode;\n}\n\n/**\n * Flexible wrapping layout container.\n *\n * Children flow horizontally and wrap to new lines when they don't fit,\n * like words in a paragraph — without locking them into a grid.\n *\n * Mirrors `AdwWrapBox` (libadwaita 1.7 / GNOME 48).\n *\n * Pair with `Chip` for tag lists and filter rows.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.WrapBox.html\n */\nexport const WrapBox = ({\n childSpacing = 6,\n lineSpacing,\n justify = 'start',\n align = 'center',\n wrapReverse = false,\n children,\n className,\n style,\n ...props\n}: WrapBoxProps) => {\n const gap = typeof childSpacing === 'number' ? `${childSpacing}px` : childSpacing;\n const rowGap =\n lineSpacing !== null && lineSpacing !== undefined\n ? typeof lineSpacing === 'number'\n ? `${lineSpacing}px`\n : lineSpacing\n : gap;\n\n const cssVars: CSSProperties = {\n '--wrapbox-gap': gap,\n '--wrapbox-row-gap': rowGap,\n '--wrapbox-justify': justify,\n '--wrapbox-align': align,\n ...style,\n } as CSSProperties;\n\n return (\n <div\n className={[styles.wrapBox, wrapReverse ? styles.reverse : null, className]\n .filter(Boolean)\n .join(' ')}\n style={cssVars}\n {...props}\n >\n {children}\n </div>\n );\n};\n"],"mappings":"+EAuCA,IAAa,GAAW,CACtB,eAAe,EACf,cACA,UAAU,QACV,QAAQ,SACR,cAAc,GACd,WACA,YACA,QACA,GAAG,KACe,CAClB,IAAM,EAAM,OAAO,GAAiB,SAAW,GAAG,EAAa,IAAM,EAQ/D,EAAyB,CAC7B,gBAAiB,EACjB,oBARA,GAAgB,KAIZ,EAHA,OAAO,GAAgB,SACrB,GAAG,EAAY,IACf,EAMN,oBAAqB,EACrB,kBAAmB,EACnB,GAAG,CACL,EAEA,OACE,EAAA,EAAA,KAAC,MAAD,CACE,UAAW,CAAC,EAAA,QAAO,QAAS,EAAc,EAAA,QAAO,QAAU,KAAM,CAAS,EACvE,OAAO,OAAO,EACd,KAAK,GAAG,EACX,MAAO,EACP,GAAI,EAEH,UACE,CAAA,CAET"}
|
|
@@ -26,4 +26,4 @@ export interface WrapBoxProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
26
26
|
*
|
|
27
27
|
* @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.WrapBox.html
|
|
28
28
|
*/
|
|
29
|
-
export declare
|
|
29
|
+
export declare const WrapBox: ({ childSpacing, lineSpacing, justify, align, wrapReverse, children, className, style, ...props }: WrapBoxProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import e from "./WrapBox.module.css.js";
|
|
2
2
|
import { jsx as t } from "react/jsx-runtime";
|
|
3
3
|
//#region src/components/WrapBox/WrapBox.tsx
|
|
4
|
-
|
|
5
|
-
let d = typeof n == "number" ? `${n}px` : n, f =
|
|
4
|
+
var n = ({ childSpacing: n = 6, lineSpacing: r, justify: i = "start", align: a = "center", wrapReverse: o = !1, children: s, className: c, style: l, ...u }) => {
|
|
5
|
+
let d = typeof n == "number" ? `${n}px` : n, f = {
|
|
6
6
|
"--wrapbox-gap": d,
|
|
7
|
-
"--wrapbox-row-gap":
|
|
7
|
+
"--wrapbox-row-gap": r == null ? d : typeof r == "number" ? `${r}px` : r,
|
|
8
8
|
"--wrapbox-justify": i,
|
|
9
9
|
"--wrapbox-align": a,
|
|
10
10
|
...l
|
|
@@ -15,11 +15,11 @@ function n({ childSpacing: n = 6, lineSpacing: r, justify: i = "start", align: a
|
|
|
15
15
|
o ? e.reverse : null,
|
|
16
16
|
c
|
|
17
17
|
].filter(Boolean).join(" "),
|
|
18
|
-
style:
|
|
18
|
+
style: f,
|
|
19
19
|
...u,
|
|
20
20
|
children: s
|
|
21
21
|
});
|
|
22
|
-
}
|
|
22
|
+
};
|
|
23
23
|
//#endregion
|
|
24
24
|
export { n as WrapBox };
|
|
25
25
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WrapBox.js","names":[],"sources":["../../../src/components/WrapBox/WrapBox.tsx"],"sourcesContent":["import type { CSSProperties, HTMLAttributes, ReactNode } from 'react';\n\nimport styles from './WrapBox.module.css';\n\nexport type WrapBoxJustify =\n | 'start'\n | 'center'\n | 'end'\n | 'space-between'\n | 'space-around'\n | 'space-evenly';\nexport type WrapBoxAlign = 'start' | 'center' | 'end' | 'stretch';\n\nexport interface WrapBoxProps extends HTMLAttributes<HTMLDivElement> {\n /** Gap between children on the same line. Default: `6`. */\n childSpacing?: number | string;\n /** Gap between lines. Defaults to `childSpacing`. */\n lineSpacing?: number | string;\n /** Horizontal distribution of children within each line. Default: `\"start\"`. */\n justify?: WrapBoxJustify;\n /** Cross-axis alignment of children within each line. Default: `\"center\"`. */\n align?: WrapBoxAlign;\n /** When true children wrap in the reverse direction (bottom to top). */\n wrapReverse?: boolean;\n children?: ReactNode;\n}\n\n/**\n * Flexible wrapping layout container.\n *\n * Children flow horizontally and wrap to new lines when they don't fit,\n * like words in a paragraph — without locking them into a grid.\n *\n * Mirrors `AdwWrapBox` (libadwaita 1.7 / GNOME 48).\n *\n * Pair with `Chip` for tag lists and filter rows.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.WrapBox.html\n */\nexport
|
|
1
|
+
{"version":3,"file":"WrapBox.js","names":[],"sources":["../../../src/components/WrapBox/WrapBox.tsx"],"sourcesContent":["import type { CSSProperties, HTMLAttributes, ReactNode } from 'react';\n\nimport styles from './WrapBox.module.css';\n\nexport type WrapBoxJustify =\n | 'start'\n | 'center'\n | 'end'\n | 'space-between'\n | 'space-around'\n | 'space-evenly';\nexport type WrapBoxAlign = 'start' | 'center' | 'end' | 'stretch';\n\nexport interface WrapBoxProps extends HTMLAttributes<HTMLDivElement> {\n /** Gap between children on the same line. Default: `6`. */\n childSpacing?: number | string;\n /** Gap between lines. Defaults to `childSpacing`. */\n lineSpacing?: number | string;\n /** Horizontal distribution of children within each line. Default: `\"start\"`. */\n justify?: WrapBoxJustify;\n /** Cross-axis alignment of children within each line. Default: `\"center\"`. */\n align?: WrapBoxAlign;\n /** When true children wrap in the reverse direction (bottom to top). */\n wrapReverse?: boolean;\n children?: ReactNode;\n}\n\n/**\n * Flexible wrapping layout container.\n *\n * Children flow horizontally and wrap to new lines when they don't fit,\n * like words in a paragraph — without locking them into a grid.\n *\n * Mirrors `AdwWrapBox` (libadwaita 1.7 / GNOME 48).\n *\n * Pair with `Chip` for tag lists and filter rows.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.WrapBox.html\n */\nexport const WrapBox = ({\n childSpacing = 6,\n lineSpacing,\n justify = 'start',\n align = 'center',\n wrapReverse = false,\n children,\n className,\n style,\n ...props\n}: WrapBoxProps) => {\n const gap = typeof childSpacing === 'number' ? `${childSpacing}px` : childSpacing;\n const rowGap =\n lineSpacing !== null && lineSpacing !== undefined\n ? typeof lineSpacing === 'number'\n ? `${lineSpacing}px`\n : lineSpacing\n : gap;\n\n const cssVars: CSSProperties = {\n '--wrapbox-gap': gap,\n '--wrapbox-row-gap': rowGap,\n '--wrapbox-justify': justify,\n '--wrapbox-align': align,\n ...style,\n } as CSSProperties;\n\n return (\n <div\n className={[styles.wrapBox, wrapReverse ? styles.reverse : null, className]\n .filter(Boolean)\n .join(' ')}\n style={cssVars}\n {...props}\n >\n {children}\n </div>\n );\n};\n"],"mappings":";;;AAuCA,IAAa,KAAW,EACtB,kBAAe,GACf,gBACA,aAAU,SACV,WAAQ,UACR,iBAAc,IACd,aACA,cACA,UACA,GAAG,QACe;CAClB,IAAM,IAAM,OAAO,KAAiB,WAAW,GAAG,EAAa,MAAM,GAQ/D,IAAyB;EAC7B,iBAAiB;EACjB,qBARA,KAAgB,OAIZ,IAHA,OAAO,KAAgB,WACrB,GAAG,EAAY,MACf;EAMN,qBAAqB;EACrB,mBAAmB;EACnB,GAAG;CACL;CAEA,OACE,kBAAC,OAAD;EACE,WAAW;GAAC,EAAO;GAAS,IAAc,EAAO,UAAU;GAAM;EAAS,EACvE,OAAO,OAAO,EACd,KAAK,GAAG;EACX,OAAO;EACP,GAAI;EAEH;CACE,CAAA;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("./WrapBox/WrapBox.cjs");exports.WrapBox=e.WrapBox;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
let e=require(
|
|
1
|
+
let e=require("react");var t={narrow:400,medium:550,wide:860};function n(){let n=(0,e.useCallback)(()=>{let e=typeof window<`u`?window.innerWidth:1280;return{isNarrow:e<=t.narrow,isMedium:e<=t.medium,isWide:e<=t.wide,width:e}},[]),[r,i]=(0,e.useState)(n);return(0,e.useEffect)(()=>{let e=()=>i(n());return window.addEventListener(`resize`,e,{passive:!0}),()=>window.removeEventListener(`resize`,e)},[n]),r}exports.GNOME_BREAKPOINTS=t,exports.useBreakpoint=n;
|
|
2
2
|
//# sourceMappingURL=useBreakpoint.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBreakpoint.cjs","names":[],"sources":["../../src/hooks/useBreakpoint.ts"],"sourcesContent":["import { useCallback, useEffect, useState } from 'react';\n\n/**\n * GNOME / libadwaita canonical breakpoints (in CSS px, assuming 1 sp = 1 px at 1× density).\n *\n * | Name | Max width | Pattern triggered |\n * |------------|-----------|-------------------|\n * | `narrow` | ≤ 400 px | Collapse split views; sidebar becomes overlay |\n * | `medium` | ≤ 550 px | Move ViewSwitcher to a bottom bar |\n * | `wide` | ≤ 860 px | Collapse outer pane in nested split views |\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Breakpoint.html\n */\nexport const GNOME_BREAKPOINTS = {\n /** ≤ 400 px — split views collapse to single pane */\n narrow: 400,\n /** ≤ 550 px — ViewSwitcher moves to bottom bar */\n medium: 550,\n /** ≤ 860 px — outer pane of nested split views collapses */\n wide: 860,\n} as const;\n\nexport type GnomeBreakpointName = keyof typeof GNOME_BREAKPOINTS;\n\nexport interface BreakpointState {\n /** Width ≤ 400 px — split views are collapsed. */\n isNarrow: boolean;\n /** Width ≤ 550 px — medium or narrower. */\n isMedium: boolean;\n /** Width ≤ 860 px — wide or narrower. */\n isWide: boolean;\n /** Current viewport width in px. */\n width: number;\n}\n\n/**\n * Tracks the viewport width against GNOME / libadwaita breakpoints.\n *\n * Returns a reactive state object that updates on every window resize.\n * Uses a passive `resize` event listener and cleans up automatically.\n *\n * @example\n * const { isNarrow, isMedium } = useBreakpoint();\n * // isNarrow → true when viewport ≤ 400 px (split views should collapse)\n * // isMedium → true when viewport ≤ 550 px (use ViewSwitcherBar instead)\n */\nexport function useBreakpoint(): BreakpointState {\n const getState = useCallback((): BreakpointState => {\n const width = typeof window !== 'undefined' ? window.innerWidth : 1280;\n\n return {\n isNarrow: width <= GNOME_BREAKPOINTS.narrow,\n isMedium: width <= GNOME_BREAKPOINTS.medium,\n isWide: width <= GNOME_BREAKPOINTS.wide,\n width,\n };\n }, []);\n\n const [state, setState] = useState<BreakpointState>(getState);\n\n useEffect(() => {\n const handler = () => setState(getState());\n\n window.addEventListener('resize', handler, { passive: true });\n\n return () => window.removeEventListener('resize', handler);\n }, [getState]);\n\n return state;\n}\n"],"mappings":"uBAaA,IAAa,EAAoB,CAE/B,OAAQ,IAER,OAAQ,IAER,KAAM,
|
|
1
|
+
{"version":3,"file":"useBreakpoint.cjs","names":[],"sources":["../../src/hooks/useBreakpoint.ts"],"sourcesContent":["import { useCallback, useEffect, useState } from 'react';\n\n/**\n * GNOME / libadwaita canonical breakpoints (in CSS px, assuming 1 sp = 1 px at 1× density).\n *\n * | Name | Max width | Pattern triggered |\n * |------------|-----------|-------------------|\n * | `narrow` | ≤ 400 px | Collapse split views; sidebar becomes overlay |\n * | `medium` | ≤ 550 px | Move ViewSwitcher to a bottom bar |\n * | `wide` | ≤ 860 px | Collapse outer pane in nested split views |\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Breakpoint.html\n */\nexport const GNOME_BREAKPOINTS = {\n /** ≤ 400 px — split views collapse to single pane */\n narrow: 400,\n /** ≤ 550 px — ViewSwitcher moves to bottom bar */\n medium: 550,\n /** ≤ 860 px — outer pane of nested split views collapses */\n wide: 860,\n} as const;\n\nexport type GnomeBreakpointName = keyof typeof GNOME_BREAKPOINTS;\n\nexport interface BreakpointState {\n /** Width ≤ 400 px — split views are collapsed. */\n isNarrow: boolean;\n /** Width ≤ 550 px — medium or narrower. */\n isMedium: boolean;\n /** Width ≤ 860 px — wide or narrower. */\n isWide: boolean;\n /** Current viewport width in px. */\n width: number;\n}\n\n/**\n * Tracks the viewport width against GNOME / libadwaita breakpoints.\n *\n * Returns a reactive state object that updates on every window resize.\n * Uses a passive `resize` event listener and cleans up automatically.\n *\n * @example\n * const { isNarrow, isMedium } = useBreakpoint();\n * // isNarrow → true when viewport ≤ 400 px (split views should collapse)\n * // isMedium → true when viewport ≤ 550 px (use ViewSwitcherBar instead)\n */\nexport function useBreakpoint(): BreakpointState {\n const getState = useCallback((): BreakpointState => {\n const width = typeof window !== 'undefined' ? window.innerWidth : 1280;\n\n return {\n isNarrow: width <= GNOME_BREAKPOINTS.narrow,\n isMedium: width <= GNOME_BREAKPOINTS.medium,\n isWide: width <= GNOME_BREAKPOINTS.wide,\n width,\n };\n }, []);\n\n const [state, setState] = useState<BreakpointState>(getState);\n\n useEffect(() => {\n const handler = () => setState(getState());\n\n window.addEventListener('resize', handler, { passive: true });\n\n return () => window.removeEventListener('resize', handler);\n }, [getState]);\n\n return state;\n}\n"],"mappings":"uBAaA,IAAa,EAAoB,CAE/B,OAAQ,IAER,OAAQ,IAER,KAAM,GACR,EA0BA,SAAgB,GAAiC,CAC/C,IAAM,GAAA,EAAA,EAAA,iBAA8C,CAClD,IAAM,EAAQ,OAAO,OAAW,IAAc,OAAO,WAAa,KAElE,MAAO,CACL,SAAU,GAAS,EAAkB,OACrC,SAAU,GAAS,EAAkB,OACrC,OAAQ,GAAS,EAAkB,KACnC,OACF,CACF,EAAG,CAAC,CAAC,EAEC,CAAC,EAAO,IAAA,EAAA,EAAA,UAAsC,CAAQ,EAU5D,OARA,EAAA,EAAA,eAAgB,CACd,IAAM,MAAgB,EAAS,EAAS,CAAC,EAIzC,OAFA,OAAO,iBAAiB,SAAU,EAAS,CAAE,QAAS,EAAK,CAAC,MAE/C,OAAO,oBAAoB,SAAU,CAAO,CAC3D,EAAG,CAAC,CAAQ,CAAC,EAEN,CACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBreakpoint.js","names":[],"sources":["../../src/hooks/useBreakpoint.ts"],"sourcesContent":["import { useCallback, useEffect, useState } from 'react';\n\n/**\n * GNOME / libadwaita canonical breakpoints (in CSS px, assuming 1 sp = 1 px at 1× density).\n *\n * | Name | Max width | Pattern triggered |\n * |------------|-----------|-------------------|\n * | `narrow` | ≤ 400 px | Collapse split views; sidebar becomes overlay |\n * | `medium` | ≤ 550 px | Move ViewSwitcher to a bottom bar |\n * | `wide` | ≤ 860 px | Collapse outer pane in nested split views |\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Breakpoint.html\n */\nexport const GNOME_BREAKPOINTS = {\n /** ≤ 400 px — split views collapse to single pane */\n narrow: 400,\n /** ≤ 550 px — ViewSwitcher moves to bottom bar */\n medium: 550,\n /** ≤ 860 px — outer pane of nested split views collapses */\n wide: 860,\n} as const;\n\nexport type GnomeBreakpointName = keyof typeof GNOME_BREAKPOINTS;\n\nexport interface BreakpointState {\n /** Width ≤ 400 px — split views are collapsed. */\n isNarrow: boolean;\n /** Width ≤ 550 px — medium or narrower. */\n isMedium: boolean;\n /** Width ≤ 860 px — wide or narrower. */\n isWide: boolean;\n /** Current viewport width in px. */\n width: number;\n}\n\n/**\n * Tracks the viewport width against GNOME / libadwaita breakpoints.\n *\n * Returns a reactive state object that updates on every window resize.\n * Uses a passive `resize` event listener and cleans up automatically.\n *\n * @example\n * const { isNarrow, isMedium } = useBreakpoint();\n * // isNarrow → true when viewport ≤ 400 px (split views should collapse)\n * // isMedium → true when viewport ≤ 550 px (use ViewSwitcherBar instead)\n */\nexport function useBreakpoint(): BreakpointState {\n const getState = useCallback((): BreakpointState => {\n const width = typeof window !== 'undefined' ? window.innerWidth : 1280;\n\n return {\n isNarrow: width <= GNOME_BREAKPOINTS.narrow,\n isMedium: width <= GNOME_BREAKPOINTS.medium,\n isWide: width <= GNOME_BREAKPOINTS.wide,\n width,\n };\n }, []);\n\n const [state, setState] = useState<BreakpointState>(getState);\n\n useEffect(() => {\n const handler = () => setState(getState());\n\n window.addEventListener('resize', handler, { passive: true });\n\n return () => window.removeEventListener('resize', handler);\n }, [getState]);\n\n return state;\n}\n"],"mappings":";;AAaA,IAAa,IAAoB;CAE/B,QAAQ;CAER,QAAQ;CAER,MAAM;
|
|
1
|
+
{"version":3,"file":"useBreakpoint.js","names":[],"sources":["../../src/hooks/useBreakpoint.ts"],"sourcesContent":["import { useCallback, useEffect, useState } from 'react';\n\n/**\n * GNOME / libadwaita canonical breakpoints (in CSS px, assuming 1 sp = 1 px at 1× density).\n *\n * | Name | Max width | Pattern triggered |\n * |------------|-----------|-------------------|\n * | `narrow` | ≤ 400 px | Collapse split views; sidebar becomes overlay |\n * | `medium` | ≤ 550 px | Move ViewSwitcher to a bottom bar |\n * | `wide` | ≤ 860 px | Collapse outer pane in nested split views |\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Breakpoint.html\n */\nexport const GNOME_BREAKPOINTS = {\n /** ≤ 400 px — split views collapse to single pane */\n narrow: 400,\n /** ≤ 550 px — ViewSwitcher moves to bottom bar */\n medium: 550,\n /** ≤ 860 px — outer pane of nested split views collapses */\n wide: 860,\n} as const;\n\nexport type GnomeBreakpointName = keyof typeof GNOME_BREAKPOINTS;\n\nexport interface BreakpointState {\n /** Width ≤ 400 px — split views are collapsed. */\n isNarrow: boolean;\n /** Width ≤ 550 px — medium or narrower. */\n isMedium: boolean;\n /** Width ≤ 860 px — wide or narrower. */\n isWide: boolean;\n /** Current viewport width in px. */\n width: number;\n}\n\n/**\n * Tracks the viewport width against GNOME / libadwaita breakpoints.\n *\n * Returns a reactive state object that updates on every window resize.\n * Uses a passive `resize` event listener and cleans up automatically.\n *\n * @example\n * const { isNarrow, isMedium } = useBreakpoint();\n * // isNarrow → true when viewport ≤ 400 px (split views should collapse)\n * // isMedium → true when viewport ≤ 550 px (use ViewSwitcherBar instead)\n */\nexport function useBreakpoint(): BreakpointState {\n const getState = useCallback((): BreakpointState => {\n const width = typeof window !== 'undefined' ? window.innerWidth : 1280;\n\n return {\n isNarrow: width <= GNOME_BREAKPOINTS.narrow,\n isMedium: width <= GNOME_BREAKPOINTS.medium,\n isWide: width <= GNOME_BREAKPOINTS.wide,\n width,\n };\n }, []);\n\n const [state, setState] = useState<BreakpointState>(getState);\n\n useEffect(() => {\n const handler = () => setState(getState());\n\n window.addEventListener('resize', handler, { passive: true });\n\n return () => window.removeEventListener('resize', handler);\n }, [getState]);\n\n return state;\n}\n"],"mappings":";;AAaA,IAAa,IAAoB;CAE/B,QAAQ;CAER,QAAQ;CAER,MAAM;AACR;AA0BA,SAAgB,IAAiC;CAC/C,IAAM,IAAW,QAAmC;EAClD,IAAM,IAAQ,OAAO,SAAW,MAAc,OAAO,aAAa;EAElE,OAAO;GACL,UAAU,KAAS,EAAkB;GACrC,UAAU,KAAS,EAAkB;GACrC,QAAQ,KAAS,EAAkB;GACnC;EACF;CACF,GAAG,CAAC,CAAC,GAEC,CAAC,GAAO,KAAY,EAA0B,CAAQ;CAU5D,OARA,QAAgB;EACd,IAAM,UAAgB,EAAS,EAAS,CAAC;EAIzC,OAFA,OAAO,iBAAiB,UAAU,GAAS,EAAE,SAAS,GAAK,CAAC,SAE/C,OAAO,oBAAoB,UAAU,CAAO;CAC3D,GAAG,CAAC,CAAQ,CAAC,GAEN;AACT"}
|
package/dist/hooks.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("./components/GnomeProvider/GnomeContext.cjs"),t=require("./hooks/useBreakpoint.cjs");exports.GNOME_BREAKPOINTS=t.GNOME_BREAKPOINTS,exports.useBreakpoint=t.useBreakpoint,exports.useDateTimeFormatter=e.useDateTimeFormatter,exports.useDir=e.useDir,exports.useLocale=e.useLocale,exports.useNumberFormatter=e.useNumberFormatter;
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const ee=require(
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const ee=require("./components/AboutDialog/AboutDialog.cjs"),e=require("./components/ActionRow/ActionRow.cjs"),t=require("./components/Avatar/Avatar.cjs"),n=require("./components/AvatarRotator/AvatarRotator.cjs"),r=require("./components/Badge/Badge.cjs"),i=require("./components/Banner/Banner.cjs"),a=require("./components/Bin/Bin.cjs"),te=require("./components/Blockquote/Blockquote.cjs"),o=require("./components/BottomSheet/BottomSheet.cjs"),s=require("./components/Box/Box.cjs"),c=require("./components/Separator/Separator.cjs"),l=require("./components/BoxedList/BoxedList.cjs"),u=require("./components/BreakpointBin/BreakpointBin.cjs"),d=require("./components/Button/Button.cjs"),f=require("./components/ButtonContent/ButtonContent.cjs"),p=require("./components/ButtonRow/ButtonRow.cjs"),m=require("./components/Card/Card.cjs"),h=require("./components/Carousel/Carousel.cjs"),g=require("./components/CheckRow/CheckRow.cjs"),_=require("./components/Checkbox/Checkbox.cjs"),v=require("./components/Icon/Icon.cjs"),y=require("./components/Chip/Chip.cjs"),b=require("./components/Clamp/Clamp.cjs"),x=require("./components/ColorPicker/ColorPicker.cjs"),S=require("./components/ColumnView/ColumnView.cjs"),C=require("./components/ComboRow/ComboRow.cjs"),w=require("./components/GnomeProvider/GnomeContext.cjs"),T=require("./components/ContributionGraph/ContributionGraph.cjs"),E=require("./components/CountDownTimer/CountDownTimer.cjs"),D=require("./components/Dialog/Dialog.cjs"),O=require("./components/Drawer/Drawer.cjs"),k=require("./components/Dropdown/Dropdown.cjs"),A=require("./components/EntryRow/EntryRow.cjs"),j=require("./components/ExpanderRow/ExpanderRow.cjs"),M=require("./components/Footer/Footer.cjs"),N=require("./components/Frame/Frame.cjs"),P=require("./components/GnomeProvider/GnomeProvider.cjs"),F=require("./components/HeaderBar/HeaderBar.cjs"),I=require("./components/Tooltip/Tooltip.cjs"),L=require("./components/IconButton/IconButton.cjs"),R=require("./components/InlineViewSwitcher/InlineViewSwitcher.cjs"),z=require("./components/InlineViewSwitcher/InlineViewSwitcherItem.cjs"),B=require("./components/Link/Link.cjs"),V=require("./components/LinkedGroup/LinkedGroup.cjs"),H=require("./hooks/useBreakpoint.cjs"),U=require("./components/NavigationSplitView/NavigationSplitView.cjs"),W=require("./components/NavigationView/NavigationView.cjs"),G=require("./components/OverlaySplitView/OverlaySplitView.cjs"),K=require("./components/PasswordEntryRow/PasswordEntryRow.cjs"),q=require("./components/PathBar/PathBar.cjs"),J=require("./components/Popover/Popover.cjs"),Y=require("./components/PreferencesDialog/PreferencesDialog.cjs"),X=require("./components/PreferencesGroup/PreferencesGroup.cjs"),Z=require("./components/PreferencesPage/PreferencesPage.cjs"),Q=require("./components/ProgressBar/ProgressBar.cjs"),ne=require("./components/RadioButton/RadioButton.cjs"),re=require("./components/Spinner/Spinner.cjs"),ie=require("./components/SearchBar/SearchBar.cjs"),ae=require("./components/SegmentedBar/SegmentedBar.cjs"),oe=require("./components/ShortcutLabel/ShortcutLabel.cjs"),se=require("./components/ShortcutsDialog/ShortcutsDialog.cjs"),ce=require("./components/StatusPage/StatusPage.cjs"),$=require("./components/Sidebar/Sidebar.cjs"),le=require("./components/Sidebar/SidebarItem.cjs"),ue=require("./components/Sidebar/SidebarSection.cjs"),de=require("./components/Skeleton/Skeleton.cjs"),fe=require("./components/Slider/Slider.cjs"),pe=require("./components/SpinButton/SpinButton.cjs"),me=require("./components/SpinRow/SpinRow.cjs"),he=require("./components/SplitButton/SplitButton.cjs"),ge=require("./components/StatusBadge/StatusBadge.cjs"),_e=require("./components/Switch/Switch.cjs"),ve=require("./components/SwitchRow/SwitchRow.cjs"),ye=require("./components/Tabs/TabBar.cjs"),be=require("./components/Tabs/TabItem.cjs"),xe=require("./components/Tabs/TabPanel.cjs"),Se=require("./components/TerminalView/TerminalView.cjs"),Ce=require("./components/Text/Text.cjs"),we=require("./components/TextField/TextField.cjs"),Te=require("./components/Timeline/Timeline.cjs"),Ee=require("./components/Toast/Toast.cjs"),De=require("./components/Toast/Toaster.cjs"),Oe=require("./components/ToggleGroup/ToggleGroup.cjs"),ke=require("./components/ToggleGroup/ToggleGroupItem.cjs"),Ae=require("./components/Toolbar/Spacer.cjs"),je=require("./components/Toolbar/Toolbar.cjs"),Me=require("./components/ToolbarView/ToolbarView.cjs"),Ne=require("./components/ViewSwitcher/ViewSwitcher.cjs"),Pe=require("./components/ViewSwitcher/ViewSwitcherItem.cjs"),Fe=require("./components/ViewSwitcherBar/ViewSwitcherBar.cjs"),Ie=require("./components/ViewSwitcherSidebar/ViewSwitcherSidebar.cjs"),Le=require("./components/ViewSwitcherSidebar/ViewSwitcherSidebarItem.cjs"),Re=require("./components/WindowTitle/WindowTitle.cjs"),ze=require("./components/WrapBox/WrapBox.cjs");exports.AboutDialog=ee.AboutDialog,exports.ActionRow=e.ActionRow,exports.Avatar=t.Avatar,exports.AvatarRotator=n.AvatarRotator,exports.Badge=r.Badge,exports.Banner=i.Banner,exports.Bin=a.Bin,exports.Blockquote=te.Blockquote,exports.BottomSheet=o.BottomSheet,exports.Box=s.Box,exports.BoxedList=l.BoxedList,exports.BreakpointBin=u.BreakpointBin,exports.Button=d.Button,exports.ButtonContent=f.ButtonContent,exports.ButtonRow=p.ButtonRow,exports.Card=m.Card,exports.Carousel=h.Carousel,exports.CarouselIndicatorDots=h.CarouselIndicatorDots,exports.CarouselIndicatorLines=h.CarouselIndicatorLines,exports.CheckRow=g.CheckRow,exports.Checkbox=_.Checkbox,exports.Chip=y.Chip,exports.Clamp=b.Clamp,exports.ColorPicker=x.ColorPicker,exports.ColorSwatch=x.ColorSwatch,exports.ColumnView=S.ColumnView,exports.ComboRow=C.ComboRow,exports.ContributionGraph=T.ContributionGraph,exports.CountDownTimer=E.CountDownTimer,exports.Dialog=D.Dialog,exports.Drawer=O.Drawer,exports.Dropdown=k.Dropdown,exports.EntryRow=A.EntryRow,exports.ExpanderRow=j.ExpanderRow,exports.Footer=M.Footer,exports.Frame=N.Frame,exports.GNOME_BREAKPOINTS=H.GNOME_BREAKPOINTS,exports.GNOME_PALETTE=x.GNOME_PALETTE,exports.GnomeProvider=P.GnomeProvider,exports.HeaderBar=F.HeaderBar,exports.Icon=v.Icon,exports.IconButton=L.IconButton,exports.InlineViewSwitcher=R.InlineViewSwitcher,exports.InlineViewSwitcherItem=z.InlineViewSwitcherItem,exports.Link=B.Link,exports.LinkedGroup=V.LinkedGroup,exports.NavigationPage=W.NavigationPage,exports.NavigationSplitView=U.NavigationSplitView,exports.NavigationView=W.NavigationView,exports.OverlaySplitView=G.OverlaySplitView,exports.PasswordEntryRow=K.PasswordEntryRow,exports.PathBar=q.PathBar,exports.Popover=J.Popover,exports.PreferencesDialog=Y.PreferencesDialog,exports.PreferencesGroup=X.PreferencesGroup,exports.PreferencesPage=Z.PreferencesPage,exports.ProgressBar=Q.ProgressBar,exports.RadioButton=ne.RadioButton,exports.SearchBar=ie.SearchBar,exports.SegmentedBar=ae.SegmentedBar,exports.Separator=c.Separator,exports.ShortcutLabel=oe.ShortcutLabel,exports.ShortcutsDialog=se.ShortcutsDialog,exports.Sidebar=$.Sidebar,exports.SidebarCollapsedContext=$.SidebarCollapsedContext,exports.SidebarItem=le.SidebarItem,exports.SidebarSection=ue.SidebarSection,exports.Skeleton=de.Skeleton,exports.Slider=fe.Slider,exports.Spacer=Ae.Spacer,exports.SpinButton=pe.SpinButton,exports.SpinRow=me.SpinRow,exports.Spinner=re.Spinner,exports.SplitButton=he.SplitButton,exports.StatusBadge=ge.StatusBadge,exports.StatusPage=ce.StatusPage,exports.Switch=_e.Switch,exports.SwitchRow=ve.SwitchRow,exports.TabBar=ye.TabBar,exports.TabItem=be.TabItem,exports.TabPanel=xe.TabPanel,exports.TerminalView=Se.TerminalView,exports.Text=Ce.Text,exports.TextField=we.TextField,exports.Timeline=Te.Timeline,exports.Toast=Ee.Toast,exports.Toaster=De.Toaster,exports.ToggleGroup=Oe.ToggleGroup,exports.ToggleGroupItem=ke.ToggleGroupItem,exports.Toolbar=je.Toolbar,exports.ToolbarView=Me.ToolbarView,exports.Tooltip=I.Tooltip,exports.ViewSwitcher=Ne.ViewSwitcher,exports.ViewSwitcherBar=Fe.ViewSwitcherBar,exports.ViewSwitcherItem=Pe.ViewSwitcherItem,exports.ViewSwitcherSidebar=Ie.ViewSwitcherSidebar,exports.ViewSwitcherSidebarItem=Le.ViewSwitcherSidebarItem,exports.WindowTitle=Re.WindowTitle,exports.WrapBox=ze.WrapBox,exports.useAccentColor=w.useAccentColor,exports.useBreakpoint=H.useBreakpoint,exports.useColorScheme=w.useColorScheme,exports.useDateTimeFormatter=w.useDateTimeFormatter,exports.useDir=w.useDir,exports.useLocale=w.useLocale,exports.useNavigation=W.useNavigation,exports.useNumberFormatter=w.useNumberFormatter,exports.useResolvedColorScheme=w.useResolvedColorScheme,exports.useSidebarCollapsed=$.useSidebarCollapsed;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gnome-ui/react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.46.0",
|
|
4
4
|
"description": "React component library following GNOME Human Interface Guidelines",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -481,7 +481,7 @@
|
|
|
481
481
|
"react": "^19.0.0",
|
|
482
482
|
"react-dom": "^19.0.0",
|
|
483
483
|
"storybook": "^10.3.3",
|
|
484
|
-
"vite": "^8.0.
|
|
484
|
+
"vite": "^8.0.16",
|
|
485
485
|
"vite-magic-tree-shaking": "^1.0.0",
|
|
486
486
|
"vite-plugin-dts": "^4.5.4",
|
|
487
487
|
"vitest": "^4.1.4"
|