@gnome-ui/react 1.49.0 → 1.50.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.module.css.cjs +1 -1
- package/dist/components/AboutDialog/AboutDialog.module.css.cjs.map +1 -1
- package/dist/components/AboutDialog/AboutDialog.module.css.js +28 -28
- package/dist/components/AboutDialog/AboutDialog.module.css.js.map +1 -1
- package/dist/components/ActionRow/ActionRow.module.css.cjs +1 -1
- package/dist/components/ActionRow/ActionRow.module.css.cjs.map +1 -1
- package/dist/components/ActionRow/ActionRow.module.css.js +9 -9
- package/dist/components/ActionRow/ActionRow.module.css.js.map +1 -1
- package/dist/components/Avatar/Avatar.module.css.cjs +1 -1
- package/dist/components/Avatar/Avatar.module.css.cjs.map +1 -1
- package/dist/components/Avatar/Avatar.module.css.js +16 -16
- package/dist/components/Avatar/Avatar.module.css.js.map +1 -1
- package/dist/components/AvatarGroup/AvatarGroup.module.css.cjs +1 -1
- package/dist/components/AvatarGroup/AvatarGroup.module.css.cjs.map +1 -1
- package/dist/components/AvatarGroup/AvatarGroup.module.css.js +7 -7
- package/dist/components/AvatarGroup/AvatarGroup.module.css.js.map +1 -1
- package/dist/components/Badge/Badge.module.css.cjs +1 -1
- package/dist/components/Badge/Badge.module.css.cjs.map +1 -1
- package/dist/components/Badge/Badge.module.css.js +9 -9
- package/dist/components/Badge/Badge.module.css.js.map +1 -1
- package/dist/components/Banner/Banner.module.css.cjs +1 -1
- package/dist/components/Banner/Banner.module.css.cjs.map +1 -1
- package/dist/components/Banner/Banner.module.css.js +13 -13
- package/dist/components/Banner/Banner.module.css.js.map +1 -1
- package/dist/components/Blockquote/Blockquote.module.css.cjs +1 -1
- package/dist/components/Blockquote/Blockquote.module.css.cjs.map +1 -1
- package/dist/components/Blockquote/Blockquote.module.css.js +11 -11
- package/dist/components/Blockquote/Blockquote.module.css.js.map +1 -1
- package/dist/components/BottomSheet/BottomSheet.cjs +1 -1
- package/dist/components/BottomSheet/BottomSheet.cjs.map +1 -1
- package/dist/components/BottomSheet/BottomSheet.js +1 -1
- 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.cjs.map +1 -1
- package/dist/components/BottomSheet/BottomSheet.module.css.js +13 -13
- package/dist/components/BottomSheet/BottomSheet.module.css.js.map +1 -1
- package/dist/components/BoxedList/BoxedList.module.css.cjs +1 -1
- package/dist/components/BoxedList/BoxedList.module.css.cjs.map +1 -1
- package/dist/components/BoxedList/BoxedList.module.css.js +5 -5
- package/dist/components/BoxedList/BoxedList.module.css.js.map +1 -1
- package/dist/components/BreakpointBin/BreakpointBin.cjs +1 -1
- package/dist/components/BreakpointBin/BreakpointBin.cjs.map +1 -1
- package/dist/components/BreakpointBin/BreakpointBin.js +1 -1
- package/dist/components/BreakpointBin/BreakpointBin.js.map +1 -1
- package/dist/components/Button/Button.module.css.cjs +1 -1
- package/dist/components/Button/Button.module.css.cjs.map +1 -1
- package/dist/components/Button/Button.module.css.js +11 -11
- package/dist/components/Button/Button.module.css.js.map +1 -1
- package/dist/components/ButtonRow/ButtonRow.module.css.cjs +1 -1
- package/dist/components/ButtonRow/ButtonRow.module.css.cjs.map +1 -1
- package/dist/components/ButtonRow/ButtonRow.module.css.js +7 -7
- package/dist/components/ButtonRow/ButtonRow.module.css.js.map +1 -1
- package/dist/components/Card/Card.module.css.cjs +1 -1
- package/dist/components/Card/Card.module.css.cjs.map +1 -1
- package/dist/components/Card/Card.module.css.js +6 -6
- package/dist/components/Card/Card.module.css.js.map +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 +35 -3
- package/dist/components/Carousel/Carousel.js +185 -49
- package/dist/components/Carousel/Carousel.js.map +1 -1
- package/dist/components/Carousel/Carousel.module.css.cjs +1 -1
- package/dist/components/Carousel/Carousel.module.css.cjs.map +1 -1
- package/dist/components/Carousel/Carousel.module.css.js +11 -10
- package/dist/components/Carousel/Carousel.module.css.js.map +1 -1
- package/dist/components/CheckRow/CheckRow.module.css.cjs +1 -1
- package/dist/components/CheckRow/CheckRow.module.css.cjs.map +1 -1
- package/dist/components/CheckRow/CheckRow.module.css.js +10 -10
- package/dist/components/CheckRow/CheckRow.module.css.js.map +1 -1
- package/dist/components/Checkbox/Checkbox.module.css.cjs +1 -1
- package/dist/components/Checkbox/Checkbox.module.css.cjs.map +1 -1
- package/dist/components/Checkbox/Checkbox.module.css.js +1 -1
- package/dist/components/Checkbox/Checkbox.module.css.js.map +1 -1
- package/dist/components/Chip/Chip.module.css.cjs +1 -1
- package/dist/components/Chip/Chip.module.css.cjs.map +1 -1
- package/dist/components/Chip/Chip.module.css.js +7 -7
- package/dist/components/Chip/Chip.module.css.js.map +1 -1
- package/dist/components/ColorPicker/ColorPicker.cjs +1 -1
- package/dist/components/ColorPicker/ColorPicker.cjs.map +1 -1
- package/dist/components/ColorPicker/ColorPicker.js +1 -1
- 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.cjs.map +1 -1
- package/dist/components/ColorPicker/ColorPicker.module.css.js +10 -10
- package/dist/components/ColorPicker/ColorPicker.module.css.js.map +1 -1
- package/dist/components/ColumnView/ColumnView.module.css.cjs +1 -1
- package/dist/components/ColumnView/ColumnView.module.css.cjs.map +1 -1
- package/dist/components/ColumnView/ColumnView.module.css.js +22 -22
- package/dist/components/ColumnView/ColumnView.module.css.js.map +1 -1
- package/dist/components/ComboRow/ComboRow.module.css.cjs +1 -1
- package/dist/components/ComboRow/ComboRow.module.css.cjs.map +1 -1
- package/dist/components/ComboRow/ComboRow.module.css.js +24 -24
- package/dist/components/ComboRow/ComboRow.module.css.js.map +1 -1
- package/dist/components/ContributionGraph/ContributionGraph.module.css.cjs +1 -1
- package/dist/components/ContributionGraph/ContributionGraph.module.css.cjs.map +1 -1
- package/dist/components/ContributionGraph/ContributionGraph.module.css.js +9 -9
- package/dist/components/ContributionGraph/ContributionGraph.module.css.js.map +1 -1
- package/dist/components/CountDownTimer/CountDownTimer.module.css.cjs +1 -1
- package/dist/components/CountDownTimer/CountDownTimer.module.css.cjs.map +1 -1
- package/dist/components/CountDownTimer/CountDownTimer.module.css.js +7 -7
- package/dist/components/CountDownTimer/CountDownTimer.module.css.js.map +1 -1
- package/dist/components/Dialog/Dialog.module.css.cjs +1 -1
- package/dist/components/Dialog/Dialog.module.css.cjs.map +1 -1
- package/dist/components/Dialog/Dialog.module.css.js +11 -11
- package/dist/components/Dialog/Dialog.module.css.js.map +1 -1
- package/dist/components/Dialog/dialogUtils.cjs +1 -1
- package/dist/components/Dialog/dialogUtils.cjs.map +1 -1
- package/dist/components/Dialog/dialogUtils.js +1 -1
- package/dist/components/Dialog/dialogUtils.js.map +1 -1
- package/dist/components/Drawer/Drawer.module.css.cjs +1 -1
- package/dist/components/Drawer/Drawer.module.css.cjs.map +1 -1
- package/dist/components/Drawer/Drawer.module.css.js +12 -12
- package/dist/components/Drawer/Drawer.module.css.js.map +1 -1
- package/dist/components/Dropdown/Dropdown.module.css.cjs +1 -1
- package/dist/components/Dropdown/Dropdown.module.css.cjs.map +1 -1
- package/dist/components/Dropdown/Dropdown.module.css.js +20 -20
- package/dist/components/Dropdown/Dropdown.module.css.js.map +1 -1
- package/dist/components/EntryRow/EntryRow.module.css.cjs +1 -1
- package/dist/components/EntryRow/EntryRow.module.css.cjs.map +1 -1
- package/dist/components/EntryRow/EntryRow.module.css.js +10 -10
- package/dist/components/EntryRow/EntryRow.module.css.js.map +1 -1
- package/dist/components/ExpanderRow/ExpanderRow.module.css.cjs +1 -1
- package/dist/components/ExpanderRow/ExpanderRow.module.css.cjs.map +1 -1
- package/dist/components/ExpanderRow/ExpanderRow.module.css.js +14 -14
- package/dist/components/ExpanderRow/ExpanderRow.module.css.js.map +1 -1
- package/dist/components/Footer/Footer.module.css.cjs +1 -1
- package/dist/components/Footer/Footer.module.css.cjs.map +1 -1
- package/dist/components/Footer/Footer.module.css.js +5 -5
- package/dist/components/Footer/Footer.module.css.js.map +1 -1
- package/dist/components/Frame/Frame.module.css.cjs +1 -1
- package/dist/components/Frame/Frame.module.css.cjs.map +1 -1
- package/dist/components/Frame/Frame.module.css.js +1 -1
- package/dist/components/Frame/Frame.module.css.js.map +1 -1
- package/dist/components/HeaderBar/HeaderBar.module.css.cjs +1 -1
- package/dist/components/HeaderBar/HeaderBar.module.css.cjs.map +1 -1
- package/dist/components/HeaderBar/HeaderBar.module.css.js +6 -6
- package/dist/components/HeaderBar/HeaderBar.module.css.js.map +1 -1
- package/dist/components/Icon/Icon.module.css.cjs +1 -1
- package/dist/components/Icon/Icon.module.css.cjs.map +1 -1
- package/dist/components/Icon/Icon.module.css.js +7 -7
- package/dist/components/Icon/Icon.module.css.js.map +1 -1
- package/dist/components/InlineViewSwitcher/InlineViewSwitcher.cjs +1 -1
- package/dist/components/InlineViewSwitcher/InlineViewSwitcher.cjs.map +1 -1
- package/dist/components/InlineViewSwitcher/InlineViewSwitcher.js +1 -1
- package/dist/components/InlineViewSwitcher/InlineViewSwitcher.js.map +1 -1
- package/dist/components/InlineViewSwitcher/InlineViewSwitcher.module.css.cjs +1 -1
- package/dist/components/InlineViewSwitcher/InlineViewSwitcher.module.css.cjs.map +1 -1
- package/dist/components/InlineViewSwitcher/InlineViewSwitcher.module.css.js +22 -22
- package/dist/components/InlineViewSwitcher/InlineViewSwitcher.module.css.js.map +1 -1
- package/dist/components/Link/Link.module.css.cjs +1 -1
- package/dist/components/Link/Link.module.css.cjs.map +1 -1
- package/dist/components/Link/Link.module.css.js +2 -2
- package/dist/components/Link/Link.module.css.js.map +1 -1
- package/dist/components/Modal/Modal.module.css.cjs +1 -1
- package/dist/components/Modal/Modal.module.css.cjs.map +1 -1
- package/dist/components/Modal/Modal.module.css.js +17 -17
- package/dist/components/Modal/Modal.module.css.js.map +1 -1
- package/dist/components/NavigationSplitView/NavigationSplitView.module.css.cjs +1 -1
- package/dist/components/NavigationSplitView/NavigationSplitView.module.css.cjs.map +1 -1
- package/dist/components/NavigationSplitView/NavigationSplitView.module.css.js +8 -8
- package/dist/components/NavigationSplitView/NavigationSplitView.module.css.js.map +1 -1
- package/dist/components/NavigationView/NavigationView.module.css.cjs +1 -1
- package/dist/components/NavigationView/NavigationView.module.css.cjs.map +1 -1
- package/dist/components/NavigationView/NavigationView.module.css.js +9 -9
- package/dist/components/NavigationView/NavigationView.module.css.js.map +1 -1
- package/dist/components/OverlaySplitView/OverlaySplitView.module.css.cjs +1 -1
- package/dist/components/OverlaySplitView/OverlaySplitView.module.css.cjs.map +1 -1
- package/dist/components/OverlaySplitView/OverlaySplitView.module.css.js +12 -12
- package/dist/components/OverlaySplitView/OverlaySplitView.module.css.js.map +1 -1
- package/dist/components/PasswordEntryRow/PasswordEntryRow.module.css.cjs +1 -1
- package/dist/components/PasswordEntryRow/PasswordEntryRow.module.css.cjs.map +1 -1
- package/dist/components/PasswordEntryRow/PasswordEntryRow.module.css.js +1 -1
- package/dist/components/PasswordEntryRow/PasswordEntryRow.module.css.js.map +1 -1
- package/dist/components/PathBar/PathBar.module.css.cjs +1 -1
- package/dist/components/PathBar/PathBar.module.css.cjs.map +1 -1
- package/dist/components/PathBar/PathBar.module.css.js +7 -7
- package/dist/components/PathBar/PathBar.module.css.js.map +1 -1
- package/dist/components/Popover/Popover.module.css.cjs +1 -1
- package/dist/components/Popover/Popover.module.css.cjs.map +1 -1
- package/dist/components/Popover/Popover.module.css.js +7 -7
- package/dist/components/Popover/Popover.module.css.js.map +1 -1
- package/dist/components/PreferencesDialog/PreferencesDialog.cjs +1 -1
- package/dist/components/PreferencesDialog/PreferencesDialog.cjs.map +1 -1
- package/dist/components/PreferencesDialog/PreferencesDialog.js +1 -1
- 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.cjs.map +1 -1
- package/dist/components/PreferencesDialog/PreferencesDialog.module.css.js +18 -18
- package/dist/components/PreferencesDialog/PreferencesDialog.module.css.js.map +1 -1
- package/dist/components/PreferencesGroup/PreferencesGroup.module.css.cjs +1 -1
- package/dist/components/PreferencesGroup/PreferencesGroup.module.css.cjs.map +1 -1
- package/dist/components/PreferencesGroup/PreferencesGroup.module.css.js +7 -7
- package/dist/components/PreferencesGroup/PreferencesGroup.module.css.js.map +1 -1
- package/dist/components/ProgressBar/ProgressBar.module.css.cjs +1 -1
- package/dist/components/ProgressBar/ProgressBar.module.css.cjs.map +1 -1
- package/dist/components/ProgressBar/ProgressBar.module.css.js +8 -8
- package/dist/components/ProgressBar/ProgressBar.module.css.js.map +1 -1
- package/dist/components/RadioButton/RadioButton.module.css.cjs +1 -1
- package/dist/components/RadioButton/RadioButton.module.css.cjs.map +1 -1
- package/dist/components/RadioButton/RadioButton.module.css.js +1 -1
- package/dist/components/RadioButton/RadioButton.module.css.js.map +1 -1
- package/dist/components/SearchBar/SearchBar.module.css.cjs +1 -1
- package/dist/components/SearchBar/SearchBar.module.css.cjs.map +1 -1
- package/dist/components/SearchBar/SearchBar.module.css.js +13 -13
- package/dist/components/SearchBar/SearchBar.module.css.js.map +1 -1
- package/dist/components/SegmentedBar/SegmentedBar.module.css.cjs +1 -1
- package/dist/components/SegmentedBar/SegmentedBar.module.css.cjs.map +1 -1
- package/dist/components/SegmentedBar/SegmentedBar.module.css.js +12 -12
- package/dist/components/SegmentedBar/SegmentedBar.module.css.js.map +1 -1
- package/dist/components/Separator/Separator.module.css.cjs +1 -1
- package/dist/components/Separator/Separator.module.css.cjs.map +1 -1
- package/dist/components/Separator/Separator.module.css.js +3 -3
- package/dist/components/Separator/Separator.module.css.js.map +1 -1
- package/dist/components/ShortcutLabel/ShortcutLabel.module.css.cjs +1 -1
- package/dist/components/ShortcutLabel/ShortcutLabel.module.css.cjs.map +1 -1
- package/dist/components/ShortcutLabel/ShortcutLabel.module.css.js +2 -2
- package/dist/components/ShortcutLabel/ShortcutLabel.module.css.js.map +1 -1
- package/dist/components/ShortcutsDialog/ShortcutsDialog.cjs +1 -1
- package/dist/components/ShortcutsDialog/ShortcutsDialog.cjs.map +1 -1
- package/dist/components/ShortcutsDialog/ShortcutsDialog.js +1 -1
- 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.cjs.map +1 -1
- package/dist/components/ShortcutsDialog/ShortcutsDialog.module.css.js +21 -21
- package/dist/components/ShortcutsDialog/ShortcutsDialog.module.css.js.map +1 -1
- package/dist/components/Sidebar/Sidebar.module.css.cjs +1 -1
- package/dist/components/Sidebar/Sidebar.module.css.cjs.map +1 -1
- package/dist/components/Sidebar/Sidebar.module.css.js +32 -32
- package/dist/components/Sidebar/Sidebar.module.css.js.map +1 -1
- package/dist/components/Skeleton/Skeleton.module.css.cjs +1 -1
- package/dist/components/Skeleton/Skeleton.module.css.cjs.map +1 -1
- package/dist/components/Skeleton/Skeleton.module.css.js +7 -7
- package/dist/components/Skeleton/Skeleton.module.css.js.map +1 -1
- package/dist/components/Slider/Slider.module.css.cjs +1 -1
- package/dist/components/Slider/Slider.module.css.cjs.map +1 -1
- package/dist/components/Slider/Slider.module.css.js +9 -9
- package/dist/components/Slider/Slider.module.css.js.map +1 -1
- package/dist/components/SpinButton/SpinButton.module.css.cjs +1 -1
- package/dist/components/SpinButton/SpinButton.module.css.cjs.map +1 -1
- package/dist/components/SpinButton/SpinButton.module.css.js +4 -4
- package/dist/components/SpinButton/SpinButton.module.css.js.map +1 -1
- package/dist/components/SpinRow/SpinRow.module.css.cjs +1 -1
- package/dist/components/SpinRow/SpinRow.module.css.cjs.map +1 -1
- package/dist/components/SpinRow/SpinRow.module.css.js +9 -9
- package/dist/components/SpinRow/SpinRow.module.css.js.map +1 -1
- package/dist/components/Spinner/Spinner.module.css.cjs +1 -1
- package/dist/components/Spinner/Spinner.module.css.cjs.map +1 -1
- package/dist/components/Spinner/Spinner.module.css.js +5 -5
- package/dist/components/Spinner/Spinner.module.css.js.map +1 -1
- package/dist/components/SplitButton/SplitButton.module.css.cjs +1 -1
- package/dist/components/SplitButton/SplitButton.module.css.cjs.map +1 -1
- package/dist/components/SplitButton/SplitButton.module.css.js +10 -10
- package/dist/components/SplitButton/SplitButton.module.css.js.map +1 -1
- package/dist/components/StatusBadge/StatusBadge.module.css.cjs +1 -1
- package/dist/components/StatusBadge/StatusBadge.module.css.cjs.map +1 -1
- package/dist/components/StatusBadge/StatusBadge.module.css.js +7 -7
- package/dist/components/StatusBadge/StatusBadge.module.css.js.map +1 -1
- package/dist/components/StatusPage/StatusPage.module.css.cjs +1 -1
- package/dist/components/StatusPage/StatusPage.module.css.cjs.map +1 -1
- package/dist/components/StatusPage/StatusPage.module.css.js +6 -6
- package/dist/components/StatusPage/StatusPage.module.css.js.map +1 -1
- package/dist/components/Switch/Switch.module.css.cjs +1 -1
- package/dist/components/Switch/Switch.module.css.cjs.map +1 -1
- package/dist/components/Switch/Switch.module.css.js +1 -1
- package/dist/components/Switch/Switch.module.css.js.map +1 -1
- package/dist/components/SwitchRow/SwitchRow.module.css.cjs +1 -1
- package/dist/components/SwitchRow/SwitchRow.module.css.cjs.map +1 -1
- package/dist/components/SwitchRow/SwitchRow.module.css.js +9 -9
- package/dist/components/SwitchRow/SwitchRow.module.css.js.map +1 -1
- package/dist/components/Tabs/TabBar.cjs +1 -1
- package/dist/components/Tabs/TabBar.cjs.map +1 -1
- package/dist/components/Tabs/TabBar.js +1 -1
- package/dist/components/Tabs/TabBar.js.map +1 -1
- package/dist/components/Tabs/Tabs.module.css.cjs +1 -1
- package/dist/components/Tabs/Tabs.module.css.cjs.map +1 -1
- package/dist/components/Tabs/Tabs.module.css.js +10 -10
- package/dist/components/Tabs/Tabs.module.css.js.map +1 -1
- package/dist/components/TerminalView/TerminalView.module.css.cjs +1 -1
- package/dist/components/TerminalView/TerminalView.module.css.cjs.map +1 -1
- package/dist/components/TerminalView/TerminalView.module.css.js +6 -6
- package/dist/components/TerminalView/TerminalView.module.css.js.map +1 -1
- package/dist/components/Text/Text.module.css.cjs +1 -1
- package/dist/components/Text/Text.module.css.cjs.map +1 -1
- package/dist/components/Text/Text.module.css.js +20 -20
- package/dist/components/Text/Text.module.css.js.map +1 -1
- package/dist/components/TextField/TextField.module.css.cjs +1 -1
- package/dist/components/TextField/TextField.module.css.cjs.map +1 -1
- package/dist/components/TextField/TextField.module.css.js +7 -7
- package/dist/components/TextField/TextField.module.css.js.map +1 -1
- package/dist/components/Timeline/Timeline.module.css.cjs +1 -1
- package/dist/components/Timeline/Timeline.module.css.cjs.map +1 -1
- package/dist/components/Timeline/Timeline.module.css.js +13 -13
- package/dist/components/Timeline/Timeline.module.css.js.map +1 -1
- package/dist/components/Toast/Toast.module.css.cjs +1 -1
- package/dist/components/Toast/Toast.module.css.cjs.map +1 -1
- package/dist/components/Toast/Toast.module.css.js +9 -9
- package/dist/components/Toast/Toast.module.css.js.map +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.cjs +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.cjs.map +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.js +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.js.map +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.module.css.cjs +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.module.css.cjs.map +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.module.css.js +6 -6
- package/dist/components/ToggleGroup/ToggleGroup.module.css.js.map +1 -1
- package/dist/components/Toolbar/Toolbar.module.css.cjs +1 -1
- package/dist/components/Toolbar/Toolbar.module.css.cjs.map +1 -1
- package/dist/components/Toolbar/Toolbar.module.css.js +2 -2
- package/dist/components/Toolbar/Toolbar.module.css.js.map +1 -1
- package/dist/components/Tooltip/Tooltip.module.css.cjs +1 -1
- package/dist/components/Tooltip/Tooltip.module.css.cjs.map +1 -1
- package/dist/components/Tooltip/Tooltip.module.css.js +6 -6
- package/dist/components/Tooltip/Tooltip.module.css.js.map +1 -1
- package/dist/components/ViewSwitcher/ViewSwitcher.cjs +1 -1
- package/dist/components/ViewSwitcher/ViewSwitcher.cjs.map +1 -1
- package/dist/components/ViewSwitcher/ViewSwitcher.js +1 -1
- package/dist/components/ViewSwitcher/ViewSwitcher.js.map +1 -1
- package/dist/components/ViewSwitcher/ViewSwitcher.module.css.cjs +1 -1
- package/dist/components/ViewSwitcher/ViewSwitcher.module.css.cjs.map +1 -1
- package/dist/components/ViewSwitcher/ViewSwitcher.module.css.js +5 -5
- package/dist/components/ViewSwitcher/ViewSwitcher.module.css.js.map +1 -1
- package/dist/components/ViewSwitcherBar/ViewSwitcherBar.module.css.cjs +1 -1
- package/dist/components/ViewSwitcherBar/ViewSwitcherBar.module.css.cjs.map +1 -1
- package/dist/components/ViewSwitcherBar/ViewSwitcherBar.module.css.js +1 -1
- package/dist/components/ViewSwitcherBar/ViewSwitcherBar.module.css.js.map +1 -1
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebar.cjs +1 -1
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebar.cjs.map +1 -1
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebar.js +1 -1
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebar.js.map +1 -1
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebar.module.css.cjs +1 -1
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebar.module.css.cjs.map +1 -1
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebar.module.css.js +14 -14
- package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebar.module.css.js.map +1 -1
- package/dist/components/WindowTitle/WindowTitle.module.css.cjs +1 -1
- package/dist/components/WindowTitle/WindowTitle.module.css.cjs.map +1 -1
- package/dist/components/WindowTitle/WindowTitle.module.css.js +3 -3
- package/dist/components/WindowTitle/WindowTitle.module.css.js.map +1 -1
- package/dist/components/WrapBox/WrapBox.module.css.cjs +1 -1
- package/dist/components/WrapBox/WrapBox.module.css.cjs.map +1 -1
- package/dist/components/WrapBox/WrapBox.module.css.js +2 -2
- package/dist/components/WrapBox/WrapBox.module.css.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
var e = {
|
|
2
|
-
row: "
|
|
3
|
-
title: "
|
|
4
|
-
leading: "
|
|
5
|
-
trailing: "
|
|
6
|
-
default: "
|
|
7
|
-
suggested: "
|
|
8
|
-
destructive: "
|
|
2
|
+
row: "_row_i8gww_3",
|
|
3
|
+
title: "_title_i8gww_46",
|
|
4
|
+
leading: "_leading_i8gww_57",
|
|
5
|
+
trailing: "_trailing_i8gww_58",
|
|
6
|
+
default: "_default_i8gww_66",
|
|
7
|
+
suggested: "_suggested_i8gww_75",
|
|
8
|
+
destructive: "_destructive_i8gww_84"
|
|
9
9
|
};
|
|
10
10
|
//#endregion
|
|
11
11
|
export { e as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonRow.module.css.js","names":[],"sources":["../../../src/components/ButtonRow/ButtonRow.module.css"],"sourcesContent":["/* ─── Base row ─────────────────────────────────────────────────────────────── */\n\n.row {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: var(--gnome-space-2, 12px);\n padding: var(--gnome-space-2, 12px) var(--gnome-space-4, 24px);\n min-height: 52px;\n width: 100%;\n\n /* Reset button */\n appearance: none;\n
|
|
1
|
+
{"version":3,"file":"ButtonRow.module.css.js","names":[],"sources":["../../../src/components/ButtonRow/ButtonRow.module.css"],"sourcesContent":["/* ─── Base row ─────────────────────────────────────────────────────────────── */\n\n.row {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: var(--gnome-space-2, 12px);\n padding: var(--gnome-space-2, 12px) var(--gnome-space-4, 24px);\n min-height: 52px;\n width: 100%;\n\n /* Reset button */\n appearance: none;\n background: transparent;\n border: none;\n font: inherit;\n outline: none;\n cursor: pointer;\n text-align: center;\n transition: background-color var(--gnome-duration-fast) var(--gnome-easing-default);\n}\n\n.row:hover {\n background-color: var(--gnome-hover-overlay);\n}\n\n.row:active {\n background-color: var(--gnome-active-overlay);\n}\n\n.row:focus-visible {\n box-shadow:\n inset 0 0 0 var(--gnome-focus-ring-offset, 2px) var(--gnome-window-bg-color, #fafafa),\n inset 0 0 0 calc(var(--gnome-focus-ring-offset, 2px) + var(--gnome-focus-ring-width, 3px))\n var(--gnome-focus-ring-color, #3584e4);\n}\n\n.row:disabled {\n opacity: var(--gnome-opacity-disabled, 0.5);\n cursor: not-allowed;\n pointer-events: none;\n}\n\n/* ─── Title ─────────────────────────────────────────────────────────────────── */\n\n.title {\n font-family: var(--gnome-font-family);\n font-size: var(--gnome-font-size-body, 1rem);\n font-weight: var(--gnome-font-weight-semibold, 600);\n line-height: var(--gnome-line-height-body, 1.5);\n flex: 1;\n text-align: center;\n}\n\n/* ─── Leading / trailing icons ─────────────────────────────────────────────── */\n\n.leading,\n.trailing {\n display: flex;\n align-items: center;\n flex-shrink: 0;\n}\n\n/* ─── Variants ─────────────────────────────────────────────────────────────── */\n\n.default .title {\n color: var(--gnome-window-fg-color, rgb(0 0 0 / 0.8));\n}\n\n.default .leading,\n.default .trailing {\n color: var(--gnome-window-fg-color, rgb(0 0 0 / 0.8));\n}\n\n.suggested .title {\n color: var(--gnome-accent-color, #3584e4);\n}\n\n.suggested .leading,\n.suggested .trailing {\n color: var(--gnome-accent-color, #3584e4);\n}\n\n.destructive .title {\n color: var(--gnome-destructive-color, #e01b24);\n}\n\n.destructive .leading,\n.destructive .trailing {\n color: var(--gnome-destructive-color, #e01b24);\n}\n\n/* ─── High contrast ─────────────────────────────────────────────────────────── */\n\n@media (prefers-contrast: more) {\n .row:focus-visible {\n box-shadow:\n inset 0 0 0 var(--gnome-focus-ring-offset, 2px) var(--gnome-window-bg-color, #fafafa),\n inset 0 0 0 calc(var(--gnome-focus-ring-offset, 2px) + var(--gnome-focus-ring-width, 3px))\n var(--gnome-focus-ring-color, #3584e4),\n inset 0 0 0\n calc(var(--gnome-focus-ring-offset, 2px) + var(--gnome-focus-ring-width, 3px) + 1px)\n var(--gnome-window-bg-color, #fafafa);\n }\n}\n"],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={card:`
|
|
1
|
+
var e={card:`_card_vvaqp_1`,"padding-none":`_padding-none_vvaqp_12`,"padding-sm":`_padding-sm_vvaqp_16`,"padding-md":`_padding-md_vvaqp_20`,"padding-lg":`_padding-lg_vvaqp_24`,interactive:`_interactive_vvaqp_30`};exports.default=e;
|
|
2
2
|
//# sourceMappingURL=Card.module.css.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.module.css.cjs","names":[],"sources":["../../../src/components/Card/Card.module.css"],"sourcesContent":[".card {\n background-color: var(--gnome-card-bg-color, #
|
|
1
|
+
{"version":3,"file":"Card.module.css.cjs","names":[],"sources":["../../../src/components/Card/Card.module.css"],"sourcesContent":[".card {\n background-color: var(--gnome-card-bg-color, #fff);\n color: var(--gnome-card-fg-color, rgb(0 0 0 / 0.8));\n border: 1px solid var(--gnome-card-shade-color, rgb(0 0 0 / 0.07));\n border-radius: var(--gnome-radius-lg);\n overflow: hidden;\n position: relative;\n}\n\n/* ─── Padding ─────────────────────────────────────────────────── */\n\n.padding-none {\n padding: 0;\n}\n\n.padding-sm {\n padding: var(--gnome-space-2);\n}\n\n.padding-md {\n padding: var(--gnome-space-4);\n}\n\n.padding-lg {\n padding: var(--gnome-space-5);\n}\n\n/* ─── Interactive (activatable) ───────────────────────────────── */\n\n.interactive {\n cursor: pointer;\n user-select: none;\n outline: none;\n\n /* Reset button styles when rendered as <button> */\n appearance: none;\n border: 1px solid var(--gnome-card-shade-color, rgb(0 0 0 / 0.07));\n font: inherit;\n text-align: inherit;\n width: 100%;\n transition:\n background-color var(--gnome-duration-fast) var(--gnome-easing-default),\n box-shadow var(--gnome-duration-fast) var(--gnome-easing-default);\n}\n\n.interactive:hover {\n background-color: color-mix(in srgb, var(--gnome-card-bg-color, #fff) 94%, black 6%);\n}\n\n.interactive:active {\n background-color: color-mix(in srgb, var(--gnome-card-bg-color, #fff) 88%, black 12%);\n}\n\n.interactive:focus-visible {\n box-shadow:\n 0 0 0 var(--gnome-focus-ring-offset) var(--gnome-window-bg-color, #fafafa),\n 0 0 0 calc(var(--gnome-focus-ring-offset) + var(--gnome-focus-ring-width))\n var(--gnome-focus-ring-color, #3584e4);\n}\n\n.interactive:disabled {\n opacity: var(--gnome-opacity-disabled);\n cursor: not-allowed;\n pointer-events: none;\n}\n\n@media (prefers-color-scheme: dark) {\n .interactive:hover {\n background-color: color-mix(\n in srgb,\n var(--gnome-card-bg-color, rgb(255 255 255 / 0.08)) 85%,\n white 15%\n );\n }\n\n .interactive:active {\n background-color: color-mix(\n in srgb,\n var(--gnome-card-bg-color, rgb(255 255 255 / 0.08)) 75%,\n white 25%\n );\n }\n}\n\n[data-theme=\"dark\"] {\n .interactive:hover {\n background-color: color-mix(\n in srgb,\n var(--gnome-card-bg-color, rgb(255 255 255 / 0.08)) 85%,\n white 15%\n );\n }\n\n .interactive:active {\n background-color: color-mix(\n in srgb,\n var(--gnome-card-bg-color, rgb(255 255 255 / 0.08)) 75%,\n white 25%\n );\n }\n}\n"],"mappings":""}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
var e = {
|
|
2
|
-
card: "
|
|
3
|
-
"padding-none": "_padding-
|
|
4
|
-
"padding-sm": "_padding-
|
|
5
|
-
"padding-md": "_padding-
|
|
6
|
-
"padding-lg": "_padding-
|
|
7
|
-
interactive: "
|
|
2
|
+
card: "_card_vvaqp_1",
|
|
3
|
+
"padding-none": "_padding-none_vvaqp_12",
|
|
4
|
+
"padding-sm": "_padding-sm_vvaqp_16",
|
|
5
|
+
"padding-md": "_padding-md_vvaqp_20",
|
|
6
|
+
"padding-lg": "_padding-lg_vvaqp_24",
|
|
7
|
+
interactive: "_interactive_vvaqp_30"
|
|
8
8
|
};
|
|
9
9
|
//#endregion
|
|
10
10
|
export { e as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.module.css.js","names":[],"sources":["../../../src/components/Card/Card.module.css"],"sourcesContent":[".card {\n background-color: var(--gnome-card-bg-color, #
|
|
1
|
+
{"version":3,"file":"Card.module.css.js","names":[],"sources":["../../../src/components/Card/Card.module.css"],"sourcesContent":[".card {\n background-color: var(--gnome-card-bg-color, #fff);\n color: var(--gnome-card-fg-color, rgb(0 0 0 / 0.8));\n border: 1px solid var(--gnome-card-shade-color, rgb(0 0 0 / 0.07));\n border-radius: var(--gnome-radius-lg);\n overflow: hidden;\n position: relative;\n}\n\n/* ─── Padding ─────────────────────────────────────────────────── */\n\n.padding-none {\n padding: 0;\n}\n\n.padding-sm {\n padding: var(--gnome-space-2);\n}\n\n.padding-md {\n padding: var(--gnome-space-4);\n}\n\n.padding-lg {\n padding: var(--gnome-space-5);\n}\n\n/* ─── Interactive (activatable) ───────────────────────────────── */\n\n.interactive {\n cursor: pointer;\n user-select: none;\n outline: none;\n\n /* Reset button styles when rendered as <button> */\n appearance: none;\n border: 1px solid var(--gnome-card-shade-color, rgb(0 0 0 / 0.07));\n font: inherit;\n text-align: inherit;\n width: 100%;\n transition:\n background-color var(--gnome-duration-fast) var(--gnome-easing-default),\n box-shadow var(--gnome-duration-fast) var(--gnome-easing-default);\n}\n\n.interactive:hover {\n background-color: color-mix(in srgb, var(--gnome-card-bg-color, #fff) 94%, black 6%);\n}\n\n.interactive:active {\n background-color: color-mix(in srgb, var(--gnome-card-bg-color, #fff) 88%, black 12%);\n}\n\n.interactive:focus-visible {\n box-shadow:\n 0 0 0 var(--gnome-focus-ring-offset) var(--gnome-window-bg-color, #fafafa),\n 0 0 0 calc(var(--gnome-focus-ring-offset) + var(--gnome-focus-ring-width))\n var(--gnome-focus-ring-color, #3584e4);\n}\n\n.interactive:disabled {\n opacity: var(--gnome-opacity-disabled);\n cursor: not-allowed;\n pointer-events: none;\n}\n\n@media (prefers-color-scheme: dark) {\n .interactive:hover {\n background-color: color-mix(\n in srgb,\n var(--gnome-card-bg-color, rgb(255 255 255 / 0.08)) 85%,\n white 15%\n );\n }\n\n .interactive:active {\n background-color: color-mix(\n in srgb,\n var(--gnome-card-bg-color, rgb(255 255 255 / 0.08)) 75%,\n white 25%\n );\n }\n}\n\n[data-theme=\"dark\"] {\n .interactive:hover {\n background-color: color-mix(\n in srgb,\n var(--gnome-card-bg-color, rgb(255 255 255 / 0.08)) 85%,\n white 15%\n );\n }\n\n .interactive:active {\n background-color: color-mix(\n in srgb,\n var(--gnome-card-bg-color, rgb(255 255 255 / 0.08)) 75%,\n white 25%\n );\n }\n}\n"],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("./Carousel.module.css.cjs");let t=require("react"),n=require("react/jsx-runtime");var r=({pages:t,currentPage:r,onPageSelected:i,className:a,...o})=>(0,n.jsx)(`div`,{className:[e.default.indicatorDots,a].filter(Boolean).join(` `),role:`tablist`,"aria-label":`Carousel pages`,...o,children:Array.from({length:t},(t,a)=>(0,n.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":a===r,"aria-label":`Page ${a+1}`,className:[e.default.dot,a===r?e.default.dotActive:null].filter(Boolean).join(` `),onClick:()=>i?.(a)},a))}),
|
|
1
|
+
const e=require("./Carousel.module.css.cjs");let t=require("react"),n=require("react/jsx-runtime");var r={bottom:`column`,top:`column-reverse`,left:`row-reverse`,right:`row`},i=({pages:t,currentPage:r,onPageSelected:i,className:a,...o})=>(0,n.jsx)(`div`,{className:[e.default.indicatorDots,a].filter(Boolean).join(` `),role:`tablist`,"aria-label":`Carousel pages`,...o,children:Array.from({length:t},(t,a)=>(0,n.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":a===r,"aria-label":`Page ${a+1}`,className:[e.default.dot,a===r?e.default.dotActive:null].filter(Boolean).join(` `),onClick:()=>i?.(a)},a))}),a=({pages:t,currentPage:r,onPageSelected:i,className:a,...o})=>(0,n.jsx)(`div`,{className:[e.default.indicatorLines,a].filter(Boolean).join(` `),role:`tablist`,"aria-label":`Carousel pages`,...o,children:Array.from({length:t},(t,a)=>(0,n.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":a===r,"aria-label":`Page ${a+1}`,className:[e.default.line,a===r?e.default.lineActive:null].filter(Boolean).join(` `),onClick:()=>i?.(a)},a))}),o=({children:o,orientation:s=`horizontal`,spacing:c=0,loop:l=!1,visibleSlides:u=1,onPageChanged:d,page:f,autoPlay:p=!1,interval:m=3e3,indicator:h,indicatorPosition:g=`bottom`,className:_,style:v,...y})=>{let b=(0,t.useRef)(null),x=Math.max(1,Math.floor(u)),S=t.Children.count(o),C=Math.ceil(S/x),[w,T]=(0,t.useState)(0),[E,D]=(0,t.useState)(!1),O=f!==void 0,k=O?f:w,A=(0,t.useRef)(!1),j=(0,t.useRef)(!1),M=(0,t.useRef)({pos:0,scroll:0,time:0}),N=(0,t.useRef)(0),P=(0,t.useRef)(!1),F=(0,t.useRef)(0),I=(0,t.useRef)(k),L=(0,t.useRef)(!1);(0,t.useEffect)(()=>{I.current=k});let R=(0,t.useCallback)(()=>{let e=b.current;if(!e)return 1;let t=(s===`horizontal`?e.clientWidth:e.clientHeight)+c;return t>0?t:1},[s,c]),z=(0,t.useCallback)((e,t=`smooth`)=>{let n=b.current;if(!n)return;P.current=!0,window.clearTimeout(F.current),F.current=window.setTimeout(()=>{P.current=!1},t===`smooth`?400:50);let r=R()*e;s===`horizontal`?n.scrollTo({left:r,behavior:t}):n.scrollTo({top:r,behavior:t})},[s,R]);(0,t.useEffect)(()=>{O&&z(f,`smooth`)},[f,z,O]),(0,t.useEffect)(()=>{let e=b.current;if(!e)return;let t=()=>{if(A.current||P.current)return;let t=R(),n=s===`horizontal`?e.scrollLeft:e.scrollTop,r=Math.round(n/t),i=Math.max(0,Math.min(r,C-1));O||T(i),d?.(i)};return e.addEventListener(`scroll`,t,{passive:!0}),()=>e.removeEventListener(`scroll`,t)},[s,C,O,d,R]);let B=(0,t.useCallback)(e=>{let t=s===`horizontal`?e.key===`ArrowRight`:e.key===`ArrowDown`,n=s===`horizontal`?e.key===`ArrowLeft`:e.key===`ArrowUp`;if(!t&&!n)return;e.preventDefault();let r=t?l?(k+1)%C:Math.min(k+1,C-1):l?(k-1+C)%C:Math.max(k-1,0);z(r),O||T(r),d?.(r)},[k,C,l,s,z,O,d]),V=(0,t.useCallback)(e=>{if(e.pointerType===`mouse`&&e.button!==0)return;let t=b.current;t&&(window.clearTimeout(N.current),t.style.scrollSnapType=`none`,e.currentTarget.setPointerCapture(e.pointerId),A.current=!0,j.current=!1,D(!0),M.current={pos:s===`horizontal`?e.clientX:e.clientY,scroll:s===`horizontal`?t.scrollLeft:t.scrollTop,time:Date.now()})},[s]),H=(0,t.useCallback)(e=>{if(!A.current)return;let t=b.current;if(!t)return;let n=s===`horizontal`?e.clientX:e.clientY,r=M.current.pos-n;Math.abs(r)>4&&(j.current=!0);let i=s===`horizontal`?t.scrollWidth-t.clientWidth:t.scrollHeight-t.clientHeight,a=M.current.scroll+r;a<0?a*=.3:a>i&&(a=i+(a-i)*.3),s===`horizontal`?t.scrollLeft=a:t.scrollTop=a},[s]),U=(0,t.useCallback)(e=>{if(!A.current)return;A.current=!1,D(!1);let t=b.current;if(!j.current||!t){t?.style.removeProperty(`scroll-snap-type`);return}let n=e.type===`pointercancel`,r=n?M.current.pos:s===`horizontal`?e.clientX:e.clientY,i=M.current.pos-r,a=Math.max(Date.now()-M.current.time,1),o=n?0:i/a,c=R(),u=s===`horizontal`?t.scrollLeft:t.scrollTop,f=s===`horizontal`?t.scrollWidth-t.clientWidth:t.scrollHeight-t.clientHeight,p;if(Math.abs(o)>.3){let e=o>0?Math.ceil(u/c):Math.floor(u/c);p=l&&o<0&&e===0&&u<=0?C-1:l&&o>0&&e===C-1&&u>=f?0:e}else p=Math.round(u/c);p=l?(p%C+C)%C:Math.max(0,Math.min(p,C-1)),z(p),O||T(p),d?.(p),N.current=window.setTimeout(()=>{t.style.removeProperty(`scroll-snap-type`)},350)},[s,R,l,C,z,O,d]);(0,t.useEffect)(()=>{if(!p||m<=0)return;let e=window.setInterval(()=>{if(A.current||L.current)return;let e=I.current;if(!l&&e>=C-1)return;let t=l?(e+1)%C:e+1;I.current=t,z(t),O||T(t),d?.(t)},m);return()=>window.clearInterval(e)},[p,m,l,C,z,O,d]),(0,t.useEffect)(()=>()=>{window.clearTimeout(N.current),window.clearTimeout(F.current)},[]);let W=(0,t.useCallback)(e=>{j.current&&=(e.preventDefault(),e.stopPropagation(),!1)},[]),G=s===`horizontal`,K=h===`dots`||h===`lines`,q=g===`left`||g===`right`,J=x===1?void 0:`calc((100% - ${c*(x-1)}px) / ${x})`,Y=(0,n.jsx)(`div`,{ref:b,role:`region`,"aria-roledescription":`carousel`,tabIndex:0,className:[e.default.carousel,G?e.default.horizontal:e.default.vertical,E?e.default.dragging:null,K?null:_].filter(Boolean).join(` `),style:{...G?{columnGap:c||void 0}:{rowGap:c||void 0},...K&&(q?{flex:`1 1 0`,width:`auto`}:{flex:`1 1 auto`})},onMouseEnter:()=>{L.current=!0},onMouseLeave:()=>{L.current=!1},onKeyDown:B,onClick:W,...K?{}:y,children:t.Children.map(o,(t,r)=>(0,n.jsx)(`div`,{className:e.default.slide,role:`group`,"aria-roledescription":`slide`,"aria-label":`${r+1} of ${S}`,style:{...J?{flex:`0 0 ${J}`}:void 0,...x>1&&r%x!==0?{scrollSnapAlign:`none`}:void 0},onPointerDown:V,onPointerMove:H,onPointerUp:U,onPointerCancel:U,children:t},r))});if(!K)return Y;let X=e=>{z(e),O||T(e),d?.(e)},Z=q?{flexDirection:`column`,padding:`0 12px`}:void 0;return(0,n.jsxs)(`div`,{className:_,style:{...v,display:`flex`,flexDirection:r[g]},...y,children:[Y,h===`dots`&&(0,n.jsx)(i,{pages:C,currentPage:k,onPageSelected:X,style:Z}),h===`lines`&&(0,n.jsx)(a,{pages:C,currentPage:k,onPageSelected:X,style:Z})]})};exports.Carousel=o,exports.CarouselIndicatorDots=i,exports.CarouselIndicatorLines=a;
|
|
2
2
|
//# sourceMappingURL=Carousel.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Carousel.cjs","names":[],"sources":["../../../src/components/Carousel/Carousel.tsx"],"sourcesContent":["import {\n Children,\n type HTMLAttributes,\n type KeyboardEvent,\n type ReactNode,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from 'react';\n\nimport styles from './Carousel.module.css';\n\n// ─── CarouselIndicatorDots ────────────────────────────────────────────────────\n\nexport interface CarouselIndicatorDotsProps extends HTMLAttributes<HTMLDivElement> {\n /** Total number of pages. */\n pages: number;\n /** Zero-based index of the current page. */\n currentPage: number;\n /** Called when the user clicks a dot. */\n onPageSelected?: (index: number) => void;\n}\n\n/**\n * Dot-style page indicator for `Carousel`.\n * Mirrors `AdwCarouselIndicatorDots`.\n */\nexport const CarouselIndicatorDots = ({\n pages,\n currentPage,\n onPageSelected,\n className,\n ...props\n}: CarouselIndicatorDotsProps) => {\n return (\n <div\n className={[styles.indicatorDots, className].filter(Boolean).join(' ')}\n role=\"tablist\"\n aria-label=\"Carousel pages\"\n {...props}\n >\n {Array.from({ length: pages }, (_, i) => (\n <button\n key={i}\n type=\"button\"\n role=\"tab\"\n aria-selected={i === currentPage}\n aria-label={`Page ${i + 1}`}\n className={[styles.dot, i === currentPage ? styles.dotActive : null]\n .filter(Boolean)\n .join(' ')}\n onClick={() => onPageSelected?.(i)}\n />\n ))}\n </div>\n );\n};\n\n// ─── CarouselIndicatorLines ───────────────────────────────────────────────────\n\nexport interface CarouselIndicatorLinesProps extends HTMLAttributes<HTMLDivElement> {\n /** Total number of pages. */\n pages: number;\n /** Zero-based index of the current page. */\n currentPage: number;\n /** Called when the user clicks a line. */\n onPageSelected?: (index: number) => void;\n}\n\n/**\n * Line-style page indicator for `Carousel`.\n * Mirrors `AdwCarouselIndicatorLines`.\n */\nexport const CarouselIndicatorLines = ({\n pages,\n currentPage,\n onPageSelected,\n className,\n ...props\n}: CarouselIndicatorLinesProps) => {\n return (\n <div\n className={[styles.indicatorLines, className].filter(Boolean).join(' ')}\n role=\"tablist\"\n aria-label=\"Carousel pages\"\n {...props}\n >\n {Array.from({ length: pages }, (_, i) => (\n <button\n key={i}\n type=\"button\"\n role=\"tab\"\n aria-selected={i === currentPage}\n aria-label={`Page ${i + 1}`}\n className={[styles.line, i === currentPage ? styles.lineActive : null]\n .filter(Boolean)\n .join(' ')}\n onClick={() => onPageSelected?.(i)}\n />\n ))}\n </div>\n );\n};\n\n// ─── Carousel ─────────────────────────────────────────────────────────────────\n\nexport interface CarouselProps extends HTMLAttributes<HTMLDivElement> {\n children?: ReactNode;\n /**\n * Scroll orientation.\n * @default \"horizontal\"\n */\n orientation?: 'horizontal' | 'vertical';\n /**\n * Gap between pages in px.\n * @default 0\n */\n spacing?: number;\n /**\n * Allow infinite looping (wraps around on the last/first page).\n * @default false\n */\n loop?: boolean;\n /** Called whenever the visible page changes. */\n onPageChanged?: (index: number) => void;\n /**\n * Controlled current page index.\n * When omitted the carousel manages page state internally.\n */\n page?: number;\n}\n\n/**\n * Swipeable content carousel.\n *\n * Mirrors `AdwCarousel`. Uses CSS scroll-snapping for smooth, native-feeling\n * page transitions. Supports keyboard navigation (arrow keys) and touch/mouse\n * drag via the browser's native scroll handling.\n *\n * Pair with `CarouselIndicatorDots` or `CarouselIndicatorLines` for pagination UI.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Carousel.html\n */\nexport const Carousel = ({\n children,\n orientation = 'horizontal',\n spacing = 0,\n loop = false,\n onPageChanged,\n page: controlledPage,\n className,\n ...props\n}: CarouselProps) => {\n const scrollRef = useRef<HTMLDivElement>(null);\n const pageCount = Children.count(children);\n const [internalPage, setInternalPage] = useState(0);\n const isControlled = controlledPage !== undefined;\n const currentPage = isControlled ? controlledPage : internalPage;\n\n const scrollToPage = useCallback(\n (index: number, behavior: ScrollBehavior = 'smooth') => {\n const el = scrollRef.current;\n\n if (!el) {\n return;\n }\n\n if (orientation === 'horizontal') {\n el.scrollTo({ left: el.clientWidth * index, behavior });\n } else {\n el.scrollTo({ top: el.clientHeight * index, behavior });\n }\n },\n [orientation],\n );\n\n // Scroll to the controlled page when it changes externally\n useEffect(() => {\n if (!isControlled) {\n return;\n }\n\n scrollToPage(controlledPage, 'smooth');\n }, [controlledPage, scrollToPage, isControlled]);\n\n // Detect page changes via IntersectionObserver on each child\n useEffect(() => {\n const el = scrollRef.current;\n\n if (!el) {\n return;\n }\n\n const handleScroll = () => {\n const pages = Array.from(el.children) as HTMLElement[];\n const size = orientation === 'horizontal' ? el.clientWidth : el.clientHeight;\n const scroll = orientation === 'horizontal' ? el.scrollLeft : el.scrollTop;\n const idx = Math.round(scroll / (size || 1));\n const clamped = Math.max(0, Math.min(idx, pageCount - 1));\n\n if (!isControlled) {\n setInternalPage(clamped);\n }\n\n onPageChanged?.(clamped);\n void pages; // suppress lint\n };\n\n el.addEventListener('scroll', handleScroll, { passive: true });\n\n return () => el.removeEventListener('scroll', handleScroll);\n }, [orientation, pageCount, isControlled, onPageChanged]);\n\n // Keyboard navigation\n const handleKeyDown = useCallback(\n (e: KeyboardEvent) => {\n const isForward =\n orientation === 'horizontal' ? e.key === 'ArrowRight' : e.key === 'ArrowDown';\n const isBack = orientation === 'horizontal' ? e.key === 'ArrowLeft' : e.key === 'ArrowUp';\n\n if (isForward) {\n e.preventDefault();\n const next = loop\n ? (currentPage + 1) % pageCount\n : Math.min(currentPage + 1, pageCount - 1);\n\n scrollToPage(next);\n if (!isControlled) {\n setInternalPage(next);\n }\n\n onPageChanged?.(next);\n } else if (isBack) {\n e.preventDefault();\n const prev = loop\n ? (currentPage - 1 + pageCount) % pageCount\n : Math.max(currentPage - 1, 0);\n\n scrollToPage(prev);\n if (!isControlled) {\n setInternalPage(prev);\n }\n\n onPageChanged?.(prev);\n }\n },\n [currentPage, pageCount, loop, orientation, scrollToPage, isControlled, onPageChanged],\n );\n\n const isHorizontal = orientation === 'horizontal';\n\n return (\n <div\n ref={scrollRef}\n role=\"region\"\n aria-roledescription=\"carousel\"\n className={[styles.carousel, isHorizontal ? styles.horizontal : styles.vertical, className]\n .filter(Boolean)\n .join(' ')}\n style={isHorizontal ? { columnGap: spacing || undefined } : { rowGap: spacing || undefined }}\n onKeyDown={handleKeyDown}\n {...props}\n >\n {Children.map(children, (child, i) => (\n <div\n key={i}\n className={styles.slide}\n role=\"group\"\n aria-roledescription=\"slide\"\n aria-label={`${i + 1} of ${pageCount}`}\n >\n {child}\n </div>\n ))}\n </div>\n );\n};\n"],"mappings":"mGA4BA,IAAa,GAAyB,CACpC,QACA,cACA,iBACA,YACA,GAAG,MAGD,EAAA,EAAA,KAAC,MAAD,CACE,UAAW,CAAC,EAAA,QAAO,cAAe,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,EACrE,KAAK,UACL,aAAW,iBACX,GAAI,WAEH,MAAM,KAAK,CAAE,OAAQ,CAAM,GAAI,EAAG,KACjC,EAAA,EAAA,KAAC,SAAD,CAEE,KAAK,SACL,KAAK,MACL,gBAAe,IAAM,EACrB,aAAY,QAAQ,EAAI,IACxB,UAAW,CAAC,EAAA,QAAO,IAAK,IAAM,EAAc,EAAA,QAAO,UAAY,IAAI,EAChE,OAAO,OAAO,EACd,KAAK,GAAG,EACX,YAAe,IAAiB,CAAC,CAClC,EATM,CASN,CACF,CACE,CAAA,EAmBI,GAA0B,CACrC,QACA,cACA,iBACA,YACA,GAAG,MAGD,EAAA,EAAA,KAAC,MAAD,CACE,UAAW,CAAC,EAAA,QAAO,eAAgB,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,EACtE,KAAK,UACL,aAAW,iBACX,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KAAK,QACL,uBAAqB,QACrB,aAAY,GAAG,EAAI,EAAE,MAAM,aAE1B,CACE,EAPE,CAOF,CACN,CACE,CAAA,CAET"}
|
|
1
|
+
{"version":3,"file":"Carousel.cjs","names":[],"sources":["../../../src/components/Carousel/Carousel.tsx"],"sourcesContent":["import {\n Children,\n type CSSProperties,\n type HTMLAttributes,\n type KeyboardEvent,\n type MouseEvent,\n type PointerEvent,\n type ReactNode,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from 'react';\n\nimport styles from './Carousel.module.css';\n\ntype IndicatorPosition = 'top' | 'bottom' | 'left' | 'right';\n\nconst INDICATOR_FLEX_DIR: Record<IndicatorPosition, CSSProperties['flexDirection']> = {\n bottom: 'column',\n top: 'column-reverse',\n left: 'row-reverse',\n right: 'row',\n};\n\n// ─── CarouselIndicatorDots ────────────────────────────────────────────────────\n\nexport interface CarouselIndicatorDotsProps extends HTMLAttributes<HTMLDivElement> {\n /** Total number of pages. */\n pages: number;\n /** Zero-based index of the current page. */\n currentPage: number;\n /** Called when the user clicks a dot. */\n onPageSelected?: (index: number) => void;\n}\n\n/**\n * Dot-style page indicator for `Carousel`.\n * Mirrors `AdwCarouselIndicatorDots`.\n */\nexport const CarouselIndicatorDots = ({\n pages,\n currentPage,\n onPageSelected,\n className,\n ...props\n}: CarouselIndicatorDotsProps) => {\n return (\n <div\n className={[styles.indicatorDots, className].filter(Boolean).join(' ')}\n role=\"tablist\"\n aria-label=\"Carousel pages\"\n {...props}\n >\n {Array.from({ length: pages }, (_, i) => (\n <button\n key={i}\n type=\"button\"\n role=\"tab\"\n aria-selected={i === currentPage}\n aria-label={`Page ${i + 1}`}\n className={[styles.dot, i === currentPage ? styles.dotActive : null]\n .filter(Boolean)\n .join(' ')}\n onClick={() => onPageSelected?.(i)}\n />\n ))}\n </div>\n );\n};\n\n// ─── CarouselIndicatorLines ───────────────────────────────────────────────────\n\nexport interface CarouselIndicatorLinesProps extends HTMLAttributes<HTMLDivElement> {\n /** Total number of pages. */\n pages: number;\n /** Zero-based index of the current page. */\n currentPage: number;\n /** Called when the user clicks a line. */\n onPageSelected?: (index: number) => void;\n}\n\n/**\n * Line-style page indicator for `Carousel`.\n * Mirrors `AdwCarouselIndicatorLines`.\n */\nexport const CarouselIndicatorLines = ({\n pages,\n currentPage,\n onPageSelected,\n className,\n ...props\n}: CarouselIndicatorLinesProps) => {\n return (\n <div\n className={[styles.indicatorLines, className].filter(Boolean).join(' ')}\n role=\"tablist\"\n aria-label=\"Carousel pages\"\n {...props}\n >\n {Array.from({ length: pages }, (_, i) => (\n <button\n key={i}\n type=\"button\"\n role=\"tab\"\n aria-selected={i === currentPage}\n aria-label={`Page ${i + 1}`}\n className={[styles.line, i === currentPage ? styles.lineActive : null]\n .filter(Boolean)\n .join(' ')}\n onClick={() => onPageSelected?.(i)}\n />\n ))}\n </div>\n );\n};\n\n// ─── Carousel ─────────────────────────────────────────────────────────────────\n\nexport interface CarouselProps extends HTMLAttributes<HTMLDivElement> {\n children?: ReactNode;\n /**\n * Scroll orientation.\n * @default \"horizontal\"\n */\n orientation?: 'horizontal' | 'vertical';\n /**\n * Gap between pages in px.\n * @default 0\n */\n spacing?: number;\n /**\n * Allow infinite looping (wraps around on the last/first page).\n * @default false\n */\n loop?: boolean;\n /**\n * Number of slides visible at once (integer ≥ 1). Navigation advances one\n * full group at a time, and the indicator shows one dot/line per group.\n * @default 1\n */\n visibleSlides?: number;\n /** Called whenever the visible page changes. */\n onPageChanged?: (index: number) => void;\n /**\n * Controlled current page index.\n * When omitted the carousel manages page state internally.\n */\n page?: number;\n /**\n * Automatically advance to the next slide. Pauses while the pointer\n * hovers over the carousel or during drag.\n * @default false\n */\n autoPlay?: boolean;\n /**\n * Milliseconds between automatic slide transitions.\n * Only used when `autoPlay` is `true`.\n * @default 3000\n */\n interval?: number;\n /**\n * Page indicator rendered alongside the carousel.\n * - `'dots'`: small circular dots (`CarouselIndicatorDots`)\n * - `'lines'`: short line segments (`CarouselIndicatorLines`)\n * - `'none'` or omitted: no indicator\n */\n indicator?: 'dots' | 'lines' | 'none';\n /**\n * Position of the indicator relative to the carousel.\n * @default 'bottom'\n */\n indicatorPosition?: IndicatorPosition;\n}\n\n/**\n * Swipeable content carousel.\n *\n * Mirrors `AdwCarousel`. Uses CSS scroll-snapping for smooth, native-feeling\n * page transitions. Supports keyboard navigation (arrow keys), touch/mouse drag,\n * and velocity-based flick gestures.\n *\n * Pair with `CarouselIndicatorDots` or `CarouselIndicatorLines` for pagination UI.\n *\n * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Carousel.html\n */\nexport const Carousel = ({\n children,\n orientation = 'horizontal',\n spacing = 0,\n loop = false,\n visibleSlides = 1,\n onPageChanged,\n page: controlledPage,\n autoPlay = false,\n interval = 3000,\n indicator,\n indicatorPosition = 'bottom',\n className,\n style,\n ...props\n}: CarouselProps) => {\n const scrollRef = useRef<HTMLDivElement>(null);\n const vSlides = Math.max(1, Math.floor(visibleSlides)); // enforce integer\n const slideCount = Children.count(children);\n const pageCount = Math.ceil(slideCount / vSlides);\n const [internalPage, setInternalPage] = useState(0);\n const [isDragging, setIsDragging] = useState(false);\n const isControlled = controlledPage !== undefined;\n const currentPage = isControlled ? controlledPage : internalPage;\n\n // Refs for drag state — avoids stale closures in pointer handlers\n const draggingRef = useRef(false);\n const hasDraggedRef = useRef(false);\n const dragStartRef = useRef({ pos: 0, scroll: 0, time: 0 });\n const snapRestoreTimerRef = useRef(0);\n // Suppresses handleScroll feedback during programmatic scrolls (e.g. dot clicks)\n const isProgrammaticScrollRef = useRef(false);\n const programmaticScrollTimerRef = useRef(0);\n // Auto-play: always-fresh snapshot of currentPage to avoid stale closure in setInterval\n const currentPageRef = useRef(currentPage);\n const isHoveringRef = useRef(false);\n useEffect(() => {\n currentPageRef.current = currentPage;\n });\n\n // Scroll distance per page = one full group = containerSize + spacing.\n // Each slide is (containerSize - spacing*(vSlides-1)) / vSlides wide, so\n // vSlides slides + (vSlides-1) gaps = containerSize, plus the inter-group\n // gap gives containerSize + spacing.\n const getPageSize = useCallback(() => {\n const el = scrollRef.current;\n if (!el) {\n return 1;\n }\n const containerSize = orientation === 'horizontal' ? el.clientWidth : el.clientHeight;\n const size = containerSize + spacing;\n return size > 0 ? size : 1;\n }, [orientation, spacing]);\n\n const scrollToPage = useCallback(\n (index: number, behavior: ScrollBehavior = 'smooth') => {\n const el = scrollRef.current;\n if (!el) {\n return;\n }\n // Suppress handleScroll feedback while the animation runs\n isProgrammaticScrollRef.current = true;\n window.clearTimeout(programmaticScrollTimerRef.current);\n programmaticScrollTimerRef.current = window.setTimeout(\n () => {\n isProgrammaticScrollRef.current = false;\n },\n behavior === 'smooth' ? 400 : 50,\n );\n\n const offset = getPageSize() * index;\n if (orientation === 'horizontal') {\n el.scrollTo({ left: offset, behavior });\n } else {\n el.scrollTo({ top: offset, behavior });\n }\n },\n [orientation, getPageSize],\n );\n\n // Scroll to the controlled page when it changes externally\n useEffect(() => {\n if (!isControlled) {\n return;\n }\n scrollToPage(controlledPage, 'smooth');\n }, [controlledPage, scrollToPage, isControlled]);\n\n // Detect page changes from native scroll (touch) — skipped during mouse drag\n useEffect(() => {\n const el = scrollRef.current;\n if (!el) {\n return;\n }\n\n const handleScroll = () => {\n if (draggingRef.current || isProgrammaticScrollRef.current) {\n return;\n }\n const pageSize = getPageSize();\n const scroll = orientation === 'horizontal' ? el.scrollLeft : el.scrollTop;\n const idx = Math.round(scroll / pageSize);\n const clamped = Math.max(0, Math.min(idx, pageCount - 1));\n if (!isControlled) {\n setInternalPage(clamped);\n }\n onPageChanged?.(clamped);\n };\n\n el.addEventListener('scroll', handleScroll, { passive: true });\n return () => el.removeEventListener('scroll', handleScroll);\n }, [orientation, pageCount, isControlled, onPageChanged, getPageSize]);\n\n // ── Keyboard navigation ───────────────────────────────────────────────────\n\n const handleKeyDown = useCallback(\n (e: KeyboardEvent<HTMLDivElement>) => {\n const isForward =\n orientation === 'horizontal' ? e.key === 'ArrowRight' : e.key === 'ArrowDown';\n const isBack = orientation === 'horizontal' ? e.key === 'ArrowLeft' : e.key === 'ArrowUp';\n\n if (!isForward && !isBack) {\n return;\n }\n e.preventDefault();\n\n const next = isForward\n ? loop\n ? (currentPage + 1) % pageCount\n : Math.min(currentPage + 1, pageCount - 1)\n : loop\n ? (currentPage - 1 + pageCount) % pageCount\n : Math.max(currentPage - 1, 0);\n\n scrollToPage(next);\n if (!isControlled) {\n setInternalPage(next);\n }\n onPageChanged?.(next);\n },\n [currentPage, pageCount, loop, orientation, scrollToPage, isControlled, onPageChanged],\n );\n\n // ── Drag (mouse + touch + pen) ───────────────────────────────────────────\n\n const handlePointerDown = useCallback(\n (e: PointerEvent<HTMLDivElement>) => {\n // Ignore non-primary mouse buttons\n if (e.pointerType === 'mouse' && e.button !== 0) {\n return;\n }\n const el = scrollRef.current;\n if (!el) {\n return;\n }\n\n // Disable scroll-snap immediately via DOM — not via React state, which would\n // only apply after the next render, letting scroll-snap fight the first moves.\n window.clearTimeout(snapRestoreTimerRef.current);\n el.style.scrollSnapType = 'none';\n\n // Capture so pointermove/up fire even when the pointer leaves the element\n e.currentTarget.setPointerCapture(e.pointerId);\n draggingRef.current = true;\n hasDraggedRef.current = false;\n setIsDragging(true);\n dragStartRef.current = {\n pos: orientation === 'horizontal' ? e.clientX : e.clientY,\n scroll: orientation === 'horizontal' ? el.scrollLeft : el.scrollTop,\n time: Date.now(),\n };\n },\n [orientation],\n );\n\n const handlePointerMove = useCallback(\n (e: PointerEvent<HTMLDivElement>) => {\n if (!draggingRef.current) {\n return;\n }\n const el = scrollRef.current;\n if (!el) {\n return;\n }\n\n const pos = orientation === 'horizontal' ? e.clientX : e.clientY;\n const delta = dragStartRef.current.pos - pos;\n\n if (Math.abs(delta) > 4) {\n hasDraggedRef.current = true;\n }\n\n // Apply boundary resistance: dampen movement past first/last slide\n const maxScroll =\n orientation === 'horizontal'\n ? el.scrollWidth - el.clientWidth\n : el.scrollHeight - el.clientHeight;\n let newScroll = dragStartRef.current.scroll + delta;\n\n if (newScroll < 0) {\n newScroll *= 0.3;\n } else if (newScroll > maxScroll) {\n newScroll = maxScroll + (newScroll - maxScroll) * 0.3;\n }\n\n if (orientation === 'horizontal') {\n el.scrollLeft = newScroll;\n } else {\n el.scrollTop = newScroll;\n }\n },\n [orientation],\n );\n\n const handlePointerUp = useCallback(\n (e: PointerEvent<HTMLDivElement>) => {\n if (!draggingRef.current) {\n return;\n }\n\n draggingRef.current = false;\n setIsDragging(false);\n\n const el = scrollRef.current;\n\n if (!hasDraggedRef.current || !el) {\n // No real drag — restore snap immediately\n el?.style.removeProperty('scroll-snap-type');\n return;\n }\n\n const isCancel = e.type === 'pointercancel';\n const pos = isCancel\n ? dragStartRef.current.pos\n : orientation === 'horizontal'\n ? e.clientX\n : e.clientY;\n\n const delta = dragStartRef.current.pos - pos;\n const elapsed = Math.max(Date.now() - dragStartRef.current.time, 1);\n const velocity = isCancel ? 0 : delta / elapsed; // px/ms, positive = forward\n const pageSize = getPageSize();\n const scroll = orientation === 'horizontal' ? el.scrollLeft : el.scrollTop;\n\n const maxScroll =\n orientation === 'horizontal'\n ? el.scrollWidth - el.clientWidth\n : el.scrollHeight - el.clientHeight;\n\n let target: number;\n if (Math.abs(velocity) > 0.3) {\n const rawTarget =\n velocity > 0 ? Math.ceil(scroll / pageSize) : Math.floor(scroll / pageSize);\n // In loop mode the browser clamps scroll to [0, maxScroll], so a backward\n // flick from page 0 and a forward flick from the last page both produce a\n // rawTarget stuck at the boundary. Detect and wrap explicitly.\n if (loop && velocity < 0 && rawTarget === 0 && scroll <= 0) {\n target = pageCount - 1;\n } else if (loop && velocity > 0 && rawTarget === pageCount - 1 && scroll >= maxScroll) {\n target = 0;\n } else {\n target = rawTarget;\n }\n } else {\n // Slow drag — snap to nearest page\n target = Math.round(scroll / pageSize);\n }\n\n if (loop) {\n target = ((target % pageCount) + pageCount) % pageCount;\n } else {\n target = Math.max(0, Math.min(target, pageCount - 1));\n }\n\n // Scroll to target while snap is still disabled, then re-enable once settled\n scrollToPage(target);\n if (!isControlled) {\n setInternalPage(target);\n }\n onPageChanged?.(target);\n\n // Re-enable snap after the smooth scroll animation completes (~300 ms)\n snapRestoreTimerRef.current = window.setTimeout(() => {\n el.style.removeProperty('scroll-snap-type');\n }, 350);\n },\n [orientation, getPageSize, loop, pageCount, scrollToPage, isControlled, onPageChanged],\n );\n\n // Auto-play: advance one slide every `interval` ms, pausing on hover/drag\n useEffect(() => {\n if (!autoPlay || interval <= 0) {\n return;\n }\n\n const timer = window.setInterval(() => {\n if (draggingRef.current || isHoveringRef.current) {\n return;\n }\n const page = currentPageRef.current;\n if (!loop && page >= pageCount - 1) {\n return;\n }\n const next = loop ? (page + 1) % pageCount : page + 1;\n // Update ref immediately so back-to-back ticks see the correct page\n currentPageRef.current = next;\n scrollToPage(next);\n if (!isControlled) {\n setInternalPage(next);\n }\n onPageChanged?.(next);\n }, interval);\n\n return () => window.clearInterval(timer);\n }, [autoPlay, interval, loop, pageCount, scrollToPage, isControlled, onPageChanged]);\n\n // Clean up timers on unmount\n useEffect(() => {\n return () => {\n window.clearTimeout(snapRestoreTimerRef.current);\n window.clearTimeout(programmaticScrollTimerRef.current);\n };\n }, []);\n\n // Prevent click events that fire after a drag (e.g. links/buttons inside slides)\n const handleClick = useCallback((e: MouseEvent) => {\n if (hasDraggedRef.current) {\n e.preventDefault();\n e.stopPropagation();\n hasDraggedRef.current = false;\n }\n }, []);\n\n const isHorizontal = orientation === 'horizontal';\n const showIndicator = indicator === 'dots' || indicator === 'lines';\n const isSide = indicatorPosition === 'left' || indicatorPosition === 'right';\n\n // Slide width when showing more than one at a time\n const slideFlexBasis =\n vSlides !== 1 ? `calc((100% - ${spacing * (vSlides - 1)}px) / ${vSlides})` : undefined;\n\n const scrollContainer = (\n <div\n ref={scrollRef}\n role=\"region\"\n aria-roledescription=\"carousel\"\n tabIndex={0}\n className={[\n styles.carousel,\n isHorizontal ? styles.horizontal : styles.vertical,\n isDragging ? styles.dragging : null,\n showIndicator ? null : className,\n ]\n .filter(Boolean)\n .join(' ')}\n style={{\n ...(isHorizontal ? { columnGap: spacing || undefined } : { rowGap: spacing || undefined }),\n ...(showIndicator && (isSide ? { flex: '1 1 0', width: 'auto' } : { flex: '1 1 auto' })),\n }}\n onMouseEnter={() => {\n isHoveringRef.current = true;\n }}\n onMouseLeave={() => {\n isHoveringRef.current = false;\n }}\n onKeyDown={handleKeyDown}\n onClick={handleClick}\n {...(showIndicator ? {} : props)}\n >\n {Children.map(children, (child, i) => (\n <div\n key={i}\n className={styles.slide}\n role=\"group\"\n aria-roledescription=\"slide\"\n aria-label={`${i + 1} of ${slideCount}`}\n style={{\n ...(slideFlexBasis ? { flex: `0 0 ${slideFlexBasis}` } : undefined),\n // Only the first slide of each group is a snap target; intermediate\n // slides would cause the carousel to stop mid-group.\n ...(vSlides > 1 && i % vSlides !== 0 ? { scrollSnapAlign: 'none' } : undefined),\n }}\n onPointerDown={handlePointerDown}\n onPointerMove={handlePointerMove}\n onPointerUp={handlePointerUp}\n onPointerCancel={handlePointerUp}\n >\n {child}\n </div>\n ))}\n </div>\n );\n\n if (!showIndicator) {\n return scrollContainer;\n }\n\n const onPageSelected = (i: number) => {\n scrollToPage(i);\n if (!isControlled) {\n setInternalPage(i);\n }\n onPageChanged?.(i);\n };\n\n const indicatorStyle: CSSProperties | undefined = isSide\n ? { flexDirection: 'column', padding: '0 12px' }\n : undefined;\n\n return (\n <div\n className={className}\n style={{\n ...style,\n display: 'flex',\n flexDirection: INDICATOR_FLEX_DIR[indicatorPosition],\n }}\n {...props}\n >\n {scrollContainer}\n {indicator === 'dots' && (\n <CarouselIndicatorDots\n pages={pageCount}\n currentPage={currentPage}\n onPageSelected={onPageSelected}\n style={indicatorStyle}\n />\n )}\n {indicator === 'lines' && (\n <CarouselIndicatorLines\n pages={pageCount}\n currentPage={currentPage}\n onPageSelected={onPageSelected}\n style={indicatorStyle}\n />\n )}\n </div>\n );\n};\n"],"mappings":"mGAkBA,IAAM,EAAgF,C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iB,EAAI,IAAA,GAGzD,GAAI,EAAU,GAAK,EAAI,IAAY,EAAI,CAAE,gBAAiB,MAAO,EAAI,IAAA,EACvE,EACA,cAAe,EACf,cAAe,EACf,YAAa,EACb,gBAAiB,WAEhB,CACE,EAjBE,CAiBF,CACN,CACE,CAAA,EAGP,GAAI,CAAC,EACH,OAAO,EAGT,IAAM,EAAkB,GAAc,CACpC,EAAa,CAAC,EACT,GACH,EAAgB,CAAC,EAEnB,IAAgB,CAAC,CACnB,EAEM,EAA4C,EAC9C,CAAE,cAAe,SAAU,QAAS,QAAS,EAC7C,IAAA,GAEJ,OACE,EAAA,EAAA,MAAC,MAAD,CACa,YACX,MAAO,CACL,GAAG,EACH,QAAS,OACT,cAAe,EAAmB,EACpC,EACA,GAAI,WAPN,CASG,EACA,IAAc,SACb,EAAA,EAAA,KAAC,EAAD,CACE,MAAO,EACM,cACG,iBAChB,MAAO,CACR,CAAA,EAEF,IAAc,UACb,EAAA,EAAA,KAAC,EAAD,CACE,MAAO,EACM,cACG,iBAChB,MAAO,CACR,CAAA,CAEA,GAET"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
type IndicatorPosition = 'top' | 'bottom' | 'left' | 'right';
|
|
2
3
|
export interface CarouselIndicatorDotsProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
4
|
/** Total number of pages. */
|
|
4
5
|
pages: number;
|
|
@@ -42,6 +43,12 @@ export interface CarouselProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
42
43
|
* @default false
|
|
43
44
|
*/
|
|
44
45
|
loop?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Number of slides visible at once (integer ≥ 1). Navigation advances one
|
|
48
|
+
* full group at a time, and the indicator shows one dot/line per group.
|
|
49
|
+
* @default 1
|
|
50
|
+
*/
|
|
51
|
+
visibleSlides?: number;
|
|
45
52
|
/** Called whenever the visible page changes. */
|
|
46
53
|
onPageChanged?: (index: number) => void;
|
|
47
54
|
/**
|
|
@@ -49,16 +56,41 @@ export interface CarouselProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
49
56
|
* When omitted the carousel manages page state internally.
|
|
50
57
|
*/
|
|
51
58
|
page?: number;
|
|
59
|
+
/**
|
|
60
|
+
* Automatically advance to the next slide. Pauses while the pointer
|
|
61
|
+
* hovers over the carousel or during drag.
|
|
62
|
+
* @default false
|
|
63
|
+
*/
|
|
64
|
+
autoPlay?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Milliseconds between automatic slide transitions.
|
|
67
|
+
* Only used when `autoPlay` is `true`.
|
|
68
|
+
* @default 3000
|
|
69
|
+
*/
|
|
70
|
+
interval?: number;
|
|
71
|
+
/**
|
|
72
|
+
* Page indicator rendered alongside the carousel.
|
|
73
|
+
* - `'dots'`: small circular dots (`CarouselIndicatorDots`)
|
|
74
|
+
* - `'lines'`: short line segments (`CarouselIndicatorLines`)
|
|
75
|
+
* - `'none'` or omitted: no indicator
|
|
76
|
+
*/
|
|
77
|
+
indicator?: 'dots' | 'lines' | 'none';
|
|
78
|
+
/**
|
|
79
|
+
* Position of the indicator relative to the carousel.
|
|
80
|
+
* @default 'bottom'
|
|
81
|
+
*/
|
|
82
|
+
indicatorPosition?: IndicatorPosition;
|
|
52
83
|
}
|
|
53
84
|
/**
|
|
54
85
|
* Swipeable content carousel.
|
|
55
86
|
*
|
|
56
87
|
* Mirrors `AdwCarousel`. Uses CSS scroll-snapping for smooth, native-feeling
|
|
57
|
-
* page transitions. Supports keyboard navigation (arrow keys)
|
|
58
|
-
*
|
|
88
|
+
* page transitions. Supports keyboard navigation (arrow keys), touch/mouse drag,
|
|
89
|
+
* and velocity-based flick gestures.
|
|
59
90
|
*
|
|
60
91
|
* Pair with `CarouselIndicatorDots` or `CarouselIndicatorLines` for pagination UI.
|
|
61
92
|
*
|
|
62
93
|
* @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Carousel.html
|
|
63
94
|
*/
|
|
64
|
-
export declare const Carousel: ({ children, orientation, spacing, loop, onPageChanged, page: controlledPage, className, ...props }: CarouselProps) => import("react/jsx-runtime").JSX.Element;
|
|
95
|
+
export declare const Carousel: ({ children, orientation, spacing, loop, visibleSlides, onPageChanged, page: controlledPage, autoPlay, interval, indicator, indicatorPosition, className, style, ...props }: CarouselProps) => import("react/jsx-runtime").JSX.Element;
|
|
96
|
+
export {};
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import e from "./Carousel.module.css.js";
|
|
2
2
|
import { Children as t, useCallback as n, useEffect as r, useRef as i, useState as a } from "react";
|
|
3
|
-
import { jsx as o } from "react/jsx-runtime";
|
|
3
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/Carousel/Carousel.tsx
|
|
5
|
-
var
|
|
5
|
+
var c = {
|
|
6
|
+
bottom: "column",
|
|
7
|
+
top: "column-reverse",
|
|
8
|
+
left: "row-reverse",
|
|
9
|
+
right: "row"
|
|
10
|
+
}, l = ({ pages: t, currentPage: n, onPageSelected: r, className: i, ...a }) => /* @__PURE__ */ o("div", {
|
|
6
11
|
className: [e.indicatorDots, i].filter(Boolean).join(" "),
|
|
7
12
|
role: "tablist",
|
|
8
13
|
"aria-label": "Carousel pages",
|
|
@@ -15,7 +20,7 @@ var s = ({ pages: t, currentPage: n, onPageSelected: r, className: i, ...a }) =>
|
|
|
15
20
|
className: [e.dot, i === n ? e.dotActive : null].filter(Boolean).join(" "),
|
|
16
21
|
onClick: () => r?.(i)
|
|
17
22
|
}, i))
|
|
18
|
-
}),
|
|
23
|
+
}), u = ({ pages: t, currentPage: n, onPageSelected: r, className: i, ...a }) => /* @__PURE__ */ o("div", {
|
|
19
24
|
className: [e.indicatorLines, i].filter(Boolean).join(" "),
|
|
20
25
|
role: "tablist",
|
|
21
26
|
"aria-label": "Carousel pages",
|
|
@@ -28,80 +33,211 @@ var s = ({ pages: t, currentPage: n, onPageSelected: r, className: i, ...a }) =>
|
|
|
28
33
|
className: [e.line, i === n ? e.lineActive : null].filter(Boolean).join(" "),
|
|
29
34
|
onClick: () => r?.(i)
|
|
30
35
|
}, i))
|
|
31
|
-
}),
|
|
32
|
-
let
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
+
}), d = ({ children: d, orientation: f = "horizontal", spacing: p = 0, loop: m = !1, visibleSlides: h = 1, onPageChanged: g, page: _, autoPlay: v = !1, interval: y = 3e3, indicator: b, indicatorPosition: x = "bottom", className: S, style: C, ...w }) => {
|
|
37
|
+
let T = i(null), E = Math.max(1, Math.floor(h)), D = t.count(d), O = Math.ceil(D / E), [ee, k] = a(0), [A, j] = a(!1), M = _ !== void 0, N = M ? _ : ee, P = i(!1), F = i(!1), I = i({
|
|
38
|
+
pos: 0,
|
|
39
|
+
scroll: 0,
|
|
40
|
+
time: 0
|
|
41
|
+
}), L = i(0), R = i(!1), z = i(0), B = i(N), V = i(!1);
|
|
42
|
+
r(() => {
|
|
43
|
+
B.current = N;
|
|
44
|
+
});
|
|
45
|
+
let H = n(() => {
|
|
46
|
+
let e = T.current;
|
|
47
|
+
if (!e) return 1;
|
|
48
|
+
let t = (f === "horizontal" ? e.clientWidth : e.clientHeight) + p;
|
|
49
|
+
return t > 0 ? t : 1;
|
|
50
|
+
}, [f, p]), U = n((e, t = "smooth") => {
|
|
51
|
+
let n = T.current;
|
|
52
|
+
if (!n) return;
|
|
53
|
+
R.current = !0, window.clearTimeout(z.current), z.current = window.setTimeout(() => {
|
|
54
|
+
R.current = !1;
|
|
55
|
+
}, t === "smooth" ? 400 : 50);
|
|
56
|
+
let r = H() * e;
|
|
57
|
+
f === "horizontal" ? n.scrollTo({
|
|
58
|
+
left: r,
|
|
36
59
|
behavior: t
|
|
37
60
|
}) : n.scrollTo({
|
|
38
|
-
top:
|
|
61
|
+
top: r,
|
|
39
62
|
behavior: t
|
|
40
|
-
})
|
|
41
|
-
}, [
|
|
63
|
+
});
|
|
64
|
+
}, [f, H]);
|
|
42
65
|
r(() => {
|
|
43
|
-
|
|
66
|
+
M && U(_, "smooth");
|
|
44
67
|
}, [
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
68
|
+
_,
|
|
69
|
+
U,
|
|
70
|
+
M
|
|
48
71
|
]), r(() => {
|
|
49
|
-
let e =
|
|
72
|
+
let e = T.current;
|
|
50
73
|
if (!e) return;
|
|
51
74
|
let t = () => {
|
|
52
|
-
|
|
53
|
-
let t =
|
|
54
|
-
|
|
75
|
+
if (P.current || R.current) return;
|
|
76
|
+
let t = H(), n = f === "horizontal" ? e.scrollLeft : e.scrollTop, r = Math.round(n / t), i = Math.max(0, Math.min(r, O - 1));
|
|
77
|
+
M || k(i), g?.(i);
|
|
55
78
|
};
|
|
56
79
|
return e.addEventListener("scroll", t, { passive: !0 }), () => e.removeEventListener("scroll", t);
|
|
57
80
|
}, [
|
|
58
|
-
|
|
81
|
+
f,
|
|
82
|
+
O,
|
|
83
|
+
M,
|
|
59
84
|
g,
|
|
60
|
-
|
|
61
|
-
d
|
|
85
|
+
H
|
|
62
86
|
]);
|
|
63
|
-
let
|
|
64
|
-
let t =
|
|
65
|
-
if (t)
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
87
|
+
let W = n((e) => {
|
|
88
|
+
let t = f === "horizontal" ? e.key === "ArrowRight" : e.key === "ArrowDown", n = f === "horizontal" ? e.key === "ArrowLeft" : e.key === "ArrowUp";
|
|
89
|
+
if (!t && !n) return;
|
|
90
|
+
e.preventDefault();
|
|
91
|
+
let r = t ? m ? (N + 1) % O : Math.min(N + 1, O - 1) : m ? (N - 1 + O) % O : Math.max(N - 1, 0);
|
|
92
|
+
U(r), M || k(r), g?.(r);
|
|
93
|
+
}, [
|
|
94
|
+
N,
|
|
95
|
+
O,
|
|
96
|
+
m,
|
|
97
|
+
f,
|
|
98
|
+
U,
|
|
99
|
+
M,
|
|
100
|
+
g
|
|
101
|
+
]), G = n((e) => {
|
|
102
|
+
if (e.pointerType === "mouse" && e.button !== 0) return;
|
|
103
|
+
let t = T.current;
|
|
104
|
+
t && (window.clearTimeout(L.current), t.style.scrollSnapType = "none", e.currentTarget.setPointerCapture(e.pointerId), P.current = !0, F.current = !1, j(!0), I.current = {
|
|
105
|
+
pos: f === "horizontal" ? e.clientX : e.clientY,
|
|
106
|
+
scroll: f === "horizontal" ? t.scrollLeft : t.scrollTop,
|
|
107
|
+
time: Date.now()
|
|
108
|
+
});
|
|
109
|
+
}, [f]), te = n((e) => {
|
|
110
|
+
if (!P.current) return;
|
|
111
|
+
let t = T.current;
|
|
112
|
+
if (!t) return;
|
|
113
|
+
let n = f === "horizontal" ? e.clientX : e.clientY, r = I.current.pos - n;
|
|
114
|
+
Math.abs(r) > 4 && (F.current = !0);
|
|
115
|
+
let i = f === "horizontal" ? t.scrollWidth - t.clientWidth : t.scrollHeight - t.clientHeight, a = I.current.scroll + r;
|
|
116
|
+
a < 0 ? a *= .3 : a > i && (a = i + (a - i) * .3), f === "horizontal" ? t.scrollLeft = a : t.scrollTop = a;
|
|
117
|
+
}, [f]), K = n((e) => {
|
|
118
|
+
if (!P.current) return;
|
|
119
|
+
P.current = !1, j(!1);
|
|
120
|
+
let t = T.current;
|
|
121
|
+
if (!F.current || !t) {
|
|
122
|
+
t?.style.removeProperty("scroll-snap-type");
|
|
123
|
+
return;
|
|
73
124
|
}
|
|
125
|
+
let n = e.type === "pointercancel", r = n ? I.current.pos : f === "horizontal" ? e.clientX : e.clientY, i = I.current.pos - r, a = Math.max(Date.now() - I.current.time, 1), o = n ? 0 : i / a, s = H(), c = f === "horizontal" ? t.scrollLeft : t.scrollTop, l = f === "horizontal" ? t.scrollWidth - t.clientWidth : t.scrollHeight - t.clientHeight, u;
|
|
126
|
+
if (Math.abs(o) > .3) {
|
|
127
|
+
let e = o > 0 ? Math.ceil(c / s) : Math.floor(c / s);
|
|
128
|
+
u = m && o < 0 && e === 0 && c <= 0 ? O - 1 : m && o > 0 && e === O - 1 && c >= l ? 0 : e;
|
|
129
|
+
} else u = Math.round(c / s);
|
|
130
|
+
u = m ? (u % O + O) % O : Math.max(0, Math.min(u, O - 1)), U(u), M || k(u), g?.(u), L.current = window.setTimeout(() => {
|
|
131
|
+
t.style.removeProperty("scroll-snap-type");
|
|
132
|
+
}, 350);
|
|
74
133
|
}, [
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
134
|
+
f,
|
|
135
|
+
H,
|
|
136
|
+
m,
|
|
137
|
+
O,
|
|
138
|
+
U,
|
|
139
|
+
M,
|
|
140
|
+
g
|
|
141
|
+
]);
|
|
142
|
+
r(() => {
|
|
143
|
+
if (!v || y <= 0) return;
|
|
144
|
+
let e = window.setInterval(() => {
|
|
145
|
+
if (P.current || V.current) return;
|
|
146
|
+
let e = B.current;
|
|
147
|
+
if (!m && e >= O - 1) return;
|
|
148
|
+
let t = m ? (e + 1) % O : e + 1;
|
|
149
|
+
B.current = t, U(t), M || k(t), g?.(t);
|
|
150
|
+
}, y);
|
|
151
|
+
return () => window.clearInterval(e);
|
|
152
|
+
}, [
|
|
153
|
+
v,
|
|
80
154
|
y,
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
155
|
+
m,
|
|
156
|
+
O,
|
|
157
|
+
U,
|
|
158
|
+
M,
|
|
159
|
+
g
|
|
160
|
+
]), r(() => () => {
|
|
161
|
+
window.clearTimeout(L.current), window.clearTimeout(z.current);
|
|
162
|
+
}, []);
|
|
163
|
+
let ne = n((e) => {
|
|
164
|
+
F.current &&= (e.preventDefault(), e.stopPropagation(), !1);
|
|
165
|
+
}, []), q = f === "horizontal", J = b === "dots" || b === "lines", Y = x === "left" || x === "right", X = E === 1 ? void 0 : `calc((100% - ${p * (E - 1)}px) / ${E})`, Z = /* @__PURE__ */ o("div", {
|
|
166
|
+
ref: T,
|
|
85
167
|
role: "region",
|
|
86
168
|
"aria-roledescription": "carousel",
|
|
169
|
+
tabIndex: 0,
|
|
87
170
|
className: [
|
|
88
171
|
e.carousel,
|
|
89
|
-
|
|
90
|
-
|
|
172
|
+
q ? e.horizontal : e.vertical,
|
|
173
|
+
A ? e.dragging : null,
|
|
174
|
+
J ? null : S
|
|
91
175
|
].filter(Boolean).join(" "),
|
|
92
|
-
style:
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
176
|
+
style: {
|
|
177
|
+
...q ? { columnGap: p || void 0 } : { rowGap: p || void 0 },
|
|
178
|
+
...J && (Y ? {
|
|
179
|
+
flex: "1 1 0",
|
|
180
|
+
width: "auto"
|
|
181
|
+
} : { flex: "1 1 auto" })
|
|
182
|
+
},
|
|
183
|
+
onMouseEnter: () => {
|
|
184
|
+
V.current = !0;
|
|
185
|
+
},
|
|
186
|
+
onMouseLeave: () => {
|
|
187
|
+
V.current = !1;
|
|
188
|
+
},
|
|
189
|
+
onKeyDown: W,
|
|
190
|
+
onClick: ne,
|
|
191
|
+
...J ? {} : w,
|
|
192
|
+
children: t.map(d, (t, n) => /* @__PURE__ */ o("div", {
|
|
96
193
|
className: e.slide,
|
|
97
194
|
role: "group",
|
|
98
195
|
"aria-roledescription": "slide",
|
|
99
|
-
"aria-label": `${n + 1} of ${
|
|
196
|
+
"aria-label": `${n + 1} of ${D}`,
|
|
197
|
+
style: {
|
|
198
|
+
...X ? { flex: `0 0 ${X}` } : void 0,
|
|
199
|
+
...E > 1 && n % E !== 0 ? { scrollSnapAlign: "none" } : void 0
|
|
200
|
+
},
|
|
201
|
+
onPointerDown: G,
|
|
202
|
+
onPointerMove: te,
|
|
203
|
+
onPointerUp: K,
|
|
204
|
+
onPointerCancel: K,
|
|
100
205
|
children: t
|
|
101
206
|
}, n))
|
|
102
207
|
});
|
|
208
|
+
if (!J) return Z;
|
|
209
|
+
let Q = (e) => {
|
|
210
|
+
U(e), M || k(e), g?.(e);
|
|
211
|
+
}, $ = Y ? {
|
|
212
|
+
flexDirection: "column",
|
|
213
|
+
padding: "0 12px"
|
|
214
|
+
} : void 0;
|
|
215
|
+
return /* @__PURE__ */ s("div", {
|
|
216
|
+
className: S,
|
|
217
|
+
style: {
|
|
218
|
+
...C,
|
|
219
|
+
display: "flex",
|
|
220
|
+
flexDirection: c[x]
|
|
221
|
+
},
|
|
222
|
+
...w,
|
|
223
|
+
children: [
|
|
224
|
+
Z,
|
|
225
|
+
b === "dots" && /* @__PURE__ */ o(l, {
|
|
226
|
+
pages: O,
|
|
227
|
+
currentPage: N,
|
|
228
|
+
onPageSelected: Q,
|
|
229
|
+
style: $
|
|
230
|
+
}),
|
|
231
|
+
b === "lines" && /* @__PURE__ */ o(u, {
|
|
232
|
+
pages: O,
|
|
233
|
+
currentPage: N,
|
|
234
|
+
onPageSelected: Q,
|
|
235
|
+
style: $
|
|
236
|
+
})
|
|
237
|
+
]
|
|
238
|
+
});
|
|
103
239
|
};
|
|
104
240
|
//#endregion
|
|
105
|
-
export {
|
|
241
|
+
export { d as Carousel, l as CarouselIndicatorDots, u as CarouselIndicatorLines };
|
|
106
242
|
|
|
107
243
|
//# sourceMappingURL=Carousel.js.map
|