@gnome-ui/react 1.45.1 → 1.46.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AboutDialog/AboutDialog.cjs +1 -1
- package/dist/components/AboutDialog/AboutDialog.cjs.map +1 -1
- package/dist/components/AboutDialog/AboutDialog.d.ts +1 -1
- package/dist/components/AboutDialog/AboutDialog.js +106 -108
- package/dist/components/AboutDialog/AboutDialog.js.map +1 -1
- package/dist/components/AboutDialog/AboutDialog.module.css.cjs +1 -1
- package/dist/components/AboutDialog/AboutDialog.module.css.js +28 -29
- package/dist/components/AboutDialog.cjs +1 -1
- package/dist/components/ActionRow/ActionRow.cjs +1 -1
- package/dist/components/ActionRow/ActionRow.cjs.map +1 -1
- package/dist/components/ActionRow/ActionRow.d.ts +1 -1
- package/dist/components/ActionRow/ActionRow.js +2 -2
- package/dist/components/ActionRow/ActionRow.js.map +1 -1
- package/dist/components/ActionRow.cjs +1 -1
- package/dist/components/Avatar/Avatar.cjs +1 -1
- package/dist/components/Avatar/Avatar.cjs.map +1 -1
- package/dist/components/Avatar/Avatar.d.ts +1 -1
- package/dist/components/Avatar/Avatar.js +2 -2
- package/dist/components/Avatar/Avatar.js.map +1 -1
- package/dist/components/Avatar.cjs +1 -1
- package/dist/components/AvatarRotator/AvatarRotator.cjs +1 -1
- package/dist/components/AvatarRotator/AvatarRotator.cjs.map +1 -1
- package/dist/components/AvatarRotator/AvatarRotator.d.ts +1 -1
- package/dist/components/AvatarRotator/AvatarRotator.js +2 -2
- package/dist/components/AvatarRotator/AvatarRotator.js.map +1 -1
- package/dist/components/AvatarRotator.cjs +1 -1
- package/dist/components/Badge/Badge.cjs +1 -1
- package/dist/components/Badge/Badge.cjs.map +1 -1
- package/dist/components/Badge/Badge.d.ts +1 -1
- package/dist/components/Badge/Badge.js +2 -2
- package/dist/components/Badge/Badge.js.map +1 -1
- package/dist/components/Badge.cjs +1 -1
- package/dist/components/Banner/Banner.cjs +1 -1
- package/dist/components/Banner/Banner.cjs.map +1 -1
- package/dist/components/Banner/Banner.d.ts +1 -1
- package/dist/components/Banner/Banner.js +34 -36
- package/dist/components/Banner/Banner.js.map +1 -1
- package/dist/components/Banner/Banner.module.css.cjs +1 -1
- package/dist/components/Banner/Banner.module.css.js +11 -12
- package/dist/components/Banner.cjs +1 -1
- package/dist/components/Bin/Bin.cjs +1 -1
- package/dist/components/Bin/Bin.cjs.map +1 -1
- package/dist/components/Bin/Bin.d.ts +1 -1
- package/dist/components/Bin/Bin.js +4 -6
- package/dist/components/Bin/Bin.js.map +1 -1
- package/dist/components/Bin.cjs +1 -1
- package/dist/components/Blockquote/Blockquote.cjs +1 -1
- package/dist/components/Blockquote/Blockquote.cjs.map +1 -1
- package/dist/components/Blockquote/Blockquote.d.ts +1 -1
- package/dist/components/Blockquote/Blockquote.js +24 -26
- package/dist/components/Blockquote/Blockquote.js.map +1 -1
- package/dist/components/Blockquote.cjs +1 -1
- package/dist/components/BottomSheet/BottomSheet.cjs +1 -1
- package/dist/components/BottomSheet/BottomSheet.cjs.map +1 -1
- package/dist/components/BottomSheet/BottomSheet.d.ts +1 -1
- package/dist/components/BottomSheet/BottomSheet.js +37 -38
- package/dist/components/BottomSheet/BottomSheet.js.map +1 -1
- package/dist/components/BottomSheet/BottomSheet.module.css.cjs +1 -1
- package/dist/components/BottomSheet/BottomSheet.module.css.js +8 -9
- package/dist/components/BottomSheet.cjs +1 -1
- package/dist/components/Box/Box.cjs +1 -1
- package/dist/components/Box/Box.cjs.map +1 -1
- package/dist/components/Box/Box.d.ts +1 -1
- package/dist/components/Box/Box.js +2 -2
- package/dist/components/Box/Box.js.map +1 -1
- package/dist/components/Box.cjs +1 -1
- package/dist/components/BoxedList/BoxedList.cjs +1 -1
- package/dist/components/BoxedList/BoxedList.cjs.map +1 -1
- package/dist/components/BoxedList/BoxedList.d.ts +1 -1
- package/dist/components/BoxedList/BoxedList.js +2 -2
- package/dist/components/BoxedList/BoxedList.js.map +1 -1
- package/dist/components/BoxedList.cjs +1 -1
- package/dist/components/BreakpointBin/BreakpointBin.cjs +1 -1
- package/dist/components/BreakpointBin/BreakpointBin.cjs.map +1 -1
- package/dist/components/BreakpointBin/BreakpointBin.d.ts +1 -1
- package/dist/components/BreakpointBin/BreakpointBin.js +2 -2
- package/dist/components/BreakpointBin/BreakpointBin.js.map +1 -1
- package/dist/components/BreakpointBin.cjs +1 -1
- package/dist/components/Button/Button.cjs +1 -1
- package/dist/components/Button/Button.cjs.map +1 -1
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Button.cjs +1 -1
- package/dist/components/ButtonContent/ButtonContent.cjs +1 -1
- package/dist/components/ButtonContent/ButtonContent.cjs.map +1 -1
- package/dist/components/ButtonContent/ButtonContent.d.ts +1 -1
- package/dist/components/ButtonContent/ButtonContent.js +24 -26
- package/dist/components/ButtonContent/ButtonContent.js.map +1 -1
- package/dist/components/ButtonContent.cjs +1 -1
- package/dist/components/ButtonRow/ButtonRow.cjs +1 -1
- package/dist/components/ButtonRow/ButtonRow.cjs.map +1 -1
- package/dist/components/ButtonRow/ButtonRow.d.ts +1 -1
- package/dist/components/ButtonRow/ButtonRow.js +22 -24
- package/dist/components/ButtonRow/ButtonRow.js.map +1 -1
- package/dist/components/ButtonRow.cjs +1 -1
- package/dist/components/Card/Card.cjs +1 -1
- package/dist/components/Card/Card.cjs.map +1 -1
- package/dist/components/Card/Card.d.ts +1 -1
- package/dist/components/Card/Card.js +10 -12
- package/dist/components/Card/Card.js.map +1 -1
- package/dist/components/Card/Card.module.css.cjs +1 -1
- package/dist/components/Card/Card.module.css.js +4 -5
- package/dist/components/Card.cjs +1 -1
- package/dist/components/Carousel/Carousel.cjs +1 -1
- package/dist/components/Carousel/Carousel.cjs.map +1 -1
- package/dist/components/Carousel/Carousel.d.ts +3 -3
- package/dist/components/Carousel/Carousel.js +28 -34
- package/dist/components/Carousel/Carousel.js.map +1 -1
- package/dist/components/Carousel.cjs +1 -1
- package/dist/components/CheckRow/CheckRow.cjs +1 -1
- package/dist/components/CheckRow/CheckRow.cjs.map +1 -1
- package/dist/components/CheckRow/CheckRow.d.ts +1 -1
- package/dist/components/CheckRow/CheckRow.js +7 -7
- package/dist/components/CheckRow/CheckRow.js.map +1 -1
- package/dist/components/CheckRow.cjs +1 -1
- package/dist/components/Checkbox/Checkbox.cjs +1 -1
- package/dist/components/Checkbox/Checkbox.cjs.map +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts +1 -1
- package/dist/components/Checkbox/Checkbox.js +2 -2
- package/dist/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/Checkbox.cjs +1 -1
- package/dist/components/Chip/Chip.cjs +1 -1
- package/dist/components/Chip/Chip.cjs.map +1 -1
- package/dist/components/Chip/Chip.d.ts +1 -1
- package/dist/components/Chip/Chip.js +2 -2
- package/dist/components/Chip/Chip.js.map +1 -1
- package/dist/components/Chip.cjs +1 -1
- package/dist/components/Clamp/Clamp.cjs +1 -1
- package/dist/components/Clamp/Clamp.cjs.map +1 -1
- package/dist/components/Clamp/Clamp.d.ts +1 -1
- package/dist/components/Clamp/Clamp.js +9 -11
- package/dist/components/Clamp/Clamp.js.map +1 -1
- package/dist/components/Clamp.cjs +1 -1
- package/dist/components/ColorPicker/ColorPicker.cjs +1 -1
- package/dist/components/ColorPicker/ColorPicker.cjs.map +1 -1
- package/dist/components/ColorPicker/ColorPicker.d.ts +2 -2
- package/dist/components/ColorPicker/ColorPicker.js +33 -37
- package/dist/components/ColorPicker/ColorPicker.js.map +1 -1
- package/dist/components/ColorPicker/ColorPicker.module.css.cjs +1 -1
- package/dist/components/ColorPicker/ColorPicker.module.css.js +9 -10
- package/dist/components/ColorPicker.cjs +1 -1
- package/dist/components/ColumnView/ColumnView.cjs +1 -1
- package/dist/components/ColumnView/ColumnView.cjs.map +1 -1
- package/dist/components/ColumnView/ColumnView.d.ts +1 -1
- package/dist/components/ColumnView/ColumnView.js +24 -28
- package/dist/components/ColumnView/ColumnView.js.map +1 -1
- package/dist/components/ColumnView.cjs +1 -1
- package/dist/components/ComboRow/ComboRow.cjs +1 -1
- package/dist/components/ComboRow/ComboRow.cjs.map +1 -1
- package/dist/components/ComboRow/ComboRow.d.ts +1 -1
- package/dist/components/ComboRow/ComboRow.js +2 -2
- package/dist/components/ComboRow/ComboRow.js.map +1 -1
- package/dist/components/ComboRow/ComboRow.module.css.cjs +1 -1
- package/dist/components/ComboRow/ComboRow.module.css.js +24 -25
- package/dist/components/ComboRow.cjs +1 -1
- package/dist/components/ContributionGraph/ContributionGraph.cjs +1 -1
- package/dist/components/ContributionGraph/ContributionGraph.cjs.map +1 -1
- package/dist/components/ContributionGraph/ContributionGraph.d.ts +1 -1
- package/dist/components/ContributionGraph/ContributionGraph.js +2 -2
- package/dist/components/ContributionGraph/ContributionGraph.js.map +1 -1
- package/dist/components/ContributionGraph.cjs +1 -1
- package/dist/components/CountDownTimer/CountDownTimer.cjs +1 -1
- package/dist/components/CountDownTimer/CountDownTimer.cjs.map +1 -1
- package/dist/components/CountDownTimer/CountDownTimer.d.ts +1 -1
- package/dist/components/CountDownTimer/CountDownTimer.js +2 -2
- package/dist/components/CountDownTimer/CountDownTimer.js.map +1 -1
- package/dist/components/CountDownTimer.cjs +1 -1
- package/dist/components/Dialog/Dialog.cjs +1 -1
- package/dist/components/Dialog/Dialog.cjs.map +1 -1
- package/dist/components/Dialog/Dialog.d.ts +1 -1
- package/dist/components/Dialog/Dialog.js +51 -52
- package/dist/components/Dialog/Dialog.js.map +1 -1
- package/dist/components/Dialog/Dialog.module.css.cjs +1 -1
- package/dist/components/Dialog/Dialog.module.css.js +8 -9
- package/dist/components/Dialog/dialogUtils.cjs +1 -1
- package/dist/components/Dialog/dialogUtils.cjs.map +1 -1
- package/dist/components/Dialog/dialogUtils.d.ts +6 -0
- package/dist/components/Dialog/dialogUtils.js +11 -2
- package/dist/components/Dialog/dialogUtils.js.map +1 -1
- package/dist/components/Dialog.cjs +1 -1
- package/dist/components/Drawer/Drawer.cjs +1 -1
- package/dist/components/Drawer/Drawer.cjs.map +1 -1
- package/dist/components/Drawer/Drawer.d.ts +1 -1
- package/dist/components/Drawer/Drawer.js +2 -2
- package/dist/components/Drawer/Drawer.js.map +1 -1
- package/dist/components/Drawer/Drawer.module.css.cjs +1 -1
- package/dist/components/Drawer/Drawer.module.css.js +11 -12
- package/dist/components/Drawer.cjs +1 -1
- package/dist/components/Dropdown/Dropdown.cjs +1 -1
- package/dist/components/Dropdown/Dropdown.cjs.map +1 -1
- package/dist/components/Dropdown/Dropdown.d.ts +1 -1
- package/dist/components/Dropdown/Dropdown.js +89 -85
- package/dist/components/Dropdown/Dropdown.js.map +1 -1
- package/dist/components/Dropdown/Dropdown.module.css.cjs +1 -1
- package/dist/components/Dropdown/Dropdown.module.css.js +20 -21
- package/dist/components/Dropdown.cjs +1 -1
- package/dist/components/EntryRow/EntryRow.cjs +1 -1
- package/dist/components/EntryRow/EntryRow.cjs.map +1 -1
- package/dist/components/EntryRow/EntryRow.d.ts +1 -1
- package/dist/components/EntryRow/EntryRow.js +2 -2
- package/dist/components/EntryRow/EntryRow.js.map +1 -1
- package/dist/components/EntryRow.cjs +1 -1
- package/dist/components/ExpanderRow/ExpanderRow.cjs +1 -1
- package/dist/components/ExpanderRow/ExpanderRow.cjs.map +1 -1
- package/dist/components/ExpanderRow/ExpanderRow.d.ts +1 -1
- package/dist/components/ExpanderRow/ExpanderRow.js +2 -2
- package/dist/components/ExpanderRow/ExpanderRow.js.map +1 -1
- package/dist/components/ExpanderRow.cjs +1 -1
- package/dist/components/Footer/Footer.cjs +1 -1
- package/dist/components/Footer/Footer.cjs.map +1 -1
- package/dist/components/Footer/Footer.d.ts +1 -1
- package/dist/components/Footer/Footer.js +22 -24
- package/dist/components/Footer/Footer.js.map +1 -1
- package/dist/components/Footer.cjs +1 -1
- package/dist/components/Frame/Frame.cjs +1 -1
- package/dist/components/Frame/Frame.cjs.map +1 -1
- package/dist/components/Frame/Frame.d.ts +1 -1
- package/dist/components/Frame/Frame.js +5 -7
- package/dist/components/Frame/Frame.js.map +1 -1
- package/dist/components/Frame.cjs +1 -1
- package/dist/components/GnomeProvider/GnomeContext.cjs +1 -1
- package/dist/components/GnomeProvider/GnomeContext.cjs.map +1 -1
- package/dist/components/GnomeProvider/GnomeContext.js.map +1 -1
- package/dist/components/GnomeProvider/GnomeProvider.cjs +1 -1
- package/dist/components/GnomeProvider/GnomeProvider.cjs.map +1 -1
- package/dist/components/GnomeProvider/GnomeProvider.d.ts +1 -1
- package/dist/components/GnomeProvider/GnomeProvider.js +2 -2
- package/dist/components/GnomeProvider/GnomeProvider.js.map +1 -1
- package/dist/components/HeaderBar/HeaderBar.cjs +1 -1
- package/dist/components/HeaderBar/HeaderBar.cjs.map +1 -1
- package/dist/components/HeaderBar/HeaderBar.d.ts +1 -1
- package/dist/components/HeaderBar/HeaderBar.js +26 -28
- package/dist/components/HeaderBar/HeaderBar.js.map +1 -1
- package/dist/components/HeaderBar.cjs +1 -1
- package/dist/components/Icon/Icon.cjs +1 -1
- package/dist/components/Icon/Icon.cjs.map +1 -1
- package/dist/components/Icon/Icon.d.ts +1 -1
- package/dist/components/Icon/Icon.js +2 -2
- package/dist/components/Icon/Icon.js.map +1 -1
- package/dist/components/Icon.cjs +1 -1
- package/dist/components/IconButton/IconButton.cjs +1 -1
- package/dist/components/IconButton/IconButton.cjs.map +1 -1
- package/dist/components/IconButton/IconButton.js +4 -4
- package/dist/components/IconButton/IconButton.js.map +1 -1
- package/dist/components/IconButton.cjs +1 -1
- package/dist/components/InlineViewSwitcher/InlineViewSwitcher.cjs +1 -1
- package/dist/components/InlineViewSwitcher/InlineViewSwitcher.cjs.map +1 -1
- package/dist/components/InlineViewSwitcher/InlineViewSwitcher.d.ts +1 -1
- package/dist/components/InlineViewSwitcher/InlineViewSwitcher.js +2 -2
- package/dist/components/InlineViewSwitcher/InlineViewSwitcher.js.map +1 -1
- package/dist/components/InlineViewSwitcher/InlineViewSwitcherItem.cjs +1 -1
- package/dist/components/InlineViewSwitcher/InlineViewSwitcherItem.cjs.map +1 -1
- package/dist/components/InlineViewSwitcher/InlineViewSwitcherItem.d.ts +1 -1
- package/dist/components/InlineViewSwitcher/InlineViewSwitcherItem.js +2 -2
- package/dist/components/InlineViewSwitcher/InlineViewSwitcherItem.js.map +1 -1
- package/dist/components/InlineViewSwitcher.cjs +1 -1
- package/dist/components/Link/Link.cjs +1 -1
- package/dist/components/Link/Link.cjs.map +1 -1
- package/dist/components/Link/Link.d.ts +1 -1
- package/dist/components/Link/Link.js +2 -2
- package/dist/components/Link/Link.js.map +1 -1
- package/dist/components/Link.cjs +1 -1
- package/dist/components/LinkedGroup/LinkedGroup.cjs +1 -1
- package/dist/components/LinkedGroup/LinkedGroup.cjs.map +1 -1
- package/dist/components/LinkedGroup/LinkedGroup.d.ts +1 -1
- package/dist/components/LinkedGroup/LinkedGroup.js +9 -11
- package/dist/components/LinkedGroup/LinkedGroup.js.map +1 -1
- package/dist/components/LinkedGroup.cjs +1 -1
- package/dist/components/NavigationSplitView/NavigationSplitView.cjs +1 -1
- package/dist/components/NavigationSplitView/NavigationSplitView.cjs.map +1 -1
- package/dist/components/NavigationSplitView/NavigationSplitView.d.ts +1 -1
- package/dist/components/NavigationSplitView/NavigationSplitView.js +2 -2
- package/dist/components/NavigationSplitView/NavigationSplitView.js.map +1 -1
- package/dist/components/NavigationSplitView.cjs +1 -1
- package/dist/components/NavigationView/NavigationView.cjs +1 -1
- package/dist/components/NavigationView/NavigationView.cjs.map +1 -1
- package/dist/components/NavigationView/NavigationView.d.ts +2 -2
- package/dist/components/NavigationView/NavigationView.js +3 -4
- package/dist/components/NavigationView/NavigationView.js.map +1 -1
- package/dist/components/NavigationView/NavigationView.module.css.cjs +1 -1
- package/dist/components/NavigationView/NavigationView.module.css.js +9 -10
- package/dist/components/NavigationView.cjs +1 -1
- package/dist/components/OverlaySplitView/OverlaySplitView.cjs +1 -1
- package/dist/components/OverlaySplitView/OverlaySplitView.cjs.map +1 -1
- package/dist/components/OverlaySplitView/OverlaySplitView.d.ts +1 -1
- package/dist/components/OverlaySplitView/OverlaySplitView.js +2 -2
- package/dist/components/OverlaySplitView/OverlaySplitView.js.map +1 -1
- package/dist/components/OverlaySplitView.cjs +1 -1
- package/dist/components/PasswordEntryRow/PasswordEntryRow.cjs +1 -1
- package/dist/components/PasswordEntryRow/PasswordEntryRow.cjs.map +1 -1
- package/dist/components/PasswordEntryRow/PasswordEntryRow.d.ts +1 -1
- package/dist/components/PasswordEntryRow/PasswordEntryRow.js +11 -10
- package/dist/components/PasswordEntryRow/PasswordEntryRow.js.map +1 -1
- package/dist/components/PasswordEntryRow.cjs +1 -1
- package/dist/components/PathBar/PathBar.cjs +1 -1
- package/dist/components/PathBar/PathBar.cjs.map +1 -1
- package/dist/components/PathBar/PathBar.d.ts +1 -1
- package/dist/components/PathBar/PathBar.js +48 -50
- package/dist/components/PathBar/PathBar.js.map +1 -1
- package/dist/components/PathBar.cjs +1 -1
- package/dist/components/Popover/Popover.cjs +1 -1
- package/dist/components/Popover/Popover.cjs.map +1 -1
- package/dist/components/Popover/Popover.d.ts +1 -1
- package/dist/components/Popover/Popover.js +5 -5
- package/dist/components/Popover/Popover.js.map +1 -1
- package/dist/components/Popover.cjs +1 -1
- package/dist/components/PreferencesDialog/PreferencesDialog.cjs +1 -1
- package/dist/components/PreferencesDialog/PreferencesDialog.cjs.map +1 -1
- package/dist/components/PreferencesDialog/PreferencesDialog.d.ts +1 -1
- package/dist/components/PreferencesDialog/PreferencesDialog.js +2 -2
- package/dist/components/PreferencesDialog/PreferencesDialog.js.map +1 -1
- package/dist/components/PreferencesDialog/PreferencesDialog.module.css.cjs +1 -1
- package/dist/components/PreferencesDialog/PreferencesDialog.module.css.js +18 -19
- package/dist/components/PreferencesDialog.cjs +1 -1
- package/dist/components/PreferencesGroup/PreferencesGroup.cjs +1 -1
- package/dist/components/PreferencesGroup/PreferencesGroup.cjs.map +1 -1
- package/dist/components/PreferencesGroup/PreferencesGroup.d.ts +1 -1
- package/dist/components/PreferencesGroup/PreferencesGroup.js +2 -2
- package/dist/components/PreferencesGroup/PreferencesGroup.js.map +1 -1
- package/dist/components/PreferencesGroup.cjs +1 -1
- package/dist/components/PreferencesPage/PreferencesPage.cjs +1 -1
- package/dist/components/PreferencesPage/PreferencesPage.cjs.map +1 -1
- package/dist/components/PreferencesPage/PreferencesPage.d.ts +1 -1
- package/dist/components/PreferencesPage/PreferencesPage.js +9 -11
- package/dist/components/PreferencesPage/PreferencesPage.js.map +1 -1
- package/dist/components/PreferencesPage.cjs +1 -1
- package/dist/components/ProgressBar/ProgressBar.cjs +1 -1
- package/dist/components/ProgressBar/ProgressBar.cjs.map +1 -1
- package/dist/components/ProgressBar/ProgressBar.d.ts +1 -1
- package/dist/components/ProgressBar/ProgressBar.js +2 -2
- package/dist/components/ProgressBar/ProgressBar.js.map +1 -1
- package/dist/components/ProgressBar.cjs +1 -1
- package/dist/components/RadioButton/RadioButton.cjs +1 -1
- package/dist/components/RadioButton/RadioButton.cjs.map +1 -1
- package/dist/components/RadioButton/RadioButton.d.ts +1 -1
- package/dist/components/RadioButton/RadioButton.js +5 -7
- package/dist/components/RadioButton/RadioButton.js.map +1 -1
- package/dist/components/RadioButton.cjs +1 -1
- package/dist/components/SearchBar/SearchBar.cjs +1 -1
- package/dist/components/SearchBar/SearchBar.cjs.map +1 -1
- package/dist/components/SearchBar/SearchBar.d.ts +1 -1
- package/dist/components/SearchBar/SearchBar.js +2 -2
- package/dist/components/SearchBar/SearchBar.js.map +1 -1
- package/dist/components/SearchBar.cjs +1 -1
- package/dist/components/SegmentedBar/SegmentedBar.cjs +1 -1
- package/dist/components/SegmentedBar/SegmentedBar.cjs.map +1 -1
- package/dist/components/SegmentedBar/SegmentedBar.js.map +1 -1
- package/dist/components/SegmentedBar.cjs +1 -1
- package/dist/components/Separator/Separator.cjs +1 -1
- package/dist/components/Separator/Separator.cjs.map +1 -1
- package/dist/components/Separator/Separator.d.ts +1 -1
- package/dist/components/Separator/Separator.js +2 -2
- package/dist/components/Separator/Separator.js.map +1 -1
- package/dist/components/Separator.cjs +1 -1
- package/dist/components/ShortcutLabel/ShortcutLabel.cjs +1 -1
- package/dist/components/ShortcutLabel/ShortcutLabel.cjs.map +1 -1
- package/dist/components/ShortcutLabel/ShortcutLabel.d.ts +1 -1
- package/dist/components/ShortcutLabel/ShortcutLabel.js +2 -3
- package/dist/components/ShortcutLabel/ShortcutLabel.js.map +1 -1
- package/dist/components/ShortcutLabel.cjs +1 -1
- package/dist/components/ShortcutsDialog/ShortcutsDialog.cjs +1 -1
- package/dist/components/ShortcutsDialog/ShortcutsDialog.cjs.map +1 -1
- package/dist/components/ShortcutsDialog/ShortcutsDialog.d.ts +1 -1
- package/dist/components/ShortcutsDialog/ShortcutsDialog.js +75 -76
- package/dist/components/ShortcutsDialog/ShortcutsDialog.js.map +1 -1
- package/dist/components/ShortcutsDialog/ShortcutsDialog.module.css.cjs +1 -1
- package/dist/components/ShortcutsDialog/ShortcutsDialog.module.css.js +21 -22
- package/dist/components/ShortcutsDialog.cjs +1 -1
- package/dist/components/Sidebar/Sidebar.cjs +1 -1
- package/dist/components/Sidebar/Sidebar.cjs.map +1 -1
- package/dist/components/Sidebar/Sidebar.d.ts +1 -1
- package/dist/components/Sidebar/Sidebar.js +2 -3
- package/dist/components/Sidebar/Sidebar.js.map +1 -1
- package/dist/components/Sidebar/Sidebar.module.css.cjs +1 -1
- package/dist/components/Sidebar/Sidebar.module.css.js +33 -34
- package/dist/components/Sidebar/SidebarItem.cjs +1 -1
- package/dist/components/Sidebar/SidebarItem.cjs.map +1 -1
- package/dist/components/Sidebar/SidebarItem.d.ts +1 -1
- package/dist/components/Sidebar/SidebarItem.js +16 -16
- package/dist/components/Sidebar/SidebarItem.js.map +1 -1
- package/dist/components/Sidebar/SidebarSection.cjs +1 -1
- package/dist/components/Sidebar/SidebarSection.cjs.map +1 -1
- package/dist/components/Sidebar/SidebarSection.js.map +1 -1
- package/dist/components/Sidebar.cjs +1 -1
- package/dist/components/Skeleton/Skeleton.cjs +1 -1
- package/dist/components/Skeleton/Skeleton.cjs.map +1 -1
- package/dist/components/Skeleton/Skeleton.d.ts +1 -1
- package/dist/components/Skeleton/Skeleton.js +9 -10
- package/dist/components/Skeleton/Skeleton.js.map +1 -1
- package/dist/components/Skeleton.cjs +1 -1
- package/dist/components/Slider/Slider.cjs +1 -1
- package/dist/components/Slider/Slider.cjs.map +1 -1
- package/dist/components/Slider/Slider.d.ts +1 -1
- package/dist/components/Slider/Slider.js +2 -2
- package/dist/components/Slider/Slider.js.map +1 -1
- package/dist/components/Slider.cjs +1 -1
- package/dist/components/SpinButton/SpinButton.cjs +1 -1
- package/dist/components/SpinButton/SpinButton.cjs.map +1 -1
- package/dist/components/SpinButton/SpinButton.d.ts +1 -1
- package/dist/components/SpinButton/SpinButton.js +2 -2
- package/dist/components/SpinButton/SpinButton.js.map +1 -1
- package/dist/components/SpinButton.cjs +1 -1
- package/dist/components/SpinRow/SpinRow.cjs +1 -1
- package/dist/components/SpinRow/SpinRow.cjs.map +1 -1
- package/dist/components/SpinRow/SpinRow.d.ts +1 -1
- package/dist/components/SpinRow/SpinRow.js +2 -2
- package/dist/components/SpinRow/SpinRow.js.map +1 -1
- package/dist/components/SpinRow.cjs +1 -1
- package/dist/components/Spinner/Spinner.cjs +1 -1
- package/dist/components/Spinner/Spinner.cjs.map +1 -1
- package/dist/components/Spinner/Spinner.d.ts +1 -1
- package/dist/components/Spinner/Spinner.js +2 -2
- package/dist/components/Spinner/Spinner.js.map +1 -1
- package/dist/components/Spinner.cjs +1 -1
- package/dist/components/SplitButton/SplitButton.cjs +1 -1
- package/dist/components/SplitButton/SplitButton.cjs.map +1 -1
- package/dist/components/SplitButton/SplitButton.d.ts +1 -1
- package/dist/components/SplitButton/SplitButton.js +2 -2
- package/dist/components/SplitButton/SplitButton.js.map +1 -1
- package/dist/components/SplitButton.cjs +1 -1
- package/dist/components/StatusBadge/StatusBadge.cjs +1 -1
- package/dist/components/StatusBadge/StatusBadge.cjs.map +1 -1
- package/dist/components/StatusBadge/StatusBadge.d.ts +1 -1
- package/dist/components/StatusBadge/StatusBadge.js +9 -11
- package/dist/components/StatusBadge/StatusBadge.js.map +1 -1
- package/dist/components/StatusBadge.cjs +1 -1
- package/dist/components/StatusPage/StatusPage.cjs +1 -1
- package/dist/components/StatusPage/StatusPage.cjs.map +1 -1
- package/dist/components/StatusPage/StatusPage.d.ts +1 -1
- package/dist/components/StatusPage/StatusPage.js +2 -2
- package/dist/components/StatusPage/StatusPage.js.map +1 -1
- package/dist/components/StatusPage.cjs +1 -1
- package/dist/components/Switch/Switch.cjs +1 -1
- package/dist/components/Switch/Switch.cjs.map +1 -1
- package/dist/components/Switch/Switch.d.ts +1 -1
- package/dist/components/Switch/Switch.js +6 -8
- package/dist/components/Switch/Switch.js.map +1 -1
- package/dist/components/Switch.cjs +1 -1
- package/dist/components/SwitchRow/SwitchRow.cjs +1 -1
- package/dist/components/SwitchRow/SwitchRow.cjs.map +1 -1
- package/dist/components/SwitchRow/SwitchRow.d.ts +1 -1
- package/dist/components/SwitchRow/SwitchRow.js +7 -7
- package/dist/components/SwitchRow/SwitchRow.js.map +1 -1
- package/dist/components/SwitchRow.cjs +1 -1
- package/dist/components/Tabs/TabBar.cjs +1 -1
- package/dist/components/Tabs/TabBar.cjs.map +1 -1
- package/dist/components/Tabs/TabBar.d.ts +1 -1
- package/dist/components/Tabs/TabBar.js +2 -2
- package/dist/components/Tabs/TabBar.js.map +1 -1
- package/dist/components/Tabs/TabItem.cjs +1 -1
- package/dist/components/Tabs/TabItem.cjs.map +1 -1
- package/dist/components/Tabs/TabItem.js.map +1 -1
- package/dist/components/Tabs/TabPanel.cjs +1 -1
- package/dist/components/Tabs/TabPanel.cjs.map +1 -1
- package/dist/components/Tabs/TabPanel.d.ts +1 -1
- package/dist/components/Tabs/TabPanel.js +8 -10
- package/dist/components/Tabs/TabPanel.js.map +1 -1
- package/dist/components/Tabs.cjs +1 -1
- package/dist/components/TerminalView/TerminalView.cjs +1 -1
- package/dist/components/TerminalView/TerminalView.cjs.map +1 -1
- package/dist/components/TerminalView/TerminalView.d.ts +1 -1
- package/dist/components/TerminalView/TerminalView.js +2 -2
- package/dist/components/TerminalView/TerminalView.js.map +1 -1
- package/dist/components/TerminalView.cjs +1 -1
- package/dist/components/Text/Text.cjs +1 -1
- package/dist/components/Text/Text.cjs.map +1 -1
- package/dist/components/Text/Text.d.ts +1 -1
- package/dist/components/Text/Text.js +10 -13
- package/dist/components/Text/Text.js.map +1 -1
- package/dist/components/Text/Text.module.css.cjs +1 -1
- package/dist/components/Text/Text.module.css.js +9 -10
- package/dist/components/Text.cjs +1 -1
- package/dist/components/TextField/TextField.cjs +1 -1
- package/dist/components/TextField/TextField.cjs.map +1 -1
- package/dist/components/TextField/TextField.d.ts +1 -1
- package/dist/components/TextField/TextField.js +2 -2
- package/dist/components/TextField/TextField.js.map +1 -1
- package/dist/components/TextField.cjs +1 -1
- package/dist/components/Timeline/Timeline.cjs +1 -1
- package/dist/components/Timeline/Timeline.cjs.map +1 -1
- package/dist/components/Timeline/Timeline.d.ts +1 -1
- package/dist/components/Timeline/Timeline.js +2 -2
- package/dist/components/Timeline/Timeline.js.map +1 -1
- package/dist/components/Timeline.cjs +1 -1
- package/dist/components/Toast/Toast.cjs +1 -1
- package/dist/components/Toast/Toast.cjs.map +1 -1
- package/dist/components/Toast/Toast.d.ts +1 -1
- package/dist/components/Toast/Toast.js +2 -2
- package/dist/components/Toast/Toast.js.map +1 -1
- package/dist/components/Toast/Toast.module.css.cjs +1 -1
- package/dist/components/Toast/Toast.module.css.js +10 -11
- package/dist/components/Toast/Toaster.cjs +1 -1
- package/dist/components/Toast/Toaster.cjs.map +1 -1
- package/dist/components/Toast/Toaster.d.ts +1 -1
- package/dist/components/Toast/Toaster.js +2 -2
- package/dist/components/Toast/Toaster.js.map +1 -1
- package/dist/components/Toast.cjs +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.cjs +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.cjs.map +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.d.ts +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.js +2 -2
- package/dist/components/ToggleGroup/ToggleGroup.js.map +1 -1
- package/dist/components/ToggleGroup/ToggleGroupItem.cjs +1 -1
- package/dist/components/ToggleGroup/ToggleGroupItem.cjs.map +1 -1
- package/dist/components/ToggleGroup/ToggleGroupItem.d.ts +1 -1
- package/dist/components/ToggleGroup/ToggleGroupItem.js +2 -2
- package/dist/components/ToggleGroup/ToggleGroupItem.js.map +1 -1
- package/dist/components/ToggleGroup.cjs +1 -1
- package/dist/components/Toolbar/Spacer.cjs +1 -1
- package/dist/components/Toolbar/Spacer.cjs.map +1 -1
- package/dist/components/Toolbar/Spacer.d.ts +1 -1
- package/dist/components/Toolbar/Spacer.js +5 -7
- package/dist/components/Toolbar/Spacer.js.map +1 -1
- package/dist/components/Toolbar/Toolbar.cjs +1 -1
- package/dist/components/Toolbar/Toolbar.cjs.map +1 -1
- package/dist/components/Toolbar/Toolbar.d.ts +1 -1
- package/dist/components/Toolbar/Toolbar.js +5 -7
- package/dist/components/Toolbar/Toolbar.js.map +1 -1
- package/dist/components/Toolbar.cjs +1 -1
- package/dist/components/ToolbarView/ToolbarView.cjs +1 -1
- package/dist/components/ToolbarView/ToolbarView.cjs.map +1 -1
- package/dist/components/ToolbarView/ToolbarView.d.ts +1 -1
- package/dist/components/ToolbarView/ToolbarView.js +18 -20
- package/dist/components/ToolbarView/ToolbarView.js.map +1 -1
- package/dist/components/ToolbarView.cjs +1 -1
- package/dist/components/Tooltip/Tooltip.cjs +1 -1
- package/dist/components/Tooltip/Tooltip.cjs.map +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +1 -1
- package/dist/components/Tooltip/Tooltip.js +2 -2
- package/dist/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/components/Tooltip.cjs +1 -1
- package/dist/components/ViewSwitcher/ViewSwitcher.cjs +1 -1
- package/dist/components/ViewSwitcher/ViewSwitcher.cjs.map +1 -1
- package/dist/components/ViewSwitcher/ViewSwitcher.d.ts +1 -1
- package/dist/components/ViewSwitcher/ViewSwitcher.js +2 -2
- package/dist/components/ViewSwitcher/ViewSwitcher.js.map +1 -1
- package/dist/components/ViewSwitcher/ViewSwitcherItem.cjs +1 -1
- package/dist/components/ViewSwitcher/ViewSwitcherItem.cjs.map +1 -1
- package/dist/components/ViewSwitcher/ViewSwitcherItem.d.ts +1 -1
- package/dist/components/ViewSwitcher/ViewSwitcherItem.js +24 -26
- package/dist/components/ViewSwitcher/ViewSwitcherItem.js.map +1 -1
- package/dist/components/ViewSwitcher.cjs +1 -1
- package/dist/components/ViewSwitcherBar/ViewSwitcherBar.cjs +1 -1
- package/dist/components/ViewSwitcherBar/ViewSwitcherBar.cjs.map +1 -1
- package/dist/components/ViewSwitcherBar/ViewSwitcherBar.d.ts +1 -1
- package/dist/components/ViewSwitcherBar/ViewSwitcherBar.js +7 -9
- package/dist/components/ViewSwitcherBar/ViewSwitcherBar.js.map +1 -1
- package/dist/components/ViewSwitcherBar.cjs +1 -1
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebar.cjs +1 -1
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebar.cjs.map +1 -1
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebar.d.ts +1 -1
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebar.js +2 -2
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebar.js.map +1 -1
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebarItem.cjs +1 -1
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebarItem.cjs.map +1 -1
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebarItem.d.ts +1 -1
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebarItem.js +2 -2
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebarItem.js.map +1 -1
- package/dist/components/ViewSwitcherSidebar.cjs +1 -1
- package/dist/components/WindowTitle/WindowTitle.cjs +1 -1
- package/dist/components/WindowTitle/WindowTitle.cjs.map +1 -1
- package/dist/components/WindowTitle/WindowTitle.d.ts +1 -1
- package/dist/components/WindowTitle/WindowTitle.js +11 -13
- package/dist/components/WindowTitle/WindowTitle.js.map +1 -1
- package/dist/components/WindowTitle.cjs +1 -1
- package/dist/components/WrapBox/WrapBox.cjs +1 -1
- package/dist/components/WrapBox/WrapBox.cjs.map +1 -1
- package/dist/components/WrapBox/WrapBox.d.ts +1 -1
- package/dist/components/WrapBox/WrapBox.js +5 -5
- package/dist/components/WrapBox/WrapBox.js.map +1 -1
- package/dist/components/WrapBox.cjs +1 -1
- package/dist/hooks/useBreakpoint.cjs +1 -1
- package/dist/hooks/useBreakpoint.cjs.map +1 -1
- package/dist/hooks/useBreakpoint.js.map +1 -1
- package/dist/hooks.cjs +1 -1
- package/dist/index.cjs +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.cjs","names":[],"sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["import { type ButtonHTMLAttributes, forwardRef, type ReactNode } from 'react';\n\nimport styles from './Button.module.css';\n\nexport type ButtonVariant = 'default' | 'suggested' | 'destructive' | 'flat' | 'raised';\nexport type ButtonSize = 'sm' | 'md' | 'lg';\nexport type ButtonShape = 'default' | 'pill' | 'circular';\n\nexport interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n /** Visual style of the button. Follows GNOME HIG button types. */\n variant?: ButtonVariant;\n /** Size of the button. */\n size?: ButtonSize;\n /** Shape of the button. \"pill\" for primary actions in open space, \"circular\" for icon-only buttons. */\n shape?: ButtonShape;\n /**\n * Dark semi-transparent overlay style for buttons placed on top of\n * media or images — mirrors the `.osd` style class.\n */\n osd?: boolean;\n /** Icon placed before the label. */\n leadingIcon?: ReactNode;\n /** Icon placed after the label. */\n trailingIcon?: ReactNode;\n children?: ReactNode;\n}\n\n/**\n * Button component following GNOME Human Interface Guidelines.\n *\n * Variants:\n * - `default` — Standard action, flat appearance with subtle border.\n * - `suggested` — Affirmative/primary action (accent color). Use at most once per view.\n * - `destructive` — Dangerous or irreversible action (red). Use sparingly.\n * - `flat` — No border or background; ideal for header bars and toolbars.\n *\n * @see https://developer.gnome.org/hig/patterns/controls/buttons.html\n */\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(function Button(\n {\n variant = 'default',\n size = 'md',\n shape = 'default',\n osd = false,\n leadingIcon,\n trailingIcon,\n children,\n className,\n ...props\n }: ButtonProps,\n ref,\n) {\n const classes = [\n styles.button,\n styles[variant],\n size !== 'md' ? styles[size] : null,\n shape !== 'default' ? styles[shape] : null,\n osd ? styles.osd : null,\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <button ref={ref} className={classes} {...props}>\n {leadingIcon}\n {children}\n {trailingIcon}\n </button>\n );\n});\n"],"mappings":"iGAsCA,IAAa,GAAA,EAAA,EAAA,YAAoD,SAC/D,CACE,UAAU,UACV,OAAO,KACP,QAAQ,UACR,MAAM,GACN,cACA,eACA,WACA,YACA,GAAG,GAEL,EACA,CAYA,OACE,EAAA,EAAA,MAAC,SAAD,CAAa,MAAK,UAZJ,CACd,EAAA,QAAO,OACP,EAAA,QAAO,GACP,IAAS,KAAsB,KAAf,EAAA,QAAO,GACvB,IAAU,UAA4B,KAAhB,EAAA,QAAO,GAC7B,EAAM,EAAA,QAAO,IAAM,KACnB,
|
|
1
|
+
{"version":3,"file":"Button.cjs","names":[],"sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["import { type ButtonHTMLAttributes, forwardRef, type ReactNode } from 'react';\n\nimport styles from './Button.module.css';\n\nexport type ButtonVariant = 'default' | 'suggested' | 'destructive' | 'flat' | 'raised';\nexport type ButtonSize = 'sm' | 'md' | 'lg';\nexport type ButtonShape = 'default' | 'pill' | 'circular';\n\nexport interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n /** Visual style of the button. Follows GNOME HIG button types. */\n variant?: ButtonVariant;\n /** Size of the button. */\n size?: ButtonSize;\n /** Shape of the button. \"pill\" for primary actions in open space, \"circular\" for icon-only buttons. */\n shape?: ButtonShape;\n /**\n * Dark semi-transparent overlay style for buttons placed on top of\n * media or images — mirrors the `.osd` style class.\n */\n osd?: boolean;\n /** Icon placed before the label. */\n leadingIcon?: ReactNode;\n /** Icon placed after the label. */\n trailingIcon?: ReactNode;\n children?: ReactNode;\n}\n\n/**\n * Button component following GNOME Human Interface Guidelines.\n *\n * Variants:\n * - `default` — Standard action, flat appearance with subtle border.\n * - `suggested` — Affirmative/primary action (accent color). Use at most once per view.\n * - `destructive` — Dangerous or irreversible action (red). Use sparingly.\n * - `flat` — No border or background; ideal for header bars and toolbars.\n *\n * @see https://developer.gnome.org/hig/patterns/controls/buttons.html\n */\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(function Button(\n {\n variant = 'default',\n size = 'md',\n shape = 'default',\n osd = false,\n leadingIcon,\n trailingIcon,\n children,\n className,\n ...props\n }: ButtonProps,\n ref,\n) {\n const classes = [\n styles.button,\n styles[variant],\n size !== 'md' ? styles[size] : null,\n shape !== 'default' ? styles[shape] : null,\n osd ? styles.osd : null,\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <button ref={ref} className={classes} {...props}>\n {leadingIcon}\n {children}\n {trailingIcon}\n </button>\n );\n});\n"],"mappings":"iGAsCA,IAAa,GAAA,EAAA,EAAA,YAAoD,SAC/D,CACE,UAAU,UACV,OAAO,KACP,QAAQ,UACR,MAAM,GACN,cACA,eACA,WACA,YACA,GAAG,GAEL,EACA,CAYA,OACE,EAAA,EAAA,MAAC,SAAD,CAAa,MAAK,UAZJ,CACd,EAAA,QAAO,OACP,EAAA,QAAO,GACP,IAAS,KAAsB,KAAf,EAAA,QAAO,GACvB,IAAU,UAA4B,KAAhB,EAAA,QAAO,GAC7B,EAAM,EAAA,QAAO,IAAM,KACnB,CACF,EACG,OAAO,OAAO,EACd,KAAK,GAGuB,EAAS,GAAI,WAA1C,CACG,EACA,EACA,CACK,GAEZ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","names":[],"sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["import { type ButtonHTMLAttributes, forwardRef, type ReactNode } from 'react';\n\nimport styles from './Button.module.css';\n\nexport type ButtonVariant = 'default' | 'suggested' | 'destructive' | 'flat' | 'raised';\nexport type ButtonSize = 'sm' | 'md' | 'lg';\nexport type ButtonShape = 'default' | 'pill' | 'circular';\n\nexport interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n /** Visual style of the button. Follows GNOME HIG button types. */\n variant?: ButtonVariant;\n /** Size of the button. */\n size?: ButtonSize;\n /** Shape of the button. \"pill\" for primary actions in open space, \"circular\" for icon-only buttons. */\n shape?: ButtonShape;\n /**\n * Dark semi-transparent overlay style for buttons placed on top of\n * media or images — mirrors the `.osd` style class.\n */\n osd?: boolean;\n /** Icon placed before the label. */\n leadingIcon?: ReactNode;\n /** Icon placed after the label. */\n trailingIcon?: ReactNode;\n children?: ReactNode;\n}\n\n/**\n * Button component following GNOME Human Interface Guidelines.\n *\n * Variants:\n * - `default` — Standard action, flat appearance with subtle border.\n * - `suggested` — Affirmative/primary action (accent color). Use at most once per view.\n * - `destructive` — Dangerous or irreversible action (red). Use sparingly.\n * - `flat` — No border or background; ideal for header bars and toolbars.\n *\n * @see https://developer.gnome.org/hig/patterns/controls/buttons.html\n */\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(function Button(\n {\n variant = 'default',\n size = 'md',\n shape = 'default',\n osd = false,\n leadingIcon,\n trailingIcon,\n children,\n className,\n ...props\n }: ButtonProps,\n ref,\n) {\n const classes = [\n styles.button,\n styles[variant],\n size !== 'md' ? styles[size] : null,\n shape !== 'default' ? styles[shape] : null,\n osd ? styles.osd : null,\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <button ref={ref} className={classes} {...props}>\n {leadingIcon}\n {children}\n {trailingIcon}\n </button>\n );\n});\n"],"mappings":";;;;AAsCA,IAAa,IAAS,EAA2C,SAC/D,EACE,aAAU,WACV,UAAO,MACP,WAAQ,WACR,SAAM,IACN,gBACA,iBACA,aACA,cACA,GAAG,KAEL,GACA;
|
|
1
|
+
{"version":3,"file":"Button.js","names":[],"sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["import { type ButtonHTMLAttributes, forwardRef, type ReactNode } from 'react';\n\nimport styles from './Button.module.css';\n\nexport type ButtonVariant = 'default' | 'suggested' | 'destructive' | 'flat' | 'raised';\nexport type ButtonSize = 'sm' | 'md' | 'lg';\nexport type ButtonShape = 'default' | 'pill' | 'circular';\n\nexport interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n /** Visual style of the button. Follows GNOME HIG button types. */\n variant?: ButtonVariant;\n /** Size of the button. */\n size?: ButtonSize;\n /** Shape of the button. \"pill\" for primary actions in open space, \"circular\" for icon-only buttons. */\n shape?: ButtonShape;\n /**\n * Dark semi-transparent overlay style for buttons placed on top of\n * media or images — mirrors the `.osd` style class.\n */\n osd?: boolean;\n /** Icon placed before the label. */\n leadingIcon?: ReactNode;\n /** Icon placed after the label. */\n trailingIcon?: ReactNode;\n children?: ReactNode;\n}\n\n/**\n * Button component following GNOME Human Interface Guidelines.\n *\n * Variants:\n * - `default` — Standard action, flat appearance with subtle border.\n * - `suggested` — Affirmative/primary action (accent color). Use at most once per view.\n * - `destructive` — Dangerous or irreversible action (red). Use sparingly.\n * - `flat` — No border or background; ideal for header bars and toolbars.\n *\n * @see https://developer.gnome.org/hig/patterns/controls/buttons.html\n */\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(function Button(\n {\n variant = 'default',\n size = 'md',\n shape = 'default',\n osd = false,\n leadingIcon,\n trailingIcon,\n children,\n className,\n ...props\n }: ButtonProps,\n ref,\n) {\n const classes = [\n styles.button,\n styles[variant],\n size !== 'md' ? styles[size] : null,\n shape !== 'default' ? styles[shape] : null,\n osd ? styles.osd : null,\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <button ref={ref} className={classes} {...props}>\n {leadingIcon}\n {children}\n {trailingIcon}\n </button>\n );\n});\n"],"mappings":";;;;AAsCA,IAAa,IAAS,EAA2C,SAC/D,EACE,aAAU,WACV,UAAO,MACP,WAAQ,WACR,SAAM,IACN,gBACA,iBACA,aACA,cACA,GAAG,KAEL,GACA;CAYA,OACE,kBAAC,UAAD;EAAa;EAAK,WAZJ;GACd,EAAO;GACP,EAAO;GACP,MAAS,OAAsB,OAAf,EAAO;GACvB,MAAU,YAA4B,OAAhB,EAAO;GAC7B,IAAM,EAAO,MAAM;GACnB;EACF,EACG,OAAO,OAAO,EACd,KAAK,GAGuB;EAAS,GAAI;YAA1C;GACG;GACA;GACA;EACK;;AAEZ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./Button/Button.cjs");exports.Button=e.Button;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(
|
|
1
|
+
const e=require("./ButtonContent.module.css.cjs");let t=require("react/jsx-runtime");var n=({icon:n,label:r,iconPosition:i=`start`,className:a,...o})=>(0,t.jsxs)(`span`,{className:[e.default.content,i===`end`?e.default.iconEnd:null,a].filter(Boolean).join(` `),...o,children:[n&&i===`start`&&(0,t.jsx)(`span`,{className:e.default.icon,"aria-hidden":`true`,children:n}),(0,t.jsx)(`span`,{className:e.default.label,children:r}),n&&i===`end`&&(0,t.jsx)(`span`,{className:e.default.icon,"aria-hidden":`true`,children:n})]});exports.ButtonContent=n;
|
|
2
2
|
//# sourceMappingURL=ButtonContent.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonContent.cjs","names":[],"sources":["../../../src/components/ButtonContent/ButtonContent.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\n\nimport styles from './ButtonContent.module.css';\n\nexport interface ButtonContentProps extends HTMLAttributes<HTMLSpanElement> {\n /** Icon element placed before the label. */\n icon?: ReactNode;\n /** Text label. */\n label: string;\n /**\n * Position of the icon relative to the label.\n * Defaults to `\"start\"`.\n */\n iconPosition?: 'start' | 'end';\n}\n\n/**\n * Icon + label layout helper for buttons that contain both an icon and text.\n *\n * Pass as the `children` of a `Button` to get the correct Adwaita spacing\n * between the icon and label (4 px gap, icon centred vertically with the text).\n *\n * Mirrors `AdwButtonContent`.\n *\n * @example\n * ```tsx\n * <Button>\n * <ButtonContent icon={<Icon name=\"document-save-symbolic\" />} label=\"Save\" />\n * </Button>\n * ```\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.ButtonContent.html\n */\nexport
|
|
1
|
+
{"version":3,"file":"ButtonContent.cjs","names":[],"sources":["../../../src/components/ButtonContent/ButtonContent.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\n\nimport styles from './ButtonContent.module.css';\n\nexport interface ButtonContentProps extends HTMLAttributes<HTMLSpanElement> {\n /** Icon element placed before the label. */\n icon?: ReactNode;\n /** Text label. */\n label: string;\n /**\n * Position of the icon relative to the label.\n * Defaults to `\"start\"`.\n */\n iconPosition?: 'start' | 'end';\n}\n\n/**\n * Icon + label layout helper for buttons that contain both an icon and text.\n *\n * Pass as the `children` of a `Button` to get the correct Adwaita spacing\n * between the icon and label (4 px gap, icon centred vertically with the text).\n *\n * Mirrors `AdwButtonContent`.\n *\n * @example\n * ```tsx\n * <Button>\n * <ButtonContent icon={<Icon name=\"document-save-symbolic\" />} label=\"Save\" />\n * </Button>\n * ```\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.ButtonContent.html\n */\nexport const ButtonContent = ({\n icon,\n label,\n iconPosition = 'start',\n className,\n ...props\n}: ButtonContentProps) => {\n return (\n <span\n className={[styles.content, iconPosition === 'end' ? styles.iconEnd : null, className]\n .filter(Boolean)\n .join(' ')}\n {...props}\n >\n {icon && iconPosition === 'start' && (\n <span className={styles.icon} aria-hidden=\"true\">\n {icon}\n </span>\n )}\n <span className={styles.label}>{label}</span>\n {icon && iconPosition === 'end' && (\n <span className={styles.icon} aria-hidden=\"true\">\n {icon}\n </span>\n )}\n </span>\n );\n};\n"],"mappings":"qFAiCA,IAAa,GAAiB,CAC5B,OACA,QACA,eAAe,QACf,YACA,GAAG,MAGD,EAAA,EAAA,MAAC,OAAD,CACE,UAAW,CAAC,EAAA,QAAO,QAAS,IAAiB,MAAQ,EAAA,QAAO,QAAU,KAAM,CAAS,EAClF,OAAO,OAAO,EACd,KAAK,GAAG,EACX,GAAI,WAJN,CAMG,GAAQ,IAAiB,UACxB,EAAA,EAAA,KAAC,OAAD,CAAM,UAAW,EAAA,QAAO,KAAM,cAAY,gBACvC,CACG,CAAA,GAER,EAAA,EAAA,KAAC,OAAD,CAAM,UAAW,EAAA,QAAO,eAAQ,CAAY,CAAA,EAC3C,GAAQ,IAAiB,QACxB,EAAA,EAAA,KAAC,OAAD,CAAM,UAAW,EAAA,QAAO,KAAM,cAAY,gBACvC,CACG,CAAA,CAEJ"}
|
|
@@ -27,4 +27,4 @@ export interface ButtonContentProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
27
27
|
*
|
|
28
28
|
* @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.ButtonContent.html
|
|
29
29
|
*/
|
|
30
|
-
export declare
|
|
30
|
+
export declare const ButtonContent: ({ icon, label, iconPosition, className, ...props }: ButtonContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,32 +1,30 @@
|
|
|
1
1
|
import e from "./ButtonContent.module.css.js";
|
|
2
2
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
3
|
//#region src/components/ButtonContent/ButtonContent.tsx
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
});
|
|
29
|
-
}
|
|
4
|
+
var r = ({ icon: r, label: i, iconPosition: a = "start", className: o, ...s }) => /* @__PURE__ */ n("span", {
|
|
5
|
+
className: [
|
|
6
|
+
e.content,
|
|
7
|
+
a === "end" ? e.iconEnd : null,
|
|
8
|
+
o
|
|
9
|
+
].filter(Boolean).join(" "),
|
|
10
|
+
...s,
|
|
11
|
+
children: [
|
|
12
|
+
r && a === "start" && /* @__PURE__ */ t("span", {
|
|
13
|
+
className: e.icon,
|
|
14
|
+
"aria-hidden": "true",
|
|
15
|
+
children: r
|
|
16
|
+
}),
|
|
17
|
+
/* @__PURE__ */ t("span", {
|
|
18
|
+
className: e.label,
|
|
19
|
+
children: i
|
|
20
|
+
}),
|
|
21
|
+
r && a === "end" && /* @__PURE__ */ t("span", {
|
|
22
|
+
className: e.icon,
|
|
23
|
+
"aria-hidden": "true",
|
|
24
|
+
children: r
|
|
25
|
+
})
|
|
26
|
+
]
|
|
27
|
+
});
|
|
30
28
|
//#endregion
|
|
31
29
|
export { r as ButtonContent };
|
|
32
30
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonContent.js","names":[],"sources":["../../../src/components/ButtonContent/ButtonContent.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\n\nimport styles from './ButtonContent.module.css';\n\nexport interface ButtonContentProps extends HTMLAttributes<HTMLSpanElement> {\n /** Icon element placed before the label. */\n icon?: ReactNode;\n /** Text label. */\n label: string;\n /**\n * Position of the icon relative to the label.\n * Defaults to `\"start\"`.\n */\n iconPosition?: 'start' | 'end';\n}\n\n/**\n * Icon + label layout helper for buttons that contain both an icon and text.\n *\n * Pass as the `children` of a `Button` to get the correct Adwaita spacing\n * between the icon and label (4 px gap, icon centred vertically with the text).\n *\n * Mirrors `AdwButtonContent`.\n *\n * @example\n * ```tsx\n * <Button>\n * <ButtonContent icon={<Icon name=\"document-save-symbolic\" />} label=\"Save\" />\n * </Button>\n * ```\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.ButtonContent.html\n */\nexport
|
|
1
|
+
{"version":3,"file":"ButtonContent.js","names":[],"sources":["../../../src/components/ButtonContent/ButtonContent.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\n\nimport styles from './ButtonContent.module.css';\n\nexport interface ButtonContentProps extends HTMLAttributes<HTMLSpanElement> {\n /** Icon element placed before the label. */\n icon?: ReactNode;\n /** Text label. */\n label: string;\n /**\n * Position of the icon relative to the label.\n * Defaults to `\"start\"`.\n */\n iconPosition?: 'start' | 'end';\n}\n\n/**\n * Icon + label layout helper for buttons that contain both an icon and text.\n *\n * Pass as the `children` of a `Button` to get the correct Adwaita spacing\n * between the icon and label (4 px gap, icon centred vertically with the text).\n *\n * Mirrors `AdwButtonContent`.\n *\n * @example\n * ```tsx\n * <Button>\n * <ButtonContent icon={<Icon name=\"document-save-symbolic\" />} label=\"Save\" />\n * </Button>\n * ```\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.ButtonContent.html\n */\nexport const ButtonContent = ({\n icon,\n label,\n iconPosition = 'start',\n className,\n ...props\n}: ButtonContentProps) => {\n return (\n <span\n className={[styles.content, iconPosition === 'end' ? styles.iconEnd : null, className]\n .filter(Boolean)\n .join(' ')}\n {...props}\n >\n {icon && iconPosition === 'start' && (\n <span className={styles.icon} aria-hidden=\"true\">\n {icon}\n </span>\n )}\n <span className={styles.label}>{label}</span>\n {icon && iconPosition === 'end' && (\n <span className={styles.icon} aria-hidden=\"true\">\n {icon}\n </span>\n )}\n </span>\n );\n};\n"],"mappings":";;;AAiCA,IAAa,KAAiB,EAC5B,SACA,UACA,kBAAe,SACf,cACA,GAAG,QAGD,kBAAC,QAAD;CACE,WAAW;EAAC,EAAO;EAAS,MAAiB,QAAQ,EAAO,UAAU;EAAM;CAAS,EAClF,OAAO,OAAO,EACd,KAAK,GAAG;CACX,GAAI;WAJN;EAMG,KAAQ,MAAiB,WACxB,kBAAC,QAAD;GAAM,WAAW,EAAO;GAAM,eAAY;aACvC;EACG,CAAA;EAER,kBAAC,QAAD;GAAM,WAAW,EAAO;aAAQ;EAAY,CAAA;EAC3C,KAAQ,MAAiB,SACxB,kBAAC,QAAD;GAAM,WAAW,EAAO;GAAM,eAAY;aACvC;EACG,CAAA;CAEJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./ButtonContent/ButtonContent.cjs");exports.ButtonContent=e.ButtonContent;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(
|
|
1
|
+
const e=require("./ButtonRow.module.css.cjs");let t=require("react/jsx-runtime");var n=({title:n,variant:r=`default`,leading:i,trailing:a,className:o,...s})=>(0,t.jsxs)(`button`,{className:[e.default.row,e.default[r],o].filter(Boolean).join(` `),...s,children:[i&&(0,t.jsx)(`span`,{className:e.default.leading,children:i}),(0,t.jsx)(`span`,{className:e.default.title,children:n}),a&&(0,t.jsx)(`span`,{className:e.default.trailing,children:a})]});exports.ButtonRow=n;
|
|
2
2
|
//# sourceMappingURL=ButtonRow.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonRow.cjs","names":[],"sources":["../../../src/components/ButtonRow/ButtonRow.tsx"],"sourcesContent":["import type { ButtonHTMLAttributes, ReactNode } from 'react';\n\nimport styles from './ButtonRow.module.css';\n\nexport type ButtonRowVariant = 'default' | 'suggested' | 'destructive';\n\nexport interface ButtonRowProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n /** Label displayed centered in the row. */\n title: string;\n /** Visual style that colours the title text. */\n variant?: ButtonRowVariant;\n /** Icon placed at the leading edge. */\n leading?: ReactNode;\n /** Icon placed at the trailing edge. */\n trailing?: ReactNode;\n}\n\n/**\n * Full-width activatable row styled as a button inside a `BoxedList`.\n *\n * Mirrors `AdwButtonRow` — use when an entire list row should trigger a single\n * action. Prefer `ActionRow` with `interactive` when the row also needs a\n * title/subtitle layout; prefer `ButtonRow` for single-label CTA rows.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.ButtonRow.html\n */\nexport
|
|
1
|
+
{"version":3,"file":"ButtonRow.cjs","names":[],"sources":["../../../src/components/ButtonRow/ButtonRow.tsx"],"sourcesContent":["import type { ButtonHTMLAttributes, ReactNode } from 'react';\n\nimport styles from './ButtonRow.module.css';\n\nexport type ButtonRowVariant = 'default' | 'suggested' | 'destructive';\n\nexport interface ButtonRowProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n /** Label displayed centered in the row. */\n title: string;\n /** Visual style that colours the title text. */\n variant?: ButtonRowVariant;\n /** Icon placed at the leading edge. */\n leading?: ReactNode;\n /** Icon placed at the trailing edge. */\n trailing?: ReactNode;\n}\n\n/**\n * Full-width activatable row styled as a button inside a `BoxedList`.\n *\n * Mirrors `AdwButtonRow` — use when an entire list row should trigger a single\n * action. Prefer `ActionRow` with `interactive` when the row also needs a\n * title/subtitle layout; prefer `ButtonRow` for single-label CTA rows.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.ButtonRow.html\n */\nexport const ButtonRow = ({\n title,\n variant = 'default',\n leading,\n trailing,\n className,\n ...props\n}: ButtonRowProps) => {\n const classes = [styles.row, styles[variant], className].filter(Boolean).join(' ');\n\n return (\n <button className={classes} {...props}>\n {leading && <span className={styles.leading}>{leading}</span>}\n <span className={styles.title}>{title}</span>\n {trailing && <span className={styles.trailing}>{trailing}</span>}\n </button>\n );\n};\n"],"mappings":"iFA0BA,IAAa,GAAa,CACxB,QACA,UAAU,UACV,UACA,WACA,YACA,GAAG,MAKD,EAAA,EAAA,MAAC,SAAD,CAAQ,UAHM,CAAC,EAAA,QAAO,IAAK,EAAA,QAAO,GAAU,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAGzD,EAAS,GAAI,WAAhC,CACG,IAAW,EAAA,EAAA,KAAC,OAAD,CAAM,UAAW,EAAA,QAAO,iBAAU,CAAc,CAAA,GAC5D,EAAA,EAAA,KAAC,OAAD,CAAM,UAAW,EAAA,QAAO,eAAQ,CAAY,CAAA,EAC3C,IAAY,EAAA,EAAA,KAAC,OAAD,CAAM,UAAW,EAAA,QAAO,kBAAW,CAAe,CAAA,CACzD"}
|
|
@@ -19,4 +19,4 @@ export interface ButtonRowProps extends ButtonHTMLAttributes<HTMLButtonElement>
|
|
|
19
19
|
*
|
|
20
20
|
* @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.ButtonRow.html
|
|
21
21
|
*/
|
|
22
|
-
export declare
|
|
22
|
+
export declare const ButtonRow: ({ title, variant, leading, trailing, className, ...props }: ButtonRowProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,30 +1,28 @@
|
|
|
1
1
|
import e from "./ButtonRow.module.css.js";
|
|
2
2
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
3
|
//#region src/components/ButtonRow/ButtonRow.tsx
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
});
|
|
27
|
-
}
|
|
4
|
+
var r = ({ title: r, variant: i = "default", leading: a, trailing: o, className: s, ...c }) => /* @__PURE__ */ n("button", {
|
|
5
|
+
className: [
|
|
6
|
+
e.row,
|
|
7
|
+
e[i],
|
|
8
|
+
s
|
|
9
|
+
].filter(Boolean).join(" "),
|
|
10
|
+
...c,
|
|
11
|
+
children: [
|
|
12
|
+
a && /* @__PURE__ */ t("span", {
|
|
13
|
+
className: e.leading,
|
|
14
|
+
children: a
|
|
15
|
+
}),
|
|
16
|
+
/* @__PURE__ */ t("span", {
|
|
17
|
+
className: e.title,
|
|
18
|
+
children: r
|
|
19
|
+
}),
|
|
20
|
+
o && /* @__PURE__ */ t("span", {
|
|
21
|
+
className: e.trailing,
|
|
22
|
+
children: o
|
|
23
|
+
})
|
|
24
|
+
]
|
|
25
|
+
});
|
|
28
26
|
//#endregion
|
|
29
27
|
export { r as ButtonRow };
|
|
30
28
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonRow.js","names":[],"sources":["../../../src/components/ButtonRow/ButtonRow.tsx"],"sourcesContent":["import type { ButtonHTMLAttributes, ReactNode } from 'react';\n\nimport styles from './ButtonRow.module.css';\n\nexport type ButtonRowVariant = 'default' | 'suggested' | 'destructive';\n\nexport interface ButtonRowProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n /** Label displayed centered in the row. */\n title: string;\n /** Visual style that colours the title text. */\n variant?: ButtonRowVariant;\n /** Icon placed at the leading edge. */\n leading?: ReactNode;\n /** Icon placed at the trailing edge. */\n trailing?: ReactNode;\n}\n\n/**\n * Full-width activatable row styled as a button inside a `BoxedList`.\n *\n * Mirrors `AdwButtonRow` — use when an entire list row should trigger a single\n * action. Prefer `ActionRow` with `interactive` when the row also needs a\n * title/subtitle layout; prefer `ButtonRow` for single-label CTA rows.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.ButtonRow.html\n */\nexport
|
|
1
|
+
{"version":3,"file":"ButtonRow.js","names":[],"sources":["../../../src/components/ButtonRow/ButtonRow.tsx"],"sourcesContent":["import type { ButtonHTMLAttributes, ReactNode } from 'react';\n\nimport styles from './ButtonRow.module.css';\n\nexport type ButtonRowVariant = 'default' | 'suggested' | 'destructive';\n\nexport interface ButtonRowProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n /** Label displayed centered in the row. */\n title: string;\n /** Visual style that colours the title text. */\n variant?: ButtonRowVariant;\n /** Icon placed at the leading edge. */\n leading?: ReactNode;\n /** Icon placed at the trailing edge. */\n trailing?: ReactNode;\n}\n\n/**\n * Full-width activatable row styled as a button inside a `BoxedList`.\n *\n * Mirrors `AdwButtonRow` — use when an entire list row should trigger a single\n * action. Prefer `ActionRow` with `interactive` when the row also needs a\n * title/subtitle layout; prefer `ButtonRow` for single-label CTA rows.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.ButtonRow.html\n */\nexport const ButtonRow = ({\n title,\n variant = 'default',\n leading,\n trailing,\n className,\n ...props\n}: ButtonRowProps) => {\n const classes = [styles.row, styles[variant], className].filter(Boolean).join(' ');\n\n return (\n <button className={classes} {...props}>\n {leading && <span className={styles.leading}>{leading}</span>}\n <span className={styles.title}>{title}</span>\n {trailing && <span className={styles.trailing}>{trailing}</span>}\n </button>\n );\n};\n"],"mappings":";;;AA0BA,IAAa,KAAa,EACxB,UACA,aAAU,WACV,YACA,aACA,cACA,GAAG,QAKD,kBAAC,UAAD;CAAQ,WAHM;EAAC,EAAO;EAAK,EAAO;EAAU;CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAGzD;CAAS,GAAI;WAAhC;EACG,KAAW,kBAAC,QAAD;GAAM,WAAW,EAAO;aAAU;EAAc,CAAA;EAC5D,kBAAC,QAAD;GAAM,WAAW,EAAO;aAAQ;EAAY,CAAA;EAC3C,KAAY,kBAAC,QAAD;GAAM,WAAW,EAAO;aAAW;EAAe,CAAA;CACzD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./ButtonRow/ButtonRow.cjs");exports.ButtonRow=e.ButtonRow;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(
|
|
1
|
+
const e=require("./Card.module.css.cjs");let t=require("react/jsx-runtime");var n=({interactive:n=!1,padding:r=`md`,as:i,className:a,children:o,...s})=>(0,t.jsx)(i??(n?`button`:`div`),{className:[e.default.card,e.default[`padding-${r}`],n?e.default.interactive:null,a].filter(Boolean).join(` `),...s,children:o});exports.Card=n;
|
|
2
2
|
//# sourceMappingURL=Card.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.cjs","names":[],"sources":["../../../src/components/Card/Card.tsx"],"sourcesContent":["import type { ElementType, HTMLAttributes, ReactNode } from 'react';\n\nimport styles from './Card.module.css';\n\nexport type CardPadding = 'none' | 'sm' | 'md' | 'lg';\n\nexport interface CardProps extends HTMLAttributes<HTMLElement> {\n /**\n * When true the card becomes clickable (Adwaita `.activatable`).\n * Renders as `<button>` by default; override with `as`.\n */\n interactive?: boolean;\n /** Internal spacing. Defaults to `\"md\"`. */\n padding?: CardPadding;\n /** Override the rendered HTML element. */\n as?: ElementType;\n children?: ReactNode;\n}\n\n/**\n * Card component following the GNOME HIG and Adwaita `.card` style class.\n *\n * Use for grouping related content on an elevated surface.\n * For clickable cards (e.g. grid item, settings shortcut) set `interactive`.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/style-classes.html\n * @see https://developer.gnome.org/hig/patterns/containers.html\n */\nexport
|
|
1
|
+
{"version":3,"file":"Card.cjs","names":[],"sources":["../../../src/components/Card/Card.tsx"],"sourcesContent":["import type { ElementType, HTMLAttributes, ReactNode } from 'react';\n\nimport styles from './Card.module.css';\n\nexport type CardPadding = 'none' | 'sm' | 'md' | 'lg';\n\nexport interface CardProps extends HTMLAttributes<HTMLElement> {\n /**\n * When true the card becomes clickable (Adwaita `.activatable`).\n * Renders as `<button>` by default; override with `as`.\n */\n interactive?: boolean;\n /** Internal spacing. Defaults to `\"md\"`. */\n padding?: CardPadding;\n /** Override the rendered HTML element. */\n as?: ElementType;\n children?: ReactNode;\n}\n\n/**\n * Card component following the GNOME HIG and Adwaita `.card` style class.\n *\n * Use for grouping related content on an elevated surface.\n * For clickable cards (e.g. grid item, settings shortcut) set `interactive`.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/style-classes.html\n * @see https://developer.gnome.org/hig/patterns/containers.html\n */\nexport const Card = ({\n interactive = false,\n padding = 'md',\n as,\n className,\n children,\n ...props\n}: CardProps) => {\n const Tag: ElementType = as ?? (interactive ? 'button' : 'div');\n\n const classes = [\n styles.card,\n styles[`padding-${padding}`],\n interactive ? styles.interactive : null,\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <Tag className={classes} {...props}>\n {children}\n </Tag>\n );\n};\n"],"mappings":"4EA4BA,IAAa,GAAQ,CACnB,cAAc,GACd,UAAU,KACV,KACA,YACA,WACA,GAAG,MAcD,EAAA,EAAA,KAZuB,IAAO,EAAc,SAAW,OAYvD,CAAK,UAVS,CACd,EAAA,QAAO,KACP,EAAA,QAAO,WAAW,KAClB,EAAc,EAAA,QAAO,YAAc,KACnC,CACF,EACG,OAAO,OAAO,EACd,KAAK,GAGU,EAAS,GAAI,EAC1B,UACE,CAAA"}
|
|
@@ -21,4 +21,4 @@ export interface CardProps extends HTMLAttributes<HTMLElement> {
|
|
|
21
21
|
* @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/style-classes.html
|
|
22
22
|
* @see https://developer.gnome.org/hig/patterns/containers.html
|
|
23
23
|
*/
|
|
24
|
-
export declare
|
|
24
|
+
export declare const Card: ({ interactive, padding, as, className, children, ...props }: CardProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
import e from "./Card.module.css.js";
|
|
2
2
|
import { jsx as t } from "react/jsx-runtime";
|
|
3
3
|
//#region src/components/Card/Card.tsx
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
});
|
|
15
|
-
}
|
|
4
|
+
var n = ({ interactive: n = !1, padding: r = "md", as: i, className: a, children: o, ...s }) => /* @__PURE__ */ t(i ?? (n ? "button" : "div"), {
|
|
5
|
+
className: [
|
|
6
|
+
e.card,
|
|
7
|
+
e[`padding-${r}`],
|
|
8
|
+
n ? e.interactive : null,
|
|
9
|
+
a
|
|
10
|
+
].filter(Boolean).join(" "),
|
|
11
|
+
...s,
|
|
12
|
+
children: o
|
|
13
|
+
});
|
|
16
14
|
//#endregion
|
|
17
15
|
export { n as Card };
|
|
18
16
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.js","names":[],"sources":["../../../src/components/Card/Card.tsx"],"sourcesContent":["import type { ElementType, HTMLAttributes, ReactNode } from 'react';\n\nimport styles from './Card.module.css';\n\nexport type CardPadding = 'none' | 'sm' | 'md' | 'lg';\n\nexport interface CardProps extends HTMLAttributes<HTMLElement> {\n /**\n * When true the card becomes clickable (Adwaita `.activatable`).\n * Renders as `<button>` by default; override with `as`.\n */\n interactive?: boolean;\n /** Internal spacing. Defaults to `\"md\"`. */\n padding?: CardPadding;\n /** Override the rendered HTML element. */\n as?: ElementType;\n children?: ReactNode;\n}\n\n/**\n * Card component following the GNOME HIG and Adwaita `.card` style class.\n *\n * Use for grouping related content on an elevated surface.\n * For clickable cards (e.g. grid item, settings shortcut) set `interactive`.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/style-classes.html\n * @see https://developer.gnome.org/hig/patterns/containers.html\n */\nexport
|
|
1
|
+
{"version":3,"file":"Card.js","names":[],"sources":["../../../src/components/Card/Card.tsx"],"sourcesContent":["import type { ElementType, HTMLAttributes, ReactNode } from 'react';\n\nimport styles from './Card.module.css';\n\nexport type CardPadding = 'none' | 'sm' | 'md' | 'lg';\n\nexport interface CardProps extends HTMLAttributes<HTMLElement> {\n /**\n * When true the card becomes clickable (Adwaita `.activatable`).\n * Renders as `<button>` by default; override with `as`.\n */\n interactive?: boolean;\n /** Internal spacing. Defaults to `\"md\"`. */\n padding?: CardPadding;\n /** Override the rendered HTML element. */\n as?: ElementType;\n children?: ReactNode;\n}\n\n/**\n * Card component following the GNOME HIG and Adwaita `.card` style class.\n *\n * Use for grouping related content on an elevated surface.\n * For clickable cards (e.g. grid item, settings shortcut) set `interactive`.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/style-classes.html\n * @see https://developer.gnome.org/hig/patterns/containers.html\n */\nexport const Card = ({\n interactive = false,\n padding = 'md',\n as,\n className,\n children,\n ...props\n}: CardProps) => {\n const Tag: ElementType = as ?? (interactive ? 'button' : 'div');\n\n const classes = [\n styles.card,\n styles[`padding-${padding}`],\n interactive ? styles.interactive : null,\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <Tag className={classes} {...props}>\n {children}\n </Tag>\n );\n};\n"],"mappings":";;;AA4BA,IAAa,KAAQ,EACnB,iBAAc,IACd,aAAU,MACV,OACA,cACA,aACA,GAAG,QAcD,kBAZuB,MAAO,IAAc,WAAW,QAYvD;CAAK,WAVS;EACd,EAAO;EACP,EAAO,WAAW;EAClB,IAAc,EAAO,cAAc;EACnC;CACF,EACG,OAAO,OAAO,EACd,KAAK,GAGU;CAAS,GAAI;CAC1B;AACE,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e
|
|
1
|
+
var e={card:`_card_12nxd_1`,"padding-none":`_padding-none_12nxd_12`,"padding-sm":`_padding-sm_12nxd_15`,"padding-md":`_padding-md_12nxd_18`,"padding-lg":`_padding-lg_12nxd_21`,interactive:`_interactive_12nxd_27`};exports.default=e;
|
|
2
2
|
//# sourceMappingURL=Card.module.css.cjs.map
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
card: e,
|
|
1
|
+
var e = {
|
|
2
|
+
card: "_card_12nxd_1",
|
|
4
3
|
"padding-none": "_padding-none_12nxd_12",
|
|
5
4
|
"padding-sm": "_padding-sm_12nxd_15",
|
|
6
5
|
"padding-md": "_padding-md_12nxd_18",
|
|
7
6
|
"padding-lg": "_padding-lg_12nxd_21",
|
|
8
|
-
interactive:
|
|
7
|
+
interactive: "_interactive_12nxd_27"
|
|
9
8
|
};
|
|
10
9
|
//#endregion
|
|
11
|
-
export {
|
|
10
|
+
export { e as default };
|
|
12
11
|
|
|
13
12
|
//# sourceMappingURL=Card.module.css.js.map
|
package/dist/components/Card.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("./Card/Card.cjs");exports.Card=e.Card;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(
|
|
1
|
+
const e=require("./Carousel.module.css.cjs");let t=require("react"),n=require("react/jsx-runtime");var r=({pages:t,currentPage:r,onPageSelected:i,className:a,...o})=>(0,n.jsx)(`div`,{className:[e.default.indicatorDots,a].filter(Boolean).join(` `),role:`tablist`,"aria-label":`Carousel pages`,...o,children:Array.from({length:t},(t,a)=>(0,n.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":a===r,"aria-label":`Page ${a+1}`,className:[e.default.dot,a===r?e.default.dotActive:null].filter(Boolean).join(` `),onClick:()=>i?.(a)},a))}),i=({pages:t,currentPage:r,onPageSelected:i,className:a,...o})=>(0,n.jsx)(`div`,{className:[e.default.indicatorLines,a].filter(Boolean).join(` `),role:`tablist`,"aria-label":`Carousel pages`,...o,children:Array.from({length:t},(t,a)=>(0,n.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":a===r,"aria-label":`Page ${a+1}`,className:[e.default.line,a===r?e.default.lineActive:null].filter(Boolean).join(` `),onClick:()=>i?.(a)},a))}),a=({children:r,orientation:i=`horizontal`,spacing:a=0,loop:o=!1,onPageChanged:s,page:c,className:l,...u})=>{let d=(0,t.useRef)(null),f=t.Children.count(r),[p,m]=(0,t.useState)(0),h=c!==void 0,g=h?c:p,_=(0,t.useCallback)((e,t=`smooth`)=>{let n=d.current;n&&(i===`horizontal`?n.scrollTo({left:n.clientWidth*e,behavior:t}):n.scrollTo({top:n.clientHeight*e,behavior:t}))},[i]);(0,t.useEffect)(()=>{h&&_(c,`smooth`)},[c,_,h]),(0,t.useEffect)(()=>{let e=d.current;if(!e)return;let t=()=>{Array.from(e.children);let t=i===`horizontal`?e.clientWidth:e.clientHeight,n=i===`horizontal`?e.scrollLeft:e.scrollTop,r=Math.round(n/(t||1)),a=Math.max(0,Math.min(r,f-1));h||m(a),s?.(a)};return e.addEventListener(`scroll`,t,{passive:!0}),()=>e.removeEventListener(`scroll`,t)},[i,f,h,s]);let v=(0,t.useCallback)(e=>{let t=i===`horizontal`?e.key===`ArrowRight`:e.key===`ArrowDown`,n=i===`horizontal`?e.key===`ArrowLeft`:e.key===`ArrowUp`;if(t){e.preventDefault();let t=o?(g+1)%f:Math.min(g+1,f-1);_(t),h||m(t),s?.(t)}else if(n){e.preventDefault();let t=o?(g-1+f)%f:Math.max(g-1,0);_(t),h||m(t),s?.(t)}},[g,f,o,i,_,h,s]),y=i===`horizontal`;return(0,n.jsx)(`div`,{ref:d,role:`region`,"aria-roledescription":`carousel`,className:[e.default.carousel,y?e.default.horizontal:e.default.vertical,l].filter(Boolean).join(` `),style:y?{columnGap:a||void 0}:{rowGap:a||void 0},onKeyDown:v,...u,children:t.Children.map(r,(t,r)=>(0,n.jsx)(`div`,{className:e.default.slide,role:`group`,"aria-roledescription":`slide`,"aria-label":`${r+1} of ${f}`,children:t},r))})};exports.Carousel=a,exports.CarouselIndicatorDots=r,exports.CarouselIndicatorLines=i;
|
|
2
2
|
//# sourceMappingURL=Carousel.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Carousel.cjs","names":[],"sources":["../../../src/components/Carousel/Carousel.tsx"],"sourcesContent":["import {\n Children,\n type HTMLAttributes,\n type KeyboardEvent,\n type ReactNode,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from 'react';\n\nimport styles from './Carousel.module.css';\n\n// ─── CarouselIndicatorDots ────────────────────────────────────────────────────\n\nexport interface CarouselIndicatorDotsProps extends HTMLAttributes<HTMLDivElement> {\n /** Total number of pages. */\n pages: number;\n /** Zero-based index of the current page. */\n currentPage: number;\n /** Called when the user clicks a dot. */\n onPageSelected?: (index: number) => void;\n}\n\n/**\n * Dot-style page indicator for `Carousel`.\n * Mirrors `AdwCarouselIndicatorDots`.\n */\nexport function CarouselIndicatorDots({\n pages,\n currentPage,\n onPageSelected,\n className,\n ...props\n}: CarouselIndicatorDotsProps) {\n return (\n <div\n className={[styles.indicatorDots, className].filter(Boolean).join(' ')}\n role=\"tablist\"\n aria-label=\"Carousel pages\"\n {...props}\n >\n {Array.from({ length: pages }, (_, i) => (\n <button\n key={i}\n type=\"button\"\n role=\"tab\"\n aria-selected={i === currentPage}\n aria-label={`Page ${i + 1}`}\n className={[styles.dot, i === currentPage ? styles.dotActive : null]\n .filter(Boolean)\n .join(' ')}\n onClick={() => onPageSelected?.(i)}\n />\n ))}\n </div>\n );\n}\n\n// ─── CarouselIndicatorLines ───────────────────────────────────────────────────\n\nexport interface CarouselIndicatorLinesProps extends HTMLAttributes<HTMLDivElement> {\n /** Total number of pages. */\n pages: number;\n /** Zero-based index of the current page. */\n currentPage: number;\n /** Called when the user clicks a line. */\n onPageSelected?: (index: number) => void;\n}\n\n/**\n * Line-style page indicator for `Carousel`.\n * Mirrors `AdwCarouselIndicatorLines`.\n */\nexport function CarouselIndicatorLines({\n pages,\n currentPage,\n onPageSelected,\n className,\n ...props\n}: CarouselIndicatorLinesProps) {\n return (\n <div\n className={[styles.indicatorLines, className].filter(Boolean).join(' ')}\n role=\"tablist\"\n aria-label=\"Carousel pages\"\n {...props}\n >\n {Array.from({ length: pages }, (_, i) => (\n <button\n key={i}\n type=\"button\"\n role=\"tab\"\n aria-selected={i === currentPage}\n aria-label={`Page ${i + 1}`}\n className={[styles.line, i === currentPage ? styles.lineActive : null]\n .filter(Boolean)\n .join(' ')}\n onClick={() => onPageSelected?.(i)}\n />\n ))}\n </div>\n );\n}\n\n// ─── Carousel ─────────────────────────────────────────────────────────────────\n\nexport interface CarouselProps extends HTMLAttributes<HTMLDivElement> {\n children?: ReactNode;\n /**\n * Scroll orientation.\n * @default \"horizontal\"\n */\n orientation?: 'horizontal' | 'vertical';\n /**\n * Gap between pages in px.\n * @default 0\n */\n spacing?: number;\n /**\n * Allow infinite looping (wraps around on the last/first page).\n * @default false\n */\n loop?: boolean;\n /** Called whenever the visible page changes. */\n onPageChanged?: (index: number) => void;\n /**\n * Controlled current page index.\n * When omitted the carousel manages page state internally.\n */\n page?: number;\n}\n\n/**\n * Swipeable content carousel.\n *\n * Mirrors `AdwCarousel`. Uses CSS scroll-snapping for smooth, native-feeling\n * page transitions. Supports keyboard navigation (arrow keys) and touch/mouse\n * drag via the browser's native scroll handling.\n *\n * Pair with `CarouselIndicatorDots` or `CarouselIndicatorLines` for pagination UI.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Carousel.html\n */\nexport function Carousel({\n children,\n orientation = 'horizontal',\n spacing = 0,\n loop = false,\n onPageChanged,\n page: controlledPage,\n className,\n ...props\n}: CarouselProps) {\n const scrollRef = useRef<HTMLDivElement>(null);\n const pageCount = Children.count(children);\n const [internalPage, setInternalPage] = useState(0);\n const isControlled = controlledPage !== undefined;\n const currentPage = isControlled ? controlledPage : internalPage;\n\n const scrollToPage = useCallback(\n (index: number, behavior: ScrollBehavior = 'smooth') => {\n const el = scrollRef.current;\n\n if (!el) {\n return;\n }\n\n if (orientation === 'horizontal') {\n el.scrollTo({ left: el.clientWidth * index, behavior });\n } else {\n el.scrollTo({ top: el.clientHeight * index, behavior });\n }\n },\n [orientation],\n );\n\n // Scroll to the controlled page when it changes externally\n useEffect(() => {\n if (!isControlled) {\n return;\n }\n\n scrollToPage(controlledPage, 'smooth');\n }, [controlledPage, scrollToPage, isControlled]);\n\n // Detect page changes via IntersectionObserver on each child\n useEffect(() => {\n const el = scrollRef.current;\n\n if (!el) {\n return;\n }\n\n const handleScroll = () => {\n const pages = Array.from(el.children) as HTMLElement[];\n const size = orientation === 'horizontal' ? el.clientWidth : el.clientHeight;\n const scroll = orientation === 'horizontal' ? el.scrollLeft : el.scrollTop;\n const idx = Math.round(scroll / (size || 1));\n const clamped = Math.max(0, Math.min(idx, pageCount - 1));\n\n if (!isControlled) {\n setInternalPage(clamped);\n }\n\n onPageChanged?.(clamped);\n void pages; // suppress lint\n };\n\n el.addEventListener('scroll', handleScroll, { passive: true });\n\n return () => el.removeEventListener('scroll', handleScroll);\n }, [orientation, pageCount, isControlled, onPageChanged]);\n\n // Keyboard navigation\n const handleKeyDown = useCallback(\n (e: KeyboardEvent) => {\n const isForward =\n orientation === 'horizontal' ? e.key === 'ArrowRight' : e.key === 'ArrowDown';\n const isBack = orientation === 'horizontal' ? e.key === 'ArrowLeft' : e.key === 'ArrowUp';\n\n if (isForward) {\n e.preventDefault();\n const next = loop\n ? (currentPage + 1) % pageCount\n : Math.min(currentPage + 1, pageCount - 1);\n\n scrollToPage(next);\n if (!isControlled) {\n setInternalPage(next);\n }\n\n onPageChanged?.(next);\n } else if (isBack) {\n e.preventDefault();\n const prev = loop\n ? (currentPage - 1 + pageCount) % pageCount\n : Math.max(currentPage - 1, 0);\n\n scrollToPage(prev);\n if (!isControlled) {\n setInternalPage(prev);\n }\n\n onPageChanged?.(prev);\n }\n },\n [currentPage, pageCount, loop, orientation, scrollToPage, isControlled, onPageChanged],\n );\n\n const isHorizontal = orientation === 'horizontal';\n\n return (\n <div\n ref={scrollRef}\n role=\"region\"\n aria-roledescription=\"carousel\"\n className={[styles.carousel, isHorizontal ? styles.horizontal : styles.vertical, className]\n .filter(Boolean)\n .join(' ')}\n style={isHorizontal ? { columnGap: spacing || undefined } : { rowGap: spacing || undefined }}\n onKeyDown={handleKeyDown}\n {...props}\n >\n {Children.map(children, (child, i) => (\n <div\n key={i}\n className={styles.slide}\n role=\"group\"\n aria-roledescription=\"slide\"\n aria-label={`${i + 1} of ${pageCount}`}\n >\n {child}\n </div>\n ))}\n </div>\n );\n}\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"Carousel.cjs","names":[],"sources":["../../../src/components/Carousel/Carousel.tsx"],"sourcesContent":["import {\n Children,\n type HTMLAttributes,\n type KeyboardEvent,\n type ReactNode,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from 'react';\n\nimport styles from './Carousel.module.css';\n\n// ─── CarouselIndicatorDots ────────────────────────────────────────────────────\n\nexport interface CarouselIndicatorDotsProps extends HTMLAttributes<HTMLDivElement> {\n /** Total number of pages. */\n pages: number;\n /** Zero-based index of the current page. */\n currentPage: number;\n /** Called when the user clicks a dot. */\n onPageSelected?: (index: number) => void;\n}\n\n/**\n * Dot-style page indicator for `Carousel`.\n * Mirrors `AdwCarouselIndicatorDots`.\n */\nexport const CarouselIndicatorDots = ({\n pages,\n currentPage,\n onPageSelected,\n className,\n ...props\n}: CarouselIndicatorDotsProps) => {\n return (\n <div\n className={[styles.indicatorDots, className].filter(Boolean).join(' ')}\n role=\"tablist\"\n aria-label=\"Carousel pages\"\n {...props}\n >\n {Array.from({ length: pages }, (_, i) => (\n <button\n key={i}\n type=\"button\"\n role=\"tab\"\n aria-selected={i === currentPage}\n aria-label={`Page ${i + 1}`}\n className={[styles.dot, i === currentPage ? styles.dotActive : null]\n .filter(Boolean)\n .join(' ')}\n onClick={() => onPageSelected?.(i)}\n />\n ))}\n </div>\n );\n};\n\n// ─── CarouselIndicatorLines ───────────────────────────────────────────────────\n\nexport interface CarouselIndicatorLinesProps extends HTMLAttributes<HTMLDivElement> {\n /** Total number of pages. */\n pages: number;\n /** Zero-based index of the current page. */\n currentPage: number;\n /** Called when the user clicks a line. */\n onPageSelected?: (index: number) => void;\n}\n\n/**\n * Line-style page indicator for `Carousel`.\n * Mirrors `AdwCarouselIndicatorLines`.\n */\nexport const CarouselIndicatorLines = ({\n pages,\n currentPage,\n onPageSelected,\n className,\n ...props\n}: CarouselIndicatorLinesProps) => {\n return (\n <div\n className={[styles.indicatorLines, className].filter(Boolean).join(' ')}\n role=\"tablist\"\n aria-label=\"Carousel pages\"\n {...props}\n >\n {Array.from({ length: pages }, (_, i) => (\n <button\n key={i}\n type=\"button\"\n role=\"tab\"\n aria-selected={i === currentPage}\n aria-label={`Page ${i + 1}`}\n className={[styles.line, i === currentPage ? styles.lineActive : null]\n .filter(Boolean)\n .join(' ')}\n onClick={() => onPageSelected?.(i)}\n />\n ))}\n </div>\n );\n};\n\n// ─── Carousel ─────────────────────────────────────────────────────────────────\n\nexport interface CarouselProps extends HTMLAttributes<HTMLDivElement> {\n children?: ReactNode;\n /**\n * Scroll orientation.\n * @default \"horizontal\"\n */\n orientation?: 'horizontal' | 'vertical';\n /**\n * Gap between pages in px.\n * @default 0\n */\n spacing?: number;\n /**\n * Allow infinite looping (wraps around on the last/first page).\n * @default false\n */\n loop?: boolean;\n /** Called whenever the visible page changes. */\n onPageChanged?: (index: number) => void;\n /**\n * Controlled current page index.\n * When omitted the carousel manages page state internally.\n */\n page?: number;\n}\n\n/**\n * Swipeable content carousel.\n *\n * Mirrors `AdwCarousel`. Uses CSS scroll-snapping for smooth, native-feeling\n * page transitions. Supports keyboard navigation (arrow keys) and touch/mouse\n * drag via the browser's native scroll handling.\n *\n * Pair with `CarouselIndicatorDots` or `CarouselIndicatorLines` for pagination UI.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Carousel.html\n */\nexport const Carousel = ({\n children,\n orientation = 'horizontal',\n spacing = 0,\n loop = false,\n onPageChanged,\n page: controlledPage,\n className,\n ...props\n}: CarouselProps) => {\n const scrollRef = useRef<HTMLDivElement>(null);\n const pageCount = Children.count(children);\n const [internalPage, setInternalPage] = useState(0);\n const isControlled = controlledPage !== undefined;\n const currentPage = isControlled ? controlledPage : internalPage;\n\n const scrollToPage = useCallback(\n (index: number, behavior: ScrollBehavior = 'smooth') => {\n const el = scrollRef.current;\n\n if (!el) {\n return;\n }\n\n if (orientation === 'horizontal') {\n el.scrollTo({ left: el.clientWidth * index, behavior });\n } else {\n el.scrollTo({ top: el.clientHeight * index, behavior });\n }\n },\n [orientation],\n );\n\n // Scroll to the controlled page when it changes externally\n useEffect(() => {\n if (!isControlled) {\n return;\n }\n\n scrollToPage(controlledPage, 'smooth');\n }, [controlledPage, scrollToPage, isControlled]);\n\n // Detect page changes via IntersectionObserver on each child\n useEffect(() => {\n const el = scrollRef.current;\n\n if (!el) {\n return;\n }\n\n const handleScroll = () => {\n const pages = Array.from(el.children) as HTMLElement[];\n const size = orientation === 'horizontal' ? el.clientWidth : el.clientHeight;\n const scroll = orientation === 'horizontal' ? el.scrollLeft : el.scrollTop;\n const idx = Math.round(scroll / (size || 1));\n const clamped = Math.max(0, Math.min(idx, pageCount - 1));\n\n if (!isControlled) {\n setInternalPage(clamped);\n }\n\n onPageChanged?.(clamped);\n void pages; // suppress lint\n };\n\n el.addEventListener('scroll', handleScroll, { passive: true });\n\n return () => el.removeEventListener('scroll', handleScroll);\n }, [orientation, pageCount, isControlled, onPageChanged]);\n\n // Keyboard navigation\n const handleKeyDown = useCallback(\n (e: KeyboardEvent) => {\n const isForward =\n orientation === 'horizontal' ? e.key === 'ArrowRight' : e.key === 'ArrowDown';\n const isBack = orientation === 'horizontal' ? e.key === 'ArrowLeft' : e.key === 'ArrowUp';\n\n if (isForward) {\n e.preventDefault();\n const next = loop\n ? (currentPage + 1) % pageCount\n : Math.min(currentPage + 1, pageCount - 1);\n\n scrollToPage(next);\n if (!isControlled) {\n setInternalPage(next);\n }\n\n onPageChanged?.(next);\n } else if (isBack) {\n e.preventDefault();\n const prev = loop\n ? (currentPage - 1 + pageCount) % pageCount\n : Math.max(currentPage - 1, 0);\n\n scrollToPage(prev);\n if (!isControlled) {\n setInternalPage(prev);\n }\n\n onPageChanged?.(prev);\n }\n },\n [currentPage, pageCount, loop, orientation, scrollToPage, isControlled, onPageChanged],\n );\n\n const isHorizontal = orientation === 'horizontal';\n\n return (\n <div\n ref={scrollRef}\n role=\"region\"\n aria-roledescription=\"carousel\"\n className={[styles.carousel, isHorizontal ? styles.horizontal : styles.vertical, className]\n .filter(Boolean)\n .join(' ')}\n style={isHorizontal ? { columnGap: spacing || undefined } : { rowGap: spacing || undefined }}\n onKeyDown={handleKeyDown}\n {...props}\n >\n {Children.map(children, (child, i) => (\n <div\n key={i}\n className={styles.slide}\n role=\"group\"\n aria-roledescription=\"slide\"\n aria-label={`${i + 1} of ${pageCount}`}\n >\n {child}\n </div>\n ))}\n </div>\n );\n};\n"],"mappings":"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"}
|
|
@@ -11,7 +11,7 @@ export interface CarouselIndicatorDotsProps extends HTMLAttributes<HTMLDivElemen
|
|
|
11
11
|
* Dot-style page indicator for `Carousel`.
|
|
12
12
|
* Mirrors `AdwCarouselIndicatorDots`.
|
|
13
13
|
*/
|
|
14
|
-
export declare
|
|
14
|
+
export declare const CarouselIndicatorDots: ({ pages, currentPage, onPageSelected, className, ...props }: CarouselIndicatorDotsProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
export interface CarouselIndicatorLinesProps extends HTMLAttributes<HTMLDivElement> {
|
|
16
16
|
/** Total number of pages. */
|
|
17
17
|
pages: number;
|
|
@@ -24,7 +24,7 @@ export interface CarouselIndicatorLinesProps extends HTMLAttributes<HTMLDivEleme
|
|
|
24
24
|
* Line-style page indicator for `Carousel`.
|
|
25
25
|
* Mirrors `AdwCarouselIndicatorLines`.
|
|
26
26
|
*/
|
|
27
|
-
export declare
|
|
27
|
+
export declare const CarouselIndicatorLines: ({ pages, currentPage, onPageSelected, className, ...props }: CarouselIndicatorLinesProps) => import("react/jsx-runtime").JSX.Element;
|
|
28
28
|
export interface CarouselProps extends HTMLAttributes<HTMLDivElement> {
|
|
29
29
|
children?: ReactNode;
|
|
30
30
|
/**
|
|
@@ -61,4 +61,4 @@ export interface CarouselProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
61
61
|
*
|
|
62
62
|
* @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Carousel.html
|
|
63
63
|
*/
|
|
64
|
-
export declare
|
|
64
|
+
export declare const Carousel: ({ children, orientation, spacing, loop, onPageChanged, page: controlledPage, className, ...props }: CarouselProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,39 +2,33 @@ import e from "./Carousel.module.css.js";
|
|
|
2
2
|
import { Children as t, useCallback as n, useEffect as r, useRef as i, useState as a } from "react";
|
|
3
3
|
import { jsx as o } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/Carousel/Carousel.tsx
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
className: [e.line, i === n ? e.lineActive : null].filter(Boolean).join(" "),
|
|
33
|
-
onClick: () => r?.(i)
|
|
34
|
-
}, i))
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
function l({ children: s, orientation: c = "horizontal", spacing: l = 0, loop: u = !1, onPageChanged: d, page: f, className: p, ...m }) {
|
|
5
|
+
var s = ({ pages: t, currentPage: n, onPageSelected: r, className: i, ...a }) => /* @__PURE__ */ o("div", {
|
|
6
|
+
className: [e.indicatorDots, i].filter(Boolean).join(" "),
|
|
7
|
+
role: "tablist",
|
|
8
|
+
"aria-label": "Carousel pages",
|
|
9
|
+
...a,
|
|
10
|
+
children: Array.from({ length: t }, (t, i) => /* @__PURE__ */ o("button", {
|
|
11
|
+
type: "button",
|
|
12
|
+
role: "tab",
|
|
13
|
+
"aria-selected": i === n,
|
|
14
|
+
"aria-label": `Page ${i + 1}`,
|
|
15
|
+
className: [e.dot, i === n ? e.dotActive : null].filter(Boolean).join(" "),
|
|
16
|
+
onClick: () => r?.(i)
|
|
17
|
+
}, i))
|
|
18
|
+
}), c = ({ pages: t, currentPage: n, onPageSelected: r, className: i, ...a }) => /* @__PURE__ */ o("div", {
|
|
19
|
+
className: [e.indicatorLines, i].filter(Boolean).join(" "),
|
|
20
|
+
role: "tablist",
|
|
21
|
+
"aria-label": "Carousel pages",
|
|
22
|
+
...a,
|
|
23
|
+
children: Array.from({ length: t }, (t, i) => /* @__PURE__ */ o("button", {
|
|
24
|
+
type: "button",
|
|
25
|
+
role: "tab",
|
|
26
|
+
"aria-selected": i === n,
|
|
27
|
+
"aria-label": `Page ${i + 1}`,
|
|
28
|
+
className: [e.line, i === n ? e.lineActive : null].filter(Boolean).join(" "),
|
|
29
|
+
onClick: () => r?.(i)
|
|
30
|
+
}, i))
|
|
31
|
+
}), l = ({ children: s, orientation: c = "horizontal", spacing: l = 0, loop: u = !1, onPageChanged: d, page: f, className: p, ...m }) => {
|
|
38
32
|
let h = i(null), g = t.count(s), [_, v] = a(0), y = f !== void 0, b = y ? f : _, x = n((e, t = "smooth") => {
|
|
39
33
|
let n = h.current;
|
|
40
34
|
n && (c === "horizontal" ? n.scrollTo({
|
|
@@ -106,7 +100,7 @@ function l({ children: s, orientation: c = "horizontal", spacing: l = 0, loop: u
|
|
|
106
100
|
children: t
|
|
107
101
|
}, n))
|
|
108
102
|
});
|
|
109
|
-
}
|
|
103
|
+
};
|
|
110
104
|
//#endregion
|
|
111
105
|
export { l as Carousel, s as CarouselIndicatorDots, c as CarouselIndicatorLines };
|
|
112
106
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Carousel.js","names":[],"sources":["../../../src/components/Carousel/Carousel.tsx"],"sourcesContent":["import {\n Children,\n type HTMLAttributes,\n type KeyboardEvent,\n type ReactNode,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from 'react';\n\nimport styles from './Carousel.module.css';\n\n// ─── CarouselIndicatorDots ────────────────────────────────────────────────────\n\nexport interface CarouselIndicatorDotsProps extends HTMLAttributes<HTMLDivElement> {\n /** Total number of pages. */\n pages: number;\n /** Zero-based index of the current page. */\n currentPage: number;\n /** Called when the user clicks a dot. */\n onPageSelected?: (index: number) => void;\n}\n\n/**\n * Dot-style page indicator for `Carousel`.\n * Mirrors `AdwCarouselIndicatorDots`.\n */\nexport function CarouselIndicatorDots({\n pages,\n currentPage,\n onPageSelected,\n className,\n ...props\n}: CarouselIndicatorDotsProps) {\n return (\n <div\n className={[styles.indicatorDots, className].filter(Boolean).join(' ')}\n role=\"tablist\"\n aria-label=\"Carousel pages\"\n {...props}\n >\n {Array.from({ length: pages }, (_, i) => (\n <button\n key={i}\n type=\"button\"\n role=\"tab\"\n aria-selected={i === currentPage}\n aria-label={`Page ${i + 1}`}\n className={[styles.dot, i === currentPage ? styles.dotActive : null]\n .filter(Boolean)\n .join(' ')}\n onClick={() => onPageSelected?.(i)}\n />\n ))}\n </div>\n );\n}\n\n// ─── CarouselIndicatorLines ───────────────────────────────────────────────────\n\nexport interface CarouselIndicatorLinesProps extends HTMLAttributes<HTMLDivElement> {\n /** Total number of pages. */\n pages: number;\n /** Zero-based index of the current page. */\n currentPage: number;\n /** Called when the user clicks a line. */\n onPageSelected?: (index: number) => void;\n}\n\n/**\n * Line-style page indicator for `Carousel`.\n * Mirrors `AdwCarouselIndicatorLines`.\n */\nexport function CarouselIndicatorLines({\n pages,\n currentPage,\n onPageSelected,\n className,\n ...props\n}: CarouselIndicatorLinesProps) {\n return (\n <div\n className={[styles.indicatorLines, className].filter(Boolean).join(' ')}\n role=\"tablist\"\n aria-label=\"Carousel pages\"\n {...props}\n >\n {Array.from({ length: pages }, (_, i) => (\n <button\n key={i}\n type=\"button\"\n role=\"tab\"\n aria-selected={i === currentPage}\n aria-label={`Page ${i + 1}`}\n className={[styles.line, i === currentPage ? styles.lineActive : null]\n .filter(Boolean)\n .join(' ')}\n onClick={() => onPageSelected?.(i)}\n />\n ))}\n </div>\n );\n}\n\n// ─── Carousel ─────────────────────────────────────────────────────────────────\n\nexport interface CarouselProps extends HTMLAttributes<HTMLDivElement> {\n children?: ReactNode;\n /**\n * Scroll orientation.\n * @default \"horizontal\"\n */\n orientation?: 'horizontal' | 'vertical';\n /**\n * Gap between pages in px.\n * @default 0\n */\n spacing?: number;\n /**\n * Allow infinite looping (wraps around on the last/first page).\n * @default false\n */\n loop?: boolean;\n /** Called whenever the visible page changes. */\n onPageChanged?: (index: number) => void;\n /**\n * Controlled current page index.\n * When omitted the carousel manages page state internally.\n */\n page?: number;\n}\n\n/**\n * Swipeable content carousel.\n *\n * Mirrors `AdwCarousel`. Uses CSS scroll-snapping for smooth, native-feeling\n * page transitions. Supports keyboard navigation (arrow keys) and touch/mouse\n * drag via the browser's native scroll handling.\n *\n * Pair with `CarouselIndicatorDots` or `CarouselIndicatorLines` for pagination UI.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Carousel.html\n */\nexport function Carousel({\n children,\n orientation = 'horizontal',\n spacing = 0,\n loop = false,\n onPageChanged,\n page: controlledPage,\n className,\n ...props\n}: CarouselProps) {\n const scrollRef = useRef<HTMLDivElement>(null);\n const pageCount = Children.count(children);\n const [internalPage, setInternalPage] = useState(0);\n const isControlled = controlledPage !== undefined;\n const currentPage = isControlled ? controlledPage : internalPage;\n\n const scrollToPage = useCallback(\n (index: number, behavior: ScrollBehavior = 'smooth') => {\n const el = scrollRef.current;\n\n if (!el) {\n return;\n }\n\n if (orientation === 'horizontal') {\n el.scrollTo({ left: el.clientWidth * index, behavior });\n } else {\n el.scrollTo({ top: el.clientHeight * index, behavior });\n }\n },\n [orientation],\n );\n\n // Scroll to the controlled page when it changes externally\n useEffect(() => {\n if (!isControlled) {\n return;\n }\n\n scrollToPage(controlledPage, 'smooth');\n }, [controlledPage, scrollToPage, isControlled]);\n\n // Detect page changes via IntersectionObserver on each child\n useEffect(() => {\n const el = scrollRef.current;\n\n if (!el) {\n return;\n }\n\n const handleScroll = () => {\n const pages = Array.from(el.children) as HTMLElement[];\n const size = orientation === 'horizontal' ? el.clientWidth : el.clientHeight;\n const scroll = orientation === 'horizontal' ? el.scrollLeft : el.scrollTop;\n const idx = Math.round(scroll / (size || 1));\n const clamped = Math.max(0, Math.min(idx, pageCount - 1));\n\n if (!isControlled) {\n setInternalPage(clamped);\n }\n\n onPageChanged?.(clamped);\n void pages; // suppress lint\n };\n\n el.addEventListener('scroll', handleScroll, { passive: true });\n\n return () => el.removeEventListener('scroll', handleScroll);\n }, [orientation, pageCount, isControlled, onPageChanged]);\n\n // Keyboard navigation\n const handleKeyDown = useCallback(\n (e: KeyboardEvent) => {\n const isForward =\n orientation === 'horizontal' ? e.key === 'ArrowRight' : e.key === 'ArrowDown';\n const isBack = orientation === 'horizontal' ? e.key === 'ArrowLeft' : e.key === 'ArrowUp';\n\n if (isForward) {\n e.preventDefault();\n const next = loop\n ? (currentPage + 1) % pageCount\n : Math.min(currentPage + 1, pageCount - 1);\n\n scrollToPage(next);\n if (!isControlled) {\n setInternalPage(next);\n }\n\n onPageChanged?.(next);\n } else if (isBack) {\n e.preventDefault();\n const prev = loop\n ? (currentPage - 1 + pageCount) % pageCount\n : Math.max(currentPage - 1, 0);\n\n scrollToPage(prev);\n if (!isControlled) {\n setInternalPage(prev);\n }\n\n onPageChanged?.(prev);\n }\n },\n [currentPage, pageCount, loop, orientation, scrollToPage, isControlled, onPageChanged],\n );\n\n const isHorizontal = orientation === 'horizontal';\n\n return (\n <div\n ref={scrollRef}\n role=\"region\"\n aria-roledescription=\"carousel\"\n className={[styles.carousel, isHorizontal ? styles.horizontal : styles.vertical, className]\n .filter(Boolean)\n .join(' ')}\n style={isHorizontal ? { columnGap: spacing || undefined } : { rowGap: spacing || undefined }}\n onKeyDown={handleKeyDown}\n {...props}\n >\n {Children.map(children, (child, i) => (\n <div\n key={i}\n className={styles.slide}\n role=\"group\"\n aria-roledescription=\"slide\"\n aria-label={`${i + 1} of ${pageCount}`}\n >\n {child}\n </div>\n ))}\n </div>\n );\n}\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"Carousel.js","names":[],"sources":["../../../src/components/Carousel/Carousel.tsx"],"sourcesContent":["import {\n Children,\n type HTMLAttributes,\n type KeyboardEvent,\n type ReactNode,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from 'react';\n\nimport styles from './Carousel.module.css';\n\n// ─── CarouselIndicatorDots ────────────────────────────────────────────────────\n\nexport interface CarouselIndicatorDotsProps extends HTMLAttributes<HTMLDivElement> {\n /** Total number of pages. */\n pages: number;\n /** Zero-based index of the current page. */\n currentPage: number;\n /** Called when the user clicks a dot. */\n onPageSelected?: (index: number) => void;\n}\n\n/**\n * Dot-style page indicator for `Carousel`.\n * Mirrors `AdwCarouselIndicatorDots`.\n */\nexport const CarouselIndicatorDots = ({\n pages,\n currentPage,\n onPageSelected,\n className,\n ...props\n}: CarouselIndicatorDotsProps) => {\n return (\n <div\n className={[styles.indicatorDots, className].filter(Boolean).join(' ')}\n role=\"tablist\"\n aria-label=\"Carousel pages\"\n {...props}\n >\n {Array.from({ length: pages }, (_, i) => (\n <button\n key={i}\n type=\"button\"\n role=\"tab\"\n aria-selected={i === currentPage}\n aria-label={`Page ${i + 1}`}\n className={[styles.dot, i === currentPage ? styles.dotActive : null]\n .filter(Boolean)\n .join(' ')}\n onClick={() => onPageSelected?.(i)}\n />\n ))}\n </div>\n );\n};\n\n// ─── CarouselIndicatorLines ───────────────────────────────────────────────────\n\nexport interface CarouselIndicatorLinesProps extends HTMLAttributes<HTMLDivElement> {\n /** Total number of pages. */\n pages: number;\n /** Zero-based index of the current page. */\n currentPage: number;\n /** Called when the user clicks a line. */\n onPageSelected?: (index: number) => void;\n}\n\n/**\n * Line-style page indicator for `Carousel`.\n * Mirrors `AdwCarouselIndicatorLines`.\n */\nexport const CarouselIndicatorLines = ({\n pages,\n currentPage,\n onPageSelected,\n className,\n ...props\n}: CarouselIndicatorLinesProps) => {\n return (\n <div\n className={[styles.indicatorLines, className].filter(Boolean).join(' ')}\n role=\"tablist\"\n aria-label=\"Carousel pages\"\n {...props}\n >\n {Array.from({ length: pages }, (_, i) => (\n <button\n key={i}\n type=\"button\"\n role=\"tab\"\n aria-selected={i === currentPage}\n aria-label={`Page ${i + 1}`}\n className={[styles.line, i === currentPage ? styles.lineActive : null]\n .filter(Boolean)\n .join(' ')}\n onClick={() => onPageSelected?.(i)}\n />\n ))}\n </div>\n );\n};\n\n// ─── Carousel ─────────────────────────────────────────────────────────────────\n\nexport interface CarouselProps extends HTMLAttributes<HTMLDivElement> {\n children?: ReactNode;\n /**\n * Scroll orientation.\n * @default \"horizontal\"\n */\n orientation?: 'horizontal' | 'vertical';\n /**\n * Gap between pages in px.\n * @default 0\n */\n spacing?: number;\n /**\n * Allow infinite looping (wraps around on the last/first page).\n * @default false\n */\n loop?: boolean;\n /** Called whenever the visible page changes. */\n onPageChanged?: (index: number) => void;\n /**\n * Controlled current page index.\n * When omitted the carousel manages page state internally.\n */\n page?: number;\n}\n\n/**\n * Swipeable content carousel.\n *\n * Mirrors `AdwCarousel`. Uses CSS scroll-snapping for smooth, native-feeling\n * page transitions. Supports keyboard navigation (arrow keys) and touch/mouse\n * drag via the browser's native scroll handling.\n *\n * Pair with `CarouselIndicatorDots` or `CarouselIndicatorLines` for pagination UI.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Carousel.html\n */\nexport const Carousel = ({\n children,\n orientation = 'horizontal',\n spacing = 0,\n loop = false,\n onPageChanged,\n page: controlledPage,\n className,\n ...props\n}: CarouselProps) => {\n const scrollRef = useRef<HTMLDivElement>(null);\n const pageCount = Children.count(children);\n const [internalPage, setInternalPage] = useState(0);\n const isControlled = controlledPage !== undefined;\n const currentPage = isControlled ? controlledPage : internalPage;\n\n const scrollToPage = useCallback(\n (index: number, behavior: ScrollBehavior = 'smooth') => {\n const el = scrollRef.current;\n\n if (!el) {\n return;\n }\n\n if (orientation === 'horizontal') {\n el.scrollTo({ left: el.clientWidth * index, behavior });\n } else {\n el.scrollTo({ top: el.clientHeight * index, behavior });\n }\n },\n [orientation],\n );\n\n // Scroll to the controlled page when it changes externally\n useEffect(() => {\n if (!isControlled) {\n return;\n }\n\n scrollToPage(controlledPage, 'smooth');\n }, [controlledPage, scrollToPage, isControlled]);\n\n // Detect page changes via IntersectionObserver on each child\n useEffect(() => {\n const el = scrollRef.current;\n\n if (!el) {\n return;\n }\n\n const handleScroll = () => {\n const pages = Array.from(el.children) as HTMLElement[];\n const size = orientation === 'horizontal' ? el.clientWidth : el.clientHeight;\n const scroll = orientation === 'horizontal' ? el.scrollLeft : el.scrollTop;\n const idx = Math.round(scroll / (size || 1));\n const clamped = Math.max(0, Math.min(idx, pageCount - 1));\n\n if (!isControlled) {\n setInternalPage(clamped);\n }\n\n onPageChanged?.(clamped);\n void pages; // suppress lint\n };\n\n el.addEventListener('scroll', handleScroll, { passive: true });\n\n return () => el.removeEventListener('scroll', handleScroll);\n }, [orientation, pageCount, isControlled, onPageChanged]);\n\n // Keyboard navigation\n const handleKeyDown = useCallback(\n (e: KeyboardEvent) => {\n const isForward =\n orientation === 'horizontal' ? e.key === 'ArrowRight' : e.key === 'ArrowDown';\n const isBack = orientation === 'horizontal' ? e.key === 'ArrowLeft' : e.key === 'ArrowUp';\n\n if (isForward) {\n e.preventDefault();\n const next = loop\n ? (currentPage + 1) % pageCount\n : Math.min(currentPage + 1, pageCount - 1);\n\n scrollToPage(next);\n if (!isControlled) {\n setInternalPage(next);\n }\n\n onPageChanged?.(next);\n } else if (isBack) {\n e.preventDefault();\n const prev = loop\n ? (currentPage - 1 + pageCount) % pageCount\n : Math.max(currentPage - 1, 0);\n\n scrollToPage(prev);\n if (!isControlled) {\n setInternalPage(prev);\n }\n\n onPageChanged?.(prev);\n }\n },\n [currentPage, pageCount, loop, orientation, scrollToPage, isControlled, onPageChanged],\n );\n\n const isHorizontal = orientation === 'horizontal';\n\n return (\n <div\n ref={scrollRef}\n role=\"region\"\n aria-roledescription=\"carousel\"\n className={[styles.carousel, isHorizontal ? styles.horizontal : styles.vertical, className]\n .filter(Boolean)\n .join(' ')}\n style={isHorizontal ? { columnGap: spacing || undefined } : { rowGap: spacing || undefined }}\n onKeyDown={handleKeyDown}\n {...props}\n >\n {Children.map(children, (child, i) => (\n <div\n key={i}\n className={styles.slide}\n role=\"group\"\n aria-roledescription=\"slide\"\n aria-label={`${i + 1} of ${pageCount}`}\n >\n {child}\n </div>\n ))}\n </div>\n );\n};\n"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./Carousel/Carousel.cjs");exports.Carousel=e.Carousel,exports.CarouselIndicatorDots=e.CarouselIndicatorDots,exports.CarouselIndicatorLines=e.CarouselIndicatorLines;
|