@forgedevstack/bear 1.3.1 → 1.3.3
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/README.md +30 -0
- package/dist/components/Accordion/components/AccordionItem/AccordionItem.cjs +1 -1
- package/dist/components/Accordion/components/AccordionItem/AccordionItem.js +1 -1
- package/dist/components/Alert/Alert.cjs +1 -1
- package/dist/components/Alert/Alert.js +1 -1
- package/dist/components/ApprovalCard/ApprovalCard.cjs +1 -0
- package/dist/components/ApprovalCard/ApprovalCard.const.cjs +1 -0
- package/dist/components/ApprovalCard/ApprovalCard.const.d.ts +2 -0
- package/dist/components/ApprovalCard/ApprovalCard.const.js +8 -0
- package/dist/components/ApprovalCard/ApprovalCard.d.ts +2 -0
- package/dist/components/ApprovalCard/ApprovalCard.js +25 -0
- package/dist/components/ApprovalCard/ApprovalCard.types.d.ts +15 -0
- package/dist/components/ApprovalCard/index.d.ts +2 -0
- package/dist/components/ArtifactCard/ArtifactCard.cjs +1 -0
- package/dist/components/ArtifactCard/ArtifactCard.const.cjs +1 -0
- package/dist/components/ArtifactCard/ArtifactCard.const.d.ts +3 -0
- package/dist/components/ArtifactCard/ArtifactCard.const.js +8 -0
- package/dist/components/ArtifactCard/ArtifactCard.d.ts +2 -0
- package/dist/components/ArtifactCard/ArtifactCard.js +43 -0
- package/dist/components/ArtifactCard/ArtifactCard.types.d.ts +15 -0
- package/dist/components/ArtifactCard/index.d.ts +2 -0
- package/dist/components/Avatar/Avatar.cjs +1 -1
- package/dist/components/Avatar/Avatar.js +1 -1
- package/dist/components/BackTop/BackTop.cjs +1 -1
- package/dist/components/BackTop/BackTop.js +1 -1
- package/dist/components/Banner/Banner.const.cjs +1 -1
- package/dist/components/Banner/Banner.const.js +10 -9
- package/dist/components/Blockquote/Blockquote.cjs +1 -1
- package/dist/components/Blockquote/Blockquote.js +1 -1
- package/dist/components/BottomSheet/BottomSheet.cjs +1 -1
- package/dist/components/BottomSheet/BottomSheet.js +1 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.cjs +1 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.js +1 -1
- package/dist/components/Calendar/Calendar.cjs +1 -1
- package/dist/components/Calendar/Calendar.js +1 -1
- package/dist/components/Chart/BarChart.cjs +1 -1
- package/dist/components/Chart/BarChart.d.ts +1 -2
- package/dist/components/Chart/BarChart.js +74 -61
- package/dist/components/Chart/Chart.cjs +1 -1
- package/dist/components/Chart/Chart.const.cjs +1 -1
- package/dist/components/Chart/Chart.const.d.ts +24 -3
- package/dist/components/Chart/Chart.const.js +39 -16
- package/dist/components/Chart/Chart.d.ts +1 -5
- package/dist/components/Chart/Chart.js +23 -24
- package/dist/components/Chart/Chart.types.d.ts +12 -20
- package/dist/components/Chart/Chart.utils.cjs +1 -1
- package/dist/components/Chart/Chart.utils.d.ts +8 -18
- package/dist/components/Chart/Chart.utils.js +39 -3
- package/dist/components/Chart/FunnelChart.cjs +1 -0
- package/dist/components/Chart/FunnelChart.d.ts +2 -0
- package/dist/components/Chart/FunnelChart.js +61 -0
- package/dist/components/Chart/LineChart.cjs +1 -1
- package/dist/components/Chart/LineChart.d.ts +1 -2
- package/dist/components/Chart/LineChart.js +80 -70
- package/dist/components/Chart/PieChart.cjs +1 -1
- package/dist/components/Chart/PieChart.d.ts +1 -2
- package/dist/components/Chart/PieChart.js +140 -105
- package/dist/components/Chart/PieChart.types.d.ts +8 -0
- package/dist/components/Chart/RadarChart.cjs +1 -0
- package/dist/components/Chart/RadarChart.d.ts +2 -0
- package/dist/components/Chart/RadarChart.js +123 -0
- package/dist/components/Chart/index.d.ts +3 -1
- package/dist/components/Chat/Chat.cjs +1 -1
- package/dist/components/Chat/Chat.const.cjs +1 -1
- package/dist/components/Chat/Chat.const.d.ts +9 -22
- package/dist/components/Chat/Chat.const.js +18 -26
- package/dist/components/Chat/Chat.d.ts +1 -20
- package/dist/components/Chat/Chat.js +107 -162
- package/dist/components/Chat/Chat.types.d.ts +20 -27
- package/dist/components/Chat/Chat.utils.cjs +1 -0
- package/dist/components/Chat/Chat.utils.d.ts +2 -0
- package/dist/components/Chat/Chat.utils.js +10 -0
- package/dist/components/Chat/helpers/ChatTypingIndicator.cjs +1 -0
- package/dist/components/Chat/helpers/ChatTypingIndicator.d.ts +3 -0
- package/dist/components/Chat/helpers/ChatTypingIndicator.js +14 -0
- package/dist/components/Chat/index.d.ts +2 -1
- package/dist/components/ChatBubble/ChatBubble.cjs +1 -0
- package/dist/components/ChatBubble/ChatBubble.const.cjs +1 -0
- package/dist/components/ChatBubble/ChatBubble.const.d.ts +13 -0
- package/dist/components/ChatBubble/ChatBubble.const.js +17 -0
- package/dist/components/ChatBubble/ChatBubble.d.ts +2 -0
- package/dist/components/ChatBubble/ChatBubble.js +32 -0
- package/dist/components/ChatBubble/ChatBubble.types.d.ts +12 -0
- package/dist/components/ChatBubble/ChatBubble.utils.cjs +1 -0
- package/dist/components/ChatBubble/ChatBubble.utils.d.ts +6 -0
- package/dist/components/ChatBubble/ChatBubble.utils.js +15 -0
- package/dist/components/ChatBubble/helpers/ChatBubbleSystem.cjs +1 -0
- package/dist/components/ChatBubble/helpers/ChatBubbleSystem.d.ts +2 -0
- package/dist/components/ChatBubble/helpers/ChatBubbleSystem.js +21 -0
- package/dist/components/ChatBubble/helpers/ChatBubbleThread.cjs +1 -0
- package/dist/components/ChatBubble/helpers/ChatBubbleThread.d.ts +4 -0
- package/dist/components/ChatBubble/helpers/ChatBubbleThread.js +63 -0
- package/dist/components/ChatBubble/index.d.ts +2 -0
- package/dist/components/ChatError/ChatError.cjs +1 -0
- package/dist/components/ChatError/ChatError.const.cjs +1 -0
- package/dist/components/ChatError/ChatError.const.d.ts +2 -0
- package/dist/components/ChatError/ChatError.const.js +8 -0
- package/dist/components/ChatError/ChatError.d.ts +2 -0
- package/dist/components/ChatError/ChatError.js +32 -0
- package/dist/components/ChatError/ChatError.types.d.ts +14 -0
- package/dist/components/ChatError/index.d.ts +2 -0
- package/dist/components/CitationList/CitationList.cjs +1 -0
- package/dist/components/CitationList/CitationList.d.ts +2 -0
- package/dist/components/CitationList/CitationList.js +30 -0
- package/dist/components/CitationList/CitationList.types.d.ts +15 -0
- package/dist/components/CitationList/helpers/CitationListTitle.cjs +1 -0
- package/dist/components/CitationList/helpers/CitationListTitle.d.ts +2 -0
- package/dist/components/CitationList/helpers/CitationListTitle.js +10 -0
- package/dist/components/CitationList/helpers/index.d.ts +1 -0
- package/dist/components/CitationList/index.d.ts +2 -0
- package/dist/components/ContextMeter/ContextMeter.cjs +1 -0
- package/dist/components/ContextMeter/ContextMeter.const.cjs +1 -0
- package/dist/components/ContextMeter/ContextMeter.const.d.ts +6 -0
- package/dist/components/ContextMeter/ContextMeter.const.js +11 -0
- package/dist/components/ContextMeter/ContextMeter.d.ts +2 -0
- package/dist/components/ContextMeter/ContextMeter.js +49 -0
- package/dist/components/ContextMeter/ContextMeter.types.d.ts +11 -0
- package/dist/components/ContextMeter/ContextMeter.utils.cjs +1 -0
- package/dist/components/ContextMeter/ContextMeter.utils.d.ts +2 -0
- package/dist/components/ContextMeter/ContextMeter.utils.js +12 -0
- package/dist/components/ContextMeter/index.d.ts +2 -0
- package/dist/components/CurrencyInput/CurrencyInput.cjs +1 -1
- package/dist/components/CurrencyInput/CurrencyInput.js +1 -1
- package/dist/components/DatePicker/DatePicker.cjs +1 -1
- package/dist/components/DatePicker/DatePicker.js +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.cjs +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.js +1 -1
- package/dist/components/Drawer/Drawer.cjs +1 -1
- package/dist/components/Drawer/Drawer.const.cjs +1 -1
- package/dist/components/Drawer/Drawer.const.d.ts +4 -12
- package/dist/components/Drawer/Drawer.const.js +7 -55
- package/dist/components/Drawer/Drawer.d.ts +1 -2
- package/dist/components/Drawer/Drawer.js +78 -112
- package/dist/components/Drawer/Drawer.types.d.ts +20 -4
- package/dist/components/Drawer/Drawer.utils.d.ts +0 -4
- package/dist/components/Drawer/components/DrawerHeader/DrawerHeader.cjs +1 -0
- package/dist/components/Drawer/components/DrawerHeader/DrawerHeader.d.ts +2 -0
- package/dist/components/Drawer/components/DrawerHeader/DrawerHeader.js +26 -0
- package/dist/components/Drawer/components/DrawerHeader/DrawerHeader.types.d.ts +20 -0
- package/dist/components/Drawer/components/DrawerHeader/DrawerHeaderClose.cjs +1 -0
- package/dist/components/Drawer/components/DrawerHeader/DrawerHeaderClose.d.ts +2 -0
- package/dist/components/Drawer/components/DrawerHeader/DrawerHeaderClose.js +17 -0
- package/dist/components/Drawer/components/DrawerHeader/DrawerHeaderTitle.cjs +1 -0
- package/dist/components/Drawer/components/DrawerHeader/DrawerHeaderTitle.d.ts +2 -0
- package/dist/components/Drawer/components/DrawerHeader/DrawerHeaderTitle.js +9 -0
- package/dist/components/Drawer/components/DrawerHeader/index.d.ts +2 -0
- package/dist/components/Drawer/components/index.d.ts +1 -0
- package/dist/components/Drawer/helpers/DrawerOptionalHeader.cjs +1 -0
- package/dist/components/Drawer/helpers/DrawerOptionalHeader.d.ts +2 -0
- package/dist/components/Drawer/helpers/DrawerOptionalHeader.js +9 -0
- package/dist/components/Drawer/helpers/index.d.ts +1 -0
- package/dist/components/Drawer/hooks/index.d.ts +1 -0
- package/dist/components/Drawer/hooks/useDrawer.cjs +1 -0
- package/dist/components/Drawer/hooks/useDrawer.d.ts +2 -0
- package/dist/components/Drawer/hooks/useDrawer.js +50 -0
- package/dist/components/Drawer/index.d.ts +1 -1
- package/dist/components/Editable/Editable.cjs +1 -1
- package/dist/components/Editable/Editable.js +1 -1
- package/dist/components/EmptyState/EmptyState.cjs +1 -1
- package/dist/components/EmptyState/EmptyState.const.cjs +1 -1
- package/dist/components/EmptyState/EmptyState.const.d.ts +8 -6
- package/dist/components/EmptyState/EmptyState.const.js +15 -8
- package/dist/components/EmptyState/EmptyState.d.ts +1 -2
- package/dist/components/EmptyState/EmptyState.js +39 -43
- package/dist/components/EmptyState/EmptyState.types.d.ts +2 -0
- package/dist/components/EmptyState/helpers/EmptyStateErrorSvg.cjs +1 -0
- package/dist/components/EmptyState/helpers/EmptyStateErrorSvg.d.ts +3 -0
- package/dist/components/EmptyState/helpers/EmptyStateErrorSvg.js +8 -0
- package/dist/components/EmptyState/helpers/EmptyStateInboxSvg.cjs +1 -0
- package/dist/components/EmptyState/helpers/EmptyStateInboxSvg.d.ts +3 -0
- package/dist/components/EmptyState/helpers/EmptyStateInboxSvg.js +8 -0
- package/dist/components/EmptyState/helpers/EmptyStateSearchSvg.cjs +1 -0
- package/dist/components/EmptyState/helpers/EmptyStateSearchSvg.d.ts +3 -0
- package/dist/components/EmptyState/helpers/EmptyStateSearchSvg.js +8 -0
- package/dist/components/EmptyState/helpers/index.d.ts +3 -0
- package/dist/components/EmptyState/index.d.ts +1 -1
- package/dist/components/FileTree/FileTree.cjs +1 -1
- package/dist/components/FileTree/FileTree.js +1 -1
- package/dist/components/FloatingChat/FloatingChat.cjs +1 -1
- package/dist/components/FloatingChat/FloatingChat.const.cjs +1 -1
- package/dist/components/FloatingChat/FloatingChat.const.d.ts +12 -1
- package/dist/components/FloatingChat/FloatingChat.const.js +25 -7
- package/dist/components/FloatingChat/FloatingChat.d.ts +1 -18
- package/dist/components/FloatingChat/FloatingChat.js +93 -124
- package/dist/components/FloatingChat/FloatingChat.types.d.ts +11 -22
- package/dist/components/FloatingChat/FloatingChat.utils.cjs +1 -0
- package/dist/components/FloatingChat/FloatingChat.utils.d.ts +2 -0
- package/dist/components/FloatingChat/FloatingChat.utils.js +12 -0
- package/dist/components/FloatingChat/helpers/FloatingChatHeader.cjs +1 -0
- package/dist/components/FloatingChat/helpers/FloatingChatHeader.d.ts +9 -0
- package/dist/components/FloatingChat/helpers/FloatingChatHeader.js +21 -0
- package/dist/components/FloatingChat/helpers/FloatingChatTrigger.cjs +1 -0
- package/dist/components/FloatingChat/helpers/FloatingChatTrigger.d.ts +9 -0
- package/dist/components/FloatingChat/helpers/FloatingChatTrigger.js +17 -0
- package/dist/components/FloatingChat/index.d.ts +1 -1
- package/dist/components/FormSkeleton/FormSkeleton.cjs +1 -1
- package/dist/components/FormSkeleton/FormSkeleton.d.ts +1 -1
- package/dist/components/FormSkeleton/FormSkeleton.js +35 -24
- package/dist/components/Gauge/Gauge.cjs +1 -1
- package/dist/components/Gauge/Gauge.const.cjs +1 -1
- package/dist/components/Gauge/Gauge.const.d.ts +5 -0
- package/dist/components/Gauge/Gauge.const.js +11 -6
- package/dist/components/Gauge/Gauge.d.ts +1 -2
- package/dist/components/Gauge/Gauge.js +69 -45
- package/dist/components/Gauge/Gauge.types.d.ts +11 -2
- package/dist/components/Gauge/helpers/GaugeLinearBar.cjs +1 -0
- package/dist/components/Gauge/helpers/GaugeLinearBar.d.ts +2 -0
- package/dist/components/Gauge/helpers/GaugeLinearBar.js +40 -0
- package/dist/components/Heatmap/Heatmap.cjs +1 -1
- package/dist/components/Heatmap/Heatmap.const.cjs +1 -1
- package/dist/components/Heatmap/Heatmap.const.d.ts +2 -0
- package/dist/components/Heatmap/Heatmap.const.js +8 -6
- package/dist/components/Heatmap/Heatmap.js +51 -47
- package/dist/components/Heatmap/Heatmap.types.d.ts +1 -1
- package/dist/components/Icon/Icon.d.ts +2 -39
- package/dist/components/Icon/Icon.types.d.ts +1 -17
- package/dist/components/Icon/icons/action.d.ts +1 -85
- package/dist/components/Icon/icons/bear.d.ts +1 -12
- package/dist/components/Icon/icons/charts.d.ts +1 -0
- package/dist/components/Icon/icons/commerce.d.ts +1 -25
- package/dist/components/Icon/icons/communication.d.ts +1 -48
- package/dist/components/Icon/icons/content.d.ts +1 -53
- package/dist/components/Icon/icons/device.d.ts +1 -27
- package/dist/components/Icon/icons/editor.d.ts +1 -54
- package/dist/components/Icon/icons/file.d.ts +1 -25
- package/dist/components/Icon/icons/index.d.ts +1 -9
- package/dist/components/Icon/icons/media.d.ts +1 -64
- package/dist/components/Icon/icons/misc.d.ts +1 -96
- package/dist/components/Icon/icons/navigation.d.ts +1 -56
- package/dist/components/Icon/icons/social.d.ts +1 -24
- package/dist/components/Icon/icons/status.d.ts +1 -61
- package/dist/components/Icon/index.d.ts +3 -605
- package/dist/components/Icon/productIcons.cjs +1 -0
- package/dist/components/Icon/productIcons.d.ts +7 -0
- package/dist/components/Icon/productIcons.js +25 -0
- package/dist/components/ImageAnnotation/ImageAnnotation.cjs +1 -1
- package/dist/components/ImageAnnotation/ImageAnnotation.js +1 -1
- package/dist/components/JsonViewer/JsonViewer.cjs +1 -1
- package/dist/components/JsonViewer/JsonViewer.js +1 -1
- package/dist/components/MediaPlayer/MediaPlayer.cjs +1 -1
- package/dist/components/MediaPlayer/MediaPlayer.js +1 -1
- package/dist/components/MessageActions/MessageActions.cjs +1 -0
- package/dist/components/MessageActions/MessageActions.const.cjs +1 -0
- package/dist/components/MessageActions/MessageActions.const.d.ts +2 -0
- package/dist/components/MessageActions/MessageActions.const.js +10 -0
- package/dist/components/MessageActions/MessageActions.d.ts +2 -0
- package/dist/components/MessageActions/MessageActions.js +31 -0
- package/dist/components/MessageActions/MessageActions.types.d.ts +16 -0
- package/dist/components/MessageActions/index.d.ts +2 -0
- package/dist/components/Modal/Modal.cjs +1 -1
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/ModelSelect/ModelSelect.cjs +1 -0
- package/dist/components/ModelSelect/ModelSelect.const.cjs +1 -0
- package/dist/components/ModelSelect/ModelSelect.const.d.ts +1 -0
- package/dist/components/ModelSelect/ModelSelect.const.js +4 -0
- package/dist/components/ModelSelect/ModelSelect.d.ts +2 -0
- package/dist/components/ModelSelect/ModelSelect.js +41 -0
- package/dist/components/ModelSelect/ModelSelect.types.d.ts +16 -0
- package/dist/components/ModelSelect/index.d.ts +2 -0
- package/dist/components/OverlayPortal/OverlayPortal.const.cjs +1 -1
- package/dist/components/OverlayPortal/OverlayPortal.const.js +6 -5
- package/dist/components/PageNav/PageNav.cjs +1 -1
- package/dist/components/PageNav/PageNav.js +1 -1
- package/dist/components/PasswordInput/PasswordInput.cjs +1 -1
- package/dist/components/PasswordInput/PasswordInput.js +1 -1
- package/dist/components/PromptComposer/PromptComposer.cjs +1 -0
- package/dist/components/PromptComposer/PromptComposer.const.cjs +1 -0
- package/dist/components/PromptComposer/PromptComposer.const.d.ts +6 -0
- package/dist/components/PromptComposer/PromptComposer.const.js +14 -0
- package/dist/components/PromptComposer/PromptComposer.d.ts +2 -0
- package/dist/components/PromptComposer/PromptComposer.js +132 -0
- package/dist/components/PromptComposer/PromptComposer.types.d.ts +45 -0
- package/dist/components/PromptComposer/PromptComposer.utils.cjs +1 -0
- package/dist/components/PromptComposer/PromptComposer.utils.d.ts +5 -0
- package/dist/components/PromptComposer/PromptComposer.utils.js +16 -0
- package/dist/components/PromptComposer/helpers/PromptComposerAttachSvg.cjs +1 -0
- package/dist/components/PromptComposer/helpers/PromptComposerAttachSvg.d.ts +1 -0
- package/dist/components/PromptComposer/helpers/PromptComposerAttachSvg.js +6 -0
- package/dist/components/PromptComposer/helpers/PromptComposerFileChip.cjs +1 -0
- package/dist/components/PromptComposer/helpers/PromptComposerFileChip.d.ts +2 -0
- package/dist/components/PromptComposer/helpers/PromptComposerFileChip.js +18 -0
- package/dist/components/PromptComposer/helpers/PromptComposerSendSvg.cjs +1 -0
- package/dist/components/PromptComposer/helpers/PromptComposerSendSvg.d.ts +1 -0
- package/dist/components/PromptComposer/helpers/PromptComposerSendSvg.js +9 -0
- package/dist/components/PromptComposer/helpers/PromptComposerStopSvg.cjs +1 -0
- package/dist/components/PromptComposer/helpers/PromptComposerStopSvg.d.ts +1 -0
- package/dist/components/PromptComposer/helpers/PromptComposerStopSvg.js +6 -0
- package/dist/components/PromptComposer/helpers/index.d.ts +4 -0
- package/dist/components/PromptComposer/index.d.ts +2 -0
- package/dist/components/PromptSuggestions/PromptSuggestions.cjs +1 -0
- package/dist/components/PromptSuggestions/PromptSuggestions.d.ts +2 -0
- package/dist/components/PromptSuggestions/PromptSuggestions.js +39 -0
- package/dist/components/PromptSuggestions/PromptSuggestions.types.d.ts +13 -0
- package/dist/components/PromptSuggestions/index.d.ts +2 -0
- package/dist/components/PropsPlayground/PropsPlayground.cjs +1 -1
- package/dist/components/PropsPlayground/PropsPlayground.js +1 -1
- package/dist/components/Rating/components/StarIcon/StarIcon.cjs +1 -1
- package/dist/components/Rating/components/StarIcon/StarIcon.js +1 -1
- package/dist/components/Result/Result.utils.cjs +1 -1
- package/dist/components/Result/Result.utils.js +1 -1
- package/dist/components/RichEditor/components/ToolbarColorPicker/ToolbarColorPicker.cjs +1 -1
- package/dist/components/RichEditor/components/ToolbarColorPicker/ToolbarColorPicker.js +1 -1
- package/dist/components/RichEditor/components/ToolbarDropdown/ToolbarDropdown.cjs +1 -1
- package/dist/components/RichEditor/components/ToolbarDropdown/ToolbarDropdown.js +1 -1
- package/dist/components/RichEditor/components/ToolbarMore/ToolbarMore.cjs +1 -1
- package/dist/components/RichEditor/components/ToolbarMore/ToolbarMore.js +1 -1
- package/dist/components/RichEditor/components/ToolbarSignature/ToolbarSignature.cjs +1 -1
- package/dist/components/RichEditor/components/ToolbarSignature/ToolbarSignature.js +1 -1
- package/dist/components/RichEditor/helpers/IconRender.cjs +1 -1
- package/dist/components/RichEditor/helpers/IconRender.js +1 -1
- package/dist/components/RichEditor/helpers/toolbarItemRender.cjs +1 -1
- package/dist/components/RichEditor/helpers/toolbarItemRender.js +1 -1
- package/dist/components/RingProgress/RingProgress.cjs +1 -1
- package/dist/components/RingProgress/RingProgress.const.cjs +1 -1
- package/dist/components/RingProgress/RingProgress.const.d.ts +3 -0
- package/dist/components/RingProgress/RingProgress.const.js +7 -4
- package/dist/components/RingProgress/RingProgress.js +38 -37
- package/dist/components/RingProgress/RingProgress.types.d.ts +1 -0
- package/dist/components/Select/Select.cjs +1 -1
- package/dist/components/Select/Select.js +23 -23
- package/dist/components/Select/helpers/SelectCheckSvg.cjs +1 -0
- package/dist/components/Select/helpers/SelectCheckSvg.d.ts +3 -0
- package/dist/components/Select/helpers/SelectCheckSvg.js +8 -0
- package/dist/components/Select/helpers/SelectChevronDownSvg.cjs +1 -0
- package/dist/components/Select/helpers/SelectChevronDownSvg.d.ts +3 -0
- package/dist/components/Select/helpers/SelectChevronDownSvg.js +8 -0
- package/dist/components/Select/helpers/index.d.ts +2 -0
- package/dist/components/Sidebar/Sidebar.cjs +1 -1
- package/dist/components/Sidebar/Sidebar.js +16 -15
- package/dist/components/Sidebar/Sidebar.types.d.ts +1 -1
- package/dist/components/Sidebar/Sidebar.utils.cjs +1 -0
- package/dist/components/Sidebar/Sidebar.utils.d.ts +2 -0
- package/dist/components/Sidebar/Sidebar.utils.js +11 -0
- package/dist/components/Sidebar/components/SidebarGroup/SidebarGroup.cjs +1 -1
- package/dist/components/Sidebar/components/SidebarGroup/SidebarGroup.js +1 -1
- package/dist/components/Sidebar/components/SidebarItem/SidebarItem.cjs +1 -1
- package/dist/components/Sidebar/components/SidebarItem/SidebarItem.js +55 -51
- package/dist/components/Sidebar/index.d.ts +1 -0
- package/dist/components/Skeleton/Skeleton.cjs +1 -1
- package/dist/components/Skeleton/Skeleton.const.cjs +2 -2
- package/dist/components/Skeleton/Skeleton.const.js +5 -6
- package/dist/components/Skeleton/Skeleton.js +59 -59
- package/dist/components/SliderRange/SliderRange.cjs +1 -1
- package/dist/components/SliderRange/SliderRange.js +19 -19
- package/dist/components/Sparkline/Sparkline.cjs +1 -1
- package/dist/components/Sparkline/Sparkline.const.cjs +1 -1
- package/dist/components/Sparkline/Sparkline.const.d.ts +5 -0
- package/dist/components/Sparkline/Sparkline.const.js +9 -4
- package/dist/components/Sparkline/Sparkline.d.ts +1 -2
- package/dist/components/Sparkline/Sparkline.js +75 -53
- package/dist/components/Sparkline/Sparkline.types.d.ts +2 -0
- package/dist/components/Sparkline/Sparkline.utils.cjs +1 -1
- package/dist/components/Sparkline/Sparkline.utils.d.ts +7 -12
- package/dist/components/Sparkline/Sparkline.utils.js +33 -20
- package/dist/components/Sparkline/index.d.ts +2 -2
- package/dist/components/StatCard/StatCard.cjs +1 -1
- package/dist/components/StatCard/StatCard.const.cjs +1 -1
- package/dist/components/StatCard/StatCard.const.d.ts +0 -7
- package/dist/components/StatCard/StatCard.const.js +5 -12
- package/dist/components/StatCard/StatCard.d.ts +1 -2
- package/dist/components/StatCard/StatCard.js +48 -37
- package/dist/components/StatCard/StatCard.utils.cjs +1 -0
- package/dist/components/StatCard/StatCard.utils.d.ts +2 -0
- package/dist/components/StatCard/StatCard.utils.js +7 -0
- package/dist/components/Stepper/Stepper.cjs +1 -1
- package/dist/components/Stepper/Stepper.js +1 -1
- package/dist/components/StreamingMessage/StreamingMessage.cjs +1 -0
- package/dist/components/StreamingMessage/StreamingMessage.const.cjs +1 -0
- package/dist/components/StreamingMessage/StreamingMessage.const.d.ts +5 -0
- package/dist/components/StreamingMessage/StreamingMessage.const.js +10 -0
- package/dist/components/StreamingMessage/StreamingMessage.d.ts +2 -0
- package/dist/components/StreamingMessage/StreamingMessage.js +48 -0
- package/dist/components/StreamingMessage/StreamingMessage.types.d.ts +15 -0
- package/dist/components/StreamingMessage/index.d.ts +2 -0
- package/dist/components/Tabs/TabList.cjs +1 -1
- package/dist/components/Tabs/TabList.js +1 -1
- package/dist/components/ThemeSwitcher/ThemeSwitcher.cjs +1 -0
- package/dist/components/ThemeSwitcher/ThemeSwitcher.const.cjs +1 -0
- package/dist/components/ThemeSwitcher/ThemeSwitcher.const.d.ts +7 -0
- package/dist/components/ThemeSwitcher/ThemeSwitcher.const.js +14 -0
- package/dist/components/ThemeSwitcher/ThemeSwitcher.d.ts +2 -0
- package/dist/components/ThemeSwitcher/ThemeSwitcher.js +39 -0
- package/dist/components/ThemeSwitcher/ThemeSwitcher.types.d.ts +14 -0
- package/dist/components/ThemeSwitcher/index.d.ts +2 -0
- package/dist/components/ThinkingBlock/ThinkingBlock.cjs +1 -0
- package/dist/components/ThinkingBlock/ThinkingBlock.const.cjs +1 -0
- package/dist/components/ThinkingBlock/ThinkingBlock.const.d.ts +4 -0
- package/dist/components/ThinkingBlock/ThinkingBlock.const.js +9 -0
- package/dist/components/ThinkingBlock/ThinkingBlock.d.ts +2 -0
- package/dist/components/ThinkingBlock/ThinkingBlock.js +45 -0
- package/dist/components/ThinkingBlock/ThinkingBlock.types.d.ts +16 -0
- package/dist/components/ThinkingBlock/index.d.ts +2 -0
- package/dist/components/TimePicker/TimePicker.cjs +1 -1
- package/dist/components/TimePicker/TimePicker.js +1 -1
- package/dist/components/TimelineChart/TimelineChart.cjs +1 -1
- package/dist/components/TimelineChart/TimelineChart.const.cjs +1 -1
- package/dist/components/TimelineChart/TimelineChart.const.d.ts +3 -0
- package/dist/components/TimelineChart/TimelineChart.const.js +7 -4
- package/dist/components/TimelineChart/TimelineChart.js +56 -42
- package/dist/components/TimelineChart/TimelineChart.types.d.ts +1 -1
- package/dist/components/ToolCall/ToolCall.cjs +1 -0
- package/dist/components/ToolCall/ToolCall.const.cjs +1 -0
- package/dist/components/ToolCall/ToolCall.const.d.ts +5 -0
- package/dist/components/ToolCall/ToolCall.const.js +17 -0
- package/dist/components/ToolCall/ToolCall.d.ts +2 -0
- package/dist/components/ToolCall/ToolCall.js +43 -0
- package/dist/components/ToolCall/ToolCall.types.d.ts +20 -0
- package/dist/components/ToolCall/index.d.ts +2 -0
- package/dist/components/Transition/Transition.const.cjs +1 -1
- package/dist/components/Transition/Transition.const.js +12 -6
- package/dist/components/Transition/Transition.types.d.ts +1 -1
- package/dist/components/TreeSelect/TreeSelect.cjs +1 -1
- package/dist/components/TreeSelect/TreeSelect.js +1 -1
- package/dist/components/TreeSelect/components/TreeSelectExpandControl/TreeSelectExpandControl.cjs +1 -1
- package/dist/components/TreeSelect/components/TreeSelectExpandControl/TreeSelectExpandControl.js +1 -1
- package/dist/components/TreeView/TreeView.cjs +1 -1
- package/dist/components/TreeView/TreeView.js +3 -2
- package/dist/components/TreeView/components/TreeViewExpandControl/TreeViewExpandControl.cjs +1 -1
- package/dist/components/TreeView/components/TreeViewExpandControl/TreeViewExpandControl.js +1 -1
- package/dist/components/TreeView/components/TreeViewNodeIcon/TreeViewNodeIcon.cjs +1 -1
- package/dist/components/TreeView/components/TreeViewNodeIcon/TreeViewNodeIcon.js +1 -1
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.d.ts +39 -11
- package/dist/components/index.js +455 -420
- package/dist/constants/generals.const.cjs +1 -1
- package/dist/constants/generals.const.d.ts +50 -0
- package/dist/constants/generals.const.js +154 -108
- package/dist/constants/keys.const.cjs +1 -1
- package/dist/constants/keys.const.js +2 -1
- package/dist/constants/numbers.const.cjs +1 -1
- package/dist/constants/numbers.const.d.ts +7 -0
- package/dist/constants/numbers.const.js +60 -52
- package/dist/context/BearProvider.cjs +1 -1
- package/dist/context/BearProvider.d.ts +19 -44
- package/dist/context/BearProvider.js +223 -208
- package/dist/context/bearProvider.types.d.ts +4 -0
- package/dist/context/index.d.ts +1 -1
- package/dist/hooks/useFixedAnchorPosition/index.d.ts +1 -1
- package/dist/hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.cjs +1 -1
- package/dist/hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.d.ts +2 -1
- package/dist/hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.js +12 -11
- package/dist/hooks/useFixedAnchorPosition/useFixedAnchorPosition.types.d.ts +1 -1
- package/dist/icons.cjs +1 -1
- package/dist/icons.d.ts +2 -2
- package/dist/icons.js +1 -6
- package/dist/index.cjs +1 -1
- package/dist/index.js +597 -562
- package/dist/styles/_ai-chat.css +487 -0
- package/dist/styles/_base.css +2 -0
- package/dist/styles/_chart.css +144 -0
- package/dist/styles/_drawer.css +213 -0
- package/dist/styles/_effects.css +8 -4
- package/dist/styles/_overlays.css +0 -1
- package/dist/styles/_skeleton.css +90 -0
- package/dist/styles/main.css +4 -0
- package/dist/styles.css +1089 -186
- package/package.json +5 -1
- package/dist/components/FormSkeleton/FormSkeleton.const.cjs +0 -1
- package/dist/components/FormSkeleton/FormSkeleton.const.d.ts +0 -5
- package/dist/components/FormSkeleton/FormSkeleton.const.js +0 -8
- package/dist/components/Icon/Icon.cjs +0 -1
- package/dist/components/Icon/Icon.const.d.ts +0 -1
- package/dist/components/Icon/Icon.js +0 -45
- package/dist/components/Icon/icons/action.cjs +0 -1
- package/dist/components/Icon/icons/action.js +0 -351
- package/dist/components/Icon/icons/bear.cjs +0 -1
- package/dist/components/Icon/icons/bear.js +0 -47
- package/dist/components/Icon/icons/commerce.cjs +0 -1
- package/dist/components/Icon/icons/commerce.js +0 -124
- package/dist/components/Icon/icons/communication.cjs +0 -1
- package/dist/components/Icon/icons/communication.js +0 -184
- package/dist/components/Icon/icons/content.cjs +0 -1
- package/dist/components/Icon/icons/content.js +0 -231
- package/dist/components/Icon/icons/device.cjs +0 -1
- package/dist/components/Icon/icons/device.js +0 -122
- package/dist/components/Icon/icons/editor.cjs +0 -1
- package/dist/components/Icon/icons/editor.js +0 -285
- package/dist/components/Icon/icons/file.cjs +0 -1
- package/dist/components/Icon/icons/file.js +0 -120
- package/dist/components/Icon/icons/media.cjs +0 -1
- package/dist/components/Icon/icons/media.js +0 -306
- package/dist/components/Icon/icons/misc.cjs +0 -1
- package/dist/components/Icon/icons/misc.js +0 -450
- package/dist/components/Icon/icons/navigation.cjs +0 -1
- package/dist/components/Icon/icons/navigation.js +0 -215
- package/dist/components/Icon/icons/social.cjs +0 -1
- package/dist/components/Icon/icons/social.js +0 -89
- package/dist/components/Icon/icons/status.cjs +0 -1
- package/dist/components/Icon/icons/status.js +0 -271
- package/dist/components/Icon/index.cjs +0 -1
- package/dist/components/Icon/index.js +0 -79
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),s=require("@forgedevstack/bear-icons"),x=o=>t.jsxs(s.Icon,{...o,children:[t.jsx("rect",{x:"4",y:"3",width:"16",height:"18",rx:"2"}),t.jsx("path",{d:"M8 7h8"}),t.jsx("path",{d:"M8 11h8"}),t.jsx("path",{d:"M8 15h5"}),t.jsx("circle",{cx:"17",cy:"16.5",r:"2.5"})]}),c=o=>t.jsxs(s.Icon,{...o,children:[t.jsx("path",{d:"M12 3l8 4.5v9L12 21l-8-4.5v-9L12 3z"}),t.jsx("path",{d:"M12 12l8-4.5"}),t.jsx("path",{d:"M12 12v9"}),t.jsx("path",{d:"M12 12L4 7.5"}),t.jsx("path",{d:"M9.5 14.5l1.5 1.5 3-3"})]}),e=o=>t.jsxs(s.Icon,{...o,children:[t.jsx("rect",{x:"3",y:"3",width:"8",height:"8",rx:"1.5"}),t.jsx("rect",{x:"13",y:"3",width:"8",height:"8",rx:"1.5"}),t.jsx("rect",{x:"3",y:"13",width:"8",height:"8",rx:"1.5"}),t.jsx("rect",{x:"13",y:"13",width:"8",height:"8",rx:"1.5"})]});exports.ComponentsIcon=e;exports.SandboxIcon=c;exports.StorybookIcon=x;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IconProps } from '@forgedevstack/bear-icons';
|
|
2
|
+
import { FC } from 'react';
|
|
3
|
+
type ProductIcon = FC<Omit<IconProps, 'children'>>;
|
|
4
|
+
export declare const StorybookIcon: ProductIcon;
|
|
5
|
+
export declare const SandboxIcon: ProductIcon;
|
|
6
|
+
export declare const ComponentsIcon: ProductIcon;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsxs as r, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { Icon as c } from "@forgedevstack/bear-icons";
|
|
3
|
+
const e = (h) => /* @__PURE__ */ r(c, { ...h, children: [
|
|
4
|
+
/* @__PURE__ */ t("rect", { x: "4", y: "3", width: "16", height: "18", rx: "2" }),
|
|
5
|
+
/* @__PURE__ */ t("path", { d: "M8 7h8" }),
|
|
6
|
+
/* @__PURE__ */ t("path", { d: "M8 11h8" }),
|
|
7
|
+
/* @__PURE__ */ t("path", { d: "M8 15h5" }),
|
|
8
|
+
/* @__PURE__ */ t("circle", { cx: "17", cy: "16.5", r: "2.5" })
|
|
9
|
+
] }), i = (h) => /* @__PURE__ */ r(c, { ...h, children: [
|
|
10
|
+
/* @__PURE__ */ t("path", { d: "M12 3l8 4.5v9L12 21l-8-4.5v-9L12 3z" }),
|
|
11
|
+
/* @__PURE__ */ t("path", { d: "M12 12l8-4.5" }),
|
|
12
|
+
/* @__PURE__ */ t("path", { d: "M12 12v9" }),
|
|
13
|
+
/* @__PURE__ */ t("path", { d: "M12 12L4 7.5" }),
|
|
14
|
+
/* @__PURE__ */ t("path", { d: "M9.5 14.5l1.5 1.5 3-3" })
|
|
15
|
+
] }), x = (h) => /* @__PURE__ */ r(c, { ...h, children: [
|
|
16
|
+
/* @__PURE__ */ t("rect", { x: "3", y: "3", width: "8", height: "8", rx: "1.5" }),
|
|
17
|
+
/* @__PURE__ */ t("rect", { x: "13", y: "3", width: "8", height: "8", rx: "1.5" }),
|
|
18
|
+
/* @__PURE__ */ t("rect", { x: "3", y: "13", width: "8", height: "8", rx: "1.5" }),
|
|
19
|
+
/* @__PURE__ */ t("rect", { x: "13", y: "13", width: "8", height: "8", rx: "1.5" })
|
|
20
|
+
] });
|
|
21
|
+
export {
|
|
22
|
+
x as ComponentsIcon,
|
|
23
|
+
i as SandboxIcon,
|
|
24
|
+
e as StorybookIcon
|
|
25
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),i=require("react"),q=require("../../utils/cn.cjs"),k=require("@forgedevstack/bear-icons"),P=require("../Popover/Popover.cjs"),R=require("../Input/Input.cjs"),_=require("./ImageAnnotation.const.cjs");let T=1;function L(o,a,r,t){return c.jsx("div",{className:"Bear-ImageAnnotation__edit min-w-[160px]",children:c.jsx(R.Input,{autoFocus:!0,size:"sm",value:o,onChange:s=>a(s.target.value),onKeyDown:s=>{s.key==="Enter"&&r(),s.key==="Escape"&&t()},placeholder:"Add note..."})})}function O(o,a,r,t){return c.jsxs("div",{className:"Bear-ImageAnnotation__label text-xs text-gray-700 dark:text-gray-200 whitespace-nowrap flex items-center gap-1",children:[t??o.text,a&&c.jsx("button",{type:"button",className:"text-red-400 hover:text-red-600 ml-1",onClick:s=>{s.stopPropagation(),r(o.id)},children:c.jsx(k.BearIcons.XIcon,{size:12})})]})}const D=({src:o,alt:a="",annotations:r,onChange:t,editable:s=!0,pinColor:A=_.DEFAULT_PIN_COLOR,pinSize:x=_.DEFAULT_PIN_SIZE,renderPopover:f,testId:b,className:j,...y})=>{const p=i.useRef(null),[n,u]=i.useState(null),[d,v]=i.useState(""),h=i.useCallback(e=>{if(!s||!t||!p.current||e.target.closest(".Bear-ImageAnnotation__pin"))return;const l=p.current.getBoundingClientRect(),I=(e.clientX-l.left)/l.width*100,g=(e.clientY-l.top)/l.height*100,m=`ann-${T++}`,B={id:m,x:I,y:g,text:""};t([...r,B]),u(m),v("")},[s,t,r]),N=i.useCallback(()=>{!n||!t||(d.trim()?t(r.map(e=>e.id===n?{...e,text:d}:e)):t(r.filter(e=>e.id!==n)),u(null))},[n,d,t,r]),w=i.useCallback(()=>u(null),[]),E=i.useCallback(e=>{t==null||t(r.filter(l=>l.id!==e)),n===e&&u(null)},[t,r,n]);return c.jsxs("div",{ref:p,className:q.cn("Bear-ImageAnnotation relative inline-block select-none",s&&"cursor-crosshair",j),onClick:h,"data-testid":b,...y,children:[c.jsx("img",{src:o,alt:a,className:"w-full h-auto block rounded-lg",draggable:!1}),r.map(e=>{const l=n===e.id,I=!!e.text,g=f==null?void 0:f(e),m=l?L(d,v,N,w):I?O(e,s,E,g):null;return c.jsx("div",{className:"Bear-ImageAnnotation__pin absolute transform -translate-x-1/2 -translate-y-full z-10",style:{left:`${e.x}%`,top:`${e.y}%`},children:c.jsx(P.Popover,{content:m,trigger:l?"click":"hover",placement:"top",open:l||void 0,arrow:!1,children:c.jsx("div",{className:"Bear-ImageAnnotation__marker flex items-center justify-center rounded-full shadow-lg cursor-pointer transition-transform hover:scale-110",style:{width:x,height:x,backgroundColor:e.color??A},children:c.jsx(k.BearIcons.MapPinIcon,{size:x*_.PIN_ICON_RATIO,className:"text-white"})})})},e.id)})]})};exports.ImageAnnotation=D;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as h, jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as R, useState as v, useCallback as u } from "react";
|
|
3
3
|
import { cn as T } from "../../utils/cn.js";
|
|
4
|
-
import { BearIcons as A } from "
|
|
4
|
+
import { BearIcons as A } from "@forgedevstack/bear-icons";
|
|
5
5
|
import { Popover as O } from "../Popover/Popover.js";
|
|
6
6
|
import { Input as j } from "../Input/Input.js";
|
|
7
7
|
import { DEFAULT_PIN_COLOR as D, DEFAULT_PIN_SIZE as F, PIN_ICON_RATIO as $ } from "./ImageAnnotation.const.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("react"),I=require("../../utils/cn.cjs"),v=require("../../context/BearProvider.cjs"),S=require("../Typography/Typography.cjs"),A=require("../Button/Button.cjs"),g=require("@forgedevstack/bear-icons"),u=require("./JsonViewer.const.cjs"),T=({name:r,value:s,path:d,depth:h,defaultExpandDepth:y,showDataTypes:j,showArrayIndices:x,onValueClick:c})=>{const[o,b]=i.useState(h<y),{mode:N}=v.useBear(),n=N==="dark"?u.DARK_THEME:u.DEFAULT_THEME,t=i.useMemo(()=>s===null?"null":Array.isArray(s)?"array":typeof s,[s]),p=t==="object"||t==="array",a=p&&Object.keys(s).length===0,f=i.useCallback(()=>{b(l=>!l)},[]),m=i.useCallback(()=>{c==null||c(d,s)},[d,s,c]),w=()=>{switch(t){case"string":return e.jsxs("span",{style:{color:n.string},className:"cursor-pointer hover:underline",onClick:m,children:['"',s,'"']});case"number":return e.jsx("span",{style:{color:n.number},className:"cursor-pointer hover:underline",onClick:m,children:String(s)});case"boolean":return e.jsx("span",{style:{color:n.boolean},className:"cursor-pointer hover:underline",onClick:m,children:String(s)});case"null":return e.jsx("span",{style:{color:n.null},className:"cursor-pointer hover:underline",onClick:m,children:"null"});default:return null}},k=()=>{if(!j)return null;const l=t==="array"?`Array(${s.length})`:t==="object"?"Object":t;return e.jsx("span",{className:"text-[10px] opacity-50 ml-1",children:l})};if(!p)return e.jsxs("div",{className:"flex items-center gap-1 py-0.5",children:[e.jsx("span",{className:"w-4"})," ",(x||typeof r=="string")&&e.jsxs(e.Fragment,{children:[e.jsx("span",{style:{color:n.key},children:typeof r=="string"?`"${r}"`:r}),e.jsx("span",{style:{color:n.punctuation},children:":"})]}),w(),k()]});const B=Object.entries(s),q=t==="array"?"[":"{",E=t==="array"?"]":"}";return e.jsxs("div",{className:"py-0.5",children:[e.jsxs("div",{className:"flex items-center gap-1 cursor-pointer hover:bg-black/5 dark:hover:bg-white/5 rounded px-1 -mx-1",onClick:f,children:[e.jsx("span",{className:"w-4 flex items-center justify-center text-gray-400",children:a?null:o?e.jsx(g.BearIcons.ChevronDownIcon,{size:12}):e.jsx(g.BearIcons.ChevronRightIcon,{size:12})}),(x||typeof r=="string")&&r!==""&&e.jsxs(e.Fragment,{children:[e.jsx("span",{style:{color:n.key},children:typeof r=="string"?`"${r}"`:r}),e.jsx("span",{style:{color:n.punctuation},children:":"})]}),e.jsx("span",{style:{color:n.bracket},children:q}),!o&&!a&&e.jsx("span",{className:"text-gray-400 text-xs",children:"..."}),(!o||a)&&e.jsx("span",{style:{color:n.bracket},children:E}),k()]}),o&&!a&&e.jsx("div",{className:"ml-4 border-l border-gray-200 dark:border-gray-700 pl-2",children:B.map(([l,C],F)=>e.jsx(T,{name:t==="array"?F:l,value:C,path:[...d,l],depth:h+1,defaultExpandDepth:y,showDataTypes:j,showArrayIndices:x,onValueClick:c},l))}),o&&!a&&e.jsxs("div",{className:"flex items-center",children:[e.jsx("span",{className:"w-4"}),e.jsx("span",{style:{color:n.bracket},children:E})]})]})},J=({data:r,defaultExpandDepth:s=u.DEFAULT_EXPAND_DEPTH,showDataTypes:d=!1,showArrayIndices:h=!0,showCopyButton:y=!0,rootName:j="root",onValueClick:x,onCopy:c,className:o,testId:b})=>{const{mode:N}=v.useBear(),n=N==="dark"?u.DARK_THEME:u.DEFAULT_THEME,[t,p]=i.useState(!1),a=i.useCallback(async()=>{try{await navigator.clipboard.writeText(JSON.stringify(r,null,2)),p(!0),c==null||c(r),setTimeout(()=>p(!1),2e3)}catch(f){console.error("Failed to copy:",f)}},[r,c]);return e.jsxs("div",{className:I.cn("Bear-JsonViewer","rounded-lg overflow-hidden font-mono text-sm",o),style:{backgroundColor:n.background},"data-testid":b,children:[y&&e.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b border-gray-200 dark:border-gray-700",children:[e.jsx(S.Typography,{variant:"caption",className:"opacity-60",children:"JSON"}),e.jsx(A.Button,{variant:"ghost",size:"sm",onClick:a,className:"!py-1 !px-2 !text-xs",children:t?e.jsxs(e.Fragment,{children:[e.jsx(g.BearIcons.CheckIcon,{size:12,className:"mr-1"}),"Copied!"]}):e.jsxs(e.Fragment,{children:[e.jsx(g.BearIcons.CopyIcon,{size:12,className:"mr-1"}),"Copy"]})})]}),e.jsx("div",{className:"p-3 overflow-x-auto",children:e.jsx(T,{name:j||"",value:r,path:[],depth:0,defaultExpandDepth:s,showDataTypes:d,showArrayIndices:h,onValueClick:x})})]})};exports.JsonViewer=J;
|
|
@@ -4,7 +4,7 @@ import { cn as I } from "../../utils/cn.js";
|
|
|
4
4
|
import { useBear as T } from "../../context/BearProvider.js";
|
|
5
5
|
import { Typography as _ } from "../Typography/Typography.js";
|
|
6
6
|
import { Button as H } from "../Button/Button.js";
|
|
7
|
-
import { BearIcons as b } from "
|
|
7
|
+
import { BearIcons as b } from "@forgedevstack/bear-icons";
|
|
8
8
|
import { DARK_THEME as B, DEFAULT_THEME as C, DEFAULT_EXPAND_DEPTH as L } from "./JsonViewer.const.js";
|
|
9
9
|
const z = ({
|
|
10
10
|
name: r,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("react"),m=require("../../utils/cn.cjs"),n=require("../Icon/index.cjs"),j=require("./MediaPlayer.const.cjs"),C=require("./MediaPlayer.utils.cjs"),Te=require("../../hooks/useBearStyles.cjs"),Re=320,le=16,ze=({src:D,type:T="video",poster:R,autoPlay:z=!1,loop:L=!1,muted:G=!1,nativeControls:k=!1,width:A,height:H,size:ce="md",accentColor:u=j.DEFAULT_ACCENT,playIcon:Y,pauseIcon:Z,muteIcon:de,unmuteIcon:ue,fullscreenIcon:xe,centerOverlay:me=!1,sticky:q=!1,stickyPosition:$="right",stickySize:U=Re,airPlay:he=!1,playlist:w,onTrackChange:I,bis:fe,testId:ye,className:ge,style:ve,...pe})=>{const h=s.useRef(null),W=s.useRef(null),K=s.useRef(null),[b,F]=s.useState(z),[N,V]=s.useState(0),[g,X]=s.useState(0),[S,be]=s.useState(G),[f,J]=s.useState(L),[M,je]=s.useState(!1),[Q,ke]=s.useState(0),[Ne,_]=s.useState(!z),[l,we]=s.useState(0),O=Te.useBearStyles(fe,ve),x=s.useMemo(()=>w&&w.length>0?w:[{src:D,poster:R,type:T,title:void 0,artist:void 0}],[w,D,R,T]),o=x[l],Ie=o.src,B=o.poster??R,c=o.type??T,d=x.length>1,i=j.SIZE_MAP[ce];s.useEffect(()=>{J(L)},[L]),s.useEffect(()=>{const t=h.current;if(!t)return;const r=()=>V(t.currentTime),a=()=>X(t.duration),p=()=>{d&&l<x.length-1?v(l+1):f?d&&v(0):(F(!1),_(!0))};return t.addEventListener("timeupdate",r),t.addEventListener("loadedmetadata",a),t.addEventListener("ended",p),()=>{t.removeEventListener("timeupdate",r),t.removeEventListener("loadedmetadata",a),t.removeEventListener("ended",p)}},[f,d,l,x.length]),s.useEffect(()=>{if(!q||c!=="video")return;const t=K.current;if(!t)return;const r=()=>{const p=t.getBoundingClientRect().bottom<0;je(p),p&&ke(le)};return window.addEventListener("scroll",r,{passive:!0}),r(),()=>window.removeEventListener("scroll",r)},[q,c]);const v=s.useCallback(t=>{const r=Math.max(0,Math.min(x.length-1,t));we(r),V(0),X(0),_(!1),I==null||I(r,x[r]),setTimeout(()=>{const a=h.current;a&&(a.load(),a.play().catch(()=>{}),F(!0))},50)},[x,I]),E=s.useCallback(()=>{const t=h.current;t&&(b?(t.pause(),_(!0)):(t.play().catch(()=>{}),_(!1)),F(!b))},[b]),ee=s.useCallback(t=>{const r=h.current;if(!r||!g)return;const a=t.currentTarget.getBoundingClientRect(),p=Math.max(0,Math.min(1,(t.clientX-a.left)/a.width));r.currentTime=p*g},[g]),te=s.useCallback(()=>{const t=h.current;t&&(t.muted=!S,be(!S))},[S]),se=s.useCallback(()=>{const t=!f;J(t);const r=h.current;r&&(r.loop=t)},[f]),Se=s.useCallback(()=>{var r;const t=W.current;t&&(document.fullscreenElement?document.exitFullscreen():(r=t.requestFullscreen)==null||r.call(t))},[]),Me=s.useCallback(()=>{const t=h.current;t!=null&&t.webkitShowPlaybackTargetPicker&&t.webkitShowPlaybackTargetPicker()},[]),re=s.useCallback(()=>{if(N>3){const t=h.current;t&&(t.currentTime=0)}else l>0&&v(l-1)},[N,l,v]),ae=s.useCallback(()=>{l<x.length-1&&v(l+1)},[l,x.length,v]),ne=g?N/g*100:0,y=i.iconSm,P=i.iconMd,ie=b?Z??e.jsx(n.BearIcons.PauseIcon,{size:P}):Y??e.jsx(n.BearIcons.PlayIcon,{size:P}),oe=S?de??e.jsx(n.BearIcons.VolumeOffIcon,{size:y}):ue??e.jsx(n.BearIcons.VolumeUpIcon,{size:y}),_e=xe??e.jsx(n.BearIcons.MaximizeIcon,{size:y}),Be=c==="video"?"video":"audio",Ee=s.useMemo(()=>M&&c==="video"?{...O,position:"fixed",top:Q,[$==="left"?"left":"right"]:le,width:U,zIndex:50,boxShadow:"0 8px 32px rgba(0,0,0,0.45)",borderRadius:12,transition:"top 0.15s ease-out"}:{...O,width:A??"100%",height:H,maxWidth:A?void 0:i.maxWidth},[M,c,O,A,H,i.maxWidth,Q,$,U]),Pe=s.useMemo(()=>{if(!M)return{aspectRatio:i.aspectRatio}},[M,i.aspectRatio]),Ce=`${u}20`;return e.jsxs(e.Fragment,{children:[q&&e.jsx("div",{ref:K,style:{height:1}}),e.jsxs("div",{ref:W,className:m.cn("Bear-MediaPlayer relative rounded-xl overflow-hidden bg-black",ge),style:Ee,"data-testid":ye,...pe,children:[e.jsx(Be,{ref:h,src:Ie,poster:B,autoPlay:z,loop:f&&!d,muted:G,controls:k,playsInline:!0,className:m.cn(c==="video"?"Bear-MediaPlayer__video w-full object-cover":"hidden"),style:c==="video"?Pe:void 0,onClick:c==="video"?E:void 0}),me&&c==="video"&&Ne&&!k&&e.jsx("button",{type:"button",onClick:E,className:"Bear-MediaPlayer__overlay absolute inset-0 flex items-center justify-center bg-black/30 transition-opacity",children:e.jsx("div",{className:"w-16 h-16 rounded-full bg-white/90 flex items-center justify-center shadow-lg",children:b?Z??e.jsx(n.BearIcons.PauseIcon,{size:j.CENTER_ICON_SIZE,className:"text-gray-900"}):Y??e.jsx(n.BearIcons.PlayIcon,{size:j.CENTER_ICON_SIZE,className:"text-gray-900"})})}),!k&&c==="video"&&e.jsxs("div",{className:m.cn("Bear-MediaPlayer__controls absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/80 to-transparent pt-8",i.padding),children:[e.jsx("div",{className:"Bear-MediaPlayer__progress w-full cursor-pointer mb-2 group",style:{height:j.PROGRESS_HEIGHT},onClick:ee,children:e.jsx("div",{className:"w-full h-full bg-white/30 rounded-full relative overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full transition-all",style:{width:`${ne}%`,backgroundColor:u}})})}),e.jsxs("div",{className:m.cn("Bear-MediaPlayer__bar flex items-center",i.gap),children:[d&&e.jsx("button",{type:"button",onClick:re,className:"text-white hover:text-primary-400 transition-colors",children:e.jsx(n.BearIcons.SkipBackIcon,{size:y})}),e.jsx("button",{type:"button",onClick:E,className:"text-white hover:text-primary-400 transition-colors",children:ie}),d&&e.jsx("button",{type:"button",onClick:ae,className:"text-white hover:text-primary-400 transition-colors",children:e.jsx(n.BearIcons.SkipForwardIcon,{size:y})}),e.jsx("button",{type:"button",onClick:te,className:"text-white hover:text-primary-400 transition-colors",children:oe}),e.jsxs("span",{className:m.cn("Bear-MediaPlayer__time text-white font-mono",i.text),children:[C.formatTime(N)," / ",C.formatTime(g)]}),e.jsx("div",{className:"flex-1"}),e.jsx("button",{type:"button",onClick:se,className:"transition-colors",style:{color:f?u:void 0},title:"Loop",children:e.jsx(n.BearIcons.RepeatIcon,{size:y,className:f?void 0:"text-white/60 hover:text-white"})}),he&&e.jsx("button",{type:"button",onClick:Me,className:"text-white hover:text-primary-400 transition-colors",title:"AirPlay",children:e.jsx(n.BearIcons.CastIcon,{size:y})}),e.jsx("button",{type:"button",onClick:Se,className:"text-white hover:text-primary-400 transition-colors",children:_e})]}),d&&o.title&&e.jsxs("div",{className:"mt-1 flex items-center gap-2 truncate",children:[e.jsx("span",{className:"text-white text-xs font-medium truncate",children:o.title}),o.artist&&e.jsxs("span",{className:"text-white/50 text-xs truncate",children:["— ",o.artist]})]})]}),c==="audio"&&!k&&e.jsxs("div",{className:m.cn("Bear-MediaPlayer__audio bg-gray-100 dark:bg-zinc-800 rounded-xl",i.padding),children:[d&&(B||o.title)&&e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[B&&e.jsx("img",{src:B,alt:"",className:"w-12 h-12 rounded-lg object-cover shrink-0"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[o.title&&e.jsx("p",{className:"text-sm font-semibold text-gray-900 dark:text-white truncate",children:o.title}),o.artist&&e.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 truncate",children:o.artist})]})]}),e.jsx("div",{className:"Bear-MediaPlayer__progress w-full cursor-pointer mb-1",style:{height:j.PROGRESS_HEIGHT},onClick:ee,children:e.jsx("div",{className:"w-full h-full bg-gray-300 dark:bg-zinc-600 rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full",style:{width:`${ne}%`,backgroundColor:u}})})}),e.jsxs("div",{className:"flex justify-between mb-2",children:[e.jsx("span",{className:m.cn("text-gray-500 font-mono",i.text),children:C.formatTime(N)}),e.jsx("span",{className:m.cn("text-gray-500 font-mono",i.text),children:C.formatTime(g)})]}),e.jsxs("div",{className:m.cn("flex items-center justify-center",i.gap),children:[e.jsx("button",{type:"button",onClick:se,className:"transition-colors",style:{color:f?u:void 0},title:"Loop",children:e.jsx(n.BearIcons.RepeatIcon,{size:y,className:f?void 0:"text-gray-400 hover:text-gray-600 dark:hover:text-gray-300"})}),d&&e.jsx("button",{type:"button",onClick:re,className:"text-gray-600 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white transition-colors",children:e.jsx(n.BearIcons.SkipBackIcon,{size:P})}),e.jsx("button",{type:"button",onClick:E,className:"Bear-MediaPlayer__play w-10 h-10 rounded-full flex items-center justify-center text-white transition-colors",style:{backgroundColor:u},children:ie}),d&&e.jsx("button",{type:"button",onClick:ae,className:"text-gray-600 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white transition-colors",children:e.jsx(n.BearIcons.SkipForwardIcon,{size:P})}),e.jsx("button",{type:"button",onClick:te,className:"text-gray-500 hover:text-gray-700 dark:hover:text-gray-300",children:oe})]})]}),d&&!k&&e.jsx("div",{className:"Bear-MediaPlayer__playlist bg-gray-50 dark:bg-zinc-900 border-t border-gray-200 dark:border-zinc-700 max-h-48 overflow-y-auto",children:x.map((t,r)=>{const a=r===l;return e.jsxs("button",{type:"button",onClick:()=>v(r),className:m.cn("w-full flex items-center gap-3 px-3 py-2 text-left transition-colors",!a&&"hover:bg-gray-100 dark:hover:bg-zinc-800"),style:a?{backgroundColor:Ce}:void 0,children:[t.poster&&e.jsx("img",{src:t.poster,alt:"",className:"w-8 h-8 rounded object-cover shrink-0"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"text-xs font-medium truncate",style:a?{color:u}:void 0,children:t.title??`Track ${r+1}`}),t.artist&&e.jsx("p",{className:"text-[10px] text-gray-400 truncate",children:t.artist})]}),a&&b&&e.jsxs("div",{className:"flex items-end gap-0.5 h-3",children:[e.jsx("span",{className:"w-0.5 rounded-full animate-pulse",style:{height:"60%",backgroundColor:u}}),e.jsx("span",{className:"w-0.5 rounded-full animate-pulse",style:{height:"100%",backgroundColor:u,animationDelay:"0.2s"}}),e.jsx("span",{className:"w-0.5 rounded-full animate-pulse",style:{height:"40%",backgroundColor:u,animationDelay:"0.4s"}})]}),e.jsx("span",{className:"text-[10px] text-gray-400 tabular-nums shrink-0",children:r+1})]},r)})})]})]})};exports.MediaPlayer=ze;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("react"),m=require("../../utils/cn.cjs"),n=require("@forgedevstack/bear-icons"),j=require("./MediaPlayer.const.cjs"),C=require("./MediaPlayer.utils.cjs"),Te=require("../../hooks/useBearStyles.cjs"),Re=320,le=16,ze=({src:D,type:T="video",poster:R,autoPlay:z=!1,loop:L=!1,muted:G=!1,nativeControls:k=!1,width:A,height:H,size:ce="md",accentColor:u=j.DEFAULT_ACCENT,playIcon:Y,pauseIcon:Z,muteIcon:de,unmuteIcon:ue,fullscreenIcon:xe,centerOverlay:me=!1,sticky:q=!1,stickyPosition:$="right",stickySize:U=Re,airPlay:he=!1,playlist:w,onTrackChange:I,bis:fe,testId:ye,className:ge,style:ve,...be})=>{const h=s.useRef(null),W=s.useRef(null),K=s.useRef(null),[p,F]=s.useState(z),[N,V]=s.useState(0),[g,X]=s.useState(0),[S,pe]=s.useState(G),[f,J]=s.useState(L),[M,je]=s.useState(!1),[Q,ke]=s.useState(0),[Ne,_]=s.useState(!z),[l,we]=s.useState(0),O=Te.useBearStyles(fe,ve),x=s.useMemo(()=>w&&w.length>0?w:[{src:D,poster:R,type:T,title:void 0,artist:void 0}],[w,D,R,T]),o=x[l],Ie=o.src,B=o.poster??R,c=o.type??T,d=x.length>1,i=j.SIZE_MAP[ce];s.useEffect(()=>{J(L)},[L]),s.useEffect(()=>{const t=h.current;if(!t)return;const r=()=>V(t.currentTime),a=()=>X(t.duration),b=()=>{d&&l<x.length-1?v(l+1):f?d&&v(0):(F(!1),_(!0))};return t.addEventListener("timeupdate",r),t.addEventListener("loadedmetadata",a),t.addEventListener("ended",b),()=>{t.removeEventListener("timeupdate",r),t.removeEventListener("loadedmetadata",a),t.removeEventListener("ended",b)}},[f,d,l,x.length]),s.useEffect(()=>{if(!q||c!=="video")return;const t=K.current;if(!t)return;const r=()=>{const b=t.getBoundingClientRect().bottom<0;je(b),b&&ke(le)};return window.addEventListener("scroll",r,{passive:!0}),r(),()=>window.removeEventListener("scroll",r)},[q,c]);const v=s.useCallback(t=>{const r=Math.max(0,Math.min(x.length-1,t));we(r),V(0),X(0),_(!1),I==null||I(r,x[r]),setTimeout(()=>{const a=h.current;a&&(a.load(),a.play().catch(()=>{}),F(!0))},50)},[x,I]),E=s.useCallback(()=>{const t=h.current;t&&(p?(t.pause(),_(!0)):(t.play().catch(()=>{}),_(!1)),F(!p))},[p]),ee=s.useCallback(t=>{const r=h.current;if(!r||!g)return;const a=t.currentTarget.getBoundingClientRect(),b=Math.max(0,Math.min(1,(t.clientX-a.left)/a.width));r.currentTime=b*g},[g]),te=s.useCallback(()=>{const t=h.current;t&&(t.muted=!S,pe(!S))},[S]),se=s.useCallback(()=>{const t=!f;J(t);const r=h.current;r&&(r.loop=t)},[f]),Se=s.useCallback(()=>{var r;const t=W.current;t&&(document.fullscreenElement?document.exitFullscreen():(r=t.requestFullscreen)==null||r.call(t))},[]),Me=s.useCallback(()=>{const t=h.current;t!=null&&t.webkitShowPlaybackTargetPicker&&t.webkitShowPlaybackTargetPicker()},[]),re=s.useCallback(()=>{if(N>3){const t=h.current;t&&(t.currentTime=0)}else l>0&&v(l-1)},[N,l,v]),ae=s.useCallback(()=>{l<x.length-1&&v(l+1)},[l,x.length,v]),ne=g?N/g*100:0,y=i.iconSm,P=i.iconMd,ie=p?Z??e.jsx(n.BearIcons.PauseIcon,{size:P}):Y??e.jsx(n.BearIcons.PlayIcon,{size:P}),oe=S?de??e.jsx(n.BearIcons.VolumeOffIcon,{size:y}):ue??e.jsx(n.BearIcons.VolumeUpIcon,{size:y}),_e=xe??e.jsx(n.BearIcons.MaximizeIcon,{size:y}),Be=c==="video"?"video":"audio",Ee=s.useMemo(()=>M&&c==="video"?{...O,position:"fixed",top:Q,[$==="left"?"left":"right"]:le,width:U,zIndex:50,boxShadow:"0 8px 32px rgba(0,0,0,0.45)",borderRadius:12,transition:"top 0.15s ease-out"}:{...O,width:A??"100%",height:H,maxWidth:A?void 0:i.maxWidth},[M,c,O,A,H,i.maxWidth,Q,$,U]),Pe=s.useMemo(()=>{if(!M)return{aspectRatio:i.aspectRatio}},[M,i.aspectRatio]),Ce=`${u}20`;return e.jsxs(e.Fragment,{children:[q&&e.jsx("div",{ref:K,style:{height:1}}),e.jsxs("div",{ref:W,className:m.cn("Bear-MediaPlayer relative rounded-xl overflow-hidden bg-black",ge),style:Ee,"data-testid":ye,...be,children:[e.jsx(Be,{ref:h,src:Ie,poster:B,autoPlay:z,loop:f&&!d,muted:G,controls:k,playsInline:!0,className:m.cn(c==="video"?"Bear-MediaPlayer__video w-full object-cover":"hidden"),style:c==="video"?Pe:void 0,onClick:c==="video"?E:void 0}),me&&c==="video"&&Ne&&!k&&e.jsx("button",{type:"button",onClick:E,className:"Bear-MediaPlayer__overlay absolute inset-0 flex items-center justify-center bg-black/30 transition-opacity",children:e.jsx("div",{className:"w-16 h-16 rounded-full bg-white/90 flex items-center justify-center shadow-lg",children:p?Z??e.jsx(n.BearIcons.PauseIcon,{size:j.CENTER_ICON_SIZE,className:"text-gray-900"}):Y??e.jsx(n.BearIcons.PlayIcon,{size:j.CENTER_ICON_SIZE,className:"text-gray-900"})})}),!k&&c==="video"&&e.jsxs("div",{className:m.cn("Bear-MediaPlayer__controls absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/80 to-transparent pt-8",i.padding),children:[e.jsx("div",{className:"Bear-MediaPlayer__progress w-full cursor-pointer mb-2 group",style:{height:j.PROGRESS_HEIGHT},onClick:ee,children:e.jsx("div",{className:"w-full h-full bg-white/30 rounded-full relative overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full transition-all",style:{width:`${ne}%`,backgroundColor:u}})})}),e.jsxs("div",{className:m.cn("Bear-MediaPlayer__bar flex items-center",i.gap),children:[d&&e.jsx("button",{type:"button",onClick:re,className:"text-white hover:text-primary-400 transition-colors",children:e.jsx(n.BearIcons.SkipBackIcon,{size:y})}),e.jsx("button",{type:"button",onClick:E,className:"text-white hover:text-primary-400 transition-colors",children:ie}),d&&e.jsx("button",{type:"button",onClick:ae,className:"text-white hover:text-primary-400 transition-colors",children:e.jsx(n.BearIcons.SkipForwardIcon,{size:y})}),e.jsx("button",{type:"button",onClick:te,className:"text-white hover:text-primary-400 transition-colors",children:oe}),e.jsxs("span",{className:m.cn("Bear-MediaPlayer__time text-white font-mono",i.text),children:[C.formatTime(N)," / ",C.formatTime(g)]}),e.jsx("div",{className:"flex-1"}),e.jsx("button",{type:"button",onClick:se,className:"transition-colors",style:{color:f?u:void 0},title:"Loop",children:e.jsx(n.BearIcons.RepeatIcon,{size:y,className:f?void 0:"text-white/60 hover:text-white"})}),he&&e.jsx("button",{type:"button",onClick:Me,className:"text-white hover:text-primary-400 transition-colors",title:"AirPlay",children:e.jsx(n.BearIcons.CastIcon,{size:y})}),e.jsx("button",{type:"button",onClick:Se,className:"text-white hover:text-primary-400 transition-colors",children:_e})]}),d&&o.title&&e.jsxs("div",{className:"mt-1 flex items-center gap-2 truncate",children:[e.jsx("span",{className:"text-white text-xs font-medium truncate",children:o.title}),o.artist&&e.jsxs("span",{className:"text-white/50 text-xs truncate",children:["— ",o.artist]})]})]}),c==="audio"&&!k&&e.jsxs("div",{className:m.cn("Bear-MediaPlayer__audio bg-gray-100 dark:bg-zinc-800 rounded-xl",i.padding),children:[d&&(B||o.title)&&e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[B&&e.jsx("img",{src:B,alt:"",className:"w-12 h-12 rounded-lg object-cover shrink-0"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[o.title&&e.jsx("p",{className:"text-sm font-semibold text-gray-900 dark:text-white truncate",children:o.title}),o.artist&&e.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 truncate",children:o.artist})]})]}),e.jsx("div",{className:"Bear-MediaPlayer__progress w-full cursor-pointer mb-1",style:{height:j.PROGRESS_HEIGHT},onClick:ee,children:e.jsx("div",{className:"w-full h-full bg-gray-300 dark:bg-zinc-600 rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full",style:{width:`${ne}%`,backgroundColor:u}})})}),e.jsxs("div",{className:"flex justify-between mb-2",children:[e.jsx("span",{className:m.cn("text-gray-500 font-mono",i.text),children:C.formatTime(N)}),e.jsx("span",{className:m.cn("text-gray-500 font-mono",i.text),children:C.formatTime(g)})]}),e.jsxs("div",{className:m.cn("flex items-center justify-center",i.gap),children:[e.jsx("button",{type:"button",onClick:se,className:"transition-colors",style:{color:f?u:void 0},title:"Loop",children:e.jsx(n.BearIcons.RepeatIcon,{size:y,className:f?void 0:"text-gray-400 hover:text-gray-600 dark:hover:text-gray-300"})}),d&&e.jsx("button",{type:"button",onClick:re,className:"text-gray-600 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white transition-colors",children:e.jsx(n.BearIcons.SkipBackIcon,{size:P})}),e.jsx("button",{type:"button",onClick:E,className:"Bear-MediaPlayer__play w-10 h-10 rounded-full flex items-center justify-center text-white transition-colors",style:{backgroundColor:u},children:ie}),d&&e.jsx("button",{type:"button",onClick:ae,className:"text-gray-600 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white transition-colors",children:e.jsx(n.BearIcons.SkipForwardIcon,{size:P})}),e.jsx("button",{type:"button",onClick:te,className:"text-gray-500 hover:text-gray-700 dark:hover:text-gray-300",children:oe})]})]}),d&&!k&&e.jsx("div",{className:"Bear-MediaPlayer__playlist bg-gray-50 dark:bg-zinc-900 border-t border-gray-200 dark:border-zinc-700 max-h-48 overflow-y-auto",children:x.map((t,r)=>{const a=r===l;return e.jsxs("button",{type:"button",onClick:()=>v(r),className:m.cn("w-full flex items-center gap-3 px-3 py-2 text-left transition-colors",!a&&"hover:bg-gray-100 dark:hover:bg-zinc-800"),style:a?{backgroundColor:Ce}:void 0,children:[t.poster&&e.jsx("img",{src:t.poster,alt:"",className:"w-8 h-8 rounded object-cover shrink-0"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"text-xs font-medium truncate",style:a?{color:u}:void 0,children:t.title??`Track ${r+1}`}),t.artist&&e.jsx("p",{className:"text-[10px] text-gray-400 truncate",children:t.artist})]}),a&&p&&e.jsxs("div",{className:"flex items-end gap-0.5 h-3",children:[e.jsx("span",{className:"w-0.5 rounded-full animate-pulse",style:{height:"60%",backgroundColor:u}}),e.jsx("span",{className:"w-0.5 rounded-full animate-pulse",style:{height:"100%",backgroundColor:u,animationDelay:"0.2s"}}),e.jsx("span",{className:"w-0.5 rounded-full animate-pulse",style:{height:"40%",backgroundColor:u,animationDelay:"0.4s"}})]}),e.jsx("span",{className:"text-[10px] text-gray-400 tabular-nums shrink-0",children:r+1})]},r)})})]})]})};exports.MediaPlayer=ze;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as e, jsxs as s, Fragment as De } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as $, useState as g, useMemo as G, useEffect as U, useCallback as p } from "react";
|
|
3
3
|
import { cn as h } from "../../utils/cn.js";
|
|
4
|
-
import { BearIcons as i } from "
|
|
4
|
+
import { BearIcons as i } from "@forgedevstack/bear-icons";
|
|
5
5
|
import { SIZE_MAP as Oe, CENTER_ICON_SIZE as me, PROGRESS_HEIGHT as he, DEFAULT_ACCENT as Ye } from "./MediaPlayer.const.js";
|
|
6
6
|
import { formatTime as C } from "./MediaPlayer.utils.js";
|
|
7
7
|
import { useBearStyles as $e } from "../../hooks/useBearStyles.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),A=require("../../constants/generals.const.cjs"),B=require("../../utils/cn.cjs");require("react");const y=require("../../utils/generateBearId.utils.cjs"),I=require("../../utils/useBearId.cjs"),s=require("../Button/Button.cjs"),S=require("../Flex/Flex.cjs"),h=require("./MessageActions.const.cjs"),m=a=>{const{id:c,testId:l,onCopy:n,onRetry:o,onGood:r,onBad:i,translations:u,className:d}=a,g=I.useBearId(A.COMPONENT_NAME_MESSAGE_ACTIONS),b=y.resolveBearId(c,g),t={...h.MESSAGE_ACTIONS_DEFAULT_TRANSLATIONS,...u};return e.jsxs(S.Flex,{id:b,testId:l,className:B.cn("Bear-MessageActions",d),align:"center",gap:1,children:[n&&e.jsx(s.Button,{type:"button",variant:"ghost",size:"sm",onClick:n,children:t.copyLabel}),o&&e.jsx(s.Button,{type:"button",variant:"ghost",size:"sm",onClick:o,children:t.retryLabel}),r&&e.jsx(s.Button,{type:"button",variant:"ghost",size:"sm",onClick:r,children:t.goodLabel}),i&&e.jsx(s.Button,{type:"button",variant:"ghost",size:"sm",onClick:i,children:t.badLabel})]})};exports.MessageActions=m;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../constants/generals.const.cjs"),L={copyLabel:e.LABEL_COPY,retryLabel:e.LABEL_RETRY,goodLabel:e.LABEL_GOOD_RESPONSE,badLabel:e.LABEL_BAD_RESPONSE};exports.MESSAGE_ACTIONS_DEFAULT_TRANSLATIONS=L;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { LABEL_BAD_RESPONSE as L, LABEL_GOOD_RESPONSE as E, LABEL_RETRY as A, LABEL_COPY as S } from "../../constants/generals.const.js";
|
|
2
|
+
const o = {
|
|
3
|
+
copyLabel: S,
|
|
4
|
+
retryLabel: A,
|
|
5
|
+
goodLabel: E,
|
|
6
|
+
badLabel: L
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
o as MESSAGE_ACTIONS_DEFAULT_TRANSLATIONS
|
|
10
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsxs as g, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { COMPONENT_NAME_MESSAGE_ACTIONS as A } from "../../constants/generals.const.js";
|
|
3
|
+
import { cn as h } from "../../utils/cn.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import { resolveBearId as N } from "../../utils/generateBearId.utils.js";
|
|
6
|
+
import { useBearId as f } from "../../utils/useBearId.js";
|
|
7
|
+
import { Button as e } from "../Button/Button.js";
|
|
8
|
+
import { Flex as y } from "../Flex/Flex.js";
|
|
9
|
+
import { MESSAGE_ACTIONS_DEFAULT_TRANSLATIONS as C } from "./MessageActions.const.js";
|
|
10
|
+
const B = (a) => {
|
|
11
|
+
const { id: m, testId: c, onCopy: r, onRetry: n, onGood: s, onBad: i, translations: l, className: d } = a, p = f(A), b = N(m, p), o = { ...C, ...l };
|
|
12
|
+
return /* @__PURE__ */ g(
|
|
13
|
+
y,
|
|
14
|
+
{
|
|
15
|
+
id: b,
|
|
16
|
+
testId: c,
|
|
17
|
+
className: h("Bear-MessageActions", d),
|
|
18
|
+
align: "center",
|
|
19
|
+
gap: 1,
|
|
20
|
+
children: [
|
|
21
|
+
r && /* @__PURE__ */ t(e, { type: "button", variant: "ghost", size: "sm", onClick: r, children: o.copyLabel }),
|
|
22
|
+
n && /* @__PURE__ */ t(e, { type: "button", variant: "ghost", size: "sm", onClick: n, children: o.retryLabel }),
|
|
23
|
+
s && /* @__PURE__ */ t(e, { type: "button", variant: "ghost", size: "sm", onClick: s, children: o.goodLabel }),
|
|
24
|
+
i && /* @__PURE__ */ t(e, { type: "button", variant: "ghost", size: "sm", onClick: i, children: o.badLabel })
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
};
|
|
29
|
+
export {
|
|
30
|
+
B as MessageActions
|
|
31
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface MessageActionsTranslations {
|
|
2
|
+
copyLabel: string;
|
|
3
|
+
retryLabel: string;
|
|
4
|
+
goodLabel: string;
|
|
5
|
+
badLabel: string;
|
|
6
|
+
}
|
|
7
|
+
export interface MessageActionsProps {
|
|
8
|
+
id?: string;
|
|
9
|
+
testId?: string;
|
|
10
|
+
onCopy?: () => void;
|
|
11
|
+
onRetry?: () => void;
|
|
12
|
+
onGood?: () => void;
|
|
13
|
+
onBad?: () => void;
|
|
14
|
+
translations?: Partial<MessageActionsTranslations>;
|
|
15
|
+
className?: string;
|
|
16
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),E=require("react"),x=require("react-dom"),a=require("../../utils/cn.cjs"),j=require("../../utils/generateBearId.utils.cjs"),q=require("../../utils/useBearId.cjs"),g=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),E=require("react"),x=require("react-dom"),a=require("../../utils/cn.cjs"),j=require("../../utils/generateBearId.utils.cjs"),q=require("../../utils/useBearId.cjs"),g=require("@forgedevstack/bear-icons/navigation"),w=require("../Backdrop/Backdrop.cjs"),e=require("./Modal.const.cjs"),R=m=>{const{isOpen:s,onClose:l,title:r,children:L,size:M="md",showCloseButton:d=!0,closeOnEscape:A=!0,disableEscapeKeyDown:B=!1,lockBodyScroll:C=!0,cancelPreventScroll:O=!1,closeOnBackdrop:k=!0,hideBackdrop:b=!1,keepMounted:n=!1,isCancelBackgroundClick:i,zIndex:v=e.MODAL_Z_INDEX,className:y,footer:u,testId:D,id:f}=m,h=q.useBearId("Modal"),c=j.resolveBearId(f,h),_=C&&!O,p=i!==void 0?i:k,S=A&&!B,t=E.useCallback(N=>{S&&N.key==="Escape"&&l()},[S,l]);if(E.useEffect(()=>{if(s)return document.addEventListener("keydown",t),_&&(document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",t),document.body.style.overflow=""}},[s,t,_]),!s&&!n)return null;const I=o.jsxs("div",{className:e.MODAL_ROOT_CLASSES,"data-testid":D,id:c,style:{zIndex:v},children:[!b&&o.jsx(w.Backdrop,{open:s,keepMounted:n,blur:!0,nested:!0,className:"Bear-Modal__backdrop",onClick:p?()=>l():void 0}),o.jsxs("div",{role:"dialog","aria-modal":"true","aria-labelledby":r?`${c}-title`:void 0,className:a.cn("Bear-Modal__container",e.MODAL_CONTAINER_CLASSES,e.MODAL_SIZE_CLASSES[M],y),style:{zIndex:e.MODAL_PANEL_Z_INDEX},children:[(r||d)&&o.jsxs("div",{className:a.cn("Bear-Modal__header",e.MODAL_HEADER_CLASSES),children:[r&&o.jsx("h2",{id:`${c}-title`,className:a.cn("Bear-Modal__title",e.MODAL_TITLE_CLASSES),children:r}),d&&o.jsx("button",{onClick:l,className:a.cn("Bear-Modal__close",e.MODAL_CLOSE_CLASSES),"aria-label":"Close modal",children:o.jsx(g.CloseIcon,{className:"bear-w-5 bear-h-5"})})]}),o.jsx("div",{className:a.cn("Bear-Modal__body",e.MODAL_BODY_CLASSES),children:L}),u&&o.jsx("div",{className:a.cn("Bear-Modal__footer",e.MODAL_FOOTER_CLASSES),children:u})]})]});return x.createPortal(I,document.body)};exports.Modal=R;
|
|
@@ -4,7 +4,7 @@ import { createPortal as x } from "react-dom";
|
|
|
4
4
|
import { cn as o } from "../../utils/cn.js";
|
|
5
5
|
import { resolveBearId as T } from "../../utils/generateBearId.utils.js";
|
|
6
6
|
import { useBearId as R } from "../../utils/useBearId.js";
|
|
7
|
-
import { CloseIcon as g } from "
|
|
7
|
+
import { CloseIcon as g } from "@forgedevstack/bear-icons/navigation";
|
|
8
8
|
import { Backdrop as z } from "../Backdrop/Backdrop.js";
|
|
9
9
|
import { MODAL_Z_INDEX as P, MODAL_ROOT_CLASSES as Z, MODAL_PANEL_Z_INDEX as j, MODAL_TITLE_CLASSES as X, MODAL_CLOSE_CLASSES as $, MODAL_HEADER_CLASSES as F, MODAL_BODY_CLASSES as H, MODAL_FOOTER_CLASSES as K, MODAL_SIZE_CLASSES as Y, MODAL_CONTAINER_CLASSES as q } from "./Modal.const.js";
|
|
10
10
|
const le = (u) => {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),M=require("../../constants/generals.const.cjs"),_=require("../../utils/cn.cjs");require("react");const b=require("../../utils/generateBearId.utils.cjs"),B=require("../../utils/useBearId.cjs"),I=require("../Box/Box.cjs"),L=require("../Select/Select.cjs"),g=require("./ModelSelect.const.cjs"),m=t=>{const{id:r,testId:l,models:o,value:c,onChange:n,label:a,placeholder:d=g.MODEL_SELECT_DEFAULT_PLACEHOLDER,disabled:i,className:u}=t,E=B.useBearId(M.COMPONENT_NAME_MODEL_SELECT),S=b.resolveBearId(r,E),q=o.map(e=>({value:e.id,label:e.label,disabled:e.disabled}));return s.jsx(I.Box,{id:S,"data-testid":l,className:_.cn("Bear-ModelSelect",u),children:s.jsx(L.Select,{options:q,value:c,onChange:n,label:a,placeholder:d,disabled:i,size:"sm"})})};exports.ModelSelect=m;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E="Model";exports.MODEL_SELECT_DEFAULT_PLACEHOLDER=E;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const MODEL_SELECT_DEFAULT_PLACEHOLDER = "Model";
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { COMPONENT_NAME_MODEL_SELECT as L } from "../../constants/generals.const.js";
|
|
3
|
+
import { cn as b } from "../../utils/cn.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import { resolveBearId as M } from "../../utils/generateBearId.utils.js";
|
|
6
|
+
import { useBearId as _ } from "../../utils/useBearId.js";
|
|
7
|
+
import { Box as C } from "../Box/Box.js";
|
|
8
|
+
import { Select as I } from "../Select/Select.js";
|
|
9
|
+
import { MODEL_SELECT_DEFAULT_PLACEHOLDER as N } from "./ModelSelect.const.js";
|
|
10
|
+
const A = (r) => {
|
|
11
|
+
const {
|
|
12
|
+
id: t,
|
|
13
|
+
testId: a,
|
|
14
|
+
models: d,
|
|
15
|
+
value: l,
|
|
16
|
+
onChange: m,
|
|
17
|
+
label: s,
|
|
18
|
+
placeholder: i = N,
|
|
19
|
+
disabled: c,
|
|
20
|
+
className: p
|
|
21
|
+
} = r, n = _(L), E = M(t, n), f = d.map((e) => ({
|
|
22
|
+
value: e.id,
|
|
23
|
+
label: e.label,
|
|
24
|
+
disabled: e.disabled
|
|
25
|
+
}));
|
|
26
|
+
return /* @__PURE__ */ o(C, { id: E, "data-testid": a, className: b("Bear-ModelSelect", p), children: /* @__PURE__ */ o(
|
|
27
|
+
I,
|
|
28
|
+
{
|
|
29
|
+
options: f,
|
|
30
|
+
value: l,
|
|
31
|
+
onChange: m,
|
|
32
|
+
label: s,
|
|
33
|
+
placeholder: i,
|
|
34
|
+
disabled: c,
|
|
35
|
+
size: "sm"
|
|
36
|
+
}
|
|
37
|
+
) });
|
|
38
|
+
};
|
|
39
|
+
export {
|
|
40
|
+
A as ModelSelect
|
|
41
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface ModelSelectOption {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface ModelSelectProps {
|
|
7
|
+
id?: string;
|
|
8
|
+
testId?: string;
|
|
9
|
+
models: ModelSelectOption[];
|
|
10
|
+
value?: string;
|
|
11
|
+
onChange?: (id: string) => void;
|
|
12
|
+
label?: string;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
className?: string;
|
|
16
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react");const E=require("../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.cjs"),_={[E.OVERLAY_OPEN_EFFECT_FADE]:E.OVERLAY_OPEN_EFFECT_FADE,[E.OVERLAY_OPEN_EFFECT_SLIDE_DOWN]:E.OVERLAY_OPEN_EFFECT_SLIDE_DOWN,[E.OVERLAY_OPEN_EFFECT_SCALE]:E.OVERLAY_OPEN_EFFECT_SCALE};exports.OVERLAY_OPEN_EFFECT_NONE=E.OVERLAY_OPEN_EFFECT_NONE;exports.OVERLAY_EFFECT_TRANSITION=_;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react");const E=require("../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.cjs"),_={[E.OVERLAY_OPEN_EFFECT_FADE]:E.OVERLAY_OPEN_EFFECT_FADE,[E.OVERLAY_OPEN_EFFECT_SLIDE_DOWN]:E.OVERLAY_OPEN_EFFECT_SLIDE_DOWN,[E.OVERLAY_OPEN_EFFECT_SCALE]:E.OVERLAY_OPEN_EFFECT_SCALE,[E.OVERLAY_OPEN_EFFECT_FOLD]:E.OVERLAY_OPEN_EFFECT_FOLD};exports.OVERLAY_OPEN_EFFECT_NONE=E.OVERLAY_OPEN_EFFECT_NONE;exports.OVERLAY_EFFECT_TRANSITION=_;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import "react";
|
|
2
|
-
import {
|
|
3
|
-
import { OVERLAY_OPEN_EFFECT_NONE as
|
|
4
|
-
const
|
|
2
|
+
import { OVERLAY_OPEN_EFFECT_FOLD as E, OVERLAY_OPEN_EFFECT_SCALE as _, OVERLAY_OPEN_EFFECT_SLIDE_DOWN as O, OVERLAY_OPEN_EFFECT_FADE as F } from "../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.js";
|
|
3
|
+
import { OVERLAY_OPEN_EFFECT_NONE as C } from "../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.js";
|
|
4
|
+
const L = {
|
|
5
|
+
[F]: F,
|
|
5
6
|
[O]: O,
|
|
6
7
|
[_]: _,
|
|
7
8
|
[E]: E
|
|
8
9
|
};
|
|
9
10
|
export {
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
L as OVERLAY_EFFECT_TRANSITION,
|
|
12
|
+
C as OVERLAY_OPEN_EFFECT_NONE
|
|
12
13
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("../../utils/cn.cjs");require("react");const u=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("../../utils/cn.cjs");require("react");const u=require("@forgedevstack/bear-icons"),r=require("./PageNav.const.cjs"),p=({size:a})=>e.jsx(u.Icon,{size:a,children:e.jsx("polyline",{points:"15 18 9 12 15 6"})}),h=({size:a})=>e.jsx(u.Icon,{size:a,children:e.jsx("polyline",{points:"9 6 15 12 9 18"})}),d=({item:a,direction:l,linkClass:n,labelClass:b,iconClass:t,sizeClass:x,iconSize:c})=>{const s=l==="prev",o=a.href?"a":"button",j=a.href?{href:a.href}:{type:"button",onClick:a.onClick};return e.jsxs(o,{...j,className:i.cn("bear-flex bear-flex-col bear-gap-1 bear-no-underline bear-min-w-0",s?"bear-items-start":"bear-items-end bear-ml-auto",n,x),children:[e.jsx("span",{className:i.cn("bear-text-[10px] bear-font-semibold bear-uppercase bear-tracking-wider",b),children:s?"Previous":"Next"}),e.jsxs("span",{className:"bear-flex bear-items-center bear-gap-1.5 bear-font-medium",children:[s&&e.jsx("span",{className:i.cn("bear-flex-shrink-0",t),children:a.icon??e.jsx(p,{size:c})}),e.jsx("span",{className:"bear-truncate",children:a.label}),!s&&e.jsx("span",{className:i.cn("bear-flex-shrink-0",t),children:a.icon??e.jsx(h,{size:c})})]})]})},f=({prev:a,next:l,size:n="md",variant:b="default",className:t,testId:x,"aria-label":c="Page navigation"})=>{if(!a&&!l)return null;const s=r.VARIANT_CLASSES[b],o=r.ICON_SIZE[n];return e.jsxs("nav",{"data-testid":x,className:i.cn(r.ROOT_CLASS,"bear-flex bear-items-start bear-justify-between bear-gap-4 bear-border-t bear-border-zinc-700/50",r.SIZE_CLASSES[n],t),"aria-label":c,children:[a?e.jsx(d,{item:a,direction:"prev",linkClass:s.link,labelClass:s.label,iconClass:s.icon,sizeClass:r.LINK_SIZE[n],iconSize:o}):e.jsx("span",{}),l?e.jsx(d,{item:l,direction:"next",linkClass:s.link,labelClass:s.label,iconClass:s.icon,sizeClass:r.LINK_SIZE[n],iconSize:o}):e.jsx("span",{})]})};exports.PageNav=f;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as p, jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { cn as l } from "../../utils/cn.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import { Icon as f } from "
|
|
4
|
+
import { Icon as f } from "@forgedevstack/bear-icons";
|
|
5
5
|
import { ICON_SIZE as C, LINK_SIZE as d, VARIANT_CLASSES as u, SIZE_CLASSES as N, ROOT_CLASS as x } from "./PageNav.const.js";
|
|
6
6
|
const S = ({ size: e }) => /* @__PURE__ */ a(f, { size: e, children: /* @__PURE__ */ a("polyline", { points: "15 18 9 12 15 6" }) }), g = ({ size: e }) => /* @__PURE__ */ a(f, { size: e, children: /* @__PURE__ */ a("polyline", { points: "9 6 15 12 9 18" }) }), m = ({ item: e, direction: s, linkClass: n, labelClass: c, iconClass: i, sizeClass: b, iconSize: t }) => {
|
|
7
7
|
const r = s === "prev", o = e.href ? "a" : "button", h = e.href ? { href: e.href } : { type: "button", onClick: e.onClick };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),s=require("react"),b=require("../../utils/cn.cjs"),L=require("../Input/Input.cjs"),i=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),s=require("react"),b=require("../../utils/cn.cjs"),L=require("../Input/Input.cjs"),i=require("@forgedevstack/bear-icons/action"),_=b.cn("Bear-PasswordInput__shift bear-text-xs bear-font-medium bear-px-1.5 bear-py-0.5","bear-rounded bear-bg-amber-100 bear-text-amber-700","dark:bear-bg-amber-900/40 dark:bear-text-amber-400","bear-select-none bear-whitespace-nowrap"),S=({visible:t,onVisibilityChange:a,hideToggle:d=!1,toggleAriaLabel:u="Toggle password visibility",showShiftIndicator:n=!1,visibleIcon:l,hiddenIcon:p,...w})=>{const[x,m]=s.useState(!1),[f,I]=s.useState(!1),o=t!==void 0,c=o?t:x,g=s.useCallback(()=>{o?a==null||a(!t):m(e=>!e)},[o,t,a]);s.useEffect(()=>{if(!n)return;const e=j=>I(j.getModifierState("CapsLock"));return window.addEventListener("keydown",e),window.addEventListener("keyup",e),()=>{window.removeEventListener("keydown",e),window.removeEventListener("keyup",e)}},[n]);const v=r.jsx(i.VisibilityOffIcon,{className:"bear-w-4 bear-h-4"}),k=r.jsx(i.VisibilityIcon,{className:"bear-w-4 bear-h-4"}),y=d?void 0:r.jsxs("span",{className:"Bear-PasswordInput__actions bear-inline-flex bear-items-center bear-gap-1.5",children:[n&&f&&r.jsx("span",{className:_,children:"Caps"}),r.jsx("button",{type:"button",tabIndex:-1,onClick:g,className:b.cn("Bear-PasswordInput__toggle bear-inline-flex bear-items-center bear-justify-center","bear-text-gray-400 hover:bear-text-gray-600 dark:hover:bear-text-gray-300","bear-transition-colors bear-cursor-pointer"),"aria-label":u,children:c?l??v:p??k})]});return r.jsx(L.Input,{type:c?"text":"password",rightAddon:y,autoComplete:"current-password",...w})};exports.PasswordInput=S;
|
|
@@ -2,7 +2,7 @@ import { jsxs as L, jsx as r } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as b, useCallback as _, useEffect as E } from "react";
|
|
3
3
|
import { cn as c } from "../../utils/cn.js";
|
|
4
4
|
import { Input as N } from "../Input/Input.js";
|
|
5
|
-
import { VisibilityOffIcon as B, VisibilityIcon as C } from "
|
|
5
|
+
import { VisibilityOffIcon as B, VisibilityIcon as C } from "@forgedevstack/bear-icons/action";
|
|
6
6
|
const O = c(
|
|
7
7
|
"Bear-PasswordInput__shift bear-text-xs bear-font-medium bear-px-1.5 bear-py-0.5",
|
|
8
8
|
"bear-rounded bear-bg-amber-100 bear-text-amber-700",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),T=require("react"),i=require("../../constants/generals.const.cjs"),V=require("../../utils/cn.cjs"),$=require("../../utils/generateBearId.utils.cjs"),Y=require("../../utils/useBearId.cjs"),R=require("../Box/Box.cjs"),d=require("../Button/Button.cjs"),g=require("../Flex/Flex.cjs"),s=require("./PromptComposer.const.cjs"),c=require("./PromptComposer.utils.cjs"),z=require("./helpers/PromptComposerAttachSvg.cjs"),H=require("./helpers/PromptComposerFileChip.cjs"),K=require("./helpers/PromptComposerSendSvg.cjs"),J=require("./helpers/PromptComposerStopSvg.cjs"),Q=x=>{const{id:f,testId:M,value:P,defaultValue:b=s.PROMPT_COMPOSER_DEFAULT_VALUE,onChange:p,onSubmit:a,onStop:_,onAttach:m,files:E,onFileRemove:B,isStreaming:o=s.PROMPT_COMPOSER_DEFAULT_STREAMING,disabled:r=s.PROMPT_COMPOSER_DEFAULT_DISABLED,allowAttach:v=s.PROMPT_COMPOSER_DEFAULT_ATTACH,accept:A,placeholder:I,translations:j,footer:q,className:N}=x,y=Y.useBearId(i.COMPONENT_NAME_PROMPT_COMPOSER),C=$.resolveBearId(f,y),S=T.useRef(null),[D,F]=T.useState(b),n=c.resolvePromptDraft({value:P},D),l={...s.PROMPT_COMPOSER_DEFAULT_TRANSLATIONS,...j},L=`${C}-field`,h=c.canSubmitPrompt(n,r,o),u=e=>{c.shouldUseInternalDraft(P)&&F(e),p==null||p(e)},w=()=>{const e=n.trim();!h||!e||(a==null||a(e),u(i.EMPTY_STRING))},U=()=>{var e;(e=S.current)==null||e.click()},k=e=>{!e||e.length===0||m==null||m(Array.from(e))},G=o&&!!_,O=E??[];return t.jsxs(R.Box,{id:C,"data-testid":M,className:V.cn("Bear-PromptComposer",N),children:[O.length>0&&t.jsx(g.Flex,{className:"Bear-PromptComposer__files",wrap:"wrap",gap:2,children:O.map(e=>t.jsx(H.PromptComposerFileChip,{file:e,disabled:r,onRemove:B},`${e.name}-${e.size}-${e.lastModified}`))}),t.jsxs(g.Flex,{className:"Bear-PromptComposer__row",align:"end",gap:2,children:[v&&t.jsx(d.Button,{type:"button",variant:"ghost",iconOnly:!0,disabled:r||o,"aria-label":l.attachLabel,onClick:U,children:t.jsx(z.PromptComposerAttachSvg,{})}),t.jsx(R.Box,{className:"Bear-PromptComposer__field",children:t.jsx("textarea",{id:L,className:"Bear-PromptComposer__textarea",value:n,placeholder:I??l.placeholder,disabled:r,rows:2,onChange:e=>u(e.target.value),onKeyDown:e=>c.submitPromptDraft({event:e,disabled:r,isStreaming:o,onSubmit:a,draft:n,clearDraft:()=>u(i.EMPTY_STRING)})})}),G?t.jsx(d.Button,{type:"button",variant:"secondary",iconOnly:!0,"aria-label":l.stopLabel,onClick:_,children:t.jsx(J.PromptComposerStopSvg,{})}):t.jsx(d.Button,{type:"button",variant:"primary",iconOnly:!0,disabled:!h,"aria-label":l.sendLabel,onClick:w,children:t.jsx(K.PromptComposerSendSvg,{})})]}),t.jsx("input",{ref:S,type:"file",hidden:!0,multiple:!0,accept:A,disabled:r||o,onChange:e=>{k(e.target.files),e.target.value=i.EMPTY_STRING}}),q]})};exports.PromptComposer=Q;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("../../constants/generals.const.cjs"),_={placeholder:O.PLACEHOLDER_START_TYPING,sendLabel:O.LABEL_SEND,stopLabel:O.LABEL_STOP,attachLabel:O.LABEL_ATTACH},E=O.BOOLEAN_FALSE,T=O.BOOLEAN_FALSE,A=O.BOOLEAN_FALSE,P=O.EMPTY_STRING;exports.PROMPT_COMPOSER_DEFAULT_ATTACH=A;exports.PROMPT_COMPOSER_DEFAULT_DISABLED=E;exports.PROMPT_COMPOSER_DEFAULT_STREAMING=T;exports.PROMPT_COMPOSER_DEFAULT_TRANSLATIONS=_;exports.PROMPT_COMPOSER_DEFAULT_VALUE=P;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { PromptComposerTranslations } from './PromptComposer.types';
|
|
2
|
+
export declare const PROMPT_COMPOSER_DEFAULT_TRANSLATIONS: PromptComposerTranslations;
|
|
3
|
+
export declare const PROMPT_COMPOSER_DEFAULT_DISABLED = false;
|
|
4
|
+
export declare const PROMPT_COMPOSER_DEFAULT_STREAMING = false;
|
|
5
|
+
export declare const PROMPT_COMPOSER_DEFAULT_ATTACH = false;
|
|
6
|
+
export declare const PROMPT_COMPOSER_DEFAULT_VALUE = "";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { EMPTY_STRING as E, BOOLEAN_FALSE as T, LABEL_ATTACH as _, LABEL_STOP as A, LABEL_SEND as L, PLACEHOLDER_START_TYPING as O } from "../../constants/generals.const.js";
|
|
2
|
+
const R = {
|
|
3
|
+
placeholder: O,
|
|
4
|
+
sendLabel: L,
|
|
5
|
+
stopLabel: A,
|
|
6
|
+
attachLabel: _
|
|
7
|
+
}, S = T, M = T, o = T, t = E;
|
|
8
|
+
export {
|
|
9
|
+
o as PROMPT_COMPOSER_DEFAULT_ATTACH,
|
|
10
|
+
S as PROMPT_COMPOSER_DEFAULT_DISABLED,
|
|
11
|
+
M as PROMPT_COMPOSER_DEFAULT_STREAMING,
|
|
12
|
+
R as PROMPT_COMPOSER_DEFAULT_TRANSLATIONS,
|
|
13
|
+
t as PROMPT_COMPOSER_DEFAULT_VALUE
|
|
14
|
+
};
|