@forgedevstack/bear 1.0.7 → 1.0.9
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/ActivityItem/ActivityItem.cjs +1 -1
- package/dist/components/ActivityItem/ActivityItem.js +1 -0
- package/dist/components/Alert/Alert.cjs +1 -1
- package/dist/components/Alert/Alert.const.cjs +1 -1
- package/dist/components/Alert/Alert.const.d.ts +4 -0
- package/dist/components/Alert/Alert.const.js +10 -15
- package/dist/components/Alert/Alert.js +43 -38
- package/dist/components/AppBar/AppBar.cjs +1 -1
- package/dist/components/AppBar/AppBar.js +19 -14
- package/dist/components/BackTop/BackTop.cjs +1 -0
- package/dist/components/BackTop/BackTop.const.cjs +1 -0
- package/dist/components/BackTop/BackTop.const.d.ts +34 -0
- package/dist/components/BackTop/BackTop.const.js +29 -0
- package/dist/components/BackTop/BackTop.d.ts +21 -0
- package/dist/components/BackTop/BackTop.js +87 -0
- package/dist/components/BackTop/BackTop.types.d.ts +28 -0
- package/dist/components/BackTop/index.d.ts +3 -0
- package/dist/components/Badge/Badge.cjs +1 -1
- package/dist/components/Badge/Badge.constants.d.ts +4 -4
- package/dist/components/Badge/Badge.js +15 -14
- package/dist/components/Badge/Badge.types.d.ts +3 -3
- package/dist/components/BearLogo/EmberLogo.cjs +1 -1
- package/dist/components/BearLogo/EmberLogo.js +3 -2
- package/dist/components/BottomNavigation/BottomNavigation.cjs +1 -1
- package/dist/components/BottomNavigation/BottomNavigation.js +3 -2
- package/dist/components/BottomSheet/BottomSheet.cjs +1 -1
- package/dist/components/BottomSheet/BottomSheet.js +39 -38
- package/dist/components/Button/Button.cjs +1 -1
- package/dist/components/Button/Button.constants.cjs +38 -48
- package/dist/components/Button/Button.constants.d.ts +22 -3
- package/dist/components/Button/Button.constants.js +51 -50
- package/dist/components/Button/Button.d.ts +14 -7
- package/dist/components/Button/Button.js +123 -45
- package/dist/components/Button/Button.types.d.ts +22 -4
- package/dist/components/Calendar/Calendar.cjs +1 -1
- package/dist/components/Calendar/Calendar.js +3 -2
- package/dist/components/Card/Card.const.d.ts +2 -2
- package/dist/components/Card/Card.types.d.ts +2 -2
- package/dist/components/Carousel/Carousel.cjs +1 -1
- package/dist/components/Carousel/Carousel.const.cjs +1 -0
- package/dist/components/Carousel/Carousel.const.d.ts +12 -0
- package/dist/components/Carousel/Carousel.const.js +9 -0
- package/dist/components/Carousel/Carousel.d.ts +14 -3
- package/dist/components/Carousel/Carousel.js +222 -75
- package/dist/components/Carousel/Carousel.types.d.ts +32 -2
- package/dist/components/Carousel/index.d.ts +1 -1
- package/dist/components/Chat/Chat.cjs +1 -0
- package/dist/components/Chat/Chat.const.cjs +1 -0
- package/dist/components/Chat/Chat.const.d.ts +26 -0
- package/dist/components/Chat/Chat.const.js +29 -0
- package/dist/components/Chat/Chat.d.ts +21 -0
- package/dist/components/Chat/Chat.js +179 -0
- package/dist/components/Chat/Chat.types.d.ts +55 -0
- package/dist/components/Chat/index.d.ts +2 -0
- package/dist/components/Chip/Chip.cjs +1 -1
- package/dist/components/Chip/Chip.js +3 -2
- package/dist/components/CodeEditor/CodeEditor.cjs +5 -0
- package/dist/components/CodeEditor/CodeEditor.const.cjs +1 -0
- package/dist/components/CodeEditor/CodeEditor.const.d.ts +21 -0
- package/dist/components/CodeEditor/CodeEditor.const.js +119 -0
- package/dist/components/CodeEditor/CodeEditor.d.ts +22 -0
- package/dist/components/CodeEditor/CodeEditor.js +250 -0
- package/dist/components/CodeEditor/CodeEditor.types.d.ts +80 -0
- package/dist/components/CodeEditor/CodeEditor.utils.cjs +1 -0
- package/dist/components/CodeEditor/CodeEditor.utils.d.ts +6 -0
- package/dist/components/CodeEditor/CodeEditor.utils.js +75 -0
- package/dist/components/CodeEditor/index.d.ts +2 -0
- package/dist/components/Columns/Columns.cjs +1 -1
- package/dist/components/Columns/Columns.js +9 -8
- package/dist/components/Confetti/Confetti.cjs +1 -0
- package/dist/components/Confetti/Confetti.const.cjs +1 -0
- package/dist/components/Confetti/Confetti.const.d.ts +16 -0
- package/dist/components/Confetti/Confetti.const.js +36 -0
- package/dist/components/Confetti/Confetti.d.ts +23 -0
- package/dist/components/Confetti/Confetti.js +94 -0
- package/dist/components/Confetti/Confetti.types.d.ts +50 -0
- package/dist/components/Confetti/index.d.ts +4 -0
- package/dist/components/Confetti/useConfetti.cjs +1 -0
- package/dist/components/Confetti/useConfetti.d.ts +13 -0
- package/dist/components/Confetti/useConfetti.js +12 -0
- package/dist/components/CountdownTimer/CountdownTimer.cjs +1 -0
- package/dist/components/CountdownTimer/CountdownTimer.const.cjs +1 -0
- package/dist/components/CountdownTimer/CountdownTimer.const.d.ts +27 -0
- package/dist/components/CountdownTimer/CountdownTimer.const.js +35 -0
- package/dist/components/CountdownTimer/CountdownTimer.d.ts +7 -0
- package/dist/components/CountdownTimer/CountdownTimer.js +115 -0
- package/dist/components/CountdownTimer/CountdownTimer.types.d.ts +56 -0
- package/dist/components/CountdownTimer/index.d.ts +2 -0
- package/dist/components/Cropper/Cropper.cjs +1 -0
- package/dist/components/Cropper/Cropper.const.cjs +1 -0
- package/dist/components/Cropper/Cropper.const.d.ts +31 -0
- package/dist/components/Cropper/Cropper.const.js +33 -0
- package/dist/components/Cropper/Cropper.d.ts +21 -0
- package/dist/components/Cropper/Cropper.js +362 -0
- package/dist/components/Cropper/Cropper.types.d.ts +72 -0
- package/dist/components/Cropper/index.d.ts +2 -0
- package/dist/components/DataTable/DataTable.cjs +1 -1
- package/dist/components/DataTable/DataTable.js +5 -4
- package/dist/components/DatePicker/DatePicker.cjs +1 -1
- package/dist/components/DatePicker/DatePicker.js +3 -2
- package/dist/components/DiffViewer/DiffViewer.cjs +1 -0
- package/dist/components/DiffViewer/DiffViewer.const.cjs +1 -0
- package/dist/components/DiffViewer/DiffViewer.const.d.ts +18 -0
- package/dist/components/DiffViewer/DiffViewer.const.js +21 -0
- package/dist/components/DiffViewer/DiffViewer.d.ts +18 -0
- package/dist/components/DiffViewer/DiffViewer.js +127 -0
- package/dist/components/DiffViewer/DiffViewer.types.d.ts +40 -0
- package/dist/components/DiffViewer/DiffViewer.utils.cjs +3 -0
- package/dist/components/DiffViewer/DiffViewer.utils.d.ts +9 -0
- package/dist/components/DiffViewer/DiffViewer.utils.js +39 -0
- package/dist/components/DiffViewer/index.d.ts +2 -0
- package/dist/components/Divider/Divider.cjs +1 -1
- package/dist/components/Divider/Divider.js +15 -14
- package/dist/components/Dock/Dock.cjs +1 -0
- package/dist/components/Dock/Dock.const.cjs +1 -0
- package/dist/components/Dock/Dock.const.d.ts +25 -0
- package/dist/components/Dock/Dock.const.js +22 -0
- package/dist/components/Dock/Dock.d.ts +7 -0
- package/dist/components/Dock/Dock.js +144 -0
- package/dist/components/Dock/Dock.types.d.ts +42 -0
- package/dist/components/Dock/index.d.ts +2 -0
- package/dist/components/Drawer/Drawer.cjs +1 -1
- package/dist/components/Drawer/Drawer.js +35 -35
- package/dist/components/EmptyState/EmptyState.cjs +1 -1
- package/dist/components/EmptyState/EmptyState.js +7 -6
- package/dist/components/FloatingChat/FloatingChat.cjs +1 -0
- package/dist/components/FloatingChat/FloatingChat.const.cjs +1 -0
- package/dist/components/FloatingChat/FloatingChat.const.d.ts +12 -0
- package/dist/components/FloatingChat/FloatingChat.const.js +15 -0
- package/dist/components/FloatingChat/FloatingChat.d.ts +19 -0
- package/dist/components/FloatingChat/FloatingChat.js +144 -0
- package/dist/components/FloatingChat/FloatingChat.types.d.ts +44 -0
- package/dist/components/FloatingChat/index.d.ts +2 -0
- package/dist/components/GradientText/GradientText.cjs +1 -0
- package/dist/components/GradientText/GradientText.const.cjs +1 -0
- package/dist/components/GradientText/GradientText.const.d.ts +15 -0
- package/dist/components/GradientText/GradientText.const.js +36 -0
- package/dist/components/GradientText/GradientText.d.ts +7 -0
- package/dist/components/GradientText/GradientText.js +52 -0
- package/dist/components/GradientText/GradientText.types.d.ts +27 -0
- package/dist/components/GradientText/index.d.ts +2 -0
- package/dist/components/Highlight/Highlight.cjs +1 -1
- package/dist/components/Highlight/Highlight.const.cjs +1 -0
- package/dist/components/Highlight/Highlight.const.d.ts +8 -0
- package/dist/components/Highlight/Highlight.const.js +15 -0
- package/dist/components/Highlight/Highlight.d.ts +4 -0
- package/dist/components/Highlight/Highlight.js +32 -24
- package/dist/components/Highlight/Highlight.types.d.ts +9 -1
- package/dist/components/Highlight/index.d.ts +1 -1
- package/dist/components/Icon/Icon.cjs +1 -1
- package/dist/components/Icon/Icon.js +17 -16
- package/dist/components/Icon/index.cjs +1 -1
- package/dist/components/Icon/index.js +12 -11
- package/dist/components/JsonViewer/JsonViewer.cjs +1 -0
- package/dist/components/JsonViewer/JsonViewer.const.cjs +1 -0
- package/dist/components/JsonViewer/JsonViewer.const.d.ts +4 -0
- package/dist/components/JsonViewer/JsonViewer.const.js +24 -0
- package/dist/components/JsonViewer/JsonViewer.d.ts +17 -0
- package/dist/components/JsonViewer/JsonViewer.js +195 -0
- package/dist/components/JsonViewer/JsonViewer.types.d.ts +54 -0
- package/dist/components/JsonViewer/index.d.ts +2 -0
- package/dist/components/Kanban/Kanban.cjs +1 -1
- package/dist/components/Kanban/Kanban.js +18 -17
- package/dist/components/Kbd/Kbd.cjs +1 -1
- package/dist/components/Kbd/Kbd.js +17 -16
- package/dist/components/Map/Map.cjs +1 -0
- package/dist/components/Map/Map.const.cjs +1 -0
- package/dist/components/Map/Map.const.d.ts +20 -0
- package/dist/components/Map/Map.const.js +26 -0
- package/dist/components/Map/Map.d.ts +20 -0
- package/dist/components/Map/Map.js +259 -0
- package/dist/components/Map/Map.types.d.ts +81 -0
- package/dist/components/Map/index.d.ts +2 -0
- package/dist/components/Marquee/Marquee.cjs +1 -0
- package/dist/components/Marquee/Marquee.const.cjs +1 -0
- package/dist/components/Marquee/Marquee.const.d.ts +11 -0
- package/dist/components/Marquee/Marquee.const.js +12 -0
- package/dist/components/Marquee/Marquee.d.ts +7 -0
- package/dist/components/Marquee/Marquee.js +106 -0
- package/dist/components/Marquee/Marquee.types.d.ts +32 -0
- package/dist/components/Marquee/index.d.ts +2 -0
- package/dist/components/Masonry/Masonry.cjs +1 -0
- package/dist/components/Masonry/Masonry.const.cjs +1 -0
- package/dist/components/Masonry/Masonry.const.d.ts +9 -0
- package/dist/components/Masonry/Masonry.const.js +9 -0
- package/dist/components/Masonry/Masonry.d.ts +7 -0
- package/dist/components/Masonry/Masonry.js +51 -0
- package/dist/components/Masonry/Masonry.types.d.ts +21 -0
- package/dist/components/Masonry/index.d.ts +2 -0
- package/dist/components/NavigableSelect/NavigableSelect.cjs +1 -0
- package/dist/components/NavigableSelect/NavigableSelect.const.cjs +1 -0
- package/dist/components/NavigableSelect/NavigableSelect.const.d.ts +23 -0
- package/dist/components/NavigableSelect/NavigableSelect.const.js +33 -0
- package/dist/components/NavigableSelect/NavigableSelect.d.ts +7 -0
- package/dist/components/NavigableSelect/NavigableSelect.js +361 -0
- package/dist/components/NavigableSelect/NavigableSelect.types.d.ts +56 -0
- package/dist/components/NavigableSelect/index.d.ts +2 -0
- package/dist/components/Progress/Progress.cjs +1 -1
- package/dist/components/Progress/Progress.js +3 -2
- package/dist/components/QRCode/QRCode.cjs +1 -0
- package/dist/components/QRCode/QRCode.const.cjs +1 -0
- package/dist/components/QRCode/QRCode.const.d.ts +21 -0
- package/dist/components/QRCode/QRCode.const.js +11 -0
- package/dist/components/QRCode/QRCode.d.ts +29 -0
- package/dist/components/QRCode/QRCode.js +68 -0
- package/dist/components/QRCode/QRCode.types.d.ts +32 -0
- package/dist/components/QRCode/QRCode.utils.cjs +1 -0
- package/dist/components/QRCode/QRCode.utils.d.ts +12 -0
- package/dist/components/QRCode/QRCode.utils.js +74 -0
- package/dist/components/QRCode/index.d.ts +3 -0
- package/dist/components/RichEditor/components/ToolbarButton/ToolbarButton.cjs +1 -1
- package/dist/components/RichEditor/components/ToolbarButton/ToolbarButton.js +3 -2
- package/dist/components/ScrollArea/ScrollArea.cjs +1 -1
- package/dist/components/ScrollArea/ScrollArea.js +3 -2
- package/dist/components/Sidebar/Sidebar.cjs +1 -1
- package/dist/components/Sidebar/Sidebar.js +13 -12
- package/dist/components/Spinner/Spinner.cjs +1 -1
- package/dist/components/Spinner/Spinner.js +3 -2
- package/dist/components/Spinner/Spinner.types.d.ts +2 -2
- package/dist/components/Spotlight/Spotlight.cjs +1 -0
- package/dist/components/Spotlight/Spotlight.const.cjs +1 -0
- package/dist/components/Spotlight/Spotlight.const.d.ts +18 -0
- package/dist/components/Spotlight/Spotlight.const.js +9 -0
- package/dist/components/Spotlight/Spotlight.d.ts +7 -0
- package/dist/components/Spotlight/Spotlight.js +220 -0
- package/dist/components/Spotlight/Spotlight.types.d.ts +51 -0
- package/dist/components/Spotlight/index.d.ts +2 -0
- package/dist/components/StatCard/StatCard.cjs +1 -1
- package/dist/components/StatCard/StatCard.js +9 -8
- package/dist/components/Statistic/Statistic.cjs +1 -1
- package/dist/components/Statistic/Statistic.js +7 -6
- package/dist/components/Switch/Switch.cjs +1 -1
- package/dist/components/Switch/Switch.js +11 -10
- package/dist/components/Terminal/Terminal.cjs +1 -0
- package/dist/components/Terminal/Terminal.const.cjs +1 -0
- package/dist/components/Terminal/Terminal.const.d.ts +32 -0
- package/dist/components/Terminal/Terminal.const.js +42 -0
- package/dist/components/Terminal/Terminal.d.ts +27 -0
- package/dist/components/Terminal/Terminal.js +155 -0
- package/dist/components/Terminal/Terminal.types.d.ts +49 -0
- package/dist/components/Terminal/index.d.ts +2 -0
- package/dist/components/TimePicker/components/TimePickerColumnsDropdown/TimePickerColumnsDropdown.cjs +1 -1
- package/dist/components/TimePicker/components/TimePickerColumnsDropdown/TimePickerColumnsDropdown.js +16 -15
- package/dist/components/TimePicker/helpers/ClockFaceSvg.cjs +1 -1
- package/dist/components/TimePicker/helpers/ClockFaceSvg.js +13 -12
- package/dist/components/Tour/Tour.cjs +1 -0
- package/dist/components/Tour/Tour.const.cjs +1 -0
- package/dist/components/Tour/Tour.const.d.ts +25 -0
- package/dist/components/Tour/Tour.const.js +38 -0
- package/dist/components/Tour/Tour.d.ts +17 -0
- package/dist/components/Tour/Tour.js +179 -0
- package/dist/components/Tour/Tour.types.d.ts +80 -0
- package/dist/components/Tour/index.d.ts +4 -0
- package/dist/components/Tour/useTour.cjs +1 -0
- package/dist/components/Tour/useTour.d.ts +14 -0
- package/dist/components/Tour/useTour.js +27 -0
- package/dist/components/Transition/Transition.cjs +1 -0
- package/dist/components/Transition/Transition.const.cjs +1 -0
- package/dist/components/Transition/Transition.const.d.ts +15 -0
- package/dist/components/Transition/Transition.const.js +73 -0
- package/dist/components/Transition/Transition.d.ts +37 -0
- package/dist/components/Transition/Transition.js +107 -0
- package/dist/components/Transition/Transition.types.d.ts +69 -0
- package/dist/components/Transition/index.d.ts +2 -0
- package/dist/components/Typewriter/Typewriter.cjs +1 -0
- package/dist/components/Typewriter/Typewriter.const.cjs +1 -0
- package/dist/components/Typewriter/Typewriter.const.d.ts +22 -0
- package/dist/components/Typewriter/Typewriter.const.js +11 -0
- package/dist/components/Typewriter/Typewriter.d.ts +7 -0
- package/dist/components/Typewriter/Typewriter.js +88 -0
- package/dist/components/Typewriter/Typewriter.types.d.ts +32 -0
- package/dist/components/Typewriter/index.d.ts +2 -0
- package/dist/components/Typography/Typography.cjs +1 -1
- package/dist/components/Typography/Typography.d.ts +5 -1
- package/dist/components/Typography/Typography.js +93 -57
- package/dist/components/Typography/Typography.types.d.ts +29 -2
- package/dist/components/Watermark/Watermark.cjs +1 -0
- package/dist/components/Watermark/Watermark.const.cjs +1 -0
- package/dist/components/Watermark/Watermark.const.d.ts +30 -0
- package/dist/components/Watermark/Watermark.const.js +18 -0
- package/dist/components/Watermark/Watermark.d.ts +7 -0
- package/dist/components/Watermark/Watermark.js +96 -0
- package/dist/components/Watermark/Watermark.types.d.ts +35 -0
- package/dist/components/Watermark/index.d.ts +2 -0
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.d.ts +46 -2
- package/dist/components/index.js +288 -237
- package/dist/context/BearProvider.cjs +1 -1
- package/dist/context/BearProvider.d.ts +110 -5
- package/dist/context/BearProvider.js +198 -53
- package/dist/context/defaultTheme.cjs +1 -1
- package/dist/context/defaultTheme.js +11 -11
- package/dist/hooks/index.cjs +1 -1
- package/dist/hooks/index.d.ts +18 -0
- package/dist/hooks/index.js +61 -39
- package/dist/hooks/useAnimate.cjs +1 -0
- package/dist/hooks/useAnimate.d.ts +61 -0
- package/dist/hooks/useAnimate.js +125 -0
- package/dist/hooks/useBearComponent/index.d.ts +2 -0
- package/dist/hooks/useBearComponent/useBearComponent.cjs +1 -0
- package/dist/hooks/useBearComponent/useBearComponent.d.ts +71 -0
- package/dist/hooks/useBearComponent/useBearComponent.js +54 -0
- package/dist/hooks/useBearComponent/useBearComponent.types.d.ts +40 -0
- package/dist/hooks/useIdle/index.d.ts +2 -0
- package/dist/hooks/useIdle/useIdle.cjs +1 -0
- package/dist/hooks/useIdle/useIdle.d.ts +22 -0
- package/dist/hooks/useIdle/useIdle.js +66 -0
- package/dist/hooks/useIdle/useIdle.types.d.ts +29 -0
- package/dist/hooks/useLongPress/index.d.ts +2 -0
- package/dist/hooks/useLongPress/useLongPress.cjs +1 -0
- package/dist/hooks/useLongPress/useLongPress.d.ts +17 -0
- package/dist/hooks/useLongPress/useLongPress.js +44 -0
- package/dist/hooks/useLongPress/useLongPress.types.d.ts +26 -0
- package/dist/hooks/useOnline/index.d.ts +2 -0
- package/dist/hooks/useOnline/useOnline.cjs +1 -0
- package/dist/hooks/useOnline/useOnline.d.ts +16 -0
- package/dist/hooks/useOnline/useOnline.js +25 -0
- package/dist/hooks/useOnline/useOnline.types.d.ts +15 -0
- package/dist/hooks/usePageVisibility/index.d.ts +2 -0
- package/dist/hooks/usePageVisibility/usePageVisibility.cjs +1 -0
- package/dist/hooks/usePageVisibility/usePageVisibility.d.ts +19 -0
- package/dist/hooks/usePageVisibility/usePageVisibility.js +26 -0
- package/dist/hooks/usePageVisibility/usePageVisibility.types.d.ts +15 -0
- package/dist/hooks/useResponsive.cjs +1 -0
- package/dist/hooks/useResponsive.d.ts +35 -0
- package/dist/hooks/useResponsive.js +74 -0
- package/dist/hooks/useSpotlight/index.d.ts +2 -0
- package/dist/hooks/useSpotlight/useSpotlight.cjs +1 -0
- package/dist/hooks/useSpotlight/useSpotlight.d.ts +24 -0
- package/dist/hooks/useSpotlight/useSpotlight.js +49 -0
- package/dist/hooks/useSpotlight/useSpotlight.types.d.ts +23 -0
- package/dist/hooks/useWebSocket/index.d.ts +2 -0
- package/dist/hooks/useWebSocket/useWebSocket.cjs +1 -0
- package/dist/hooks/useWebSocket/useWebSocket.d.ts +22 -0
- package/dist/hooks/useWebSocket/useWebSocket.js +75 -0
- package/dist/hooks/useWebSocket/useWebSocket.types.d.ts +44 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +363 -288
- package/dist/styles.css +1 -1
- package/dist/types/component.types.d.ts +125 -42
- package/dist/types/theme.types.d.ts +82 -0
- package/dist/utils/createSlots.cjs +1 -0
- package/dist/utils/createSlots.d.ts +70 -0
- package/dist/utils/createSlots.js +65 -0
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +4 -2
- package/package.json +1 -1
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { jsxs as r, jsx as t, Fragment as z } from "react/jsx-runtime";
|
|
2
|
+
import { useState as u, useRef as I, useEffect as G, useCallback as y } from "react";
|
|
3
|
+
import { cn as O } from "../../utils/cn.js";
|
|
4
|
+
import { Typography as W } from "../Typography/Typography.js";
|
|
5
|
+
import { Spinner as Y } from "../Spinner/Spinner.js";
|
|
6
|
+
import { TERMINAL_DEFAULTS as p, TERMINAL_THEMES as q, LINE_TYPE_COLORS as J } from "./Terminal.const.js";
|
|
7
|
+
const se = ({
|
|
8
|
+
lines: x,
|
|
9
|
+
onCommand: m,
|
|
10
|
+
cwd: C = p.CWD,
|
|
11
|
+
user: H = p.USER,
|
|
12
|
+
host: S = p.HOST,
|
|
13
|
+
prompt: g,
|
|
14
|
+
title: D = p.TITLE,
|
|
15
|
+
showHeader: N = !0,
|
|
16
|
+
showLineNumbers: L = !1,
|
|
17
|
+
showTimestamps: R = !1,
|
|
18
|
+
readOnly: f = !1,
|
|
19
|
+
height: h = p.HEIGHT,
|
|
20
|
+
theme: A = "dark",
|
|
21
|
+
history: M,
|
|
22
|
+
onHistoryChange: _,
|
|
23
|
+
autoScroll: v = !0,
|
|
24
|
+
className: $,
|
|
25
|
+
testId: K,
|
|
26
|
+
isLoading: b = !1
|
|
27
|
+
}) => {
|
|
28
|
+
const l = q[A], [o, a] = u(""), [c, i] = u(-1), [U, j] = u([]), n = M ?? U, w = _ ?? j, T = I(null), d = I(null);
|
|
29
|
+
G(() => {
|
|
30
|
+
v && d.current && (d.current.scrollTop = d.current.scrollHeight);
|
|
31
|
+
}, [x, v]);
|
|
32
|
+
const B = y(() => {
|
|
33
|
+
var e;
|
|
34
|
+
f || (e = T.current) == null || e.focus();
|
|
35
|
+
}, [f]), E = y(() => {
|
|
36
|
+
o.trim() && m && (m(o.trim()), w([...n, o.trim()]), i(-1), a(""));
|
|
37
|
+
}, [o, m, n, w]), F = y((e) => {
|
|
38
|
+
if (e.key === "Enter")
|
|
39
|
+
E();
|
|
40
|
+
else if (e.key === "ArrowUp") {
|
|
41
|
+
if (e.preventDefault(), n.length > 0) {
|
|
42
|
+
const s = c === -1 ? n.length - 1 : Math.max(0, c - 1);
|
|
43
|
+
i(s), a(n[s]);
|
|
44
|
+
}
|
|
45
|
+
} else if (e.key === "ArrowDown") {
|
|
46
|
+
if (e.preventDefault(), c !== -1) {
|
|
47
|
+
const s = c + 1;
|
|
48
|
+
s >= n.length ? (i(-1), a("")) : (i(s), a(n[s]));
|
|
49
|
+
}
|
|
50
|
+
} else e.key === "c" && e.ctrlKey && (a(""), i(-1));
|
|
51
|
+
}, [E, n, c]), k = () => g || /* @__PURE__ */ r(z, { children: [
|
|
52
|
+
/* @__PURE__ */ r("span", { style: { color: l.prompt }, children: [
|
|
53
|
+
H,
|
|
54
|
+
"@",
|
|
55
|
+
S
|
|
56
|
+
] }),
|
|
57
|
+
/* @__PURE__ */ t("span", { className: "opacity-50", children: ":" }),
|
|
58
|
+
/* @__PURE__ */ t("span", { className: "text-blue-400", children: C }),
|
|
59
|
+
/* @__PURE__ */ t("span", { className: "opacity-50", children: "$" })
|
|
60
|
+
] }), P = (e, s) => {
|
|
61
|
+
const V = J[e.type];
|
|
62
|
+
return /* @__PURE__ */ r(
|
|
63
|
+
"div",
|
|
64
|
+
{
|
|
65
|
+
className: "flex gap-2 py-0.5 hover:bg-white/5",
|
|
66
|
+
children: [
|
|
67
|
+
L && /* @__PURE__ */ t("span", { className: "opacity-30 w-8 text-right select-none", children: s + 1 }),
|
|
68
|
+
R && e.timestamp && /* @__PURE__ */ r("span", { className: "opacity-30 select-none", children: [
|
|
69
|
+
"[",
|
|
70
|
+
e.timestamp.toLocaleTimeString(),
|
|
71
|
+
"]"
|
|
72
|
+
] }),
|
|
73
|
+
e.type === "input" ? /* @__PURE__ */ r("div", { className: "flex gap-2", children: [
|
|
74
|
+
/* @__PURE__ */ t("span", { className: "flex gap-1 select-none", children: e.prefix || k() }),
|
|
75
|
+
/* @__PURE__ */ t("span", { children: e.content })
|
|
76
|
+
] }) : /* @__PURE__ */ t("span", { style: { color: V }, children: e.content })
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
e.id
|
|
80
|
+
);
|
|
81
|
+
};
|
|
82
|
+
return /* @__PURE__ */ r(
|
|
83
|
+
"div",
|
|
84
|
+
{
|
|
85
|
+
className: O(
|
|
86
|
+
"Bear-Terminal",
|
|
87
|
+
"rounded-lg overflow-hidden font-mono text-sm",
|
|
88
|
+
$
|
|
89
|
+
),
|
|
90
|
+
style: {
|
|
91
|
+
backgroundColor: l.bg,
|
|
92
|
+
color: l.text,
|
|
93
|
+
border: `1px solid ${l.border}`,
|
|
94
|
+
height: typeof h == "number" ? `${h}px` : h
|
|
95
|
+
},
|
|
96
|
+
"data-testid": K,
|
|
97
|
+
onClick: B,
|
|
98
|
+
children: [
|
|
99
|
+
N && /* @__PURE__ */ r(
|
|
100
|
+
"div",
|
|
101
|
+
{
|
|
102
|
+
className: "flex items-center gap-2 px-4 py-2",
|
|
103
|
+
style: { backgroundColor: l.header, borderBottom: `1px solid ${l.border}` },
|
|
104
|
+
children: [
|
|
105
|
+
/* @__PURE__ */ r("div", { className: "flex gap-1.5", children: [
|
|
106
|
+
/* @__PURE__ */ t("div", { className: "w-3 h-3 rounded-full bg-red-500" }),
|
|
107
|
+
/* @__PURE__ */ t("div", { className: "w-3 h-3 rounded-full bg-yellow-500" }),
|
|
108
|
+
/* @__PURE__ */ t("div", { className: "w-3 h-3 rounded-full bg-green-500" })
|
|
109
|
+
] }),
|
|
110
|
+
/* @__PURE__ */ t(W, { variant: "caption", className: "flex-1 text-center opacity-60", children: D }),
|
|
111
|
+
/* @__PURE__ */ t("div", { className: "w-14" }),
|
|
112
|
+
" "
|
|
113
|
+
]
|
|
114
|
+
}
|
|
115
|
+
),
|
|
116
|
+
/* @__PURE__ */ r(
|
|
117
|
+
"div",
|
|
118
|
+
{
|
|
119
|
+
ref: d,
|
|
120
|
+
className: "overflow-y-auto p-4",
|
|
121
|
+
style: { height: N ? "calc(100% - 40px)" : "100%" },
|
|
122
|
+
children: [
|
|
123
|
+
x.map((e, s) => P(e, s)),
|
|
124
|
+
b && /* @__PURE__ */ r("div", { className: "flex items-center gap-2 py-0.5", children: [
|
|
125
|
+
/* @__PURE__ */ t(Y, { size: "sm" }),
|
|
126
|
+
/* @__PURE__ */ t("span", { className: "opacity-50", children: "Processing..." })
|
|
127
|
+
] }),
|
|
128
|
+
!f && /* @__PURE__ */ r("div", { className: "flex gap-2 py-0.5", children: [
|
|
129
|
+
/* @__PURE__ */ t("span", { className: "flex gap-1 select-none", children: k() }),
|
|
130
|
+
/* @__PURE__ */ t(
|
|
131
|
+
"input",
|
|
132
|
+
{
|
|
133
|
+
ref: T,
|
|
134
|
+
type: "text",
|
|
135
|
+
value: o,
|
|
136
|
+
onChange: (e) => a(e.target.value),
|
|
137
|
+
onKeyDown: F,
|
|
138
|
+
className: "flex-1 bg-transparent outline-none caret-current",
|
|
139
|
+
style: { color: "inherit" },
|
|
140
|
+
autoComplete: "off",
|
|
141
|
+
spellCheck: !1,
|
|
142
|
+
disabled: b
|
|
143
|
+
}
|
|
144
|
+
)
|
|
145
|
+
] })
|
|
146
|
+
]
|
|
147
|
+
}
|
|
148
|
+
)
|
|
149
|
+
]
|
|
150
|
+
}
|
|
151
|
+
);
|
|
152
|
+
};
|
|
153
|
+
export {
|
|
154
|
+
se as Terminal
|
|
155
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type TerminalLineType = 'input' | 'output' | 'error' | 'success' | 'warning' | 'info' | 'system';
|
|
3
|
+
export interface TerminalLine {
|
|
4
|
+
id: string;
|
|
5
|
+
type: TerminalLineType;
|
|
6
|
+
content: string | ReactNode;
|
|
7
|
+
timestamp?: Date;
|
|
8
|
+
prefix?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface TerminalProps {
|
|
11
|
+
/** Array of terminal lines */
|
|
12
|
+
lines: TerminalLine[];
|
|
13
|
+
/** Callback when user submits a command */
|
|
14
|
+
onCommand?: (command: string) => void;
|
|
15
|
+
/** Current working directory to display */
|
|
16
|
+
cwd?: string;
|
|
17
|
+
/** Username to display */
|
|
18
|
+
user?: string;
|
|
19
|
+
/** Hostname to display */
|
|
20
|
+
host?: string;
|
|
21
|
+
/** Shell prompt prefix (overrides user@host) */
|
|
22
|
+
prompt?: string | ReactNode;
|
|
23
|
+
/** Title in the header */
|
|
24
|
+
title?: string;
|
|
25
|
+
/** Show header with controls */
|
|
26
|
+
showHeader?: boolean;
|
|
27
|
+
/** Show line numbers */
|
|
28
|
+
showLineNumbers?: boolean;
|
|
29
|
+
/** Show timestamps */
|
|
30
|
+
showTimestamps?: boolean;
|
|
31
|
+
/** Read-only mode (no input) */
|
|
32
|
+
readOnly?: boolean;
|
|
33
|
+
/** Height of the terminal */
|
|
34
|
+
height?: number | string;
|
|
35
|
+
/** Theme variant */
|
|
36
|
+
theme?: 'dark' | 'light' | 'matrix';
|
|
37
|
+
/** Command history */
|
|
38
|
+
history?: string[];
|
|
39
|
+
/** Callback when history changes */
|
|
40
|
+
onHistoryChange?: (history: string[]) => void;
|
|
41
|
+
/** Auto-scroll to bottom */
|
|
42
|
+
autoScroll?: boolean;
|
|
43
|
+
/** Custom class name */
|
|
44
|
+
className?: string;
|
|
45
|
+
/** Test ID */
|
|
46
|
+
testId?: string;
|
|
47
|
+
/** Loading state */
|
|
48
|
+
isLoading?: boolean;
|
|
49
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),i=require("../../../../utils/cn.cjs")
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),i=require("../../../../utils/cn.cjs");require("react");const e=require("../../TimePicker.constants.cjs"),O=({selectedHour:r,setSelectedHour:I,selectedMinute:_,setSelectedMinute:a,period:l,setPeriod:C,format:T,hours:n,minutes:N,timeValue:P,clearable:d,onChange:S,onConfirm:t,onClose:m,translations:A})=>{const c={...e.TIMEPICKER_DEFAULT_TRANSLATIONS,...A};return s.jsxs("div",{className:e.TIMEPICKER_DROPDOWN_CLASSES,children:[s.jsxs("div",{className:"Bear-TimePicker__columns bear-flex bear-gap-2 bear-mb-3",children:[s.jsxs("div",{className:"Bear-TimePicker__column bear-flex-1",children:[s.jsx("div",{className:e.TIMEPICKER_COLUMN_HEADER_CLASSES,children:c.hour}),s.jsx("div",{className:e.TIMEPICKER_COLUMN_CLASSES,children:n.map(E=>s.jsx("button",{onClick:()=>I(E),className:i.cn(e.TIMEPICKER_OPTION_CLASSES,r===E?e.TIMEPICKER_OPTION_ACTIVE_CLASSES:e.TIMEPICKER_OPTION_INACTIVE_CLASSES),children:E.toString().padStart(2,"0")},E))})]}),s.jsxs("div",{className:"Bear-TimePicker__column bear-flex-1",children:[s.jsx("div",{className:e.TIMEPICKER_COLUMN_HEADER_CLASSES,children:c.minute}),s.jsx("div",{className:e.TIMEPICKER_COLUMN_CLASSES,children:N.map(E=>s.jsx("button",{onClick:()=>a(E),className:i.cn(e.TIMEPICKER_OPTION_CLASSES,_===E?e.TIMEPICKER_OPTION_ACTIVE_CLASSES:e.TIMEPICKER_OPTION_INACTIVE_CLASSES),children:E.toString().padStart(2,"0")},E))})]}),T==="12h"&&s.jsxs("div",{className:"Bear-TimePicker__column bear-flex-1",children:[s.jsx("div",{className:e.TIMEPICKER_COLUMN_HEADER_CLASSES,children:c.period}),s.jsx("div",{className:"bear-space-y-1",children:["AM","PM"].map(E=>s.jsx("button",{onClick:()=>C(E),className:i.cn(e.TIMEPICKER_OPTION_CLASSES,"bear-py-2",l===E?e.TIMEPICKER_OPTION_ACTIVE_CLASSES:e.TIMEPICKER_OPTION_INACTIVE_CLASSES),children:E},E))})]})]}),s.jsxs("div",{className:e.TIMEPICKER_FOOTER_CLASSES,children:[d&&P&&s.jsx("button",{onClick:()=>{S==null||S(null),m()},className:e.TIMEPICKER_CLEAR_BUTTON_CLASSES,children:c.cancel}),s.jsx("button",{onClick:t,className:e.TIMEPICKER_CONFIRM_BUTTON_CLASSES,children:c.ok})]})]})};exports.TimePickerColumnsDropdown=O;
|
package/dist/components/TimePicker/components/TimePickerColumnsDropdown/TimePickerColumnsDropdown.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { jsxs as a, jsx as c } from "react/jsx-runtime";
|
|
2
2
|
import { cn as r } from "../../../../utils/cn.js";
|
|
3
|
-
import
|
|
4
|
-
|
|
3
|
+
import "react";
|
|
4
|
+
import { TIMEPICKER_DROPDOWN_CLASSES as u, TIMEPICKER_DEFAULT_TRANSLATIONS as L, TIMEPICKER_COLUMN_HEADER_CLASSES as s, TIMEPICKER_COLUMN_CLASSES as d, TIMEPICKER_OPTION_ACTIVE_CLASSES as m, TIMEPICKER_OPTION_INACTIVE_CLASSES as E, TIMEPICKER_OPTION_CLASSES as n, TIMEPICKER_FOOTER_CLASSES as h, TIMEPICKER_CLEAR_BUTTON_CLASSES as p, TIMEPICKER_CONFIRM_BUTTON_CLASSES as v } from "../../TimePicker.constants.js";
|
|
5
|
+
const B = ({
|
|
5
6
|
selectedHour: S,
|
|
6
7
|
setSelectedHour: _,
|
|
7
8
|
selectedMinute: N,
|
|
8
|
-
setSelectedMinute:
|
|
9
|
-
period:
|
|
10
|
-
setPeriod:
|
|
11
|
-
format:
|
|
9
|
+
setSelectedMinute: o,
|
|
10
|
+
period: t,
|
|
11
|
+
setPeriod: I,
|
|
12
|
+
format: T,
|
|
12
13
|
hours: C,
|
|
13
14
|
minutes: P,
|
|
14
15
|
timeValue: A,
|
|
@@ -29,7 +30,7 @@ const x = ({
|
|
|
29
30
|
onClick: () => _(e),
|
|
30
31
|
className: r(
|
|
31
32
|
n,
|
|
32
|
-
S === e ?
|
|
33
|
+
S === e ? m : E
|
|
33
34
|
),
|
|
34
35
|
children: e.toString().padStart(2, "0")
|
|
35
36
|
},
|
|
@@ -41,26 +42,26 @@ const x = ({
|
|
|
41
42
|
/* @__PURE__ */ c("div", { className: d, children: P.map((e) => /* @__PURE__ */ c(
|
|
42
43
|
"button",
|
|
43
44
|
{
|
|
44
|
-
onClick: () =>
|
|
45
|
+
onClick: () => o(e),
|
|
45
46
|
className: r(
|
|
46
47
|
n,
|
|
47
|
-
N === e ?
|
|
48
|
+
N === e ? m : E
|
|
48
49
|
),
|
|
49
50
|
children: e.toString().padStart(2, "0")
|
|
50
51
|
},
|
|
51
52
|
e
|
|
52
53
|
)) })
|
|
53
54
|
] }),
|
|
54
|
-
|
|
55
|
+
T === "12h" && /* @__PURE__ */ a("div", { className: "Bear-TimePicker__column bear-flex-1", children: [
|
|
55
56
|
/* @__PURE__ */ c("div", { className: s, children: i.period }),
|
|
56
57
|
/* @__PURE__ */ c("div", { className: "bear-space-y-1", children: ["AM", "PM"].map((e) => /* @__PURE__ */ c(
|
|
57
58
|
"button",
|
|
58
59
|
{
|
|
59
|
-
onClick: () =>
|
|
60
|
+
onClick: () => I(e),
|
|
60
61
|
className: r(
|
|
61
62
|
n,
|
|
62
63
|
"bear-py-2",
|
|
63
|
-
|
|
64
|
+
t === e ? m : E
|
|
64
65
|
),
|
|
65
66
|
children: e
|
|
66
67
|
},
|
|
@@ -71,11 +72,11 @@ const x = ({
|
|
|
71
72
|
/* @__PURE__ */ a("div", { className: h, children: [
|
|
72
73
|
O && A && /* @__PURE__ */ c("button", { onClick: () => {
|
|
73
74
|
l == null || l(null), M();
|
|
74
|
-
}, className:
|
|
75
|
-
/* @__PURE__ */ c("button", { onClick: R, className:
|
|
75
|
+
}, className: p, children: i.cancel }),
|
|
76
|
+
/* @__PURE__ */ c("button", { onClick: R, className: v, children: i.ok })
|
|
76
77
|
] })
|
|
77
78
|
] });
|
|
78
79
|
};
|
|
79
80
|
export {
|
|
80
|
-
|
|
81
|
+
B as TimePickerColumnsDropdown
|
|
81
82
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),m=require("../../../utils/cn.cjs");require("react");const e=require("../TimePicker.constants.cjs"),E=({values:t,isHourMode:n,format:i,selectedHour:r,selectedMinute:l,onSelect:b,className:h})=>{const f=c=>n?(c*30-90)*(Math.PI/180):(c*(360/t.length)-90)*(Math.PI/180),s=(n?(i==="12h"?r===12?0:r%12:r)*30-90:l*6-90)*Math.PI/180;return a.jsxs("svg",{viewBox:"0 0 200 200",className:m.cn("Bear-TimePicker__clock-face bear-w-full bear-h-full",h),children:[a.jsx("circle",{cx:e.CLOCK_CENTER,cy:e.CLOCK_CENTER,r:e.CLOCK_RADIUS,className:"Bear-TimePicker__clock-face-circle bear-fill-none bear-stroke-gray-200 dark:bear-stroke-zinc-700 bear-stroke-2"}),t.map((c,x)=>{const C=f(x),o=e.CLOCK_CENTER+e.CLOCK_RADIUS*.85*Math.cos(C),_=e.CLOCK_CENTER+e.CLOCK_RADIUS*.85*Math.sin(C),k=n?i==="12h"?c===12?r===12:r%12===c:r===c:l===c;return a.jsxs("g",{onClick:()=>b(c),className:"Bear-TimePicker__clock-face-item bear-cursor-pointer",children:[k&&a.jsx("circle",{cx:o,cy:_,r:14,className:"Bear-TimePicker__clock-face-dot bear-fill-blue-500"}),a.jsx("text",{x:o,y:_,textAnchor:"middle",dominantBaseline:"middle",className:m.cn("Bear-TimePicker__clock-face-text bear-text-sm bear-font-medium bear-pointer-events-none",k?"bear-fill-white":"bear-fill-gray-700 dark:bear-fill-zinc-300"),children:typeof c=="number"?c.toString().padStart(2,"0"):c})]},c)}),a.jsx("line",{x1:e.CLOCK_CENTER,y1:e.CLOCK_CENTER,x2:e.CLOCK_CENTER+e.CLOCK_RADIUS*.6*Math.cos(s),y2:e.CLOCK_CENTER+e.CLOCK_RADIUS*.6*Math.sin(s),className:"Bear-TimePicker__clock-face-hand bear-stroke-blue-500 bear-stroke-2",strokeLinecap:"round"})]})};exports.ClockFaceSvg=E;
|
|
@@ -1,28 +1,29 @@
|
|
|
1
1
|
import { jsxs as f, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { cn as _ } from "../../../utils/cn.js";
|
|
3
|
-
import
|
|
4
|
-
|
|
3
|
+
import "react";
|
|
4
|
+
import { CLOCK_RADIUS as c, CLOCK_CENTER as r } from "../TimePicker.constants.js";
|
|
5
|
+
const T = ({
|
|
5
6
|
values: i,
|
|
6
7
|
isHourMode: t,
|
|
7
8
|
format: l,
|
|
8
|
-
selectedHour:
|
|
9
|
+
selectedHour: a,
|
|
9
10
|
selectedMinute: o,
|
|
10
11
|
onSelect: g,
|
|
11
12
|
className: x
|
|
12
13
|
}) => {
|
|
13
|
-
const d = (e) => t ? (e * 30 - 90) * (Math.PI / 180) : (e * (360 / i.length) - 90) * (Math.PI / 180), s = (t ? (l === "12h" ?
|
|
14
|
+
const d = (e) => t ? (e * 30 - 90) * (Math.PI / 180) : (e * (360 / i.length) - 90) * (Math.PI / 180), s = (t ? (l === "12h" ? a === 12 ? 0 : a % 12 : a) * 30 - 90 : o * 6 - 90) * Math.PI / 180;
|
|
14
15
|
return /* @__PURE__ */ f("svg", { viewBox: "0 0 200 200", className: _("Bear-TimePicker__clock-face bear-w-full bear-h-full", x), children: [
|
|
15
16
|
/* @__PURE__ */ n(
|
|
16
17
|
"circle",
|
|
17
18
|
{
|
|
18
|
-
cx:
|
|
19
|
-
cy:
|
|
19
|
+
cx: r,
|
|
20
|
+
cy: r,
|
|
20
21
|
r: c,
|
|
21
22
|
className: "Bear-TimePicker__clock-face-circle bear-fill-none bear-stroke-gray-200 dark:bear-stroke-zinc-700 bear-stroke-2"
|
|
22
23
|
}
|
|
23
24
|
),
|
|
24
25
|
i.map((e, p) => {
|
|
25
|
-
const m = d(p), k =
|
|
26
|
+
const m = d(p), k = r + c * 0.85 * Math.cos(m), h = r + c * 0.85 * Math.sin(m), b = t ? l === "12h" ? e === 12 ? a === 12 : a % 12 === e : a === e : o === e;
|
|
26
27
|
return /* @__PURE__ */ f(
|
|
27
28
|
"g",
|
|
28
29
|
{
|
|
@@ -52,10 +53,10 @@ const N = ({
|
|
|
52
53
|
/* @__PURE__ */ n(
|
|
53
54
|
"line",
|
|
54
55
|
{
|
|
55
|
-
x1:
|
|
56
|
-
y1:
|
|
57
|
-
x2:
|
|
58
|
-
y2:
|
|
56
|
+
x1: r,
|
|
57
|
+
y1: r,
|
|
58
|
+
x2: r + c * 0.6 * Math.cos(s),
|
|
59
|
+
y2: r + c * 0.6 * Math.sin(s),
|
|
59
60
|
className: "Bear-TimePicker__clock-face-hand bear-stroke-blue-500 bear-stroke-2",
|
|
60
61
|
strokeLinecap: "round"
|
|
61
62
|
}
|
|
@@ -63,5 +64,5 @@ const N = ({
|
|
|
63
64
|
] });
|
|
64
65
|
};
|
|
65
66
|
export {
|
|
66
|
-
|
|
67
|
+
T as ClockFaceSvg
|
|
67
68
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),s=require("react"),L=require("../../utils/cn.cjs"),U=require("../Button/Button.cjs"),v=require("../Typography/Typography.cjs"),a=require("./Tour.const.cjs"),G=({steps:T,open:u=!1,current:A,onClose:d,onStepChange:b,onFinish:f,showIndicators:N=a.TOUR_DEFAULTS.SHOW_INDICATORS,showCloseButton:I=a.TOUR_DEFAULTS.SHOW_CLOSE_BUTTON,showSkipButton:w=a.TOUR_DEFAULTS.SHOW_SKIP_BUTTON,showPrevButton:P=a.TOUR_DEFAULTS.SHOW_PREV_BUTTON,finishText:D=a.TOUR_DEFAULTS.FINISH_TEXT,skipText:y=a.TOUR_DEFAULTS.SKIP_TEXT,maskOpacity:g=a.TOUR_DEFAULTS.MASK_OPACITY,maskColor:m=a.TOUR_DEFAULTS.MASK_COLOR,animated:E=a.TOUR_DEFAULTS.ANIMATED,className:k,testId:j})=>{const[B,x]=s.useState(0),[r,F]=s.useState(null),[R,M]=s.useState({top:0,left:0}),z=s.useRef(null),c=A??B,e=T[c],_=c===T.length-1,H=c===0,O=s.useCallback(()=>e?typeof e.target=="function"?e.target():document.querySelector(e.target):null,[e]),S=s.useCallback(()=>{const t=O();if(t){const i=t.getBoundingClientRect();F(i)}},[O]);s.useEffect(()=>{if(!r||!e)return;const t=e.placement||a.TOUR_DEFAULTS.PLACEMENT,i=e.spotlightPadding??a.TOUR_DEFAULTS.SPOTLIGHT_PADDING;let l=0,n=0;switch(t){case"top":case"top-start":case"top-end":l=r.top-a.TOUR_TOOLTIP_OFFSET-i,n=t==="top"?r.left+r.width/2:t==="top-start"?r.left:r.right;break;case"bottom":case"bottom-start":case"bottom-end":l=r.bottom+a.TOUR_TOOLTIP_OFFSET+i,n=t==="bottom"?r.left+r.width/2:t==="bottom-start"?r.left:r.right;break;case"left":case"left-start":case"left-end":n=r.left-a.TOUR_TOOLTIP_OFFSET-i,l=t==="left"?r.top+r.height/2:t==="left-start"?r.top:r.bottom;break;case"right":case"right-start":case"right-end":n=r.right+a.TOUR_TOOLTIP_OFFSET+i,l=t==="right"?r.top+r.height/2:t==="right-start"?r.top:r.bottom;break}M({top:l,left:n})},[r,e]),s.useEffect(()=>{if(!u)return;S();const t=()=>S();return window.addEventListener("resize",t),window.addEventListener("scroll",t,!0),()=>{window.removeEventListener("resize",t),window.removeEventListener("scroll",t,!0)}},[u,c,S]),s.useEffect(()=>{if(!u)return;const t=O();t&&t.scrollIntoView({behavior:"smooth",block:"center"})},[u,c,O]);const X=s.useCallback(async()=>{var t,i,l;if(e!=null&&e.onAfterStep&&await e.onAfterStep(),_)f==null||f(),d==null||d();else{const n=c+1;x(n),b==null||b(n),(t=T[n])!=null&&t.onBeforeStep&&await((l=(i=T[n]).onBeforeStep)==null?void 0:l.call(i))}},[c,_,e,T,f,d,b]),q=s.useCallback(async()=>{var i,l,n;e!=null&&e.onAfterStep&&await e.onAfterStep();const t=c-1;x(t),b==null||b(t),(i=T[t])!=null&&i.onBeforeStep&&await((n=(l=T[t]).onBeforeStep)==null?void 0:n.call(l))},[c,e,T,b]),p=s.useCallback(()=>{d==null||d()},[d]),W=(e==null?void 0:e.placement)||a.TOUR_DEFAULTS.PLACEMENT,h=(e==null?void 0:e.spotlightPadding)??a.TOUR_DEFAULTS.SPOTLIGHT_PADDING;return!u||!e?null:o.jsxs("div",{className:L.cn("Bear-Tour",k),"data-testid":j,children:[o.jsx("div",{className:"Bear-Tour__overlay bear-fixed bear-inset-0",style:{zIndex:a.TOUR_Z_INDEX.OVERLAY,backgroundColor:m,opacity:g,transition:E?"opacity 0.3s":"none"},onClick:p}),r&&o.jsx("div",{className:"Bear-Tour__spotlight bear-fixed bear-pointer-events-none",style:{zIndex:a.TOUR_Z_INDEX.SPOTLIGHT,top:r.top-h,left:r.left-h,width:r.width+h*2,height:r.height+h*2,borderRadius:8,boxShadow:`0 0 0 9999px ${m}`,opacity:g,transition:E?"all 0.3s ease":"none"}}),o.jsxs("div",{ref:z,className:"Bear-Tour__tooltip bear-fixed bear-bg-white dark:bear-bg-neutral-800 bear-rounded-lg bear-shadow-xl bear-p-4",style:{zIndex:a.TOUR_Z_INDEX.TOOLTIP,top:R.top,left:R.left,minWidth:280,maxWidth:360,...a.TOUR_PLACEMENT_STYLES[W],transition:E?"all 0.3s ease":"none"},children:[I&&o.jsx("button",{className:"Bear-Tour__close bear-absolute bear-top-2 bear-right-2 bear-p-1 bear-text-neutral-400 hover:bear-text-neutral-600 dark:hover:bear-text-neutral-300 bear-cursor-pointer bear-bg-transparent bear-border-none",onClick:p,"aria-label":"Close tour",children:o.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:o.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})}),o.jsxs("div",{className:"Bear-Tour__content bear-pr-6",children:[e.title&&o.jsx(v.Typography,{variant:"h6",className:"bear-mb-2",children:e.title}),e.description&&o.jsx(v.Typography,{variant:"body2",color:"secondary",className:"bear-mb-4",children:e.description}),e.content]}),o.jsxs("div",{className:"Bear-Tour__footer bear-flex bear-items-center bear-justify-between bear-mt-4 bear-pt-3 bear-border-t bear-border-neutral-200 dark:bear-border-neutral-700",children:[N&&o.jsx("div",{className:"bear-flex bear-gap-1.5",children:T.map((t,i)=>o.jsx("div",{className:L.cn("bear-w-2 bear-h-2 bear-rounded-full bear-transition-colors",i===c?"bear-bg-[var(--bear-primary-500)]":"bear-bg-neutral-300 dark:bear-bg-neutral-600")},i))}),o.jsxs("div",{className:"bear-flex bear-gap-2 bear-ml-auto",children:[w&&!_&&o.jsx(U.Button,{variant:"ghost",size:"sm",onClick:p,children:y}),P&&!H&&o.jsx(U.Button,{variant:"outline",size:"sm",onClick:q,children:e.prevText||a.TOUR_DEFAULTS.PREV_TEXT}),o.jsx(U.Button,{variant:"primary",size:"sm",onClick:X,children:_?D:e.nextText||a.TOUR_DEFAULTS.NEXT_TEXT})]})]})]})]})};exports.Tour=G;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t={SHOW_INDICATORS:!0,SHOW_CLOSE_BUTTON:!0,SHOW_SKIP_BUTTON:!0,SHOW_PREV_BUTTON:!0,FINISH_TEXT:"Finish",SKIP_TEXT:"Skip",NEXT_TEXT:"Next",PREV_TEXT:"Back",MASK_OPACITY:.5,MASK_COLOR:"#000000",SPOTLIGHT_PADDING:8,ANIMATED:!0,PLACEMENT:"bottom"},r={OVERLAY:99990,SPOTLIGHT:99991,TOOLTIP:99992},T=12,a={top:{transform:"translate(-50%, -100%)"},"top-start":{transform:"translate(0, -100%)"},"top-end":{transform:"translate(-100%, -100%)"},bottom:{transform:"translate(-50%, 0)"},"bottom-start":{transform:"translate(0, 0)"},"bottom-end":{transform:"translate(-100%, 0)"},left:{transform:"translate(-100%, -50%)"},"left-start":{transform:"translate(-100%, 0)"},"left-end":{transform:"translate(-100%, -100%)"},right:{transform:"translate(0, -50%)"},"right-start":{transform:"translate(0, 0)"},"right-end":{transform:"translate(0, -100%)"}};exports.TOUR_DEFAULTS=t;exports.TOUR_PLACEMENT_STYLES=a;exports.TOUR_TOOLTIP_OFFSET=T;exports.TOUR_Z_INDEX=r;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { TourPlacement } from './Tour.types';
|
|
2
|
+
export declare const TOUR_DEFAULTS: {
|
|
3
|
+
readonly SHOW_INDICATORS: true;
|
|
4
|
+
readonly SHOW_CLOSE_BUTTON: true;
|
|
5
|
+
readonly SHOW_SKIP_BUTTON: true;
|
|
6
|
+
readonly SHOW_PREV_BUTTON: true;
|
|
7
|
+
readonly FINISH_TEXT: "Finish";
|
|
8
|
+
readonly SKIP_TEXT: "Skip";
|
|
9
|
+
readonly NEXT_TEXT: "Next";
|
|
10
|
+
readonly PREV_TEXT: "Back";
|
|
11
|
+
readonly MASK_OPACITY: 0.5;
|
|
12
|
+
readonly MASK_COLOR: "#000000";
|
|
13
|
+
readonly SPOTLIGHT_PADDING: 8;
|
|
14
|
+
readonly ANIMATED: true;
|
|
15
|
+
readonly PLACEMENT: TourPlacement;
|
|
16
|
+
};
|
|
17
|
+
export declare const TOUR_Z_INDEX: {
|
|
18
|
+
readonly OVERLAY: 99990;
|
|
19
|
+
readonly SPOTLIGHT: 99991;
|
|
20
|
+
readonly TOOLTIP: 99992;
|
|
21
|
+
};
|
|
22
|
+
export declare const TOUR_TOOLTIP_OFFSET = 12;
|
|
23
|
+
export declare const TOUR_PLACEMENT_STYLES: Record<TourPlacement, {
|
|
24
|
+
transform: string;
|
|
25
|
+
}>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
const t = {
|
|
2
|
+
SHOW_INDICATORS: !0,
|
|
3
|
+
SHOW_CLOSE_BUTTON: !0,
|
|
4
|
+
SHOW_SKIP_BUTTON: !0,
|
|
5
|
+
SHOW_PREV_BUTTON: !0,
|
|
6
|
+
FINISH_TEXT: "Finish",
|
|
7
|
+
SKIP_TEXT: "Skip",
|
|
8
|
+
NEXT_TEXT: "Next",
|
|
9
|
+
PREV_TEXT: "Back",
|
|
10
|
+
MASK_OPACITY: 0.5,
|
|
11
|
+
MASK_COLOR: "#000000",
|
|
12
|
+
SPOTLIGHT_PADDING: 8,
|
|
13
|
+
ANIMATED: !0,
|
|
14
|
+
PLACEMENT: "bottom"
|
|
15
|
+
}, r = {
|
|
16
|
+
OVERLAY: 99990,
|
|
17
|
+
SPOTLIGHT: 99991,
|
|
18
|
+
TOOLTIP: 99992
|
|
19
|
+
}, a = 12, T = {
|
|
20
|
+
top: { transform: "translate(-50%, -100%)" },
|
|
21
|
+
"top-start": { transform: "translate(0, -100%)" },
|
|
22
|
+
"top-end": { transform: "translate(-100%, -100%)" },
|
|
23
|
+
bottom: { transform: "translate(-50%, 0)" },
|
|
24
|
+
"bottom-start": { transform: "translate(0, 0)" },
|
|
25
|
+
"bottom-end": { transform: "translate(-100%, 0)" },
|
|
26
|
+
left: { transform: "translate(-100%, -50%)" },
|
|
27
|
+
"left-start": { transform: "translate(-100%, 0)" },
|
|
28
|
+
"left-end": { transform: "translate(-100%, -100%)" },
|
|
29
|
+
right: { transform: "translate(0, -50%)" },
|
|
30
|
+
"right-start": { transform: "translate(0, 0)" },
|
|
31
|
+
"right-end": { transform: "translate(0, -100%)" }
|
|
32
|
+
};
|
|
33
|
+
export {
|
|
34
|
+
t as TOUR_DEFAULTS,
|
|
35
|
+
T as TOUR_PLACEMENT_STYLES,
|
|
36
|
+
a as TOUR_TOOLTIP_OFFSET,
|
|
37
|
+
r as TOUR_Z_INDEX
|
|
38
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { TourProps } from './Tour.types';
|
|
3
|
+
/**
|
|
4
|
+
* Tour - Feature tour/onboarding walkthrough
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* const steps = [
|
|
9
|
+
* { target: '#welcome-btn', title: 'Welcome!', description: 'Click here to start' },
|
|
10
|
+
* { target: '#settings', title: 'Settings', description: 'Configure your preferences' },
|
|
11
|
+
* ];
|
|
12
|
+
*
|
|
13
|
+
* <Tour steps={steps} open={showTour} onClose={() => setShowTour(false)} />
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export declare const Tour: FC<TourProps>;
|
|
17
|
+
export default Tour;
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { jsxs as u, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { useState as w, useRef as F, useCallback as T, useEffect as x } from "react";
|
|
3
|
+
import { cn as y } from "../../utils/cn.js";
|
|
4
|
+
import { Button as O } from "../Button/Button.js";
|
|
5
|
+
import { Typography as A } from "../Typography/Typography.js";
|
|
6
|
+
import { TOUR_DEFAULTS as o, TOUR_TOOLTIP_OFFSET as _, TOUR_Z_INDEX as S, TOUR_PLACEMENT_STYLES as J } from "./Tour.const.js";
|
|
7
|
+
const ot = ({
|
|
8
|
+
steps: s,
|
|
9
|
+
open: f = !1,
|
|
10
|
+
current: B,
|
|
11
|
+
onClose: d,
|
|
12
|
+
onStepChange: b,
|
|
13
|
+
onFinish: m,
|
|
14
|
+
showIndicators: R = o.SHOW_INDICATORS,
|
|
15
|
+
showCloseButton: U = o.SHOW_CLOSE_BUTTON,
|
|
16
|
+
showSkipButton: z = o.SHOW_SKIP_BUTTON,
|
|
17
|
+
showPrevButton: D = o.SHOW_PREV_BUTTON,
|
|
18
|
+
finishText: H = o.FINISH_TEXT,
|
|
19
|
+
skipText: M = o.SKIP_TEXT,
|
|
20
|
+
maskOpacity: I = o.MASK_OPACITY,
|
|
21
|
+
maskColor: P = o.MASK_COLOR,
|
|
22
|
+
animated: v = o.ANIMATED,
|
|
23
|
+
className: W,
|
|
24
|
+
testId: X
|
|
25
|
+
}) => {
|
|
26
|
+
const [G, L] = w(0), [r, K] = w(null), [k, V] = w({ top: 0, left: 0 }), j = F(null), c = B ?? G, t = s[c], h = c === s.length - 1, Y = c === 0, p = T(() => t ? typeof t.target == "function" ? t.target() : document.querySelector(t.target) : null, [t]), E = T(() => {
|
|
27
|
+
const e = p();
|
|
28
|
+
if (e) {
|
|
29
|
+
const a = e.getBoundingClientRect();
|
|
30
|
+
K(a);
|
|
31
|
+
}
|
|
32
|
+
}, [p]);
|
|
33
|
+
x(() => {
|
|
34
|
+
if (!r || !t) return;
|
|
35
|
+
const e = t.placement || o.PLACEMENT, a = t.spotlightPadding ?? o.SPOTLIGHT_PADDING;
|
|
36
|
+
let l = 0, i = 0;
|
|
37
|
+
switch (e) {
|
|
38
|
+
case "top":
|
|
39
|
+
case "top-start":
|
|
40
|
+
case "top-end":
|
|
41
|
+
l = r.top - _ - a, i = e === "top" ? r.left + r.width / 2 : e === "top-start" ? r.left : r.right;
|
|
42
|
+
break;
|
|
43
|
+
case "bottom":
|
|
44
|
+
case "bottom-start":
|
|
45
|
+
case "bottom-end":
|
|
46
|
+
l = r.bottom + _ + a, i = e === "bottom" ? r.left + r.width / 2 : e === "bottom-start" ? r.left : r.right;
|
|
47
|
+
break;
|
|
48
|
+
case "left":
|
|
49
|
+
case "left-start":
|
|
50
|
+
case "left-end":
|
|
51
|
+
i = r.left - _ - a, l = e === "left" ? r.top + r.height / 2 : e === "left-start" ? r.top : r.bottom;
|
|
52
|
+
break;
|
|
53
|
+
case "right":
|
|
54
|
+
case "right-start":
|
|
55
|
+
case "right-end":
|
|
56
|
+
i = r.right + _ + a, l = e === "right" ? r.top + r.height / 2 : e === "right-start" ? r.top : r.bottom;
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
V({ top: l, left: i });
|
|
60
|
+
}, [r, t]), x(() => {
|
|
61
|
+
if (!f) return;
|
|
62
|
+
E();
|
|
63
|
+
const e = () => E();
|
|
64
|
+
return window.addEventListener("resize", e), window.addEventListener("scroll", e, !0), () => {
|
|
65
|
+
window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0);
|
|
66
|
+
};
|
|
67
|
+
}, [f, c, E]), x(() => {
|
|
68
|
+
if (!f) return;
|
|
69
|
+
const e = p();
|
|
70
|
+
e && e.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
71
|
+
}, [f, c, p]);
|
|
72
|
+
const q = T(async () => {
|
|
73
|
+
var e, a, l;
|
|
74
|
+
if (t != null && t.onAfterStep && await t.onAfterStep(), h)
|
|
75
|
+
m == null || m(), d == null || d();
|
|
76
|
+
else {
|
|
77
|
+
const i = c + 1;
|
|
78
|
+
L(i), b == null || b(i), (e = s[i]) != null && e.onBeforeStep && await ((l = (a = s[i]).onBeforeStep) == null ? void 0 : l.call(a));
|
|
79
|
+
}
|
|
80
|
+
}, [c, h, t, s, m, d, b]), Z = T(async () => {
|
|
81
|
+
var a, l, i;
|
|
82
|
+
t != null && t.onAfterStep && await t.onAfterStep();
|
|
83
|
+
const e = c - 1;
|
|
84
|
+
L(e), b == null || b(e), (a = s[e]) != null && a.onBeforeStep && await ((i = (l = s[e]).onBeforeStep) == null ? void 0 : i.call(l));
|
|
85
|
+
}, [c, t, s, b]), N = T(() => {
|
|
86
|
+
d == null || d();
|
|
87
|
+
}, [d]), $ = (t == null ? void 0 : t.placement) || o.PLACEMENT, g = (t == null ? void 0 : t.spotlightPadding) ?? o.SPOTLIGHT_PADDING;
|
|
88
|
+
return !f || !t ? null : /* @__PURE__ */ u(
|
|
89
|
+
"div",
|
|
90
|
+
{
|
|
91
|
+
className: y("Bear-Tour", W),
|
|
92
|
+
"data-testid": X,
|
|
93
|
+
children: [
|
|
94
|
+
/* @__PURE__ */ n(
|
|
95
|
+
"div",
|
|
96
|
+
{
|
|
97
|
+
className: "Bear-Tour__overlay bear-fixed bear-inset-0",
|
|
98
|
+
style: {
|
|
99
|
+
zIndex: S.OVERLAY,
|
|
100
|
+
backgroundColor: P,
|
|
101
|
+
opacity: I,
|
|
102
|
+
transition: v ? "opacity 0.3s" : "none"
|
|
103
|
+
},
|
|
104
|
+
onClick: N
|
|
105
|
+
}
|
|
106
|
+
),
|
|
107
|
+
r && /* @__PURE__ */ n(
|
|
108
|
+
"div",
|
|
109
|
+
{
|
|
110
|
+
className: "Bear-Tour__spotlight bear-fixed bear-pointer-events-none",
|
|
111
|
+
style: {
|
|
112
|
+
zIndex: S.SPOTLIGHT,
|
|
113
|
+
top: r.top - g,
|
|
114
|
+
left: r.left - g,
|
|
115
|
+
width: r.width + g * 2,
|
|
116
|
+
height: r.height + g * 2,
|
|
117
|
+
borderRadius: 8,
|
|
118
|
+
boxShadow: `0 0 0 9999px ${P}`,
|
|
119
|
+
opacity: I,
|
|
120
|
+
transition: v ? "all 0.3s ease" : "none"
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
),
|
|
124
|
+
/* @__PURE__ */ u(
|
|
125
|
+
"div",
|
|
126
|
+
{
|
|
127
|
+
ref: j,
|
|
128
|
+
className: "Bear-Tour__tooltip bear-fixed bear-bg-white dark:bear-bg-neutral-800 bear-rounded-lg bear-shadow-xl bear-p-4",
|
|
129
|
+
style: {
|
|
130
|
+
zIndex: S.TOOLTIP,
|
|
131
|
+
top: k.top,
|
|
132
|
+
left: k.left,
|
|
133
|
+
minWidth: 280,
|
|
134
|
+
maxWidth: 360,
|
|
135
|
+
...J[$],
|
|
136
|
+
transition: v ? "all 0.3s ease" : "none"
|
|
137
|
+
},
|
|
138
|
+
children: [
|
|
139
|
+
U && /* @__PURE__ */ n(
|
|
140
|
+
"button",
|
|
141
|
+
{
|
|
142
|
+
className: "Bear-Tour__close bear-absolute bear-top-2 bear-right-2 bear-p-1 bear-text-neutral-400 hover:bear-text-neutral-600 dark:hover:bear-text-neutral-300 bear-cursor-pointer bear-bg-transparent bear-border-none",
|
|
143
|
+
onClick: N,
|
|
144
|
+
"aria-label": "Close tour",
|
|
145
|
+
children: /* @__PURE__ */ n("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ n("path", { d: "M18 6L6 18M6 6l12 12" }) })
|
|
146
|
+
}
|
|
147
|
+
),
|
|
148
|
+
/* @__PURE__ */ u("div", { className: "Bear-Tour__content bear-pr-6", children: [
|
|
149
|
+
t.title && /* @__PURE__ */ n(A, { variant: "h6", className: "bear-mb-2", children: t.title }),
|
|
150
|
+
t.description && /* @__PURE__ */ n(A, { variant: "body2", color: "secondary", className: "bear-mb-4", children: t.description }),
|
|
151
|
+
t.content
|
|
152
|
+
] }),
|
|
153
|
+
/* @__PURE__ */ u("div", { className: "Bear-Tour__footer bear-flex bear-items-center bear-justify-between bear-mt-4 bear-pt-3 bear-border-t bear-border-neutral-200 dark:bear-border-neutral-700", children: [
|
|
154
|
+
R && /* @__PURE__ */ n("div", { className: "bear-flex bear-gap-1.5", children: s.map((e, a) => /* @__PURE__ */ n(
|
|
155
|
+
"div",
|
|
156
|
+
{
|
|
157
|
+
className: y(
|
|
158
|
+
"bear-w-2 bear-h-2 bear-rounded-full bear-transition-colors",
|
|
159
|
+
a === c ? "bear-bg-[var(--bear-primary-500)]" : "bear-bg-neutral-300 dark:bear-bg-neutral-600"
|
|
160
|
+
)
|
|
161
|
+
},
|
|
162
|
+
a
|
|
163
|
+
)) }),
|
|
164
|
+
/* @__PURE__ */ u("div", { className: "bear-flex bear-gap-2 bear-ml-auto", children: [
|
|
165
|
+
z && !h && /* @__PURE__ */ n(O, { variant: "ghost", size: "sm", onClick: N, children: M }),
|
|
166
|
+
D && !Y && /* @__PURE__ */ n(O, { variant: "outline", size: "sm", onClick: Z, children: t.prevText || o.PREV_TEXT }),
|
|
167
|
+
/* @__PURE__ */ n(O, { variant: "primary", size: "sm", onClick: q, children: h ? H : t.nextText || o.NEXT_TEXT })
|
|
168
|
+
] })
|
|
169
|
+
] })
|
|
170
|
+
]
|
|
171
|
+
}
|
|
172
|
+
)
|
|
173
|
+
]
|
|
174
|
+
}
|
|
175
|
+
);
|
|
176
|
+
};
|
|
177
|
+
export {
|
|
178
|
+
ot as Tour
|
|
179
|
+
};
|