@forgedevstack/bear 1.2.3 → 1.2.5
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/Accordion/Accordion.cjs +1 -1
- package/dist/components/Accordion/Accordion.js +45 -47
- package/dist/components/ActionIcon/ActionIcon.types.d.ts +1 -0
- package/dist/components/ActiveBar/ActiveBar.const.d.ts +1 -0
- package/dist/components/ActiveBar/ActiveBar.types.d.ts +2 -0
- package/dist/components/ActivityItem/ActivityItem.const.d.ts +1 -0
- package/dist/components/ActivityItem/ActivityItem.types.d.ts +2 -0
- package/dist/components/Affix/Affix.types.d.ts +1 -0
- package/dist/components/Alert/Alert.cjs +1 -1
- package/dist/components/Alert/Alert.js +16 -18
- package/dist/components/AlertDialog/AlertDialog.types.d.ts +1 -0
- package/dist/components/Anchor/Anchor.types.d.ts +1 -0
- package/dist/components/AnimatedCounter/AnimatedCounter.types.d.ts +1 -0
- package/dist/components/AppBar/AppBar.const.d.ts +1 -0
- package/dist/components/AppBar/AppBar.types.d.ts +2 -0
- package/dist/components/AspectRatio/AspectRatio.cjs +1 -1
- package/dist/components/AspectRatio/AspectRatio.const.d.ts +1 -0
- package/dist/components/AspectRatio/AspectRatio.js +9 -1
- package/dist/components/AspectRatio/AspectRatio.types.d.ts +2 -0
- package/dist/components/Autocomplete/Autocomplete.types.d.ts +1 -0
- package/dist/components/Avatar/Avatar.types.d.ts +1 -0
- package/dist/components/BackTop/BackTop.types.d.ts +1 -0
- package/dist/components/Badge/Badge.types.d.ts +1 -0
- package/dist/components/BearLoader/BearLoader.const.d.ts +1 -0
- package/dist/components/BearLoader/BearLoader.types.d.ts +1 -0
- package/dist/components/BearLogo/BearLogo.const.d.ts +1 -0
- package/dist/components/BearLogo/BearLogo.types.d.ts +2 -0
- package/dist/components/Biometric/Biometric.const.d.ts +1 -0
- package/dist/components/Biometric/Biometric.types.d.ts +1 -0
- package/dist/components/Blockquote/Blockquote.types.d.ts +1 -0
- package/dist/components/BottomNavigation/BottomNavigation.const.d.ts +1 -0
- package/dist/components/BottomNavigation/BottomNavigation.types.d.ts +2 -0
- package/dist/components/BottomSheet/BottomSheet.const.d.ts +1 -0
- package/dist/components/BottomSheet/BottomSheet.types.d.ts +2 -0
- package/dist/components/Box/Box.const.d.ts +1 -0
- package/dist/components/Box/Box.types.d.ts +3 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.cjs +1 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.js +21 -23
- package/dist/components/Button/Button.cjs +1 -1
- package/dist/components/Button/Button.js +112 -100
- package/dist/components/Button/Button.types.d.ts +5 -1
- package/dist/components/ButtonGroup/ButtonGroup.const.d.ts +1 -0
- package/dist/components/ButtonGroup/ButtonGroup.types.d.ts +1 -0
- package/dist/components/Calendar/Calendar.cjs +1 -1
- package/dist/components/Calendar/Calendar.js +3 -2
- package/dist/components/Calendar/Calendar.types.d.ts +1 -0
- package/dist/components/Card/Card.cjs +1 -1
- package/dist/components/Card/Card.js +15 -17
- package/dist/components/Card/Card.types.d.ts +2 -2
- package/dist/components/CardSkeleton/CardSkeleton.const.d.ts +1 -0
- package/dist/components/CardSkeleton/index.d.ts +2 -0
- package/dist/components/Carousel/Carousel.types.d.ts +1 -0
- package/dist/components/Cascader/Cascader.cjs +1 -1
- package/dist/components/Cascader/Cascader.d.ts +1 -2
- package/dist/components/Cascader/Cascader.js +3 -3
- package/dist/components/Cascader/Cascader.types.d.ts +1 -0
- package/dist/components/Chart/Chart.cjs +1 -1
- package/dist/components/Chart/Chart.js +6 -2
- package/dist/components/Chart/Chart.types.d.ts +1 -0
- package/dist/components/Chat/Chat.const.cjs +1 -1
- package/dist/components/Chat/Chat.const.d.ts +1 -1
- package/dist/components/Chat/Chat.const.js +1 -1
- package/dist/components/Chat/Chat.types.d.ts +1 -0
- package/dist/components/Checkbox/Checkbox.cjs +1 -1
- package/dist/components/Checkbox/Checkbox.const.cjs +1 -0
- package/dist/components/Checkbox/Checkbox.const.d.ts +30 -0
- package/dist/components/Checkbox/Checkbox.const.js +58 -0
- package/dist/components/Checkbox/Checkbox.d.ts +0 -11
- package/dist/components/Checkbox/Checkbox.js +67 -110
- package/dist/components/Checkbox/Checkbox.types.d.ts +3 -12
- package/dist/components/Checkbox/helpers/CheckboxIndicatorIcon.cjs +1 -0
- package/dist/components/Checkbox/helpers/CheckboxIndicatorIcon.d.ts +2 -0
- package/dist/components/Checkbox/helpers/CheckboxIndicatorIcon.js +18 -0
- package/dist/components/Checkbox/helpers/CheckboxIndicatorIcon.types.d.ts +6 -0
- package/dist/components/Checkbox/helpers/index.d.ts +1 -0
- package/dist/components/Checkbox/index.d.ts +2 -2
- package/dist/components/CheckboxCard/CheckboxCard.types.d.ts +1 -0
- package/dist/components/Chip/Chip.const.d.ts +1 -0
- package/dist/components/Chip/Chip.types.d.ts +2 -0
- package/dist/components/CloseButton/CloseButton.const.d.ts +1 -0
- package/dist/components/CloseButton/CloseButton.types.d.ts +1 -0
- package/dist/components/CodeBlock/CodeBlock.cjs +2 -2
- package/dist/components/CodeBlock/CodeBlock.const.d.ts +1 -0
- package/dist/components/CodeBlock/CodeBlock.js +22 -24
- package/dist/components/CodeEditor/CodeEditor.types.d.ts +1 -0
- package/dist/components/Collapsible/Collapsible.const.d.ts +1 -0
- package/dist/components/Collapsible/Collapsible.types.d.ts +2 -0
- package/dist/components/ColorPicker/ColorPicker.types.d.ts +2 -0
- package/dist/components/ColorSwatch/ColorSwatch.cjs +1 -1
- package/dist/components/ColorSwatch/ColorSwatch.js +8 -8
- package/dist/components/ColorSwatch/ColorSwatch.types.d.ts +1 -0
- package/dist/components/Columns/Columns.const.d.ts +1 -0
- package/dist/components/Columns/Columns.types.d.ts +2 -0
- package/dist/components/CommandPalette/CommandPalette.cjs +1 -1
- package/dist/components/CommandPalette/CommandPalette.js +71 -71
- package/dist/components/CommandPalette/CommandPalette.types.d.ts +1 -0
- package/dist/components/Confetti/Confetti.types.d.ts +1 -0
- package/dist/components/Container/Container.const.d.ts +1 -0
- package/dist/components/Container/Container.types.d.ts +1 -0
- package/dist/components/ContextMenu/ContextMenu.cjs +1 -1
- package/dist/components/ContextMenu/ContextMenu.const.cjs +1 -1
- package/dist/components/ContextMenu/ContextMenu.const.d.ts +3 -0
- package/dist/components/ContextMenu/ContextMenu.const.js +13 -10
- package/dist/components/ContextMenu/ContextMenu.d.ts +1 -3
- package/dist/components/ContextMenu/ContextMenu.js +30 -59
- package/dist/components/ContextMenu/ContextMenu.types.d.ts +1 -0
- package/dist/components/ContextMenu/ContextMenu.utils.cjs +1 -1
- package/dist/components/ContextMenu/ContextMenu.utils.d.ts +7 -0
- package/dist/components/ContextMenu/ContextMenu.utils.js +11 -2
- package/dist/components/ContextMenu/components/ContextMenuMenuList/ContextMenuMenuList.cjs +1 -0
- package/dist/components/ContextMenu/components/ContextMenuMenuList/ContextMenuMenuList.d.ts +11 -0
- package/dist/components/ContextMenu/components/ContextMenuMenuList/ContextMenuMenuList.js +69 -0
- package/dist/components/ContextMenu/components/ContextMenuMenuList/index.d.ts +1 -0
- package/dist/components/CopyButton/CopyButton.const.d.ts +1 -0
- package/dist/components/CopyButton/CopyButton.types.d.ts +2 -0
- package/dist/components/CountdownTimer/CountdownTimer.types.d.ts +1 -0
- package/dist/components/CreditInput/CreditInput.types.d.ts +1 -0
- package/dist/components/CssBaseline/CssBaseline.cjs +1 -0
- package/dist/components/CssBaseline/CssBaseline.const.cjs +5 -0
- package/dist/components/CssBaseline/CssBaseline.const.d.ts +2 -0
- package/dist/components/CssBaseline/CssBaseline.const.js +9 -0
- package/dist/components/CssBaseline/CssBaseline.d.ts +2 -0
- package/dist/components/CssBaseline/CssBaseline.js +24 -0
- package/dist/components/CssBaseline/CssBaseline.types.d.ts +4 -0
- package/dist/components/CssBaseline/index.d.ts +2 -0
- package/dist/components/CurrencyInput/CurrencyInput.types.d.ts +1 -0
- package/dist/components/DataTable/DataTable.const.d.ts +1 -0
- package/dist/components/DataTable/DataTable.types.d.ts +1 -0
- package/dist/components/DatePicker/DatePicker.cjs +1 -1
- package/dist/components/DatePicker/DatePicker.const.d.ts +1 -0
- package/dist/components/DatePicker/DatePicker.js +12 -11
- package/dist/components/DatePicker/DatePicker.types.d.ts +2 -0
- package/dist/components/DateRangePicker/DateRangePicker.types.d.ts +1 -0
- package/dist/components/Descriptions/Descriptions.types.d.ts +1 -0
- package/dist/components/DiffSquares/DiffSquares.cjs +1 -1
- package/dist/components/DiffSquares/DiffSquares.js +11 -11
- package/dist/components/DiffSquares/DiffSquares.types.d.ts +1 -0
- package/dist/components/DiffViewer/DiffViewer.types.d.ts +1 -0
- package/dist/components/Divider/Divider.const.d.ts +1 -0
- package/dist/components/Divider/Divider.types.d.ts +1 -0
- package/dist/components/Dock/Dock.types.d.ts +1 -0
- package/dist/components/Drawer/Drawer.cjs +1 -1
- package/dist/components/Drawer/Drawer.js +44 -39
- package/dist/components/Drawer/Drawer.types.d.ts +5 -10
- package/dist/components/Dropdown/Dropdown.cjs +1 -1
- package/dist/components/Dropdown/Dropdown.js +3 -2
- package/dist/components/Dropdown/Dropdown.types.d.ts +1 -0
- package/dist/components/Editable/Editable.const.d.ts +1 -0
- package/dist/components/Editable/Editable.types.d.ts +2 -0
- package/dist/components/Em/Em.const.d.ts +1 -0
- package/dist/components/Em/Em.types.d.ts +2 -0
- package/dist/components/EmojiPicker/EmojiPicker.types.d.ts +2 -0
- package/dist/components/EmptyState/EmptyState.const.d.ts +1 -0
- package/dist/components/EmptyState/EmptyState.types.d.ts +2 -0
- package/dist/components/Fab/Fab.const.d.ts +1 -0
- package/dist/components/Fab/Fab.types.d.ts +1 -0
- package/dist/components/Fieldset/Fieldset.types.d.ts +1 -0
- package/dist/components/FileTree/FileTree.const.d.ts +1 -0
- package/dist/components/FileTree/FileTree.types.d.ts +1 -0
- package/dist/components/FileUpload/FileUpload.const.d.ts +1 -0
- package/dist/components/FileUpload/FileUpload.types.d.ts +2 -0
- package/dist/components/Flex/Flex.cjs +1 -1
- package/dist/components/Flex/Flex.const.cjs +1 -0
- package/dist/components/Flex/Flex.const.d.ts +6 -0
- package/dist/components/Flex/Flex.const.js +42 -0
- package/dist/components/Flex/Flex.d.ts +0 -11
- package/dist/components/Flex/Flex.js +28 -67
- package/dist/components/Flex/Flex.types.d.ts +1 -0
- package/dist/components/FloatingChat/FloatingChat.types.d.ts +1 -0
- package/dist/components/Form/Form.types.d.ts +1 -0
- package/dist/components/FormControl/FormControl.cjs +1 -0
- package/dist/components/FormControl/FormControl.const.cjs +1 -0
- package/dist/components/FormControl/FormControl.const.d.ts +5 -0
- package/dist/components/FormControl/FormControl.const.js +8 -0
- package/dist/components/FormControl/FormControl.context.cjs +1 -0
- package/dist/components/FormControl/FormControl.context.d.ts +2 -0
- package/dist/components/FormControl/FormControl.context.js +5 -0
- package/dist/components/FormControl/FormControl.d.ts +2 -0
- package/dist/components/FormControl/FormControl.js +90 -0
- package/dist/components/FormControl/FormControl.types.d.ts +19 -0
- package/dist/components/FormControl/index.d.ts +4 -0
- package/dist/components/FormField/FormField.cjs +1 -1
- package/dist/components/FormField/FormField.js +70 -67
- package/dist/components/FormField/FormField.types.d.ts +2 -0
- package/dist/components/FormSkeleton/FormSkeleton.cjs +1 -0
- package/dist/components/FormSkeleton/FormSkeleton.const.cjs +1 -0
- package/dist/components/FormSkeleton/FormSkeleton.const.d.ts +5 -0
- package/dist/components/FormSkeleton/FormSkeleton.const.js +8 -0
- package/dist/components/FormSkeleton/FormSkeleton.d.ts +2 -0
- package/dist/components/FormSkeleton/FormSkeleton.js +32 -0
- package/dist/components/FormSkeleton/FormSkeleton.types.d.ts +8 -0
- package/dist/components/FormSkeleton/index.d.ts +2 -0
- package/dist/components/Gauge/Gauge.cjs +1 -1
- package/dist/components/Gauge/Gauge.const.cjs +1 -0
- package/dist/components/Gauge/Gauge.const.d.ts +9 -0
- package/dist/components/Gauge/Gauge.const.js +12 -0
- package/dist/components/Gauge/Gauge.js +71 -95
- package/dist/components/Gauge/Gauge.types.d.ts +2 -0
- package/dist/components/Gauge/helpers/GaugeArcSvg.cjs +1 -0
- package/dist/components/Gauge/helpers/GaugeArcSvg.d.ts +14 -0
- package/dist/components/Gauge/helpers/GaugeArcSvg.js +65 -0
- package/dist/components/Gauge/hooks/useGauge.cjs +1 -0
- package/dist/components/Gauge/hooks/useGauge.d.ts +14 -0
- package/dist/components/Gauge/hooks/useGauge.js +42 -0
- package/dist/components/GlowCard/GlowCard.types.d.ts +1 -0
- package/dist/components/GradientText/GradientText.types.d.ts +1 -0
- package/dist/components/Grid/Grid.const.d.ts +1 -0
- package/dist/components/Grid/Grid.types.d.ts +1 -0
- package/dist/components/Heatmap/Heatmap.types.d.ts +1 -0
- package/dist/components/Highlight/Highlight.types.d.ts +1 -0
- package/dist/components/HoverCard/HoverCard.const.d.ts +1 -0
- package/dist/components/HoverCard/HoverCard.types.d.ts +2 -0
- package/dist/components/Icon/Icon.const.d.ts +1 -0
- package/dist/components/Icon/Icon.types.d.ts +1 -0
- package/dist/components/Icon/icons/misc.cjs +1 -1
- package/dist/components/Icon/icons/misc.d.ts +3 -0
- package/dist/components/Icon/icons/misc.js +118 -104
- package/dist/components/Icon/index.d.ts +3 -0
- package/dist/components/Image/Image.const.d.ts +1 -0
- package/dist/components/Image/Image.types.d.ts +2 -0
- package/dist/components/ImageAnnotation/ImageAnnotation.types.d.ts +1 -0
- package/dist/components/ImageGallery/ImageGallery.types.d.ts +1 -0
- package/dist/components/Indicator/Indicator.types.d.ts +1 -0
- package/dist/components/InfiniteScroll/InfiniteScroll.types.d.ts +1 -0
- package/dist/components/Input/Input.cjs +1 -1
- package/dist/components/Input/Input.const.cjs +1 -0
- package/dist/components/Input/Input.const.d.ts +13 -0
- package/dist/components/Input/Input.const.js +16 -0
- package/dist/components/Input/Input.js +216 -177
- package/dist/components/Input/Input.types.d.ts +8 -27
- package/dist/components/InputGroup/InputGroup.const.d.ts +1 -0
- package/dist/components/InputGroup/InputGroup.types.d.ts +1 -0
- package/dist/components/JsonViewer/JsonViewer.types.d.ts +1 -0
- package/dist/components/Kanban/Kanban.cjs +1 -1
- package/dist/components/Kanban/Kanban.const.d.ts +1 -0
- package/dist/components/Kanban/Kanban.js +9 -8
- package/dist/components/Kanban/Kanban.types.d.ts +2 -0
- package/dist/components/Kbd/Kbd.const.d.ts +1 -0
- package/dist/components/Kbd/Kbd.types.d.ts +2 -0
- package/dist/components/Link/Link.const.d.ts +1 -0
- package/dist/components/Link/Link.types.d.ts +1 -0
- package/dist/components/List/List.cjs +1 -1
- package/dist/components/List/List.const.cjs +1 -0
- package/dist/components/List/List.const.d.ts +11 -0
- package/dist/components/List/List.const.js +18 -0
- package/dist/components/List/List.js +96 -105
- package/dist/components/List/List.types.d.ts +2 -1
- package/dist/components/LoadingOverlay/LoadingOverlay.types.d.ts +1 -0
- package/dist/components/Map/Map.types.d.ts +1 -0
- package/dist/components/Mark/Mark.const.d.ts +1 -0
- package/dist/components/Mark/Mark.types.d.ts +2 -0
- package/dist/components/Marquee/Marquee.types.d.ts +1 -0
- package/dist/components/Masonry/Masonry.types.d.ts +1 -0
- package/dist/components/MediaPlayer/MediaPlayer.types.d.ts +1 -0
- package/dist/components/MentionsInput/MentionsInput.cjs +1 -1
- package/dist/components/MentionsInput/MentionsInput.const.d.ts +1 -0
- package/dist/components/MentionsInput/MentionsInput.js +114 -92
- package/dist/components/MentionsInput/MentionsInput.types.d.ts +6 -0
- package/dist/components/Menu/Menu.const.d.ts +1 -0
- package/dist/components/Menu/Menu.types.d.ts +1 -0
- package/dist/components/MessageList/MessageList.cjs +1 -0
- package/dist/components/MessageList/MessageList.const.cjs +1 -0
- package/dist/components/MessageList/MessageList.const.d.ts +23 -0
- package/dist/components/MessageList/MessageList.const.js +30 -0
- package/dist/components/MessageList/MessageList.d.ts +19 -0
- package/dist/components/MessageList/MessageList.js +182 -0
- package/dist/components/MessageList/MessageList.types.d.ts +72 -0
- package/dist/components/MessageList/MessageList.utils.cjs +1 -0
- package/dist/components/MessageList/MessageList.utils.d.ts +6 -0
- package/dist/components/MessageList/MessageList.utils.js +35 -0
- package/dist/components/MessageList/index.d.ts +2 -0
- package/dist/components/Modal/Modal.cjs +1 -1
- package/dist/components/Modal/Modal.js +46 -43
- package/dist/components/Modal/Modal.types.d.ts +3 -1
- package/dist/components/MultiSelect/MultiSelect.const.d.ts +1 -0
- package/dist/components/MultiSelect/MultiSelect.types.d.ts +1 -0
- package/dist/components/NavigableSelect/NavigableSelect.types.d.ts +1 -0
- package/dist/components/NotificationCenter/NotificationCenter.types.d.ts +1 -0
- package/dist/components/NumberFormatter/NumberFormatter.types.d.ts +1 -0
- package/dist/components/NumberInput/NumberInput.const.d.ts +1 -0
- package/dist/components/NumberInput/NumberInput.types.d.ts +2 -0
- package/dist/components/OTPInput/OTPInput.types.d.ts +2 -0
- package/dist/components/Overlay/Overlay.const.d.ts +1 -0
- package/dist/components/Overlay/Overlay.types.d.ts +1 -0
- package/dist/components/PageNav/PageNav.types.d.ts +1 -0
- package/dist/components/Pagination/Pagination.const.d.ts +1 -0
- package/dist/components/Pagination/Pagination.types.d.ts +1 -0
- package/dist/components/Paper/Paper.const.d.ts +1 -0
- package/dist/components/Paper/Paper.types.d.ts +1 -0
- package/dist/components/PasswordInput/PasswordInput.const.d.ts +1 -0
- package/dist/components/PasswordInput/PasswordInput.types.d.ts +2 -0
- package/dist/components/PhoneInput/PhoneInput.types.d.ts +1 -0
- package/dist/components/Popconfirm/Popconfirm.types.d.ts +1 -0
- package/dist/components/Popover/Popover.const.d.ts +1 -0
- package/dist/components/Popover/Popover.types.d.ts +2 -0
- package/dist/components/Portal/Portal.const.d.ts +1 -0
- package/dist/components/Progress/Progress.const.d.ts +1 -0
- package/dist/components/Progress/Progress.types.d.ts +1 -0
- package/dist/components/PropsPlayground/PropsPlayground.types.d.ts +1 -0
- package/dist/components/QRCode/QRCode.types.d.ts +1 -0
- package/dist/components/Radio/Radio.cjs +1 -1
- package/dist/components/Radio/Radio.const.d.ts +1 -0
- package/dist/components/Radio/Radio.js +99 -96
- package/dist/components/Radio/Radio.types.d.ts +1 -0
- package/dist/components/RadioCard/RadioCard.types.d.ts +1 -0
- package/dist/components/Rating/Rating.types.d.ts +1 -0
- package/dist/components/ResizablePanel/ResizablePanel.types.d.ts +1 -0
- package/dist/components/ResizableTextarea/ResizableTextarea.types.d.ts +1 -0
- package/dist/components/Result/Result.types.d.ts +1 -0
- package/dist/components/RichEditor/RichEditor.cjs +1 -1
- package/dist/components/RichEditor/RichEditor.js +69 -71
- package/dist/components/RingProgress/RingProgress.types.d.ts +1 -0
- package/dist/components/ScrollArea/ScrollArea.const.d.ts +1 -0
- package/dist/components/ScrollArea/ScrollArea.types.d.ts +2 -0
- package/dist/components/SegmentedControl/SegmentedControl.const.d.ts +1 -0
- package/dist/components/SegmentedControl/SegmentedControl.types.d.ts +2 -0
- package/dist/components/Select/Select.cjs +1 -1
- package/dist/components/Select/Select.const.d.ts +1 -0
- package/dist/components/Select/Select.js +3 -2
- package/dist/components/Select/Select.types.d.ts +6 -1
- package/dist/components/Sidebar/Sidebar.cjs +1 -1
- package/dist/components/Sidebar/Sidebar.js +15 -17
- package/dist/components/SignPad/SignPad.cjs +1 -1
- package/dist/components/SignPad/SignPad.js +24 -26
- package/dist/components/Skeleton/Skeleton.types.d.ts +1 -0
- package/dist/components/Slider/Slider.const.d.ts +1 -0
- package/dist/components/Slider/Slider.types.d.ts +1 -0
- package/dist/components/SliderRange/SliderRange.const.d.ts +1 -0
- package/dist/components/SliderRange/SliderRange.types.d.ts +2 -0
- package/dist/components/Snackbar/Snackbar.cjs +1 -0
- package/dist/components/Snackbar/Snackbar.const.cjs +1 -0
- package/dist/components/Snackbar/Snackbar.const.d.ts +13 -0
- package/dist/components/Snackbar/Snackbar.const.js +18 -0
- package/dist/components/Snackbar/Snackbar.d.ts +2 -0
- package/dist/components/Snackbar/Snackbar.js +114 -0
- package/dist/components/Snackbar/Snackbar.types.d.ts +44 -0
- package/dist/components/Snackbar/hooks/index.d.ts +1 -0
- package/dist/components/Snackbar/hooks/useSnackbar.cjs +1 -0
- package/dist/components/Snackbar/hooks/useSnackbar.d.ts +2 -0
- package/dist/components/Snackbar/hooks/useSnackbar.js +42 -0
- package/dist/components/Snackbar/index.d.ts +3 -0
- package/dist/components/Sparkline/Sparkline.types.d.ts +2 -0
- package/dist/components/SpeedDial/SpeedDial.types.d.ts +1 -0
- package/dist/components/Spinner/Spinner.const.d.ts +1 -0
- package/dist/components/Spinner/Spinner.types.d.ts +2 -0
- package/dist/components/SplitButton/SplitButton.types.d.ts +1 -0
- package/dist/components/Spoiler/Spoiler.types.d.ts +1 -0
- package/dist/components/Spotlight/Spotlight.types.d.ts +1 -0
- package/dist/components/StatCard/StatCard.const.d.ts +1 -0
- package/dist/components/StatCard/StatCard.types.d.ts +2 -0
- package/dist/components/Statistic/Statistic.const.d.ts +1 -0
- package/dist/components/Statistic/Statistic.types.d.ts +2 -0
- package/dist/components/Stepper/Stepper.types.d.ts +1 -0
- package/dist/components/Switch/Switch.cjs +1 -1
- package/dist/components/Switch/Switch.const.cjs +1 -0
- package/dist/components/Switch/Switch.const.d.ts +54 -0
- package/dist/components/Switch/Switch.const.js +37 -0
- package/dist/components/Switch/Switch.d.ts +1 -2
- package/dist/components/Switch/Switch.js +51 -80
- package/dist/components/Switch/Switch.types.d.ts +18 -10
- package/dist/components/Switch/SwitchGroup.cjs +1 -0
- package/dist/components/Switch/SwitchGroup.d.ts +2 -0
- package/dist/components/Switch/SwitchGroup.js +50 -0
- package/dist/components/Switch/index.d.ts +2 -1
- package/dist/components/TableSkeleton/TableSkeleton.cjs +1 -0
- package/dist/components/TableSkeleton/TableSkeleton.const.cjs +1 -0
- package/dist/components/TableSkeleton/TableSkeleton.const.d.ts +6 -0
- package/dist/components/TableSkeleton/TableSkeleton.const.js +9 -0
- package/dist/components/TableSkeleton/TableSkeleton.d.ts +2 -0
- package/dist/components/TableSkeleton/TableSkeleton.js +51 -0
- package/dist/components/TableSkeleton/TableSkeleton.types.d.ts +9 -0
- package/dist/components/TableSkeleton/index.d.ts +2 -0
- package/dist/components/Tabs/Tabs.const.d.ts +1 -0
- package/dist/components/Tabs/Tabs.types.d.ts +1 -0
- package/dist/components/TagCloud/TagCloud.types.d.ts +1 -0
- package/dist/components/TagsInput/TagsInput.const.d.ts +1 -0
- package/dist/components/TagsInput/TagsInput.types.d.ts +2 -0
- package/dist/components/Terminal/Terminal.types.d.ts +1 -0
- package/dist/components/ThemeIcon/ThemeIcon.const.d.ts +1 -0
- package/dist/components/ThemeIcon/ThemeIcon.types.d.ts +1 -0
- package/dist/components/TimePicker/TimePicker.types.d.ts +2 -0
- package/dist/components/Timeline/Timeline.cjs +1 -1
- package/dist/components/Timeline/Timeline.const.cjs +1 -1
- package/dist/components/Timeline/Timeline.const.d.ts +21 -0
- package/dist/components/Timeline/Timeline.const.js +41 -20
- package/dist/components/Timeline/Timeline.d.ts +0 -15
- package/dist/components/Timeline/Timeline.js +133 -132
- package/dist/components/Timeline/Timeline.types.d.ts +7 -0
- package/dist/components/TimelineChart/TimelineChart.types.d.ts +1 -0
- package/dist/components/Toast/Toast.cjs +1 -1
- package/dist/components/Toast/Toast.const.d.ts +1 -0
- package/dist/components/Toast/Toast.d.ts +3 -6
- package/dist/components/Toast/Toast.js +82 -76
- package/dist/components/Toast/Toast.types.d.ts +10 -0
- package/dist/components/Toast/index.d.ts +1 -1
- package/dist/components/ToggleButton/ToggleButton.cjs +1 -0
- package/dist/components/ToggleButton/ToggleButton.const.cjs +1 -0
- package/dist/components/ToggleButton/ToggleButton.const.d.ts +6 -0
- package/dist/components/ToggleButton/ToggleButton.const.js +15 -0
- package/dist/components/ToggleButton/ToggleButton.d.ts +3 -0
- package/dist/components/ToggleButton/ToggleButton.js +89 -0
- package/dist/components/ToggleButton/ToggleButton.types.d.ts +30 -0
- package/dist/components/ToggleButton/index.d.ts +2 -0
- package/dist/components/Tooltip/Tooltip.const.d.ts +1 -0
- package/dist/components/Tooltip/Tooltip.types.d.ts +2 -0
- package/dist/components/Tour/Tour.types.d.ts +1 -0
- package/dist/components/TransferList/TransferList.const.d.ts +1 -0
- package/dist/components/TransferList/TransferList.types.d.ts +1 -0
- package/dist/components/Transition/Transition.types.d.ts +1 -0
- package/dist/components/TreeSelect/TreeSelect.cjs +1 -1
- package/dist/components/TreeSelect/TreeSelect.js +22 -22
- package/dist/components/TreeSelect/TreeSelect.types.d.ts +1 -0
- package/dist/components/TreeView/TreeView.const.d.ts +1 -0
- package/dist/components/TreeView/TreeView.types.d.ts +2 -0
- package/dist/components/Typewriter/Typewriter.types.d.ts +1 -0
- package/dist/components/Typography/Typography.types.d.ts +1 -0
- package/dist/components/VirtualList/VirtualList.cjs +1 -1
- package/dist/components/VirtualList/VirtualList.const.cjs +1 -0
- package/dist/components/VirtualList/VirtualList.const.d.ts +2 -0
- package/dist/components/VirtualList/VirtualList.const.js +4 -0
- package/dist/components/VirtualList/VirtualList.js +18 -39
- package/dist/components/VirtualList/VirtualList.types.d.ts +2 -0
- package/dist/components/VisuallyHidden/VisuallyHidden.const.d.ts +1 -0
- package/dist/components/Watermark/Watermark.types.d.ts +1 -0
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.d.ts +18 -3
- package/dist/components/index.js +419 -398
- package/dist/context/BearProvider.cjs +1 -1
- package/dist/context/BearProvider.d.ts +21 -43
- package/dist/context/BearProvider.js +208 -163
- package/dist/context/bearProvider.const.cjs +1 -0
- package/dist/context/bearProvider.const.d.ts +7 -0
- package/dist/context/bearProvider.const.js +8 -0
- package/dist/context/bearProvider.types.d.ts +6 -0
- package/dist/context/index.cjs +1 -1
- package/dist/context/index.d.ts +2 -1
- package/dist/context/index.js +8 -6
- package/dist/hooks/index.cjs +1 -1
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.js +31 -27
- package/dist/hooks/useBearComponent/useBearComponent.cjs +1 -1
- package/dist/hooks/useBearComponent/useBearComponent.js +45 -44
- package/dist/hooks/useBearDefaultProps.cjs +1 -0
- package/dist/hooks/useBearDefaultProps.d.ts +2 -0
- package/dist/hooks/useBearDefaultProps.js +8 -0
- package/dist/hooks/useFormControl/index.d.ts +1 -0
- package/dist/hooks/useFormControl/useFormControl.cjs +1 -0
- package/dist/hooks/useFormControl/useFormControl.d.ts +2 -0
- package/dist/hooks/useFormControl/useFormControl.js +6 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +519 -480
- package/dist/styles/_message-list.css +42 -0
- package/dist/styles/main.css +1 -0
- package/dist/styles.css +72 -21
- package/dist/types/base.types.d.ts +5 -0
- package/dist/types/component.types.d.ts +5 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/utils/generateBearId.const.cjs +1 -0
- package/dist/utils/generateBearId.const.d.ts +5 -0
- package/dist/utils/generateBearId.const.js +8 -0
- package/dist/utils/generateBearId.types.d.ts +4 -0
- package/dist/utils/generateBearId.utils.cjs +1 -0
- package/dist/utils/generateBearId.utils.d.ts +4 -0
- package/dist/utils/generateBearId.utils.js +29 -0
- package/dist/utils/getResponsiveClass.utils.cjs +1 -0
- package/dist/utils/getResponsiveClass.utils.d.ts +2 -0
- package/dist/utils/getResponsiveClass.utils.js +12 -0
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.d.ts +5 -0
- package/dist/utils/index.js +19 -5
- package/dist/utils/useBearId.cjs +1 -0
- package/dist/utils/useBearId.d.ts +1 -0
- package/dist/utils/useBearId.js +15 -0
- package/package.json +15 -2
- package/dist/components/Toast/Toast.utils.cjs +0 -1
- package/dist/components/Toast/Toast.utils.js +0 -4
|
@@ -1,127 +1,130 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
1
|
+
import { jsxs as h, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as V, useContext as S, useState as A, useCallback as z } from "react";
|
|
3
3
|
import { cn as e } from "../../utils/cn.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
4
|
+
import { resolveBearId as rr } from "../../utils/generateBearId.utils.js";
|
|
5
|
+
import { useBearId as er } from "../../utils/useBearId.js";
|
|
6
|
+
import { FORMFIELD_SIZE_CLASSES as ar } from "./FormField.const.js";
|
|
7
|
+
import { BearContext as br } from "../../context/BearProvider.js";
|
|
8
|
+
import { useFormControl as dr } from "../../hooks/useFormControl/useFormControl.js";
|
|
9
|
+
const tr = V(
|
|
7
10
|
({
|
|
8
|
-
label:
|
|
9
|
-
helperText:
|
|
10
|
-
error:
|
|
11
|
-
success:
|
|
12
|
-
size:
|
|
13
|
-
leftAddon:
|
|
14
|
-
rightAddon:
|
|
11
|
+
label: j,
|
|
12
|
+
helperText: q,
|
|
13
|
+
error: p,
|
|
14
|
+
success: _,
|
|
15
|
+
size: D = "md",
|
|
16
|
+
leftAddon: l,
|
|
17
|
+
rightAddon: g,
|
|
15
18
|
fullWidth: L = !1,
|
|
16
19
|
required: M = !1,
|
|
17
|
-
variant:
|
|
18
|
-
className:
|
|
19
|
-
disabled:
|
|
20
|
-
value:
|
|
21
|
-
defaultValue:
|
|
20
|
+
variant: k = "outlined",
|
|
21
|
+
className: C,
|
|
22
|
+
disabled: c,
|
|
23
|
+
value: x,
|
|
24
|
+
defaultValue: m,
|
|
22
25
|
placeholder: O,
|
|
23
|
-
onFocus:
|
|
24
|
-
onBlur:
|
|
25
|
-
...
|
|
26
|
+
onFocus: o,
|
|
27
|
+
onBlur: s,
|
|
28
|
+
...B
|
|
26
29
|
}, Z) => {
|
|
27
|
-
var
|
|
28
|
-
const
|
|
30
|
+
var R;
|
|
31
|
+
const a = dr(), F = k === "filled", i = k === "standard", u = S(br), r = (R = u == null ? void 0 : u.components) == null ? void 0 : R.FormField, G = r == null ? void 0 : r.root, H = r == null ? void 0 : r.input, J = r == null ? void 0 : r.label, K = r == null ? void 0 : r.helper, N = r == null ? void 0 : r.addon, P = F ? r == null ? void 0 : r.filled : i ? r == null ? void 0 : r.standard : r == null ? void 0 : r.outlined, [n, v] = A(!1), Q = er("FormField"), w = rr(B.id, Q), T = c ?? (a == null ? void 0 : a.disabled), U = M ?? (a == null ? void 0 : a.required), W = !!p || (a == null ? void 0 : a.error), X = x != null && x !== "" || m != null && m !== "", I = n || X, b = W, d = !!_ && !b, f = ar[D], E = p || _ || q, Y = z(
|
|
29
32
|
(y) => {
|
|
30
|
-
|
|
33
|
+
v(!0), o == null || o(y);
|
|
31
34
|
},
|
|
32
|
-
[
|
|
33
|
-
),
|
|
35
|
+
[o]
|
|
36
|
+
), $ = z(
|
|
34
37
|
(y) => {
|
|
35
|
-
|
|
38
|
+
v(!1), s == null || s(y);
|
|
36
39
|
},
|
|
37
|
-
[
|
|
40
|
+
[s]
|
|
38
41
|
);
|
|
39
|
-
return /* @__PURE__ */
|
|
40
|
-
/* @__PURE__ */
|
|
41
|
-
|
|
42
|
+
return /* @__PURE__ */ h("div", { className: e("Bear-FormField bear-flex bear-flex-col bear-gap-1", L && "bear-w-full"), style: G, children: [
|
|
43
|
+
/* @__PURE__ */ h("div", { className: "Bear-FormField__wrapper bear-relative bear-flex bear-items-center", children: [
|
|
44
|
+
l && /* @__PURE__ */ t("div", { className: "Bear-FormField__addon Bear-FormField__addon--left bear-absolute bear-left-3 bear-z-10 bear-text-gray-500 dark:bear-text-gray-400", style: N, children: l }),
|
|
42
45
|
/* @__PURE__ */ t(
|
|
43
46
|
"input",
|
|
44
47
|
{
|
|
45
48
|
ref: Z,
|
|
46
49
|
id: w,
|
|
47
|
-
disabled:
|
|
48
|
-
value:
|
|
49
|
-
defaultValue:
|
|
50
|
-
placeholder:
|
|
51
|
-
"aria-invalid":
|
|
52
|
-
onFocus:
|
|
53
|
-
onBlur:
|
|
50
|
+
disabled: T,
|
|
51
|
+
value: x,
|
|
52
|
+
defaultValue: m,
|
|
53
|
+
placeholder: I ? O : void 0,
|
|
54
|
+
"aria-invalid": b || void 0,
|
|
55
|
+
onFocus: Y,
|
|
56
|
+
onBlur: $,
|
|
54
57
|
className: e(
|
|
55
58
|
"Bear-FormField__input bear-peer bear-w-full bear-rounded-lg bear-border bear-outline-none bear-transition-all bear-duration-200",
|
|
56
|
-
|
|
59
|
+
F ? e(
|
|
57
60
|
"bear-bg-gray-100 bear-border-transparent bear-rounded-t-lg bear-rounded-b-none bear-border-b-2",
|
|
58
61
|
"dark:bear-bg-gray-800",
|
|
59
|
-
|
|
60
|
-
) :
|
|
62
|
+
b ? "bear-border-b-red-500" : d ? "bear-border-b-green-500" : n ? "bear-border-b-bear-500" : "bear-border-b-gray-400 dark:bear-border-b-gray-500"
|
|
63
|
+
) : i ? e(
|
|
61
64
|
"bear-bg-transparent bear-rounded-none bear-border-0 bear-border-b-2",
|
|
62
|
-
|
|
65
|
+
b ? "bear-border-b-red-500" : d ? "bear-border-b-green-500" : n ? "bear-border-b-bear-500" : "bear-border-b-gray-300 dark:bear-border-b-gray-600"
|
|
63
66
|
) : e(
|
|
64
67
|
"bear-bg-white dark:bear-bg-gray-900",
|
|
65
|
-
|
|
68
|
+
b ? "bear-border-red-500 focus:bear-ring-2 focus:bear-ring-red-500/30" : d ? "bear-border-green-500 focus:bear-ring-2 focus:bear-ring-green-500/30" : e(
|
|
66
69
|
"bear-border-gray-300 dark:bear-border-gray-600",
|
|
67
70
|
"focus:bear-border-bear-500 focus:bear-ring-2 focus:bear-ring-bear-500/30",
|
|
68
71
|
"dark:focus:bear-border-bear-400"
|
|
69
72
|
)
|
|
70
73
|
),
|
|
71
74
|
"bear-text-gray-900 dark:bear-text-white placeholder:bear-text-gray-400 dark:placeholder:bear-text-gray-500",
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
75
|
+
c && "bear-opacity-50 bear-cursor-not-allowed",
|
|
76
|
+
l && "bear-pl-10",
|
|
77
|
+
g && "bear-pr-10",
|
|
78
|
+
f.field,
|
|
79
|
+
i && "focus:bear-ring-0",
|
|
80
|
+
C
|
|
78
81
|
),
|
|
79
|
-
style: { ...
|
|
80
|
-
...
|
|
82
|
+
style: { ...P, ...H },
|
|
83
|
+
...B
|
|
81
84
|
}
|
|
82
85
|
),
|
|
83
|
-
/* @__PURE__ */
|
|
86
|
+
/* @__PURE__ */ h(
|
|
84
87
|
"label",
|
|
85
88
|
{
|
|
86
89
|
htmlFor: w,
|
|
87
90
|
className: e(
|
|
88
91
|
"Bear-FormField__label bear-absolute bear-left-0 bear-pointer-events-none bear-origin-top-left",
|
|
89
92
|
"bear-transition-all bear-duration-200 bear-select-none",
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
93
|
+
l ? "bear-ml-10" : "bear-ml-4",
|
|
94
|
+
I ? e(
|
|
95
|
+
F ? f.labelFloat : i ? "bear-top-0 bear--translate-y-1/2 bear-text-xs" : "bear-top-0 bear--translate-y-1/2 bear-text-xs bear-px-1 bear-bg-white dark:bear-bg-gray-900",
|
|
96
|
+
b ? "bear-text-red-500" : d ? "bear-text-green-500" : n ? "bear-text-bear-500 dark:bear-text-bear-400" : "bear-text-gray-500 dark:bear-text-gray-400"
|
|
94
97
|
) : e(
|
|
95
|
-
|
|
98
|
+
f.labelRest,
|
|
96
99
|
"bear--translate-y-1/2",
|
|
97
100
|
"bear-text-gray-500 dark:bear-text-gray-400"
|
|
98
101
|
),
|
|
99
|
-
|
|
102
|
+
c && "bear-opacity-50"
|
|
100
103
|
),
|
|
101
|
-
style:
|
|
104
|
+
style: J,
|
|
102
105
|
children: [
|
|
103
|
-
|
|
104
|
-
|
|
106
|
+
j,
|
|
107
|
+
U && /* @__PURE__ */ t("span", { className: "bear-text-red-500 bear-ml-0.5", children: "*" })
|
|
105
108
|
]
|
|
106
109
|
}
|
|
107
110
|
),
|
|
108
|
-
|
|
111
|
+
g && /* @__PURE__ */ t("div", { className: "Bear-FormField__addon Bear-FormField__addon--right bear-absolute bear-right-3 bear-z-10 bear-text-gray-500 dark:bear-text-gray-400", style: N, children: g })
|
|
109
112
|
] }),
|
|
110
|
-
|
|
113
|
+
E && /* @__PURE__ */ t(
|
|
111
114
|
"p",
|
|
112
115
|
{
|
|
113
116
|
className: e(
|
|
114
117
|
"Bear-FormField__helper bear-text-xs bear-ml-4",
|
|
115
|
-
|
|
118
|
+
b ? "bear-text-red-500" : d ? "bear-text-green-500" : "bear-text-gray-500 dark:bear-text-gray-400"
|
|
116
119
|
),
|
|
117
|
-
style:
|
|
118
|
-
children:
|
|
120
|
+
style: K,
|
|
121
|
+
children: E
|
|
119
122
|
}
|
|
120
123
|
)
|
|
121
124
|
] });
|
|
122
125
|
}
|
|
123
126
|
);
|
|
124
|
-
|
|
127
|
+
tr.displayName = "FormField";
|
|
125
128
|
export {
|
|
126
|
-
|
|
129
|
+
tr as FormField
|
|
127
130
|
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { InputHTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
export interface FormFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
3
|
+
testId?: string;
|
|
4
|
+
id?: string;
|
|
3
5
|
/** Floating label text */
|
|
4
6
|
label: string;
|
|
5
7
|
/** Helper text below the field */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),c=require("../../utils/cn.cjs");require("react");const S=require("../../utils/generateBearId.utils.cjs"),E=require("../../utils/useBearId.cjs"),o=require("../Skeleton/Skeleton.cjs"),e=require("./FormSkeleton.const.cjs"),u=({fields:s=e.FORM_SKELETON_DEFAULT_FIELDS,animation:t="pulse",id:l,testId:n,className:_})=>{const a=E.useBearId("FormSkeleton"),i=S.resolveBearId(l,a);return r.jsx("div",{id:i,"data-testid":n,className:c.cn(e.FORM_SKELETON_ROOT_CLASS,"bear-flex bear-flex-col",_),style:{gap:e.FORM_SKELETON_FIELD_GAP_PX},children:Array.from({length:s}).map((F,d)=>r.jsxs("div",{className:"Bear-FormSkeleton__field bear-flex bear-flex-col bear-gap-2",children:[r.jsx(o.Skeleton,{animation:t,width:"30%",height:e.FORM_SKELETON_LABEL_HEIGHT_PX}),r.jsx(o.Skeleton,{animation:t,width:"100%",height:e.FORM_SKELETON_FIELD_HEIGHT_PX})]},`field-${d}`))})};exports.FormSkeleton=u;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _="Bear-FormSkeleton",E=3,O=14,L=40,F=16;exports.FORM_SKELETON_DEFAULT_FIELDS=E;exports.FORM_SKELETON_FIELD_GAP_PX=F;exports.FORM_SKELETON_FIELD_HEIGHT_PX=L;exports.FORM_SKELETON_LABEL_HEIGHT_PX=O;exports.FORM_SKELETON_ROOT_CLASS=_;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const FORM_SKELETON_ROOT_CLASS = "Bear-FormSkeleton";
|
|
2
|
+
export declare const FORM_SKELETON_DEFAULT_FIELDS = 3;
|
|
3
|
+
export declare const FORM_SKELETON_LABEL_HEIGHT_PX = 14;
|
|
4
|
+
export declare const FORM_SKELETON_FIELD_HEIGHT_PX = 40;
|
|
5
|
+
export declare const FORM_SKELETON_FIELD_GAP_PX = 16;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsx as e, jsxs as E } from "react/jsx-runtime";
|
|
2
|
+
import { cn as s } from "../../utils/cn.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { resolveBearId as f } from "../../utils/generateBearId.utils.js";
|
|
5
|
+
import { useBearId as p } from "../../utils/useBearId.js";
|
|
6
|
+
import { Skeleton as o } from "../Skeleton/Skeleton.js";
|
|
7
|
+
import { FORM_SKELETON_FIELD_GAP_PX as F, FORM_SKELETON_DEFAULT_FIELDS as L, FORM_SKELETON_LABEL_HEIGHT_PX as O, FORM_SKELETON_FIELD_HEIGHT_PX as S, FORM_SKELETON_ROOT_CLASS as n } from "./FormSkeleton.const.js";
|
|
8
|
+
const b = ({
|
|
9
|
+
fields: t = L,
|
|
10
|
+
animation: r = "pulse",
|
|
11
|
+
id: _,
|
|
12
|
+
testId: l,
|
|
13
|
+
className: m
|
|
14
|
+
}) => {
|
|
15
|
+
const a = p("FormSkeleton"), d = f(_, a);
|
|
16
|
+
return /* @__PURE__ */ e(
|
|
17
|
+
"div",
|
|
18
|
+
{
|
|
19
|
+
id: d,
|
|
20
|
+
"data-testid": l,
|
|
21
|
+
className: s(n, "bear-flex bear-flex-col", m),
|
|
22
|
+
style: { gap: F },
|
|
23
|
+
children: Array.from({ length: t }).map((c, i) => /* @__PURE__ */ E("div", { className: "Bear-FormSkeleton__field bear-flex bear-flex-col bear-gap-2", children: [
|
|
24
|
+
/* @__PURE__ */ e(o, { animation: r, width: "30%", height: O }),
|
|
25
|
+
/* @__PURE__ */ e(o, { animation: r, width: "100%", height: S })
|
|
26
|
+
] }, `field-${i}`))
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
};
|
|
30
|
+
export {
|
|
31
|
+
b as FormSkeleton
|
|
32
|
+
};
|
|
@@ -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"),T=require("../../utils/cn.cjs");require("react");const x=require("../../utils/useBearId.cjs"),D=require("../Typography/Typography.cjs"),i=require("../Flex/Flex.cjs"),r=require("./Gauge.const.cjs"),L=require("./hooks/useGauge.cjs"),b=require("./helpers/GaugeArcSvg.cjs"),F=u=>{const{value:c,min:l=r.GAUGE_DEFAULT_MIN,max:o=r.GAUGE_DEFAULT_MAX,size:t=r.GAUGE_DEFAULT_SIZE,strokeWidth:s=r.GAUGE_DEFAULT_STROKE_WIDTH,color:g=r.GAUGE_DEFAULT_COLOR,trackColor:d,showLabel:A=!0,label:G,animated:_=!0,fillDurationMs:E=r.GAUGE_DEFAULT_FILL_DURATION_MS,arcAngle:U=r.GAUGE_DEFAULT_ARC_ANGLE,gradient:n,className:h,...m}=u,f=x.useBearId("Gauge","gradient"),e=L.useGauge({value:c,min:l,max:o,strokeWidth:s,arcAngle:U,animated:_,fillDurationMs:E});return a.jsxs(i.Flex,{align:"center",justify:"center",className:T.cn("bear-relative bear-inline-flex",h),style:{width:t,height:t},...m,children:[a.jsx(b.GaugeArcSvg,{radius:e.radius,strokeWidth:s,circumference:e.circumference,dashOffset:e.dashOffset,startAngle:e.startAngle,color:g,trackColor:d,gradientId:n?f:void 0,gradient:n,animated:e.animated,fillDurationMs:e.fillDurationMs}),A&&a.jsx(i.Flex,{align:"center",justify:"center",className:"bear-absolute bear-inset-0",children:G||a.jsxs(D.Typography,{variant:"h4",className:"bear-text-[var(--bear-text-primary)]",children:[Math.round(e.percentage),"%"]})})]})};exports.Gauge=F;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=0,E=100,_=120,G=10,U="var(--bear-primary-500, #ec4899)",T=270,L=900,D=50,I="cubic-bezier(0.4, 0, 0.2, 1)";exports.GAUGE_ANIMATION_EASING=I;exports.GAUGE_DEFAULT_ARC_ANGLE=T;exports.GAUGE_DEFAULT_COLOR=U;exports.GAUGE_DEFAULT_FILL_DURATION_MS=L;exports.GAUGE_DEFAULT_MAX=E;exports.GAUGE_DEFAULT_MIN=A;exports.GAUGE_DEFAULT_SIZE=_;exports.GAUGE_DEFAULT_STROKE_WIDTH=G;exports.GAUGE_VIEWBOX_CENTER=D;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const GAUGE_DEFAULT_MIN = 0;
|
|
2
|
+
export declare const GAUGE_DEFAULT_MAX = 100;
|
|
3
|
+
export declare const GAUGE_DEFAULT_SIZE = 120;
|
|
4
|
+
export declare const GAUGE_DEFAULT_STROKE_WIDTH = 10;
|
|
5
|
+
export declare const GAUGE_DEFAULT_COLOR = "var(--bear-primary-500, #ec4899)";
|
|
6
|
+
export declare const GAUGE_DEFAULT_ARC_ANGLE = 270;
|
|
7
|
+
export declare const GAUGE_DEFAULT_FILL_DURATION_MS = 900;
|
|
8
|
+
export declare const GAUGE_VIEWBOX_CENTER = 50;
|
|
9
|
+
export declare const GAUGE_ANIMATION_EASING = "cubic-bezier(0.4, 0, 0.2, 1)";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const A = 0, E = 100, _ = 120, G = 10, U = "var(--bear-primary-500, #ec4899)", c = 270, T = 900, L = 50, o = "cubic-bezier(0.4, 0, 0.2, 1)";
|
|
2
|
+
export {
|
|
3
|
+
o as GAUGE_ANIMATION_EASING,
|
|
4
|
+
c as GAUGE_DEFAULT_ARC_ANGLE,
|
|
5
|
+
U as GAUGE_DEFAULT_COLOR,
|
|
6
|
+
T as GAUGE_DEFAULT_FILL_DURATION_MS,
|
|
7
|
+
E as GAUGE_DEFAULT_MAX,
|
|
8
|
+
A as GAUGE_DEFAULT_MIN,
|
|
9
|
+
_ as GAUGE_DEFAULT_SIZE,
|
|
10
|
+
G as GAUGE_DEFAULT_STROKE_WIDTH,
|
|
11
|
+
L as GAUGE_VIEWBOX_CENTER
|
|
12
|
+
};
|
|
@@ -1,103 +1,79 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}, [e, s, n]);
|
|
39
|
-
const y = 50 - r / 2;
|
|
40
|
-
return /* @__PURE__ */ a(
|
|
41
|
-
"div",
|
|
1
|
+
import { jsxs as i, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { cn as h } from "../../utils/cn.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { useBearId as D } from "../../utils/useBearId.js";
|
|
5
|
+
import { Typography as L } from "../Typography/Typography.js";
|
|
6
|
+
import { Flex as s } from "../Flex/Flex.js";
|
|
7
|
+
import { GAUGE_DEFAULT_MIN as T, GAUGE_DEFAULT_MAX as b, GAUGE_DEFAULT_SIZE as F, GAUGE_DEFAULT_STROKE_WIDTH as x, GAUGE_DEFAULT_COLOR as I, GAUGE_DEFAULT_FILL_DURATION_MS as M, GAUGE_DEFAULT_ARC_ANGLE as N } from "./Gauge.const.js";
|
|
8
|
+
import { useGauge as v } from "./hooks/useGauge.js";
|
|
9
|
+
import { GaugeArcSvg as y } from "./helpers/GaugeArcSvg.js";
|
|
10
|
+
const B = (o) => {
|
|
11
|
+
const {
|
|
12
|
+
value: l,
|
|
13
|
+
min: m = T,
|
|
14
|
+
max: c = b,
|
|
15
|
+
size: r = F,
|
|
16
|
+
strokeWidth: a = x,
|
|
17
|
+
color: u = I,
|
|
18
|
+
trackColor: A,
|
|
19
|
+
showLabel: d = !0,
|
|
20
|
+
label: f,
|
|
21
|
+
animated: g = !0,
|
|
22
|
+
fillDurationMs: G = M,
|
|
23
|
+
arcAngle: _ = N,
|
|
24
|
+
gradient: t,
|
|
25
|
+
className: E,
|
|
26
|
+
...U
|
|
27
|
+
} = o, p = D("Gauge", "gradient"), e = v({
|
|
28
|
+
value: l,
|
|
29
|
+
min: m,
|
|
30
|
+
max: c,
|
|
31
|
+
strokeWidth: a,
|
|
32
|
+
arcAngle: _,
|
|
33
|
+
animated: g,
|
|
34
|
+
fillDurationMs: G
|
|
35
|
+
});
|
|
36
|
+
return /* @__PURE__ */ i(
|
|
37
|
+
s,
|
|
42
38
|
{
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
39
|
+
align: "center",
|
|
40
|
+
justify: "center",
|
|
41
|
+
className: h("bear-relative bear-inline-flex", E),
|
|
42
|
+
style: { width: r, height: r },
|
|
43
|
+
...U,
|
|
46
44
|
children: [
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
cy: "50",
|
|
76
|
-
r: y,
|
|
77
|
-
fill: "none",
|
|
78
|
-
stroke: o ? `url(#${p})` : v,
|
|
79
|
-
strokeWidth: r,
|
|
80
|
-
strokeLinecap: "round",
|
|
81
|
-
strokeDasharray: s,
|
|
82
|
-
strokeDashoffset: O,
|
|
83
|
-
style: {
|
|
84
|
-
transformOrigin: "center",
|
|
85
|
-
transform: `rotate(${x}deg)`,
|
|
86
|
-
transitionProperty: e ? "stroke-dashoffset" : void 0,
|
|
87
|
-
transitionDuration: e ? `${M}ms` : void 0,
|
|
88
|
-
transitionTimingFunction: e ? "cubic-bezier(0.4, 0, 0.2, 1)" : void 0
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
)
|
|
92
|
-
] }),
|
|
93
|
-
D && /* @__PURE__ */ t("div", { className: "absolute inset-0 flex items-center justify-center", children: b || /* @__PURE__ */ a("span", { className: "text-2xl font-semibold text-gray-800 dark:text-white", children: [
|
|
94
|
-
Math.round(w),
|
|
95
|
-
"%"
|
|
96
|
-
] }) })
|
|
45
|
+
/* @__PURE__ */ n(
|
|
46
|
+
y,
|
|
47
|
+
{
|
|
48
|
+
radius: e.radius,
|
|
49
|
+
strokeWidth: a,
|
|
50
|
+
circumference: e.circumference,
|
|
51
|
+
dashOffset: e.dashOffset,
|
|
52
|
+
startAngle: e.startAngle,
|
|
53
|
+
color: u,
|
|
54
|
+
trackColor: A,
|
|
55
|
+
gradientId: t ? p : void 0,
|
|
56
|
+
gradient: t,
|
|
57
|
+
animated: e.animated,
|
|
58
|
+
fillDurationMs: e.fillDurationMs
|
|
59
|
+
}
|
|
60
|
+
),
|
|
61
|
+
d && /* @__PURE__ */ n(
|
|
62
|
+
s,
|
|
63
|
+
{
|
|
64
|
+
align: "center",
|
|
65
|
+
justify: "center",
|
|
66
|
+
className: "bear-absolute bear-inset-0",
|
|
67
|
+
children: f || /* @__PURE__ */ i(L, { variant: "h4", className: "bear-text-[var(--bear-text-primary)]", children: [
|
|
68
|
+
Math.round(e.percentage),
|
|
69
|
+
"%"
|
|
70
|
+
] })
|
|
71
|
+
}
|
|
72
|
+
)
|
|
97
73
|
]
|
|
98
74
|
}
|
|
99
75
|
);
|
|
100
76
|
};
|
|
101
77
|
export {
|
|
102
|
-
|
|
78
|
+
B as Gauge
|
|
103
79
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),x=require("../../../utils/cn.cjs");require("react");const y=require("../Gauge.const.cjs"),j=({radius:t,strokeWidth:n,circumference:c,dashOffset:a,startAngle:i,color:l,trackColor:f,gradientId:o,gradient:e,animated:s,fillDurationMs:u})=>r.jsxs("svg",{viewBox:"0 0 100 100",className:"h-full w-full -rotate-90",children:[r.jsx("defs",{children:e&&o&&r.jsxs("linearGradient",{id:o,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[r.jsx("stop",{offset:"0%",stopColor:e[0]}),r.jsx("stop",{offset:"100%",stopColor:e[1]})]})}),r.jsx("circle",{cx:"50",cy:"50",r:t,fill:"none",stroke:f||"currentColor",strokeWidth:n,strokeLinecap:"round",strokeDasharray:c,strokeDashoffset:0,className:x.cn("bear-text-[var(--bear-border-default)]"),style:{transformOrigin:"center",transform:`rotate(${i}deg)`}}),r.jsx("circle",{cx:"50",cy:"50",r:t,fill:"none",stroke:e&&o?`url(#${o})`:l,strokeWidth:n,strokeLinecap:"round",strokeDasharray:c,strokeDashoffset:a,style:{transformOrigin:"center",transform:`rotate(${i}deg)`,transitionProperty:s?"stroke-dashoffset":void 0,transitionDuration:s?`${u}ms`:void 0,transitionTimingFunction:s?y.GAUGE_ANIMATION_EASING:void 0}})]});exports.GaugeArcSvg=j;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface GaugeArcSvgProps {
|
|
2
|
+
radius: number;
|
|
3
|
+
strokeWidth: number;
|
|
4
|
+
circumference: number;
|
|
5
|
+
dashOffset: number;
|
|
6
|
+
startAngle: number;
|
|
7
|
+
color: string;
|
|
8
|
+
trackColor?: string;
|
|
9
|
+
gradientId?: string;
|
|
10
|
+
gradient?: [string, string];
|
|
11
|
+
animated: boolean;
|
|
12
|
+
fillDurationMs: number;
|
|
13
|
+
}
|
|
14
|
+
export declare const GaugeArcSvg: ({ radius, strokeWidth, circumference, dashOffset, startAngle, color, trackColor, gradientId, gradient, animated, fillDurationMs, }: GaugeArcSvgProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { jsxs as l, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { cn as x } from "../../../utils/cn.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { GAUGE_ANIMATION_EASING as y } from "../Gauge.const.js";
|
|
5
|
+
const D = ({
|
|
6
|
+
radius: e,
|
|
7
|
+
strokeWidth: n,
|
|
8
|
+
circumference: i,
|
|
9
|
+
dashOffset: a,
|
|
10
|
+
startAngle: f,
|
|
11
|
+
color: c,
|
|
12
|
+
trackColor: m,
|
|
13
|
+
gradientId: r,
|
|
14
|
+
gradient: s,
|
|
15
|
+
animated: t,
|
|
16
|
+
fillDurationMs: p
|
|
17
|
+
}) => /* @__PURE__ */ l("svg", { viewBox: "0 0 100 100", className: "h-full w-full -rotate-90", children: [
|
|
18
|
+
/* @__PURE__ */ o("defs", { children: s && r && /* @__PURE__ */ l("linearGradient", { id: r, x1: "0%", y1: "0%", x2: "100%", y2: "0%", children: [
|
|
19
|
+
/* @__PURE__ */ o("stop", { offset: "0%", stopColor: s[0] }),
|
|
20
|
+
/* @__PURE__ */ o("stop", { offset: "100%", stopColor: s[1] })
|
|
21
|
+
] }) }),
|
|
22
|
+
/* @__PURE__ */ o(
|
|
23
|
+
"circle",
|
|
24
|
+
{
|
|
25
|
+
cx: "50",
|
|
26
|
+
cy: "50",
|
|
27
|
+
r: e,
|
|
28
|
+
fill: "none",
|
|
29
|
+
stroke: m || "currentColor",
|
|
30
|
+
strokeWidth: n,
|
|
31
|
+
strokeLinecap: "round",
|
|
32
|
+
strokeDasharray: i,
|
|
33
|
+
strokeDashoffset: 0,
|
|
34
|
+
className: x("bear-text-[var(--bear-border-default)]"),
|
|
35
|
+
style: {
|
|
36
|
+
transformOrigin: "center",
|
|
37
|
+
transform: `rotate(${f}deg)`
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
),
|
|
41
|
+
/* @__PURE__ */ o(
|
|
42
|
+
"circle",
|
|
43
|
+
{
|
|
44
|
+
cx: "50",
|
|
45
|
+
cy: "50",
|
|
46
|
+
r: e,
|
|
47
|
+
fill: "none",
|
|
48
|
+
stroke: s && r ? `url(#${r})` : c,
|
|
49
|
+
strokeWidth: n,
|
|
50
|
+
strokeLinecap: "round",
|
|
51
|
+
strokeDasharray: i,
|
|
52
|
+
strokeDashoffset: a,
|
|
53
|
+
style: {
|
|
54
|
+
transformOrigin: "center",
|
|
55
|
+
transform: `rotate(${f}deg)`,
|
|
56
|
+
transitionProperty: t ? "stroke-dashoffset" : void 0,
|
|
57
|
+
transitionDuration: t ? `${p}ms` : void 0,
|
|
58
|
+
transitionTimingFunction: t ? y : void 0
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
] });
|
|
63
|
+
export {
|
|
64
|
+
D as GaugeArcSvg
|
|
65
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react"),e=require("../Gauge.const.cjs"),D=G=>{const{value:f,min:a=e.GAUGE_DEFAULT_MIN,max:A=e.GAUGE_DEFAULT_MAX,strokeWidth:m=10,arcAngle:c=e.GAUGE_DEFAULT_ARC_ANGLE,animated:t=!0,fillDurationMs:_=e.GAUGE_DEFAULT_FILL_DURATION_MS}=G,{percentage:d,circumference:r,offset:s,startAngle:g,radius:l}=i.useMemo(()=>{const n=Math.min(Math.max((f-a)/(A-a)*100,0),100),E=e.GAUGE_VIEWBOX_CENTER-m/2,o=2*Math.PI*E*(c/360),M=o-n/100*o,L=90+(360-c)/2;return{percentage:n,circumference:o,offset:M,startAngle:L,radius:E}},[f,a,A,c,m]),[U,u]=i.useState(()=>t?r:s);return i.useLayoutEffect(()=>{if(!t){u(s);return}u(r);const n=requestAnimationFrame(()=>u(s));return()=>cancelAnimationFrame(n)},[t,r,s]),{percentage:d,circumference:r,dashOffset:U,startAngle:g,radius:l,fillDurationMs:_,animated:t}};exports.useGauge=D;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { GaugeProps } from '../Gauge.types';
|
|
2
|
+
export interface UseGaugeResult {
|
|
3
|
+
percentage: number;
|
|
4
|
+
circumference: number;
|
|
5
|
+
dashOffset: number;
|
|
6
|
+
startAngle: number;
|
|
7
|
+
radius: number;
|
|
8
|
+
fillDurationMs: number;
|
|
9
|
+
animated: boolean;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Computes arc geometry and animated stroke offset for {@link Gauge}.
|
|
13
|
+
*/
|
|
14
|
+
export declare const useGauge: (props: GaugeProps) => UseGaugeResult;
|