@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,2 +1,2 @@
|
|
|
1
|
-
const e=require(
|
|
1
|
+
const e=require("./Avatar.module.css.cjs");let t=require("react/jsx-runtime");var n=[`blue`,`green`,`yellow`,`orange`,`red`,`purple`,`brown`,`teal`,`slate`];function r(e){let t=0;for(let n=0;n<e.length;n++)t=t*31+e.charCodeAt(n)>>>0;return n[t%n.length]}function i(e){let t=e.trim().split(/\s+/).filter(Boolean);return t.length===0?``:t.length===1?t[0].charAt(0).toUpperCase():t[0].charAt(0).toUpperCase()+t[t.length-1].charAt(0).toUpperCase()}var a=({name:n=``,src:a,alt:o,size:s=`md`,color:c,className:l,...u})=>{let d=c??(n?r(n):`blue`),f=i(n),p=[e.default.avatar,e.default[s],a?null:e.default[`color-${d}`],l].filter(Boolean).join(` `);return(0,t.jsx)(`span`,{role:`img`,"aria-label":o??n??`Avatar`,className:p,...u,children:a?(0,t.jsx)(`img`,{src:a,alt:o??n,className:e.default.image}):(0,t.jsx)(`span`,{"aria-hidden":`true`,className:e.default.initials,children:f})})};exports.Avatar=a;
|
|
2
2
|
//# sourceMappingURL=Avatar.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.cjs","names":[],"sources":["../../../src/components/Avatar/Avatar.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react';\n\nimport styles from './Avatar.module.css';\n\nexport type AvatarSize = 'sm' | 'md' | 'lg' | 'xl';\n\n/**\n * Named color palette for the initials fallback.\n * Mirrors libadwaita's avatar color set.\n */\nexport type AvatarColor =\n | 'blue'\n | 'green'\n | 'yellow'\n | 'orange'\n | 'red'\n | 'purple'\n | 'brown'\n | 'teal'\n | 'slate';\n\nexport interface AvatarProps extends HTMLAttributes<HTMLSpanElement> {\n /**\n * Full name used to generate initials and — when `color` is omitted —\n * to deterministically pick a background color.\n */\n name?: string;\n /** Image URL. When provided the initials fallback is hidden. */\n src?: string;\n /** Alt text for the image. Defaults to `name`. */\n alt?: string;\n /** Size of the avatar. Defaults to `\"md\"`. */\n size?: AvatarSize;\n /**\n * Override the auto-derived background color for the initials fallback.\n * When omitted a color is derived from `name` via a stable hash.\n */\n color?: AvatarColor;\n}\n\nconst COLOR_LIST: AvatarColor[] = [\n 'blue',\n 'green',\n 'yellow',\n 'orange',\n 'red',\n 'purple',\n 'brown',\n 'teal',\n 'slate',\n];\n\n/** Stable, non-cryptographic hash → index into COLOR_LIST. */\nfunction nameToColor(name: string): AvatarColor {\n let hash = 0;\n for (let i = 0; i < name.length; i++) {\n hash = (hash * 31 + name.charCodeAt(i)) >>> 0;\n }\n\n return COLOR_LIST[hash % COLOR_LIST.length];\n}\n\n/** Extract up to 2 initials from a name string. */\nfunction getInitials(name: string): string {\n const parts = name.trim().split(/\\s+/).filter(Boolean);\n\n if (parts.length === 0) {\n return '';\n }\n\n if (parts.length === 1) {\n return parts[0].charAt(0).toUpperCase();\n }\n\n return parts[0].charAt(0).toUpperCase() + parts[parts.length - 1].charAt(0).toUpperCase();\n}\n\n/**\n * Circular avatar with image or initials fallback.\n *\n * Follows the Adwaita `AdwAvatar` pattern — deterministic color from name,\n * up to two initials when no image is supplied.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Avatar.html\n */\nexport
|
|
1
|
+
{"version":3,"file":"Avatar.cjs","names":[],"sources":["../../../src/components/Avatar/Avatar.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react';\n\nimport styles from './Avatar.module.css';\n\nexport type AvatarSize = 'sm' | 'md' | 'lg' | 'xl';\n\n/**\n * Named color palette for the initials fallback.\n * Mirrors libadwaita's avatar color set.\n */\nexport type AvatarColor =\n | 'blue'\n | 'green'\n | 'yellow'\n | 'orange'\n | 'red'\n | 'purple'\n | 'brown'\n | 'teal'\n | 'slate';\n\nexport interface AvatarProps extends HTMLAttributes<HTMLSpanElement> {\n /**\n * Full name used to generate initials and — when `color` is omitted —\n * to deterministically pick a background color.\n */\n name?: string;\n /** Image URL. When provided the initials fallback is hidden. */\n src?: string;\n /** Alt text for the image. Defaults to `name`. */\n alt?: string;\n /** Size of the avatar. Defaults to `\"md\"`. */\n size?: AvatarSize;\n /**\n * Override the auto-derived background color for the initials fallback.\n * When omitted a color is derived from `name` via a stable hash.\n */\n color?: AvatarColor;\n}\n\nconst COLOR_LIST: AvatarColor[] = [\n 'blue',\n 'green',\n 'yellow',\n 'orange',\n 'red',\n 'purple',\n 'brown',\n 'teal',\n 'slate',\n];\n\n/** Stable, non-cryptographic hash → index into COLOR_LIST. */\nfunction nameToColor(name: string): AvatarColor {\n let hash = 0;\n for (let i = 0; i < name.length; i++) {\n hash = (hash * 31 + name.charCodeAt(i)) >>> 0;\n }\n\n return COLOR_LIST[hash % COLOR_LIST.length];\n}\n\n/** Extract up to 2 initials from a name string. */\nfunction getInitials(name: string): string {\n const parts = name.trim().split(/\\s+/).filter(Boolean);\n\n if (parts.length === 0) {\n return '';\n }\n\n if (parts.length === 1) {\n return parts[0].charAt(0).toUpperCase();\n }\n\n return parts[0].charAt(0).toUpperCase() + parts[parts.length - 1].charAt(0).toUpperCase();\n}\n\n/**\n * Circular avatar with image or initials fallback.\n *\n * Follows the Adwaita `AdwAvatar` pattern — deterministic color from name,\n * up to two initials when no image is supplied.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Avatar.html\n */\nexport const Avatar = ({\n name = '',\n src,\n alt,\n size = 'md',\n color,\n className,\n ...props\n}: AvatarProps) => {\n const resolvedColor = color ?? (name ? nameToColor(name) : 'blue');\n const initials = getInitials(name);\n\n const classes = [\n styles.avatar,\n styles[size],\n !src ? styles[`color-${resolvedColor}`] : null,\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <span role=\"img\" aria-label={alt ?? name ?? 'Avatar'} className={classes} {...props}>\n {src ? (\n <img src={src} alt={alt ?? name} className={styles.image} />\n ) : (\n <span aria-hidden=\"true\" className={styles.initials}>\n {initials}\n </span>\n )}\n </span>\n );\n};\n"],"mappings":"8EAwCA,IAAM,EAA4B,CAChC,OACA,QACA,SACA,SACA,MACA,SACA,QACA,OACA,OACF,EAGA,SAAS,EAAY,EAA2B,CAC9C,IAAI,EAAO,EACX,IAAK,IAAI,EAAI,EAAG,EAAI,EAAK,OAAQ,IAC/B,EAAQ,EAAO,GAAK,EAAK,WAAW,CAAC,IAAO,EAG9C,OAAO,EAAW,EAAO,EAAW,OACtC,CAGA,SAAS,EAAY,EAAsB,CACzC,IAAM,EAAQ,EAAK,KAAK,EAAE,MAAM,KAAK,EAAE,OAAO,OAAO,EAUrD,OARI,EAAM,SAAW,EACZ,GAGL,EAAM,SAAW,EACZ,EAAM,GAAG,OAAO,CAAC,EAAE,YAAY,EAGjC,EAAM,GAAG,OAAO,CAAC,EAAE,YAAY,EAAI,EAAM,EAAM,OAAS,GAAG,OAAO,CAAC,EAAE,YAAY,CAC1F,CAUA,IAAa,GAAU,CACrB,OAAO,GACP,MACA,MACA,OAAO,KACP,QACA,YACA,GAAG,KACc,CACjB,IAAM,EAAgB,IAAU,EAAO,EAAY,CAAI,EAAI,QACrD,EAAW,EAAY,CAAI,EAE3B,EAAU,CACd,EAAA,QAAO,OACP,EAAA,QAAO,GACN,EAAyC,KAAnC,EAAA,QAAO,SAAS,KACvB,CACF,EACG,OAAO,OAAO,EACd,KAAK,GAAG,EAEX,OACE,EAAA,EAAA,KAAC,OAAD,CAAM,KAAK,MAAM,aAAY,GAAO,GAAQ,SAAU,UAAW,EAAS,GAAI,WAC3E,GACC,EAAA,EAAA,KAAC,MAAD,CAAU,MAAK,IAAK,GAAO,EAAM,UAAW,EAAA,QAAO,KAAQ,CAAA,GAE3D,EAAA,EAAA,KAAC,OAAD,CAAM,cAAY,OAAO,UAAW,EAAA,QAAO,kBACxC,CACG,CAAA,CAEJ,CAAA,CAEV"}
|
|
@@ -31,4 +31,4 @@ export interface AvatarProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
31
31
|
*
|
|
32
32
|
* @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Avatar.html
|
|
33
33
|
*/
|
|
34
|
-
export declare
|
|
34
|
+
export declare const Avatar: ({ name, src, alt, size, color, className, ...props }: AvatarProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -21,7 +21,7 @@ function i(e) {
|
|
|
21
21
|
let t = e.trim().split(/\s+/).filter(Boolean);
|
|
22
22
|
return t.length === 0 ? "" : t.length === 1 ? t[0].charAt(0).toUpperCase() : t[0].charAt(0).toUpperCase() + t[t.length - 1].charAt(0).toUpperCase();
|
|
23
23
|
}
|
|
24
|
-
|
|
24
|
+
var a = ({ name: n = "", src: a, alt: o, size: s = "md", color: c, className: l, ...u }) => {
|
|
25
25
|
let d = c ?? (n ? r(n) : "blue"), f = i(n), p = [
|
|
26
26
|
e.avatar,
|
|
27
27
|
e[s],
|
|
@@ -43,7 +43,7 @@ function a({ name: n = "", src: a, alt: o, size: s = "md", color: c, className:
|
|
|
43
43
|
children: f
|
|
44
44
|
})
|
|
45
45
|
});
|
|
46
|
-
}
|
|
46
|
+
};
|
|
47
47
|
//#endregion
|
|
48
48
|
export { a as Avatar };
|
|
49
49
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.js","names":[],"sources":["../../../src/components/Avatar/Avatar.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react';\n\nimport styles from './Avatar.module.css';\n\nexport type AvatarSize = 'sm' | 'md' | 'lg' | 'xl';\n\n/**\n * Named color palette for the initials fallback.\n * Mirrors libadwaita's avatar color set.\n */\nexport type AvatarColor =\n | 'blue'\n | 'green'\n | 'yellow'\n | 'orange'\n | 'red'\n | 'purple'\n | 'brown'\n | 'teal'\n | 'slate';\n\nexport interface AvatarProps extends HTMLAttributes<HTMLSpanElement> {\n /**\n * Full name used to generate initials and — when `color` is omitted —\n * to deterministically pick a background color.\n */\n name?: string;\n /** Image URL. When provided the initials fallback is hidden. */\n src?: string;\n /** Alt text for the image. Defaults to `name`. */\n alt?: string;\n /** Size of the avatar. Defaults to `\"md\"`. */\n size?: AvatarSize;\n /**\n * Override the auto-derived background color for the initials fallback.\n * When omitted a color is derived from `name` via a stable hash.\n */\n color?: AvatarColor;\n}\n\nconst COLOR_LIST: AvatarColor[] = [\n 'blue',\n 'green',\n 'yellow',\n 'orange',\n 'red',\n 'purple',\n 'brown',\n 'teal',\n 'slate',\n];\n\n/** Stable, non-cryptographic hash → index into COLOR_LIST. */\nfunction nameToColor(name: string): AvatarColor {\n let hash = 0;\n for (let i = 0; i < name.length; i++) {\n hash = (hash * 31 + name.charCodeAt(i)) >>> 0;\n }\n\n return COLOR_LIST[hash % COLOR_LIST.length];\n}\n\n/** Extract up to 2 initials from a name string. */\nfunction getInitials(name: string): string {\n const parts = name.trim().split(/\\s+/).filter(Boolean);\n\n if (parts.length === 0) {\n return '';\n }\n\n if (parts.length === 1) {\n return parts[0].charAt(0).toUpperCase();\n }\n\n return parts[0].charAt(0).toUpperCase() + parts[parts.length - 1].charAt(0).toUpperCase();\n}\n\n/**\n * Circular avatar with image or initials fallback.\n *\n * Follows the Adwaita `AdwAvatar` pattern — deterministic color from name,\n * up to two initials when no image is supplied.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Avatar.html\n */\nexport
|
|
1
|
+
{"version":3,"file":"Avatar.js","names":[],"sources":["../../../src/components/Avatar/Avatar.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react';\n\nimport styles from './Avatar.module.css';\n\nexport type AvatarSize = 'sm' | 'md' | 'lg' | 'xl';\n\n/**\n * Named color palette for the initials fallback.\n * Mirrors libadwaita's avatar color set.\n */\nexport type AvatarColor =\n | 'blue'\n | 'green'\n | 'yellow'\n | 'orange'\n | 'red'\n | 'purple'\n | 'brown'\n | 'teal'\n | 'slate';\n\nexport interface AvatarProps extends HTMLAttributes<HTMLSpanElement> {\n /**\n * Full name used to generate initials and — when `color` is omitted —\n * to deterministically pick a background color.\n */\n name?: string;\n /** Image URL. When provided the initials fallback is hidden. */\n src?: string;\n /** Alt text for the image. Defaults to `name`. */\n alt?: string;\n /** Size of the avatar. Defaults to `\"md\"`. */\n size?: AvatarSize;\n /**\n * Override the auto-derived background color for the initials fallback.\n * When omitted a color is derived from `name` via a stable hash.\n */\n color?: AvatarColor;\n}\n\nconst COLOR_LIST: AvatarColor[] = [\n 'blue',\n 'green',\n 'yellow',\n 'orange',\n 'red',\n 'purple',\n 'brown',\n 'teal',\n 'slate',\n];\n\n/** Stable, non-cryptographic hash → index into COLOR_LIST. */\nfunction nameToColor(name: string): AvatarColor {\n let hash = 0;\n for (let i = 0; i < name.length; i++) {\n hash = (hash * 31 + name.charCodeAt(i)) >>> 0;\n }\n\n return COLOR_LIST[hash % COLOR_LIST.length];\n}\n\n/** Extract up to 2 initials from a name string. */\nfunction getInitials(name: string): string {\n const parts = name.trim().split(/\\s+/).filter(Boolean);\n\n if (parts.length === 0) {\n return '';\n }\n\n if (parts.length === 1) {\n return parts[0].charAt(0).toUpperCase();\n }\n\n return parts[0].charAt(0).toUpperCase() + parts[parts.length - 1].charAt(0).toUpperCase();\n}\n\n/**\n * Circular avatar with image or initials fallback.\n *\n * Follows the Adwaita `AdwAvatar` pattern — deterministic color from name,\n * up to two initials when no image is supplied.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Avatar.html\n */\nexport const Avatar = ({\n name = '',\n src,\n alt,\n size = 'md',\n color,\n className,\n ...props\n}: AvatarProps) => {\n const resolvedColor = color ?? (name ? nameToColor(name) : 'blue');\n const initials = getInitials(name);\n\n const classes = [\n styles.avatar,\n styles[size],\n !src ? styles[`color-${resolvedColor}`] : null,\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <span role=\"img\" aria-label={alt ?? name ?? 'Avatar'} className={classes} {...props}>\n {src ? (\n <img src={src} alt={alt ?? name} className={styles.image} />\n ) : (\n <span aria-hidden=\"true\" className={styles.initials}>\n {initials}\n </span>\n )}\n </span>\n );\n};\n"],"mappings":";;;AAwCA,IAAM,IAA4B;CAChC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAGA,SAAS,EAAY,GAA2B;CAC9C,IAAI,IAAO;CACX,KAAK,IAAI,IAAI,GAAG,IAAI,EAAK,QAAQ,KAC/B,IAAQ,IAAO,KAAK,EAAK,WAAW,CAAC,MAAO;CAG9C,OAAO,EAAW,IAAO,EAAW;AACtC;AAGA,SAAS,EAAY,GAAsB;CACzC,IAAM,IAAQ,EAAK,KAAK,EAAE,MAAM,KAAK,EAAE,OAAO,OAAO;CAUrD,OARI,EAAM,WAAW,IACZ,KAGL,EAAM,WAAW,IACZ,EAAM,GAAG,OAAO,CAAC,EAAE,YAAY,IAGjC,EAAM,GAAG,OAAO,CAAC,EAAE,YAAY,IAAI,EAAM,EAAM,SAAS,GAAG,OAAO,CAAC,EAAE,YAAY;AAC1F;AAUA,IAAa,KAAU,EACrB,UAAO,IACP,QACA,QACA,UAAO,MACP,UACA,cACA,GAAG,QACc;CACjB,IAAM,IAAgB,MAAU,IAAO,EAAY,CAAI,IAAI,SACrD,IAAW,EAAY,CAAI,GAE3B,IAAU;EACd,EAAO;EACP,EAAO;EACN,IAAyC,OAAnC,EAAO,SAAS;EACvB;CACF,EACG,OAAO,OAAO,EACd,KAAK,GAAG;CAEX,OACE,kBAAC,QAAD;EAAM,MAAK;EAAM,cAAY,KAAO,KAAQ;EAAU,WAAW;EAAS,GAAI;YAC3E,IACC,kBAAC,OAAD;GAAU;GAAK,KAAK,KAAO;GAAM,WAAW,EAAO;EAAQ,CAAA,IAE3D,kBAAC,QAAD;GAAM,eAAY;GAAO,WAAW,EAAO;aACxC;EACG,CAAA;CAEJ,CAAA;AAEV"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./Avatar/Avatar.cjs");exports.Avatar=e.Avatar;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(
|
|
1
|
+
const e=require("../Avatar/Avatar.cjs"),t=require("./AvatarRotator.module.css.cjs");let n=require("react"),r=require("react/jsx-runtime");function i(e,t){return t<=0?0:(e%t+t)%t}function a(){let[e,t]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{if(typeof window>`u`||!window.matchMedia)return;let e=window.matchMedia(`(prefers-reduced-motion: reduce)`);t(e.matches);let n=()=>t(e.matches);return e.addEventListener?.(`change`,n),()=>e.removeEventListener?.(`change`,n)},[]),e}var o=({name:o=``,avatars:s=[],alt:c,size:l=`md`,color:u,interval:d=3e3,transitionDuration:f=240,pauseOnHover:p=!0,activeIndex:m,defaultActiveIndex:h=0,onIndexChange:g,className:_,style:v,onMouseEnter:y,onMouseLeave:b,onFocus:x,onBlur:S,...C})=>{let w=(0,n.useMemo)(()=>s.map(e=>e.trim()).filter(Boolean),[s]),T=m!==void 0,[E,D]=(0,n.useState)(h),[O,k]=(0,n.useState)(!1),A=a(),j=i(T?m:E,w.length);if((0,n.useEffect)(()=>{if(w.length<=1||d<=0||O||A)return;let e=window.setInterval(()=>{let e=i(j+1,w.length);T||D(e),g?.(e)},d);return()=>window.clearInterval(e)},[j,d,T,O,g,A,w.length]),w.length===0)return(0,r.jsx)(e.Avatar,{name:o,alt:c,size:l,color:u,className:_,style:v,...C});let M=c??o??`Avatar`,N={...v,"--avatar-rotator-duration":`${Math.max(0,f)}ms`};return(0,r.jsx)(`span`,{role:`img`,"aria-label":M,className:[t.default.rotator,t.default[l],_].filter(Boolean).join(` `),style:N,onMouseEnter:e=>{p&&k(!0),y?.(e)},onMouseLeave:e=>{p&&k(!1),b?.(e)},onFocus:e=>{p&&k(!0),x?.(e)},onBlur:e=>{p&&k(!1),S?.(e)},...C,children:w.map((n,i)=>(0,r.jsx)(e.Avatar,{name:o,src:n,alt:``,size:l,"aria-hidden":`true`,className:[t.default.layer,i===j?t.default.active:null].filter(Boolean).join(` `)},`${n}-${i}`))})};exports.AvatarRotator=o;
|
|
2
2
|
//# sourceMappingURL=AvatarRotator.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AvatarRotator.cjs","names":[],"sources":["../../../src/components/AvatarRotator/AvatarRotator.tsx"],"sourcesContent":["import { type CSSProperties, type HTMLAttributes, useEffect, useMemo, useState } from 'react';\n\nimport { Avatar, type AvatarColor, type AvatarSize } from '../Avatar';\n\nimport styles from './AvatarRotator.module.css';\n\nexport interface AvatarRotatorProps extends HTMLAttributes<HTMLSpanElement> {\n /** Full name used for the accessible label and initials fallback. */\n name?: string;\n /** Image URLs to rotate through. */\n avatars?: string[];\n /** Accessible label. Defaults to `name`. */\n alt?: string;\n /** Size of the avatar. Defaults to `\"md\"`. */\n size?: AvatarSize;\n /** Fallback initials color when no avatar image is available. */\n color?: AvatarColor;\n /** Time between avatar changes in milliseconds. Defaults to `3000`. */\n interval?: number;\n /** Crossfade duration in milliseconds. Defaults to `240`. */\n transitionDuration?: number;\n /** Pause automatic rotation while hovered or focused. Defaults to `true`. */\n pauseOnHover?: boolean;\n /**\n * Controlled active avatar index.\n * When omitted the rotator manages index state internally.\n */\n activeIndex?: number;\n /** Initial active avatar index for uncontrolled usage. Defaults to `0`. */\n defaultActiveIndex?: number;\n /** Called when the active avatar changes. */\n onIndexChange?: (index: number) => void;\n}\n\nfunction clampIndex(index: number, length: number) {\n if (length <= 0) {\n return 0;\n }\n\n return ((index % length) + length) % length;\n}\n\nfunction usePrefersReducedMotion() {\n const [prefersReducedMotion, setPrefersReducedMotion] = useState(false);\n\n useEffect(() => {\n if (typeof window === 'undefined' || !window.matchMedia) {\n return;\n }\n\n const query = window.matchMedia('(prefers-reduced-motion: reduce)');\n\n setPrefersReducedMotion(query.matches);\n\n const handleChange = () => setPrefersReducedMotion(query.matches);\n\n query.addEventListener?.('change', handleChange);\n\n return () => query.removeEventListener?.('change', handleChange);\n }, []);\n\n return prefersReducedMotion;\n}\n\n/**\n * Single avatar surface that rotates through multiple image sources.\n *\n * Keeps `Avatar` focused on rendering one identity, while this component owns\n * timing, crossfade animation, and pause behavior.\n */\nexport
|
|
1
|
+
{"version":3,"file":"AvatarRotator.cjs","names":[],"sources":["../../../src/components/AvatarRotator/AvatarRotator.tsx"],"sourcesContent":["import { type CSSProperties, type HTMLAttributes, useEffect, useMemo, useState } from 'react';\n\nimport { Avatar, type AvatarColor, type AvatarSize } from '../Avatar';\n\nimport styles from './AvatarRotator.module.css';\n\nexport interface AvatarRotatorProps extends HTMLAttributes<HTMLSpanElement> {\n /** Full name used for the accessible label and initials fallback. */\n name?: string;\n /** Image URLs to rotate through. */\n avatars?: string[];\n /** Accessible label. Defaults to `name`. */\n alt?: string;\n /** Size of the avatar. Defaults to `\"md\"`. */\n size?: AvatarSize;\n /** Fallback initials color when no avatar image is available. */\n color?: AvatarColor;\n /** Time between avatar changes in milliseconds. Defaults to `3000`. */\n interval?: number;\n /** Crossfade duration in milliseconds. Defaults to `240`. */\n transitionDuration?: number;\n /** Pause automatic rotation while hovered or focused. Defaults to `true`. */\n pauseOnHover?: boolean;\n /**\n * Controlled active avatar index.\n * When omitted the rotator manages index state internally.\n */\n activeIndex?: number;\n /** Initial active avatar index for uncontrolled usage. Defaults to `0`. */\n defaultActiveIndex?: number;\n /** Called when the active avatar changes. */\n onIndexChange?: (index: number) => void;\n}\n\nfunction clampIndex(index: number, length: number) {\n if (length <= 0) {\n return 0;\n }\n\n return ((index % length) + length) % length;\n}\n\nfunction usePrefersReducedMotion() {\n const [prefersReducedMotion, setPrefersReducedMotion] = useState(false);\n\n useEffect(() => {\n if (typeof window === 'undefined' || !window.matchMedia) {\n return;\n }\n\n const query = window.matchMedia('(prefers-reduced-motion: reduce)');\n\n setPrefersReducedMotion(query.matches);\n\n const handleChange = () => setPrefersReducedMotion(query.matches);\n\n query.addEventListener?.('change', handleChange);\n\n return () => query.removeEventListener?.('change', handleChange);\n }, []);\n\n return prefersReducedMotion;\n}\n\n/**\n * Single avatar surface that rotates through multiple image sources.\n *\n * Keeps `Avatar` focused on rendering one identity, while this component owns\n * timing, crossfade animation, and pause behavior.\n */\nexport const AvatarRotator = ({\n name = '',\n avatars = [],\n alt,\n size = 'md',\n color,\n interval = 3000,\n transitionDuration = 240,\n pauseOnHover = true,\n activeIndex,\n defaultActiveIndex = 0,\n onIndexChange,\n className,\n style,\n onMouseEnter,\n onMouseLeave,\n onFocus,\n onBlur,\n ...props\n}: AvatarRotatorProps) => {\n const sources = useMemo(() => avatars.map((src) => src.trim()).filter(Boolean), [avatars]);\n const isControlled = activeIndex !== undefined;\n const [internalIndex, setInternalIndex] = useState(defaultActiveIndex);\n const [isPaused, setIsPaused] = useState(false);\n const prefersReducedMotion = usePrefersReducedMotion();\n const currentIndex = clampIndex(isControlled ? activeIndex : internalIndex, sources.length);\n\n useEffect(() => {\n if (sources.length <= 1) {\n return;\n }\n\n if (interval <= 0) {\n return;\n }\n\n if (isPaused || prefersReducedMotion) {\n return;\n }\n\n const timer = window.setInterval(() => {\n const nextIndex = clampIndex(currentIndex + 1, sources.length);\n\n if (!isControlled) {\n setInternalIndex(nextIndex);\n }\n\n onIndexChange?.(nextIndex);\n }, interval);\n\n return () => window.clearInterval(timer);\n }, [\n currentIndex,\n interval,\n isControlled,\n isPaused,\n onIndexChange,\n prefersReducedMotion,\n sources.length,\n ]);\n\n if (sources.length === 0) {\n return (\n <Avatar\n name={name}\n alt={alt}\n size={size}\n color={color}\n className={className}\n style={style}\n {...props}\n />\n );\n }\n\n const label = alt ?? name ?? 'Avatar';\n const transitionStyle = {\n ...style,\n '--avatar-rotator-duration': `${Math.max(0, transitionDuration)}ms`,\n } as CSSProperties;\n\n return (\n <span\n role=\"img\"\n aria-label={label}\n className={[styles.rotator, styles[size], className].filter(Boolean).join(' ')}\n style={transitionStyle}\n onMouseEnter={(event) => {\n if (pauseOnHover) {\n setIsPaused(true);\n }\n\n onMouseEnter?.(event);\n }}\n onMouseLeave={(event) => {\n if (pauseOnHover) {\n setIsPaused(false);\n }\n\n onMouseLeave?.(event);\n }}\n onFocus={(event) => {\n if (pauseOnHover) {\n setIsPaused(true);\n }\n\n onFocus?.(event);\n }}\n onBlur={(event) => {\n if (pauseOnHover) {\n setIsPaused(false);\n }\n\n onBlur?.(event);\n }}\n {...props}\n >\n {sources.map((src, index) => (\n <Avatar\n key={`${src}-${index}`}\n name={name}\n src={src}\n alt=\"\"\n size={size}\n aria-hidden=\"true\"\n className={[styles.layer, index === currentIndex ? styles.active : null]\n .filter(Boolean)\n .join(' ')}\n />\n ))}\n </span>\n );\n};\n"],"mappings":"0IAkCA,SAAS,EAAW,EAAe,EAAgB,CAKjD,OAJI,GAAU,EACL,GAGA,EAAQ,EAAU,GAAU,CACvC,CAEA,SAAS,GAA0B,CACjC,GAAM,CAAC,EAAsB,IAAA,EAAA,EAAA,UAAoC,EAAK,EAkBtE,OAhBA,EAAA,EAAA,eAAgB,CACd,GAAI,OAAO,OAAW,KAAe,CAAC,OAAO,WAC3C,OAGF,IAAM,EAAQ,OAAO,WAAW,kCAAkC,EAElE,EAAwB,EAAM,OAAO,EAErC,IAAM,MAAqB,EAAwB,EAAM,OAAO,EAIhE,OAFA,EAAM,mBAAmB,SAAU,CAAY,MAElC,EAAM,sBAAsB,SAAU,CAAY,CACjE,EAAG,CAAC,CAAC,EAEE,CACT,CAQA,IAAa,GAAiB,CAC5B,OAAO,GACP,UAAU,CAAC,EACX,MACA,OAAO,KACP,QACA,WAAW,IACX,qBAAqB,IACrB,eAAe,GACf,cACA,qBAAqB,EACrB,gBACA,YACA,QACA,eACA,eACA,UACA,SACA,GAAG,KACqB,CACxB,IAAM,GAAA,EAAA,EAAA,aAAwB,EAAQ,IAAK,GAAQ,EAAI,KAAK,CAAC,EAAE,OAAO,OAAO,EAAG,CAAC,CAAO,CAAC,EACnF,EAAe,IAAgB,IAAA,GAC/B,CAAC,EAAe,IAAA,EAAA,EAAA,UAA6B,CAAkB,EAC/D,CAAC,EAAU,IAAA,EAAA,EAAA,UAAwB,EAAK,EACxC,EAAuB,EAAwB,EAC/C,EAAe,EAAW,EAAe,EAAc,EAAe,EAAQ,MAAM,EAoC1F,IAlCA,EAAA,EAAA,eAAgB,CASd,GARI,EAAQ,QAAU,GAIlB,GAAY,GAIZ,GAAY,EACd,OAGF,IAAM,EAAQ,OAAO,gBAAkB,CACrC,IAAM,EAAY,EAAW,EAAe,EAAG,EAAQ,MAAM,EAExD,GACH,EAAiB,CAAS,EAG5B,IAAgB,CAAS,CAC3B,EAAG,CAAQ,EAEX,UAAa,OAAO,cAAc,CAAK,CACzC,EAAG,CACD,EACA,EACA,EACA,EACA,EACA,EACA,EAAQ,MACV,CAAC,EAEG,EAAQ,SAAW,EACrB,OACE,EAAA,EAAA,KAAC,EAAA,OAAD,CACQ,OACD,MACC,OACC,QACI,YACJ,QACP,GAAI,CACL,CAAA,EAIL,IAAM,EAAQ,GAAO,GAAQ,SACvB,EAAkB,CACtB,GAAG,EACH,4BAA6B,GAAG,KAAK,IAAI,EAAG,CAAkB,EAAE,GAClE,EAEA,OACE,EAAA,EAAA,KAAC,OAAD,CACE,KAAK,MACL,aAAY,EACZ,UAAW,CAAC,EAAA,QAAO,QAAS,EAAA,QAAO,GAAO,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,EAC7E,MAAO,EACP,aAAe,GAAU,CACnB,GACF,EAAY,EAAI,EAGlB,IAAe,CAAK,CACtB,EACA,aAAe,GAAU,CACnB,GACF,EAAY,EAAK,EAGnB,IAAe,CAAK,CACtB,EACA,QAAU,GAAU,CACd,GACF,EAAY,EAAI,EAGlB,IAAU,CAAK,CACjB,EACA,OAAS,GAAU,CACb,GACF,EAAY,EAAK,EAGnB,IAAS,CAAK,CAChB,EACA,GAAI,WAEH,EAAQ,KAAK,EAAK,KACjB,EAAA,EAAA,KAAC,EAAA,OAAD,CAEQ,OACD,MACL,IAAI,GACE,OACN,cAAY,OACZ,UAAW,CAAC,EAAA,QAAO,MAAO,IAAU,EAAe,EAAA,QAAO,OAAS,IAAI,EACpE,OAAO,OAAO,EACd,KAAK,GAAG,CACZ,EATM,GAAG,EAAI,GAAG,GAShB,CACF,CACG,CAAA,CAEV"}
|
|
@@ -33,4 +33,4 @@ export interface AvatarRotatorProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
33
33
|
* Keeps `Avatar` focused on rendering one identity, while this component owns
|
|
34
34
|
* timing, crossfade animation, and pause behavior.
|
|
35
35
|
*/
|
|
36
|
-
export declare
|
|
36
|
+
export declare const AvatarRotator: ({ name, avatars, alt, size, color, interval, transitionDuration, pauseOnHover, activeIndex, defaultActiveIndex, onIndexChange, className, style, onMouseEnter, onMouseLeave, onFocus, onBlur, ...props }: AvatarRotatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -16,7 +16,7 @@ function s() {
|
|
|
16
16
|
return e.addEventListener?.("change", n), () => e.removeEventListener?.("change", n);
|
|
17
17
|
}, []), e;
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
var c = ({ name: c = "", avatars: l = [], alt: u, size: d = "md", color: f, interval: p = 3e3, transitionDuration: m = 240, pauseOnHover: h = !0, activeIndex: g, defaultActiveIndex: _ = 0, onIndexChange: v, className: y, style: b, onMouseEnter: x, onMouseLeave: S, onFocus: C, onBlur: w, ...T }) => {
|
|
20
20
|
let E = r(() => l.map((e) => e.trim()).filter(Boolean), [l]), D = g !== void 0, [O, k] = i(_), [A, j] = i(!1), M = s(), N = o(D ? g : O, E.length);
|
|
21
21
|
if (n(() => {
|
|
22
22
|
if (E.length <= 1 || p <= 0 || A || M) return;
|
|
@@ -77,7 +77,7 @@ function c({ name: c = "", avatars: l = [], alt: u, size: d = "md", color: f, in
|
|
|
77
77
|
className: [t.layer, r === N ? t.active : null].filter(Boolean).join(" ")
|
|
78
78
|
}, `${n}-${r}`))
|
|
79
79
|
});
|
|
80
|
-
}
|
|
80
|
+
};
|
|
81
81
|
//#endregion
|
|
82
82
|
export { c as AvatarRotator };
|
|
83
83
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AvatarRotator.js","names":[],"sources":["../../../src/components/AvatarRotator/AvatarRotator.tsx"],"sourcesContent":["import { type CSSProperties, type HTMLAttributes, useEffect, useMemo, useState } from 'react';\n\nimport { Avatar, type AvatarColor, type AvatarSize } from '../Avatar';\n\nimport styles from './AvatarRotator.module.css';\n\nexport interface AvatarRotatorProps extends HTMLAttributes<HTMLSpanElement> {\n /** Full name used for the accessible label and initials fallback. */\n name?: string;\n /** Image URLs to rotate through. */\n avatars?: string[];\n /** Accessible label. Defaults to `name`. */\n alt?: string;\n /** Size of the avatar. Defaults to `\"md\"`. */\n size?: AvatarSize;\n /** Fallback initials color when no avatar image is available. */\n color?: AvatarColor;\n /** Time between avatar changes in milliseconds. Defaults to `3000`. */\n interval?: number;\n /** Crossfade duration in milliseconds. Defaults to `240`. */\n transitionDuration?: number;\n /** Pause automatic rotation while hovered or focused. Defaults to `true`. */\n pauseOnHover?: boolean;\n /**\n * Controlled active avatar index.\n * When omitted the rotator manages index state internally.\n */\n activeIndex?: number;\n /** Initial active avatar index for uncontrolled usage. Defaults to `0`. */\n defaultActiveIndex?: number;\n /** Called when the active avatar changes. */\n onIndexChange?: (index: number) => void;\n}\n\nfunction clampIndex(index: number, length: number) {\n if (length <= 0) {\n return 0;\n }\n\n return ((index % length) + length) % length;\n}\n\nfunction usePrefersReducedMotion() {\n const [prefersReducedMotion, setPrefersReducedMotion] = useState(false);\n\n useEffect(() => {\n if (typeof window === 'undefined' || !window.matchMedia) {\n return;\n }\n\n const query = window.matchMedia('(prefers-reduced-motion: reduce)');\n\n setPrefersReducedMotion(query.matches);\n\n const handleChange = () => setPrefersReducedMotion(query.matches);\n\n query.addEventListener?.('change', handleChange);\n\n return () => query.removeEventListener?.('change', handleChange);\n }, []);\n\n return prefersReducedMotion;\n}\n\n/**\n * Single avatar surface that rotates through multiple image sources.\n *\n * Keeps `Avatar` focused on rendering one identity, while this component owns\n * timing, crossfade animation, and pause behavior.\n */\nexport
|
|
1
|
+
{"version":3,"file":"AvatarRotator.js","names":[],"sources":["../../../src/components/AvatarRotator/AvatarRotator.tsx"],"sourcesContent":["import { type CSSProperties, type HTMLAttributes, useEffect, useMemo, useState } from 'react';\n\nimport { Avatar, type AvatarColor, type AvatarSize } from '../Avatar';\n\nimport styles from './AvatarRotator.module.css';\n\nexport interface AvatarRotatorProps extends HTMLAttributes<HTMLSpanElement> {\n /** Full name used for the accessible label and initials fallback. */\n name?: string;\n /** Image URLs to rotate through. */\n avatars?: string[];\n /** Accessible label. Defaults to `name`. */\n alt?: string;\n /** Size of the avatar. Defaults to `\"md\"`. */\n size?: AvatarSize;\n /** Fallback initials color when no avatar image is available. */\n color?: AvatarColor;\n /** Time between avatar changes in milliseconds. Defaults to `3000`. */\n interval?: number;\n /** Crossfade duration in milliseconds. Defaults to `240`. */\n transitionDuration?: number;\n /** Pause automatic rotation while hovered or focused. Defaults to `true`. */\n pauseOnHover?: boolean;\n /**\n * Controlled active avatar index.\n * When omitted the rotator manages index state internally.\n */\n activeIndex?: number;\n /** Initial active avatar index for uncontrolled usage. Defaults to `0`. */\n defaultActiveIndex?: number;\n /** Called when the active avatar changes. */\n onIndexChange?: (index: number) => void;\n}\n\nfunction clampIndex(index: number, length: number) {\n if (length <= 0) {\n return 0;\n }\n\n return ((index % length) + length) % length;\n}\n\nfunction usePrefersReducedMotion() {\n const [prefersReducedMotion, setPrefersReducedMotion] = useState(false);\n\n useEffect(() => {\n if (typeof window === 'undefined' || !window.matchMedia) {\n return;\n }\n\n const query = window.matchMedia('(prefers-reduced-motion: reduce)');\n\n setPrefersReducedMotion(query.matches);\n\n const handleChange = () => setPrefersReducedMotion(query.matches);\n\n query.addEventListener?.('change', handleChange);\n\n return () => query.removeEventListener?.('change', handleChange);\n }, []);\n\n return prefersReducedMotion;\n}\n\n/**\n * Single avatar surface that rotates through multiple image sources.\n *\n * Keeps `Avatar` focused on rendering one identity, while this component owns\n * timing, crossfade animation, and pause behavior.\n */\nexport const AvatarRotator = ({\n name = '',\n avatars = [],\n alt,\n size = 'md',\n color,\n interval = 3000,\n transitionDuration = 240,\n pauseOnHover = true,\n activeIndex,\n defaultActiveIndex = 0,\n onIndexChange,\n className,\n style,\n onMouseEnter,\n onMouseLeave,\n onFocus,\n onBlur,\n ...props\n}: AvatarRotatorProps) => {\n const sources = useMemo(() => avatars.map((src) => src.trim()).filter(Boolean), [avatars]);\n const isControlled = activeIndex !== undefined;\n const [internalIndex, setInternalIndex] = useState(defaultActiveIndex);\n const [isPaused, setIsPaused] = useState(false);\n const prefersReducedMotion = usePrefersReducedMotion();\n const currentIndex = clampIndex(isControlled ? activeIndex : internalIndex, sources.length);\n\n useEffect(() => {\n if (sources.length <= 1) {\n return;\n }\n\n if (interval <= 0) {\n return;\n }\n\n if (isPaused || prefersReducedMotion) {\n return;\n }\n\n const timer = window.setInterval(() => {\n const nextIndex = clampIndex(currentIndex + 1, sources.length);\n\n if (!isControlled) {\n setInternalIndex(nextIndex);\n }\n\n onIndexChange?.(nextIndex);\n }, interval);\n\n return () => window.clearInterval(timer);\n }, [\n currentIndex,\n interval,\n isControlled,\n isPaused,\n onIndexChange,\n prefersReducedMotion,\n sources.length,\n ]);\n\n if (sources.length === 0) {\n return (\n <Avatar\n name={name}\n alt={alt}\n size={size}\n color={color}\n className={className}\n style={style}\n {...props}\n />\n );\n }\n\n const label = alt ?? name ?? 'Avatar';\n const transitionStyle = {\n ...style,\n '--avatar-rotator-duration': `${Math.max(0, transitionDuration)}ms`,\n } as CSSProperties;\n\n return (\n <span\n role=\"img\"\n aria-label={label}\n className={[styles.rotator, styles[size], className].filter(Boolean).join(' ')}\n style={transitionStyle}\n onMouseEnter={(event) => {\n if (pauseOnHover) {\n setIsPaused(true);\n }\n\n onMouseEnter?.(event);\n }}\n onMouseLeave={(event) => {\n if (pauseOnHover) {\n setIsPaused(false);\n }\n\n onMouseLeave?.(event);\n }}\n onFocus={(event) => {\n if (pauseOnHover) {\n setIsPaused(true);\n }\n\n onFocus?.(event);\n }}\n onBlur={(event) => {\n if (pauseOnHover) {\n setIsPaused(false);\n }\n\n onBlur?.(event);\n }}\n {...props}\n >\n {sources.map((src, index) => (\n <Avatar\n key={`${src}-${index}`}\n name={name}\n src={src}\n alt=\"\"\n size={size}\n aria-hidden=\"true\"\n className={[styles.layer, index === currentIndex ? styles.active : null]\n .filter(Boolean)\n .join(' ')}\n />\n ))}\n </span>\n );\n};\n"],"mappings":";;;;;AAkCA,SAAS,EAAW,GAAe,GAAgB;CAKjD,OAJI,KAAU,IACL,KAGA,IAAQ,IAAU,KAAU;AACvC;AAEA,SAAS,IAA0B;CACjC,IAAM,CAAC,GAAsB,KAA2B,EAAS,EAAK;CAkBtE,OAhBA,QAAgB;EACd,IAAI,OAAO,SAAW,OAAe,CAAC,OAAO,YAC3C;EAGF,IAAM,IAAQ,OAAO,WAAW,kCAAkC;EAElE,EAAwB,EAAM,OAAO;EAErC,IAAM,UAAqB,EAAwB,EAAM,OAAO;EAIhE,OAFA,EAAM,mBAAmB,UAAU,CAAY,SAElC,EAAM,sBAAsB,UAAU,CAAY;CACjE,GAAG,CAAC,CAAC,GAEE;AACT;AAQA,IAAa,KAAiB,EAC5B,UAAO,IACP,aAAU,CAAC,GACX,QACA,UAAO,MACP,UACA,cAAW,KACX,wBAAqB,KACrB,kBAAe,IACf,gBACA,wBAAqB,GACrB,kBACA,cACA,UACA,iBACA,iBACA,YACA,WACA,GAAG,QACqB;CACxB,IAAM,IAAU,QAAc,EAAQ,KAAK,MAAQ,EAAI,KAAK,CAAC,EAAE,OAAO,OAAO,GAAG,CAAC,CAAO,CAAC,GACnF,IAAe,MAAgB,KAAA,GAC/B,CAAC,GAAe,KAAoB,EAAS,CAAkB,GAC/D,CAAC,GAAU,KAAe,EAAS,EAAK,GACxC,IAAuB,EAAwB,GAC/C,IAAe,EAAW,IAAe,IAAc,GAAe,EAAQ,MAAM;CAoC1F,IAlCA,QAAgB;EASd,IARI,EAAQ,UAAU,KAIlB,KAAY,KAIZ,KAAY,GACd;EAGF,IAAM,IAAQ,OAAO,kBAAkB;GACrC,IAAM,IAAY,EAAW,IAAe,GAAG,EAAQ,MAAM;GAM7D,AAJK,KACH,EAAiB,CAAS,GAG5B,IAAgB,CAAS;EAC3B,GAAG,CAAQ;EAEX,aAAa,OAAO,cAAc,CAAK;CACzC,GAAG;EACD;EACA;EACA;EACA;EACA;EACA;EACA,EAAQ;CACV,CAAC,GAEG,EAAQ,WAAW,GACrB,OACE,kBAAC,GAAD;EACQ;EACD;EACC;EACC;EACI;EACJ;EACP,GAAI;CACL,CAAA;CAIL,IAAM,IAAQ,KAAO,KAAQ,UACvB,IAAkB;EACtB,GAAG;EACH,6BAA6B,GAAG,KAAK,IAAI,GAAG,CAAkB,EAAE;CAClE;CAEA,OACE,kBAAC,QAAD;EACE,MAAK;EACL,cAAY;EACZ,WAAW;GAAC,EAAO;GAAS,EAAO;GAAO;EAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;EAC7E,OAAO;EACP,eAAe,MAAU;GAKvB,AAJI,KACF,EAAY,EAAI,GAGlB,IAAe,CAAK;EACtB;EACA,eAAe,MAAU;GAKvB,AAJI,KACF,EAAY,EAAK,GAGnB,IAAe,CAAK;EACtB;EACA,UAAU,MAAU;GAKlB,AAJI,KACF,EAAY,EAAI,GAGlB,IAAU,CAAK;EACjB;EACA,SAAS,MAAU;GAKjB,AAJI,KACF,EAAY,EAAK,GAGnB,IAAS,CAAK;EAChB;EACA,GAAI;YAEH,EAAQ,KAAK,GAAK,MACjB,kBAAC,GAAD;GAEQ;GACD;GACL,KAAI;GACE;GACN,eAAY;GACZ,WAAW,CAAC,EAAO,OAAO,MAAU,IAAe,EAAO,SAAS,IAAI,EACpE,OAAO,OAAO,EACd,KAAK,GAAG;EACZ,GATM,GAAG,EAAI,GAAG,GAShB,CACF;CACG,CAAA;AAEV"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./AvatarRotator/AvatarRotator.cjs");exports.AvatarRotator=e.AvatarRotator;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(
|
|
1
|
+
const e=require("./Badge.module.css.cjs");let t=require("react/jsx-runtime");var n=({variant:n=`accent`,dot:r=!1,children:i,anchor:a,className:o,...s})=>{let c=(0,t.jsx)(`span`,{className:[e.default.badge,e.default[n],r?e.default.dot:null,a?e.default.anchored:null,o].filter(Boolean).join(` `),...s,children:!r&&i});return a?(0,t.jsxs)(`span`,{className:e.default.wrapper,children:[a,c]}):c};exports.Badge=n;
|
|
2
2
|
//# sourceMappingURL=Badge.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.cjs","names":[],"sources":["../../../src/components/Badge/Badge.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\n\nimport styles from './Badge.module.css';\n\nexport type BadgeVariant = 'accent' | 'success' | 'warning' | 'error' | 'neutral';\n\nexport interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {\n /**\n * Visual style. Defaults to `\"accent\"`.\n * - `accent` — blue, for counts and highlights.\n * - `success` — green, for positive status.\n * - `warning` — yellow, for cautionary status.\n * - `error` — red, for failures or urgent counts.\n * - `neutral` — gray, for inactive or secondary counts.\n */\n variant?: BadgeVariant;\n /**\n * When true, renders a small dot with no label — used for unread/online indicators.\n * The `children` are ignored in dot mode.\n */\n dot?: boolean;\n /** Number or short text to display. Keep to 1–3 characters. */\n children?: ReactNode;\n /**\n * When provided, the badge is absolutely positioned over this child element\n * at the top-right corner. The wrapper becomes `position: relative`.\n */\n anchor?: ReactNode;\n}\n\n/**\n * Counter or status indicator, optionally overlaid on another element.\n *\n * @see https://developer.gnome.org/hig/patterns/feedback/badges.html\n */\nexport
|
|
1
|
+
{"version":3,"file":"Badge.cjs","names":[],"sources":["../../../src/components/Badge/Badge.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\n\nimport styles from './Badge.module.css';\n\nexport type BadgeVariant = 'accent' | 'success' | 'warning' | 'error' | 'neutral';\n\nexport interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {\n /**\n * Visual style. Defaults to `\"accent\"`.\n * - `accent` — blue, for counts and highlights.\n * - `success` — green, for positive status.\n * - `warning` — yellow, for cautionary status.\n * - `error` — red, for failures or urgent counts.\n * - `neutral` — gray, for inactive or secondary counts.\n */\n variant?: BadgeVariant;\n /**\n * When true, renders a small dot with no label — used for unread/online indicators.\n * The `children` are ignored in dot mode.\n */\n dot?: boolean;\n /** Number or short text to display. Keep to 1–3 characters. */\n children?: ReactNode;\n /**\n * When provided, the badge is absolutely positioned over this child element\n * at the top-right corner. The wrapper becomes `position: relative`.\n */\n anchor?: ReactNode;\n}\n\n/**\n * Counter or status indicator, optionally overlaid on another element.\n *\n * @see https://developer.gnome.org/hig/patterns/feedback/badges.html\n */\nexport const Badge = ({\n variant = 'accent',\n dot = false,\n children,\n anchor,\n className,\n ...props\n}: BadgeProps) => {\n const badgeEl = (\n <span\n className={[\n styles.badge,\n styles[variant],\n dot ? styles.dot : null,\n anchor ? styles.anchored : null,\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n >\n {!dot && children}\n </span>\n );\n\n if (anchor) {\n return (\n <span className={styles.wrapper}>\n {anchor}\n {badgeEl}\n </span>\n );\n }\n\n return badgeEl;\n};\n"],"mappings":"6EAmCA,IAAa,GAAS,CACpB,UAAU,SACV,MAAM,GACN,WACA,SACA,YACA,GAAG,KACa,CAChB,IAAM,GACJ,EAAA,EAAA,KAAC,OAAD,CACE,UAAW,CACT,EAAA,QAAO,MACP,EAAA,QAAO,GACP,EAAM,EAAA,QAAO,IAAM,KACnB,EAAS,EAAA,QAAO,SAAW,KAC3B,CACF,EACG,OAAO,OAAO,EACd,KAAK,GAAG,EACX,GAAI,WAEH,CAAC,GAAO,CACL,CAAA,EAYR,OATI,GAEA,EAAA,EAAA,MAAC,OAAD,CAAM,UAAW,EAAA,QAAO,iBAAxB,CACG,EACA,CACG,IAIH,CACT"}
|
|
@@ -28,4 +28,4 @@ export interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
28
28
|
*
|
|
29
29
|
* @see https://developer.gnome.org/hig/patterns/feedback/badges.html
|
|
30
30
|
*/
|
|
31
|
-
export declare
|
|
31
|
+
export declare const Badge: ({ variant, dot, children, anchor, className, ...props }: BadgeProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e from "./Badge.module.css.js";
|
|
2
2
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
3
|
//#region src/components/Badge/Badge.tsx
|
|
4
|
-
|
|
4
|
+
var r = ({ variant: r = "accent", dot: i = !1, children: a, anchor: o, className: s, ...c }) => {
|
|
5
5
|
let l = /* @__PURE__ */ t("span", {
|
|
6
6
|
className: [
|
|
7
7
|
e.badge,
|
|
@@ -17,7 +17,7 @@ function r({ variant: r = "accent", dot: i = !1, children: a, anchor: o, classNa
|
|
|
17
17
|
className: e.wrapper,
|
|
18
18
|
children: [o, l]
|
|
19
19
|
}) : l;
|
|
20
|
-
}
|
|
20
|
+
};
|
|
21
21
|
//#endregion
|
|
22
22
|
export { r as Badge };
|
|
23
23
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.js","names":[],"sources":["../../../src/components/Badge/Badge.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\n\nimport styles from './Badge.module.css';\n\nexport type BadgeVariant = 'accent' | 'success' | 'warning' | 'error' | 'neutral';\n\nexport interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {\n /**\n * Visual style. Defaults to `\"accent\"`.\n * - `accent` — blue, for counts and highlights.\n * - `success` — green, for positive status.\n * - `warning` — yellow, for cautionary status.\n * - `error` — red, for failures or urgent counts.\n * - `neutral` — gray, for inactive or secondary counts.\n */\n variant?: BadgeVariant;\n /**\n * When true, renders a small dot with no label — used for unread/online indicators.\n * The `children` are ignored in dot mode.\n */\n dot?: boolean;\n /** Number or short text to display. Keep to 1–3 characters. */\n children?: ReactNode;\n /**\n * When provided, the badge is absolutely positioned over this child element\n * at the top-right corner. The wrapper becomes `position: relative`.\n */\n anchor?: ReactNode;\n}\n\n/**\n * Counter or status indicator, optionally overlaid on another element.\n *\n * @see https://developer.gnome.org/hig/patterns/feedback/badges.html\n */\nexport
|
|
1
|
+
{"version":3,"file":"Badge.js","names":[],"sources":["../../../src/components/Badge/Badge.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\n\nimport styles from './Badge.module.css';\n\nexport type BadgeVariant = 'accent' | 'success' | 'warning' | 'error' | 'neutral';\n\nexport interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {\n /**\n * Visual style. Defaults to `\"accent\"`.\n * - `accent` — blue, for counts and highlights.\n * - `success` — green, for positive status.\n * - `warning` — yellow, for cautionary status.\n * - `error` — red, for failures or urgent counts.\n * - `neutral` — gray, for inactive or secondary counts.\n */\n variant?: BadgeVariant;\n /**\n * When true, renders a small dot with no label — used for unread/online indicators.\n * The `children` are ignored in dot mode.\n */\n dot?: boolean;\n /** Number or short text to display. Keep to 1–3 characters. */\n children?: ReactNode;\n /**\n * When provided, the badge is absolutely positioned over this child element\n * at the top-right corner. The wrapper becomes `position: relative`.\n */\n anchor?: ReactNode;\n}\n\n/**\n * Counter or status indicator, optionally overlaid on another element.\n *\n * @see https://developer.gnome.org/hig/patterns/feedback/badges.html\n */\nexport const Badge = ({\n variant = 'accent',\n dot = false,\n children,\n anchor,\n className,\n ...props\n}: BadgeProps) => {\n const badgeEl = (\n <span\n className={[\n styles.badge,\n styles[variant],\n dot ? styles.dot : null,\n anchor ? styles.anchored : null,\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n >\n {!dot && children}\n </span>\n );\n\n if (anchor) {\n return (\n <span className={styles.wrapper}>\n {anchor}\n {badgeEl}\n </span>\n );\n }\n\n return badgeEl;\n};\n"],"mappings":";;;AAmCA,IAAa,KAAS,EACpB,aAAU,UACV,SAAM,IACN,aACA,WACA,cACA,GAAG,QACa;CAChB,IAAM,IACJ,kBAAC,QAAD;EACE,WAAW;GACT,EAAO;GACP,EAAO;GACP,IAAM,EAAO,MAAM;GACnB,IAAS,EAAO,WAAW;GAC3B;EACF,EACG,OAAO,OAAO,EACd,KAAK,GAAG;EACX,GAAI;YAEH,CAAC,KAAO;CACL,CAAA;CAYR,OATI,IAEA,kBAAC,QAAD;EAAM,WAAW,EAAO;YAAxB,CACG,GACA,CACG;MAIH;AACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./Badge/Badge.cjs");exports.Badge=e.Badge;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(
|
|
1
|
+
const e=require("./Banner.module.css.cjs");let t=require("react/jsx-runtime");var n=({variant:n=`info`,children:r,actionLabel:i,onAction:a,dismissible:o=!1,onDismiss:s,className:c,...l})=>(0,t.jsxs)(`div`,{role:`status`,"aria-live":`polite`,className:[e.default.banner,e.default[n],c].filter(Boolean).join(` `),...l,children:[(0,t.jsx)(`span`,{className:e.default.message,children:r}),(i||o)&&(0,t.jsxs)(`span`,{className:e.default.actions,children:[i&&(0,t.jsx)(`button`,{type:`button`,className:[e.default.actionBtn,e.default[`actionBtn-${n}`]].filter(Boolean).join(` `),onClick:a,children:i}),o&&(0,t.jsx)(`button`,{type:`button`,className:e.default.dismissBtn,onClick:s,"aria-label":`Dismiss`,children:(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,"aria-hidden":`true`,fill:`currentColor`,children:(0,t.jsx)(`path`,{d:`M3.293 3.293a1 1 0 011.414 0L8 6.586l3.293-3.293a1 1 0 111.414 1.414L9.414 8l3.293 3.293a1 1 0 01-1.414 1.414L8 9.414l-3.293 3.293a1 1 0 01-1.414-1.414L6.586 8 3.293 4.707a1 1 0 010-1.414z`})})})]})]});exports.Banner=n;
|
|
2
2
|
//# sourceMappingURL=Banner.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Banner.cjs","names":[],"sources":["../../../src/components/Banner/Banner.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\n\nimport styles from './Banner.module.css';\n\nexport type BannerVariant = 'info' | 'warning' | 'error' | 'success';\n\nexport interface BannerProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Visual emphasis level.\n * - `info` (default) — neutral, accent-colored. Use for tips and notices.\n * - `warning` — yellow. Use for recoverable problems.\n * - `error` — red. Use for failures that need attention.\n * - `success` — green. Use for confirmations.\n */\n variant?: BannerVariant;\n /** The message text. Keep it short — one or two sentences. */\n children: ReactNode;\n /**\n * Label for the optional action button placed at the trailing end.\n * When provided, `onAction` should also be supplied.\n */\n actionLabel?: string;\n /** Called when the user clicks the action button. */\n onAction?: () => void;\n /**\n * When true a dismiss (×) button is shown at the trailing edge.\n * Provide `onDismiss` to handle removal from the DOM.\n */\n dismissible?: boolean;\n /** Called when the user clicks the dismiss button. */\n onDismiss?: () => void;\n}\n\n/**\n * Persistent message strip displayed at the top of a view.\n *\n * Mirrors the Adwaita `AdwBanner` pattern. Use for important information\n * that persists until the user acts or explicitly dismisses it.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Banner.html\n * @see https://developer.gnome.org/hig/patterns/feedback/banners.html\n */\nexport
|
|
1
|
+
{"version":3,"file":"Banner.cjs","names":[],"sources":["../../../src/components/Banner/Banner.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\n\nimport styles from './Banner.module.css';\n\nexport type BannerVariant = 'info' | 'warning' | 'error' | 'success';\n\nexport interface BannerProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Visual emphasis level.\n * - `info` (default) — neutral, accent-colored. Use for tips and notices.\n * - `warning` — yellow. Use for recoverable problems.\n * - `error` — red. Use for failures that need attention.\n * - `success` — green. Use for confirmations.\n */\n variant?: BannerVariant;\n /** The message text. Keep it short — one or two sentences. */\n children: ReactNode;\n /**\n * Label for the optional action button placed at the trailing end.\n * When provided, `onAction` should also be supplied.\n */\n actionLabel?: string;\n /** Called when the user clicks the action button. */\n onAction?: () => void;\n /**\n * When true a dismiss (×) button is shown at the trailing edge.\n * Provide `onDismiss` to handle removal from the DOM.\n */\n dismissible?: boolean;\n /** Called when the user clicks the dismiss button. */\n onDismiss?: () => void;\n}\n\n/**\n * Persistent message strip displayed at the top of a view.\n *\n * Mirrors the Adwaita `AdwBanner` pattern. Use for important information\n * that persists until the user acts or explicitly dismisses it.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Banner.html\n * @see https://developer.gnome.org/hig/patterns/feedback/banners.html\n */\nexport const Banner = ({\n variant = 'info',\n children,\n actionLabel,\n onAction,\n dismissible = false,\n onDismiss,\n className,\n ...props\n}: BannerProps) => {\n return (\n <div\n role=\"status\"\n aria-live=\"polite\"\n className={[styles.banner, styles[variant], className].filter(Boolean).join(' ')}\n {...props}\n >\n <span className={styles.message}>{children}</span>\n\n {(actionLabel || dismissible) && (\n <span className={styles.actions}>\n {actionLabel && (\n <button\n type=\"button\"\n className={[styles.actionBtn, styles[`actionBtn-${variant}`]]\n .filter(Boolean)\n .join(' ')}\n onClick={onAction}\n >\n {actionLabel}\n </button>\n )}\n {dismissible && (\n <button\n type=\"button\"\n className={styles.dismissBtn}\n onClick={onDismiss}\n aria-label=\"Dismiss\"\n >\n {/* × close icon */}\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n aria-hidden=\"true\"\n fill=\"currentColor\"\n >\n <path d=\"M3.293 3.293a1 1 0 011.414 0L8 6.586l3.293-3.293a1 1 0 111.414 1.414L9.414 8l3.293 3.293a1 1 0 01-1.414 1.414L8 9.414l-3.293 3.293a1 1 0 01-1.414-1.414L6.586 8 3.293 4.707a1 1 0 010-1.414z\" />\n </svg>\n </button>\n )}\n </span>\n )}\n </div>\n );\n};\n"],"mappings":"8EA0CA,IAAa,GAAU,CACrB,UAAU,OACV,WACA,cACA,WACA,cAAc,GACd,YACA,YACA,GAAG,MAGD,EAAA,EAAA,MAAC,MAAD,CACE,KAAK,SACL,YAAU,SACV,UAAW,CAAC,EAAA,QAAO,OAAQ,EAAA,QAAO,GAAU,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,EAC/E,GAAI,WAJN,EAME,EAAA,EAAA,KAAC,OAAD,CAAM,UAAW,EAAA,QAAO,QAAU,UAAe,CAAA,GAE/C,GAAe,KACf,EAAA,EAAA,MAAC,OAAD,CAAM,UAAW,EAAA,QAAO,iBAAxB,CACG,IACC,EAAA,EAAA,KAAC,SAAD,CACE,KAAK,SACL,UAAW,CAAC,EAAA,QAAO,UAAW,EAAA,QAAO,aAAa,IAAU,EACzD,OAAO,OAAO,EACd,KAAK,GAAG,EACX,QAAS,WAER,CACK,CAAA,EAET,IACC,EAAA,EAAA,KAAC,SAAD,CACE,KAAK,SACL,UAAW,EAAA,QAAO,WAClB,QAAS,EACT,aAAW,oBAGX,EAAA,EAAA,KAAC,MAAD,CACE,MAAM,KACN,OAAO,KACP,QAAQ,YACR,cAAY,OACZ,KAAK,yBAEL,EAAA,EAAA,KAAC,OAAD,CAAM,EAAE,8LAAgM,CAAA,CACrM,CAAA,CACC,CAAA,CAEN,GAEL"}
|
|
@@ -35,4 +35,4 @@ export interface BannerProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
35
35
|
* @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Banner.html
|
|
36
36
|
* @see https://developer.gnome.org/hig/patterns/feedback/banners.html
|
|
37
37
|
*/
|
|
38
|
-
export declare
|
|
38
|
+
export declare const Banner: ({ variant, children, actionLabel, onAction, dismissible, onDismiss, className, ...props }: BannerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,43 +1,41 @@
|
|
|
1
1
|
import e from "./Banner.module.css.js";
|
|
2
2
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
3
|
//#region src/components/Banner/Banner.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
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
})
|
|
37
|
-
})]
|
|
4
|
+
var r = ({ variant: r = "info", children: i, actionLabel: a, onAction: o, dismissible: s = !1, onDismiss: c, className: l, ...u }) => /* @__PURE__ */ n("div", {
|
|
5
|
+
role: "status",
|
|
6
|
+
"aria-live": "polite",
|
|
7
|
+
className: [
|
|
8
|
+
e.banner,
|
|
9
|
+
e[r],
|
|
10
|
+
l
|
|
11
|
+
].filter(Boolean).join(" "),
|
|
12
|
+
...u,
|
|
13
|
+
children: [/* @__PURE__ */ t("span", {
|
|
14
|
+
className: e.message,
|
|
15
|
+
children: i
|
|
16
|
+
}), (a || s) && /* @__PURE__ */ n("span", {
|
|
17
|
+
className: e.actions,
|
|
18
|
+
children: [a && /* @__PURE__ */ t("button", {
|
|
19
|
+
type: "button",
|
|
20
|
+
className: [e.actionBtn, e[`actionBtn-${r}`]].filter(Boolean).join(" "),
|
|
21
|
+
onClick: o,
|
|
22
|
+
children: a
|
|
23
|
+
}), s && /* @__PURE__ */ t("button", {
|
|
24
|
+
type: "button",
|
|
25
|
+
className: e.dismissBtn,
|
|
26
|
+
onClick: c,
|
|
27
|
+
"aria-label": "Dismiss",
|
|
28
|
+
children: /* @__PURE__ */ t("svg", {
|
|
29
|
+
width: "16",
|
|
30
|
+
height: "16",
|
|
31
|
+
viewBox: "0 0 16 16",
|
|
32
|
+
"aria-hidden": "true",
|
|
33
|
+
fill: "currentColor",
|
|
34
|
+
children: /* @__PURE__ */ t("path", { d: "M3.293 3.293a1 1 0 011.414 0L8 6.586l3.293-3.293a1 1 0 111.414 1.414L9.414 8l3.293 3.293a1 1 0 01-1.414 1.414L8 9.414l-3.293 3.293a1 1 0 01-1.414-1.414L6.586 8 3.293 4.707a1 1 0 010-1.414z" })
|
|
35
|
+
})
|
|
38
36
|
})]
|
|
39
|
-
})
|
|
40
|
-
}
|
|
37
|
+
})]
|
|
38
|
+
});
|
|
41
39
|
//#endregion
|
|
42
40
|
export { r as Banner };
|
|
43
41
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Banner.js","names":[],"sources":["../../../src/components/Banner/Banner.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\n\nimport styles from './Banner.module.css';\n\nexport type BannerVariant = 'info' | 'warning' | 'error' | 'success';\n\nexport interface BannerProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Visual emphasis level.\n * - `info` (default) — neutral, accent-colored. Use for tips and notices.\n * - `warning` — yellow. Use for recoverable problems.\n * - `error` — red. Use for failures that need attention.\n * - `success` — green. Use for confirmations.\n */\n variant?: BannerVariant;\n /** The message text. Keep it short — one or two sentences. */\n children: ReactNode;\n /**\n * Label for the optional action button placed at the trailing end.\n * When provided, `onAction` should also be supplied.\n */\n actionLabel?: string;\n /** Called when the user clicks the action button. */\n onAction?: () => void;\n /**\n * When true a dismiss (×) button is shown at the trailing edge.\n * Provide `onDismiss` to handle removal from the DOM.\n */\n dismissible?: boolean;\n /** Called when the user clicks the dismiss button. */\n onDismiss?: () => void;\n}\n\n/**\n * Persistent message strip displayed at the top of a view.\n *\n * Mirrors the Adwaita `AdwBanner` pattern. Use for important information\n * that persists until the user acts or explicitly dismisses it.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Banner.html\n * @see https://developer.gnome.org/hig/patterns/feedback/banners.html\n */\nexport
|
|
1
|
+
{"version":3,"file":"Banner.js","names":[],"sources":["../../../src/components/Banner/Banner.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\n\nimport styles from './Banner.module.css';\n\nexport type BannerVariant = 'info' | 'warning' | 'error' | 'success';\n\nexport interface BannerProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Visual emphasis level.\n * - `info` (default) — neutral, accent-colored. Use for tips and notices.\n * - `warning` — yellow. Use for recoverable problems.\n * - `error` — red. Use for failures that need attention.\n * - `success` — green. Use for confirmations.\n */\n variant?: BannerVariant;\n /** The message text. Keep it short — one or two sentences. */\n children: ReactNode;\n /**\n * Label for the optional action button placed at the trailing end.\n * When provided, `onAction` should also be supplied.\n */\n actionLabel?: string;\n /** Called when the user clicks the action button. */\n onAction?: () => void;\n /**\n * When true a dismiss (×) button is shown at the trailing edge.\n * Provide `onDismiss` to handle removal from the DOM.\n */\n dismissible?: boolean;\n /** Called when the user clicks the dismiss button. */\n onDismiss?: () => void;\n}\n\n/**\n * Persistent message strip displayed at the top of a view.\n *\n * Mirrors the Adwaita `AdwBanner` pattern. Use for important information\n * that persists until the user acts or explicitly dismisses it.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Banner.html\n * @see https://developer.gnome.org/hig/patterns/feedback/banners.html\n */\nexport const Banner = ({\n variant = 'info',\n children,\n actionLabel,\n onAction,\n dismissible = false,\n onDismiss,\n className,\n ...props\n}: BannerProps) => {\n return (\n <div\n role=\"status\"\n aria-live=\"polite\"\n className={[styles.banner, styles[variant], className].filter(Boolean).join(' ')}\n {...props}\n >\n <span className={styles.message}>{children}</span>\n\n {(actionLabel || dismissible) && (\n <span className={styles.actions}>\n {actionLabel && (\n <button\n type=\"button\"\n className={[styles.actionBtn, styles[`actionBtn-${variant}`]]\n .filter(Boolean)\n .join(' ')}\n onClick={onAction}\n >\n {actionLabel}\n </button>\n )}\n {dismissible && (\n <button\n type=\"button\"\n className={styles.dismissBtn}\n onClick={onDismiss}\n aria-label=\"Dismiss\"\n >\n {/* × close icon */}\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n aria-hidden=\"true\"\n fill=\"currentColor\"\n >\n <path d=\"M3.293 3.293a1 1 0 011.414 0L8 6.586l3.293-3.293a1 1 0 111.414 1.414L9.414 8l3.293 3.293a1 1 0 01-1.414 1.414L8 9.414l-3.293 3.293a1 1 0 01-1.414-1.414L6.586 8 3.293 4.707a1 1 0 010-1.414z\" />\n </svg>\n </button>\n )}\n </span>\n )}\n </div>\n );\n};\n"],"mappings":";;;AA0CA,IAAa,KAAU,EACrB,aAAU,QACV,aACA,gBACA,aACA,iBAAc,IACd,cACA,cACA,GAAG,QAGD,kBAAC,OAAD;CACE,MAAK;CACL,aAAU;CACV,WAAW;EAAC,EAAO;EAAQ,EAAO;EAAU;CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;CAC/E,GAAI;WAJN,CAME,kBAAC,QAAD;EAAM,WAAW,EAAO;EAAU;CAAe,CAAA,IAE/C,KAAe,MACf,kBAAC,QAAD;EAAM,WAAW,EAAO;YAAxB,CACG,KACC,kBAAC,UAAD;GACE,MAAK;GACL,WAAW,CAAC,EAAO,WAAW,EAAO,aAAa,IAAU,EACzD,OAAO,OAAO,EACd,KAAK,GAAG;GACX,SAAS;aAER;EACK,CAAA,GAET,KACC,kBAAC,UAAD;GACE,MAAK;GACL,WAAW,EAAO;GAClB,SAAS;GACT,cAAW;aAGX,kBAAC,OAAD;IACE,OAAM;IACN,QAAO;IACP,SAAQ;IACR,eAAY;IACZ,MAAK;cAEL,kBAAC,QAAD,EAAM,GAAE,+LAAgM,CAAA;GACrM,CAAA;EACC,CAAA,CAEN;GAEL"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e
|
|
1
|
+
var e={banner:`_banner_1w4m1_3`,message:`_message_1w4m1_17`,actions:`_actions_1w4m1_24`,actionBtn:`_actionBtn_1w4m1_33`,dismissBtn:`_dismissBtn_1w4m1_55`,info:`_info_1w4m1_89`,"actionBtn-info":`_actionBtn-info_1w4m1_94`,warning:`_warning_1w4m1_103`,"actionBtn-warning":`_actionBtn-warning_1w4m1_108`,error:`_error_1w4m1_117`,"actionBtn-error":`_actionBtn-error_1w4m1_122`,success:`_success_1w4m1_131`,"actionBtn-success":`_actionBtn-success_1w4m1_136`};exports.default=e;
|
|
2
2
|
//# sourceMappingURL=Banner.module.css.cjs.map
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
info: a,
|
|
1
|
+
var e = {
|
|
2
|
+
banner: "_banner_1w4m1_3",
|
|
3
|
+
message: "_message_1w4m1_17",
|
|
4
|
+
actions: "_actions_1w4m1_24",
|
|
5
|
+
actionBtn: "_actionBtn_1w4m1_33",
|
|
6
|
+
dismissBtn: "_dismissBtn_1w4m1_55",
|
|
7
|
+
info: "_info_1w4m1_89",
|
|
9
8
|
"actionBtn-info": "_actionBtn-info_1w4m1_94",
|
|
10
|
-
warning:
|
|
9
|
+
warning: "_warning_1w4m1_103",
|
|
11
10
|
"actionBtn-warning": "_actionBtn-warning_1w4m1_108",
|
|
12
|
-
error:
|
|
11
|
+
error: "_error_1w4m1_117",
|
|
13
12
|
"actionBtn-error": "_actionBtn-error_1w4m1_122",
|
|
14
|
-
success:
|
|
13
|
+
success: "_success_1w4m1_131",
|
|
15
14
|
"actionBtn-success": "_actionBtn-success_1w4m1_136"
|
|
16
15
|
};
|
|
17
16
|
//#endregion
|
|
18
|
-
export {
|
|
17
|
+
export { e as default };
|
|
19
18
|
|
|
20
19
|
//# sourceMappingURL=Banner.module.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./Banner/Banner.cjs");exports.Banner=e.Banner;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
let e=require(
|
|
1
|
+
let e=require("react/jsx-runtime");var t=({children:t,...n})=>(0,e.jsx)(`div`,{...n,children:t});exports.Bin=t;
|
|
2
2
|
//# sourceMappingURL=Bin.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Bin.cjs","names":[],"sources":["../../../src/components/Bin/Bin.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\n\nexport interface BinProps extends HTMLAttributes<HTMLDivElement> {\n /** Single child. */\n children?: ReactNode;\n}\n\n/**\n * Single-child container with no visual styling.\n *\n * A transparent wrapper that constrains its content to one child while\n * forwarding all HTML div attributes. Useful as a base for custom components\n * that need a neutral container — e.g. to apply layout or size constraints\n * without introducing visual chrome.\n *\n * Mirrors `AdwBin`.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Bin.html\n */\nexport
|
|
1
|
+
{"version":3,"file":"Bin.cjs","names":[],"sources":["../../../src/components/Bin/Bin.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\n\nexport interface BinProps extends HTMLAttributes<HTMLDivElement> {\n /** Single child. */\n children?: ReactNode;\n}\n\n/**\n * Single-child container with no visual styling.\n *\n * A transparent wrapper that constrains its content to one child while\n * forwarding all HTML div attributes. Useful as a base for custom components\n * that need a neutral container — e.g. to apply layout or size constraints\n * without introducing visual chrome.\n *\n * Mirrors `AdwBin`.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Bin.html\n */\nexport const Bin = ({ children, ...props }: BinProps) => {\n return <div {...props}>{children}</div>;\n};\n"],"mappings":"mCAmBA,IAAa,GAAO,CAAE,WAAU,GAAG,MAC1B,EAAA,EAAA,KAAC,MAAD,CAAK,GAAI,EAAQ,UAAc,CAAA"}
|
|
@@ -15,4 +15,4 @@ export interface BinProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
15
15
|
*
|
|
16
16
|
* @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Bin.html
|
|
17
17
|
*/
|
|
18
|
-
export declare
|
|
18
|
+
export declare const Bin: ({ children, ...props }: BinProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
//#region src/components/Bin/Bin.tsx
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
});
|
|
8
|
-
}
|
|
3
|
+
var t = ({ children: t, ...n }) => /* @__PURE__ */ e("div", {
|
|
4
|
+
...n,
|
|
5
|
+
children: t
|
|
6
|
+
});
|
|
9
7
|
//#endregion
|
|
10
8
|
export { t as Bin };
|
|
11
9
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Bin.js","names":[],"sources":["../../../src/components/Bin/Bin.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\n\nexport interface BinProps extends HTMLAttributes<HTMLDivElement> {\n /** Single child. */\n children?: ReactNode;\n}\n\n/**\n * Single-child container with no visual styling.\n *\n * A transparent wrapper that constrains its content to one child while\n * forwarding all HTML div attributes. Useful as a base for custom components\n * that need a neutral container — e.g. to apply layout or size constraints\n * without introducing visual chrome.\n *\n * Mirrors `AdwBin`.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Bin.html\n */\nexport
|
|
1
|
+
{"version":3,"file":"Bin.js","names":[],"sources":["../../../src/components/Bin/Bin.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\n\nexport interface BinProps extends HTMLAttributes<HTMLDivElement> {\n /** Single child. */\n children?: ReactNode;\n}\n\n/**\n * Single-child container with no visual styling.\n *\n * A transparent wrapper that constrains its content to one child while\n * forwarding all HTML div attributes. Useful as a base for custom components\n * that need a neutral container — e.g. to apply layout or size constraints\n * without introducing visual chrome.\n *\n * Mirrors `AdwBin`.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Bin.html\n */\nexport const Bin = ({ children, ...props }: BinProps) => {\n return <div {...props}>{children}</div>;\n};\n"],"mappings":";;AAmBA,IAAa,KAAO,EAAE,aAAU,GAAG,QAC1B,kBAAC,OAAD;CAAK,GAAI;CAAQ;AAAc,CAAA"}
|
package/dist/components/Bin.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("./Bin/Bin.cjs");exports.Bin=e.Bin;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(
|
|
1
|
+
const e=require("./Blockquote.module.css.cjs");let t=require("react/jsx-runtime");var n=({variant:n=`default`,icon:r,cite:i,children:a,className:o,...s})=>(0,t.jsxs)(`blockquote`,{className:[e.default.blockquote,e.default[n],o].filter(Boolean).join(` `),...s,children:[(0,t.jsxs)(`div`,{className:e.default.body,children:[r&&(0,t.jsx)(`span`,{className:e.default.icon,"aria-hidden":`true`,children:r}),(0,t.jsx)(`p`,{className:e.default.content,children:a})]}),i!==void 0&&(0,t.jsx)(`footer`,{className:e.default.footer,children:(0,t.jsx)(`cite`,{className:e.default.cite,children:i})})]});exports.Blockquote=n;
|
|
2
2
|
//# sourceMappingURL=Blockquote.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Blockquote.cjs","names":[],"sources":["../../../src/components/Blockquote/Blockquote.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\n\nimport styles from './Blockquote.module.css';\n\n// ─── Types ────────────────────────────────────────────────────────────────────\n\nexport type BlockquoteVariant = 'default' | 'info' | 'warning' | 'error' | 'success';\n\nexport interface BlockquoteProps extends HTMLAttributes<HTMLQuoteElement> {\n /**\n * Visual emphasis style.\n * - `\"default\"` — neutral left border; use for general quotations.\n * - `\"info\"` — accent blue; use for tips and noteworthy passages.\n * - `\"warning\"` — yellow; use for cautionary content.\n * - `\"error\"` — red; use for critical or deprecated content.\n * - `\"success\"` — green; use for positive or approved content.\n */\n variant?: BlockquoteVariant;\n /**\n * Optional icon displayed to the left of the quoted text.\n * Typically a 16 px `<Icon>` component.\n */\n icon?: ReactNode;\n /**\n * Attribution rendered below the quote — author name, source title, etc.\n * Rendered inside a `<footer><cite>` for semantic correctness.\n */\n cite?: ReactNode;\n /** The quoted content. */\n children: ReactNode;\n}\n\n// ─── Component ────────────────────────────────────────────────────────────────\n\n/**\n * Styled pull-quote with semantic `<blockquote>` markup.\n *\n * Supports five visual variants and optional icon + attribution.\n *\n * ```tsx\n * <Blockquote variant=\"info\" cite=\"Ada Lovelace, 1842\">\n * The Analytical Engine has no pretensions to originate anything.\n * </Blockquote>\n *\n * <Blockquote variant=\"warning\" icon={<Icon icon={Warning} size={16} />}>\n * This API is deprecated and will be removed in v3.\n * </Blockquote>\n * ```\n */\nexport
|
|
1
|
+
{"version":3,"file":"Blockquote.cjs","names":[],"sources":["../../../src/components/Blockquote/Blockquote.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\n\nimport styles from './Blockquote.module.css';\n\n// ─── Types ────────────────────────────────────────────────────────────────────\n\nexport type BlockquoteVariant = 'default' | 'info' | 'warning' | 'error' | 'success';\n\nexport interface BlockquoteProps extends HTMLAttributes<HTMLQuoteElement> {\n /**\n * Visual emphasis style.\n * - `\"default\"` — neutral left border; use for general quotations.\n * - `\"info\"` — accent blue; use for tips and noteworthy passages.\n * - `\"warning\"` — yellow; use for cautionary content.\n * - `\"error\"` — red; use for critical or deprecated content.\n * - `\"success\"` — green; use for positive or approved content.\n */\n variant?: BlockquoteVariant;\n /**\n * Optional icon displayed to the left of the quoted text.\n * Typically a 16 px `<Icon>` component.\n */\n icon?: ReactNode;\n /**\n * Attribution rendered below the quote — author name, source title, etc.\n * Rendered inside a `<footer><cite>` for semantic correctness.\n */\n cite?: ReactNode;\n /** The quoted content. */\n children: ReactNode;\n}\n\n// ─── Component ────────────────────────────────────────────────────────────────\n\n/**\n * Styled pull-quote with semantic `<blockquote>` markup.\n *\n * Supports five visual variants and optional icon + attribution.\n *\n * ```tsx\n * <Blockquote variant=\"info\" cite=\"Ada Lovelace, 1842\">\n * The Analytical Engine has no pretensions to originate anything.\n * </Blockquote>\n *\n * <Blockquote variant=\"warning\" icon={<Icon icon={Warning} size={16} />}>\n * This API is deprecated and will be removed in v3.\n * </Blockquote>\n * ```\n */\nexport const Blockquote = ({\n variant = 'default',\n icon,\n cite,\n children,\n className,\n ...props\n}: BlockquoteProps) => {\n return (\n <blockquote\n className={[styles.blockquote, styles[variant], className].filter(Boolean).join(' ')}\n {...props}\n >\n <div className={styles.body}>\n {icon && (\n <span className={styles.icon} aria-hidden=\"true\">\n {icon}\n </span>\n )}\n <p className={styles.content}>{children}</p>\n </div>\n\n {cite !== undefined && (\n <footer className={styles.footer}>\n <cite className={styles.cite}>{cite}</cite>\n </footer>\n )}\n </blockquote>\n );\n};\n"],"mappings":"kFAiDA,IAAa,GAAc,CACzB,UAAU,UACV,OACA,OACA,WACA,YACA,GAAG,MAGD,EAAA,EAAA,MAAC,aAAD,CACE,UAAW,CAAC,EAAA,QAAO,WAAY,EAAA,QAAO,GAAU,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,EACnF,GAAI,WAFN,EAIE,EAAA,EAAA,MAAC,MAAD,CAAK,UAAW,EAAA,QAAO,cAAvB,CACG,IACC,EAAA,EAAA,KAAC,OAAD,CAAM,UAAW,EAAA,QAAO,KAAM,cAAY,gBACvC,CACG,CAAA,GAER,EAAA,EAAA,KAAC,IAAD,CAAG,UAAW,EAAA,QAAO,QAAU,UAAY,CAAA,CACxC,IAEJ,IAAS,IAAA,KACR,EAAA,EAAA,KAAC,SAAD,CAAQ,UAAW,EAAA,QAAO,iBACxB,EAAA,EAAA,KAAC,OAAD,CAAM,UAAW,EAAA,QAAO,cAAO,CAAW,CAAA,CACpC,CAAA,CAEA"}
|
|
@@ -38,4 +38,4 @@ export interface BlockquoteProps extends HTMLAttributes<HTMLQuoteElement> {
|
|
|
38
38
|
* </Blockquote>
|
|
39
39
|
* ```
|
|
40
40
|
*/
|
|
41
|
-
export declare
|
|
41
|
+
export declare const Blockquote: ({ variant, icon, cite, children, className, ...props }: BlockquoteProps) => import("react/jsx-runtime").JSX.Element;
|