@gnome-ui/react 1.45.1 → 1.46.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AboutDialog/AboutDialog.cjs +1 -1
- package/dist/components/AboutDialog/AboutDialog.cjs.map +1 -1
- package/dist/components/AboutDialog/AboutDialog.d.ts +1 -1
- package/dist/components/AboutDialog/AboutDialog.js +106 -108
- package/dist/components/AboutDialog/AboutDialog.js.map +1 -1
- package/dist/components/AboutDialog/AboutDialog.module.css.cjs +1 -1
- package/dist/components/AboutDialog/AboutDialog.module.css.js +28 -29
- package/dist/components/AboutDialog.cjs +1 -1
- package/dist/components/ActionRow/ActionRow.cjs +1 -1
- package/dist/components/ActionRow/ActionRow.cjs.map +1 -1
- package/dist/components/ActionRow/ActionRow.d.ts +1 -1
- package/dist/components/ActionRow/ActionRow.js +2 -2
- package/dist/components/ActionRow/ActionRow.js.map +1 -1
- package/dist/components/ActionRow.cjs +1 -1
- package/dist/components/Avatar/Avatar.cjs +1 -1
- package/dist/components/Avatar/Avatar.cjs.map +1 -1
- package/dist/components/Avatar/Avatar.d.ts +1 -1
- package/dist/components/Avatar/Avatar.js +2 -2
- package/dist/components/Avatar/Avatar.js.map +1 -1
- package/dist/components/Avatar.cjs +1 -1
- package/dist/components/AvatarRotator/AvatarRotator.cjs +1 -1
- package/dist/components/AvatarRotator/AvatarRotator.cjs.map +1 -1
- package/dist/components/AvatarRotator/AvatarRotator.d.ts +1 -1
- package/dist/components/AvatarRotator/AvatarRotator.js +2 -2
- package/dist/components/AvatarRotator/AvatarRotator.js.map +1 -1
- package/dist/components/AvatarRotator.cjs +1 -1
- package/dist/components/Badge/Badge.cjs +1 -1
- package/dist/components/Badge/Badge.cjs.map +1 -1
- package/dist/components/Badge/Badge.d.ts +1 -1
- package/dist/components/Badge/Badge.js +2 -2
- package/dist/components/Badge/Badge.js.map +1 -1
- package/dist/components/Badge.cjs +1 -1
- package/dist/components/Banner/Banner.cjs +1 -1
- package/dist/components/Banner/Banner.cjs.map +1 -1
- package/dist/components/Banner/Banner.d.ts +1 -1
- package/dist/components/Banner/Banner.js +34 -36
- package/dist/components/Banner/Banner.js.map +1 -1
- package/dist/components/Banner/Banner.module.css.cjs +1 -1
- package/dist/components/Banner/Banner.module.css.js +11 -12
- package/dist/components/Banner.cjs +1 -1
- package/dist/components/Bin/Bin.cjs +1 -1
- package/dist/components/Bin/Bin.cjs.map +1 -1
- package/dist/components/Bin/Bin.d.ts +1 -1
- package/dist/components/Bin/Bin.js +4 -6
- package/dist/components/Bin/Bin.js.map +1 -1
- package/dist/components/Bin.cjs +1 -1
- package/dist/components/Blockquote/Blockquote.cjs +1 -1
- package/dist/components/Blockquote/Blockquote.cjs.map +1 -1
- package/dist/components/Blockquote/Blockquote.d.ts +1 -1
- package/dist/components/Blockquote/Blockquote.js +24 -26
- package/dist/components/Blockquote/Blockquote.js.map +1 -1
- package/dist/components/Blockquote.cjs +1 -1
- package/dist/components/BottomSheet/BottomSheet.cjs +1 -1
- package/dist/components/BottomSheet/BottomSheet.cjs.map +1 -1
- package/dist/components/BottomSheet/BottomSheet.d.ts +1 -1
- package/dist/components/BottomSheet/BottomSheet.js +37 -38
- package/dist/components/BottomSheet/BottomSheet.js.map +1 -1
- package/dist/components/BottomSheet/BottomSheet.module.css.cjs +1 -1
- package/dist/components/BottomSheet/BottomSheet.module.css.js +8 -9
- package/dist/components/BottomSheet.cjs +1 -1
- package/dist/components/Box/Box.cjs +1 -1
- package/dist/components/Box/Box.cjs.map +1 -1
- package/dist/components/Box/Box.d.ts +1 -1
- package/dist/components/Box/Box.js +2 -2
- package/dist/components/Box/Box.js.map +1 -1
- package/dist/components/Box.cjs +1 -1
- package/dist/components/BoxedList/BoxedList.cjs +1 -1
- package/dist/components/BoxedList/BoxedList.cjs.map +1 -1
- package/dist/components/BoxedList/BoxedList.d.ts +1 -1
- package/dist/components/BoxedList/BoxedList.js +2 -2
- package/dist/components/BoxedList/BoxedList.js.map +1 -1
- package/dist/components/BoxedList.cjs +1 -1
- package/dist/components/BreakpointBin/BreakpointBin.cjs +1 -1
- package/dist/components/BreakpointBin/BreakpointBin.cjs.map +1 -1
- package/dist/components/BreakpointBin/BreakpointBin.d.ts +1 -1
- package/dist/components/BreakpointBin/BreakpointBin.js +2 -2
- package/dist/components/BreakpointBin/BreakpointBin.js.map +1 -1
- package/dist/components/BreakpointBin.cjs +1 -1
- package/dist/components/Button/Button.cjs +1 -1
- package/dist/components/Button/Button.cjs.map +1 -1
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Button.cjs +1 -1
- package/dist/components/ButtonContent/ButtonContent.cjs +1 -1
- package/dist/components/ButtonContent/ButtonContent.cjs.map +1 -1
- package/dist/components/ButtonContent/ButtonContent.d.ts +1 -1
- package/dist/components/ButtonContent/ButtonContent.js +24 -26
- package/dist/components/ButtonContent/ButtonContent.js.map +1 -1
- package/dist/components/ButtonContent.cjs +1 -1
- package/dist/components/ButtonRow/ButtonRow.cjs +1 -1
- package/dist/components/ButtonRow/ButtonRow.cjs.map +1 -1
- package/dist/components/ButtonRow/ButtonRow.d.ts +1 -1
- package/dist/components/ButtonRow/ButtonRow.js +22 -24
- package/dist/components/ButtonRow/ButtonRow.js.map +1 -1
- package/dist/components/ButtonRow.cjs +1 -1
- package/dist/components/Card/Card.cjs +1 -1
- package/dist/components/Card/Card.cjs.map +1 -1
- package/dist/components/Card/Card.d.ts +1 -1
- package/dist/components/Card/Card.js +10 -12
- package/dist/components/Card/Card.js.map +1 -1
- package/dist/components/Card/Card.module.css.cjs +1 -1
- package/dist/components/Card/Card.module.css.js +4 -5
- package/dist/components/Card.cjs +1 -1
- package/dist/components/Carousel/Carousel.cjs +1 -1
- package/dist/components/Carousel/Carousel.cjs.map +1 -1
- package/dist/components/Carousel/Carousel.d.ts +3 -3
- package/dist/components/Carousel/Carousel.js +28 -34
- package/dist/components/Carousel/Carousel.js.map +1 -1
- package/dist/components/Carousel.cjs +1 -1
- package/dist/components/CheckRow/CheckRow.cjs +1 -1
- package/dist/components/CheckRow/CheckRow.cjs.map +1 -1
- package/dist/components/CheckRow/CheckRow.d.ts +1 -1
- package/dist/components/CheckRow/CheckRow.js +7 -7
- package/dist/components/CheckRow/CheckRow.js.map +1 -1
- package/dist/components/CheckRow.cjs +1 -1
- package/dist/components/Checkbox/Checkbox.cjs +1 -1
- package/dist/components/Checkbox/Checkbox.cjs.map +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts +1 -1
- package/dist/components/Checkbox/Checkbox.js +2 -2
- package/dist/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/Checkbox.cjs +1 -1
- package/dist/components/Chip/Chip.cjs +1 -1
- package/dist/components/Chip/Chip.cjs.map +1 -1
- package/dist/components/Chip/Chip.d.ts +1 -1
- package/dist/components/Chip/Chip.js +2 -2
- package/dist/components/Chip/Chip.js.map +1 -1
- package/dist/components/Chip.cjs +1 -1
- package/dist/components/Clamp/Clamp.cjs +1 -1
- package/dist/components/Clamp/Clamp.cjs.map +1 -1
- package/dist/components/Clamp/Clamp.d.ts +1 -1
- package/dist/components/Clamp/Clamp.js +9 -11
- package/dist/components/Clamp/Clamp.js.map +1 -1
- package/dist/components/Clamp.cjs +1 -1
- package/dist/components/ColorPicker/ColorPicker.cjs +1 -1
- package/dist/components/ColorPicker/ColorPicker.cjs.map +1 -1
- package/dist/components/ColorPicker/ColorPicker.d.ts +2 -2
- package/dist/components/ColorPicker/ColorPicker.js +33 -37
- package/dist/components/ColorPicker/ColorPicker.js.map +1 -1
- package/dist/components/ColorPicker/ColorPicker.module.css.cjs +1 -1
- package/dist/components/ColorPicker/ColorPicker.module.css.js +9 -10
- package/dist/components/ColorPicker.cjs +1 -1
- package/dist/components/ColumnView/ColumnView.cjs +1 -1
- package/dist/components/ColumnView/ColumnView.cjs.map +1 -1
- package/dist/components/ColumnView/ColumnView.d.ts +1 -1
- package/dist/components/ColumnView/ColumnView.js +24 -28
- package/dist/components/ColumnView/ColumnView.js.map +1 -1
- package/dist/components/ColumnView.cjs +1 -1
- package/dist/components/ComboRow/ComboRow.cjs +1 -1
- package/dist/components/ComboRow/ComboRow.cjs.map +1 -1
- package/dist/components/ComboRow/ComboRow.d.ts +1 -1
- package/dist/components/ComboRow/ComboRow.js +2 -2
- package/dist/components/ComboRow/ComboRow.js.map +1 -1
- package/dist/components/ComboRow/ComboRow.module.css.cjs +1 -1
- package/dist/components/ComboRow/ComboRow.module.css.js +24 -25
- package/dist/components/ComboRow.cjs +1 -1
- package/dist/components/ContributionGraph/ContributionGraph.cjs +1 -1
- package/dist/components/ContributionGraph/ContributionGraph.cjs.map +1 -1
- package/dist/components/ContributionGraph/ContributionGraph.d.ts +1 -1
- package/dist/components/ContributionGraph/ContributionGraph.js +2 -2
- package/dist/components/ContributionGraph/ContributionGraph.js.map +1 -1
- package/dist/components/ContributionGraph.cjs +1 -1
- package/dist/components/CountDownTimer/CountDownTimer.cjs +1 -1
- package/dist/components/CountDownTimer/CountDownTimer.cjs.map +1 -1
- package/dist/components/CountDownTimer/CountDownTimer.d.ts +1 -1
- package/dist/components/CountDownTimer/CountDownTimer.js +2 -2
- package/dist/components/CountDownTimer/CountDownTimer.js.map +1 -1
- package/dist/components/CountDownTimer.cjs +1 -1
- package/dist/components/Dialog/Dialog.cjs +1 -1
- package/dist/components/Dialog/Dialog.cjs.map +1 -1
- package/dist/components/Dialog/Dialog.d.ts +1 -1
- package/dist/components/Dialog/Dialog.js +51 -52
- package/dist/components/Dialog/Dialog.js.map +1 -1
- package/dist/components/Dialog/Dialog.module.css.cjs +1 -1
- package/dist/components/Dialog/Dialog.module.css.js +8 -9
- package/dist/components/Dialog/dialogUtils.cjs +1 -1
- package/dist/components/Dialog/dialogUtils.cjs.map +1 -1
- package/dist/components/Dialog/dialogUtils.d.ts +6 -0
- package/dist/components/Dialog/dialogUtils.js +11 -2
- package/dist/components/Dialog/dialogUtils.js.map +1 -1
- package/dist/components/Dialog.cjs +1 -1
- package/dist/components/Drawer/Drawer.cjs +1 -1
- package/dist/components/Drawer/Drawer.cjs.map +1 -1
- package/dist/components/Drawer/Drawer.d.ts +1 -1
- package/dist/components/Drawer/Drawer.js +2 -2
- package/dist/components/Drawer/Drawer.js.map +1 -1
- package/dist/components/Drawer/Drawer.module.css.cjs +1 -1
- package/dist/components/Drawer/Drawer.module.css.js +11 -12
- package/dist/components/Drawer.cjs +1 -1
- package/dist/components/Dropdown/Dropdown.cjs +1 -1
- package/dist/components/Dropdown/Dropdown.cjs.map +1 -1
- package/dist/components/Dropdown/Dropdown.d.ts +1 -1
- package/dist/components/Dropdown/Dropdown.js +89 -85
- package/dist/components/Dropdown/Dropdown.js.map +1 -1
- package/dist/components/Dropdown/Dropdown.module.css.cjs +1 -1
- package/dist/components/Dropdown/Dropdown.module.css.js +20 -21
- package/dist/components/Dropdown.cjs +1 -1
- package/dist/components/EntryRow/EntryRow.cjs +1 -1
- package/dist/components/EntryRow/EntryRow.cjs.map +1 -1
- package/dist/components/EntryRow/EntryRow.d.ts +1 -1
- package/dist/components/EntryRow/EntryRow.js +2 -2
- package/dist/components/EntryRow/EntryRow.js.map +1 -1
- package/dist/components/EntryRow.cjs +1 -1
- package/dist/components/ExpanderRow/ExpanderRow.cjs +1 -1
- package/dist/components/ExpanderRow/ExpanderRow.cjs.map +1 -1
- package/dist/components/ExpanderRow/ExpanderRow.d.ts +1 -1
- package/dist/components/ExpanderRow/ExpanderRow.js +2 -2
- package/dist/components/ExpanderRow/ExpanderRow.js.map +1 -1
- package/dist/components/ExpanderRow.cjs +1 -1
- package/dist/components/Footer/Footer.cjs +1 -1
- package/dist/components/Footer/Footer.cjs.map +1 -1
- package/dist/components/Footer/Footer.d.ts +1 -1
- package/dist/components/Footer/Footer.js +22 -24
- package/dist/components/Footer/Footer.js.map +1 -1
- package/dist/components/Footer.cjs +1 -1
- package/dist/components/Frame/Frame.cjs +1 -1
- package/dist/components/Frame/Frame.cjs.map +1 -1
- package/dist/components/Frame/Frame.d.ts +1 -1
- package/dist/components/Frame/Frame.js +5 -7
- package/dist/components/Frame/Frame.js.map +1 -1
- package/dist/components/Frame.cjs +1 -1
- package/dist/components/GnomeProvider/GnomeContext.cjs +1 -1
- package/dist/components/GnomeProvider/GnomeContext.cjs.map +1 -1
- package/dist/components/GnomeProvider/GnomeContext.js.map +1 -1
- package/dist/components/GnomeProvider/GnomeProvider.cjs +1 -1
- package/dist/components/GnomeProvider/GnomeProvider.cjs.map +1 -1
- package/dist/components/GnomeProvider/GnomeProvider.d.ts +1 -1
- package/dist/components/GnomeProvider/GnomeProvider.js +2 -2
- package/dist/components/GnomeProvider/GnomeProvider.js.map +1 -1
- package/dist/components/HeaderBar/HeaderBar.cjs +1 -1
- package/dist/components/HeaderBar/HeaderBar.cjs.map +1 -1
- package/dist/components/HeaderBar/HeaderBar.d.ts +1 -1
- package/dist/components/HeaderBar/HeaderBar.js +26 -28
- package/dist/components/HeaderBar/HeaderBar.js.map +1 -1
- package/dist/components/HeaderBar.cjs +1 -1
- package/dist/components/Icon/Icon.cjs +1 -1
- package/dist/components/Icon/Icon.cjs.map +1 -1
- package/dist/components/Icon/Icon.d.ts +1 -1
- package/dist/components/Icon/Icon.js +2 -2
- package/dist/components/Icon/Icon.js.map +1 -1
- package/dist/components/Icon.cjs +1 -1
- package/dist/components/IconButton/IconButton.cjs +1 -1
- package/dist/components/IconButton/IconButton.cjs.map +1 -1
- package/dist/components/IconButton/IconButton.js +4 -4
- package/dist/components/IconButton/IconButton.js.map +1 -1
- package/dist/components/IconButton.cjs +1 -1
- package/dist/components/InlineViewSwitcher/InlineViewSwitcher.cjs +1 -1
- package/dist/components/InlineViewSwitcher/InlineViewSwitcher.cjs.map +1 -1
- package/dist/components/InlineViewSwitcher/InlineViewSwitcher.d.ts +1 -1
- package/dist/components/InlineViewSwitcher/InlineViewSwitcher.js +2 -2
- package/dist/components/InlineViewSwitcher/InlineViewSwitcher.js.map +1 -1
- package/dist/components/InlineViewSwitcher/InlineViewSwitcherItem.cjs +1 -1
- package/dist/components/InlineViewSwitcher/InlineViewSwitcherItem.cjs.map +1 -1
- package/dist/components/InlineViewSwitcher/InlineViewSwitcherItem.d.ts +1 -1
- package/dist/components/InlineViewSwitcher/InlineViewSwitcherItem.js +2 -2
- package/dist/components/InlineViewSwitcher/InlineViewSwitcherItem.js.map +1 -1
- package/dist/components/InlineViewSwitcher.cjs +1 -1
- package/dist/components/Link/Link.cjs +1 -1
- package/dist/components/Link/Link.cjs.map +1 -1
- package/dist/components/Link/Link.d.ts +1 -1
- package/dist/components/Link/Link.js +2 -2
- package/dist/components/Link/Link.js.map +1 -1
- package/dist/components/Link.cjs +1 -1
- package/dist/components/LinkedGroup/LinkedGroup.cjs +1 -1
- package/dist/components/LinkedGroup/LinkedGroup.cjs.map +1 -1
- package/dist/components/LinkedGroup/LinkedGroup.d.ts +1 -1
- package/dist/components/LinkedGroup/LinkedGroup.js +9 -11
- package/dist/components/LinkedGroup/LinkedGroup.js.map +1 -1
- package/dist/components/LinkedGroup.cjs +1 -1
- package/dist/components/NavigationSplitView/NavigationSplitView.cjs +1 -1
- package/dist/components/NavigationSplitView/NavigationSplitView.cjs.map +1 -1
- package/dist/components/NavigationSplitView/NavigationSplitView.d.ts +1 -1
- package/dist/components/NavigationSplitView/NavigationSplitView.js +2 -2
- package/dist/components/NavigationSplitView/NavigationSplitView.js.map +1 -1
- package/dist/components/NavigationSplitView.cjs +1 -1
- package/dist/components/NavigationView/NavigationView.cjs +1 -1
- package/dist/components/NavigationView/NavigationView.cjs.map +1 -1
- package/dist/components/NavigationView/NavigationView.d.ts +2 -2
- package/dist/components/NavigationView/NavigationView.js +3 -4
- package/dist/components/NavigationView/NavigationView.js.map +1 -1
- package/dist/components/NavigationView/NavigationView.module.css.cjs +1 -1
- package/dist/components/NavigationView/NavigationView.module.css.js +9 -10
- package/dist/components/NavigationView.cjs +1 -1
- package/dist/components/OverlaySplitView/OverlaySplitView.cjs +1 -1
- package/dist/components/OverlaySplitView/OverlaySplitView.cjs.map +1 -1
- package/dist/components/OverlaySplitView/OverlaySplitView.d.ts +1 -1
- package/dist/components/OverlaySplitView/OverlaySplitView.js +2 -2
- package/dist/components/OverlaySplitView/OverlaySplitView.js.map +1 -1
- package/dist/components/OverlaySplitView.cjs +1 -1
- package/dist/components/PasswordEntryRow/PasswordEntryRow.cjs +1 -1
- package/dist/components/PasswordEntryRow/PasswordEntryRow.cjs.map +1 -1
- package/dist/components/PasswordEntryRow/PasswordEntryRow.d.ts +1 -1
- package/dist/components/PasswordEntryRow/PasswordEntryRow.js +11 -10
- package/dist/components/PasswordEntryRow/PasswordEntryRow.js.map +1 -1
- package/dist/components/PasswordEntryRow.cjs +1 -1
- package/dist/components/PathBar/PathBar.cjs +1 -1
- package/dist/components/PathBar/PathBar.cjs.map +1 -1
- package/dist/components/PathBar/PathBar.d.ts +1 -1
- package/dist/components/PathBar/PathBar.js +48 -50
- package/dist/components/PathBar/PathBar.js.map +1 -1
- package/dist/components/PathBar.cjs +1 -1
- package/dist/components/Popover/Popover.cjs +1 -1
- package/dist/components/Popover/Popover.cjs.map +1 -1
- package/dist/components/Popover/Popover.d.ts +1 -1
- package/dist/components/Popover/Popover.js +5 -5
- package/dist/components/Popover/Popover.js.map +1 -1
- package/dist/components/Popover.cjs +1 -1
- package/dist/components/PreferencesDialog/PreferencesDialog.cjs +1 -1
- package/dist/components/PreferencesDialog/PreferencesDialog.cjs.map +1 -1
- package/dist/components/PreferencesDialog/PreferencesDialog.d.ts +1 -1
- package/dist/components/PreferencesDialog/PreferencesDialog.js +2 -2
- package/dist/components/PreferencesDialog/PreferencesDialog.js.map +1 -1
- package/dist/components/PreferencesDialog/PreferencesDialog.module.css.cjs +1 -1
- package/dist/components/PreferencesDialog/PreferencesDialog.module.css.js +18 -19
- package/dist/components/PreferencesDialog.cjs +1 -1
- package/dist/components/PreferencesGroup/PreferencesGroup.cjs +1 -1
- package/dist/components/PreferencesGroup/PreferencesGroup.cjs.map +1 -1
- package/dist/components/PreferencesGroup/PreferencesGroup.d.ts +1 -1
- package/dist/components/PreferencesGroup/PreferencesGroup.js +2 -2
- package/dist/components/PreferencesGroup/PreferencesGroup.js.map +1 -1
- package/dist/components/PreferencesGroup.cjs +1 -1
- package/dist/components/PreferencesPage/PreferencesPage.cjs +1 -1
- package/dist/components/PreferencesPage/PreferencesPage.cjs.map +1 -1
- package/dist/components/PreferencesPage/PreferencesPage.d.ts +1 -1
- package/dist/components/PreferencesPage/PreferencesPage.js +9 -11
- package/dist/components/PreferencesPage/PreferencesPage.js.map +1 -1
- package/dist/components/PreferencesPage.cjs +1 -1
- package/dist/components/ProgressBar/ProgressBar.cjs +1 -1
- package/dist/components/ProgressBar/ProgressBar.cjs.map +1 -1
- package/dist/components/ProgressBar/ProgressBar.d.ts +1 -1
- package/dist/components/ProgressBar/ProgressBar.js +2 -2
- package/dist/components/ProgressBar/ProgressBar.js.map +1 -1
- package/dist/components/ProgressBar.cjs +1 -1
- package/dist/components/RadioButton/RadioButton.cjs +1 -1
- package/dist/components/RadioButton/RadioButton.cjs.map +1 -1
- package/dist/components/RadioButton/RadioButton.d.ts +1 -1
- package/dist/components/RadioButton/RadioButton.js +5 -7
- package/dist/components/RadioButton/RadioButton.js.map +1 -1
- package/dist/components/RadioButton.cjs +1 -1
- package/dist/components/SearchBar/SearchBar.cjs +1 -1
- package/dist/components/SearchBar/SearchBar.cjs.map +1 -1
- package/dist/components/SearchBar/SearchBar.d.ts +1 -1
- package/dist/components/SearchBar/SearchBar.js +2 -2
- package/dist/components/SearchBar/SearchBar.js.map +1 -1
- package/dist/components/SearchBar.cjs +1 -1
- package/dist/components/SegmentedBar/SegmentedBar.cjs +1 -1
- package/dist/components/SegmentedBar/SegmentedBar.cjs.map +1 -1
- package/dist/components/SegmentedBar/SegmentedBar.js.map +1 -1
- package/dist/components/SegmentedBar.cjs +1 -1
- package/dist/components/Separator/Separator.cjs +1 -1
- package/dist/components/Separator/Separator.cjs.map +1 -1
- package/dist/components/Separator/Separator.d.ts +1 -1
- package/dist/components/Separator/Separator.js +2 -2
- package/dist/components/Separator/Separator.js.map +1 -1
- package/dist/components/Separator.cjs +1 -1
- package/dist/components/ShortcutLabel/ShortcutLabel.cjs +1 -1
- package/dist/components/ShortcutLabel/ShortcutLabel.cjs.map +1 -1
- package/dist/components/ShortcutLabel/ShortcutLabel.d.ts +1 -1
- package/dist/components/ShortcutLabel/ShortcutLabel.js +2 -3
- package/dist/components/ShortcutLabel/ShortcutLabel.js.map +1 -1
- package/dist/components/ShortcutLabel.cjs +1 -1
- package/dist/components/ShortcutsDialog/ShortcutsDialog.cjs +1 -1
- package/dist/components/ShortcutsDialog/ShortcutsDialog.cjs.map +1 -1
- package/dist/components/ShortcutsDialog/ShortcutsDialog.d.ts +1 -1
- package/dist/components/ShortcutsDialog/ShortcutsDialog.js +75 -76
- package/dist/components/ShortcutsDialog/ShortcutsDialog.js.map +1 -1
- package/dist/components/ShortcutsDialog/ShortcutsDialog.module.css.cjs +1 -1
- package/dist/components/ShortcutsDialog/ShortcutsDialog.module.css.js +21 -22
- package/dist/components/ShortcutsDialog.cjs +1 -1
- package/dist/components/Sidebar/Sidebar.cjs +1 -1
- package/dist/components/Sidebar/Sidebar.cjs.map +1 -1
- package/dist/components/Sidebar/Sidebar.d.ts +1 -1
- package/dist/components/Sidebar/Sidebar.js +2 -3
- package/dist/components/Sidebar/Sidebar.js.map +1 -1
- package/dist/components/Sidebar/Sidebar.module.css.cjs +1 -1
- package/dist/components/Sidebar/Sidebar.module.css.js +33 -34
- package/dist/components/Sidebar/SidebarItem.cjs +1 -1
- package/dist/components/Sidebar/SidebarItem.cjs.map +1 -1
- package/dist/components/Sidebar/SidebarItem.d.ts +1 -1
- package/dist/components/Sidebar/SidebarItem.js +16 -16
- package/dist/components/Sidebar/SidebarItem.js.map +1 -1
- package/dist/components/Sidebar/SidebarSection.cjs +1 -1
- package/dist/components/Sidebar/SidebarSection.cjs.map +1 -1
- package/dist/components/Sidebar/SidebarSection.js.map +1 -1
- package/dist/components/Sidebar.cjs +1 -1
- package/dist/components/Skeleton/Skeleton.cjs +1 -1
- package/dist/components/Skeleton/Skeleton.cjs.map +1 -1
- package/dist/components/Skeleton/Skeleton.d.ts +1 -1
- package/dist/components/Skeleton/Skeleton.js +9 -10
- package/dist/components/Skeleton/Skeleton.js.map +1 -1
- package/dist/components/Skeleton.cjs +1 -1
- package/dist/components/Slider/Slider.cjs +1 -1
- package/dist/components/Slider/Slider.cjs.map +1 -1
- package/dist/components/Slider/Slider.d.ts +1 -1
- package/dist/components/Slider/Slider.js +2 -2
- package/dist/components/Slider/Slider.js.map +1 -1
- package/dist/components/Slider.cjs +1 -1
- package/dist/components/SpinButton/SpinButton.cjs +1 -1
- package/dist/components/SpinButton/SpinButton.cjs.map +1 -1
- package/dist/components/SpinButton/SpinButton.d.ts +1 -1
- package/dist/components/SpinButton/SpinButton.js +2 -2
- package/dist/components/SpinButton/SpinButton.js.map +1 -1
- package/dist/components/SpinButton.cjs +1 -1
- package/dist/components/SpinRow/SpinRow.cjs +1 -1
- package/dist/components/SpinRow/SpinRow.cjs.map +1 -1
- package/dist/components/SpinRow/SpinRow.d.ts +1 -1
- package/dist/components/SpinRow/SpinRow.js +2 -2
- package/dist/components/SpinRow/SpinRow.js.map +1 -1
- package/dist/components/SpinRow.cjs +1 -1
- package/dist/components/Spinner/Spinner.cjs +1 -1
- package/dist/components/Spinner/Spinner.cjs.map +1 -1
- package/dist/components/Spinner/Spinner.d.ts +1 -1
- package/dist/components/Spinner/Spinner.js +2 -2
- package/dist/components/Spinner/Spinner.js.map +1 -1
- package/dist/components/Spinner.cjs +1 -1
- package/dist/components/SplitButton/SplitButton.cjs +1 -1
- package/dist/components/SplitButton/SplitButton.cjs.map +1 -1
- package/dist/components/SplitButton/SplitButton.d.ts +1 -1
- package/dist/components/SplitButton/SplitButton.js +2 -2
- package/dist/components/SplitButton/SplitButton.js.map +1 -1
- package/dist/components/SplitButton.cjs +1 -1
- package/dist/components/StatusBadge/StatusBadge.cjs +1 -1
- package/dist/components/StatusBadge/StatusBadge.cjs.map +1 -1
- package/dist/components/StatusBadge/StatusBadge.d.ts +1 -1
- package/dist/components/StatusBadge/StatusBadge.js +9 -11
- package/dist/components/StatusBadge/StatusBadge.js.map +1 -1
- package/dist/components/StatusBadge.cjs +1 -1
- package/dist/components/StatusPage/StatusPage.cjs +1 -1
- package/dist/components/StatusPage/StatusPage.cjs.map +1 -1
- package/dist/components/StatusPage/StatusPage.d.ts +1 -1
- package/dist/components/StatusPage/StatusPage.js +2 -2
- package/dist/components/StatusPage/StatusPage.js.map +1 -1
- package/dist/components/StatusPage.cjs +1 -1
- package/dist/components/Switch/Switch.cjs +1 -1
- package/dist/components/Switch/Switch.cjs.map +1 -1
- package/dist/components/Switch/Switch.d.ts +1 -1
- package/dist/components/Switch/Switch.js +6 -8
- package/dist/components/Switch/Switch.js.map +1 -1
- package/dist/components/Switch.cjs +1 -1
- package/dist/components/SwitchRow/SwitchRow.cjs +1 -1
- package/dist/components/SwitchRow/SwitchRow.cjs.map +1 -1
- package/dist/components/SwitchRow/SwitchRow.d.ts +1 -1
- package/dist/components/SwitchRow/SwitchRow.js +7 -7
- package/dist/components/SwitchRow/SwitchRow.js.map +1 -1
- package/dist/components/SwitchRow.cjs +1 -1
- package/dist/components/Tabs/TabBar.cjs +1 -1
- package/dist/components/Tabs/TabBar.cjs.map +1 -1
- package/dist/components/Tabs/TabBar.d.ts +1 -1
- package/dist/components/Tabs/TabBar.js +2 -2
- package/dist/components/Tabs/TabBar.js.map +1 -1
- package/dist/components/Tabs/TabItem.cjs +1 -1
- package/dist/components/Tabs/TabItem.cjs.map +1 -1
- package/dist/components/Tabs/TabItem.js.map +1 -1
- package/dist/components/Tabs/TabPanel.cjs +1 -1
- package/dist/components/Tabs/TabPanel.cjs.map +1 -1
- package/dist/components/Tabs/TabPanel.d.ts +1 -1
- package/dist/components/Tabs/TabPanel.js +8 -10
- package/dist/components/Tabs/TabPanel.js.map +1 -1
- package/dist/components/Tabs.cjs +1 -1
- package/dist/components/TerminalView/TerminalView.cjs +1 -1
- package/dist/components/TerminalView/TerminalView.cjs.map +1 -1
- package/dist/components/TerminalView/TerminalView.d.ts +1 -1
- package/dist/components/TerminalView/TerminalView.js +2 -2
- package/dist/components/TerminalView/TerminalView.js.map +1 -1
- package/dist/components/TerminalView.cjs +1 -1
- package/dist/components/Text/Text.cjs +1 -1
- package/dist/components/Text/Text.cjs.map +1 -1
- package/dist/components/Text/Text.d.ts +1 -1
- package/dist/components/Text/Text.js +10 -13
- package/dist/components/Text/Text.js.map +1 -1
- package/dist/components/Text/Text.module.css.cjs +1 -1
- package/dist/components/Text/Text.module.css.js +9 -10
- package/dist/components/Text.cjs +1 -1
- package/dist/components/TextField/TextField.cjs +1 -1
- package/dist/components/TextField/TextField.cjs.map +1 -1
- package/dist/components/TextField/TextField.d.ts +1 -1
- package/dist/components/TextField/TextField.js +2 -2
- package/dist/components/TextField/TextField.js.map +1 -1
- package/dist/components/TextField.cjs +1 -1
- package/dist/components/Timeline/Timeline.cjs +1 -1
- package/dist/components/Timeline/Timeline.cjs.map +1 -1
- package/dist/components/Timeline/Timeline.d.ts +1 -1
- package/dist/components/Timeline/Timeline.js +2 -2
- package/dist/components/Timeline/Timeline.js.map +1 -1
- package/dist/components/Timeline.cjs +1 -1
- package/dist/components/Toast/Toast.cjs +1 -1
- package/dist/components/Toast/Toast.cjs.map +1 -1
- package/dist/components/Toast/Toast.d.ts +1 -1
- package/dist/components/Toast/Toast.js +2 -2
- package/dist/components/Toast/Toast.js.map +1 -1
- package/dist/components/Toast/Toast.module.css.cjs +1 -1
- package/dist/components/Toast/Toast.module.css.js +10 -11
- package/dist/components/Toast/Toaster.cjs +1 -1
- package/dist/components/Toast/Toaster.cjs.map +1 -1
- package/dist/components/Toast/Toaster.d.ts +1 -1
- package/dist/components/Toast/Toaster.js +2 -2
- package/dist/components/Toast/Toaster.js.map +1 -1
- package/dist/components/Toast.cjs +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.cjs +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.cjs.map +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.d.ts +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.js +2 -2
- package/dist/components/ToggleGroup/ToggleGroup.js.map +1 -1
- package/dist/components/ToggleGroup/ToggleGroupItem.cjs +1 -1
- package/dist/components/ToggleGroup/ToggleGroupItem.cjs.map +1 -1
- package/dist/components/ToggleGroup/ToggleGroupItem.d.ts +1 -1
- package/dist/components/ToggleGroup/ToggleGroupItem.js +2 -2
- package/dist/components/ToggleGroup/ToggleGroupItem.js.map +1 -1
- package/dist/components/ToggleGroup.cjs +1 -1
- package/dist/components/Toolbar/Spacer.cjs +1 -1
- package/dist/components/Toolbar/Spacer.cjs.map +1 -1
- package/dist/components/Toolbar/Spacer.d.ts +1 -1
- package/dist/components/Toolbar/Spacer.js +5 -7
- package/dist/components/Toolbar/Spacer.js.map +1 -1
- package/dist/components/Toolbar/Toolbar.cjs +1 -1
- package/dist/components/Toolbar/Toolbar.cjs.map +1 -1
- package/dist/components/Toolbar/Toolbar.d.ts +1 -1
- package/dist/components/Toolbar/Toolbar.js +5 -7
- package/dist/components/Toolbar/Toolbar.js.map +1 -1
- package/dist/components/Toolbar.cjs +1 -1
- package/dist/components/ToolbarView/ToolbarView.cjs +1 -1
- package/dist/components/ToolbarView/ToolbarView.cjs.map +1 -1
- package/dist/components/ToolbarView/ToolbarView.d.ts +1 -1
- package/dist/components/ToolbarView/ToolbarView.js +18 -20
- package/dist/components/ToolbarView/ToolbarView.js.map +1 -1
- package/dist/components/ToolbarView.cjs +1 -1
- package/dist/components/Tooltip/Tooltip.cjs +1 -1
- package/dist/components/Tooltip/Tooltip.cjs.map +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +1 -1
- package/dist/components/Tooltip/Tooltip.js +2 -2
- package/dist/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/components/Tooltip.cjs +1 -1
- package/dist/components/ViewSwitcher/ViewSwitcher.cjs +1 -1
- package/dist/components/ViewSwitcher/ViewSwitcher.cjs.map +1 -1
- package/dist/components/ViewSwitcher/ViewSwitcher.d.ts +1 -1
- package/dist/components/ViewSwitcher/ViewSwitcher.js +2 -2
- package/dist/components/ViewSwitcher/ViewSwitcher.js.map +1 -1
- package/dist/components/ViewSwitcher/ViewSwitcherItem.cjs +1 -1
- package/dist/components/ViewSwitcher/ViewSwitcherItem.cjs.map +1 -1
- package/dist/components/ViewSwitcher/ViewSwitcherItem.d.ts +1 -1
- package/dist/components/ViewSwitcher/ViewSwitcherItem.js +24 -26
- package/dist/components/ViewSwitcher/ViewSwitcherItem.js.map +1 -1
- package/dist/components/ViewSwitcher.cjs +1 -1
- package/dist/components/ViewSwitcherBar/ViewSwitcherBar.cjs +1 -1
- package/dist/components/ViewSwitcherBar/ViewSwitcherBar.cjs.map +1 -1
- package/dist/components/ViewSwitcherBar/ViewSwitcherBar.d.ts +1 -1
- package/dist/components/ViewSwitcherBar/ViewSwitcherBar.js +7 -9
- package/dist/components/ViewSwitcherBar/ViewSwitcherBar.js.map +1 -1
- package/dist/components/ViewSwitcherBar.cjs +1 -1
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebar.cjs +1 -1
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebar.cjs.map +1 -1
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebar.d.ts +1 -1
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebar.js +2 -2
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebar.js.map +1 -1
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebarItem.cjs +1 -1
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebarItem.cjs.map +1 -1
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebarItem.d.ts +1 -1
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebarItem.js +2 -2
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebarItem.js.map +1 -1
- package/dist/components/ViewSwitcherSidebar.cjs +1 -1
- package/dist/components/WindowTitle/WindowTitle.cjs +1 -1
- package/dist/components/WindowTitle/WindowTitle.cjs.map +1 -1
- package/dist/components/WindowTitle/WindowTitle.d.ts +1 -1
- package/dist/components/WindowTitle/WindowTitle.js +11 -13
- package/dist/components/WindowTitle/WindowTitle.js.map +1 -1
- package/dist/components/WindowTitle.cjs +1 -1
- package/dist/components/WrapBox/WrapBox.cjs +1 -1
- package/dist/components/WrapBox/WrapBox.cjs.map +1 -1
- package/dist/components/WrapBox/WrapBox.d.ts +1 -1
- package/dist/components/WrapBox/WrapBox.js +5 -5
- package/dist/components/WrapBox/WrapBox.js.map +1 -1
- package/dist/components/WrapBox.cjs +1 -1
- package/dist/hooks/useBreakpoint.cjs +1 -1
- package/dist/hooks/useBreakpoint.cjs.map +1 -1
- package/dist/hooks/useBreakpoint.js.map +1 -1
- package/dist/hooks.cjs +1 -1
- package/dist/index.cjs +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusPage.js","names":[],"sources":["../../../src/components/StatusPage/StatusPage.tsx"],"sourcesContent":["import type { IconDefinition } from '@gnome-ui/icons';\nimport type { HTMLAttributes, ReactNode } from 'react';\n\nimport { Icon } from '../Icon';\n\nimport styles from './StatusPage.module.css';\n\nexport interface StatusPageProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Large icon displayed above the title.\n * Use an icon from `@gnome-ui/icons` or omit for a text-only page.\n */\n icon?: IconDefinition;\n /**\n * Custom icon node. Use when you need an image, emoji, or\n * a rendered SVG that is not part of `@gnome-ui/icons`.\n * Ignored when `icon` is also provided.\n */\n iconNode?: ReactNode;\n /** Main heading. Keep it short — one noun phrase. */\n title: string;\n /** Supporting description rendered below the title. */\n description?: string;\n /**\n * Optional action area — typically one or two `<Button>` elements.\n * Rendered below the description.\n */\n children?: ReactNode;\n /**\n * Reduces padding, icon size, and title scale for use in compact\n * contexts such as sidebars, popovers, and small panels.\n * Mirrors the `.compact` style class.\n */\n compact?: boolean;\n}\n\n/**\n * Empty-state / status page following the Adwaita `AdwStatusPage` pattern.\n *\n * Use to fill a view with no content yet, an error state, or a completion\n * confirmation. Centred both horizontally and vertically.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.StatusPage.html\n * @see https://developer.gnome.org/hig/patterns/feedback/empty-states.html\n */\nexport
|
|
1
|
+
{"version":3,"file":"StatusPage.js","names":[],"sources":["../../../src/components/StatusPage/StatusPage.tsx"],"sourcesContent":["import type { IconDefinition } from '@gnome-ui/icons';\nimport type { HTMLAttributes, ReactNode } from 'react';\n\nimport { Icon } from '../Icon';\n\nimport styles from './StatusPage.module.css';\n\nexport interface StatusPageProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Large icon displayed above the title.\n * Use an icon from `@gnome-ui/icons` or omit for a text-only page.\n */\n icon?: IconDefinition;\n /**\n * Custom icon node. Use when you need an image, emoji, or\n * a rendered SVG that is not part of `@gnome-ui/icons`.\n * Ignored when `icon` is also provided.\n */\n iconNode?: ReactNode;\n /** Main heading. Keep it short — one noun phrase. */\n title: string;\n /** Supporting description rendered below the title. */\n description?: string;\n /**\n * Optional action area — typically one or two `<Button>` elements.\n * Rendered below the description.\n */\n children?: ReactNode;\n /**\n * Reduces padding, icon size, and title scale for use in compact\n * contexts such as sidebars, popovers, and small panels.\n * Mirrors the `.compact` style class.\n */\n compact?: boolean;\n}\n\n/**\n * Empty-state / status page following the Adwaita `AdwStatusPage` pattern.\n *\n * Use to fill a view with no content yet, an error state, or a completion\n * confirmation. Centred both horizontally and vertically.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.StatusPage.html\n * @see https://developer.gnome.org/hig/patterns/feedback/empty-states.html\n */\nexport const StatusPage = ({\n icon,\n iconNode,\n title,\n description,\n children,\n compact = false,\n className,\n ...props\n}: StatusPageProps) => {\n const iconSize = compact ? 64 : 128;\n const iconContent = icon ? (\n <Icon icon={icon} width={iconSize} height={iconSize} aria-hidden />\n ) : (\n (iconNode ?? null)\n );\n\n return (\n <div\n className={[styles.page, compact ? styles.compact : null, className]\n .filter(Boolean)\n .join(' ')}\n {...props}\n >\n {iconContent && (\n <div className={styles.iconWrap} aria-hidden=\"true\">\n {iconContent}\n </div>\n )}\n\n <p className={styles.title}>{title}</p>\n\n {description && <p className={styles.description}>{description}</p>}\n\n {children && <div className={styles.actions}>{children}</div>}\n </div>\n );\n};\n"],"mappings":";;;;AA6CA,IAAa,KAAc,EACzB,SACA,aACA,UACA,gBACA,aACA,aAAU,IACV,cACA,GAAG,QACkB;CACrB,IAAM,IAAW,IAAU,KAAK,KAC1B,IAAc,IAClB,kBAAC,GAAD;EAAY;EAAM,OAAO;EAAU,QAAQ;EAAU,eAAA;CAAa,CAAA,IAEjE,KAAY;CAGf,OACE,kBAAC,OAAD;EACE,WAAW;GAAC,EAAO;GAAM,IAAU,EAAO,UAAU;GAAM;EAAS,EAChE,OAAO,OAAO,EACd,KAAK,GAAG;EACX,GAAI;YAJN;GAMG,KACC,kBAAC,OAAD;IAAK,WAAW,EAAO;IAAU,eAAY;cAC1C;GACE,CAAA;GAGP,kBAAC,KAAD;IAAG,WAAW,EAAO;cAAQ;GAAS,CAAA;GAErC,KAAe,kBAAC,KAAD;IAAG,WAAW,EAAO;cAAc;GAAe,CAAA;GAEjE,KAAY,kBAAC,OAAD;IAAK,WAAW,EAAO;IAAU;GAAc,CAAA;EACzD;;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("./StatusPage/StatusPage.cjs");exports.StatusPage=e.StatusPage;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(
|
|
1
|
+
const e=require("./Switch.module.css.cjs");let t=require("react/jsx-runtime");var n=({className:n,...r})=>(0,t.jsx)(`input`,{type:`checkbox`,role:`switch`,className:[e.default.switch,n].filter(Boolean).join(` `),...r});exports.Switch=n;
|
|
2
2
|
//# sourceMappingURL=Switch.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Switch.cjs","names":[],"sources":["../../../src/components/Switch/Switch.tsx"],"sourcesContent":["import type { InputHTMLAttributes } from 'react';\n\nimport styles from './Switch.module.css';\n\nexport interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'size'> {\n /** Accessible label. Required when no visible `<label>` is associated. */\n 'aria-label'?: string;\n}\n\n/**\n * On/off toggle following the Adwaita switch style.\n *\n * Renders as `<input type=\"checkbox\" role=\"switch\">` so it is natively\n * keyboard-accessible and works with standard form libraries.\n *\n * @see https://developer.gnome.org/hig/patterns/controls/switches.html\n */\nexport
|
|
1
|
+
{"version":3,"file":"Switch.cjs","names":[],"sources":["../../../src/components/Switch/Switch.tsx"],"sourcesContent":["import type { InputHTMLAttributes } from 'react';\n\nimport styles from './Switch.module.css';\n\nexport interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'size'> {\n /** Accessible label. Required when no visible `<label>` is associated. */\n 'aria-label'?: string;\n}\n\n/**\n * On/off toggle following the Adwaita switch style.\n *\n * Renders as `<input type=\"checkbox\" role=\"switch\">` so it is natively\n * keyboard-accessible and works with standard form libraries.\n *\n * @see https://developer.gnome.org/hig/patterns/controls/switches.html\n */\nexport const Switch = ({ className, ...props }: SwitchProps) => {\n return (\n <input\n type=\"checkbox\"\n role=\"switch\"\n className={[styles.switch, className].filter(Boolean).join(' ')}\n {...props}\n />\n );\n};\n"],"mappings":"8EAiBA,IAAa,GAAU,CAAE,YAAW,GAAG,MAEnC,EAAA,EAAA,KAAC,QAAD,CACE,KAAK,WACL,KAAK,SACL,UAAW,CAAC,EAAA,QAAO,OAAQ,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,EAC9D,GAAI,CACL,CAAA"}
|
|
@@ -11,4 +11,4 @@ export interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>,
|
|
|
11
11
|
*
|
|
12
12
|
* @see https://developer.gnome.org/hig/patterns/controls/switches.html
|
|
13
13
|
*/
|
|
14
|
-
export declare
|
|
14
|
+
export declare const Switch: ({ className, ...props }: SwitchProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import e from "./Switch.module.css.js";
|
|
2
2
|
import { jsx as t } from "react/jsx-runtime";
|
|
3
3
|
//#region src/components/Switch/Switch.tsx
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
});
|
|
11
|
-
}
|
|
4
|
+
var n = ({ className: n, ...r }) => /* @__PURE__ */ t("input", {
|
|
5
|
+
type: "checkbox",
|
|
6
|
+
role: "switch",
|
|
7
|
+
className: [e.switch, n].filter(Boolean).join(" "),
|
|
8
|
+
...r
|
|
9
|
+
});
|
|
12
10
|
//#endregion
|
|
13
11
|
export { n as Switch };
|
|
14
12
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Switch.js","names":[],"sources":["../../../src/components/Switch/Switch.tsx"],"sourcesContent":["import type { InputHTMLAttributes } from 'react';\n\nimport styles from './Switch.module.css';\n\nexport interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'size'> {\n /** Accessible label. Required when no visible `<label>` is associated. */\n 'aria-label'?: string;\n}\n\n/**\n * On/off toggle following the Adwaita switch style.\n *\n * Renders as `<input type=\"checkbox\" role=\"switch\">` so it is natively\n * keyboard-accessible and works with standard form libraries.\n *\n * @see https://developer.gnome.org/hig/patterns/controls/switches.html\n */\nexport
|
|
1
|
+
{"version":3,"file":"Switch.js","names":[],"sources":["../../../src/components/Switch/Switch.tsx"],"sourcesContent":["import type { InputHTMLAttributes } from 'react';\n\nimport styles from './Switch.module.css';\n\nexport interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'size'> {\n /** Accessible label. Required when no visible `<label>` is associated. */\n 'aria-label'?: string;\n}\n\n/**\n * On/off toggle following the Adwaita switch style.\n *\n * Renders as `<input type=\"checkbox\" role=\"switch\">` so it is natively\n * keyboard-accessible and works with standard form libraries.\n *\n * @see https://developer.gnome.org/hig/patterns/controls/switches.html\n */\nexport const Switch = ({ className, ...props }: SwitchProps) => {\n return (\n <input\n type=\"checkbox\"\n role=\"switch\"\n className={[styles.switch, className].filter(Boolean).join(' ')}\n {...props}\n />\n );\n};\n"],"mappings":";;;AAiBA,IAAa,KAAU,EAAE,cAAW,GAAG,QAEnC,kBAAC,SAAD;CACE,MAAK;CACL,MAAK;CACL,WAAW,CAAC,EAAO,QAAQ,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;CAC9D,GAAI;AACL,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./Switch/Switch.cjs");exports.Switch=e.Switch;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(
|
|
1
|
+
const e=require("./SwitchRow.module.css.cjs");let t=require("react"),n=require("react/jsx-runtime");var r=({title:r,subtitle:i,leading:a,checked:o,defaultChecked:s=!1,onCheckedChange:c,disabled:l=!1,className:u,onClick:d,...f})=>{let p=o!==void 0,[m,h]=(0,t.useState)(s),g=p?o:m,_=(0,t.useId)();return(0,n.jsxs)(`button`,{role:`switch`,"aria-checked":g,"aria-labelledby":_,disabled:l,className:[e.default.row,l?e.default.disabled:null,u].filter(Boolean).join(` `),onClick:e=>{let t=!g;p||h(t),c?.(t),d?.(e)},...f,children:[a&&(0,n.jsx)(`span`,{className:e.default.leading,children:a}),(0,n.jsxs)(`span`,{className:e.default.content,id:_,children:[(0,n.jsx)(`span`,{className:e.default.title,children:r}),i&&(0,n.jsx)(`span`,{className:e.default.subtitle,children:i})]}),(0,n.jsx)(`span`,{className:e.default.switchTrack,"aria-hidden":`true`,children:(0,n.jsx)(`span`,{className:[e.default.switchThumb,g?e.default.switchThumbOn:null].filter(Boolean).join(` `)})})]})};exports.SwitchRow=r;
|
|
2
2
|
//# sourceMappingURL=SwitchRow.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwitchRow.cjs","names":[],"sources":["../../../src/components/SwitchRow/SwitchRow.tsx"],"sourcesContent":["import { type HTMLAttributes, type MouseEvent, type ReactNode, useId, useState } from 'react';\n\nimport styles from './SwitchRow.module.css';\n\nexport interface SwitchRowProps extends Omit<HTMLAttributes<HTMLButtonElement>, 'onChange'> {\n /** Primary label. */\n title: string;\n /** Secondary line below the title. */\n subtitle?: string;\n /** Icon or image placed at the leading edge. */\n leading?: ReactNode;\n /** Controlled checked state. */\n checked?: boolean;\n /** Initial checked state when uncontrolled. Defaults to `false`. */\n defaultChecked?: boolean;\n /** Called when the checked state changes. */\n onCheckedChange?: (checked: boolean) => void;\n /** Disables the row. */\n disabled?: boolean;\n}\n\n/**\n * Activatable row with an integrated switch.\n *\n * The entire row is a button — clicking anywhere toggles the switch.\n * Mirrors `AdwSwitchRow`, which differs from `ActionRow + trailing Switch`\n * because the row itself is the interactive element.\n *\n * Supports both controlled (`checked`) and uncontrolled (`defaultChecked`) modes.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.SwitchRow.html\n */\nexport
|
|
1
|
+
{"version":3,"file":"SwitchRow.cjs","names":[],"sources":["../../../src/components/SwitchRow/SwitchRow.tsx"],"sourcesContent":["import { type HTMLAttributes, type MouseEvent, type ReactNode, useId, useState } from 'react';\n\nimport styles from './SwitchRow.module.css';\n\nexport interface SwitchRowProps extends Omit<HTMLAttributes<HTMLButtonElement>, 'onChange'> {\n /** Primary label. */\n title: string;\n /** Secondary line below the title. */\n subtitle?: string;\n /** Icon or image placed at the leading edge. */\n leading?: ReactNode;\n /** Controlled checked state. */\n checked?: boolean;\n /** Initial checked state when uncontrolled. Defaults to `false`. */\n defaultChecked?: boolean;\n /** Called when the checked state changes. */\n onCheckedChange?: (checked: boolean) => void;\n /** Disables the row. */\n disabled?: boolean;\n}\n\n/**\n * Activatable row with an integrated switch.\n *\n * The entire row is a button — clicking anywhere toggles the switch.\n * Mirrors `AdwSwitchRow`, which differs from `ActionRow + trailing Switch`\n * because the row itself is the interactive element.\n *\n * Supports both controlled (`checked`) and uncontrolled (`defaultChecked`) modes.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.SwitchRow.html\n */\nexport const SwitchRow = ({\n title,\n subtitle,\n leading,\n checked: controlledChecked,\n defaultChecked = false,\n onCheckedChange,\n disabled = false,\n className,\n onClick,\n ...props\n}: SwitchRowProps) => {\n const isControlled = controlledChecked !== undefined;\n const [uncontrolledChecked, setUncontrolledChecked] = useState(defaultChecked);\n const checked = isControlled ? controlledChecked : uncontrolledChecked;\n\n const switchId = useId();\n\n const handleClick = (e: MouseEvent<HTMLButtonElement>) => {\n const next = !checked;\n\n if (!isControlled) {\n setUncontrolledChecked(next);\n }\n\n onCheckedChange?.(next);\n onClick?.(e);\n };\n\n return (\n <button\n role=\"switch\"\n aria-checked={checked}\n aria-labelledby={switchId}\n disabled={disabled}\n className={[styles.row, disabled ? styles.disabled : null, className]\n .filter(Boolean)\n .join(' ')}\n onClick={handleClick}\n {...props}\n >\n {leading && <span className={styles.leading}>{leading}</span>}\n\n <span className={styles.content} id={switchId}>\n <span className={styles.title}>{title}</span>\n {subtitle && <span className={styles.subtitle}>{subtitle}</span>}\n </span>\n\n {/* Visual switch indicator — aria-hidden since the button carries the role */}\n <span className={styles.switchTrack} aria-hidden=\"true\">\n <span\n className={[styles.switchThumb, checked ? styles.switchThumbOn : null]\n .filter(Boolean)\n .join(' ')}\n />\n </span>\n </button>\n );\n};\n"],"mappings":"oGAgCA,IAAa,GAAa,CACxB,QACA,WACA,UACA,QAAS,EACT,iBAAiB,GACjB,kBACA,WAAW,GACX,YACA,UACA,GAAG,KACiB,CACpB,IAAM,EAAe,IAAsB,IAAA,GACrC,CAAC,EAAqB,IAAA,EAAA,EAAA,UAAmC,CAAc,EACvE,EAAU,EAAe,EAAoB,EAE7C,GAAA,EAAA,EAAA,OAAiB,EAavB,OACE,EAAA,EAAA,MAAC,SAAD,CACE,KAAK,SACL,eAAc,EACd,kBAAiB,EACP,WACV,UAAW,CAAC,EAAA,QAAO,IAAK,EAAW,EAAA,QAAO,SAAW,KAAM,CAAS,EACjE,OAAO,OAAO,EACd,KAAK,GAAG,EACX,QApBiB,GAAqC,CACxD,IAAM,EAAO,CAAC,EAET,GACH,EAAuB,CAAI,EAG7B,IAAkB,CAAI,EACtB,IAAU,CAAC,CACb,EAYI,GAAI,WATN,CAWG,IAAW,EAAA,EAAA,KAAC,OAAD,CAAM,UAAW,EAAA,QAAO,iBAAU,CAAc,CAAA,GAE5D,EAAA,EAAA,MAAC,OAAD,CAAM,UAAW,EAAA,QAAO,QAAS,GAAI,WAArC,EACE,EAAA,EAAA,KAAC,OAAD,CAAM,UAAW,EAAA,QAAO,eAAQ,CAAY,CAAA,EAC3C,IAAY,EAAA,EAAA,KAAC,OAAD,CAAM,UAAW,EAAA,QAAO,kBAAW,CAAe,CAAA,CAC3D,KAGN,EAAA,EAAA,KAAC,OAAD,CAAM,UAAW,EAAA,QAAO,YAAa,cAAY,iBAC/C,EAAA,EAAA,KAAC,OAAD,CACE,UAAW,CAAC,EAAA,QAAO,YAAa,EAAU,EAAA,QAAO,cAAgB,IAAI,EAClE,OAAO,OAAO,EACd,KAAK,GAAG,CACZ,CAAA,CACG,CAAA,CACA,GAEZ"}
|
|
@@ -26,4 +26,4 @@ export interface SwitchRowProps extends Omit<HTMLAttributes<HTMLButtonElement>,
|
|
|
26
26
|
*
|
|
27
27
|
* @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.SwitchRow.html
|
|
28
28
|
*/
|
|
29
|
-
export declare
|
|
29
|
+
export declare const SwitchRow: ({ title, subtitle, leading, checked: controlledChecked, defaultChecked, onCheckedChange, disabled, className, onClick, ...props }: SwitchRowProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,11 +2,8 @@ import e from "./SwitchRow.module.css.js";
|
|
|
2
2
|
import { useId as t, useState as n } from "react";
|
|
3
3
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/SwitchRow/SwitchRow.tsx
|
|
5
|
-
|
|
6
|
-
let h = c !== void 0, [g, _] = n(l), v = h ? c : g, y = t()
|
|
7
|
-
let t = !v;
|
|
8
|
-
h || _(t), u?.(t), p?.(e);
|
|
9
|
-
};
|
|
5
|
+
var a = ({ title: a, subtitle: o, leading: s, checked: c, defaultChecked: l = !1, onCheckedChange: u, disabled: d = !1, className: f, onClick: p, ...m }) => {
|
|
6
|
+
let h = c !== void 0, [g, _] = n(l), v = h ? c : g, y = t();
|
|
10
7
|
return /* @__PURE__ */ i("button", {
|
|
11
8
|
role: "switch",
|
|
12
9
|
"aria-checked": v,
|
|
@@ -17,7 +14,10 @@ function a({ title: a, subtitle: o, leading: s, checked: c, defaultChecked: l =
|
|
|
17
14
|
d ? e.disabled : null,
|
|
18
15
|
f
|
|
19
16
|
].filter(Boolean).join(" "),
|
|
20
|
-
onClick:
|
|
17
|
+
onClick: (e) => {
|
|
18
|
+
let t = !v;
|
|
19
|
+
h || _(t), u?.(t), p?.(e);
|
|
20
|
+
},
|
|
21
21
|
...m,
|
|
22
22
|
children: [
|
|
23
23
|
s && /* @__PURE__ */ r("span", {
|
|
@@ -42,7 +42,7 @@ function a({ title: a, subtitle: o, leading: s, checked: c, defaultChecked: l =
|
|
|
42
42
|
})
|
|
43
43
|
]
|
|
44
44
|
});
|
|
45
|
-
}
|
|
45
|
+
};
|
|
46
46
|
//#endregion
|
|
47
47
|
export { a as SwitchRow };
|
|
48
48
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwitchRow.js","names":[],"sources":["../../../src/components/SwitchRow/SwitchRow.tsx"],"sourcesContent":["import { type HTMLAttributes, type MouseEvent, type ReactNode, useId, useState } from 'react';\n\nimport styles from './SwitchRow.module.css';\n\nexport interface SwitchRowProps extends Omit<HTMLAttributes<HTMLButtonElement>, 'onChange'> {\n /** Primary label. */\n title: string;\n /** Secondary line below the title. */\n subtitle?: string;\n /** Icon or image placed at the leading edge. */\n leading?: ReactNode;\n /** Controlled checked state. */\n checked?: boolean;\n /** Initial checked state when uncontrolled. Defaults to `false`. */\n defaultChecked?: boolean;\n /** Called when the checked state changes. */\n onCheckedChange?: (checked: boolean) => void;\n /** Disables the row. */\n disabled?: boolean;\n}\n\n/**\n * Activatable row with an integrated switch.\n *\n * The entire row is a button — clicking anywhere toggles the switch.\n * Mirrors `AdwSwitchRow`, which differs from `ActionRow + trailing Switch`\n * because the row itself is the interactive element.\n *\n * Supports both controlled (`checked`) and uncontrolled (`defaultChecked`) modes.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.SwitchRow.html\n */\nexport
|
|
1
|
+
{"version":3,"file":"SwitchRow.js","names":[],"sources":["../../../src/components/SwitchRow/SwitchRow.tsx"],"sourcesContent":["import { type HTMLAttributes, type MouseEvent, type ReactNode, useId, useState } from 'react';\n\nimport styles from './SwitchRow.module.css';\n\nexport interface SwitchRowProps extends Omit<HTMLAttributes<HTMLButtonElement>, 'onChange'> {\n /** Primary label. */\n title: string;\n /** Secondary line below the title. */\n subtitle?: string;\n /** Icon or image placed at the leading edge. */\n leading?: ReactNode;\n /** Controlled checked state. */\n checked?: boolean;\n /** Initial checked state when uncontrolled. Defaults to `false`. */\n defaultChecked?: boolean;\n /** Called when the checked state changes. */\n onCheckedChange?: (checked: boolean) => void;\n /** Disables the row. */\n disabled?: boolean;\n}\n\n/**\n * Activatable row with an integrated switch.\n *\n * The entire row is a button — clicking anywhere toggles the switch.\n * Mirrors `AdwSwitchRow`, which differs from `ActionRow + trailing Switch`\n * because the row itself is the interactive element.\n *\n * Supports both controlled (`checked`) and uncontrolled (`defaultChecked`) modes.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.SwitchRow.html\n */\nexport const SwitchRow = ({\n title,\n subtitle,\n leading,\n checked: controlledChecked,\n defaultChecked = false,\n onCheckedChange,\n disabled = false,\n className,\n onClick,\n ...props\n}: SwitchRowProps) => {\n const isControlled = controlledChecked !== undefined;\n const [uncontrolledChecked, setUncontrolledChecked] = useState(defaultChecked);\n const checked = isControlled ? controlledChecked : uncontrolledChecked;\n\n const switchId = useId();\n\n const handleClick = (e: MouseEvent<HTMLButtonElement>) => {\n const next = !checked;\n\n if (!isControlled) {\n setUncontrolledChecked(next);\n }\n\n onCheckedChange?.(next);\n onClick?.(e);\n };\n\n return (\n <button\n role=\"switch\"\n aria-checked={checked}\n aria-labelledby={switchId}\n disabled={disabled}\n className={[styles.row, disabled ? styles.disabled : null, className]\n .filter(Boolean)\n .join(' ')}\n onClick={handleClick}\n {...props}\n >\n {leading && <span className={styles.leading}>{leading}</span>}\n\n <span className={styles.content} id={switchId}>\n <span className={styles.title}>{title}</span>\n {subtitle && <span className={styles.subtitle}>{subtitle}</span>}\n </span>\n\n {/* Visual switch indicator — aria-hidden since the button carries the role */}\n <span className={styles.switchTrack} aria-hidden=\"true\">\n <span\n className={[styles.switchThumb, checked ? styles.switchThumbOn : null]\n .filter(Boolean)\n .join(' ')}\n />\n </span>\n </button>\n );\n};\n"],"mappings":";;;;AAgCA,IAAa,KAAa,EACxB,UACA,aACA,YACA,SAAS,GACT,oBAAiB,IACjB,oBACA,cAAW,IACX,cACA,YACA,GAAG,QACiB;CACpB,IAAM,IAAe,MAAsB,KAAA,GACrC,CAAC,GAAqB,KAA0B,EAAS,CAAc,GACvE,IAAU,IAAe,IAAoB,GAE7C,IAAW,EAAM;CAavB,OACE,kBAAC,UAAD;EACE,MAAK;EACL,gBAAc;EACd,mBAAiB;EACP;EACV,WAAW;GAAC,EAAO;GAAK,IAAW,EAAO,WAAW;GAAM;EAAS,EACjE,OAAO,OAAO,EACd,KAAK,GAAG;EACX,UApBiB,MAAqC;GACxD,IAAM,IAAO,CAAC;GAOd,AALK,KACH,EAAuB,CAAI,GAG7B,IAAkB,CAAI,GACtB,IAAU,CAAC;EACb;EAYI,GAAI;YATN;GAWG,KAAW,kBAAC,QAAD;IAAM,WAAW,EAAO;cAAU;GAAc,CAAA;GAE5D,kBAAC,QAAD;IAAM,WAAW,EAAO;IAAS,IAAI;cAArC,CACE,kBAAC,QAAD;KAAM,WAAW,EAAO;eAAQ;IAAY,CAAA,GAC3C,KAAY,kBAAC,QAAD;KAAM,WAAW,EAAO;eAAW;IAAe,CAAA,CAC3D;;GAGN,kBAAC,QAAD;IAAM,WAAW,EAAO;IAAa,eAAY;cAC/C,kBAAC,QAAD,EACE,WAAW,CAAC,EAAO,aAAa,IAAU,EAAO,gBAAgB,IAAI,EAClE,OAAO,OAAO,EACd,KAAK,GAAG,EACZ,CAAA;GACG,CAAA;EACA;;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("./SwitchRow/SwitchRow.cjs");exports.SwitchRow=e.SwitchRow;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(
|
|
1
|
+
const e=require("./Tabs.module.css.cjs");let t=require("react"),n=require("react/jsx-runtime");var r=({children:r,className:i,inline:a=!1,"aria-label":o=`Tabs`,...s})=>{let c=(0,t.useRef)(null);function l(e){let t=Array.from(c.current?.querySelectorAll(`[role=tab]:not(:disabled)`)??[]),n=document.activeElement,r=n instanceof HTMLButtonElement?t.indexOf(n):-1;if(r===-1)return;let i=r;if(e.key===`ArrowRight`)i=(r+1)%t.length;else if(e.key===`ArrowLeft`)i=(r-1+t.length)%t.length;else if(e.key===`Home`)i=0;else if(e.key===`End`)i=t.length-1;else return;e.preventDefault(),t[i].focus()}return(0,n.jsx)(`div`,{className:[e.default.bar,a?e.default.inline:null,i].filter(Boolean).join(` `),...s,children:(0,n.jsx)(`div`,{ref:c,role:`tablist`,"aria-label":o,className:e.default.list,onKeyDown:l,children:r})})};exports.TabBar=r;
|
|
2
2
|
//# sourceMappingURL=TabBar.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabBar.cjs","names":[],"sources":["../../../src/components/Tabs/TabBar.tsx"],"sourcesContent":["import { type HTMLAttributes, type KeyboardEvent, type ReactNode, useRef } from 'react';\n\nimport styles from './Tabs.module.css';\n\nexport interface TabBarProps extends HTMLAttributes<HTMLDivElement> {\n children?: ReactNode;\n /** Accessible label for the tab list. */\n 'aria-label'?: string;\n /**\n * Removes the header-bar background so the tab bar blends into any surface.\n * Use when placing the bar inside a card, content area, or custom container.\n * Mirrors the `.inline` style class.\n */\n inline?: boolean;\n}\n\n/**\n * Horizontal tab bar that holds `TabItem` elements.\n *\n * Manages roving-tabindex keyboard navigation (← → Home End).\n *\n * @see https://developer.gnome.org/hig/patterns/nav/tabs.html\n */\nexport
|
|
1
|
+
{"version":3,"file":"TabBar.cjs","names":[],"sources":["../../../src/components/Tabs/TabBar.tsx"],"sourcesContent":["import { type HTMLAttributes, type KeyboardEvent, type ReactNode, useRef } from 'react';\n\nimport styles from './Tabs.module.css';\n\nexport interface TabBarProps extends HTMLAttributes<HTMLDivElement> {\n children?: ReactNode;\n /** Accessible label for the tab list. */\n 'aria-label'?: string;\n /**\n * Removes the header-bar background so the tab bar blends into any surface.\n * Use when placing the bar inside a card, content area, or custom container.\n * Mirrors the `.inline` style class.\n */\n inline?: boolean;\n}\n\n/**\n * Horizontal tab bar that holds `TabItem` elements.\n *\n * Manages roving-tabindex keyboard navigation (← → Home End).\n *\n * @see https://developer.gnome.org/hig/patterns/nav/tabs.html\n */\nexport const TabBar = ({\n children,\n className,\n inline = false,\n 'aria-label': ariaLabel = 'Tabs',\n ...props\n}: TabBarProps) => {\n const listRef = useRef<HTMLDivElement>(null);\n\n function handleKeyDown(e: KeyboardEvent<HTMLDivElement>) {\n const tabs = Array.from(\n listRef.current?.querySelectorAll<HTMLButtonElement>('[role=tab]:not(:disabled)') ?? [],\n );\n const activeElement = document.activeElement;\n const idx = activeElement instanceof HTMLButtonElement ? tabs.indexOf(activeElement) : -1;\n\n if (idx === -1) {\n return;\n }\n\n let next = idx;\n if (e.key === 'ArrowRight') {\n next = (idx + 1) % tabs.length;\n } else if (e.key === 'ArrowLeft') {\n next = (idx - 1 + tabs.length) % tabs.length;\n } else if (e.key === 'Home') {\n next = 0;\n } else if (e.key === 'End') {\n next = tabs.length - 1;\n } else {\n return;\n }\n\n e.preventDefault();\n tabs[next].focus();\n }\n\n return (\n <div\n className={[styles.bar, inline ? styles.inline : null, className].filter(Boolean).join(' ')}\n {...props}\n >\n <div\n ref={listRef}\n role=\"tablist\"\n aria-label={ariaLabel}\n className={styles.list}\n onKeyDown={handleKeyDown}\n >\n {children}\n </div>\n </div>\n );\n};\n"],"mappings":"+FAuBA,IAAa,GAAU,CACrB,WACA,YACA,SAAS,GACT,aAAc,EAAY,OAC1B,GAAG,KACc,CACjB,IAAM,GAAA,EAAA,EAAA,QAAiC,IAAI,EAE3C,SAAS,EAAc,EAAkC,CACvD,IAAM,EAAO,MAAM,KACjB,EAAQ,SAAS,iBAAoC,2BAA2B,GAAK,CAAC,CACxF,EACM,EAAgB,SAAS,cACzB,EAAM,aAAyB,kBAAoB,EAAK,QAAQ,CAAa,EAAI,GAEvF,GAAI,IAAQ,GACV,OAGF,IAAI,EAAO,EACX,GAAI,EAAE,MAAQ,aACZ,GAAQ,EAAM,GAAK,EAAK,YACnB,GAAI,EAAE,MAAQ,YACnB,GAAQ,EAAM,EAAI,EAAK,QAAU,EAAK,YACjC,GAAI,EAAE,MAAQ,OACnB,EAAO,OACF,GAAI,EAAE,MAAQ,MACnB,EAAO,EAAK,OAAS,OAErB,OAGF,EAAE,eAAe,EACjB,EAAK,GAAM,MAAM,CACnB,CAEA,OACE,EAAA,EAAA,KAAC,MAAD,CACE,UAAW,CAAC,EAAA,QAAO,IAAK,EAAS,EAAA,QAAO,OAAS,KAAM,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,EAC1F,GAAI,YAEJ,EAAA,EAAA,KAAC,MAAD,CACE,IAAK,EACL,KAAK,UACL,aAAY,EACZ,UAAW,EAAA,QAAO,KAClB,UAAW,EAEV,UACE,CAAA,CACF,CAAA,CAET"}
|
|
@@ -17,4 +17,4 @@ export interface TabBarProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
17
17
|
*
|
|
18
18
|
* @see https://developer.gnome.org/hig/patterns/nav/tabs.html
|
|
19
19
|
*/
|
|
20
|
-
export declare
|
|
20
|
+
export declare const TabBar: ({ children, className, inline, "aria-label": ariaLabel, ...props }: TabBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,7 +2,7 @@ import e from "./Tabs.module.css.js";
|
|
|
2
2
|
import { useRef as t } from "react";
|
|
3
3
|
import { jsx as n } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/Tabs/TabBar.tsx
|
|
5
|
-
|
|
5
|
+
var r = ({ children: r, className: i, inline: a = !1, "aria-label": o = "Tabs", ...s }) => {
|
|
6
6
|
let c = t(null);
|
|
7
7
|
function l(e) {
|
|
8
8
|
let t = Array.from(c.current?.querySelectorAll("[role=tab]:not(:disabled)") ?? []), n = document.activeElement, r = n instanceof HTMLButtonElement ? t.indexOf(n) : -1;
|
|
@@ -31,7 +31,7 @@ function r({ children: r, className: i, inline: a = !1, "aria-label": o = "Tabs"
|
|
|
31
31
|
children: r
|
|
32
32
|
})
|
|
33
33
|
});
|
|
34
|
-
}
|
|
34
|
+
};
|
|
35
35
|
//#endregion
|
|
36
36
|
export { r as TabBar };
|
|
37
37
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabBar.js","names":[],"sources":["../../../src/components/Tabs/TabBar.tsx"],"sourcesContent":["import { type HTMLAttributes, type KeyboardEvent, type ReactNode, useRef } from 'react';\n\nimport styles from './Tabs.module.css';\n\nexport interface TabBarProps extends HTMLAttributes<HTMLDivElement> {\n children?: ReactNode;\n /** Accessible label for the tab list. */\n 'aria-label'?: string;\n /**\n * Removes the header-bar background so the tab bar blends into any surface.\n * Use when placing the bar inside a card, content area, or custom container.\n * Mirrors the `.inline` style class.\n */\n inline?: boolean;\n}\n\n/**\n * Horizontal tab bar that holds `TabItem` elements.\n *\n * Manages roving-tabindex keyboard navigation (← → Home End).\n *\n * @see https://developer.gnome.org/hig/patterns/nav/tabs.html\n */\nexport
|
|
1
|
+
{"version":3,"file":"TabBar.js","names":[],"sources":["../../../src/components/Tabs/TabBar.tsx"],"sourcesContent":["import { type HTMLAttributes, type KeyboardEvent, type ReactNode, useRef } from 'react';\n\nimport styles from './Tabs.module.css';\n\nexport interface TabBarProps extends HTMLAttributes<HTMLDivElement> {\n children?: ReactNode;\n /** Accessible label for the tab list. */\n 'aria-label'?: string;\n /**\n * Removes the header-bar background so the tab bar blends into any surface.\n * Use when placing the bar inside a card, content area, or custom container.\n * Mirrors the `.inline` style class.\n */\n inline?: boolean;\n}\n\n/**\n * Horizontal tab bar that holds `TabItem` elements.\n *\n * Manages roving-tabindex keyboard navigation (← → Home End).\n *\n * @see https://developer.gnome.org/hig/patterns/nav/tabs.html\n */\nexport const TabBar = ({\n children,\n className,\n inline = false,\n 'aria-label': ariaLabel = 'Tabs',\n ...props\n}: TabBarProps) => {\n const listRef = useRef<HTMLDivElement>(null);\n\n function handleKeyDown(e: KeyboardEvent<HTMLDivElement>) {\n const tabs = Array.from(\n listRef.current?.querySelectorAll<HTMLButtonElement>('[role=tab]:not(:disabled)') ?? [],\n );\n const activeElement = document.activeElement;\n const idx = activeElement instanceof HTMLButtonElement ? tabs.indexOf(activeElement) : -1;\n\n if (idx === -1) {\n return;\n }\n\n let next = idx;\n if (e.key === 'ArrowRight') {\n next = (idx + 1) % tabs.length;\n } else if (e.key === 'ArrowLeft') {\n next = (idx - 1 + tabs.length) % tabs.length;\n } else if (e.key === 'Home') {\n next = 0;\n } else if (e.key === 'End') {\n next = tabs.length - 1;\n } else {\n return;\n }\n\n e.preventDefault();\n tabs[next].focus();\n }\n\n return (\n <div\n className={[styles.bar, inline ? styles.inline : null, className].filter(Boolean).join(' ')}\n {...props}\n >\n <div\n ref={listRef}\n role=\"tablist\"\n aria-label={ariaLabel}\n className={styles.list}\n onKeyDown={handleKeyDown}\n >\n {children}\n </div>\n </div>\n );\n};\n"],"mappings":";;;;AAuBA,IAAa,KAAU,EACrB,aACA,cACA,YAAS,IACT,cAAc,IAAY,QAC1B,GAAG,QACc;CACjB,IAAM,IAAU,EAAuB,IAAI;CAE3C,SAAS,EAAc,GAAkC;EACvD,IAAM,IAAO,MAAM,KACjB,EAAQ,SAAS,iBAAoC,2BAA2B,KAAK,CAAC,CACxF,GACM,IAAgB,SAAS,eACzB,IAAM,aAAyB,oBAAoB,EAAK,QAAQ,CAAa,IAAI;EAEvF,IAAI,MAAQ,IACV;EAGF,IAAI,IAAO;EACX,IAAI,EAAE,QAAQ,cACZ,KAAQ,IAAM,KAAK,EAAK;OACnB,IAAI,EAAE,QAAQ,aACnB,KAAQ,IAAM,IAAI,EAAK,UAAU,EAAK;OACjC,IAAI,EAAE,QAAQ,QACnB,IAAO;OACF,IAAI,EAAE,QAAQ,OACnB,IAAO,EAAK,SAAS;OAErB;EAIF,AADA,EAAE,eAAe,GACjB,EAAK,GAAM,MAAM;CACnB;CAEA,OACE,kBAAC,OAAD;EACE,WAAW;GAAC,EAAO;GAAK,IAAS,EAAO,SAAS;GAAM;EAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;EAC1F,GAAI;YAEJ,kBAAC,OAAD;GACE,KAAK;GACL,MAAK;GACL,cAAY;GACZ,WAAW,EAAO;GAClB,WAAW;GAEV;EACE,CAAA;CACF,CAAA;AAET"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(
|
|
1
|
+
const e=require("../Badge/Badge.cjs"),t=require("../Icon/Icon.cjs"),n=require("./Tabs.module.css.cjs");let r=require("react"),i=require("react/jsx-runtime");var a=(0,r.memo)(function({label:r,icon:a,active:o=!1,panelId:s,onClose:c,closeLabel:l=`Close tab`,count:u,className:d,disabled:f,...p}){return(0,i.jsxs)(`button`,{role:`tab`,type:`button`,"aria-selected":o,"aria-controls":s,tabIndex:o?0:-1,disabled:f,className:[n.default.tab,o?n.default.active:null,c?n.default.closeable:null,d].filter(Boolean).join(` `),...p,children:[a&&(0,i.jsx)(`span`,{className:n.default.tabIcon,children:(0,i.jsx)(t.Icon,{icon:a,size:`sm`,"aria-hidden":!0})}),(0,i.jsx)(`span`,{className:n.default.tabLabel,children:r}),u!==void 0&&(0,i.jsx)(e.Badge,{className:n.default.tabBadge,children:u>99?`99+`:u}),c&&(0,i.jsx)(`button`,{type:`button`,"aria-label":l,className:n.default.closeBtn,onClick:e=>{e.stopPropagation(),c()},children:`×`})]})});exports.TabItem=a;
|
|
2
2
|
//# sourceMappingURL=TabItem.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabItem.cjs","names":[],"sources":["../../../src/components/Tabs/TabItem.tsx"],"sourcesContent":["import type { IconDefinition } from '@gnome-ui/icons';\nimport type { ButtonHTMLAttributes, ReactNode } from 'react';\nimport { memo } from 'react';\n\nimport { Badge } from '../Badge';\nimport { Icon } from '../Icon';\n\nimport styles from './Tabs.module.css';\n\nexport interface TabItemProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n /** Tab label. */\n label: string;\n /** Optional icon from `@gnome-ui/icons`. */\n icon?: IconDefinition;\n /** Marks this tab as the currently selected one. */\n active?: boolean;\n /**\n * id of the `TabPanel` this tab controls.\n * Sets `aria-controls` automatically.\n */\n panelId?: string;\n /**\n * When provided, a close (×) button is rendered at the trailing edge.\n * Called when the user clicks the close button.\n */\n onClose?: () => void;\n /** Accessible label for the close button. Defaults to `\"Close tab\"`. */\n closeLabel?: string;\n /** Optional count shown as a badge next to the label (e.g. unread messages). Values above 99 render as \"99+\". */\n count?: number;\n children?: ReactNode;\n}\n\n/**\n * Individual tab button inside a `TabBar`.\n */\nexport const TabItem = memo(function TabItem({\n label,\n icon,\n active = false,\n panelId,\n onClose,\n closeLabel = 'Close tab',\n count,\n className,\n disabled,\n ...props\n}: TabItemProps) {\n return (\n <button\n role=\"tab\"\n type=\"button\"\n aria-selected={active}\n aria-controls={panelId}\n tabIndex={active ? 0 : -1}\n disabled={disabled}\n className={[\n styles.tab,\n active ? styles.active : null,\n onClose ? styles.closeable : null,\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n >\n {icon && (\n <span className={styles.tabIcon}>\n <Icon icon={icon} size=\"sm\" aria-hidden />\n </span>\n )}\n <span className={styles.tabLabel}>{label}</span>\n\n {count !== undefined && (\n <Badge className={styles.tabBadge}>{count > 99 ? '99+' : count}</Badge>\n )}\n\n {onClose && (\n <button\n type=\"button\"\n aria-label={closeLabel}\n className={styles.closeBtn}\n onClick={(e) => {\n e.stopPropagation();\n onClose();\n }}\n >\n ×\n </button>\n )}\n </button>\n );\n});\n"],"mappings":"6JAoCA,IAAa,GAAA,EAAA,EAAA,MAAe,SAAiB,CAC3C,QACA,OACA,SAAS,GACT,UACA,UACA,aAAa,YACb,QACA,YACA,WACA,GAAG,GACY,CACf,OACE,EAAA,EAAA,MAAC,SAAD,CACE,KAAK,MACL,KAAK,SACL,gBAAe,EACf,gBAAe,EACf,SAAU,EAAS,EAAI,GACb,WACV,UAAW,CACT,EAAA,QAAO,IACP,EAAS,EAAA,QAAO,OAAS,KACzB,EAAU,EAAA,QAAO,UAAY,KAC7B,
|
|
1
|
+
{"version":3,"file":"TabItem.cjs","names":[],"sources":["../../../src/components/Tabs/TabItem.tsx"],"sourcesContent":["import type { IconDefinition } from '@gnome-ui/icons';\nimport type { ButtonHTMLAttributes, ReactNode } from 'react';\nimport { memo } from 'react';\n\nimport { Badge } from '../Badge';\nimport { Icon } from '../Icon';\n\nimport styles from './Tabs.module.css';\n\nexport interface TabItemProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n /** Tab label. */\n label: string;\n /** Optional icon from `@gnome-ui/icons`. */\n icon?: IconDefinition;\n /** Marks this tab as the currently selected one. */\n active?: boolean;\n /**\n * id of the `TabPanel` this tab controls.\n * Sets `aria-controls` automatically.\n */\n panelId?: string;\n /**\n * When provided, a close (×) button is rendered at the trailing edge.\n * Called when the user clicks the close button.\n */\n onClose?: () => void;\n /** Accessible label for the close button. Defaults to `\"Close tab\"`. */\n closeLabel?: string;\n /** Optional count shown as a badge next to the label (e.g. unread messages). Values above 99 render as \"99+\". */\n count?: number;\n children?: ReactNode;\n}\n\n/**\n * Individual tab button inside a `TabBar`.\n */\nexport const TabItem = memo(function TabItem({\n label,\n icon,\n active = false,\n panelId,\n onClose,\n closeLabel = 'Close tab',\n count,\n className,\n disabled,\n ...props\n}: TabItemProps) {\n return (\n <button\n role=\"tab\"\n type=\"button\"\n aria-selected={active}\n aria-controls={panelId}\n tabIndex={active ? 0 : -1}\n disabled={disabled}\n className={[\n styles.tab,\n active ? styles.active : null,\n onClose ? styles.closeable : null,\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n >\n {icon && (\n <span className={styles.tabIcon}>\n <Icon icon={icon} size=\"sm\" aria-hidden />\n </span>\n )}\n <span className={styles.tabLabel}>{label}</span>\n\n {count !== undefined && (\n <Badge className={styles.tabBadge}>{count > 99 ? '99+' : count}</Badge>\n )}\n\n {onClose && (\n <button\n type=\"button\"\n aria-label={closeLabel}\n className={styles.closeBtn}\n onClick={(e) => {\n e.stopPropagation();\n onClose();\n }}\n >\n ×\n </button>\n )}\n </button>\n );\n});\n"],"mappings":"6JAoCA,IAAa,GAAA,EAAA,EAAA,MAAe,SAAiB,CAC3C,QACA,OACA,SAAS,GACT,UACA,UACA,aAAa,YACb,QACA,YACA,WACA,GAAG,GACY,CACf,OACE,EAAA,EAAA,MAAC,SAAD,CACE,KAAK,MACL,KAAK,SACL,gBAAe,EACf,gBAAe,EACf,SAAU,EAAS,EAAI,GACb,WACV,UAAW,CACT,EAAA,QAAO,IACP,EAAS,EAAA,QAAO,OAAS,KACzB,EAAU,EAAA,QAAO,UAAY,KAC7B,CACF,EACG,OAAO,OAAO,EACd,KAAK,GAAG,EACX,GAAI,WAfN,CAiBG,IACC,EAAA,EAAA,KAAC,OAAD,CAAM,UAAW,EAAA,QAAO,kBACtB,EAAA,EAAA,KAAC,EAAA,KAAD,CAAY,OAAM,KAAK,KAAK,cAAA,EAAa,CAAA,CACrC,CAAA,GAER,EAAA,EAAA,KAAC,OAAD,CAAM,UAAW,EAAA,QAAO,kBAAW,CAAY,CAAA,EAE9C,IAAU,IAAA,KACT,EAAA,EAAA,KAAC,EAAA,MAAD,CAAO,UAAW,EAAA,QAAO,kBAAW,EAAQ,GAAK,MAAQ,CAAa,CAAA,EAGvE,IACC,EAAA,EAAA,KAAC,SAAD,CACE,KAAK,SACL,aAAY,EACZ,UAAW,EAAA,QAAO,SAClB,QAAU,GAAM,CACd,EAAE,gBAAgB,EAClB,EAAQ,CACV,WACD,GAEO,CAAA,CAEJ,GAEZ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabItem.js","names":[],"sources":["../../../src/components/Tabs/TabItem.tsx"],"sourcesContent":["import type { IconDefinition } from '@gnome-ui/icons';\nimport type { ButtonHTMLAttributes, ReactNode } from 'react';\nimport { memo } from 'react';\n\nimport { Badge } from '../Badge';\nimport { Icon } from '../Icon';\n\nimport styles from './Tabs.module.css';\n\nexport interface TabItemProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n /** Tab label. */\n label: string;\n /** Optional icon from `@gnome-ui/icons`. */\n icon?: IconDefinition;\n /** Marks this tab as the currently selected one. */\n active?: boolean;\n /**\n * id of the `TabPanel` this tab controls.\n * Sets `aria-controls` automatically.\n */\n panelId?: string;\n /**\n * When provided, a close (×) button is rendered at the trailing edge.\n * Called when the user clicks the close button.\n */\n onClose?: () => void;\n /** Accessible label for the close button. Defaults to `\"Close tab\"`. */\n closeLabel?: string;\n /** Optional count shown as a badge next to the label (e.g. unread messages). Values above 99 render as \"99+\". */\n count?: number;\n children?: ReactNode;\n}\n\n/**\n * Individual tab button inside a `TabBar`.\n */\nexport const TabItem = memo(function TabItem({\n label,\n icon,\n active = false,\n panelId,\n onClose,\n closeLabel = 'Close tab',\n count,\n className,\n disabled,\n ...props\n}: TabItemProps) {\n return (\n <button\n role=\"tab\"\n type=\"button\"\n aria-selected={active}\n aria-controls={panelId}\n tabIndex={active ? 0 : -1}\n disabled={disabled}\n className={[\n styles.tab,\n active ? styles.active : null,\n onClose ? styles.closeable : null,\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n >\n {icon && (\n <span className={styles.tabIcon}>\n <Icon icon={icon} size=\"sm\" aria-hidden />\n </span>\n )}\n <span className={styles.tabLabel}>{label}</span>\n\n {count !== undefined && (\n <Badge className={styles.tabBadge}>{count > 99 ? '99+' : count}</Badge>\n )}\n\n {onClose && (\n <button\n type=\"button\"\n aria-label={closeLabel}\n className={styles.closeBtn}\n onClick={(e) => {\n e.stopPropagation();\n onClose();\n }}\n >\n ×\n </button>\n )}\n </button>\n );\n});\n"],"mappings":";;;;;;AAoCA,IAAa,IAAU,EAAK,SAAiB,EAC3C,UACA,SACA,YAAS,IACT,YACA,YACA,gBAAa,aACb,UACA,cACA,aACA,GAAG,KACY;
|
|
1
|
+
{"version":3,"file":"TabItem.js","names":[],"sources":["../../../src/components/Tabs/TabItem.tsx"],"sourcesContent":["import type { IconDefinition } from '@gnome-ui/icons';\nimport type { ButtonHTMLAttributes, ReactNode } from 'react';\nimport { memo } from 'react';\n\nimport { Badge } from '../Badge';\nimport { Icon } from '../Icon';\n\nimport styles from './Tabs.module.css';\n\nexport interface TabItemProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n /** Tab label. */\n label: string;\n /** Optional icon from `@gnome-ui/icons`. */\n icon?: IconDefinition;\n /** Marks this tab as the currently selected one. */\n active?: boolean;\n /**\n * id of the `TabPanel` this tab controls.\n * Sets `aria-controls` automatically.\n */\n panelId?: string;\n /**\n * When provided, a close (×) button is rendered at the trailing edge.\n * Called when the user clicks the close button.\n */\n onClose?: () => void;\n /** Accessible label for the close button. Defaults to `\"Close tab\"`. */\n closeLabel?: string;\n /** Optional count shown as a badge next to the label (e.g. unread messages). Values above 99 render as \"99+\". */\n count?: number;\n children?: ReactNode;\n}\n\n/**\n * Individual tab button inside a `TabBar`.\n */\nexport const TabItem = memo(function TabItem({\n label,\n icon,\n active = false,\n panelId,\n onClose,\n closeLabel = 'Close tab',\n count,\n className,\n disabled,\n ...props\n}: TabItemProps) {\n return (\n <button\n role=\"tab\"\n type=\"button\"\n aria-selected={active}\n aria-controls={panelId}\n tabIndex={active ? 0 : -1}\n disabled={disabled}\n className={[\n styles.tab,\n active ? styles.active : null,\n onClose ? styles.closeable : null,\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n >\n {icon && (\n <span className={styles.tabIcon}>\n <Icon icon={icon} size=\"sm\" aria-hidden />\n </span>\n )}\n <span className={styles.tabLabel}>{label}</span>\n\n {count !== undefined && (\n <Badge className={styles.tabBadge}>{count > 99 ? '99+' : count}</Badge>\n )}\n\n {onClose && (\n <button\n type=\"button\"\n aria-label={closeLabel}\n className={styles.closeBtn}\n onClick={(e) => {\n e.stopPropagation();\n onClose();\n }}\n >\n ×\n </button>\n )}\n </button>\n );\n});\n"],"mappings":";;;;;;AAoCA,IAAa,IAAU,EAAK,SAAiB,EAC3C,UACA,SACA,YAAS,IACT,YACA,YACA,gBAAa,aACb,UACA,cACA,aACA,GAAG,KACY;CACf,OACE,kBAAC,UAAD;EACE,MAAK;EACL,MAAK;EACL,iBAAe;EACf,iBAAe;EACf,UAAU,IAAS,IAAI;EACb;EACV,WAAW;GACT,EAAO;GACP,IAAS,EAAO,SAAS;GACzB,IAAU,EAAO,YAAY;GAC7B;EACF,EACG,OAAO,OAAO,EACd,KAAK,GAAG;EACX,GAAI;YAfN;GAiBG,KACC,kBAAC,QAAD;IAAM,WAAW,EAAO;cACtB,kBAAC,GAAD;KAAY;KAAM,MAAK;KAAK,eAAA;IAAa,CAAA;GACrC,CAAA;GAER,kBAAC,QAAD;IAAM,WAAW,EAAO;cAAW;GAAY,CAAA;GAE9C,MAAU,KAAA,KACT,kBAAC,GAAD;IAAO,WAAW,EAAO;cAAW,IAAQ,KAAK,QAAQ;GAAa,CAAA;GAGvE,KACC,kBAAC,UAAD;IACE,MAAK;IACL,cAAY;IACZ,WAAW,EAAO;IAClB,UAAU,MAAM;KAEd,AADA,EAAE,gBAAgB,GAClB,EAAQ;IACV;cACD;GAEO,CAAA;EAEJ;;AAEZ,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(
|
|
1
|
+
const e=require("./Tabs.module.css.cjs");let t=require("react/jsx-runtime");var n=({id:n,active:r=!1,className:i,children:a,...o})=>(0,t.jsx)(`div`,{id:n,role:`tabpanel`,hidden:!r,className:[e.default.panel,i].filter(Boolean).join(` `),...o,children:a});exports.TabPanel=n;
|
|
2
2
|
//# sourceMappingURL=TabPanel.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabPanel.cjs","names":[],"sources":["../../../src/components/Tabs/TabPanel.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\n\nimport styles from './Tabs.module.css';\n\nexport interface TabPanelProps extends HTMLAttributes<HTMLDivElement> {\n /** Must match the `panelId` passed to the corresponding `TabItem`. */\n id: string;\n /** Controls whether this panel is rendered. */\n active?: boolean;\n children?: ReactNode;\n}\n\n/**\n * Content panel associated with a `TabItem`.\n * Hidden panels are kept in the DOM but visually hidden.\n */\nexport
|
|
1
|
+
{"version":3,"file":"TabPanel.cjs","names":[],"sources":["../../../src/components/Tabs/TabPanel.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\n\nimport styles from './Tabs.module.css';\n\nexport interface TabPanelProps extends HTMLAttributes<HTMLDivElement> {\n /** Must match the `panelId` passed to the corresponding `TabItem`. */\n id: string;\n /** Controls whether this panel is rendered. */\n active?: boolean;\n children?: ReactNode;\n}\n\n/**\n * Content panel associated with a `TabItem`.\n * Hidden panels are kept in the DOM but visually hidden.\n */\nexport const TabPanel = ({ id, active = false, className, children, ...props }: TabPanelProps) => {\n return (\n <div\n id={id}\n role=\"tabpanel\"\n hidden={!active}\n className={[styles.panel, className].filter(Boolean).join(' ')}\n {...props}\n >\n {children}\n </div>\n );\n};\n"],"mappings":"4EAgBA,IAAa,GAAY,CAAE,KAAI,SAAS,GAAO,YAAW,WAAU,GAAG,MAEnE,EAAA,EAAA,KAAC,MAAD,CACM,KACJ,KAAK,WACL,OAAQ,CAAC,EACT,UAAW,CAAC,EAAA,QAAO,MAAO,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,EAC7D,GAAI,EAEH,UACE,CAAA"}
|
|
@@ -10,4 +10,4 @@ export interface TabPanelProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
10
10
|
* Content panel associated with a `TabItem`.
|
|
11
11
|
* Hidden panels are kept in the DOM but visually hidden.
|
|
12
12
|
*/
|
|
13
|
-
export declare
|
|
13
|
+
export declare const TabPanel: ({ id, active, className, children, ...props }: TabPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import e from "./Tabs.module.css.js";
|
|
2
2
|
import { jsx as t } from "react/jsx-runtime";
|
|
3
3
|
//#region src/components/Tabs/TabPanel.tsx
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
});
|
|
13
|
-
}
|
|
4
|
+
var n = ({ id: n, active: r = !1, className: i, children: a, ...o }) => /* @__PURE__ */ t("div", {
|
|
5
|
+
id: n,
|
|
6
|
+
role: "tabpanel",
|
|
7
|
+
hidden: !r,
|
|
8
|
+
className: [e.panel, i].filter(Boolean).join(" "),
|
|
9
|
+
...o,
|
|
10
|
+
children: a
|
|
11
|
+
});
|
|
14
12
|
//#endregion
|
|
15
13
|
export { n as TabPanel };
|
|
16
14
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabPanel.js","names":[],"sources":["../../../src/components/Tabs/TabPanel.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\n\nimport styles from './Tabs.module.css';\n\nexport interface TabPanelProps extends HTMLAttributes<HTMLDivElement> {\n /** Must match the `panelId` passed to the corresponding `TabItem`. */\n id: string;\n /** Controls whether this panel is rendered. */\n active?: boolean;\n children?: ReactNode;\n}\n\n/**\n * Content panel associated with a `TabItem`.\n * Hidden panels are kept in the DOM but visually hidden.\n */\nexport
|
|
1
|
+
{"version":3,"file":"TabPanel.js","names":[],"sources":["../../../src/components/Tabs/TabPanel.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react';\n\nimport styles from './Tabs.module.css';\n\nexport interface TabPanelProps extends HTMLAttributes<HTMLDivElement> {\n /** Must match the `panelId` passed to the corresponding `TabItem`. */\n id: string;\n /** Controls whether this panel is rendered. */\n active?: boolean;\n children?: ReactNode;\n}\n\n/**\n * Content panel associated with a `TabItem`.\n * Hidden panels are kept in the DOM but visually hidden.\n */\nexport const TabPanel = ({ id, active = false, className, children, ...props }: TabPanelProps) => {\n return (\n <div\n id={id}\n role=\"tabpanel\"\n hidden={!active}\n className={[styles.panel, className].filter(Boolean).join(' ')}\n {...props}\n >\n {children}\n </div>\n );\n};\n"],"mappings":";;;AAgBA,IAAa,KAAY,EAAE,OAAI,YAAS,IAAO,cAAW,aAAU,GAAG,QAEnE,kBAAC,OAAD;CACM;CACJ,MAAK;CACL,QAAQ,CAAC;CACT,WAAW,CAAC,EAAO,OAAO,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;CAC7D,GAAI;CAEH;AACE,CAAA"}
|
package/dist/components/Tabs.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("./Tabs/TabBar.cjs"),t=require("./Tabs/TabItem.cjs"),n=require("./Tabs/TabPanel.cjs");exports.TabBar=e.TabBar,exports.TabItem=t.TabItem,exports.TabPanel=n.TabPanel;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(
|
|
1
|
+
const e=require("./TerminalView.module.css.cjs");let t=require("react"),n=require("react/jsx-runtime");var r=({lines:r,variant:i=`default`,maxLines:a=500,autoScroll:o=!0,className:s,...c})=>{let l=(0,t.useRef)(null),u=r.slice(-a);return(0,t.useEffect)(()=>{o&&l.current?.scrollIntoView({block:`nearest`})},[o]),(0,n.jsx)(`div`,{className:[e.default.terminal,e.default[i],s].filter(Boolean).join(` `),...c,children:(0,n.jsxs)(`pre`,{className:e.default.pre,children:[u.map((t,r)=>(0,n.jsx)(`div`,{className:e.default.line,children:t},r)),(0,n.jsx)(`div`,{ref:l})]})})};exports.TerminalView=r;
|
|
2
2
|
//# sourceMappingURL=TerminalView.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TerminalView.cjs","names":[],"sources":["../../../src/components/TerminalView/TerminalView.tsx"],"sourcesContent":["import { type HTMLAttributes, useEffect, useRef } from 'react';\n\nimport styles from './TerminalView.module.css';\n\nexport type TerminalVariant = 'default' | 'success' | 'warning' | 'destructive';\n\nexport interface TerminalViewProps extends HTMLAttributes<HTMLDivElement> {\n /** Lines of text to display. */\n lines: string[];\n /** Colorize text based on semantic meaning. Defaults to `\"default\"`. */\n variant?: TerminalVariant;\n /** Maximum number of lines to keep in the buffer. Defaults to `500`. */\n maxLines?: number;\n /** Automatically scroll to the latest line when content changes. Defaults to `true`. */\n autoScroll?: boolean;\n}\n\nexport
|
|
1
|
+
{"version":3,"file":"TerminalView.cjs","names":[],"sources":["../../../src/components/TerminalView/TerminalView.tsx"],"sourcesContent":["import { type HTMLAttributes, useEffect, useRef } from 'react';\n\nimport styles from './TerminalView.module.css';\n\nexport type TerminalVariant = 'default' | 'success' | 'warning' | 'destructive';\n\nexport interface TerminalViewProps extends HTMLAttributes<HTMLDivElement> {\n /** Lines of text to display. */\n lines: string[];\n /** Colorize text based on semantic meaning. Defaults to `\"default\"`. */\n variant?: TerminalVariant;\n /** Maximum number of lines to keep in the buffer. Defaults to `500`. */\n maxLines?: number;\n /** Automatically scroll to the latest line when content changes. Defaults to `true`. */\n autoScroll?: boolean;\n}\n\nexport const TerminalView = ({\n lines,\n variant = 'default',\n maxLines = 500,\n autoScroll = true,\n className,\n ...props\n}: TerminalViewProps) => {\n const bottomRef = useRef<HTMLDivElement>(null);\n const visibleLines = lines.slice(-maxLines);\n\n useEffect(() => {\n if (autoScroll) {\n bottomRef.current?.scrollIntoView({ block: 'nearest' });\n }\n }, [autoScroll]);\n\n return (\n <div\n className={[styles.terminal, styles[variant], className].filter(Boolean).join(' ')}\n {...props}\n >\n <pre className={styles.pre}>\n {visibleLines.map((line, i) => (\n <div key={i} className={styles.line}>\n {line}\n </div>\n ))}\n <div ref={bottomRef} />\n </pre>\n </div>\n );\n};\n"],"mappings":"uGAiBA,IAAa,GAAgB,CAC3B,QACA,UAAU,UACV,WAAW,IACX,aAAa,GACb,YACA,GAAG,KACoB,CACvB,IAAM,GAAA,EAAA,EAAA,QAAmC,IAAI,EACvC,EAAe,EAAM,MAAM,CAAC,CAAQ,EAQ1C,OANA,EAAA,EAAA,eAAgB,CACV,GACF,EAAU,SAAS,eAAe,CAAE,MAAO,SAAU,CAAC,CAE1D,EAAG,CAAC,CAAU,CAAC,GAGb,EAAA,EAAA,KAAC,MAAD,CACE,UAAW,CAAC,EAAA,QAAO,SAAU,EAAA,QAAO,GAAU,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,EACjF,GAAI,YAEJ,EAAA,EAAA,MAAC,MAAD,CAAK,UAAW,EAAA,QAAO,aAAvB,CACG,EAAa,KAAK,EAAM,KACvB,EAAA,EAAA,KAAC,MAAD,CAAa,UAAW,EAAA,QAAO,cAC5B,CACE,EAFK,CAEL,CACN,GACD,EAAA,EAAA,KAAC,MAAD,CAAK,IAAK,CAAY,CAAA,CACnB,GACF,CAAA,CAET"}
|
|
@@ -10,4 +10,4 @@ export interface TerminalViewProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
10
10
|
/** Automatically scroll to the latest line when content changes. Defaults to `true`. */
|
|
11
11
|
autoScroll?: boolean;
|
|
12
12
|
}
|
|
13
|
-
export declare
|
|
13
|
+
export declare const TerminalView: ({ lines, variant, maxLines, autoScroll, className, ...props }: TerminalViewProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,7 +2,7 @@ import e from "./TerminalView.module.css.js";
|
|
|
2
2
|
import { useEffect as t, useRef as n } from "react";
|
|
3
3
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/TerminalView/TerminalView.tsx
|
|
5
|
-
|
|
5
|
+
var a = ({ lines: a, variant: o = "default", maxLines: s = 500, autoScroll: c = !0, className: l, ...u }) => {
|
|
6
6
|
let d = n(null), f = a.slice(-s);
|
|
7
7
|
return t(() => {
|
|
8
8
|
c && d.current?.scrollIntoView({ block: "nearest" });
|
|
@@ -21,7 +21,7 @@ function a({ lines: a, variant: o = "default", maxLines: s = 500, autoScroll: c
|
|
|
21
21
|
}, n)), /* @__PURE__ */ r("div", { ref: d })]
|
|
22
22
|
})
|
|
23
23
|
});
|
|
24
|
-
}
|
|
24
|
+
};
|
|
25
25
|
//#endregion
|
|
26
26
|
export { a as TerminalView };
|
|
27
27
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TerminalView.js","names":[],"sources":["../../../src/components/TerminalView/TerminalView.tsx"],"sourcesContent":["import { type HTMLAttributes, useEffect, useRef } from 'react';\n\nimport styles from './TerminalView.module.css';\n\nexport type TerminalVariant = 'default' | 'success' | 'warning' | 'destructive';\n\nexport interface TerminalViewProps extends HTMLAttributes<HTMLDivElement> {\n /** Lines of text to display. */\n lines: string[];\n /** Colorize text based on semantic meaning. Defaults to `\"default\"`. */\n variant?: TerminalVariant;\n /** Maximum number of lines to keep in the buffer. Defaults to `500`. */\n maxLines?: number;\n /** Automatically scroll to the latest line when content changes. Defaults to `true`. */\n autoScroll?: boolean;\n}\n\nexport
|
|
1
|
+
{"version":3,"file":"TerminalView.js","names":[],"sources":["../../../src/components/TerminalView/TerminalView.tsx"],"sourcesContent":["import { type HTMLAttributes, useEffect, useRef } from 'react';\n\nimport styles from './TerminalView.module.css';\n\nexport type TerminalVariant = 'default' | 'success' | 'warning' | 'destructive';\n\nexport interface TerminalViewProps extends HTMLAttributes<HTMLDivElement> {\n /** Lines of text to display. */\n lines: string[];\n /** Colorize text based on semantic meaning. Defaults to `\"default\"`. */\n variant?: TerminalVariant;\n /** Maximum number of lines to keep in the buffer. Defaults to `500`. */\n maxLines?: number;\n /** Automatically scroll to the latest line when content changes. Defaults to `true`. */\n autoScroll?: boolean;\n}\n\nexport const TerminalView = ({\n lines,\n variant = 'default',\n maxLines = 500,\n autoScroll = true,\n className,\n ...props\n}: TerminalViewProps) => {\n const bottomRef = useRef<HTMLDivElement>(null);\n const visibleLines = lines.slice(-maxLines);\n\n useEffect(() => {\n if (autoScroll) {\n bottomRef.current?.scrollIntoView({ block: 'nearest' });\n }\n }, [autoScroll]);\n\n return (\n <div\n className={[styles.terminal, styles[variant], className].filter(Boolean).join(' ')}\n {...props}\n >\n <pre className={styles.pre}>\n {visibleLines.map((line, i) => (\n <div key={i} className={styles.line}>\n {line}\n </div>\n ))}\n <div ref={bottomRef} />\n </pre>\n </div>\n );\n};\n"],"mappings":";;;;AAiBA,IAAa,KAAgB,EAC3B,UACA,aAAU,WACV,cAAW,KACX,gBAAa,IACb,cACA,GAAG,QACoB;CACvB,IAAM,IAAY,EAAuB,IAAI,GACvC,IAAe,EAAM,MAAM,CAAC,CAAQ;CAQ1C,OANA,QAAgB;EACd,AAAI,KACF,EAAU,SAAS,eAAe,EAAE,OAAO,UAAU,CAAC;CAE1D,GAAG,CAAC,CAAU,CAAC,GAGb,kBAAC,OAAD;EACE,WAAW;GAAC,EAAO;GAAU,EAAO;GAAU;EAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;EACjF,GAAI;YAEJ,kBAAC,OAAD;GAAK,WAAW,EAAO;aAAvB,CACG,EAAa,KAAK,GAAM,MACvB,kBAAC,OAAD;IAAa,WAAW,EAAO;cAC5B;GACE,GAFK,CAEL,CACN,GACD,kBAAC,OAAD,EAAK,KAAK,EAAY,CAAA,CACnB;;CACF,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("./TerminalView/TerminalView.cjs");exports.TerminalView=e.TerminalView;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(
|
|
1
|
+
const e=require("./Text.module.css.cjs");let t=require("react/jsx-runtime");var n={"large-title":`h1`,"title-1":`h1`,"title-2":`h2`,"title-3":`h3`,"title-4":`h4`,heading:`h3`,body:`p`,document:`p`,caption:`span`,"caption-heading":`span`,monospace:`code`,numeric:`span`},r=({variant:r=`body`,color:i=`default`,as:a,className:o,children:s,...c})=>(0,t.jsx)(a??n[r],{className:[e.default.text,e.default[r],e.default[`color-${i}`],o].filter(Boolean).join(` `),...c,children:s});exports.Text=r;
|
|
2
2
|
//# sourceMappingURL=Text.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.cjs","names":[],"sources":["../../../src/components/Text/Text.tsx"],"sourcesContent":["import type { ElementType, HTMLAttributes, ReactNode } from 'react';\n\nimport styles from './Text.module.css';\n\nexport type TextVariant =\n | 'large-title'\n | 'title-1'\n | 'title-2'\n | 'title-3'\n | 'title-4'\n | 'heading'\n | 'body'\n | 'document'\n | 'caption'\n | 'caption-heading'\n | 'monospace'\n | 'numeric';\n\nexport type TextColor =\n | 'default'\n | 'dim'\n | 'accent'\n | 'destructive'\n | 'success'\n | 'warning'\n | 'error';\n\n/** Default HTML element rendered for each variant */\nconst defaultElement: Record<TextVariant, ElementType> = {\n 'large-title': 'h1',\n 'title-1': 'h1',\n 'title-2': 'h2',\n 'title-3': 'h3',\n 'title-4': 'h4',\n heading: 'h3',\n body: 'p',\n document: 'p',\n caption: 'span',\n 'caption-heading': 'span',\n monospace: 'code',\n numeric: 'span',\n};\n\nexport interface TextProps extends HTMLAttributes<HTMLElement> {\n /** Typography style. Mirrors Adwaita / GNOME HIG text styles. */\n variant?: TextVariant;\n /** Semantic color. */\n color?: TextColor;\n /** Override the rendered HTML element. */\n as?: ElementType;\n children?: ReactNode;\n}\n\n/**\n * Text component following GNOME Human Interface Guidelines typography styles.\n *\n * Variants map directly to Adwaita style classes:\n * `large-title`, `title-1`–`title-4`, `heading`, `body`, `document`,\n * `caption`, `caption-heading`, `monospace`, `numeric`.\n *\n * @see https://developer.gnome.org/hig/guidelines/typography.html\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/style-classes.html\n */\nexport
|
|
1
|
+
{"version":3,"file":"Text.cjs","names":[],"sources":["../../../src/components/Text/Text.tsx"],"sourcesContent":["import type { ElementType, HTMLAttributes, ReactNode } from 'react';\n\nimport styles from './Text.module.css';\n\nexport type TextVariant =\n | 'large-title'\n | 'title-1'\n | 'title-2'\n | 'title-3'\n | 'title-4'\n | 'heading'\n | 'body'\n | 'document'\n | 'caption'\n | 'caption-heading'\n | 'monospace'\n | 'numeric';\n\nexport type TextColor =\n | 'default'\n | 'dim'\n | 'accent'\n | 'destructive'\n | 'success'\n | 'warning'\n | 'error';\n\n/** Default HTML element rendered for each variant */\nconst defaultElement: Record<TextVariant, ElementType> = {\n 'large-title': 'h1',\n 'title-1': 'h1',\n 'title-2': 'h2',\n 'title-3': 'h3',\n 'title-4': 'h4',\n heading: 'h3',\n body: 'p',\n document: 'p',\n caption: 'span',\n 'caption-heading': 'span',\n monospace: 'code',\n numeric: 'span',\n};\n\nexport interface TextProps extends HTMLAttributes<HTMLElement> {\n /** Typography style. Mirrors Adwaita / GNOME HIG text styles. */\n variant?: TextVariant;\n /** Semantic color. */\n color?: TextColor;\n /** Override the rendered HTML element. */\n as?: ElementType;\n children?: ReactNode;\n}\n\n/**\n * Text component following GNOME Human Interface Guidelines typography styles.\n *\n * Variants map directly to Adwaita style classes:\n * `large-title`, `title-1`–`title-4`, `heading`, `body`, `document`,\n * `caption`, `caption-heading`, `monospace`, `numeric`.\n *\n * @see https://developer.gnome.org/hig/guidelines/typography.html\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/style-classes.html\n */\nexport const Text = ({\n variant = 'body',\n color = 'default',\n as,\n className,\n children,\n ...props\n}: TextProps) => {\n const Tag = as ?? defaultElement[variant];\n\n const classes = [styles.text, styles[variant], styles[`color-${color}`], className]\n .filter(Boolean)\n .join(' ');\n\n return (\n <Tag className={classes} {...props}>\n {children}\n </Tag>\n );\n};\n"],"mappings":"4EA4BA,IAAM,EAAmD,CACvD,cAAe,KACf,UAAW,KACX,UAAW,KACX,UAAW,KACX,UAAW,KACX,QAAS,KACT,KAAM,IACN,SAAU,IACV,QAAS,OACT,kBAAmB,OACnB,UAAW,OACX,QAAS,MACX,EAsBa,GAAQ,CACnB,UAAU,OACV,QAAQ,UACR,KACA,YACA,WACA,GAAG,MASD,EAAA,EAAA,KAPU,GAAM,EAAe,GAO/B,CAAK,UALS,CAAC,EAAA,QAAO,KAAM,EAAA,QAAO,GAAU,EAAA,QAAO,SAAS,KAAU,CAAS,EAC/E,OAAO,OAAO,EACd,KAAK,GAGU,EAAS,GAAI,EAC1B,UACE,CAAA"}
|
|
@@ -20,4 +20,4 @@ export interface TextProps extends HTMLAttributes<HTMLElement> {
|
|
|
20
20
|
* @see https://developer.gnome.org/hig/guidelines/typography.html
|
|
21
21
|
* @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/style-classes.html
|
|
22
22
|
*/
|
|
23
|
-
export declare
|
|
23
|
+
export declare const Text: ({ variant, color, as, className, children, ...props }: TextProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -14,19 +14,16 @@ var n = {
|
|
|
14
14
|
"caption-heading": "span",
|
|
15
15
|
monospace: "code",
|
|
16
16
|
numeric: "span"
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
children: s
|
|
28
|
-
});
|
|
29
|
-
}
|
|
17
|
+
}, r = ({ variant: r = "body", color: i = "default", as: a, className: o, children: s, ...c }) => /* @__PURE__ */ t(a ?? n[r], {
|
|
18
|
+
className: [
|
|
19
|
+
e.text,
|
|
20
|
+
e[r],
|
|
21
|
+
e[`color-${i}`],
|
|
22
|
+
o
|
|
23
|
+
].filter(Boolean).join(" "),
|
|
24
|
+
...c,
|
|
25
|
+
children: s
|
|
26
|
+
});
|
|
30
27
|
//#endregion
|
|
31
28
|
export { r as Text };
|
|
32
29
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.js","names":[],"sources":["../../../src/components/Text/Text.tsx"],"sourcesContent":["import type { ElementType, HTMLAttributes, ReactNode } from 'react';\n\nimport styles from './Text.module.css';\n\nexport type TextVariant =\n | 'large-title'\n | 'title-1'\n | 'title-2'\n | 'title-3'\n | 'title-4'\n | 'heading'\n | 'body'\n | 'document'\n | 'caption'\n | 'caption-heading'\n | 'monospace'\n | 'numeric';\n\nexport type TextColor =\n | 'default'\n | 'dim'\n | 'accent'\n | 'destructive'\n | 'success'\n | 'warning'\n | 'error';\n\n/** Default HTML element rendered for each variant */\nconst defaultElement: Record<TextVariant, ElementType> = {\n 'large-title': 'h1',\n 'title-1': 'h1',\n 'title-2': 'h2',\n 'title-3': 'h3',\n 'title-4': 'h4',\n heading: 'h3',\n body: 'p',\n document: 'p',\n caption: 'span',\n 'caption-heading': 'span',\n monospace: 'code',\n numeric: 'span',\n};\n\nexport interface TextProps extends HTMLAttributes<HTMLElement> {\n /** Typography style. Mirrors Adwaita / GNOME HIG text styles. */\n variant?: TextVariant;\n /** Semantic color. */\n color?: TextColor;\n /** Override the rendered HTML element. */\n as?: ElementType;\n children?: ReactNode;\n}\n\n/**\n * Text component following GNOME Human Interface Guidelines typography styles.\n *\n * Variants map directly to Adwaita style classes:\n * `large-title`, `title-1`–`title-4`, `heading`, `body`, `document`,\n * `caption`, `caption-heading`, `monospace`, `numeric`.\n *\n * @see https://developer.gnome.org/hig/guidelines/typography.html\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/style-classes.html\n */\nexport
|
|
1
|
+
{"version":3,"file":"Text.js","names":[],"sources":["../../../src/components/Text/Text.tsx"],"sourcesContent":["import type { ElementType, HTMLAttributes, ReactNode } from 'react';\n\nimport styles from './Text.module.css';\n\nexport type TextVariant =\n | 'large-title'\n | 'title-1'\n | 'title-2'\n | 'title-3'\n | 'title-4'\n | 'heading'\n | 'body'\n | 'document'\n | 'caption'\n | 'caption-heading'\n | 'monospace'\n | 'numeric';\n\nexport type TextColor =\n | 'default'\n | 'dim'\n | 'accent'\n | 'destructive'\n | 'success'\n | 'warning'\n | 'error';\n\n/** Default HTML element rendered for each variant */\nconst defaultElement: Record<TextVariant, ElementType> = {\n 'large-title': 'h1',\n 'title-1': 'h1',\n 'title-2': 'h2',\n 'title-3': 'h3',\n 'title-4': 'h4',\n heading: 'h3',\n body: 'p',\n document: 'p',\n caption: 'span',\n 'caption-heading': 'span',\n monospace: 'code',\n numeric: 'span',\n};\n\nexport interface TextProps extends HTMLAttributes<HTMLElement> {\n /** Typography style. Mirrors Adwaita / GNOME HIG text styles. */\n variant?: TextVariant;\n /** Semantic color. */\n color?: TextColor;\n /** Override the rendered HTML element. */\n as?: ElementType;\n children?: ReactNode;\n}\n\n/**\n * Text component following GNOME Human Interface Guidelines typography styles.\n *\n * Variants map directly to Adwaita style classes:\n * `large-title`, `title-1`–`title-4`, `heading`, `body`, `document`,\n * `caption`, `caption-heading`, `monospace`, `numeric`.\n *\n * @see https://developer.gnome.org/hig/guidelines/typography.html\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/style-classes.html\n */\nexport const Text = ({\n variant = 'body',\n color = 'default',\n as,\n className,\n children,\n ...props\n}: TextProps) => {\n const Tag = as ?? defaultElement[variant];\n\n const classes = [styles.text, styles[variant], styles[`color-${color}`], className]\n .filter(Boolean)\n .join(' ');\n\n return (\n <Tag className={classes} {...props}>\n {children}\n </Tag>\n );\n};\n"],"mappings":";;;AA4BA,IAAM,IAAmD;CACvD,eAAe;CACf,WAAW;CACX,WAAW;CACX,WAAW;CACX,WAAW;CACX,SAAS;CACT,MAAM;CACN,UAAU;CACV,SAAS;CACT,mBAAmB;CACnB,WAAW;CACX,SAAS;AACX,GAsBa,KAAQ,EACnB,aAAU,QACV,WAAQ,WACR,OACA,cACA,aACA,GAAG,QASD,kBAPU,KAAM,EAAe,IAO/B;CAAK,WALS;EAAC,EAAO;EAAM,EAAO;EAAU,EAAO,SAAS;EAAU;CAAS,EAC/E,OAAO,OAAO,EACd,KAAK,GAGU;CAAS,GAAI;CAC1B;AACE,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e
|
|
1
|
+
var e={text:`_text_102e3_1`,"large-title":`_large-title_102e3_9`,"title-1":`_title-1_102e3_16`,"title-2":`_title-2_102e3_22`,"title-3":`_title-3_102e3_28`,"title-4":`_title-4_102e3_34`,heading:`_heading_102e3_41`,body:`_body_102e3_48`,document:`_document_102e3_55`,caption:`_caption_102e3_62`,"caption-heading":`_caption-heading_102e3_69`,monospace:`_monospace_102e3_78`,numeric:`_numeric_102e3_85`,"color-default":`_color-default_102e3_95`,"color-dim":`_color-dim_102e3_99`,"color-accent":`_color-accent_102e3_103`,"color-destructive":`_color-destructive_102e3_107`,"color-success":`_color-success_102e3_111`,"color-warning":`_color-warning_102e3_115`,"color-error":`_color-error_102e3_119`};exports.default=e;
|
|
2
2
|
//# sourceMappingURL=Text.module.css.cjs.map
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
text: e,
|
|
1
|
+
var e = {
|
|
2
|
+
text: "_text_102e3_1",
|
|
4
3
|
"large-title": "_large-title_102e3_9",
|
|
5
4
|
"title-1": "_title-1_102e3_16",
|
|
6
5
|
"title-2": "_title-2_102e3_22",
|
|
7
6
|
"title-3": "_title-3_102e3_28",
|
|
8
7
|
"title-4": "_title-4_102e3_34",
|
|
9
|
-
heading:
|
|
10
|
-
body:
|
|
11
|
-
document:
|
|
12
|
-
caption:
|
|
8
|
+
heading: "_heading_102e3_41",
|
|
9
|
+
body: "_body_102e3_48",
|
|
10
|
+
document: "_document_102e3_55",
|
|
11
|
+
caption: "_caption_102e3_62",
|
|
13
12
|
"caption-heading": "_caption-heading_102e3_69",
|
|
14
|
-
monospace:
|
|
15
|
-
numeric:
|
|
13
|
+
monospace: "_monospace_102e3_78",
|
|
14
|
+
numeric: "_numeric_102e3_85",
|
|
16
15
|
"color-default": "_color-default_102e3_95",
|
|
17
16
|
"color-dim": "_color-dim_102e3_99",
|
|
18
17
|
"color-accent": "_color-accent_102e3_103",
|
|
@@ -22,6 +21,6 @@ var e = "_text_102e3_1", t = "_heading_102e3_41", n = "_body_102e3_48", r = "_do
|
|
|
22
21
|
"color-error": "_color-error_102e3_119"
|
|
23
22
|
};
|
|
24
23
|
//#endregion
|
|
25
|
-
export {
|
|
24
|
+
export { e as default };
|
|
26
25
|
|
|
27
26
|
//# sourceMappingURL=Text.module.css.js.map
|