@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
package/dist/components/Text.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("./Text/Text.cjs");exports.Text=e.Text;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(
|
|
1
|
+
const e=require("./TextField.module.css.cjs");let t=require("react"),n=require("react/jsx-runtime");var r=({label:r,helperText:i,error:a,id:o,className:s,disabled:c,...l})=>{let u=(0,t.useId)(),d=o??u,f=`${d}-help`;return(0,n.jsxs)(`div`,{className:[e.default.wrapper,c?e.default.disabled:null].filter(Boolean).join(` `),children:[r&&(0,n.jsx)(`label`,{htmlFor:d,className:e.default.label,children:r}),(0,n.jsx)(`input`,{id:d,disabled:c,"aria-describedby":a||i?f:void 0,"aria-invalid":a?!0:void 0,className:[e.default.input,a?e.default.errorInput:null,s].filter(Boolean).join(` `),...l}),(a||i)&&(0,n.jsx)(`span`,{id:f,className:[e.default.hint,a?e.default.errorHint:null].filter(Boolean).join(` `),children:a??i})]})};exports.TextField=r;
|
|
2
2
|
//# sourceMappingURL=TextField.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextField.cjs","names":[],"sources":["../../../src/components/TextField/TextField.tsx"],"sourcesContent":["import { type InputHTMLAttributes, useId } from 'react';\n\nimport styles from './TextField.module.css';\n\nexport interface TextFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'id'> {\n /** Visible label rendered above the input. */\n label?: string;\n /** Helper text rendered below the input. Hidden when `error` is set. */\n helperText?: string;\n /**\n * Error message rendered below the input in place of `helperText`.\n * Also applies the error visual state to the input border.\n */\n error?: string;\n /** Explicit id. Auto-generated when omitted. */\n id?: string;\n}\n\n/**\n * Single-line text input with label, helper text, and error state.\n *\n * Follows the Adwaita `GtkEntry` / `.entry` style class.\n *\n * @see https://developer.gnome.org/hig/patterns/controls/text-fields.html\n */\nexport
|
|
1
|
+
{"version":3,"file":"TextField.cjs","names":[],"sources":["../../../src/components/TextField/TextField.tsx"],"sourcesContent":["import { type InputHTMLAttributes, useId } from 'react';\n\nimport styles from './TextField.module.css';\n\nexport interface TextFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'id'> {\n /** Visible label rendered above the input. */\n label?: string;\n /** Helper text rendered below the input. Hidden when `error` is set. */\n helperText?: string;\n /**\n * Error message rendered below the input in place of `helperText`.\n * Also applies the error visual state to the input border.\n */\n error?: string;\n /** Explicit id. Auto-generated when omitted. */\n id?: string;\n}\n\n/**\n * Single-line text input with label, helper text, and error state.\n *\n * Follows the Adwaita `GtkEntry` / `.entry` style class.\n *\n * @see https://developer.gnome.org/hig/patterns/controls/text-fields.html\n */\nexport const TextField = ({\n label,\n helperText,\n error,\n id: idProp,\n className,\n disabled,\n ...props\n}: TextFieldProps) => {\n const autoId = useId();\n const id = idProp ?? autoId;\n const helpId = `${id}-help`;\n\n return (\n <div className={[styles.wrapper, disabled ? styles.disabled : null].filter(Boolean).join(' ')}>\n {label && (\n <label htmlFor={id} className={styles.label}>\n {label}\n </label>\n )}\n\n <input\n id={id}\n disabled={disabled}\n aria-describedby={error || helperText ? helpId : undefined}\n aria-invalid={error ? true : undefined}\n className={[styles.input, error ? styles.errorInput : null, className]\n .filter(Boolean)\n .join(' ')}\n {...props}\n />\n\n {(error || helperText) && (\n <span\n id={helpId}\n className={[styles.hint, error ? styles.errorHint : null].filter(Boolean).join(' ')}\n >\n {error ?? helperText}\n </span>\n )}\n </div>\n );\n};\n"],"mappings":"oGAyBA,IAAa,GAAa,CACxB,QACA,aACA,QACA,GAAI,EACJ,YACA,WACA,GAAG,KACiB,CACpB,IAAM,GAAA,EAAA,EAAA,OAAe,EACf,EAAK,GAAU,EACf,EAAS,GAAG,EAAG,OAErB,OACE,EAAA,EAAA,MAAC,MAAD,CAAK,UAAW,CAAC,EAAA,QAAO,QAAS,EAAW,EAAA,QAAO,SAAW,IAAI,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,WAA5F,CACG,IACC,EAAA,EAAA,KAAC,QAAD,CAAO,QAAS,EAAI,UAAW,EAAA,QAAO,eACnC,CACI,CAAA,GAGT,EAAA,EAAA,KAAC,QAAD,CACM,KACM,WACV,mBAAkB,GAAS,EAAa,EAAS,IAAA,GACjD,eAAc,EAAQ,GAAO,IAAA,GAC7B,UAAW,CAAC,EAAA,QAAO,MAAO,EAAQ,EAAA,QAAO,WAAa,KAAM,CAAS,EAClE,OAAO,OAAO,EACd,KAAK,GAAG,EACX,GAAI,CACL,CAAA,GAEC,GAAS,KACT,EAAA,EAAA,KAAC,OAAD,CACE,GAAI,EACJ,UAAW,CAAC,EAAA,QAAO,KAAM,EAAQ,EAAA,QAAO,UAAY,IAAI,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,WAEjF,GAAS,CACN,CAAA,CAEL,GAET"}
|
|
@@ -19,4 +19,4 @@ export interface TextFieldProps extends Omit<InputHTMLAttributes<HTMLInputElemen
|
|
|
19
19
|
*
|
|
20
20
|
* @see https://developer.gnome.org/hig/patterns/controls/text-fields.html
|
|
21
21
|
*/
|
|
22
|
-
export declare
|
|
22
|
+
export declare const TextField: ({ label, helperText, error, id: idProp, className, disabled, ...props }: TextFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,7 +2,7 @@ import e from "./TextField.module.css.js";
|
|
|
2
2
|
import { useId as t } from "react";
|
|
3
3
|
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/TextField/TextField.tsx
|
|
5
|
-
|
|
5
|
+
var i = ({ label: i, helperText: a, error: o, id: s, className: c, disabled: l, ...u }) => {
|
|
6
6
|
let d = t(), f = s ?? d, p = `${f}-help`;
|
|
7
7
|
return /* @__PURE__ */ r("div", {
|
|
8
8
|
className: [e.wrapper, l ? e.disabled : null].filter(Boolean).join(" "),
|
|
@@ -31,7 +31,7 @@ function i({ label: i, helperText: a, error: o, id: s, className: c, disabled: l
|
|
|
31
31
|
})
|
|
32
32
|
]
|
|
33
33
|
});
|
|
34
|
-
}
|
|
34
|
+
};
|
|
35
35
|
//#endregion
|
|
36
36
|
export { i as TextField };
|
|
37
37
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextField.js","names":[],"sources":["../../../src/components/TextField/TextField.tsx"],"sourcesContent":["import { type InputHTMLAttributes, useId } from 'react';\n\nimport styles from './TextField.module.css';\n\nexport interface TextFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'id'> {\n /** Visible label rendered above the input. */\n label?: string;\n /** Helper text rendered below the input. Hidden when `error` is set. */\n helperText?: string;\n /**\n * Error message rendered below the input in place of `helperText`.\n * Also applies the error visual state to the input border.\n */\n error?: string;\n /** Explicit id. Auto-generated when omitted. */\n id?: string;\n}\n\n/**\n * Single-line text input with label, helper text, and error state.\n *\n * Follows the Adwaita `GtkEntry` / `.entry` style class.\n *\n * @see https://developer.gnome.org/hig/patterns/controls/text-fields.html\n */\nexport
|
|
1
|
+
{"version":3,"file":"TextField.js","names":[],"sources":["../../../src/components/TextField/TextField.tsx"],"sourcesContent":["import { type InputHTMLAttributes, useId } from 'react';\n\nimport styles from './TextField.module.css';\n\nexport interface TextFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'id'> {\n /** Visible label rendered above the input. */\n label?: string;\n /** Helper text rendered below the input. Hidden when `error` is set. */\n helperText?: string;\n /**\n * Error message rendered below the input in place of `helperText`.\n * Also applies the error visual state to the input border.\n */\n error?: string;\n /** Explicit id. Auto-generated when omitted. */\n id?: string;\n}\n\n/**\n * Single-line text input with label, helper text, and error state.\n *\n * Follows the Adwaita `GtkEntry` / `.entry` style class.\n *\n * @see https://developer.gnome.org/hig/patterns/controls/text-fields.html\n */\nexport const TextField = ({\n label,\n helperText,\n error,\n id: idProp,\n className,\n disabled,\n ...props\n}: TextFieldProps) => {\n const autoId = useId();\n const id = idProp ?? autoId;\n const helpId = `${id}-help`;\n\n return (\n <div className={[styles.wrapper, disabled ? styles.disabled : null].filter(Boolean).join(' ')}>\n {label && (\n <label htmlFor={id} className={styles.label}>\n {label}\n </label>\n )}\n\n <input\n id={id}\n disabled={disabled}\n aria-describedby={error || helperText ? helpId : undefined}\n aria-invalid={error ? true : undefined}\n className={[styles.input, error ? styles.errorInput : null, className]\n .filter(Boolean)\n .join(' ')}\n {...props}\n />\n\n {(error || helperText) && (\n <span\n id={helpId}\n className={[styles.hint, error ? styles.errorHint : null].filter(Boolean).join(' ')}\n >\n {error ?? helperText}\n </span>\n )}\n </div>\n );\n};\n"],"mappings":";;;;AAyBA,IAAa,KAAa,EACxB,UACA,eACA,UACA,IAAI,GACJ,cACA,aACA,GAAG,QACiB;CACpB,IAAM,IAAS,EAAM,GACf,IAAK,KAAU,GACf,IAAS,GAAG,EAAG;CAErB,OACE,kBAAC,OAAD;EAAK,WAAW,CAAC,EAAO,SAAS,IAAW,EAAO,WAAW,IAAI,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;YAA5F;GACG,KACC,kBAAC,SAAD;IAAO,SAAS;IAAI,WAAW,EAAO;cACnC;GACI,CAAA;GAGT,kBAAC,SAAD;IACM;IACM;IACV,oBAAkB,KAAS,IAAa,IAAS,KAAA;IACjD,gBAAc,IAAQ,KAAO,KAAA;IAC7B,WAAW;KAAC,EAAO;KAAO,IAAQ,EAAO,aAAa;KAAM;IAAS,EAClE,OAAO,OAAO,EACd,KAAK,GAAG;IACX,GAAI;GACL,CAAA;IAEC,KAAS,MACT,kBAAC,QAAD;IACE,IAAI;IACJ,WAAW,CAAC,EAAO,MAAM,IAAQ,EAAO,YAAY,IAAI,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;cAEjF,KAAS;GACN,CAAA;EAEL;;AAET"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./TextField/TextField.cjs");exports.TextField=e.TextField;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(
|
|
1
|
+
const e=require("./Timeline.module.css.cjs");let t=require("react/jsx-runtime");var n=({items:n,orientation:r=`vertical`,variant:i=`default`,className:a,...o})=>{let s=r===`horizontal`,c=i!==`none`;return(0,t.jsx)(`div`,{role:`list`,className:[e.default.root,s?e.default.horizontal:e.default.vertical,a].filter(Boolean).join(` `),...o,children:n.map((r,a)=>{let o=a===0,l=a===n.length-1,u=[e.default.line,i===`dotted`?e.default.lineDotted:null].filter(Boolean).join(` `),d=(0,t.jsx)(`div`,{className:[e.default.node,r.icon?e.default.nodeWithIcon:e.default.nodeDot].filter(Boolean).join(` `),children:r.icon&&(0,t.jsx)(`span`,{className:e.default.iconWrap,"aria-hidden":`true`,children:r.icon})});return(0,t.jsxs)(`div`,{role:`listitem`,className:e.default.item,children:[(0,t.jsx)(`div`,{className:e.default.leading,children:r.leading}),s?(0,t.jsxs)(`div`,{className:e.default.nodeTrack,children:[(0,t.jsx)(`div`,{className:[e.default.line,i===`dotted`?e.default.lineDotted:null,o||!c?e.default.lineInvisible:null].filter(Boolean).join(` `),"aria-hidden":`true`}),d,(0,t.jsx)(`div`,{className:[e.default.line,i===`dotted`?e.default.lineDotted:null,l||!c?e.default.lineInvisible:null].filter(Boolean).join(` `),"aria-hidden":`true`})]}):(0,t.jsxs)(`div`,{className:e.default.nodeTrack,children:[d,!l&&c&&(0,t.jsx)(`div`,{className:u,"aria-hidden":`true`})]}),(0,t.jsx)(`div`,{className:e.default.content,children:r.content})]},a)})})};exports.Timeline=n;
|
|
2
2
|
//# sourceMappingURL=Timeline.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Timeline.cjs","names":[],"sources":["../../../src/components/Timeline/Timeline.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\n\nimport styles from './Timeline.module.css';\n\n// ─── Types ────────────────────────────────────────────────────────────────────\n\nexport type TimelineOrientation = 'vertical' | 'horizontal';\nexport type TimelineVariant = 'default' | 'dotted' | 'none';\n\nexport interface TimelineItem {\n /** Icon rendered inside the timeline node. */\n icon?: ReactNode;\n /**\n * Content at the leading edge of the node.\n * - **Vertical:** rendered to the left of the connector track.\n * - **Horizontal:** rendered above the node.\n *\n * Typical use: timestamp, badge, short label.\n */\n leading?: ReactNode;\n /** Main event content rendered adjacent to the node (title, description…). */\n content: ReactNode;\n}\n\nexport interface TimelineProps extends HTMLAttributes<HTMLDivElement> {\n /** Ordered list of timeline events. */\n items: TimelineItem[];\n /**\n * Axis direction of the connector line.\n * - `\"vertical\"` — events stack top-to-bottom (default).\n * - `\"horizontal\"` — events flow left-to-right (stepper / progress pattern).\n */\n orientation?: TimelineOrientation;\n /**\n * Visual style of the connector between nodes.\n * - `\"default\"` — solid thin line.\n * - `\"dotted\"` — dotted line; useful for future or pending events.\n * - `\"none\"` — no connector; each node stands alone.\n */\n variant?: TimelineVariant;\n}\n\n// ─── Component ────────────────────────────────────────────────────────────────\n\n/**\n * Ordered sequence of events connected by a visual timeline.\n *\n * Supports two orientations — vertical (activity feed, history log) and\n * horizontal (stepper, progress indicator) — and three connector styles.\n *\n * ```tsx\n * <Timeline\n * items={[\n * {\n * leading: <Text variant=\"caption\" color=\"dim\">10:32</Text>,\n * icon: <Icon icon={Check} />,\n * content: <Text variant=\"body\">Approved</Text>,\n * },\n * ]}\n * />\n *\n * <Timeline orientation=\"horizontal\" variant=\"dotted\" items={steps} />\n * ```\n */\nexport
|
|
1
|
+
{"version":3,"file":"Timeline.cjs","names":[],"sources":["../../../src/components/Timeline/Timeline.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\n\nimport styles from './Timeline.module.css';\n\n// ─── Types ────────────────────────────────────────────────────────────────────\n\nexport type TimelineOrientation = 'vertical' | 'horizontal';\nexport type TimelineVariant = 'default' | 'dotted' | 'none';\n\nexport interface TimelineItem {\n /** Icon rendered inside the timeline node. */\n icon?: ReactNode;\n /**\n * Content at the leading edge of the node.\n * - **Vertical:** rendered to the left of the connector track.\n * - **Horizontal:** rendered above the node.\n *\n * Typical use: timestamp, badge, short label.\n */\n leading?: ReactNode;\n /** Main event content rendered adjacent to the node (title, description…). */\n content: ReactNode;\n}\n\nexport interface TimelineProps extends HTMLAttributes<HTMLDivElement> {\n /** Ordered list of timeline events. */\n items: TimelineItem[];\n /**\n * Axis direction of the connector line.\n * - `\"vertical\"` — events stack top-to-bottom (default).\n * - `\"horizontal\"` — events flow left-to-right (stepper / progress pattern).\n */\n orientation?: TimelineOrientation;\n /**\n * Visual style of the connector between nodes.\n * - `\"default\"` — solid thin line.\n * - `\"dotted\"` — dotted line; useful for future or pending events.\n * - `\"none\"` — no connector; each node stands alone.\n */\n variant?: TimelineVariant;\n}\n\n// ─── Component ────────────────────────────────────────────────────────────────\n\n/**\n * Ordered sequence of events connected by a visual timeline.\n *\n * Supports two orientations — vertical (activity feed, history log) and\n * horizontal (stepper, progress indicator) — and three connector styles.\n *\n * ```tsx\n * <Timeline\n * items={[\n * {\n * leading: <Text variant=\"caption\" color=\"dim\">10:32</Text>,\n * icon: <Icon icon={Check} />,\n * content: <Text variant=\"body\">Approved</Text>,\n * },\n * ]}\n * />\n *\n * <Timeline orientation=\"horizontal\" variant=\"dotted\" items={steps} />\n * ```\n */\nexport const Timeline = ({\n items,\n orientation = 'vertical',\n variant = 'default',\n className,\n ...props\n}: TimelineProps) => {\n const horizontal = orientation === 'horizontal';\n const showLine = variant !== 'none';\n\n return (\n <div\n role=\"list\"\n className={[styles.root, horizontal ? styles.horizontal : styles.vertical, className]\n .filter(Boolean)\n .join(' ')}\n {...props}\n >\n {items.map((item, i) => {\n const isFirst = i === 0;\n const isLast = i === items.length - 1;\n\n const lineClass = [styles.line, variant === 'dotted' ? styles.lineDotted : null]\n .filter(Boolean)\n .join(' ');\n\n const node = (\n <div\n className={[styles.node, item.icon ? styles.nodeWithIcon : styles.nodeDot]\n .filter(Boolean)\n .join(' ')}\n >\n {item.icon && (\n <span className={styles.iconWrap} aria-hidden=\"true\">\n {item.icon}\n </span>\n )}\n </div>\n );\n\n return (\n <div key={i} role=\"listitem\" className={styles.item}>\n {/* ── Leading (timestamp / label) ── */}\n {/* Always rendered — even when empty — so every item has the same\n 3 children (leading · nodeTrack · content) that map to the\n subgrid columns (vertical) or rows (horizontal). */}\n <div className={styles.leading}>{item.leading}</div>\n\n {/* ── Node track ── */}\n {horizontal ? (\n /*\n * Always render both half-lines so the node stays centered in\n * the item regardless of its position. Edge lines are hidden\n * with visibility:hidden (take space, invisible).\n */\n <div className={styles.nodeTrack}>\n <div\n className={[\n styles.line,\n variant === 'dotted' ? styles.lineDotted : null,\n isFirst || !showLine ? styles.lineInvisible : null,\n ]\n .filter(Boolean)\n .join(' ')}\n aria-hidden=\"true\"\n />\n {node}\n <div\n className={[\n styles.line,\n variant === 'dotted' ? styles.lineDotted : null,\n isLast || !showLine ? styles.lineInvisible : null,\n ]\n .filter(Boolean)\n .join(' ')}\n aria-hidden=\"true\"\n />\n </div>\n ) : (\n <div className={styles.nodeTrack}>\n {node}\n {!isLast && showLine && <div className={lineClass} aria-hidden=\"true\" />}\n </div>\n )}\n\n {/* ── Content ── */}\n <div className={styles.content}>{item.content}</div>\n </div>\n );\n })}\n </div>\n );\n};\n"],"mappings":"gFAgEA,IAAa,GAAY,CACvB,QACA,cAAc,WACd,UAAU,UACV,YACA,GAAG,KACgB,CACnB,IAAM,EAAa,IAAgB,aAC7B,EAAW,IAAY,OAE7B,OACE,EAAA,EAAA,KAAC,MAAD,CACE,KAAK,OACL,UAAW,CAAC,EAAA,QAAO,KAAM,EAAa,EAAA,QAAO,WAAa,EAAA,QAAO,SAAU,CAAS,EACjF,OAAO,OAAO,EACd,KAAK,GAAG,EACX,GAAI,WAEH,EAAM,KAAK,EAAM,IAAM,CACtB,IAAM,EAAU,IAAM,EAChB,EAAS,IAAM,EAAM,OAAS,EAE9B,EAAY,CAAC,EAAA,QAAO,KAAM,IAAY,SAAW,EAAA,QAAO,WAAa,IAAI,EAC5E,OAAO,OAAO,EACd,KAAK,GAAG,EAEL,GACJ,EAAA,EAAA,KAAC,MAAD,CACE,UAAW,CAAC,EAAA,QAAO,KAAM,EAAK,KAAO,EAAA,QAAO,aAAe,EAAA,QAAO,OAAO,EACtE,OAAO,OAAO,EACd,KAAK,GAAG,WAEV,EAAK,OACJ,EAAA,EAAA,KAAC,OAAD,CAAM,UAAW,EAAA,QAAO,SAAU,cAAY,gBAC3C,EAAK,IACF,CAAA,CAEL,CAAA,EAGP,OACE,EAAA,EAAA,MAAC,MAAD,CAAa,KAAK,WAAW,UAAW,EAAA,QAAO,cAA/C,EAKE,EAAA,EAAA,KAAC,MAAD,CAAK,UAAW,EAAA,QAAO,iBAAU,EAAK,OAAa,CAAA,EAGlD,GAMC,EAAA,EAAA,MAAC,MAAD,CAAK,UAAW,EAAA,QAAO,mBAAvB,EACE,EAAA,EAAA,KAAC,MAAD,CACE,UAAW,CACT,EAAA,QAAO,KACP,IAAY,SAAW,EAAA,QAAO,WAAa,KAC3C,GAAW,CAAC,EAAW,EAAA,QAAO,cAAgB,IAChD,EACG,OAAO,OAAO,EACd,KAAK,GAAG,EACX,cAAY,MACb,CAAA,EACA,GACD,EAAA,EAAA,KAAC,MAAD,CACE,UAAW,CACT,EAAA,QAAO,KACP,IAAY,SAAW,EAAA,QAAO,WAAa,KAC3C,GAAU,CAAC,EAAW,EAAA,QAAO,cAAgB,IAC/C,EACG,OAAO,OAAO,EACd,KAAK,GAAG,EACX,cAAY,MACb,CAAA,CACE,KAEL,EAAA,EAAA,MAAC,MAAD,CAAK,UAAW,EAAA,QAAO,mBAAvB,CACG,EACA,CAAC,GAAU,IAAY,EAAA,EAAA,KAAC,MAAD,CAAK,UAAW,EAAW,cAAY,MAAQ,CAAA,CACpE,KAIP,EAAA,EAAA,KAAC,MAAD,CAAK,UAAW,EAAA,QAAO,iBAAU,EAAK,OAAa,CAAA,CAChD,GA9CK,CA8CL,CAET,CAAC,CACE,CAAA,CAET"}
|
|
@@ -52,4 +52,4 @@ export interface TimelineProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
52
52
|
* <Timeline orientation="horizontal" variant="dotted" items={steps} />
|
|
53
53
|
* ```
|
|
54
54
|
*/
|
|
55
|
-
export declare
|
|
55
|
+
export declare const Timeline: ({ items, orientation, variant, className, ...props }: TimelineProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e from "./Timeline.module.css.js";
|
|
2
2
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
3
|
//#region src/components/Timeline/Timeline.tsx
|
|
4
|
-
|
|
4
|
+
var r = ({ items: r, orientation: i = "vertical", variant: a = "default", className: o, ...s }) => {
|
|
5
5
|
let c = i === "horizontal", l = a !== "none";
|
|
6
6
|
return /* @__PURE__ */ t("div", {
|
|
7
7
|
role: "list",
|
|
@@ -64,7 +64,7 @@ function r({ items: r, orientation: i = "vertical", variant: a = "default", clas
|
|
|
64
64
|
}, o);
|
|
65
65
|
})
|
|
66
66
|
});
|
|
67
|
-
}
|
|
67
|
+
};
|
|
68
68
|
//#endregion
|
|
69
69
|
export { r as Timeline };
|
|
70
70
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Timeline.js","names":[],"sources":["../../../src/components/Timeline/Timeline.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\n\nimport styles from './Timeline.module.css';\n\n// ─── Types ────────────────────────────────────────────────────────────────────\n\nexport type TimelineOrientation = 'vertical' | 'horizontal';\nexport type TimelineVariant = 'default' | 'dotted' | 'none';\n\nexport interface TimelineItem {\n /** Icon rendered inside the timeline node. */\n icon?: ReactNode;\n /**\n * Content at the leading edge of the node.\n * - **Vertical:** rendered to the left of the connector track.\n * - **Horizontal:** rendered above the node.\n *\n * Typical use: timestamp, badge, short label.\n */\n leading?: ReactNode;\n /** Main event content rendered adjacent to the node (title, description…). */\n content: ReactNode;\n}\n\nexport interface TimelineProps extends HTMLAttributes<HTMLDivElement> {\n /** Ordered list of timeline events. */\n items: TimelineItem[];\n /**\n * Axis direction of the connector line.\n * - `\"vertical\"` — events stack top-to-bottom (default).\n * - `\"horizontal\"` — events flow left-to-right (stepper / progress pattern).\n */\n orientation?: TimelineOrientation;\n /**\n * Visual style of the connector between nodes.\n * - `\"default\"` — solid thin line.\n * - `\"dotted\"` — dotted line; useful for future or pending events.\n * - `\"none\"` — no connector; each node stands alone.\n */\n variant?: TimelineVariant;\n}\n\n// ─── Component ────────────────────────────────────────────────────────────────\n\n/**\n * Ordered sequence of events connected by a visual timeline.\n *\n * Supports two orientations — vertical (activity feed, history log) and\n * horizontal (stepper, progress indicator) — and three connector styles.\n *\n * ```tsx\n * <Timeline\n * items={[\n * {\n * leading: <Text variant=\"caption\" color=\"dim\">10:32</Text>,\n * icon: <Icon icon={Check} />,\n * content: <Text variant=\"body\">Approved</Text>,\n * },\n * ]}\n * />\n *\n * <Timeline orientation=\"horizontal\" variant=\"dotted\" items={steps} />\n * ```\n */\nexport
|
|
1
|
+
{"version":3,"file":"Timeline.js","names":[],"sources":["../../../src/components/Timeline/Timeline.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\n\nimport styles from './Timeline.module.css';\n\n// ─── Types ────────────────────────────────────────────────────────────────────\n\nexport type TimelineOrientation = 'vertical' | 'horizontal';\nexport type TimelineVariant = 'default' | 'dotted' | 'none';\n\nexport interface TimelineItem {\n /** Icon rendered inside the timeline node. */\n icon?: ReactNode;\n /**\n * Content at the leading edge of the node.\n * - **Vertical:** rendered to the left of the connector track.\n * - **Horizontal:** rendered above the node.\n *\n * Typical use: timestamp, badge, short label.\n */\n leading?: ReactNode;\n /** Main event content rendered adjacent to the node (title, description…). */\n content: ReactNode;\n}\n\nexport interface TimelineProps extends HTMLAttributes<HTMLDivElement> {\n /** Ordered list of timeline events. */\n items: TimelineItem[];\n /**\n * Axis direction of the connector line.\n * - `\"vertical\"` — events stack top-to-bottom (default).\n * - `\"horizontal\"` — events flow left-to-right (stepper / progress pattern).\n */\n orientation?: TimelineOrientation;\n /**\n * Visual style of the connector between nodes.\n * - `\"default\"` — solid thin line.\n * - `\"dotted\"` — dotted line; useful for future or pending events.\n * - `\"none\"` — no connector; each node stands alone.\n */\n variant?: TimelineVariant;\n}\n\n// ─── Component ────────────────────────────────────────────────────────────────\n\n/**\n * Ordered sequence of events connected by a visual timeline.\n *\n * Supports two orientations — vertical (activity feed, history log) and\n * horizontal (stepper, progress indicator) — and three connector styles.\n *\n * ```tsx\n * <Timeline\n * items={[\n * {\n * leading: <Text variant=\"caption\" color=\"dim\">10:32</Text>,\n * icon: <Icon icon={Check} />,\n * content: <Text variant=\"body\">Approved</Text>,\n * },\n * ]}\n * />\n *\n * <Timeline orientation=\"horizontal\" variant=\"dotted\" items={steps} />\n * ```\n */\nexport const Timeline = ({\n items,\n orientation = 'vertical',\n variant = 'default',\n className,\n ...props\n}: TimelineProps) => {\n const horizontal = orientation === 'horizontal';\n const showLine = variant !== 'none';\n\n return (\n <div\n role=\"list\"\n className={[styles.root, horizontal ? styles.horizontal : styles.vertical, className]\n .filter(Boolean)\n .join(' ')}\n {...props}\n >\n {items.map((item, i) => {\n const isFirst = i === 0;\n const isLast = i === items.length - 1;\n\n const lineClass = [styles.line, variant === 'dotted' ? styles.lineDotted : null]\n .filter(Boolean)\n .join(' ');\n\n const node = (\n <div\n className={[styles.node, item.icon ? styles.nodeWithIcon : styles.nodeDot]\n .filter(Boolean)\n .join(' ')}\n >\n {item.icon && (\n <span className={styles.iconWrap} aria-hidden=\"true\">\n {item.icon}\n </span>\n )}\n </div>\n );\n\n return (\n <div key={i} role=\"listitem\" className={styles.item}>\n {/* ── Leading (timestamp / label) ── */}\n {/* Always rendered — even when empty — so every item has the same\n 3 children (leading · nodeTrack · content) that map to the\n subgrid columns (vertical) or rows (horizontal). */}\n <div className={styles.leading}>{item.leading}</div>\n\n {/* ── Node track ── */}\n {horizontal ? (\n /*\n * Always render both half-lines so the node stays centered in\n * the item regardless of its position. Edge lines are hidden\n * with visibility:hidden (take space, invisible).\n */\n <div className={styles.nodeTrack}>\n <div\n className={[\n styles.line,\n variant === 'dotted' ? styles.lineDotted : null,\n isFirst || !showLine ? styles.lineInvisible : null,\n ]\n .filter(Boolean)\n .join(' ')}\n aria-hidden=\"true\"\n />\n {node}\n <div\n className={[\n styles.line,\n variant === 'dotted' ? styles.lineDotted : null,\n isLast || !showLine ? styles.lineInvisible : null,\n ]\n .filter(Boolean)\n .join(' ')}\n aria-hidden=\"true\"\n />\n </div>\n ) : (\n <div className={styles.nodeTrack}>\n {node}\n {!isLast && showLine && <div className={lineClass} aria-hidden=\"true\" />}\n </div>\n )}\n\n {/* ── Content ── */}\n <div className={styles.content}>{item.content}</div>\n </div>\n );\n })}\n </div>\n );\n};\n"],"mappings":";;;AAgEA,IAAa,KAAY,EACvB,UACA,iBAAc,YACd,aAAU,WACV,cACA,GAAG,QACgB;CACnB,IAAM,IAAa,MAAgB,cAC7B,IAAW,MAAY;CAE7B,OACE,kBAAC,OAAD;EACE,MAAK;EACL,WAAW;GAAC,EAAO;GAAM,IAAa,EAAO,aAAa,EAAO;GAAU;EAAS,EACjF,OAAO,OAAO,EACd,KAAK,GAAG;EACX,GAAI;YAEH,EAAM,KAAK,GAAM,MAAM;GACtB,IAAM,IAAU,MAAM,GAChB,IAAS,MAAM,EAAM,SAAS,GAE9B,IAAY,CAAC,EAAO,MAAM,MAAY,WAAW,EAAO,aAAa,IAAI,EAC5E,OAAO,OAAO,EACd,KAAK,GAAG,GAEL,IACJ,kBAAC,OAAD;IACE,WAAW,CAAC,EAAO,MAAM,EAAK,OAAO,EAAO,eAAe,EAAO,OAAO,EACtE,OAAO,OAAO,EACd,KAAK,GAAG;cAEV,EAAK,QACJ,kBAAC,QAAD;KAAM,WAAW,EAAO;KAAU,eAAY;eAC3C,EAAK;IACF,CAAA;GAEL,CAAA;GAGP,OACE,kBAAC,OAAD;IAAa,MAAK;IAAW,WAAW,EAAO;cAA/C;KAKE,kBAAC,OAAD;MAAK,WAAW,EAAO;gBAAU,EAAK;KAAa,CAAA;KAGlD,IAMC,kBAAC,OAAD;MAAK,WAAW,EAAO;gBAAvB;OACE,kBAAC,OAAD;QACE,WAAW;SACT,EAAO;SACP,MAAY,WAAW,EAAO,aAAa;SAC3C,KAAW,CAAC,IAAW,EAAO,gBAAgB;QAChD,EACG,OAAO,OAAO,EACd,KAAK,GAAG;QACX,eAAY;OACb,CAAA;OACA;OACD,kBAAC,OAAD;QACE,WAAW;SACT,EAAO;SACP,MAAY,WAAW,EAAO,aAAa;SAC3C,KAAU,CAAC,IAAW,EAAO,gBAAgB;QAC/C,EACG,OAAO,OAAO,EACd,KAAK,GAAG;QACX,eAAY;OACb,CAAA;MACE;UAEL,kBAAC,OAAD;MAAK,WAAW,EAAO;gBAAvB,CACG,GACA,CAAC,KAAU,KAAY,kBAAC,OAAD;OAAK,WAAW;OAAW,eAAY;MAAQ,CAAA,CACpE;;KAIP,kBAAC,OAAD;MAAK,WAAW,EAAO;gBAAU,EAAK;KAAa,CAAA;IAChD;MA9CK,CA8CL;EAET,CAAC;CACE,CAAA;AAET"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./Timeline/Timeline.cjs");exports.Timeline=e.Timeline;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(
|
|
1
|
+
const e=require("../Icon/Icon.cjs"),t=require("./Toast.module.css.cjs");let n=require("react"),r=require("react/jsx-runtime"),i=require("@gnome-ui/icons");var a=({title:a,duration:o=3e3,onDismiss:s,actionLabel:c,onAction:l,dismissible:u=!1,className:d,...f})=>{let p=(0,n.useRef)(null),m=(0,n.useRef)(o),h=(0,n.useRef)(0),g=(0,n.useCallback)(()=>{p.current&&=(clearTimeout(p.current),null)},[]),_=(0,n.useCallback)(e=>{e<=0||!s||(g(),h.current=Date.now(),p.current=setTimeout(()=>s(),e))},[s,g]);(0,n.useEffect)(()=>(o>0&&(m.current=o,_(o)),g),[o,_,g]);let v=()=>{if(p.current){let e=Date.now()-h.current;m.current=Math.max(0,m.current-e),g()}},y=()=>{_(m.current)},b=()=>{g(),l?.(),s?.()};return(0,r.jsxs)(`div`,{role:`status`,"aria-live":`polite`,"aria-atomic":`true`,className:[t.default.toast,d].filter(Boolean).join(` `),onMouseEnter:v,onMouseLeave:y,onFocus:v,onBlur:y,...f,children:[(0,r.jsx)(`span`,{className:t.default.title,children:a}),(c||u)&&(0,r.jsxs)(`span`,{className:t.default.actions,children:[c&&(0,r.jsx)(`button`,{type:`button`,className:t.default.actionBtn,onClick:b,children:c}),u&&(0,r.jsx)(`button`,{type:`button`,className:t.default.dismissBtn,"aria-label":`Dismiss`,onClick:()=>{g(),s?.()},children:(0,r.jsx)(e.Icon,{icon:i.Close,size:`md`,"aria-hidden":!0})})]})]})};exports.Toast=a;
|
|
2
2
|
//# sourceMappingURL=Toast.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.cjs","names":[],"sources":["../../../src/components/Toast/Toast.tsx"],"sourcesContent":["import { Close } from '@gnome-ui/icons';\nimport { type HTMLAttributes, type ReactNode, useCallback, useEffect, useRef } from 'react';\n\nimport { Icon } from '../Icon';\n\nimport styles from './Toast.module.css';\n\nexport interface ToastProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {\n /** The notification message. Keep it short — one sentence. */\n title: ReactNode;\n /**\n * Auto-dismiss timeout in milliseconds.\n * - Set to `0` to disable auto-dismiss (user must click action or dismiss).\n * - Defaults to `3000`.\n */\n duration?: number;\n /** Called when the toast should be removed — after timeout or user action. */\n onDismiss?: () => void;\n /** Label for the optional action button. */\n actionLabel?: string;\n /** Called when the user clicks the action button. */\n onAction?: () => void;\n /** Whether to show a manual dismiss (×) button. */\n dismissible?: boolean;\n}\n\n/**\n * Non-blocking temporary notification following the Adwaita `AdwToast` pattern.\n *\n * - Auto-dismisses after `duration` ms (default 3 s). Set `duration={0}` to disable.\n * - Timer pauses while the toast is hovered or focused.\n * - Use inside `<Toaster>` for correct positioning and stacking.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Toast.html\n */\nexport
|
|
1
|
+
{"version":3,"file":"Toast.cjs","names":[],"sources":["../../../src/components/Toast/Toast.tsx"],"sourcesContent":["import { Close } from '@gnome-ui/icons';\nimport { type HTMLAttributes, type ReactNode, useCallback, useEffect, useRef } from 'react';\n\nimport { Icon } from '../Icon';\n\nimport styles from './Toast.module.css';\n\nexport interface ToastProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {\n /** The notification message. Keep it short — one sentence. */\n title: ReactNode;\n /**\n * Auto-dismiss timeout in milliseconds.\n * - Set to `0` to disable auto-dismiss (user must click action or dismiss).\n * - Defaults to `3000`.\n */\n duration?: number;\n /** Called when the toast should be removed — after timeout or user action. */\n onDismiss?: () => void;\n /** Label for the optional action button. */\n actionLabel?: string;\n /** Called when the user clicks the action button. */\n onAction?: () => void;\n /** Whether to show a manual dismiss (×) button. */\n dismissible?: boolean;\n}\n\n/**\n * Non-blocking temporary notification following the Adwaita `AdwToast` pattern.\n *\n * - Auto-dismisses after `duration` ms (default 3 s). Set `duration={0}` to disable.\n * - Timer pauses while the toast is hovered or focused.\n * - Use inside `<Toaster>` for correct positioning and stacking.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Toast.html\n */\nexport const Toast = ({\n title,\n duration = 3000,\n onDismiss,\n actionLabel,\n onAction,\n dismissible = false,\n className,\n ...props\n}: ToastProps) => {\n const timerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n const remainingRef = useRef(duration);\n const startedAtRef = useRef<number>(0);\n\n const clearTimer = useCallback(() => {\n if (timerRef.current) {\n clearTimeout(timerRef.current);\n timerRef.current = null;\n }\n }, []);\n\n const startTimer = useCallback(\n (ms: number) => {\n if (ms <= 0 || !onDismiss) {\n return;\n }\n\n clearTimer();\n startedAtRef.current = Date.now();\n timerRef.current = setTimeout(() => onDismiss(), ms);\n },\n [onDismiss, clearTimer],\n );\n\n // Start auto-dismiss on mount\n useEffect(() => {\n if (duration > 0) {\n remainingRef.current = duration;\n startTimer(duration);\n }\n\n return clearTimer;\n }, [duration, startTimer, clearTimer]);\n\n // Pause timer on hover/focus\n const handleMouseEnter = () => {\n if (timerRef.current) {\n const elapsed = Date.now() - startedAtRef.current;\n\n remainingRef.current = Math.max(0, remainingRef.current - elapsed);\n clearTimer();\n }\n };\n\n const handleMouseLeave = () => {\n startTimer(remainingRef.current);\n };\n\n const handleAction = () => {\n clearTimer();\n onAction?.();\n onDismiss?.();\n };\n\n return (\n <div\n role=\"status\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n className={[styles.toast, className].filter(Boolean).join(' ')}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n onFocus={handleMouseEnter}\n onBlur={handleMouseLeave}\n {...props}\n >\n <span className={styles.title}>{title}</span>\n\n {(actionLabel || dismissible) && (\n <span className={styles.actions}>\n {actionLabel && (\n <button type=\"button\" className={styles.actionBtn} onClick={handleAction}>\n {actionLabel}\n </button>\n )}\n {dismissible && (\n <button\n type=\"button\"\n className={styles.dismissBtn}\n aria-label=\"Dismiss\"\n onClick={() => {\n clearTimer();\n onDismiss?.();\n }}\n >\n <Icon icon={Close} size=\"md\" aria-hidden />\n </button>\n )}\n </span>\n )}\n </div>\n );\n};\n"],"mappings":"2JAmCA,IAAa,GAAS,CACpB,QACA,WAAW,IACX,YACA,cACA,WACA,cAAc,GACd,YACA,GAAG,KACa,CAChB,IAAM,GAAA,EAAA,EAAA,QAAwD,IAAI,EAC5D,GAAA,EAAA,EAAA,QAAsB,CAAQ,EAC9B,GAAA,EAAA,EAAA,QAA8B,CAAC,EAE/B,GAAA,EAAA,EAAA,iBAA+B,CACnC,AAEE,EAAS,WADT,aAAa,EAAS,OAAO,EACV,KAEvB,EAAG,CAAC,CAAC,EAEC,GAAA,EAAA,EAAA,aACH,GAAe,CACV,GAAM,GAAK,CAAC,IAIhB,EAAW,EACX,EAAa,QAAU,KAAK,IAAI,EAChC,EAAS,QAAU,eAAiB,EAAU,EAAG,CAAE,EACrD,EACA,CAAC,EAAW,CAAU,CACxB,GAGA,EAAA,EAAA,gBACM,EAAW,IACb,EAAa,QAAU,EACvB,EAAW,CAAQ,GAGd,GACN,CAAC,EAAU,EAAY,CAAU,CAAC,EAGrC,IAAM,MAAyB,CAC7B,GAAI,EAAS,QAAS,CACpB,IAAM,EAAU,KAAK,IAAI,EAAI,EAAa,QAE1C,EAAa,QAAU,KAAK,IAAI,EAAG,EAAa,QAAU,CAAO,EACjE,EAAW,CACb,CACF,EAEM,MAAyB,CAC7B,EAAW,EAAa,OAAO,CACjC,EAEM,MAAqB,CACzB,EAAW,EACX,IAAW,EACX,IAAY,CACd,EAEA,OACE,EAAA,EAAA,MAAC,MAAD,CACE,KAAK,SACL,YAAU,SACV,cAAY,OACZ,UAAW,CAAC,EAAA,QAAO,MAAO,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,EAC7D,aAAc,EACd,aAAc,EACd,QAAS,EACT,OAAQ,EACR,GAAI,WATN,EAWE,EAAA,EAAA,KAAC,OAAD,CAAM,UAAW,EAAA,QAAO,eAAQ,CAAY,CAAA,GAE1C,GAAe,KACf,EAAA,EAAA,MAAC,OAAD,CAAM,UAAW,EAAA,QAAO,iBAAxB,CACG,IACC,EAAA,EAAA,KAAC,SAAD,CAAQ,KAAK,SAAS,UAAW,EAAA,QAAO,UAAW,QAAS,WACzD,CACK,CAAA,EAET,IACC,EAAA,EAAA,KAAC,SAAD,CACE,KAAK,SACL,UAAW,EAAA,QAAO,WAClB,aAAW,UACX,YAAe,CACb,EAAW,EACX,IAAY,CACd,YAEA,EAAA,EAAA,KAAC,EAAA,KAAD,CAAM,KAAM,EAAA,MAAO,KAAK,KAAK,cAAA,EAAa,CAAA,CACpC,CAAA,CAEN,GAEL,GAET"}
|
|
@@ -26,4 +26,4 @@ export interface ToastProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'
|
|
|
26
26
|
*
|
|
27
27
|
* @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Toast.html
|
|
28
28
|
*/
|
|
29
|
-
export declare
|
|
29
|
+
export declare const Toast: ({ title, duration, onDismiss, actionLabel, onAction, dismissible, className, ...props }: ToastProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,7 +4,7 @@ import { useCallback as n, useEffect as r, useRef as i } from "react";
|
|
|
4
4
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
5
5
|
import { Close as s } from "@gnome-ui/icons";
|
|
6
6
|
//#region src/components/Toast/Toast.tsx
|
|
7
|
-
|
|
7
|
+
var c = ({ title: c, duration: l = 3e3, onDismiss: u, actionLabel: d, onAction: f, dismissible: p = !1, className: m, ...h }) => {
|
|
8
8
|
let g = i(null), _ = i(l), v = i(0), y = n(() => {
|
|
9
9
|
g.current &&= (clearTimeout(g.current), null);
|
|
10
10
|
}, []), b = n((e) => {
|
|
@@ -60,7 +60,7 @@ function c({ title: c, duration: l = 3e3, onDismiss: u, actionLabel: d, onAction
|
|
|
60
60
|
})]
|
|
61
61
|
})]
|
|
62
62
|
});
|
|
63
|
-
}
|
|
63
|
+
};
|
|
64
64
|
//#endregion
|
|
65
65
|
export { c as Toast };
|
|
66
66
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.js","names":[],"sources":["../../../src/components/Toast/Toast.tsx"],"sourcesContent":["import { Close } from '@gnome-ui/icons';\nimport { type HTMLAttributes, type ReactNode, useCallback, useEffect, useRef } from 'react';\n\nimport { Icon } from '../Icon';\n\nimport styles from './Toast.module.css';\n\nexport interface ToastProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {\n /** The notification message. Keep it short — one sentence. */\n title: ReactNode;\n /**\n * Auto-dismiss timeout in milliseconds.\n * - Set to `0` to disable auto-dismiss (user must click action or dismiss).\n * - Defaults to `3000`.\n */\n duration?: number;\n /** Called when the toast should be removed — after timeout or user action. */\n onDismiss?: () => void;\n /** Label for the optional action button. */\n actionLabel?: string;\n /** Called when the user clicks the action button. */\n onAction?: () => void;\n /** Whether to show a manual dismiss (×) button. */\n dismissible?: boolean;\n}\n\n/**\n * Non-blocking temporary notification following the Adwaita `AdwToast` pattern.\n *\n * - Auto-dismisses after `duration` ms (default 3 s). Set `duration={0}` to disable.\n * - Timer pauses while the toast is hovered or focused.\n * - Use inside `<Toaster>` for correct positioning and stacking.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Toast.html\n */\nexport
|
|
1
|
+
{"version":3,"file":"Toast.js","names":[],"sources":["../../../src/components/Toast/Toast.tsx"],"sourcesContent":["import { Close } from '@gnome-ui/icons';\nimport { type HTMLAttributes, type ReactNode, useCallback, useEffect, useRef } from 'react';\n\nimport { Icon } from '../Icon';\n\nimport styles from './Toast.module.css';\n\nexport interface ToastProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {\n /** The notification message. Keep it short — one sentence. */\n title: ReactNode;\n /**\n * Auto-dismiss timeout in milliseconds.\n * - Set to `0` to disable auto-dismiss (user must click action or dismiss).\n * - Defaults to `3000`.\n */\n duration?: number;\n /** Called when the toast should be removed — after timeout or user action. */\n onDismiss?: () => void;\n /** Label for the optional action button. */\n actionLabel?: string;\n /** Called when the user clicks the action button. */\n onAction?: () => void;\n /** Whether to show a manual dismiss (×) button. */\n dismissible?: boolean;\n}\n\n/**\n * Non-blocking temporary notification following the Adwaita `AdwToast` pattern.\n *\n * - Auto-dismisses after `duration` ms (default 3 s). Set `duration={0}` to disable.\n * - Timer pauses while the toast is hovered or focused.\n * - Use inside `<Toaster>` for correct positioning and stacking.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Toast.html\n */\nexport const Toast = ({\n title,\n duration = 3000,\n onDismiss,\n actionLabel,\n onAction,\n dismissible = false,\n className,\n ...props\n}: ToastProps) => {\n const timerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n const remainingRef = useRef(duration);\n const startedAtRef = useRef<number>(0);\n\n const clearTimer = useCallback(() => {\n if (timerRef.current) {\n clearTimeout(timerRef.current);\n timerRef.current = null;\n }\n }, []);\n\n const startTimer = useCallback(\n (ms: number) => {\n if (ms <= 0 || !onDismiss) {\n return;\n }\n\n clearTimer();\n startedAtRef.current = Date.now();\n timerRef.current = setTimeout(() => onDismiss(), ms);\n },\n [onDismiss, clearTimer],\n );\n\n // Start auto-dismiss on mount\n useEffect(() => {\n if (duration > 0) {\n remainingRef.current = duration;\n startTimer(duration);\n }\n\n return clearTimer;\n }, [duration, startTimer, clearTimer]);\n\n // Pause timer on hover/focus\n const handleMouseEnter = () => {\n if (timerRef.current) {\n const elapsed = Date.now() - startedAtRef.current;\n\n remainingRef.current = Math.max(0, remainingRef.current - elapsed);\n clearTimer();\n }\n };\n\n const handleMouseLeave = () => {\n startTimer(remainingRef.current);\n };\n\n const handleAction = () => {\n clearTimer();\n onAction?.();\n onDismiss?.();\n };\n\n return (\n <div\n role=\"status\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n className={[styles.toast, className].filter(Boolean).join(' ')}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n onFocus={handleMouseEnter}\n onBlur={handleMouseLeave}\n {...props}\n >\n <span className={styles.title}>{title}</span>\n\n {(actionLabel || dismissible) && (\n <span className={styles.actions}>\n {actionLabel && (\n <button type=\"button\" className={styles.actionBtn} onClick={handleAction}>\n {actionLabel}\n </button>\n )}\n {dismissible && (\n <button\n type=\"button\"\n className={styles.dismissBtn}\n aria-label=\"Dismiss\"\n onClick={() => {\n clearTimer();\n onDismiss?.();\n }}\n >\n <Icon icon={Close} size=\"md\" aria-hidden />\n </button>\n )}\n </span>\n )}\n </div>\n );\n};\n"],"mappings":";;;;;;AAmCA,IAAa,KAAS,EACpB,UACA,cAAW,KACX,cACA,gBACA,aACA,iBAAc,IACd,cACA,GAAG,QACa;CAChB,IAAM,IAAW,EAA6C,IAAI,GAC5D,IAAe,EAAO,CAAQ,GAC9B,IAAe,EAAe,CAAC,GAE/B,IAAa,QAAkB;EACnC,AAEE,EAAS,aADT,aAAa,EAAS,OAAO,GACV;CAEvB,GAAG,CAAC,CAAC,GAEC,IAAa,GAChB,MAAe;EACV,KAAM,KAAK,CAAC,MAIhB,EAAW,GACX,EAAa,UAAU,KAAK,IAAI,GAChC,EAAS,UAAU,iBAAiB,EAAU,GAAG,CAAE;CACrD,GACA,CAAC,GAAW,CAAU,CACxB;CAGA,SACM,IAAW,MACb,EAAa,UAAU,GACvB,EAAW,CAAQ,IAGd,IACN;EAAC;EAAU;EAAY;CAAU,CAAC;CAGrC,IAAM,UAAyB;EAC7B,IAAI,EAAS,SAAS;GACpB,IAAM,IAAU,KAAK,IAAI,IAAI,EAAa;GAG1C,AADA,EAAa,UAAU,KAAK,IAAI,GAAG,EAAa,UAAU,CAAO,GACjE,EAAW;EACb;CACF,GAEM,UAAyB;EAC7B,EAAW,EAAa,OAAO;CACjC,GAEM,UAAqB;EAGzB,AAFA,EAAW,GACX,IAAW,GACX,IAAY;CACd;CAEA,OACE,kBAAC,OAAD;EACE,MAAK;EACL,aAAU;EACV,eAAY;EACZ,WAAW,CAAC,EAAO,OAAO,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;EAC7D,cAAc;EACd,cAAc;EACd,SAAS;EACT,QAAQ;EACR,GAAI;YATN,CAWE,kBAAC,QAAD;GAAM,WAAW,EAAO;aAAQ;EAAY,CAAA,IAE1C,KAAe,MACf,kBAAC,QAAD;GAAM,WAAW,EAAO;aAAxB,CACG,KACC,kBAAC,UAAD;IAAQ,MAAK;IAAS,WAAW,EAAO;IAAW,SAAS;cACzD;GACK,CAAA,GAET,KACC,kBAAC,UAAD;IACE,MAAK;IACL,WAAW,EAAO;IAClB,cAAW;IACX,eAAe;KAEb,AADA,EAAW,GACX,IAAY;IACd;cAEA,kBAAC,GAAD;KAAM,MAAM;KAAO,MAAK;KAAK,eAAA;IAAa,CAAA;GACpC,CAAA,CAEN;IAEL;;AAET"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e
|
|
1
|
+
var e={toaster:`_toaster_1poqp_3`,toasterBottom:`_toasterBottom_1poqp_18`,toasterTop:`_toasterTop_1poqp_22`,toast:`_toast_1poqp_3`,"toast-in":`_toast-in_1poqp_1`,title:`_title_1poqp_69`,actions:`_actions_1poqp_76`,actionBtn:`_actionBtn_1poqp_85`,dismissBtn:`_dismissBtn_1poqp_118`};exports.default=e;
|
|
2
2
|
//# sourceMappingURL=Toast.module.css.cjs.map
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
toast: r,
|
|
1
|
+
var e = {
|
|
2
|
+
toaster: "_toaster_1poqp_3",
|
|
3
|
+
toasterBottom: "_toasterBottom_1poqp_18",
|
|
4
|
+
toasterTop: "_toasterTop_1poqp_22",
|
|
5
|
+
toast: "_toast_1poqp_3",
|
|
7
6
|
"toast-in": "_toast-in_1poqp_1",
|
|
8
|
-
title:
|
|
9
|
-
actions:
|
|
10
|
-
actionBtn:
|
|
11
|
-
dismissBtn:
|
|
7
|
+
title: "_title_1poqp_69",
|
|
8
|
+
actions: "_actions_1poqp_76",
|
|
9
|
+
actionBtn: "_actionBtn_1poqp_85",
|
|
10
|
+
dismissBtn: "_dismissBtn_1poqp_118"
|
|
12
11
|
};
|
|
13
12
|
//#endregion
|
|
14
|
-
export {
|
|
13
|
+
export { e as default };
|
|
15
14
|
|
|
16
15
|
//# sourceMappingURL=Toast.module.css.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(
|
|
1
|
+
const e=require("./Toast.module.css.cjs");let t=require("react-dom"),n=require("react/jsx-runtime");var r=({position:r=`bottom`,children:i,container:a,className:o,...s})=>{let c=(0,n.jsx)(`div`,{"aria-label":`Notifications`,className:[e.default.toaster,r===`top`?e.default.toasterTop:e.default.toasterBottom,o].filter(Boolean).join(` `),...s,children:i});return typeof document>`u`?c:(0,t.createPortal)(c,a??document.body)};exports.Toaster=r;
|
|
2
2
|
//# sourceMappingURL=Toaster.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toaster.cjs","names":[],"sources":["../../../src/components/Toast/Toaster.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\n\nimport { createPortal } from 'react-dom';\n\nimport styles from './Toast.module.css';\n\nexport interface ToasterProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Where to render the toast stack.\n * - `bottom` (default) — bottom-center, following the GNOME HIG.\n * - `top` — top-center.\n */\n position?: 'bottom' | 'top';\n /** `<Toast>` elements to display. */\n children?: ReactNode;\n /**\n * DOM node to render the portal into.\n * Defaults to `document.body`.\n */\n container?: Element | DocumentFragment;\n}\n\n/**\n * Fixed-position overlay that stacks `<Toast>` notifications.\n *\n * Renders into a portal (default: `document.body`) so it sits above all\n * other content regardless of where you place it in the React tree.\n *\n * @example\n * <Toaster>\n * {toasts.map(t => (\n * <Toast key={t.id} title={t.message} onDismiss={() => remove(t.id)} />\n * ))}\n * </Toaster>\n */\nexport
|
|
1
|
+
{"version":3,"file":"Toaster.cjs","names":[],"sources":["../../../src/components/Toast/Toaster.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\n\nimport { createPortal } from 'react-dom';\n\nimport styles from './Toast.module.css';\n\nexport interface ToasterProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Where to render the toast stack.\n * - `bottom` (default) — bottom-center, following the GNOME HIG.\n * - `top` — top-center.\n */\n position?: 'bottom' | 'top';\n /** `<Toast>` elements to display. */\n children?: ReactNode;\n /**\n * DOM node to render the portal into.\n * Defaults to `document.body`.\n */\n container?: Element | DocumentFragment;\n}\n\n/**\n * Fixed-position overlay that stacks `<Toast>` notifications.\n *\n * Renders into a portal (default: `document.body`) so it sits above all\n * other content regardless of where you place it in the React tree.\n *\n * @example\n * <Toaster>\n * {toasts.map(t => (\n * <Toast key={t.id} title={t.message} onDismiss={() => remove(t.id)} />\n * ))}\n * </Toaster>\n */\nexport const Toaster = ({\n position = 'bottom',\n children,\n container,\n className,\n ...props\n}: ToasterProps) => {\n const node = (\n <div\n aria-label=\"Notifications\"\n className={[\n styles.toaster,\n position === 'top' ? styles.toasterTop : styles.toasterBottom,\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n >\n {children}\n </div>\n );\n\n // During SSR document is not available — render inline\n if (typeof document === 'undefined') {\n return node;\n }\n\n return createPortal(node, container ?? document.body);\n};\n"],"mappings":"oGAmCA,IAAa,GAAW,CACtB,WAAW,SACX,WACA,YACA,YACA,GAAG,KACe,CAClB,IAAM,GACJ,EAAA,EAAA,KAAC,MAAD,CACE,aAAW,gBACX,UAAW,CACT,EAAA,QAAO,QACP,IAAa,MAAQ,EAAA,QAAO,WAAa,EAAA,QAAO,cAChD,CACF,EACG,OAAO,OAAO,EACd,KAAK,GAAG,EACX,GAAI,EAEH,UACE,CAAA,EAQP,OAJI,OAAO,SAAa,IACf,GAGT,EAAA,EAAA,cAAoB,EAAM,GAAa,SAAS,IAAI,CACtD"}
|
|
@@ -27,4 +27,4 @@ export interface ToasterProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
27
27
|
* ))}
|
|
28
28
|
* </Toaster>
|
|
29
29
|
*/
|
|
30
|
-
export declare
|
|
30
|
+
export declare const Toaster: ({ position, children, container, className, ...props }: ToasterProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,7 +2,7 @@ import e from "./Toast.module.css.js";
|
|
|
2
2
|
import { createPortal as t } from "react-dom";
|
|
3
3
|
import { jsx as n } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/Toast/Toaster.tsx
|
|
5
|
-
|
|
5
|
+
var r = ({ position: r = "bottom", children: i, container: a, className: o, ...s }) => {
|
|
6
6
|
let c = /* @__PURE__ */ n("div", {
|
|
7
7
|
"aria-label": "Notifications",
|
|
8
8
|
className: [
|
|
@@ -14,7 +14,7 @@ function r({ position: r = "bottom", children: i, container: a, className: o, ..
|
|
|
14
14
|
children: i
|
|
15
15
|
});
|
|
16
16
|
return typeof document > "u" ? c : t(c, a ?? document.body);
|
|
17
|
-
}
|
|
17
|
+
};
|
|
18
18
|
//#endregion
|
|
19
19
|
export { r as Toaster };
|
|
20
20
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toaster.js","names":[],"sources":["../../../src/components/Toast/Toaster.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\n\nimport { createPortal } from 'react-dom';\n\nimport styles from './Toast.module.css';\n\nexport interface ToasterProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Where to render the toast stack.\n * - `bottom` (default) — bottom-center, following the GNOME HIG.\n * - `top` — top-center.\n */\n position?: 'bottom' | 'top';\n /** `<Toast>` elements to display. */\n children?: ReactNode;\n /**\n * DOM node to render the portal into.\n * Defaults to `document.body`.\n */\n container?: Element | DocumentFragment;\n}\n\n/**\n * Fixed-position overlay that stacks `<Toast>` notifications.\n *\n * Renders into a portal (default: `document.body`) so it sits above all\n * other content regardless of where you place it in the React tree.\n *\n * @example\n * <Toaster>\n * {toasts.map(t => (\n * <Toast key={t.id} title={t.message} onDismiss={() => remove(t.id)} />\n * ))}\n * </Toaster>\n */\nexport
|
|
1
|
+
{"version":3,"file":"Toaster.js","names":[],"sources":["../../../src/components/Toast/Toaster.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\n\nimport { createPortal } from 'react-dom';\n\nimport styles from './Toast.module.css';\n\nexport interface ToasterProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Where to render the toast stack.\n * - `bottom` (default) — bottom-center, following the GNOME HIG.\n * - `top` — top-center.\n */\n position?: 'bottom' | 'top';\n /** `<Toast>` elements to display. */\n children?: ReactNode;\n /**\n * DOM node to render the portal into.\n * Defaults to `document.body`.\n */\n container?: Element | DocumentFragment;\n}\n\n/**\n * Fixed-position overlay that stacks `<Toast>` notifications.\n *\n * Renders into a portal (default: `document.body`) so it sits above all\n * other content regardless of where you place it in the React tree.\n *\n * @example\n * <Toaster>\n * {toasts.map(t => (\n * <Toast key={t.id} title={t.message} onDismiss={() => remove(t.id)} />\n * ))}\n * </Toaster>\n */\nexport const Toaster = ({\n position = 'bottom',\n children,\n container,\n className,\n ...props\n}: ToasterProps) => {\n const node = (\n <div\n aria-label=\"Notifications\"\n className={[\n styles.toaster,\n position === 'top' ? styles.toasterTop : styles.toasterBottom,\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n >\n {children}\n </div>\n );\n\n // During SSR document is not available — render inline\n if (typeof document === 'undefined') {\n return node;\n }\n\n return createPortal(node, container ?? document.body);\n};\n"],"mappings":";;;;AAmCA,IAAa,KAAW,EACtB,cAAW,UACX,aACA,cACA,cACA,GAAG,QACe;CAClB,IAAM,IACJ,kBAAC,OAAD;EACE,cAAW;EACX,WAAW;GACT,EAAO;GACP,MAAa,QAAQ,EAAO,aAAa,EAAO;GAChD;EACF,EACG,OAAO,OAAO,EACd,KAAK,GAAG;EACX,GAAI;EAEH;CACE,CAAA;CAQP,OAJI,OAAO,WAAa,MACf,IAGF,EAAa,GAAM,KAAa,SAAS,IAAI;AACtD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./Toast/Toast.cjs"),t=require("./Toast/Toaster.cjs");exports.Toast=e.Toast,exports.Toaster=t.Toaster;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(
|
|
1
|
+
const e=require("./ToggleGroup.module.css.cjs");let t=require("react"),n=require("react/jsx-runtime");var r=(0,t.createContext)(null);function i(){let e=(0,t.useContext)(r);if(!e)throw Error(`ToggleGroupItem must be used inside ToggleGroup`);return e}var a=({value:i,onValueChange:a,"aria-label":o=`Options`,children:s,className:c,...l})=>{let u=(0,t.useRef)(null);function d(e){let t=Array.from(u.current?.querySelectorAll(`[role=radio]:not(:disabled)`)??[]),n=document.activeElement,r=n instanceof HTMLButtonElement?t.indexOf(n):-1;if(r===-1)return;let i=r;if(e.key===`ArrowRight`||e.key===`ArrowDown`)i=(r+1)%t.length;else if(e.key===`ArrowLeft`||e.key===`ArrowUp`)i=(r-1+t.length)%t.length;else if(e.key===`Home`)i=0;else if(e.key===`End`)i=t.length-1;else return;e.preventDefault(),t[i].focus(),t[i].click()}return(0,n.jsx)(r.Provider,{value:{value:i,onValueChange:a},children:(0,n.jsx)(`div`,{ref:u,role:`radiogroup`,"aria-label":o,onKeyDown:d,className:[e.default.group,c].filter(Boolean).join(` `),...l,children:s})})};exports.ToggleGroup=a,exports.useToggleGroup=i;
|
|
2
2
|
//# sourceMappingURL=ToggleGroup.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToggleGroup.cjs","names":[],"sources":["../../../src/components/ToggleGroup/ToggleGroup.tsx"],"sourcesContent":["import {\n createContext,\n type HTMLAttributes,\n type KeyboardEvent,\n type ReactNode,\n useContext,\n useRef,\n} from 'react';\n\nimport styles from './ToggleGroup.module.css';\n\n// ─── Context ──────────────────────────────────────────────────────────────────\n\ninterface ToggleGroupContextValue {\n value: string;\n onValueChange: (value: string) => void;\n}\n\nconst ToggleGroupContext = createContext<ToggleGroupContextValue | null>(null);\n\n// eslint-disable-next-line react-refresh/only-export-components\nexport function useToggleGroup() {\n const ctx = useContext(ToggleGroupContext);\n\n if (!ctx) {\n throw new Error('ToggleGroupItem must be used inside ToggleGroup');\n }\n\n return ctx;\n}\n\n// ─── ToggleGroup ──────────────────────────────────────────────────────────────\n\nexport interface ToggleGroupProps extends HTMLAttributes<HTMLDivElement> {\n /** Name of the currently active toggle. */\n value: string;\n /** Called with the new value when a toggle is selected. */\n onValueChange: (value: string) => void;\n /** Accessible label for the group. */\n 'aria-label'?: string;\n children?: ReactNode;\n}\n\n/**\n * Mutually-exclusive group of toggle buttons for in-place option selection.\n *\n * Mirrors `AdwToggleGroup` (libadwaita 1.7 / GNOME 48).\n *\n * Use for formatting controls, view-mode selectors, and toolbar options —\n * wherever a `ViewSwitcher` would be too heavy or is not placed in a HeaderBar.\n *\n * Compose with `ToggleGroupItem`. Keyboard: ← / → cycle, Home / End jump.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.ToggleGroup.html\n */\nexport
|
|
1
|
+
{"version":3,"file":"ToggleGroup.cjs","names":[],"sources":["../../../src/components/ToggleGroup/ToggleGroup.tsx"],"sourcesContent":["import {\n createContext,\n type HTMLAttributes,\n type KeyboardEvent,\n type ReactNode,\n useContext,\n useRef,\n} from 'react';\n\nimport styles from './ToggleGroup.module.css';\n\n// ─── Context ──────────────────────────────────────────────────────────────────\n\ninterface ToggleGroupContextValue {\n value: string;\n onValueChange: (value: string) => void;\n}\n\nconst ToggleGroupContext = createContext<ToggleGroupContextValue | null>(null);\n\n// eslint-disable-next-line react-refresh/only-export-components\nexport function useToggleGroup() {\n const ctx = useContext(ToggleGroupContext);\n\n if (!ctx) {\n throw new Error('ToggleGroupItem must be used inside ToggleGroup');\n }\n\n return ctx;\n}\n\n// ─── ToggleGroup ──────────────────────────────────────────────────────────────\n\nexport interface ToggleGroupProps extends HTMLAttributes<HTMLDivElement> {\n /** Name of the currently active toggle. */\n value: string;\n /** Called with the new value when a toggle is selected. */\n onValueChange: (value: string) => void;\n /** Accessible label for the group. */\n 'aria-label'?: string;\n children?: ReactNode;\n}\n\n/**\n * Mutually-exclusive group of toggle buttons for in-place option selection.\n *\n * Mirrors `AdwToggleGroup` (libadwaita 1.7 / GNOME 48).\n *\n * Use for formatting controls, view-mode selectors, and toolbar options —\n * wherever a `ViewSwitcher` would be too heavy or is not placed in a HeaderBar.\n *\n * Compose with `ToggleGroupItem`. Keyboard: ← / → cycle, Home / End jump.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.ToggleGroup.html\n */\nexport const ToggleGroup = ({\n value,\n onValueChange,\n 'aria-label': ariaLabel = 'Options',\n children,\n className,\n ...props\n}: ToggleGroupProps) => {\n const groupRef = useRef<HTMLDivElement>(null);\n\n function handleKeyDown(e: KeyboardEvent<HTMLDivElement>) {\n const items = Array.from(\n groupRef.current?.querySelectorAll<HTMLButtonElement>('[role=radio]:not(:disabled)') ?? [],\n );\n const activeElement = document.activeElement;\n const idx = activeElement instanceof HTMLButtonElement ? items.indexOf(activeElement) : -1;\n\n if (idx === -1) {\n return;\n }\n\n let next = idx;\n if (e.key === 'ArrowRight' || e.key === 'ArrowDown') {\n next = (idx + 1) % items.length;\n } else if (e.key === 'ArrowLeft' || e.key === 'ArrowUp') {\n next = (idx - 1 + items.length) % items.length;\n } else if (e.key === 'Home') {\n next = 0;\n } else if (e.key === 'End') {\n next = items.length - 1;\n } else {\n return;\n }\n\n e.preventDefault();\n items[next].focus();\n items[next].click();\n }\n\n return (\n <ToggleGroupContext.Provider value={{ value, onValueChange }}>\n <div\n ref={groupRef}\n role=\"radiogroup\"\n aria-label={ariaLabel}\n onKeyDown={handleKeyDown}\n className={[styles.group, className].filter(Boolean).join(' ')}\n {...props}\n >\n {children}\n </div>\n </ToggleGroupContext.Provider>\n );\n};\n"],"mappings":"sGAkBA,IAAM,GAAA,EAAA,EAAA,eAAmE,IAAI,EAG7E,SAAgB,GAAiB,CAC/B,IAAM,GAAA,EAAA,EAAA,YAAiB,CAAkB,EAEzC,GAAI,CAAC,EACH,MAAU,MAAM,iDAAiD,EAGnE,OAAO,CACT,CA0BA,IAAa,GAAe,CAC1B,QACA,gBACA,aAAc,EAAY,UAC1B,WACA,YACA,GAAG,KACmB,CACtB,IAAM,GAAA,EAAA,EAAA,QAAkC,IAAI,EAE5C,SAAS,EAAc,EAAkC,CACvD,IAAM,EAAQ,MAAM,KAClB,EAAS,SAAS,iBAAoC,6BAA6B,GAAK,CAAC,CAC3F,EACM,EAAgB,SAAS,cACzB,EAAM,aAAyB,kBAAoB,EAAM,QAAQ,CAAa,EAAI,GAExF,GAAI,IAAQ,GACV,OAGF,IAAI,EAAO,EACX,GAAI,EAAE,MAAQ,cAAgB,EAAE,MAAQ,YACtC,GAAQ,EAAM,GAAK,EAAM,YACpB,GAAI,EAAE,MAAQ,aAAe,EAAE,MAAQ,UAC5C,GAAQ,EAAM,EAAI,EAAM,QAAU,EAAM,YACnC,GAAI,EAAE,MAAQ,OACnB,EAAO,OACF,GAAI,EAAE,MAAQ,MACnB,EAAO,EAAM,OAAS,OAEtB,OAGF,EAAE,eAAe,EACjB,EAAM,GAAM,MAAM,EAClB,EAAM,GAAM,MAAM,CACpB,CAEA,OACE,EAAA,EAAA,KAAC,EAAmB,SAApB,CAA6B,MAAO,CAAE,QAAO,eAAc,YACzD,EAAA,EAAA,KAAC,MAAD,CACE,IAAK,EACL,KAAK,aACL,aAAY,EACZ,UAAW,EACX,UAAW,CAAC,EAAA,QAAO,MAAO,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,EAC7D,GAAI,EAEH,UACE,CAAA,CACsB,CAAA,CAEjC"}
|
|
@@ -25,5 +25,5 @@ export interface ToggleGroupProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
25
25
|
*
|
|
26
26
|
* @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.ToggleGroup.html
|
|
27
27
|
*/
|
|
28
|
-
export declare
|
|
28
|
+
export declare const ToggleGroup: ({ value, onValueChange, "aria-label": ariaLabel, children, className, ...props }: ToggleGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
29
|
export {};
|
|
@@ -8,7 +8,7 @@ function o() {
|
|
|
8
8
|
if (!e) throw Error("ToggleGroupItem must be used inside ToggleGroup");
|
|
9
9
|
return e;
|
|
10
10
|
}
|
|
11
|
-
|
|
11
|
+
var s = ({ value: t, onValueChange: n, "aria-label": o = "Options", children: s, className: c, ...l }) => {
|
|
12
12
|
let u = r(null);
|
|
13
13
|
function d(e) {
|
|
14
14
|
let t = Array.from(u.current?.querySelectorAll("[role=radio]:not(:disabled)") ?? []), n = document.activeElement, r = n instanceof HTMLButtonElement ? t.indexOf(n) : -1;
|
|
@@ -36,7 +36,7 @@ function s({ value: t, onValueChange: n, "aria-label": o = "Options", children:
|
|
|
36
36
|
children: s
|
|
37
37
|
})
|
|
38
38
|
});
|
|
39
|
-
}
|
|
39
|
+
};
|
|
40
40
|
//#endregion
|
|
41
41
|
export { s as ToggleGroup, o as useToggleGroup };
|
|
42
42
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToggleGroup.js","names":[],"sources":["../../../src/components/ToggleGroup/ToggleGroup.tsx"],"sourcesContent":["import {\n createContext,\n type HTMLAttributes,\n type KeyboardEvent,\n type ReactNode,\n useContext,\n useRef,\n} from 'react';\n\nimport styles from './ToggleGroup.module.css';\n\n// ─── Context ──────────────────────────────────────────────────────────────────\n\ninterface ToggleGroupContextValue {\n value: string;\n onValueChange: (value: string) => void;\n}\n\nconst ToggleGroupContext = createContext<ToggleGroupContextValue | null>(null);\n\n// eslint-disable-next-line react-refresh/only-export-components\nexport function useToggleGroup() {\n const ctx = useContext(ToggleGroupContext);\n\n if (!ctx) {\n throw new Error('ToggleGroupItem must be used inside ToggleGroup');\n }\n\n return ctx;\n}\n\n// ─── ToggleGroup ──────────────────────────────────────────────────────────────\n\nexport interface ToggleGroupProps extends HTMLAttributes<HTMLDivElement> {\n /** Name of the currently active toggle. */\n value: string;\n /** Called with the new value when a toggle is selected. */\n onValueChange: (value: string) => void;\n /** Accessible label for the group. */\n 'aria-label'?: string;\n children?: ReactNode;\n}\n\n/**\n * Mutually-exclusive group of toggle buttons for in-place option selection.\n *\n * Mirrors `AdwToggleGroup` (libadwaita 1.7 / GNOME 48).\n *\n * Use for formatting controls, view-mode selectors, and toolbar options —\n * wherever a `ViewSwitcher` would be too heavy or is not placed in a HeaderBar.\n *\n * Compose with `ToggleGroupItem`. Keyboard: ← / → cycle, Home / End jump.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.ToggleGroup.html\n */\nexport
|
|
1
|
+
{"version":3,"file":"ToggleGroup.js","names":[],"sources":["../../../src/components/ToggleGroup/ToggleGroup.tsx"],"sourcesContent":["import {\n createContext,\n type HTMLAttributes,\n type KeyboardEvent,\n type ReactNode,\n useContext,\n useRef,\n} from 'react';\n\nimport styles from './ToggleGroup.module.css';\n\n// ─── Context ──────────────────────────────────────────────────────────────────\n\ninterface ToggleGroupContextValue {\n value: string;\n onValueChange: (value: string) => void;\n}\n\nconst ToggleGroupContext = createContext<ToggleGroupContextValue | null>(null);\n\n// eslint-disable-next-line react-refresh/only-export-components\nexport function useToggleGroup() {\n const ctx = useContext(ToggleGroupContext);\n\n if (!ctx) {\n throw new Error('ToggleGroupItem must be used inside ToggleGroup');\n }\n\n return ctx;\n}\n\n// ─── ToggleGroup ──────────────────────────────────────────────────────────────\n\nexport interface ToggleGroupProps extends HTMLAttributes<HTMLDivElement> {\n /** Name of the currently active toggle. */\n value: string;\n /** Called with the new value when a toggle is selected. */\n onValueChange: (value: string) => void;\n /** Accessible label for the group. */\n 'aria-label'?: string;\n children?: ReactNode;\n}\n\n/**\n * Mutually-exclusive group of toggle buttons for in-place option selection.\n *\n * Mirrors `AdwToggleGroup` (libadwaita 1.7 / GNOME 48).\n *\n * Use for formatting controls, view-mode selectors, and toolbar options —\n * wherever a `ViewSwitcher` would be too heavy or is not placed in a HeaderBar.\n *\n * Compose with `ToggleGroupItem`. Keyboard: ← / → cycle, Home / End jump.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.ToggleGroup.html\n */\nexport const ToggleGroup = ({\n value,\n onValueChange,\n 'aria-label': ariaLabel = 'Options',\n children,\n className,\n ...props\n}: ToggleGroupProps) => {\n const groupRef = useRef<HTMLDivElement>(null);\n\n function handleKeyDown(e: KeyboardEvent<HTMLDivElement>) {\n const items = Array.from(\n groupRef.current?.querySelectorAll<HTMLButtonElement>('[role=radio]:not(:disabled)') ?? [],\n );\n const activeElement = document.activeElement;\n const idx = activeElement instanceof HTMLButtonElement ? items.indexOf(activeElement) : -1;\n\n if (idx === -1) {\n return;\n }\n\n let next = idx;\n if (e.key === 'ArrowRight' || e.key === 'ArrowDown') {\n next = (idx + 1) % items.length;\n } else if (e.key === 'ArrowLeft' || e.key === 'ArrowUp') {\n next = (idx - 1 + items.length) % items.length;\n } else if (e.key === 'Home') {\n next = 0;\n } else if (e.key === 'End') {\n next = items.length - 1;\n } else {\n return;\n }\n\n e.preventDefault();\n items[next].focus();\n items[next].click();\n }\n\n return (\n <ToggleGroupContext.Provider value={{ value, onValueChange }}>\n <div\n ref={groupRef}\n role=\"radiogroup\"\n aria-label={ariaLabel}\n onKeyDown={handleKeyDown}\n className={[styles.group, className].filter(Boolean).join(' ')}\n {...props}\n >\n {children}\n </div>\n </ToggleGroupContext.Provider>\n );\n};\n"],"mappings":";;;;AAkBA,IAAM,IAAqB,EAA8C,IAAI;AAG7E,SAAgB,IAAiB;CAC/B,IAAM,IAAM,EAAW,CAAkB;CAEzC,IAAI,CAAC,GACH,MAAU,MAAM,iDAAiD;CAGnE,OAAO;AACT;AA0BA,IAAa,KAAe,EAC1B,UACA,kBACA,cAAc,IAAY,WAC1B,aACA,cACA,GAAG,QACmB;CACtB,IAAM,IAAW,EAAuB,IAAI;CAE5C,SAAS,EAAc,GAAkC;EACvD,IAAM,IAAQ,MAAM,KAClB,EAAS,SAAS,iBAAoC,6BAA6B,KAAK,CAAC,CAC3F,GACM,IAAgB,SAAS,eACzB,IAAM,aAAyB,oBAAoB,EAAM,QAAQ,CAAa,IAAI;EAExF,IAAI,MAAQ,IACV;EAGF,IAAI,IAAO;EACX,IAAI,EAAE,QAAQ,gBAAgB,EAAE,QAAQ,aACtC,KAAQ,IAAM,KAAK,EAAM;OACpB,IAAI,EAAE,QAAQ,eAAe,EAAE,QAAQ,WAC5C,KAAQ,IAAM,IAAI,EAAM,UAAU,EAAM;OACnC,IAAI,EAAE,QAAQ,QACnB,IAAO;OACF,IAAI,EAAE,QAAQ,OACnB,IAAO,EAAM,SAAS;OAEtB;EAKF,AAFA,EAAE,eAAe,GACjB,EAAM,GAAM,MAAM,GAClB,EAAM,GAAM,MAAM;CACpB;CAEA,OACE,kBAAC,EAAmB,UAApB;EAA6B,OAAO;GAAE;GAAO;EAAc;YACzD,kBAAC,OAAD;GACE,KAAK;GACL,MAAK;GACL,cAAY;GACZ,WAAW;GACX,WAAW,CAAC,EAAO,OAAO,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;GAC7D,GAAI;GAEH;EACE,CAAA;CACsB,CAAA;AAEjC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(
|
|
1
|
+
const e=require("../Icon/Icon.cjs"),t=require("./ToggleGroup.module.css.cjs"),n=require("./ToggleGroup.cjs");let r=require("react/jsx-runtime");var i=({name:i,label:a,icon:o,disabled:s,className:c,...l})=>{let{value:u,onValueChange:d}=n.useToggleGroup(),f=u===i,p=o&&!a;return(0,r.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":f,tabIndex:f?0:-1,disabled:s,onClick:()=>d(i),className:[t.default.item,f?t.default.active:null,p?t.default.iconOnly:null,c].filter(Boolean).join(` `),...l,children:[o&&(0,r.jsx)(`span`,{className:t.default.itemIcon,children:(0,r.jsx)(e.Icon,{icon:o,size:`md`,"aria-hidden":!0})}),a&&(0,r.jsx)(`span`,{className:t.default.itemLabel,children:a})]})};exports.ToggleGroupItem=i;
|
|
2
2
|
//# sourceMappingURL=ToggleGroupItem.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToggleGroupItem.cjs","names":[],"sources":["../../../src/components/ToggleGroup/ToggleGroupItem.tsx"],"sourcesContent":["import type { IconDefinition } from '@gnome-ui/icons';\nimport type { ButtonHTMLAttributes } from 'react';\n\nimport { Icon } from '../Icon';\n\nimport { useToggleGroup } from './ToggleGroup';\nimport styles from './ToggleGroup.module.css';\n\nexport interface ToggleGroupItemProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n /** String identifier — used as the group's `value` when this item is selected. */\n name: string;\n /** Visible label. Omit for icon-only items (provide `aria-label` instead). */\n label?: string;\n /** Icon from `@gnome-ui/icons`. */\n icon?: IconDefinition;\n}\n\n/**\n * Individual toggle inside a `ToggleGroup`.\n *\n * Can be icon-only, label-only, or icon + label. For icon-only items always\n * provide an `aria-label` so screen readers can identify the option.\n */\nexport
|
|
1
|
+
{"version":3,"file":"ToggleGroupItem.cjs","names":[],"sources":["../../../src/components/ToggleGroup/ToggleGroupItem.tsx"],"sourcesContent":["import type { IconDefinition } from '@gnome-ui/icons';\nimport type { ButtonHTMLAttributes } from 'react';\n\nimport { Icon } from '../Icon';\n\nimport { useToggleGroup } from './ToggleGroup';\nimport styles from './ToggleGroup.module.css';\n\nexport interface ToggleGroupItemProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n /** String identifier — used as the group's `value` when this item is selected. */\n name: string;\n /** Visible label. Omit for icon-only items (provide `aria-label` instead). */\n label?: string;\n /** Icon from `@gnome-ui/icons`. */\n icon?: IconDefinition;\n}\n\n/**\n * Individual toggle inside a `ToggleGroup`.\n *\n * Can be icon-only, label-only, or icon + label. For icon-only items always\n * provide an `aria-label` so screen readers can identify the option.\n */\nexport const ToggleGroupItem = ({\n name,\n label,\n icon,\n disabled,\n className,\n ...props\n}: ToggleGroupItemProps) => {\n const { value, onValueChange } = useToggleGroup();\n const active = value === name;\n const iconOnly = icon && !label;\n\n return (\n <button\n type=\"button\"\n role=\"radio\"\n aria-checked={active}\n tabIndex={active ? 0 : -1}\n disabled={disabled}\n onClick={() => onValueChange(name)}\n className={[\n styles.item,\n active ? styles.active : null,\n iconOnly ? styles.iconOnly : null,\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n >\n {icon && (\n <span className={styles.itemIcon}>\n <Icon icon={icon} size=\"md\" aria-hidden />\n </span>\n )}\n {label && <span className={styles.itemLabel}>{label}</span>}\n </button>\n );\n};\n"],"mappings":"gJAuBA,IAAa,GAAmB,CAC9B,OACA,QACA,OACA,WACA,YACA,GAAG,KACuB,CAC1B,GAAM,CAAE,QAAO,iBAAkB,EAAA,eAAe,EAC1C,EAAS,IAAU,EACnB,EAAW,GAAQ,CAAC,EAE1B,OACE,EAAA,EAAA,MAAC,SAAD,CACE,KAAK,SACL,KAAK,QACL,eAAc,EACd,SAAU,EAAS,EAAI,GACb,WACV,YAAe,EAAc,CAAI,EACjC,UAAW,CACT,EAAA,QAAO,KACP,EAAS,EAAA,QAAO,OAAS,KACzB,EAAW,EAAA,QAAO,SAAW,KAC7B,CACF,EACG,OAAO,OAAO,EACd,KAAK,GAAG,EACX,GAAI,WAfN,CAiBG,IACC,EAAA,EAAA,KAAC,OAAD,CAAM,UAAW,EAAA,QAAO,mBACtB,EAAA,EAAA,KAAC,EAAA,KAAD,CAAY,OAAM,KAAK,KAAK,cAAA,EAAa,CAAA,CACrC,CAAA,EAEP,IAAS,EAAA,EAAA,KAAC,OAAD,CAAM,UAAW,EAAA,QAAO,mBAAY,CAAY,CAAA,CACpD,GAEZ"}
|
|
@@ -14,4 +14,4 @@ export interface ToggleGroupItemProps extends ButtonHTMLAttributes<HTMLButtonEle
|
|
|
14
14
|
* Can be icon-only, label-only, or icon + label. For icon-only items always
|
|
15
15
|
* provide an `aria-label` so screen readers can identify the option.
|
|
16
16
|
*/
|
|
17
|
-
export declare
|
|
17
|
+
export declare const ToggleGroupItem: ({ name, label, icon, disabled, className, ...props }: ToggleGroupItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,7 +3,7 @@ import t from "./ToggleGroup.module.css.js";
|
|
|
3
3
|
import { useToggleGroup as n } from "./ToggleGroup.js";
|
|
4
4
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/ToggleGroup/ToggleGroupItem.tsx
|
|
6
|
-
|
|
6
|
+
var a = ({ name: a, label: o, icon: s, disabled: c, className: l, ...u }) => {
|
|
7
7
|
let { value: d, onValueChange: f } = n(), p = d === a, m = s && !o;
|
|
8
8
|
return /* @__PURE__ */ i("button", {
|
|
9
9
|
type: "button",
|
|
@@ -31,7 +31,7 @@ function a({ name: a, label: o, icon: s, disabled: c, className: l, ...u }) {
|
|
|
31
31
|
children: o
|
|
32
32
|
})]
|
|
33
33
|
});
|
|
34
|
-
}
|
|
34
|
+
};
|
|
35
35
|
//#endregion
|
|
36
36
|
export { a as ToggleGroupItem };
|
|
37
37
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToggleGroupItem.js","names":[],"sources":["../../../src/components/ToggleGroup/ToggleGroupItem.tsx"],"sourcesContent":["import type { IconDefinition } from '@gnome-ui/icons';\nimport type { ButtonHTMLAttributes } from 'react';\n\nimport { Icon } from '../Icon';\n\nimport { useToggleGroup } from './ToggleGroup';\nimport styles from './ToggleGroup.module.css';\n\nexport interface ToggleGroupItemProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n /** String identifier — used as the group's `value` when this item is selected. */\n name: string;\n /** Visible label. Omit for icon-only items (provide `aria-label` instead). */\n label?: string;\n /** Icon from `@gnome-ui/icons`. */\n icon?: IconDefinition;\n}\n\n/**\n * Individual toggle inside a `ToggleGroup`.\n *\n * Can be icon-only, label-only, or icon + label. For icon-only items always\n * provide an `aria-label` so screen readers can identify the option.\n */\nexport
|
|
1
|
+
{"version":3,"file":"ToggleGroupItem.js","names":[],"sources":["../../../src/components/ToggleGroup/ToggleGroupItem.tsx"],"sourcesContent":["import type { IconDefinition } from '@gnome-ui/icons';\nimport type { ButtonHTMLAttributes } from 'react';\n\nimport { Icon } from '../Icon';\n\nimport { useToggleGroup } from './ToggleGroup';\nimport styles from './ToggleGroup.module.css';\n\nexport interface ToggleGroupItemProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n /** String identifier — used as the group's `value` when this item is selected. */\n name: string;\n /** Visible label. Omit for icon-only items (provide `aria-label` instead). */\n label?: string;\n /** Icon from `@gnome-ui/icons`. */\n icon?: IconDefinition;\n}\n\n/**\n * Individual toggle inside a `ToggleGroup`.\n *\n * Can be icon-only, label-only, or icon + label. For icon-only items always\n * provide an `aria-label` so screen readers can identify the option.\n */\nexport const ToggleGroupItem = ({\n name,\n label,\n icon,\n disabled,\n className,\n ...props\n}: ToggleGroupItemProps) => {\n const { value, onValueChange } = useToggleGroup();\n const active = value === name;\n const iconOnly = icon && !label;\n\n return (\n <button\n type=\"button\"\n role=\"radio\"\n aria-checked={active}\n tabIndex={active ? 0 : -1}\n disabled={disabled}\n onClick={() => onValueChange(name)}\n className={[\n styles.item,\n active ? styles.active : null,\n iconOnly ? styles.iconOnly : null,\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n >\n {icon && (\n <span className={styles.itemIcon}>\n <Icon icon={icon} size=\"md\" aria-hidden />\n </span>\n )}\n {label && <span className={styles.itemLabel}>{label}</span>}\n </button>\n );\n};\n"],"mappings":";;;;;AAuBA,IAAa,KAAmB,EAC9B,SACA,UACA,SACA,aACA,cACA,GAAG,QACuB;CAC1B,IAAM,EAAE,UAAO,qBAAkB,EAAe,GAC1C,IAAS,MAAU,GACnB,IAAW,KAAQ,CAAC;CAE1B,OACE,kBAAC,UAAD;EACE,MAAK;EACL,MAAK;EACL,gBAAc;EACd,UAAU,IAAS,IAAI;EACb;EACV,eAAe,EAAc,CAAI;EACjC,WAAW;GACT,EAAO;GACP,IAAS,EAAO,SAAS;GACzB,IAAW,EAAO,WAAW;GAC7B;EACF,EACG,OAAO,OAAO,EACd,KAAK,GAAG;EACX,GAAI;YAfN,CAiBG,KACC,kBAAC,QAAD;GAAM,WAAW,EAAO;aACtB,kBAAC,GAAD;IAAY;IAAM,MAAK;IAAK,eAAA;GAAa,CAAA;EACrC,CAAA,GAEP,KAAS,kBAAC,QAAD;GAAM,WAAW,EAAO;aAAY;EAAY,CAAA,CACpD;;AAEZ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./ToggleGroup/ToggleGroup.cjs"),t=require("./ToggleGroup/ToggleGroupItem.cjs");exports.ToggleGroup=e.ToggleGroup,exports.ToggleGroupItem=t.ToggleGroupItem;
|