@gnome-ui/react 1.45.1 → 1.46.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AboutDialog/AboutDialog.cjs +1 -1
- package/dist/components/AboutDialog/AboutDialog.cjs.map +1 -1
- package/dist/components/AboutDialog/AboutDialog.d.ts +1 -1
- package/dist/components/AboutDialog/AboutDialog.js +106 -108
- package/dist/components/AboutDialog/AboutDialog.js.map +1 -1
- package/dist/components/AboutDialog/AboutDialog.module.css.cjs +1 -1
- package/dist/components/AboutDialog/AboutDialog.module.css.js +28 -29
- package/dist/components/AboutDialog.cjs +1 -1
- package/dist/components/ActionRow/ActionRow.cjs +1 -1
- package/dist/components/ActionRow/ActionRow.cjs.map +1 -1
- package/dist/components/ActionRow/ActionRow.d.ts +1 -1
- package/dist/components/ActionRow/ActionRow.js +2 -2
- package/dist/components/ActionRow/ActionRow.js.map +1 -1
- package/dist/components/ActionRow.cjs +1 -1
- package/dist/components/Avatar/Avatar.cjs +1 -1
- package/dist/components/Avatar/Avatar.cjs.map +1 -1
- package/dist/components/Avatar/Avatar.d.ts +1 -1
- package/dist/components/Avatar/Avatar.js +2 -2
- package/dist/components/Avatar/Avatar.js.map +1 -1
- package/dist/components/Avatar.cjs +1 -1
- package/dist/components/AvatarRotator/AvatarRotator.cjs +1 -1
- package/dist/components/AvatarRotator/AvatarRotator.cjs.map +1 -1
- package/dist/components/AvatarRotator/AvatarRotator.d.ts +1 -1
- package/dist/components/AvatarRotator/AvatarRotator.js +2 -2
- package/dist/components/AvatarRotator/AvatarRotator.js.map +1 -1
- package/dist/components/AvatarRotator.cjs +1 -1
- package/dist/components/Badge/Badge.cjs +1 -1
- package/dist/components/Badge/Badge.cjs.map +1 -1
- package/dist/components/Badge/Badge.d.ts +1 -1
- package/dist/components/Badge/Badge.js +2 -2
- package/dist/components/Badge/Badge.js.map +1 -1
- package/dist/components/Badge.cjs +1 -1
- package/dist/components/Banner/Banner.cjs +1 -1
- package/dist/components/Banner/Banner.cjs.map +1 -1
- package/dist/components/Banner/Banner.d.ts +1 -1
- package/dist/components/Banner/Banner.js +34 -36
- package/dist/components/Banner/Banner.js.map +1 -1
- package/dist/components/Banner/Banner.module.css.cjs +1 -1
- package/dist/components/Banner/Banner.module.css.js +11 -12
- package/dist/components/Banner.cjs +1 -1
- package/dist/components/Bin/Bin.cjs +1 -1
- package/dist/components/Bin/Bin.cjs.map +1 -1
- package/dist/components/Bin/Bin.d.ts +1 -1
- package/dist/components/Bin/Bin.js +4 -6
- package/dist/components/Bin/Bin.js.map +1 -1
- package/dist/components/Bin.cjs +1 -1
- package/dist/components/Blockquote/Blockquote.cjs +1 -1
- package/dist/components/Blockquote/Blockquote.cjs.map +1 -1
- package/dist/components/Blockquote/Blockquote.d.ts +1 -1
- package/dist/components/Blockquote/Blockquote.js +24 -26
- package/dist/components/Blockquote/Blockquote.js.map +1 -1
- package/dist/components/Blockquote.cjs +1 -1
- package/dist/components/BottomSheet/BottomSheet.cjs +1 -1
- package/dist/components/BottomSheet/BottomSheet.cjs.map +1 -1
- package/dist/components/BottomSheet/BottomSheet.d.ts +1 -1
- package/dist/components/BottomSheet/BottomSheet.js +37 -38
- package/dist/components/BottomSheet/BottomSheet.js.map +1 -1
- package/dist/components/BottomSheet/BottomSheet.module.css.cjs +1 -1
- package/dist/components/BottomSheet/BottomSheet.module.css.js +8 -9
- package/dist/components/BottomSheet.cjs +1 -1
- package/dist/components/Box/Box.cjs +1 -1
- package/dist/components/Box/Box.cjs.map +1 -1
- package/dist/components/Box/Box.d.ts +1 -1
- package/dist/components/Box/Box.js +2 -2
- package/dist/components/Box/Box.js.map +1 -1
- package/dist/components/Box.cjs +1 -1
- package/dist/components/BoxedList/BoxedList.cjs +1 -1
- package/dist/components/BoxedList/BoxedList.cjs.map +1 -1
- package/dist/components/BoxedList/BoxedList.d.ts +1 -1
- package/dist/components/BoxedList/BoxedList.js +2 -2
- package/dist/components/BoxedList/BoxedList.js.map +1 -1
- package/dist/components/BoxedList.cjs +1 -1
- package/dist/components/BreakpointBin/BreakpointBin.cjs +1 -1
- package/dist/components/BreakpointBin/BreakpointBin.cjs.map +1 -1
- package/dist/components/BreakpointBin/BreakpointBin.d.ts +1 -1
- package/dist/components/BreakpointBin/BreakpointBin.js +2 -2
- package/dist/components/BreakpointBin/BreakpointBin.js.map +1 -1
- package/dist/components/BreakpointBin.cjs +1 -1
- package/dist/components/Button/Button.cjs +1 -1
- package/dist/components/Button/Button.cjs.map +1 -1
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Button.cjs +1 -1
- package/dist/components/ButtonContent/ButtonContent.cjs +1 -1
- package/dist/components/ButtonContent/ButtonContent.cjs.map +1 -1
- package/dist/components/ButtonContent/ButtonContent.d.ts +1 -1
- package/dist/components/ButtonContent/ButtonContent.js +24 -26
- package/dist/components/ButtonContent/ButtonContent.js.map +1 -1
- package/dist/components/ButtonContent.cjs +1 -1
- package/dist/components/ButtonRow/ButtonRow.cjs +1 -1
- package/dist/components/ButtonRow/ButtonRow.cjs.map +1 -1
- package/dist/components/ButtonRow/ButtonRow.d.ts +1 -1
- package/dist/components/ButtonRow/ButtonRow.js +22 -24
- package/dist/components/ButtonRow/ButtonRow.js.map +1 -1
- package/dist/components/ButtonRow.cjs +1 -1
- package/dist/components/Card/Card.cjs +1 -1
- package/dist/components/Card/Card.cjs.map +1 -1
- package/dist/components/Card/Card.d.ts +1 -1
- package/dist/components/Card/Card.js +10 -12
- package/dist/components/Card/Card.js.map +1 -1
- package/dist/components/Card/Card.module.css.cjs +1 -1
- package/dist/components/Card/Card.module.css.js +4 -5
- package/dist/components/Card.cjs +1 -1
- package/dist/components/Carousel/Carousel.cjs +1 -1
- package/dist/components/Carousel/Carousel.cjs.map +1 -1
- package/dist/components/Carousel/Carousel.d.ts +3 -3
- package/dist/components/Carousel/Carousel.js +28 -34
- package/dist/components/Carousel/Carousel.js.map +1 -1
- package/dist/components/Carousel.cjs +1 -1
- package/dist/components/CheckRow/CheckRow.cjs +1 -1
- package/dist/components/CheckRow/CheckRow.cjs.map +1 -1
- package/dist/components/CheckRow/CheckRow.d.ts +1 -1
- package/dist/components/CheckRow/CheckRow.js +7 -7
- package/dist/components/CheckRow/CheckRow.js.map +1 -1
- package/dist/components/CheckRow.cjs +1 -1
- package/dist/components/Checkbox/Checkbox.cjs +1 -1
- package/dist/components/Checkbox/Checkbox.cjs.map +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts +1 -1
- package/dist/components/Checkbox/Checkbox.js +2 -2
- package/dist/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/Checkbox.cjs +1 -1
- package/dist/components/Chip/Chip.cjs +1 -1
- package/dist/components/Chip/Chip.cjs.map +1 -1
- package/dist/components/Chip/Chip.d.ts +1 -1
- package/dist/components/Chip/Chip.js +2 -2
- package/dist/components/Chip/Chip.js.map +1 -1
- package/dist/components/Chip.cjs +1 -1
- package/dist/components/Clamp/Clamp.cjs +1 -1
- package/dist/components/Clamp/Clamp.cjs.map +1 -1
- package/dist/components/Clamp/Clamp.d.ts +1 -1
- package/dist/components/Clamp/Clamp.js +9 -11
- package/dist/components/Clamp/Clamp.js.map +1 -1
- package/dist/components/Clamp.cjs +1 -1
- package/dist/components/ColorPicker/ColorPicker.cjs +1 -1
- package/dist/components/ColorPicker/ColorPicker.cjs.map +1 -1
- package/dist/components/ColorPicker/ColorPicker.d.ts +2 -2
- package/dist/components/ColorPicker/ColorPicker.js +33 -37
- package/dist/components/ColorPicker/ColorPicker.js.map +1 -1
- package/dist/components/ColorPicker/ColorPicker.module.css.cjs +1 -1
- package/dist/components/ColorPicker/ColorPicker.module.css.js +9 -10
- package/dist/components/ColorPicker.cjs +1 -1
- package/dist/components/ColumnView/ColumnView.cjs +1 -1
- package/dist/components/ColumnView/ColumnView.cjs.map +1 -1
- package/dist/components/ColumnView/ColumnView.d.ts +1 -1
- package/dist/components/ColumnView/ColumnView.js +24 -28
- package/dist/components/ColumnView/ColumnView.js.map +1 -1
- package/dist/components/ColumnView.cjs +1 -1
- package/dist/components/ComboRow/ComboRow.cjs +1 -1
- package/dist/components/ComboRow/ComboRow.cjs.map +1 -1
- package/dist/components/ComboRow/ComboRow.d.ts +1 -1
- package/dist/components/ComboRow/ComboRow.js +2 -2
- package/dist/components/ComboRow/ComboRow.js.map +1 -1
- package/dist/components/ComboRow/ComboRow.module.css.cjs +1 -1
- package/dist/components/ComboRow/ComboRow.module.css.js +24 -25
- package/dist/components/ComboRow.cjs +1 -1
- package/dist/components/ContributionGraph/ContributionGraph.cjs +1 -1
- package/dist/components/ContributionGraph/ContributionGraph.cjs.map +1 -1
- package/dist/components/ContributionGraph/ContributionGraph.d.ts +1 -1
- package/dist/components/ContributionGraph/ContributionGraph.js +2 -2
- package/dist/components/ContributionGraph/ContributionGraph.js.map +1 -1
- package/dist/components/ContributionGraph.cjs +1 -1
- package/dist/components/CountDownTimer/CountDownTimer.cjs +1 -1
- package/dist/components/CountDownTimer/CountDownTimer.cjs.map +1 -1
- package/dist/components/CountDownTimer/CountDownTimer.d.ts +1 -1
- package/dist/components/CountDownTimer/CountDownTimer.js +2 -2
- package/dist/components/CountDownTimer/CountDownTimer.js.map +1 -1
- package/dist/components/CountDownTimer.cjs +1 -1
- package/dist/components/Dialog/Dialog.cjs +1 -1
- package/dist/components/Dialog/Dialog.cjs.map +1 -1
- package/dist/components/Dialog/Dialog.d.ts +1 -1
- package/dist/components/Dialog/Dialog.js +51 -52
- package/dist/components/Dialog/Dialog.js.map +1 -1
- package/dist/components/Dialog/Dialog.module.css.cjs +1 -1
- package/dist/components/Dialog/Dialog.module.css.js +8 -9
- package/dist/components/Dialog/dialogUtils.cjs +1 -1
- package/dist/components/Dialog/dialogUtils.cjs.map +1 -1
- package/dist/components/Dialog/dialogUtils.d.ts +6 -0
- package/dist/components/Dialog/dialogUtils.js +11 -2
- package/dist/components/Dialog/dialogUtils.js.map +1 -1
- package/dist/components/Dialog.cjs +1 -1
- package/dist/components/Drawer/Drawer.cjs +1 -1
- package/dist/components/Drawer/Drawer.cjs.map +1 -1
- package/dist/components/Drawer/Drawer.d.ts +1 -1
- package/dist/components/Drawer/Drawer.js +2 -2
- package/dist/components/Drawer/Drawer.js.map +1 -1
- package/dist/components/Drawer/Drawer.module.css.cjs +1 -1
- package/dist/components/Drawer/Drawer.module.css.js +11 -12
- package/dist/components/Drawer.cjs +1 -1
- package/dist/components/Dropdown/Dropdown.cjs +1 -1
- package/dist/components/Dropdown/Dropdown.cjs.map +1 -1
- package/dist/components/Dropdown/Dropdown.d.ts +1 -1
- package/dist/components/Dropdown/Dropdown.js +89 -85
- package/dist/components/Dropdown/Dropdown.js.map +1 -1
- package/dist/components/Dropdown/Dropdown.module.css.cjs +1 -1
- package/dist/components/Dropdown/Dropdown.module.css.js +20 -21
- package/dist/components/Dropdown.cjs +1 -1
- package/dist/components/EntryRow/EntryRow.cjs +1 -1
- package/dist/components/EntryRow/EntryRow.cjs.map +1 -1
- package/dist/components/EntryRow/EntryRow.d.ts +1 -1
- package/dist/components/EntryRow/EntryRow.js +2 -2
- package/dist/components/EntryRow/EntryRow.js.map +1 -1
- package/dist/components/EntryRow.cjs +1 -1
- package/dist/components/ExpanderRow/ExpanderRow.cjs +1 -1
- package/dist/components/ExpanderRow/ExpanderRow.cjs.map +1 -1
- package/dist/components/ExpanderRow/ExpanderRow.d.ts +1 -1
- package/dist/components/ExpanderRow/ExpanderRow.js +2 -2
- package/dist/components/ExpanderRow/ExpanderRow.js.map +1 -1
- package/dist/components/ExpanderRow.cjs +1 -1
- package/dist/components/Footer/Footer.cjs +1 -1
- package/dist/components/Footer/Footer.cjs.map +1 -1
- package/dist/components/Footer/Footer.d.ts +1 -1
- package/dist/components/Footer/Footer.js +22 -24
- package/dist/components/Footer/Footer.js.map +1 -1
- package/dist/components/Footer.cjs +1 -1
- package/dist/components/Frame/Frame.cjs +1 -1
- package/dist/components/Frame/Frame.cjs.map +1 -1
- package/dist/components/Frame/Frame.d.ts +1 -1
- package/dist/components/Frame/Frame.js +5 -7
- package/dist/components/Frame/Frame.js.map +1 -1
- package/dist/components/Frame.cjs +1 -1
- package/dist/components/GnomeProvider/GnomeContext.cjs +1 -1
- package/dist/components/GnomeProvider/GnomeContext.cjs.map +1 -1
- package/dist/components/GnomeProvider/GnomeContext.js.map +1 -1
- package/dist/components/GnomeProvider/GnomeProvider.cjs +1 -1
- package/dist/components/GnomeProvider/GnomeProvider.cjs.map +1 -1
- package/dist/components/GnomeProvider/GnomeProvider.d.ts +1 -1
- package/dist/components/GnomeProvider/GnomeProvider.js +2 -2
- package/dist/components/GnomeProvider/GnomeProvider.js.map +1 -1
- package/dist/components/HeaderBar/HeaderBar.cjs +1 -1
- package/dist/components/HeaderBar/HeaderBar.cjs.map +1 -1
- package/dist/components/HeaderBar/HeaderBar.d.ts +1 -1
- package/dist/components/HeaderBar/HeaderBar.js +26 -28
- package/dist/components/HeaderBar/HeaderBar.js.map +1 -1
- package/dist/components/HeaderBar.cjs +1 -1
- package/dist/components/Icon/Icon.cjs +1 -1
- package/dist/components/Icon/Icon.cjs.map +1 -1
- package/dist/components/Icon/Icon.d.ts +1 -1
- package/dist/components/Icon/Icon.js +2 -2
- package/dist/components/Icon/Icon.js.map +1 -1
- package/dist/components/Icon.cjs +1 -1
- package/dist/components/IconButton/IconButton.cjs +1 -1
- package/dist/components/IconButton/IconButton.cjs.map +1 -1
- package/dist/components/IconButton/IconButton.js +4 -4
- package/dist/components/IconButton/IconButton.js.map +1 -1
- package/dist/components/IconButton.cjs +1 -1
- package/dist/components/InlineViewSwitcher/InlineViewSwitcher.cjs +1 -1
- package/dist/components/InlineViewSwitcher/InlineViewSwitcher.cjs.map +1 -1
- package/dist/components/InlineViewSwitcher/InlineViewSwitcher.d.ts +1 -1
- package/dist/components/InlineViewSwitcher/InlineViewSwitcher.js +2 -2
- package/dist/components/InlineViewSwitcher/InlineViewSwitcher.js.map +1 -1
- package/dist/components/InlineViewSwitcher/InlineViewSwitcherItem.cjs +1 -1
- package/dist/components/InlineViewSwitcher/InlineViewSwitcherItem.cjs.map +1 -1
- package/dist/components/InlineViewSwitcher/InlineViewSwitcherItem.d.ts +1 -1
- package/dist/components/InlineViewSwitcher/InlineViewSwitcherItem.js +2 -2
- package/dist/components/InlineViewSwitcher/InlineViewSwitcherItem.js.map +1 -1
- package/dist/components/InlineViewSwitcher.cjs +1 -1
- package/dist/components/Link/Link.cjs +1 -1
- package/dist/components/Link/Link.cjs.map +1 -1
- package/dist/components/Link/Link.d.ts +1 -1
- package/dist/components/Link/Link.js +2 -2
- package/dist/components/Link/Link.js.map +1 -1
- package/dist/components/Link.cjs +1 -1
- package/dist/components/LinkedGroup/LinkedGroup.cjs +1 -1
- package/dist/components/LinkedGroup/LinkedGroup.cjs.map +1 -1
- package/dist/components/LinkedGroup/LinkedGroup.d.ts +1 -1
- package/dist/components/LinkedGroup/LinkedGroup.js +9 -11
- package/dist/components/LinkedGroup/LinkedGroup.js.map +1 -1
- package/dist/components/LinkedGroup.cjs +1 -1
- package/dist/components/NavigationSplitView/NavigationSplitView.cjs +1 -1
- package/dist/components/NavigationSplitView/NavigationSplitView.cjs.map +1 -1
- package/dist/components/NavigationSplitView/NavigationSplitView.d.ts +1 -1
- package/dist/components/NavigationSplitView/NavigationSplitView.js +2 -2
- package/dist/components/NavigationSplitView/NavigationSplitView.js.map +1 -1
- package/dist/components/NavigationSplitView.cjs +1 -1
- package/dist/components/NavigationView/NavigationView.cjs +1 -1
- package/dist/components/NavigationView/NavigationView.cjs.map +1 -1
- package/dist/components/NavigationView/NavigationView.d.ts +2 -2
- package/dist/components/NavigationView/NavigationView.js +3 -4
- package/dist/components/NavigationView/NavigationView.js.map +1 -1
- package/dist/components/NavigationView/NavigationView.module.css.cjs +1 -1
- package/dist/components/NavigationView/NavigationView.module.css.js +9 -10
- package/dist/components/NavigationView.cjs +1 -1
- package/dist/components/OverlaySplitView/OverlaySplitView.cjs +1 -1
- package/dist/components/OverlaySplitView/OverlaySplitView.cjs.map +1 -1
- package/dist/components/OverlaySplitView/OverlaySplitView.d.ts +1 -1
- package/dist/components/OverlaySplitView/OverlaySplitView.js +2 -2
- package/dist/components/OverlaySplitView/OverlaySplitView.js.map +1 -1
- package/dist/components/OverlaySplitView.cjs +1 -1
- package/dist/components/PasswordEntryRow/PasswordEntryRow.cjs +1 -1
- package/dist/components/PasswordEntryRow/PasswordEntryRow.cjs.map +1 -1
- package/dist/components/PasswordEntryRow/PasswordEntryRow.d.ts +1 -1
- package/dist/components/PasswordEntryRow/PasswordEntryRow.js +11 -10
- package/dist/components/PasswordEntryRow/PasswordEntryRow.js.map +1 -1
- package/dist/components/PasswordEntryRow.cjs +1 -1
- package/dist/components/PathBar/PathBar.cjs +1 -1
- package/dist/components/PathBar/PathBar.cjs.map +1 -1
- package/dist/components/PathBar/PathBar.d.ts +1 -1
- package/dist/components/PathBar/PathBar.js +48 -50
- package/dist/components/PathBar/PathBar.js.map +1 -1
- package/dist/components/PathBar.cjs +1 -1
- package/dist/components/Popover/Popover.cjs +1 -1
- package/dist/components/Popover/Popover.cjs.map +1 -1
- package/dist/components/Popover/Popover.d.ts +1 -1
- package/dist/components/Popover/Popover.js +5 -5
- package/dist/components/Popover/Popover.js.map +1 -1
- package/dist/components/Popover.cjs +1 -1
- package/dist/components/PreferencesDialog/PreferencesDialog.cjs +1 -1
- package/dist/components/PreferencesDialog/PreferencesDialog.cjs.map +1 -1
- package/dist/components/PreferencesDialog/PreferencesDialog.d.ts +1 -1
- package/dist/components/PreferencesDialog/PreferencesDialog.js +2 -2
- package/dist/components/PreferencesDialog/PreferencesDialog.js.map +1 -1
- package/dist/components/PreferencesDialog/PreferencesDialog.module.css.cjs +1 -1
- package/dist/components/PreferencesDialog/PreferencesDialog.module.css.js +18 -19
- package/dist/components/PreferencesDialog.cjs +1 -1
- package/dist/components/PreferencesGroup/PreferencesGroup.cjs +1 -1
- package/dist/components/PreferencesGroup/PreferencesGroup.cjs.map +1 -1
- package/dist/components/PreferencesGroup/PreferencesGroup.d.ts +1 -1
- package/dist/components/PreferencesGroup/PreferencesGroup.js +2 -2
- package/dist/components/PreferencesGroup/PreferencesGroup.js.map +1 -1
- package/dist/components/PreferencesGroup.cjs +1 -1
- package/dist/components/PreferencesPage/PreferencesPage.cjs +1 -1
- package/dist/components/PreferencesPage/PreferencesPage.cjs.map +1 -1
- package/dist/components/PreferencesPage/PreferencesPage.d.ts +1 -1
- package/dist/components/PreferencesPage/PreferencesPage.js +9 -11
- package/dist/components/PreferencesPage/PreferencesPage.js.map +1 -1
- package/dist/components/PreferencesPage.cjs +1 -1
- package/dist/components/ProgressBar/ProgressBar.cjs +1 -1
- package/dist/components/ProgressBar/ProgressBar.cjs.map +1 -1
- package/dist/components/ProgressBar/ProgressBar.d.ts +1 -1
- package/dist/components/ProgressBar/ProgressBar.js +2 -2
- package/dist/components/ProgressBar/ProgressBar.js.map +1 -1
- package/dist/components/ProgressBar.cjs +1 -1
- package/dist/components/RadioButton/RadioButton.cjs +1 -1
- package/dist/components/RadioButton/RadioButton.cjs.map +1 -1
- package/dist/components/RadioButton/RadioButton.d.ts +1 -1
- package/dist/components/RadioButton/RadioButton.js +5 -7
- package/dist/components/RadioButton/RadioButton.js.map +1 -1
- package/dist/components/RadioButton.cjs +1 -1
- package/dist/components/SearchBar/SearchBar.cjs +1 -1
- package/dist/components/SearchBar/SearchBar.cjs.map +1 -1
- package/dist/components/SearchBar/SearchBar.d.ts +1 -1
- package/dist/components/SearchBar/SearchBar.js +2 -2
- package/dist/components/SearchBar/SearchBar.js.map +1 -1
- package/dist/components/SearchBar.cjs +1 -1
- package/dist/components/SegmentedBar/SegmentedBar.cjs +1 -1
- package/dist/components/SegmentedBar/SegmentedBar.cjs.map +1 -1
- package/dist/components/SegmentedBar/SegmentedBar.js.map +1 -1
- package/dist/components/SegmentedBar.cjs +1 -1
- package/dist/components/Separator/Separator.cjs +1 -1
- package/dist/components/Separator/Separator.cjs.map +1 -1
- package/dist/components/Separator/Separator.d.ts +1 -1
- package/dist/components/Separator/Separator.js +2 -2
- package/dist/components/Separator/Separator.js.map +1 -1
- package/dist/components/Separator.cjs +1 -1
- package/dist/components/ShortcutLabel/ShortcutLabel.cjs +1 -1
- package/dist/components/ShortcutLabel/ShortcutLabel.cjs.map +1 -1
- package/dist/components/ShortcutLabel/ShortcutLabel.d.ts +1 -1
- package/dist/components/ShortcutLabel/ShortcutLabel.js +2 -3
- package/dist/components/ShortcutLabel/ShortcutLabel.js.map +1 -1
- package/dist/components/ShortcutLabel.cjs +1 -1
- package/dist/components/ShortcutsDialog/ShortcutsDialog.cjs +1 -1
- package/dist/components/ShortcutsDialog/ShortcutsDialog.cjs.map +1 -1
- package/dist/components/ShortcutsDialog/ShortcutsDialog.d.ts +1 -1
- package/dist/components/ShortcutsDialog/ShortcutsDialog.js +75 -76
- package/dist/components/ShortcutsDialog/ShortcutsDialog.js.map +1 -1
- package/dist/components/ShortcutsDialog/ShortcutsDialog.module.css.cjs +1 -1
- package/dist/components/ShortcutsDialog/ShortcutsDialog.module.css.js +21 -22
- package/dist/components/ShortcutsDialog.cjs +1 -1
- package/dist/components/Sidebar/Sidebar.cjs +1 -1
- package/dist/components/Sidebar/Sidebar.cjs.map +1 -1
- package/dist/components/Sidebar/Sidebar.d.ts +1 -1
- package/dist/components/Sidebar/Sidebar.js +2 -3
- package/dist/components/Sidebar/Sidebar.js.map +1 -1
- package/dist/components/Sidebar/Sidebar.module.css.cjs +1 -1
- package/dist/components/Sidebar/Sidebar.module.css.js +33 -34
- package/dist/components/Sidebar/SidebarItem.cjs +1 -1
- package/dist/components/Sidebar/SidebarItem.cjs.map +1 -1
- package/dist/components/Sidebar/SidebarItem.d.ts +1 -1
- package/dist/components/Sidebar/SidebarItem.js +16 -16
- package/dist/components/Sidebar/SidebarItem.js.map +1 -1
- package/dist/components/Sidebar/SidebarSection.cjs +1 -1
- package/dist/components/Sidebar/SidebarSection.cjs.map +1 -1
- package/dist/components/Sidebar/SidebarSection.js.map +1 -1
- package/dist/components/Sidebar.cjs +1 -1
- package/dist/components/Skeleton/Skeleton.cjs +1 -1
- package/dist/components/Skeleton/Skeleton.cjs.map +1 -1
- package/dist/components/Skeleton/Skeleton.d.ts +1 -1
- package/dist/components/Skeleton/Skeleton.js +9 -10
- package/dist/components/Skeleton/Skeleton.js.map +1 -1
- package/dist/components/Skeleton.cjs +1 -1
- package/dist/components/Slider/Slider.cjs +1 -1
- package/dist/components/Slider/Slider.cjs.map +1 -1
- package/dist/components/Slider/Slider.d.ts +1 -1
- package/dist/components/Slider/Slider.js +2 -2
- package/dist/components/Slider/Slider.js.map +1 -1
- package/dist/components/Slider.cjs +1 -1
- package/dist/components/SpinButton/SpinButton.cjs +1 -1
- package/dist/components/SpinButton/SpinButton.cjs.map +1 -1
- package/dist/components/SpinButton/SpinButton.d.ts +1 -1
- package/dist/components/SpinButton/SpinButton.js +2 -2
- package/dist/components/SpinButton/SpinButton.js.map +1 -1
- package/dist/components/SpinButton.cjs +1 -1
- package/dist/components/SpinRow/SpinRow.cjs +1 -1
- package/dist/components/SpinRow/SpinRow.cjs.map +1 -1
- package/dist/components/SpinRow/SpinRow.d.ts +1 -1
- package/dist/components/SpinRow/SpinRow.js +2 -2
- package/dist/components/SpinRow/SpinRow.js.map +1 -1
- package/dist/components/SpinRow.cjs +1 -1
- package/dist/components/Spinner/Spinner.cjs +1 -1
- package/dist/components/Spinner/Spinner.cjs.map +1 -1
- package/dist/components/Spinner/Spinner.d.ts +1 -1
- package/dist/components/Spinner/Spinner.js +2 -2
- package/dist/components/Spinner/Spinner.js.map +1 -1
- package/dist/components/Spinner.cjs +1 -1
- package/dist/components/SplitButton/SplitButton.cjs +1 -1
- package/dist/components/SplitButton/SplitButton.cjs.map +1 -1
- package/dist/components/SplitButton/SplitButton.d.ts +1 -1
- package/dist/components/SplitButton/SplitButton.js +2 -2
- package/dist/components/SplitButton/SplitButton.js.map +1 -1
- package/dist/components/SplitButton.cjs +1 -1
- package/dist/components/StatusBadge/StatusBadge.cjs +1 -1
- package/dist/components/StatusBadge/StatusBadge.cjs.map +1 -1
- package/dist/components/StatusBadge/StatusBadge.d.ts +1 -1
- package/dist/components/StatusBadge/StatusBadge.js +9 -11
- package/dist/components/StatusBadge/StatusBadge.js.map +1 -1
- package/dist/components/StatusBadge.cjs +1 -1
- package/dist/components/StatusPage/StatusPage.cjs +1 -1
- package/dist/components/StatusPage/StatusPage.cjs.map +1 -1
- package/dist/components/StatusPage/StatusPage.d.ts +1 -1
- package/dist/components/StatusPage/StatusPage.js +2 -2
- package/dist/components/StatusPage/StatusPage.js.map +1 -1
- package/dist/components/StatusPage.cjs +1 -1
- package/dist/components/Switch/Switch.cjs +1 -1
- package/dist/components/Switch/Switch.cjs.map +1 -1
- package/dist/components/Switch/Switch.d.ts +1 -1
- package/dist/components/Switch/Switch.js +6 -8
- package/dist/components/Switch/Switch.js.map +1 -1
- package/dist/components/Switch.cjs +1 -1
- package/dist/components/SwitchRow/SwitchRow.cjs +1 -1
- package/dist/components/SwitchRow/SwitchRow.cjs.map +1 -1
- package/dist/components/SwitchRow/SwitchRow.d.ts +1 -1
- package/dist/components/SwitchRow/SwitchRow.js +7 -7
- package/dist/components/SwitchRow/SwitchRow.js.map +1 -1
- package/dist/components/SwitchRow.cjs +1 -1
- package/dist/components/Tabs/TabBar.cjs +1 -1
- package/dist/components/Tabs/TabBar.cjs.map +1 -1
- package/dist/components/Tabs/TabBar.d.ts +1 -1
- package/dist/components/Tabs/TabBar.js +2 -2
- package/dist/components/Tabs/TabBar.js.map +1 -1
- package/dist/components/Tabs/TabItem.cjs +1 -1
- package/dist/components/Tabs/TabItem.cjs.map +1 -1
- package/dist/components/Tabs/TabItem.js.map +1 -1
- package/dist/components/Tabs/TabPanel.cjs +1 -1
- package/dist/components/Tabs/TabPanel.cjs.map +1 -1
- package/dist/components/Tabs/TabPanel.d.ts +1 -1
- package/dist/components/Tabs/TabPanel.js +8 -10
- package/dist/components/Tabs/TabPanel.js.map +1 -1
- package/dist/components/Tabs.cjs +1 -1
- package/dist/components/TerminalView/TerminalView.cjs +1 -1
- package/dist/components/TerminalView/TerminalView.cjs.map +1 -1
- package/dist/components/TerminalView/TerminalView.d.ts +1 -1
- package/dist/components/TerminalView/TerminalView.js +2 -2
- package/dist/components/TerminalView/TerminalView.js.map +1 -1
- package/dist/components/TerminalView.cjs +1 -1
- package/dist/components/Text/Text.cjs +1 -1
- package/dist/components/Text/Text.cjs.map +1 -1
- package/dist/components/Text/Text.d.ts +1 -1
- package/dist/components/Text/Text.js +10 -13
- package/dist/components/Text/Text.js.map +1 -1
- package/dist/components/Text/Text.module.css.cjs +1 -1
- package/dist/components/Text/Text.module.css.js +9 -10
- package/dist/components/Text.cjs +1 -1
- package/dist/components/TextField/TextField.cjs +1 -1
- package/dist/components/TextField/TextField.cjs.map +1 -1
- package/dist/components/TextField/TextField.d.ts +1 -1
- package/dist/components/TextField/TextField.js +2 -2
- package/dist/components/TextField/TextField.js.map +1 -1
- package/dist/components/TextField.cjs +1 -1
- package/dist/components/Timeline/Timeline.cjs +1 -1
- package/dist/components/Timeline/Timeline.cjs.map +1 -1
- package/dist/components/Timeline/Timeline.d.ts +1 -1
- package/dist/components/Timeline/Timeline.js +2 -2
- package/dist/components/Timeline/Timeline.js.map +1 -1
- package/dist/components/Timeline.cjs +1 -1
- package/dist/components/Toast/Toast.cjs +1 -1
- package/dist/components/Toast/Toast.cjs.map +1 -1
- package/dist/components/Toast/Toast.d.ts +1 -1
- package/dist/components/Toast/Toast.js +2 -2
- package/dist/components/Toast/Toast.js.map +1 -1
- package/dist/components/Toast/Toast.module.css.cjs +1 -1
- package/dist/components/Toast/Toast.module.css.js +10 -11
- package/dist/components/Toast/Toaster.cjs +1 -1
- package/dist/components/Toast/Toaster.cjs.map +1 -1
- package/dist/components/Toast/Toaster.d.ts +1 -1
- package/dist/components/Toast/Toaster.js +2 -2
- package/dist/components/Toast/Toaster.js.map +1 -1
- package/dist/components/Toast.cjs +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.cjs +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.cjs.map +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.d.ts +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.js +2 -2
- package/dist/components/ToggleGroup/ToggleGroup.js.map +1 -1
- package/dist/components/ToggleGroup/ToggleGroupItem.cjs +1 -1
- package/dist/components/ToggleGroup/ToggleGroupItem.cjs.map +1 -1
- package/dist/components/ToggleGroup/ToggleGroupItem.d.ts +1 -1
- package/dist/components/ToggleGroup/ToggleGroupItem.js +2 -2
- package/dist/components/ToggleGroup/ToggleGroupItem.js.map +1 -1
- package/dist/components/ToggleGroup.cjs +1 -1
- package/dist/components/Toolbar/Spacer.cjs +1 -1
- package/dist/components/Toolbar/Spacer.cjs.map +1 -1
- package/dist/components/Toolbar/Spacer.d.ts +1 -1
- package/dist/components/Toolbar/Spacer.js +5 -7
- package/dist/components/Toolbar/Spacer.js.map +1 -1
- package/dist/components/Toolbar/Toolbar.cjs +1 -1
- package/dist/components/Toolbar/Toolbar.cjs.map +1 -1
- package/dist/components/Toolbar/Toolbar.d.ts +1 -1
- package/dist/components/Toolbar/Toolbar.js +5 -7
- package/dist/components/Toolbar/Toolbar.js.map +1 -1
- package/dist/components/Toolbar.cjs +1 -1
- package/dist/components/ToolbarView/ToolbarView.cjs +1 -1
- package/dist/components/ToolbarView/ToolbarView.cjs.map +1 -1
- package/dist/components/ToolbarView/ToolbarView.d.ts +1 -1
- package/dist/components/ToolbarView/ToolbarView.js +18 -20
- package/dist/components/ToolbarView/ToolbarView.js.map +1 -1
- package/dist/components/ToolbarView.cjs +1 -1
- package/dist/components/Tooltip/Tooltip.cjs +1 -1
- package/dist/components/Tooltip/Tooltip.cjs.map +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +1 -1
- package/dist/components/Tooltip/Tooltip.js +2 -2
- package/dist/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/components/Tooltip.cjs +1 -1
- package/dist/components/ViewSwitcher/ViewSwitcher.cjs +1 -1
- package/dist/components/ViewSwitcher/ViewSwitcher.cjs.map +1 -1
- package/dist/components/ViewSwitcher/ViewSwitcher.d.ts +1 -1
- package/dist/components/ViewSwitcher/ViewSwitcher.js +2 -2
- package/dist/components/ViewSwitcher/ViewSwitcher.js.map +1 -1
- package/dist/components/ViewSwitcher/ViewSwitcherItem.cjs +1 -1
- package/dist/components/ViewSwitcher/ViewSwitcherItem.cjs.map +1 -1
- package/dist/components/ViewSwitcher/ViewSwitcherItem.d.ts +1 -1
- package/dist/components/ViewSwitcher/ViewSwitcherItem.js +24 -26
- package/dist/components/ViewSwitcher/ViewSwitcherItem.js.map +1 -1
- package/dist/components/ViewSwitcher.cjs +1 -1
- package/dist/components/ViewSwitcherBar/ViewSwitcherBar.cjs +1 -1
- package/dist/components/ViewSwitcherBar/ViewSwitcherBar.cjs.map +1 -1
- package/dist/components/ViewSwitcherBar/ViewSwitcherBar.d.ts +1 -1
- package/dist/components/ViewSwitcherBar/ViewSwitcherBar.js +7 -9
- package/dist/components/ViewSwitcherBar/ViewSwitcherBar.js.map +1 -1
- package/dist/components/ViewSwitcherBar.cjs +1 -1
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebar.cjs +1 -1
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebar.cjs.map +1 -1
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebar.d.ts +1 -1
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebar.js +2 -2
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebar.js.map +1 -1
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebarItem.cjs +1 -1
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebarItem.cjs.map +1 -1
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebarItem.d.ts +1 -1
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebarItem.js +2 -2
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebarItem.js.map +1 -1
- package/dist/components/ViewSwitcherSidebar.cjs +1 -1
- package/dist/components/WindowTitle/WindowTitle.cjs +1 -1
- package/dist/components/WindowTitle/WindowTitle.cjs.map +1 -1
- package/dist/components/WindowTitle/WindowTitle.d.ts +1 -1
- package/dist/components/WindowTitle/WindowTitle.js +11 -13
- package/dist/components/WindowTitle/WindowTitle.js.map +1 -1
- package/dist/components/WindowTitle.cjs +1 -1
- package/dist/components/WrapBox/WrapBox.cjs +1 -1
- package/dist/components/WrapBox/WrapBox.cjs.map +1 -1
- package/dist/components/WrapBox/WrapBox.d.ts +1 -1
- package/dist/components/WrapBox/WrapBox.js +5 -5
- package/dist/components/WrapBox/WrapBox.js.map +1 -1
- package/dist/components/WrapBox.cjs +1 -1
- package/dist/hooks/useBreakpoint.cjs +1 -1
- package/dist/hooks/useBreakpoint.cjs.map +1 -1
- package/dist/hooks/useBreakpoint.js.map +1 -1
- package/dist/hooks.cjs +1 -1
- package/dist/index.cjs +1 -1
- package/package.json +2 -2
|
@@ -1,128 +1,127 @@
|
|
|
1
|
-
import e from "
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { useBodyScrollLock as e } from "../Dialog/dialogUtils.js";
|
|
2
|
+
import t from "./ShortcutsDialog.module.css.js";
|
|
3
|
+
import { useCallback as n, useEffect as r, useRef as i, useState as a } from "react";
|
|
4
|
+
import { createPortal as o } from "react-dom";
|
|
5
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
5
6
|
//#region src/components/ShortcutsDialog/ShortcutsDialog.tsx
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
let y = t((e) => {
|
|
7
|
+
var l = "button:not([disabled]), [href], input:not([disabled]), [tabindex]:not([tabindex=\"-1\"])", u = ({ open: u, onClose: d, title: f = "Keyboard Shortcuts", sections: p }) => {
|
|
8
|
+
let [m, h] = a(""), g = i(null), _ = i(null), v = i(null), y = i(`shortcuts-title-${Math.random().toString(36).slice(2, 9)}`);
|
|
9
|
+
e(u), r(() => {
|
|
10
|
+
u ? (v.current = document.activeElement, requestAnimationFrame(() => _.current?.focus())) : (h(""), v.current?.focus());
|
|
11
|
+
}, [u]);
|
|
12
|
+
let b = n((e) => {
|
|
13
13
|
if (e.key === "Escape") {
|
|
14
|
-
e.preventDefault(),
|
|
14
|
+
e.preventDefault(), d();
|
|
15
15
|
return;
|
|
16
16
|
}
|
|
17
17
|
if (e.key !== "Tab") return;
|
|
18
|
-
let t = Array.from(
|
|
18
|
+
let t = Array.from(g.current?.querySelectorAll(l) ?? []);
|
|
19
19
|
if (t.length === 0) return;
|
|
20
20
|
let n = t[0], r = t[t.length - 1];
|
|
21
21
|
e.shiftKey ? document.activeElement === n && (e.preventDefault(), r.focus()) : document.activeElement === r && (e.preventDefault(), n.focus());
|
|
22
|
-
}, [
|
|
23
|
-
if (!
|
|
24
|
-
let
|
|
22
|
+
}, [d]);
|
|
23
|
+
if (!u) return null;
|
|
24
|
+
let x = m.trim().toLowerCase(), S = p.map((e) => ({
|
|
25
25
|
...e,
|
|
26
|
-
shortcuts: e.shortcuts.filter(({ description: e, keys: t }) => !
|
|
27
|
-
})).filter((e) => e.shortcuts.length > 0),
|
|
28
|
-
className:
|
|
29
|
-
onClick:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
ref: h,
|
|
26
|
+
shortcuts: e.shortcuts.filter(({ description: e, keys: t }) => !x || e.toLowerCase().includes(x) || t.some((e) => e.toLowerCase().includes(x)))
|
|
27
|
+
})).filter((e) => e.shortcuts.length > 0), C = /* @__PURE__ */ s("div", {
|
|
28
|
+
className: t.backdrop,
|
|
29
|
+
onClick: d,
|
|
30
|
+
children: /* @__PURE__ */ c("div", {
|
|
31
|
+
ref: g,
|
|
33
32
|
role: "dialog",
|
|
34
33
|
"aria-modal": "true",
|
|
35
|
-
"aria-labelledby":
|
|
36
|
-
className:
|
|
37
|
-
onKeyDown:
|
|
34
|
+
"aria-labelledby": y.current,
|
|
35
|
+
className: t.dialog,
|
|
36
|
+
onKeyDown: b,
|
|
38
37
|
onClick: (e) => e.stopPropagation(),
|
|
39
38
|
children: [
|
|
40
|
-
/* @__PURE__ */
|
|
41
|
-
className:
|
|
42
|
-
children: [/* @__PURE__ */
|
|
43
|
-
id:
|
|
44
|
-
className:
|
|
45
|
-
children:
|
|
46
|
-
}), /* @__PURE__ */
|
|
39
|
+
/* @__PURE__ */ c("div", {
|
|
40
|
+
className: t.header,
|
|
41
|
+
children: [/* @__PURE__ */ s("span", {
|
|
42
|
+
id: y.current,
|
|
43
|
+
className: t.title,
|
|
44
|
+
children: f
|
|
45
|
+
}), /* @__PURE__ */ s("button", {
|
|
47
46
|
type: "button",
|
|
48
|
-
className:
|
|
47
|
+
className: t.closeBtn,
|
|
49
48
|
"aria-label": "Close",
|
|
50
|
-
onClick:
|
|
49
|
+
onClick: d,
|
|
51
50
|
children: "×"
|
|
52
51
|
})]
|
|
53
52
|
}),
|
|
54
|
-
/* @__PURE__ */
|
|
55
|
-
className:
|
|
53
|
+
/* @__PURE__ */ c("div", {
|
|
54
|
+
className: t.searchRow,
|
|
56
55
|
children: [
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
-
className:
|
|
56
|
+
/* @__PURE__ */ s("span", {
|
|
57
|
+
className: t.searchIcon,
|
|
59
58
|
"aria-hidden": "true",
|
|
60
59
|
children: "⌕"
|
|
61
60
|
}),
|
|
62
|
-
/* @__PURE__ */
|
|
63
|
-
ref:
|
|
61
|
+
/* @__PURE__ */ s("input", {
|
|
62
|
+
ref: _,
|
|
64
63
|
type: "search",
|
|
65
|
-
className:
|
|
64
|
+
className: t.searchInput,
|
|
66
65
|
placeholder: "Search shortcuts…",
|
|
67
|
-
value:
|
|
68
|
-
onChange: (e) =>
|
|
66
|
+
value: m,
|
|
67
|
+
onChange: (e) => h(e.target.value),
|
|
69
68
|
"aria-label": "Search shortcuts"
|
|
70
69
|
}),
|
|
71
|
-
|
|
70
|
+
m && /* @__PURE__ */ s("button", {
|
|
72
71
|
type: "button",
|
|
73
|
-
className:
|
|
72
|
+
className: t.searchClear,
|
|
74
73
|
"aria-label": "Clear search",
|
|
75
74
|
onClick: () => {
|
|
76
|
-
|
|
75
|
+
h(""), _.current?.focus();
|
|
77
76
|
},
|
|
78
77
|
children: "×"
|
|
79
78
|
})
|
|
80
79
|
]
|
|
81
80
|
}),
|
|
82
|
-
/* @__PURE__ */
|
|
83
|
-
className:
|
|
81
|
+
/* @__PURE__ */ s("div", {
|
|
82
|
+
className: t.body,
|
|
84
83
|
role: "list",
|
|
85
|
-
children:
|
|
86
|
-
className:
|
|
84
|
+
children: S.length === 0 ? /* @__PURE__ */ c("p", {
|
|
85
|
+
className: t.empty,
|
|
87
86
|
children: [
|
|
88
87
|
"No shortcuts match \"",
|
|
89
|
-
|
|
88
|
+
m,
|
|
90
89
|
"\""
|
|
91
90
|
]
|
|
92
|
-
}) :
|
|
93
|
-
className:
|
|
94
|
-
children: [/* @__PURE__ */
|
|
95
|
-
className:
|
|
96
|
-
children:
|
|
97
|
-
}), /* @__PURE__ */
|
|
98
|
-
className:
|
|
99
|
-
children:
|
|
100
|
-
className:
|
|
101
|
-
children: [/* @__PURE__ */
|
|
102
|
-
className:
|
|
103
|
-
"aria-label":
|
|
104
|
-
children:
|
|
105
|
-
className:
|
|
106
|
-
children: [/* @__PURE__ */
|
|
107
|
-
className:
|
|
91
|
+
}) : S.map((e) => /* @__PURE__ */ c("section", {
|
|
92
|
+
className: t.section,
|
|
93
|
+
children: [/* @__PURE__ */ s("h3", {
|
|
94
|
+
className: t.sectionTitle,
|
|
95
|
+
children: e.title
|
|
96
|
+
}), /* @__PURE__ */ s("ul", {
|
|
97
|
+
className: t.list,
|
|
98
|
+
children: e.shortcuts.map((e) => /* @__PURE__ */ c("li", {
|
|
99
|
+
className: t.row,
|
|
100
|
+
children: [/* @__PURE__ */ s("span", {
|
|
101
|
+
className: t.keys,
|
|
102
|
+
"aria-label": e.keys.join(" + "),
|
|
103
|
+
children: e.keys.map((n, r) => /* @__PURE__ */ c("span", {
|
|
104
|
+
className: t.keyCap,
|
|
105
|
+
children: [/* @__PURE__ */ s("kbd", { children: n }), r < e.keys.length - 1 && /* @__PURE__ */ s("span", {
|
|
106
|
+
className: t.plus,
|
|
108
107
|
"aria-hidden": "true",
|
|
109
108
|
children: "+"
|
|
110
109
|
})]
|
|
111
110
|
}, r))
|
|
112
|
-
}), /* @__PURE__ */
|
|
113
|
-
className:
|
|
114
|
-
children:
|
|
111
|
+
}), /* @__PURE__ */ s("span", {
|
|
112
|
+
className: t.description,
|
|
113
|
+
children: e.description
|
|
115
114
|
})]
|
|
116
|
-
},
|
|
115
|
+
}, e.description))
|
|
117
116
|
})]
|
|
118
|
-
},
|
|
117
|
+
}, e.title))
|
|
119
118
|
})
|
|
120
119
|
]
|
|
121
120
|
})
|
|
122
121
|
});
|
|
123
|
-
return typeof document > "u" ?
|
|
124
|
-
}
|
|
122
|
+
return typeof document > "u" ? C : o(C, document.body);
|
|
123
|
+
};
|
|
125
124
|
//#endregion
|
|
126
|
-
export {
|
|
125
|
+
export { u as ShortcutsDialog };
|
|
127
126
|
|
|
128
127
|
//# sourceMappingURL=ShortcutsDialog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShortcutsDialog.js","names":[],"sources":["../../../src/components/ShortcutsDialog/ShortcutsDialog.tsx"],"sourcesContent":["import { type KeyboardEvent, useCallback, useEffect, useRef, useState } from 'react';\n\nimport { createPortal } from 'react-dom';\n\nimport styles from './ShortcutsDialog.module.css';\n\n// ─── Public types ─────────────────────────────────────────────────────────────\n\nexport interface ShortcutEntry {\n /**\n * Key combination tokens, e.g. `[\"Ctrl\", \"S\"]` or `[\"F5\"]`.\n * Each token is rendered as a styled `<kbd>` key cap.\n */\n keys: string[];\n /** Human-readable description of what the shortcut does. */\n description: string;\n}\n\nexport interface ShortcutsSection {\n /** Section heading, e.g. \"File\", \"Edit\". */\n title: string;\n shortcuts: ShortcutEntry[];\n}\n\nexport interface ShortcutsDialogProps {\n /** Whether the dialog is visible. */\n open: boolean;\n /** Called when the dialog is dismissed (Escape, close button). */\n onClose: () => void;\n /** Dialog heading. Defaults to `\"Keyboard Shortcuts\"`. */\n title?: string;\n /** Shortcut sections to display. */\n sections: ShortcutsSection[];\n}\n\n// ─── Focusable selector (reused from Dialog) ─────────────────────────────────\n\nconst FOCUSABLE =\n 'button:not([disabled]), [href], input:not([disabled]), [tabindex]:not([tabindex=\"-1\"])';\n\n// ─── Component ────────────────────────────────────────────────────────────────\n\n/**\n * Modal dialog listing keyboard shortcuts, grouped in sections, with\n * integrated search to filter by description or key name.\n *\n * Mirrors `AdwShortcutsDialog` (libadwaita 1.8 / GNOME 49).\n *\n * - Renders into a portal (`document.body`).\n * - Traps focus; Escape closes.\n * - Search filters across all sections in real time.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.ShortcutsDialog.html\n */\nexport
|
|
1
|
+
{"version":3,"file":"ShortcutsDialog.js","names":[],"sources":["../../../src/components/ShortcutsDialog/ShortcutsDialog.tsx"],"sourcesContent":["import { type KeyboardEvent, useCallback, useEffect, useRef, useState } from 'react';\n\nimport { createPortal } from 'react-dom';\n\nimport { useBodyScrollLock } from '../Dialog/dialogUtils';\n\nimport styles from './ShortcutsDialog.module.css';\n\n// ─── Public types ─────────────────────────────────────────────────────────────\n\nexport interface ShortcutEntry {\n /**\n * Key combination tokens, e.g. `[\"Ctrl\", \"S\"]` or `[\"F5\"]`.\n * Each token is rendered as a styled `<kbd>` key cap.\n */\n keys: string[];\n /** Human-readable description of what the shortcut does. */\n description: string;\n}\n\nexport interface ShortcutsSection {\n /** Section heading, e.g. \"File\", \"Edit\". */\n title: string;\n shortcuts: ShortcutEntry[];\n}\n\nexport interface ShortcutsDialogProps {\n /** Whether the dialog is visible. */\n open: boolean;\n /** Called when the dialog is dismissed (Escape, close button). */\n onClose: () => void;\n /** Dialog heading. Defaults to `\"Keyboard Shortcuts\"`. */\n title?: string;\n /** Shortcut sections to display. */\n sections: ShortcutsSection[];\n}\n\n// ─── Focusable selector (reused from Dialog) ─────────────────────────────────\n\nconst FOCUSABLE =\n 'button:not([disabled]), [href], input:not([disabled]), [tabindex]:not([tabindex=\"-1\"])';\n\n// ─── Component ────────────────────────────────────────────────────────────────\n\n/**\n * Modal dialog listing keyboard shortcuts, grouped in sections, with\n * integrated search to filter by description or key name.\n *\n * Mirrors `AdwShortcutsDialog` (libadwaita 1.8 / GNOME 49).\n *\n * - Renders into a portal (`document.body`).\n * - Traps focus; Escape closes.\n * - Search filters across all sections in real time.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.ShortcutsDialog.html\n */\nexport const ShortcutsDialog = ({\n open,\n onClose,\n title = 'Keyboard Shortcuts',\n sections,\n}: ShortcutsDialogProps) => {\n const [query, setQuery] = useState('');\n const dialogRef = useRef<HTMLDivElement>(null);\n const searchRef = useRef<HTMLInputElement>(null);\n const previouslyFocused = useRef<Element | null>(null);\n const titleId = useRef(`shortcuts-title-${Math.random().toString(36).slice(2, 9)}`);\n\n useBodyScrollLock(open);\n\n // Save / restore focus\n useEffect(() => {\n if (open) {\n previouslyFocused.current = document.activeElement;\n // Focus the search field after mount\n requestAnimationFrame(() => searchRef.current?.focus());\n } else {\n setQuery('');\n (previouslyFocused.current as HTMLElement | null)?.focus();\n }\n }, [open]);\n\n // Focus trap + Escape\n const handleKeyDown = useCallback(\n (e: KeyboardEvent<HTMLDivElement>) => {\n if (e.key === 'Escape') {\n e.preventDefault();\n onClose();\n\n return;\n }\n\n if (e.key !== 'Tab') {\n return;\n }\n\n const focusable = Array.from(\n dialogRef.current?.querySelectorAll<HTMLElement>(FOCUSABLE) ?? [],\n );\n\n if (focusable.length === 0) {\n return;\n }\n\n const first = focusable[0];\n const last = focusable[focusable.length - 1];\n\n if (e.shiftKey) {\n if (document.activeElement === first) {\n e.preventDefault();\n last.focus();\n }\n } else {\n if (document.activeElement === last) {\n e.preventDefault();\n first.focus();\n }\n }\n },\n [onClose],\n );\n\n if (!open) {\n return null;\n }\n\n // Filter sections by query\n const q = query.trim().toLowerCase();\n const filtered = sections\n .map((section) => ({\n ...section,\n shortcuts: section.shortcuts.filter(\n ({ description, keys }) =>\n !q ||\n description.toLowerCase().includes(q) ||\n keys.some((k) => k.toLowerCase().includes(q)),\n ),\n }))\n .filter((s) => s.shortcuts.length > 0);\n\n const node = (\n <div className={styles.backdrop} onClick={onClose}>\n <div\n ref={dialogRef}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby={titleId.current}\n className={styles.dialog}\n onKeyDown={handleKeyDown}\n onClick={(e) => e.stopPropagation()}\n >\n {/* ── Header ── */}\n <div className={styles.header}>\n <span id={titleId.current} className={styles.title}>\n {title}\n </span>\n <button type=\"button\" className={styles.closeBtn} aria-label=\"Close\" onClick={onClose}>\n ×\n </button>\n </div>\n\n {/* ── Search ── */}\n <div className={styles.searchRow}>\n <span className={styles.searchIcon} aria-hidden=\"true\">\n ⌕\n </span>\n <input\n ref={searchRef}\n type=\"search\"\n className={styles.searchInput}\n placeholder=\"Search shortcuts…\"\n value={query}\n onChange={(e) => setQuery(e.target.value)}\n aria-label=\"Search shortcuts\"\n />\n {query && (\n <button\n type=\"button\"\n className={styles.searchClear}\n aria-label=\"Clear search\"\n onClick={() => {\n setQuery('');\n searchRef.current?.focus();\n }}\n >\n ×\n </button>\n )}\n </div>\n\n {/* ── Shortcut list ── */}\n <div className={styles.body} role=\"list\">\n {filtered.length === 0 ? (\n <p className={styles.empty}>No shortcuts match \"{query}\"</p>\n ) : (\n filtered.map((section) => (\n <section key={section.title} className={styles.section}>\n <h3 className={styles.sectionTitle}>{section.title}</h3>\n <ul className={styles.list}>\n {section.shortcuts.map((shortcut) => (\n <li key={shortcut.description} className={styles.row}>\n <span className={styles.keys} aria-label={shortcut.keys.join(' + ')}>\n {shortcut.keys.map((key, i) => (\n <span key={i} className={styles.keyCap}>\n <kbd>{key}</kbd>\n {i < shortcut.keys.length - 1 && (\n <span className={styles.plus} aria-hidden=\"true\">\n +\n </span>\n )}\n </span>\n ))}\n </span>\n <span className={styles.description}>{shortcut.description}</span>\n </li>\n ))}\n </ul>\n </section>\n ))\n )}\n </div>\n </div>\n </div>\n );\n\n if (typeof document === 'undefined') {\n return node;\n }\n\n return createPortal(node, document.body);\n};\n"],"mappings":";;;;;;AAuCA,IAAM,IACJ,4FAgBW,KAAmB,EAC9B,SACA,YACA,WAAQ,sBACR,kBAC0B;CAC1B,IAAM,CAAC,GAAO,KAAY,EAAS,EAAE,GAC/B,IAAY,EAAuB,IAAI,GACvC,IAAY,EAAyB,IAAI,GACzC,IAAoB,EAAuB,IAAI,GAC/C,IAAU,EAAO,mBAAmB,KAAK,OAAO,EAAE,SAAS,EAAE,EAAE,MAAM,GAAG,CAAC,GAAG;CAKlF,AAHA,EAAkB,CAAI,GAGtB,QAAgB;EACd,AAAI,KACF,EAAkB,UAAU,SAAS,eAErC,4BAA4B,EAAU,SAAS,MAAM,CAAC,MAEtD,EAAS,EAAE,GACX,EAAmB,SAAgC,MAAM;CAE7D,GAAG,CAAC,CAAI,CAAC;CAGT,IAAM,IAAgB,GACnB,MAAqC;EACpC,IAAI,EAAE,QAAQ,UAAU;GAEtB,AADA,EAAE,eAAe,GACjB,EAAQ;GAER;EACF;EAEA,IAAI,EAAE,QAAQ,OACZ;EAGF,IAAM,IAAY,MAAM,KACtB,EAAU,SAAS,iBAA8B,CAAS,KAAK,CAAC,CAClE;EAEA,IAAI,EAAU,WAAW,GACvB;EAGF,IAAM,IAAQ,EAAU,IAClB,IAAO,EAAU,EAAU,SAAS;EAE1C,AAAI,EAAE,WACA,SAAS,kBAAkB,MAC7B,EAAE,eAAe,GACjB,EAAK,MAAM,KAGT,SAAS,kBAAkB,MAC7B,EAAE,eAAe,GACjB,EAAM,MAAM;CAGlB,GACA,CAAC,CAAO,CACV;CAEA,IAAI,CAAC,GACH,OAAO;CAIT,IAAM,IAAI,EAAM,KAAK,EAAE,YAAY,GAC7B,IAAW,EACd,KAAK,OAAa;EACjB,GAAG;EACH,WAAW,EAAQ,UAAU,QAC1B,EAAE,gBAAa,cACd,CAAC,KACD,EAAY,YAAY,EAAE,SAAS,CAAC,KACpC,EAAK,MAAM,MAAM,EAAE,YAAY,EAAE,SAAS,CAAC,CAAC,CAChD;CACF,EAAE,EACD,QAAQ,MAAM,EAAE,UAAU,SAAS,CAAC,GAEjC,IACJ,kBAAC,OAAD;EAAK,WAAW,EAAO;EAAU,SAAS;YACxC,kBAAC,OAAD;GACE,KAAK;GACL,MAAK;GACL,cAAW;GACX,mBAAiB,EAAQ;GACzB,WAAW,EAAO;GAClB,WAAW;GACX,UAAU,MAAM,EAAE,gBAAgB;aAPpC;IAUE,kBAAC,OAAD;KAAK,WAAW,EAAO;eAAvB,CACE,kBAAC,QAAD;MAAM,IAAI,EAAQ;MAAS,WAAW,EAAO;gBAC1C;KACG,CAAA,GACN,kBAAC,UAAD;MAAQ,MAAK;MAAS,WAAW,EAAO;MAAU,cAAW;MAAQ,SAAS;gBAAS;KAE/E,CAAA,CACL;;IAGL,kBAAC,OAAD;KAAK,WAAW,EAAO;eAAvB;MACE,kBAAC,QAAD;OAAM,WAAW,EAAO;OAAY,eAAY;iBAAO;MAEjD,CAAA;MACN,kBAAC,SAAD;OACE,KAAK;OACL,MAAK;OACL,WAAW,EAAO;OAClB,aAAY;OACZ,OAAO;OACP,WAAW,MAAM,EAAS,EAAE,OAAO,KAAK;OACxC,cAAW;MACZ,CAAA;MACA,KACC,kBAAC,UAAD;OACE,MAAK;OACL,WAAW,EAAO;OAClB,cAAW;OACX,eAAe;QAEb,AADA,EAAS,EAAE,GACX,EAAU,SAAS,MAAM;OAC3B;iBACD;MAEO,CAAA;KAEP;;IAGL,kBAAC,OAAD;KAAK,WAAW,EAAO;KAAM,MAAK;eAC/B,EAAS,WAAW,IACnB,kBAAC,KAAD;MAAG,WAAW,EAAO;gBAArB;OAA4B;OAAqB;OAAM;MAAI;UAE3D,EAAS,KAAK,MACZ,kBAAC,WAAD;MAA6B,WAAW,EAAO;gBAA/C,CACE,kBAAC,MAAD;OAAI,WAAW,EAAO;iBAAe,EAAQ;MAAU,CAAA,GACvD,kBAAC,MAAD;OAAI,WAAW,EAAO;iBACnB,EAAQ,UAAU,KAAK,MACtB,kBAAC,MAAD;QAA+B,WAAW,EAAO;kBAAjD,CACE,kBAAC,QAAD;SAAM,WAAW,EAAO;SAAM,cAAY,EAAS,KAAK,KAAK,KAAK;mBAC/D,EAAS,KAAK,KAAK,GAAK,MACvB,kBAAC,QAAD;UAAc,WAAW,EAAO;oBAAhC,CACE,kBAAC,OAAD,EAAA,UAAM,EAAS,CAAA,GACd,IAAI,EAAS,KAAK,SAAS,KAC1B,kBAAC,QAAD;WAAM,WAAW,EAAO;WAAM,eAAY;qBAAO;UAE3C,CAAA,CAEJ;YAPK,CAOL,CACP;QACG,CAAA,GACN,kBAAC,QAAD;SAAM,WAAW,EAAO;mBAAc,EAAS;QAAkB,CAAA,CAC/D;UAdK,EAAS,WAcd,CACL;MACC,CAAA,CACG;QArBK,EAAQ,KAqBb,CACV;IAEA,CAAA;GACF;;CACF,CAAA;CAOP,OAJI,OAAO,WAAa,MACf,IAGF,EAAa,GAAM,SAAS,IAAI;AACzC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e
|
|
1
|
+
var e={backdrop:`_backdrop_16tbw_3`,"backdrop-in":`_backdrop-in_16tbw_1`,dialog:`_dialog_16tbw_30`,"dialog-in":`_dialog-in_16tbw_1`,header:`_header_16tbw_63`,title:`_title_16tbw_71`,closeBtn:`_closeBtn_16tbw_78`,searchRow:`_searchRow_16tbw_117`,searchIcon:`_searchIcon_16tbw_129`,searchInput:`_searchInput_16tbw_137`,searchClear:`_searchClear_16tbw_158`,body:`_body_16tbw_183`,empty:`_empty_16tbw_191`,section:`_section_16tbw_202`,sectionTitle:`_sectionTitle_16tbw_208`,list:`_list_16tbw_218`,row:`_row_16tbw_234`,keys:`_keys_16tbw_249`,keyCap:`_keyCap_16tbw_256`,plus:`_plus_16tbw_286`,description:`_description_16tbw_293`};exports.default=e;
|
|
2
2
|
//# sourceMappingURL=ShortcutsDialog.module.css.cjs.map
|
|
@@ -1,28 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
backdrop: e,
|
|
1
|
+
var e = {
|
|
2
|
+
backdrop: "_backdrop_16tbw_3",
|
|
4
3
|
"backdrop-in": "_backdrop-in_16tbw_1",
|
|
5
|
-
dialog:
|
|
4
|
+
dialog: "_dialog_16tbw_30",
|
|
6
5
|
"dialog-in": "_dialog-in_16tbw_1",
|
|
7
|
-
header:
|
|
8
|
-
title:
|
|
9
|
-
closeBtn:
|
|
10
|
-
searchRow:
|
|
11
|
-
searchIcon:
|
|
12
|
-
searchInput:
|
|
13
|
-
searchClear:
|
|
14
|
-
body:
|
|
15
|
-
empty:
|
|
16
|
-
section:
|
|
17
|
-
sectionTitle:
|
|
18
|
-
list:
|
|
19
|
-
row:
|
|
20
|
-
keys:
|
|
21
|
-
keyCap:
|
|
22
|
-
plus:
|
|
23
|
-
description:
|
|
6
|
+
header: "_header_16tbw_63",
|
|
7
|
+
title: "_title_16tbw_71",
|
|
8
|
+
closeBtn: "_closeBtn_16tbw_78",
|
|
9
|
+
searchRow: "_searchRow_16tbw_117",
|
|
10
|
+
searchIcon: "_searchIcon_16tbw_129",
|
|
11
|
+
searchInput: "_searchInput_16tbw_137",
|
|
12
|
+
searchClear: "_searchClear_16tbw_158",
|
|
13
|
+
body: "_body_16tbw_183",
|
|
14
|
+
empty: "_empty_16tbw_191",
|
|
15
|
+
section: "_section_16tbw_202",
|
|
16
|
+
sectionTitle: "_sectionTitle_16tbw_208",
|
|
17
|
+
list: "_list_16tbw_218",
|
|
18
|
+
row: "_row_16tbw_234",
|
|
19
|
+
keys: "_keys_16tbw_249",
|
|
20
|
+
keyCap: "_keyCap_16tbw_256",
|
|
21
|
+
plus: "_plus_16tbw_286",
|
|
22
|
+
description: "_description_16tbw_293"
|
|
24
23
|
};
|
|
25
24
|
//#endregion
|
|
26
|
-
export {
|
|
25
|
+
export { e as default };
|
|
27
26
|
|
|
28
27
|
//# sourceMappingURL=ShortcutsDialog.module.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./ShortcutsDialog/ShortcutsDialog.cjs");exports.ShortcutsDialog=e.ShortcutsDialog;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(
|
|
1
|
+
const e=require("../../hooks/useBreakpoint.cjs"),t=require("../SearchBar/SearchBar.cjs"),n=require("../StatusPage/StatusPage.cjs"),r=require("./Sidebar.module.css.cjs");let i=require("react"),a=require("react/jsx-runtime");var o=(0,i.createContext)(!1);function s(){return(0,i.useContext)(o)}var c=(0,i.createContext)(``);function l(e,t){let n=0;return i.Children.forEach(e,e=>{if(!(0,i.isValidElement)(e))return;let r=e.props;typeof r.label==`string`?r.label.toLowerCase().includes(t.toLowerCase())&&n++:r.children&&(n+=l(r.children,t))}),n}var u={blue:`variantBlue`,green:`variantGreen`,red:`variantRed`,yellow:`variantYellow`,black:`variantBlack`,transparent:`variantTransparent`,blurred:`variantBlurred`},d=({children:s,collapsed:d=!1,searchable:f,filter:p,onFilterChange:m,mode:h,variant:g=`classic`,className:_,...v})=>{let[y,b]=(0,i.useState)(``),{isNarrow:x}=e.useBreakpoint(),S=p!==void 0,C=S?p:y,w=e=>{S||b(e),m?.(e)},T=C.length>0,E=h??(x?`page`:`sidebar`),D=!T||l(s,C)>0;return(0,a.jsx)(o.Provider,{value:d,children:(0,a.jsx)(c.Provider,{value:C,children:(0,a.jsxs)(`nav`,{className:[r.default.sidebar,d?r.default.collapsed:null,E===`page`?r.default.pageMode:null,g===`classic`?null:r.default[u[g]],_].filter(Boolean).join(` `),...v,children:[f&&(0,a.jsx)(`div`,{className:r.default.searchWrap,children:(0,a.jsx)(t.SearchBar,{open:!0,value:C,onChange:e=>w(e.target.value),onClose:()=>w(``),onClear:()=>w(``),inline:!0})}),T&&!D?(0,a.jsx)(n.StatusPage,{title:`No Results`,description:`No items match your search.`,compact:!0}):s]})})})};exports.Sidebar=d,exports.SidebarCollapsedContext=o,exports.SidebarFilterContext=c,exports.useSidebarCollapsed=s;
|
|
2
2
|
//# sourceMappingURL=Sidebar.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sidebar.cjs","names":[],"sources":["../../../src/components/Sidebar/Sidebar.tsx"],"sourcesContent":["import {\n Children,\n createContext,\n type HTMLAttributes,\n isValidElement,\n type ReactNode,\n useContext,\n useState,\n} from 'react';\n\nimport { useBreakpoint } from '../../hooks/useBreakpoint';\nimport { SearchBar } from '../SearchBar';\nimport { StatusPage } from '../StatusPage';\n\nimport styles from './Sidebar.module.css';\n\n// ─── Contexts ─────────────────────────────────────────────────────────────────\n\n/** Provides the collapsed state to all descendant `SidebarItem` components. */\n// eslint-disable-next-line react-refresh/only-export-components\nexport const SidebarCollapsedContext = createContext(false);\n\n/** Returns `true` when the nearest `Sidebar` is in collapsed (icon-only) mode. */\n// eslint-disable-next-line react-refresh/only-export-components\nexport function useSidebarCollapsed() {\n return useContext(SidebarCollapsedContext);\n}\n\n/** Provides the active filter string to all descendant `SidebarItem` components. */\n// eslint-disable-next-line react-refresh/only-export-components\nexport const SidebarFilterContext = createContext('');\n\n// ─── Helpers ──────────────────────────────────────────────────────────────────\n\n/** Recursively count items whose `label` matches `filter` (case-insensitive). */\nfunction countMatchingItems(children: ReactNode, filter: string): number {\n let count = 0;\n Children.forEach(children, (child) => {\n if (!isValidElement(child)) {\n return;\n }\n\n const props = child.props as Record<string, unknown>;\n\n if (typeof props.label === 'string') {\n if (props.label.toLowerCase().includes(filter.toLowerCase())) {\n count++;\n }\n } else if (props.children) {\n count += countMatchingItems(props.children as ReactNode, filter);\n }\n });\n\n return count;\n}\n\n// ─── Variant map ──────────────────────────────────────────────────────────────\n\nconst variantClass: Record<string, string> = {\n blue: 'variantBlue',\n green: 'variantGreen',\n red: 'variantRed',\n yellow: 'variantYellow',\n black: 'variantBlack',\n transparent: 'variantTransparent',\n blurred: 'variantBlurred',\n};\n\n// ─── Component ────────────────────────────────────────────────────────────────\n\nexport interface SidebarProps extends HTMLAttributes<HTMLElement> {\n children?: ReactNode;\n /**\n * When `true`, collapses the sidebar to icon-only mode (rail/mini).\n * Labels, suffixes, and section titles are hidden; tooltips appear on hover.\n */\n collapsed?: boolean;\n /**\n * Renders a built-in `SearchBar` inside the sidebar and manages the filter\n * state internally (uncontrolled). Combine with `filter` + `onFilterChange`\n * for controlled mode.\n */\n searchable?: boolean;\n /**\n * Controlled filter string. Items whose `label` does not match\n * (case-insensitive substring) are hidden. Does not render a `SearchBar`\n * on its own — use `searchable` for the built-in search input.\n */\n filter?: string;\n /** Called when the built-in search value changes. */\n onFilterChange?: (value: string) => void;\n /**\n * Layout mode:\n * - `\"sidebar\"` — fixed-width panel with a border (default).\n * - `\"page\"` — full-width boxed-list layout for narrow viewports.\n *\n * When omitted the sidebar auto-switches to `\"page\"` at ≤ 400 sp,\n * mirroring `AdwSidebar` mobile behaviour.\n */\n mode?: 'sidebar' | 'page';\n /**\n * Visual style variant for the sidebar background.\n * - `\"classic\"` — default GNOME gray\n * - `\"blue\"` | `\"green\"` | `\"red\"` | `\"yellow\"` — tinted accent backgrounds\n * - `\"black\"` — dark/OLED background\n * - `\"transparent\"` — no background, inherits parent\n * - `\"blurred\"` — frosted glass (backdrop-filter blur), like macOS\n */\n variant?: 'classic' | 'blue' | 'green' | 'red' | 'yellow' | 'black' | 'transparent' | 'blurred';\n}\n\n/**\n * Lateral navigation panel following the Adwaita `.navigation-sidebar` style.\n *\n * **Tier 11 — libadwaita 1.9 completeness:**\n * - `searchable` — built-in `SearchBar` with automatic item filtering.\n * - `filter` / `onFilterChange` — controlled external filtering.\n * - `mode` — `\"sidebar\"` (default) or `\"page\"` (boxed-list layout).\n * Auto-switches to `\"page\"` at ≤ 400 sp when `mode` is unset.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Sidebar.html\n */\nexport
|
|
1
|
+
{"version":3,"file":"Sidebar.cjs","names":[],"sources":["../../../src/components/Sidebar/Sidebar.tsx"],"sourcesContent":["import {\n Children,\n createContext,\n type HTMLAttributes,\n isValidElement,\n type ReactNode,\n useContext,\n useState,\n} from 'react';\n\nimport { useBreakpoint } from '../../hooks/useBreakpoint';\nimport { SearchBar } from '../SearchBar';\nimport { StatusPage } from '../StatusPage';\n\nimport styles from './Sidebar.module.css';\n\n// ─── Contexts ─────────────────────────────────────────────────────────────────\n\n/** Provides the collapsed state to all descendant `SidebarItem` components. */\n// eslint-disable-next-line react-refresh/only-export-components\nexport const SidebarCollapsedContext = createContext(false);\n\n/** Returns `true` when the nearest `Sidebar` is in collapsed (icon-only) mode. */\n// eslint-disable-next-line react-refresh/only-export-components\nexport function useSidebarCollapsed() {\n return useContext(SidebarCollapsedContext);\n}\n\n/** Provides the active filter string to all descendant `SidebarItem` components. */\n// eslint-disable-next-line react-refresh/only-export-components\nexport const SidebarFilterContext = createContext('');\n\n// ─── Helpers ──────────────────────────────────────────────────────────────────\n\n/** Recursively count items whose `label` matches `filter` (case-insensitive). */\nfunction countMatchingItems(children: ReactNode, filter: string): number {\n let count = 0;\n Children.forEach(children, (child) => {\n if (!isValidElement(child)) {\n return;\n }\n\n const props = child.props as Record<string, unknown>;\n\n if (typeof props.label === 'string') {\n if (props.label.toLowerCase().includes(filter.toLowerCase())) {\n count++;\n }\n } else if (props.children) {\n count += countMatchingItems(props.children as ReactNode, filter);\n }\n });\n\n return count;\n}\n\n// ─── Variant map ──────────────────────────────────────────────────────────────\n\nconst variantClass: Record<string, string> = {\n blue: 'variantBlue',\n green: 'variantGreen',\n red: 'variantRed',\n yellow: 'variantYellow',\n black: 'variantBlack',\n transparent: 'variantTransparent',\n blurred: 'variantBlurred',\n};\n\n// ─── Component ────────────────────────────────────────────────────────────────\n\nexport interface SidebarProps extends HTMLAttributes<HTMLElement> {\n children?: ReactNode;\n /**\n * When `true`, collapses the sidebar to icon-only mode (rail/mini).\n * Labels, suffixes, and section titles are hidden; tooltips appear on hover.\n */\n collapsed?: boolean;\n /**\n * Renders a built-in `SearchBar` inside the sidebar and manages the filter\n * state internally (uncontrolled). Combine with `filter` + `onFilterChange`\n * for controlled mode.\n */\n searchable?: boolean;\n /**\n * Controlled filter string. Items whose `label` does not match\n * (case-insensitive substring) are hidden. Does not render a `SearchBar`\n * on its own — use `searchable` for the built-in search input.\n */\n filter?: string;\n /** Called when the built-in search value changes. */\n onFilterChange?: (value: string) => void;\n /**\n * Layout mode:\n * - `\"sidebar\"` — fixed-width panel with a border (default).\n * - `\"page\"` — full-width boxed-list layout for narrow viewports.\n *\n * When omitted the sidebar auto-switches to `\"page\"` at ≤ 400 sp,\n * mirroring `AdwSidebar` mobile behaviour.\n */\n mode?: 'sidebar' | 'page';\n /**\n * Visual style variant for the sidebar background.\n * - `\"classic\"` — default GNOME gray\n * - `\"blue\"` | `\"green\"` | `\"red\"` | `\"yellow\"` — tinted accent backgrounds\n * - `\"black\"` — dark/OLED background\n * - `\"transparent\"` — no background, inherits parent\n * - `\"blurred\"` — frosted glass (backdrop-filter blur), like macOS\n */\n variant?: 'classic' | 'blue' | 'green' | 'red' | 'yellow' | 'black' | 'transparent' | 'blurred';\n}\n\n/**\n * Lateral navigation panel following the Adwaita `.navigation-sidebar` style.\n *\n * **Tier 11 — libadwaita 1.9 completeness:**\n * - `searchable` — built-in `SearchBar` with automatic item filtering.\n * - `filter` / `onFilterChange` — controlled external filtering.\n * - `mode` — `\"sidebar\"` (default) or `\"page\"` (boxed-list layout).\n * Auto-switches to `\"page\"` at ≤ 400 sp when `mode` is unset.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Sidebar.html\n */\nexport const Sidebar = ({\n children,\n collapsed = false,\n searchable,\n filter: controlledFilter,\n onFilterChange,\n mode,\n variant = 'classic',\n className,\n ...props\n}: SidebarProps) => {\n const [internalFilter, setInternalFilter] = useState('');\n const { isNarrow } = useBreakpoint();\n\n const isControlled = controlledFilter !== undefined;\n const filterValue = isControlled ? controlledFilter : internalFilter;\n\n const handleFilterChange = (v: string) => {\n if (!isControlled) {\n setInternalFilter(v);\n }\n\n onFilterChange?.(v);\n };\n\n const isFilterActive = filterValue.length > 0;\n const effectiveMode = mode ?? (isNarrow ? 'page' : 'sidebar');\n const hasMatches = !isFilterActive || countMatchingItems(children, filterValue) > 0;\n\n return (\n <SidebarCollapsedContext.Provider value={collapsed}>\n <SidebarFilterContext.Provider value={filterValue}>\n <nav\n className={[\n styles.sidebar,\n collapsed ? styles.collapsed : null,\n effectiveMode === 'page' ? styles.pageMode : null,\n variant !== 'classic' ? styles[variantClass[variant]] : null,\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n >\n {searchable && (\n <div className={styles.searchWrap}>\n <SearchBar\n open\n value={filterValue}\n onChange={(e) => handleFilterChange(e.target.value)}\n onClose={() => handleFilterChange('')}\n onClear={() => handleFilterChange('')}\n inline\n />\n </div>\n )}\n\n {isFilterActive && !hasMatches ? (\n <StatusPage title=\"No Results\" description=\"No items match your search.\" compact />\n ) : (\n children\n )}\n </nav>\n </SidebarFilterContext.Provider>\n </SidebarCollapsedContext.Provider>\n );\n};\n"],"mappings":"+NAoBA,IAAa,GAAA,EAAA,EAAA,eAAwC,EAAK,EAI1D,SAAgB,GAAsB,CACpC,OAAA,EAAA,EAAA,YAAkB,CAAuB,CAC3C,CAIA,IAAa,GAAA,EAAA,EAAA,eAAqC,EAAE,EAKpD,SAAS,EAAmB,EAAqB,EAAwB,CACvE,IAAI,EAAQ,EAiBZ,OAhBA,EAAA,SAAS,QAAQ,EAAW,GAAU,CACpC,GAAI,EAAA,EAAA,EAAA,gBAAgB,CAAK,EACvB,OAGF,IAAM,EAAQ,EAAM,MAEhB,OAAO,EAAM,OAAU,SACrB,EAAM,MAAM,YAAY,EAAE,SAAS,EAAO,YAAY,CAAC,GACzD,IAEO,EAAM,WACf,GAAS,EAAmB,EAAM,SAAuB,CAAM,EAEnE,CAAC,EAEM,CACT,CAIA,IAAM,EAAuC,CAC3C,KAAM,cACN,MAAO,eACP,IAAK,aACL,OAAQ,gBACR,MAAO,eACP,YAAa,qBACb,QAAS,gBACX,EAwDa,GAAW,CACtB,WACA,YAAY,GACZ,aACA,OAAQ,EACR,iBACA,OACA,UAAU,UACV,YACA,GAAG,KACe,CAClB,GAAM,CAAC,EAAgB,IAAA,EAAA,EAAA,UAA8B,EAAE,EACjD,CAAE,YAAa,EAAA,cAAc,EAE7B,EAAe,IAAqB,IAAA,GACpC,EAAc,EAAe,EAAmB,EAEhD,EAAsB,GAAc,CACnC,GACH,EAAkB,CAAC,EAGrB,IAAiB,CAAC,CACpB,EAEM,EAAiB,EAAY,OAAS,EACtC,EAAgB,IAAS,EAAW,OAAS,WAC7C,EAAa,CAAC,GAAkB,EAAmB,EAAU,CAAW,EAAI,EAElF,OACE,EAAA,EAAA,KAAC,EAAwB,SAAzB,CAAkC,MAAO,YACvC,EAAA,EAAA,KAAC,EAAqB,SAAtB,CAA+B,MAAO,YACpC,EAAA,EAAA,MAAC,MAAD,CACE,UAAW,CACT,EAAA,QAAO,QACP,EAAY,EAAA,QAAO,UAAY,KAC/B,IAAkB,OAAS,EAAA,QAAO,SAAW,KAC7C,IAAY,UAA4C,KAAhC,EAAA,QAAO,EAAa,IAC5C,CACF,EACG,OAAO,OAAO,EACd,KAAK,GAAG,EACX,GAAI,WAVN,CAYG,IACC,EAAA,EAAA,KAAC,MAAD,CAAK,UAAW,EAAA,QAAO,qBACrB,EAAA,EAAA,KAAC,EAAA,UAAD,CACE,KAAA,GACA,MAAO,EACP,SAAW,GAAM,EAAmB,EAAE,OAAO,KAAK,EAClD,YAAe,EAAmB,EAAE,EACpC,YAAe,EAAmB,EAAE,EACpC,OAAA,EACD,CAAA,CACE,CAAA,EAGN,GAAkB,CAAC,GAClB,EAAA,EAAA,KAAC,EAAA,WAAD,CAAY,MAAM,aAAa,YAAY,8BAA8B,QAAA,EAAS,CAAA,EAElF,CAEC,GACwB,CAAA,CACC,CAAA,CAEtC"}
|
|
@@ -56,4 +56,4 @@ export interface SidebarProps extends HTMLAttributes<HTMLElement> {
|
|
|
56
56
|
*
|
|
57
57
|
* @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Sidebar.html
|
|
58
58
|
*/
|
|
59
|
-
export declare
|
|
59
|
+
export declare const Sidebar: ({ children, collapsed, searchable, filter: controlledFilter, onFilterChange, mode, variant, className, ...props }: SidebarProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -26,8 +26,7 @@ var h = {
|
|
|
26
26
|
black: "variantBlack",
|
|
27
27
|
transparent: "variantTransparent",
|
|
28
28
|
blurred: "variantBlurred"
|
|
29
|
-
}
|
|
30
|
-
function g({ children: i, collapsed: a = !1, searchable: o, filter: s, onFilterChange: f, mode: g, variant: _ = "classic", className: v, ...y }) {
|
|
29
|
+
}, g = ({ children: i, collapsed: a = !1, searchable: o, filter: s, onFilterChange: f, mode: g, variant: _ = "classic", className: v, ...y }) => {
|
|
31
30
|
let [b, x] = c(""), { isNarrow: S } = e(), C = s !== void 0, w = C ? s : b, T = (e) => {
|
|
32
31
|
C || x(e), f?.(e);
|
|
33
32
|
}, E = w.length > 0, D = g ?? (S ? "page" : "sidebar"), O = !E || m(i, w) > 0;
|
|
@@ -62,7 +61,7 @@ function g({ children: i, collapsed: a = !1, searchable: o, filter: s, onFilterC
|
|
|
62
61
|
})
|
|
63
62
|
})
|
|
64
63
|
});
|
|
65
|
-
}
|
|
64
|
+
};
|
|
66
65
|
//#endregion
|
|
67
66
|
export { g as Sidebar, d as SidebarCollapsedContext, p as SidebarFilterContext, f as useSidebarCollapsed };
|
|
68
67
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sidebar.js","names":[],"sources":["../../../src/components/Sidebar/Sidebar.tsx"],"sourcesContent":["import {\n Children,\n createContext,\n type HTMLAttributes,\n isValidElement,\n type ReactNode,\n useContext,\n useState,\n} from 'react';\n\nimport { useBreakpoint } from '../../hooks/useBreakpoint';\nimport { SearchBar } from '../SearchBar';\nimport { StatusPage } from '../StatusPage';\n\nimport styles from './Sidebar.module.css';\n\n// ─── Contexts ─────────────────────────────────────────────────────────────────\n\n/** Provides the collapsed state to all descendant `SidebarItem` components. */\n// eslint-disable-next-line react-refresh/only-export-components\nexport const SidebarCollapsedContext = createContext(false);\n\n/** Returns `true` when the nearest `Sidebar` is in collapsed (icon-only) mode. */\n// eslint-disable-next-line react-refresh/only-export-components\nexport function useSidebarCollapsed() {\n return useContext(SidebarCollapsedContext);\n}\n\n/** Provides the active filter string to all descendant `SidebarItem` components. */\n// eslint-disable-next-line react-refresh/only-export-components\nexport const SidebarFilterContext = createContext('');\n\n// ─── Helpers ──────────────────────────────────────────────────────────────────\n\n/** Recursively count items whose `label` matches `filter` (case-insensitive). */\nfunction countMatchingItems(children: ReactNode, filter: string): number {\n let count = 0;\n Children.forEach(children, (child) => {\n if (!isValidElement(child)) {\n return;\n }\n\n const props = child.props as Record<string, unknown>;\n\n if (typeof props.label === 'string') {\n if (props.label.toLowerCase().includes(filter.toLowerCase())) {\n count++;\n }\n } else if (props.children) {\n count += countMatchingItems(props.children as ReactNode, filter);\n }\n });\n\n return count;\n}\n\n// ─── Variant map ──────────────────────────────────────────────────────────────\n\nconst variantClass: Record<string, string> = {\n blue: 'variantBlue',\n green: 'variantGreen',\n red: 'variantRed',\n yellow: 'variantYellow',\n black: 'variantBlack',\n transparent: 'variantTransparent',\n blurred: 'variantBlurred',\n};\n\n// ─── Component ────────────────────────────────────────────────────────────────\n\nexport interface SidebarProps extends HTMLAttributes<HTMLElement> {\n children?: ReactNode;\n /**\n * When `true`, collapses the sidebar to icon-only mode (rail/mini).\n * Labels, suffixes, and section titles are hidden; tooltips appear on hover.\n */\n collapsed?: boolean;\n /**\n * Renders a built-in `SearchBar` inside the sidebar and manages the filter\n * state internally (uncontrolled). Combine with `filter` + `onFilterChange`\n * for controlled mode.\n */\n searchable?: boolean;\n /**\n * Controlled filter string. Items whose `label` does not match\n * (case-insensitive substring) are hidden. Does not render a `SearchBar`\n * on its own — use `searchable` for the built-in search input.\n */\n filter?: string;\n /** Called when the built-in search value changes. */\n onFilterChange?: (value: string) => void;\n /**\n * Layout mode:\n * - `\"sidebar\"` — fixed-width panel with a border (default).\n * - `\"page\"` — full-width boxed-list layout for narrow viewports.\n *\n * When omitted the sidebar auto-switches to `\"page\"` at ≤ 400 sp,\n * mirroring `AdwSidebar` mobile behaviour.\n */\n mode?: 'sidebar' | 'page';\n /**\n * Visual style variant for the sidebar background.\n * - `\"classic\"` — default GNOME gray\n * - `\"blue\"` | `\"green\"` | `\"red\"` | `\"yellow\"` — tinted accent backgrounds\n * - `\"black\"` — dark/OLED background\n * - `\"transparent\"` — no background, inherits parent\n * - `\"blurred\"` — frosted glass (backdrop-filter blur), like macOS\n */\n variant?: 'classic' | 'blue' | 'green' | 'red' | 'yellow' | 'black' | 'transparent' | 'blurred';\n}\n\n/**\n * Lateral navigation panel following the Adwaita `.navigation-sidebar` style.\n *\n * **Tier 11 — libadwaita 1.9 completeness:**\n * - `searchable` — built-in `SearchBar` with automatic item filtering.\n * - `filter` / `onFilterChange` — controlled external filtering.\n * - `mode` — `\"sidebar\"` (default) or `\"page\"` (boxed-list layout).\n * Auto-switches to `\"page\"` at ≤ 400 sp when `mode` is unset.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Sidebar.html\n */\nexport
|
|
1
|
+
{"version":3,"file":"Sidebar.js","names":[],"sources":["../../../src/components/Sidebar/Sidebar.tsx"],"sourcesContent":["import {\n Children,\n createContext,\n type HTMLAttributes,\n isValidElement,\n type ReactNode,\n useContext,\n useState,\n} from 'react';\n\nimport { useBreakpoint } from '../../hooks/useBreakpoint';\nimport { SearchBar } from '../SearchBar';\nimport { StatusPage } from '../StatusPage';\n\nimport styles from './Sidebar.module.css';\n\n// ─── Contexts ─────────────────────────────────────────────────────────────────\n\n/** Provides the collapsed state to all descendant `SidebarItem` components. */\n// eslint-disable-next-line react-refresh/only-export-components\nexport const SidebarCollapsedContext = createContext(false);\n\n/** Returns `true` when the nearest `Sidebar` is in collapsed (icon-only) mode. */\n// eslint-disable-next-line react-refresh/only-export-components\nexport function useSidebarCollapsed() {\n return useContext(SidebarCollapsedContext);\n}\n\n/** Provides the active filter string to all descendant `SidebarItem` components. */\n// eslint-disable-next-line react-refresh/only-export-components\nexport const SidebarFilterContext = createContext('');\n\n// ─── Helpers ──────────────────────────────────────────────────────────────────\n\n/** Recursively count items whose `label` matches `filter` (case-insensitive). */\nfunction countMatchingItems(children: ReactNode, filter: string): number {\n let count = 0;\n Children.forEach(children, (child) => {\n if (!isValidElement(child)) {\n return;\n }\n\n const props = child.props as Record<string, unknown>;\n\n if (typeof props.label === 'string') {\n if (props.label.toLowerCase().includes(filter.toLowerCase())) {\n count++;\n }\n } else if (props.children) {\n count += countMatchingItems(props.children as ReactNode, filter);\n }\n });\n\n return count;\n}\n\n// ─── Variant map ──────────────────────────────────────────────────────────────\n\nconst variantClass: Record<string, string> = {\n blue: 'variantBlue',\n green: 'variantGreen',\n red: 'variantRed',\n yellow: 'variantYellow',\n black: 'variantBlack',\n transparent: 'variantTransparent',\n blurred: 'variantBlurred',\n};\n\n// ─── Component ────────────────────────────────────────────────────────────────\n\nexport interface SidebarProps extends HTMLAttributes<HTMLElement> {\n children?: ReactNode;\n /**\n * When `true`, collapses the sidebar to icon-only mode (rail/mini).\n * Labels, suffixes, and section titles are hidden; tooltips appear on hover.\n */\n collapsed?: boolean;\n /**\n * Renders a built-in `SearchBar` inside the sidebar and manages the filter\n * state internally (uncontrolled). Combine with `filter` + `onFilterChange`\n * for controlled mode.\n */\n searchable?: boolean;\n /**\n * Controlled filter string. Items whose `label` does not match\n * (case-insensitive substring) are hidden. Does not render a `SearchBar`\n * on its own — use `searchable` for the built-in search input.\n */\n filter?: string;\n /** Called when the built-in search value changes. */\n onFilterChange?: (value: string) => void;\n /**\n * Layout mode:\n * - `\"sidebar\"` — fixed-width panel with a border (default).\n * - `\"page\"` — full-width boxed-list layout for narrow viewports.\n *\n * When omitted the sidebar auto-switches to `\"page\"` at ≤ 400 sp,\n * mirroring `AdwSidebar` mobile behaviour.\n */\n mode?: 'sidebar' | 'page';\n /**\n * Visual style variant for the sidebar background.\n * - `\"classic\"` — default GNOME gray\n * - `\"blue\"` | `\"green\"` | `\"red\"` | `\"yellow\"` — tinted accent backgrounds\n * - `\"black\"` — dark/OLED background\n * - `\"transparent\"` — no background, inherits parent\n * - `\"blurred\"` — frosted glass (backdrop-filter blur), like macOS\n */\n variant?: 'classic' | 'blue' | 'green' | 'red' | 'yellow' | 'black' | 'transparent' | 'blurred';\n}\n\n/**\n * Lateral navigation panel following the Adwaita `.navigation-sidebar` style.\n *\n * **Tier 11 — libadwaita 1.9 completeness:**\n * - `searchable` — built-in `SearchBar` with automatic item filtering.\n * - `filter` / `onFilterChange` — controlled external filtering.\n * - `mode` — `\"sidebar\"` (default) or `\"page\"` (boxed-list layout).\n * Auto-switches to `\"page\"` at ≤ 400 sp when `mode` is unset.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Sidebar.html\n */\nexport const Sidebar = ({\n children,\n collapsed = false,\n searchable,\n filter: controlledFilter,\n onFilterChange,\n mode,\n variant = 'classic',\n className,\n ...props\n}: SidebarProps) => {\n const [internalFilter, setInternalFilter] = useState('');\n const { isNarrow } = useBreakpoint();\n\n const isControlled = controlledFilter !== undefined;\n const filterValue = isControlled ? controlledFilter : internalFilter;\n\n const handleFilterChange = (v: string) => {\n if (!isControlled) {\n setInternalFilter(v);\n }\n\n onFilterChange?.(v);\n };\n\n const isFilterActive = filterValue.length > 0;\n const effectiveMode = mode ?? (isNarrow ? 'page' : 'sidebar');\n const hasMatches = !isFilterActive || countMatchingItems(children, filterValue) > 0;\n\n return (\n <SidebarCollapsedContext.Provider value={collapsed}>\n <SidebarFilterContext.Provider value={filterValue}>\n <nav\n className={[\n styles.sidebar,\n collapsed ? styles.collapsed : null,\n effectiveMode === 'page' ? styles.pageMode : null,\n variant !== 'classic' ? styles[variantClass[variant]] : null,\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n >\n {searchable && (\n <div className={styles.searchWrap}>\n <SearchBar\n open\n value={filterValue}\n onChange={(e) => handleFilterChange(e.target.value)}\n onClose={() => handleFilterChange('')}\n onClear={() => handleFilterChange('')}\n inline\n />\n </div>\n )}\n\n {isFilterActive && !hasMatches ? (\n <StatusPage title=\"No Results\" description=\"No items match your search.\" compact />\n ) : (\n children\n )}\n </nav>\n </SidebarFilterContext.Provider>\n </SidebarCollapsedContext.Provider>\n );\n};\n"],"mappings":";;;;;;;AAoBA,IAAa,IAA0B,EAAc,EAAK;AAI1D,SAAgB,IAAsB;CACpC,OAAO,EAAW,CAAuB;AAC3C;AAIA,IAAa,IAAuB,EAAc,EAAE;AAKpD,SAAS,EAAmB,GAAqB,GAAwB;CACvE,IAAI,IAAQ;CAiBZ,OAhBA,EAAS,QAAQ,IAAW,MAAU;EACpC,IAAI,CAAC,EAAe,CAAK,GACvB;EAGF,IAAM,IAAQ,EAAM;EAEpB,AAAI,OAAO,EAAM,SAAU,WACrB,EAAM,MAAM,YAAY,EAAE,SAAS,EAAO,YAAY,CAAC,KACzD,MAEO,EAAM,aACf,KAAS,EAAmB,EAAM,UAAuB,CAAM;CAEnE,CAAC,GAEM;AACT;AAIA,IAAM,IAAuC;CAC3C,MAAM;CACN,OAAO;CACP,KAAK;CACL,QAAQ;CACR,OAAO;CACP,aAAa;CACb,SAAS;AACX,GAwDa,KAAW,EACtB,aACA,eAAY,IACZ,eACA,QAAQ,GACR,mBACA,SACA,aAAU,WACV,cACA,GAAG,QACe;CAClB,IAAM,CAAC,GAAgB,KAAqB,EAAS,EAAE,GACjD,EAAE,gBAAa,EAAc,GAE7B,IAAe,MAAqB,KAAA,GACpC,IAAc,IAAe,IAAmB,GAEhD,KAAsB,MAAc;EAKxC,AAJK,KACH,EAAkB,CAAC,GAGrB,IAAiB,CAAC;CACpB,GAEM,IAAiB,EAAY,SAAS,GACtC,IAAgB,MAAS,IAAW,SAAS,YAC7C,IAAa,CAAC,KAAkB,EAAmB,GAAU,CAAW,IAAI;CAElF,OACE,kBAAC,EAAwB,UAAzB;EAAkC,OAAO;YACvC,kBAAC,EAAqB,UAAtB;GAA+B,OAAO;aACpC,kBAAC,OAAD;IACE,WAAW;KACT,EAAO;KACP,IAAY,EAAO,YAAY;KAC/B,MAAkB,SAAS,EAAO,WAAW;KAC7C,MAAY,YAA4C,OAAhC,EAAO,EAAa;KAC5C;IACF,EACG,OAAO,OAAO,EACd,KAAK,GAAG;IACX,GAAI;cAVN,CAYG,KACC,kBAAC,OAAD;KAAK,WAAW,EAAO;eACrB,kBAAC,GAAD;MACE,MAAA;MACA,OAAO;MACP,WAAW,MAAM,EAAmB,EAAE,OAAO,KAAK;MAClD,eAAe,EAAmB,EAAE;MACpC,eAAe,EAAmB,EAAE;MACpC,QAAA;KACD,CAAA;IACE,CAAA,GAGN,KAAkB,CAAC,IAClB,kBAAC,GAAD;KAAY,OAAM;KAAa,aAAY;KAA8B,SAAA;IAAS,CAAA,IAElF,CAEC;;EACwB,CAAA;CACC,CAAA;AAEtC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e
|
|
1
|
+
var e={sidebar:`_sidebar_156vz_3`,section:`_section_156vz_21`,sectionHeader:`_sectionHeader_156vz_35`,sectionHeaderIcon:`_sectionHeaderIcon_156vz_71`,sectionTitle:`_sectionTitle_156vz_78`,sectionChevron:`_sectionChevron_156vz_94`,sectionBody:`_sectionBody_156vz_104`,sectionBodyCollapsed:`_sectionBodyCollapsed_156vz_110`,sectionBodyInner:`_sectionBodyInner_156vz_114`,list:`_list_156vz_120`,item:`_item_156vz_131`,itemBtn:`_itemBtn_156vz_137`,active:`_active_156vz_184`,itemIcon:`_itemIcon_156vz_200`,itemLabel:`_itemLabel_156vz_213`,itemSuffix:`_itemSuffix_156vz_223`,contextMenu:`_contextMenu_156vz_232`,"menu-in":`_menu-in_156vz_1`,contextMenuItem:`_contextMenuItem_156vz_262`,contextMenuDestructive:`_contextMenuDestructive_156vz_298`,searchWrap:`_searchWrap_156vz_304`,variantBlue:`_variantBlue_156vz_315`,variantGreen:`_variantGreen_156vz_324`,variantRed:`_variantRed_156vz_333`,variantYellow:`_variantYellow_156vz_342`,variantBlack:`_variantBlack_156vz_351`,variantTransparent:`_variantTransparent_156vz_360`,variantBlurred:`_variantBlurred_156vz_365`,pageMode:`_pageMode_156vz_381`,dragOver:`_dragOver_156vz_388`,collapsed:`_collapsed_156vz_396`,itemCollapsed:`_itemCollapsed_156vz_407`};exports.default=e;
|
|
2
2
|
//# sourceMappingURL=Sidebar.module.css.cjs.map
|
|
@@ -1,39 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
contextMenu: g,
|
|
1
|
+
var e = {
|
|
2
|
+
sidebar: "_sidebar_156vz_3",
|
|
3
|
+
section: "_section_156vz_21",
|
|
4
|
+
sectionHeader: "_sectionHeader_156vz_35",
|
|
5
|
+
sectionHeaderIcon: "_sectionHeaderIcon_156vz_71",
|
|
6
|
+
sectionTitle: "_sectionTitle_156vz_78",
|
|
7
|
+
sectionChevron: "_sectionChevron_156vz_94",
|
|
8
|
+
sectionBody: "_sectionBody_156vz_104",
|
|
9
|
+
sectionBodyCollapsed: "_sectionBodyCollapsed_156vz_110",
|
|
10
|
+
sectionBodyInner: "_sectionBodyInner_156vz_114",
|
|
11
|
+
list: "_list_156vz_120",
|
|
12
|
+
item: "_item_156vz_131",
|
|
13
|
+
itemBtn: "_itemBtn_156vz_137",
|
|
14
|
+
active: "_active_156vz_184",
|
|
15
|
+
itemIcon: "_itemIcon_156vz_200",
|
|
16
|
+
itemLabel: "_itemLabel_156vz_213",
|
|
17
|
+
itemSuffix: "_itemSuffix_156vz_223",
|
|
18
|
+
contextMenu: "_contextMenu_156vz_232",
|
|
20
19
|
"menu-in": "_menu-in_156vz_1",
|
|
21
|
-
contextMenuItem:
|
|
22
|
-
contextMenuDestructive:
|
|
23
|
-
searchWrap:
|
|
24
|
-
variantBlue:
|
|
25
|
-
variantGreen:
|
|
26
|
-
variantRed:
|
|
27
|
-
variantYellow:
|
|
28
|
-
variantBlack:
|
|
29
|
-
variantTransparent:
|
|
30
|
-
variantBlurred:
|
|
31
|
-
pageMode:
|
|
32
|
-
dragOver:
|
|
33
|
-
collapsed:
|
|
34
|
-
itemCollapsed:
|
|
20
|
+
contextMenuItem: "_contextMenuItem_156vz_262",
|
|
21
|
+
contextMenuDestructive: "_contextMenuDestructive_156vz_298",
|
|
22
|
+
searchWrap: "_searchWrap_156vz_304",
|
|
23
|
+
variantBlue: "_variantBlue_156vz_315",
|
|
24
|
+
variantGreen: "_variantGreen_156vz_324",
|
|
25
|
+
variantRed: "_variantRed_156vz_333",
|
|
26
|
+
variantYellow: "_variantYellow_156vz_342",
|
|
27
|
+
variantBlack: "_variantBlack_156vz_351",
|
|
28
|
+
variantTransparent: "_variantTransparent_156vz_360",
|
|
29
|
+
variantBlurred: "_variantBlurred_156vz_365",
|
|
30
|
+
pageMode: "_pageMode_156vz_381",
|
|
31
|
+
dragOver: "_dragOver_156vz_388",
|
|
32
|
+
collapsed: "_collapsed_156vz_396",
|
|
33
|
+
itemCollapsed: "_itemCollapsed_156vz_407"
|
|
35
34
|
};
|
|
36
35
|
//#endregion
|
|
37
|
-
export {
|
|
36
|
+
export { e as default };
|
|
38
37
|
|
|
39
38
|
//# sourceMappingURL=Sidebar.module.css.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(
|
|
1
|
+
const e=require("../Icon/Icon.cjs"),t=require("../Tooltip/Tooltip.cjs"),n=require("./Sidebar.module.css.cjs"),r=require("./Sidebar.cjs");let i=require("react"),a=require("react-dom"),o=require("react/jsx-runtime");var s=({label:s,icon:c,active:l=!1,suffix:u,badge:d,tooltip:f,menuItems:p,onDrop:m,acceptTypes:h,className:g,..._})=>{let v=r.useSidebarCollapsed(),y=(0,i.useContext)(r.SidebarFilterContext),b=u??d,x=v?f??s:f,S=y.length>0&&!s.toLowerCase().includes(y.toLowerCase()),[C,w]=(0,i.useState)(!1),T=e=>{m&&(h?.length&&!h.some(t=>e.dataTransfer.types.includes(t))||(e.preventDefault(),w(!0)))},E=()=>w(!1),D=e=>{m&&(e.preventDefault(),w(!1),m(e))},[O,k]=(0,i.useState)(null),A=(0,i.useRef)(null),j=(0,i.useCallback)((e,t)=>k({x:e,y:t}),[]),M=(0,i.useCallback)(()=>k(null),[]);(0,i.useEffect)(()=>{if(!O)return;let e=e=>{A.current&&!A.current.contains(e.target)&&M()},t=e=>{e.key===`Escape`&&M()};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[O,M]);let N=(0,o.jsxs)(`button`,{type:`button`,"aria-current":l?`page`:void 0,"aria-label":v?s:void 0,className:[n.default.itemBtn,l?n.default.active:null,v?n.default.itemCollapsed:null,C?n.default.dragOver:null,g].filter(Boolean).join(` `),onContextMenu:e=>{p?.length&&(e.preventDefault(),j(e.clientX,e.clientY))},onKeyDown:e=>{if(e.key===`ContextMenu`||e.key===`F10`&&e.shiftKey){if(!p?.length)return;e.preventDefault();let t=e.currentTarget.getBoundingClientRect();j(t.right,t.top)}},onDragOver:T,onDragLeave:E,onDrop:D,..._,children:[c&&(0,o.jsx)(`span`,{className:n.default.itemIcon,children:(0,o.jsx)(e.Icon,{icon:c,size:`md`,"aria-hidden":!0})}),!v&&(0,o.jsx)(`span`,{className:n.default.itemLabel,children:s}),!v&&b&&(0,o.jsx)(`span`,{className:n.default.itemSuffix,children:b})]});return(0,o.jsxs)(`li`,{className:n.default.item,hidden:S||void 0,children:[x?(0,o.jsx)(t.Tooltip,{label:x,placement:`right`,children:N}):N,O&&!!p?.length&&typeof document<`u`&&(0,a.createPortal)((0,o.jsx)(`div`,{ref:A,className:n.default.contextMenu,style:{top:O.y,left:O.x},role:`menu`,children:p.map(e=>(0,o.jsx)(`button`,{type:`button`,role:`menuitem`,disabled:e.disabled,className:[n.default.contextMenuItem,e.destructive?n.default.contextMenuDestructive:null].filter(Boolean).join(` `),onClick:()=>{e.onClick(),M()},children:e.label},e.label))}),document.body)]})};exports.SidebarItem=s;
|
|
2
2
|
//# sourceMappingURL=SidebarItem.cjs.map
|