@forgedevstack/bear 1.2.3 → 1.2.4
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 +1 -0
- 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.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.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.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.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.const.d.ts +1 -0
- package/dist/components/MentionsInput/MentionsInput.types.d.ts +2 -0
- package/dist/components/Menu/Menu.const.d.ts +1 -0
- package/dist/components/Menu/Menu.types.d.ts +1 -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.js +6 -6
- package/dist/components/Toast/Toast.types.d.ts +1 -0
- 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.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 +15 -2
- package/dist/components/index.js +421 -402
- 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 +516 -479
- package/dist/styles.css +25 -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 +1 -1
- package/dist/components/Toast/Toast.utils.cjs +0 -1
- package/dist/components/Toast/Toast.utils.js +0 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={row:"bear-flex-row","row-reverse":"bear-flex-row-reverse",column:"bear-flex-col","column-reverse":"bear-flex-col-reverse"},r={nowrap:"bear-flex-nowrap",wrap:"bear-flex-wrap","wrap-reverse":"bear-flex-wrap-reverse"},a={start:"bear-items-start",center:"bear-items-center",end:"bear-items-end",stretch:"bear-items-stretch",baseline:"bear-items-baseline"},t={start:"bear-justify-start",center:"bear-justify-center",end:"bear-justify-end",between:"bear-justify-between",around:"bear-justify-around",evenly:"bear-justify-evenly"},b={0:"bear-gap-0",1:"bear-gap-1",2:"bear-gap-2",3:"bear-gap-3",4:"bear-gap-4",5:"bear-gap-5",6:"bear-gap-6",8:"bear-gap-8",10:"bear-gap-10",12:"bear-gap-12",16:"bear-gap-16"};exports.FLEX_ALIGN_CLASSES=a;exports.FLEX_DIRECTION_CLASSES=e;exports.FLEX_GAP_CLASSES=b;exports.FLEX_JUSTIFY_CLASSES=t;exports.FLEX_WRAP_CLASSES=r;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FlexAlign, FlexDirection, FlexGap, FlexJustify, FlexWrap } from './Flex.types';
|
|
2
|
+
export declare const FLEX_DIRECTION_CLASSES: Record<FlexDirection, string>;
|
|
3
|
+
export declare const FLEX_WRAP_CLASSES: Record<FlexWrap, string>;
|
|
4
|
+
export declare const FLEX_ALIGN_CLASSES: Record<FlexAlign, string>;
|
|
5
|
+
export declare const FLEX_JUSTIFY_CLASSES: Record<FlexJustify, string>;
|
|
6
|
+
export declare const FLEX_GAP_CLASSES: Record<FlexGap, string>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
row: "bear-flex-row",
|
|
3
|
+
"row-reverse": "bear-flex-row-reverse",
|
|
4
|
+
column: "bear-flex-col",
|
|
5
|
+
"column-reverse": "bear-flex-col-reverse"
|
|
6
|
+
}, r = {
|
|
7
|
+
nowrap: "bear-flex-nowrap",
|
|
8
|
+
wrap: "bear-flex-wrap",
|
|
9
|
+
"wrap-reverse": "bear-flex-wrap-reverse"
|
|
10
|
+
}, a = {
|
|
11
|
+
start: "bear-items-start",
|
|
12
|
+
center: "bear-items-center",
|
|
13
|
+
end: "bear-items-end",
|
|
14
|
+
stretch: "bear-items-stretch",
|
|
15
|
+
baseline: "bear-items-baseline"
|
|
16
|
+
}, t = {
|
|
17
|
+
start: "bear-justify-start",
|
|
18
|
+
center: "bear-justify-center",
|
|
19
|
+
end: "bear-justify-end",
|
|
20
|
+
between: "bear-justify-between",
|
|
21
|
+
around: "bear-justify-around",
|
|
22
|
+
evenly: "bear-justify-evenly"
|
|
23
|
+
}, b = {
|
|
24
|
+
0: "bear-gap-0",
|
|
25
|
+
1: "bear-gap-1",
|
|
26
|
+
2: "bear-gap-2",
|
|
27
|
+
3: "bear-gap-3",
|
|
28
|
+
4: "bear-gap-4",
|
|
29
|
+
5: "bear-gap-5",
|
|
30
|
+
6: "bear-gap-6",
|
|
31
|
+
8: "bear-gap-8",
|
|
32
|
+
10: "bear-gap-10",
|
|
33
|
+
12: "bear-gap-12",
|
|
34
|
+
16: "bear-gap-16"
|
|
35
|
+
};
|
|
36
|
+
export {
|
|
37
|
+
a as FLEX_ALIGN_CLASSES,
|
|
38
|
+
e as FLEX_DIRECTION_CLASSES,
|
|
39
|
+
b as FLEX_GAP_CLASSES,
|
|
40
|
+
t as FLEX_JUSTIFY_CLASSES,
|
|
41
|
+
r as FLEX_WRAP_CLASSES
|
|
42
|
+
};
|
|
@@ -1,13 +1,2 @@
|
|
|
1
1
|
import { FlexProps } from './Flex.types';
|
|
2
|
-
/**
|
|
3
|
-
* Flex container component for flexible layouts
|
|
4
|
-
*
|
|
5
|
-
* @example
|
|
6
|
-
* ```tsx
|
|
7
|
-
* <Flex direction="row" align="center" justify="between" gap={4}>
|
|
8
|
-
* <div>Item 1</div>
|
|
9
|
-
* <div>Item 2</div>
|
|
10
|
-
* </Flex>
|
|
11
|
-
* ```
|
|
12
|
-
*/
|
|
13
2
|
export declare const Flex: import('react').ForwardRefExoticComponent<FlexProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -1,79 +1,40 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { cn as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
column: "bear-flex-col",
|
|
8
|
-
"column-reverse": "bear-flex-col-reverse"
|
|
9
|
-
}, g = {
|
|
10
|
-
nowrap: "bear-flex-nowrap",
|
|
11
|
-
wrap: "bear-flex-wrap",
|
|
12
|
-
"wrap-reverse": "bear-flex-wrap-reverse"
|
|
13
|
-
}, u = {
|
|
14
|
-
start: "bear-items-start",
|
|
15
|
-
center: "bear-items-center",
|
|
16
|
-
end: "bear-items-end",
|
|
17
|
-
stretch: "bear-items-stretch",
|
|
18
|
-
baseline: "bear-items-baseline"
|
|
19
|
-
}, x = {
|
|
20
|
-
start: "bear-justify-start",
|
|
21
|
-
center: "bear-justify-center",
|
|
22
|
-
end: "bear-justify-end",
|
|
23
|
-
between: "bear-justify-between",
|
|
24
|
-
around: "bear-justify-around",
|
|
25
|
-
evenly: "bear-justify-evenly"
|
|
26
|
-
}, y = {
|
|
27
|
-
0: "bear-gap-0",
|
|
28
|
-
1: "bear-gap-1",
|
|
29
|
-
2: "bear-gap-2",
|
|
30
|
-
3: "bear-gap-3",
|
|
31
|
-
4: "bear-gap-4",
|
|
32
|
-
5: "bear-gap-5",
|
|
33
|
-
6: "bear-gap-6",
|
|
34
|
-
8: "bear-gap-8",
|
|
35
|
-
10: "bear-gap-10",
|
|
36
|
-
12: "bear-gap-12",
|
|
37
|
-
16: "bear-gap-16"
|
|
38
|
-
}, r = (e, a) => {
|
|
39
|
-
if (e === void 0) return "";
|
|
40
|
-
if (typeof e == "object") {
|
|
41
|
-
const s = [];
|
|
42
|
-
return e.base !== void 0 && s.push(a[e.base]), s.join(" ");
|
|
43
|
-
}
|
|
44
|
-
return a[e] || "";
|
|
45
|
-
}, j = w(
|
|
1
|
+
import { jsx as _ } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as l } from "react";
|
|
3
|
+
import { cn as p } from "../../utils/cn.js";
|
|
4
|
+
import { getResponsiveClass as r } from "../../utils/getResponsiveClass.utils.js";
|
|
5
|
+
import { FLEX_GAP_CLASSES as A, FLEX_JUSTIFY_CLASSES as F, FLEX_ALIGN_CLASSES as n, FLEX_WRAP_CLASSES as C, FLEX_DIRECTION_CLASSES as x } from "./Flex.const.js";
|
|
6
|
+
const d = l(
|
|
46
7
|
({
|
|
47
8
|
direction: e = "row",
|
|
48
|
-
wrap:
|
|
49
|
-
align:
|
|
50
|
-
justify:
|
|
51
|
-
gap:
|
|
52
|
-
inline:
|
|
53
|
-
className:
|
|
9
|
+
wrap: o = "nowrap",
|
|
10
|
+
align: t = "stretch",
|
|
11
|
+
justify: S = "start",
|
|
12
|
+
gap: a = 0,
|
|
13
|
+
inline: s = !1,
|
|
14
|
+
className: m,
|
|
54
15
|
children: i,
|
|
55
|
-
testId:
|
|
56
|
-
...
|
|
57
|
-
},
|
|
16
|
+
testId: E,
|
|
17
|
+
...L
|
|
18
|
+
}, f) => /* @__PURE__ */ _(
|
|
58
19
|
"div",
|
|
59
20
|
{
|
|
60
|
-
ref:
|
|
61
|
-
className:
|
|
62
|
-
|
|
63
|
-
r(e,
|
|
64
|
-
r(
|
|
65
|
-
r(
|
|
66
|
-
r(
|
|
67
|
-
r(
|
|
68
|
-
|
|
21
|
+
ref: f,
|
|
22
|
+
className: p(
|
|
23
|
+
s ? "bear-inline-flex" : "bear-flex",
|
|
24
|
+
r(e, x),
|
|
25
|
+
r(o, C),
|
|
26
|
+
r(t, n),
|
|
27
|
+
r(S, F),
|
|
28
|
+
r(a, A),
|
|
29
|
+
m
|
|
69
30
|
),
|
|
70
|
-
"data-testid":
|
|
71
|
-
...
|
|
31
|
+
"data-testid": E,
|
|
32
|
+
...L,
|
|
72
33
|
children: i
|
|
73
34
|
}
|
|
74
35
|
)
|
|
75
36
|
);
|
|
76
|
-
|
|
37
|
+
d.displayName = "Flex";
|
|
77
38
|
export {
|
|
78
|
-
|
|
39
|
+
d as Flex
|
|
79
40
|
};
|
|
@@ -6,6 +6,7 @@ export type FlexAlign = 'start' | 'center' | 'end' | 'stretch' | 'baseline';
|
|
|
6
6
|
export type FlexJustify = 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly';
|
|
7
7
|
export type FlexGap = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16;
|
|
8
8
|
export interface FlexProps extends HTMLAttributes<HTMLDivElement> {
|
|
9
|
+
id?: string;
|
|
9
10
|
/** Flex direction */
|
|
10
11
|
direction?: ResponsiveProp<FlexDirection>;
|
|
11
12
|
/** Flex wrap */
|
|
@@ -105,6 +105,7 @@ export type FormLayout = 'vertical' | 'horizontal' | 'inline';
|
|
|
105
105
|
* Form component props
|
|
106
106
|
*/
|
|
107
107
|
export interface FormProps extends Omit<FormHTMLAttributes<HTMLFormElement>, 'onSubmit' | 'onError'> {
|
|
108
|
+
id?: string;
|
|
108
109
|
/** Child elements */
|
|
109
110
|
children: ReactNode;
|
|
110
111
|
/** Initial form values */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("../../utils/cn.cjs");require("react");const F=require("../../utils/generateBearId.utils.cjs"),y=require("../../utils/useBearId.cjs"),L=require("../Box/Box.cjs"),q=require("../Flex/Flex.cjs"),u=require("../Typography/Typography.cjs"),v=require("./FormControl.context.cjs"),r=require("./FormControl.const.cjs"),T=m=>{const{label:o,helperText:n,error:s=!1,disabled:l=!1,required:c=!1,fullWidth:b=!1,className:x,children:O,id:R,testId:_,...p}=m,C=y.useBearId("FormControl"),a=F.resolveBearId(R,C),d=o?`${a}-label`:void 0,i=n?`${a}-helper`:void 0,h={disabled:l,error:s,required:c,labelId:d,helperId:i};return e.jsx(v.FormControlContext.Provider,{value:h,children:e.jsxs(q.Flex,{id:a,"data-testid":_,direction:"column",gap:2,className:t.cn(r.FORM_CONTROL_ROOT_CLASS,b&&"bear-w-full",l&&"bear-opacity-60 bear-pointer-events-none",x),...p,children:[o&&e.jsxs(u.Typography,{component:"label",id:d,variant:"body2",className:t.cn(r.FORM_CONTROL_LABEL_CLASS,"bear-font-medium bear-text-[var(--bear-text-secondary)]"),children:[o,c&&e.jsx(L.Box,{as:"span",className:"bear-text-red-500 bear-ml-0.5","aria-hidden":"true",children:r.FORM_CONTROL_REQUIRED_MARK})]}),O,n&&e.jsx(u.Typography,{component:"p",id:i,variant:"body2",className:t.cn(r.FORM_CONTROL_HELPER_CLASS,s?t.cn(r.FORM_CONTROL_ERROR_CLASS,"bear-text-red-500"):"bear-text-[var(--bear-text-muted)]"),children:n})]})})};exports.FormControl=T;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O="Bear-FormControl",R="Bear-FormControl__label",_="Bear-FormControl__helper",L="Bear-FormControl__helper--error",o="*";exports.FORM_CONTROL_ERROR_CLASS=L;exports.FORM_CONTROL_HELPER_CLASS=_;exports.FORM_CONTROL_LABEL_CLASS=R;exports.FORM_CONTROL_REQUIRED_MARK=o;exports.FORM_CONTROL_ROOT_CLASS=O;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const FORM_CONTROL_ROOT_CLASS = "Bear-FormControl";
|
|
2
|
+
export declare const FORM_CONTROL_LABEL_CLASS = "Bear-FormControl__label";
|
|
3
|
+
export declare const FORM_CONTROL_HELPER_CLASS = "Bear-FormControl__helper";
|
|
4
|
+
export declare const FORM_CONTROL_ERROR_CLASS = "Bear-FormControl__helper--error";
|
|
5
|
+
export declare const FORM_CONTROL_REQUIRED_MARK = "*";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
const _ = "Bear-FormControl", o = "Bear-FormControl__label", r = "Bear-FormControl__helper", O = "Bear-FormControl__helper--error", R = "*";
|
|
2
|
+
export {
|
|
3
|
+
O as FORM_CONTROL_ERROR_CLASS,
|
|
4
|
+
r as FORM_CONTROL_HELPER_CLASS,
|
|
5
|
+
o as FORM_CONTROL_LABEL_CLASS,
|
|
6
|
+
R as FORM_CONTROL_REQUIRED_MARK,
|
|
7
|
+
_ as FORM_CONTROL_ROOT_CLASS
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),e=t.createContext(null);exports.FormControlContext=e;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { jsx as a, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import { cn as e } from "../../utils/cn.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { resolveBearId as L } from "../../utils/generateBearId.utils.js";
|
|
5
|
+
import { useBearId as u } from "../../utils/useBearId.js";
|
|
6
|
+
import { Box as v } from "../Box/Box.js";
|
|
7
|
+
import { Flex as N } from "../Flex/Flex.js";
|
|
8
|
+
import { Typography as c } from "../Typography/Typography.js";
|
|
9
|
+
import { FormControlContext as F } from "./FormControl.context.js";
|
|
10
|
+
import { FORM_CONTROL_REQUIRED_MARK as I, FORM_CONTROL_LABEL_CLASS as S, FORM_CONTROL_ERROR_CLASS as T, FORM_CONTROL_HELPER_CLASS as y, FORM_CONTROL_ROOT_CLASS as A } from "./FormControl.const.js";
|
|
11
|
+
const H = (p) => {
|
|
12
|
+
const {
|
|
13
|
+
label: r,
|
|
14
|
+
helperText: o,
|
|
15
|
+
error: l = !1,
|
|
16
|
+
disabled: d = !1,
|
|
17
|
+
required: n = !1,
|
|
18
|
+
fullWidth: b = !1,
|
|
19
|
+
className: O,
|
|
20
|
+
children: R,
|
|
21
|
+
id: f,
|
|
22
|
+
testId: _,
|
|
23
|
+
...x
|
|
24
|
+
} = p, C = u("FormControl"), t = L(f, C), i = r ? `${t}-label` : void 0, m = o ? `${t}-helper` : void 0, h = {
|
|
25
|
+
disabled: d,
|
|
26
|
+
error: l,
|
|
27
|
+
required: n,
|
|
28
|
+
labelId: i,
|
|
29
|
+
helperId: m
|
|
30
|
+
};
|
|
31
|
+
return /* @__PURE__ */ a(F.Provider, { value: h, children: /* @__PURE__ */ s(
|
|
32
|
+
N,
|
|
33
|
+
{
|
|
34
|
+
id: t,
|
|
35
|
+
"data-testid": _,
|
|
36
|
+
direction: "column",
|
|
37
|
+
gap: 2,
|
|
38
|
+
className: e(
|
|
39
|
+
A,
|
|
40
|
+
b && "bear-w-full",
|
|
41
|
+
d && "bear-opacity-60 bear-pointer-events-none",
|
|
42
|
+
O
|
|
43
|
+
),
|
|
44
|
+
...x,
|
|
45
|
+
children: [
|
|
46
|
+
r && /* @__PURE__ */ s(
|
|
47
|
+
c,
|
|
48
|
+
{
|
|
49
|
+
component: "label",
|
|
50
|
+
id: i,
|
|
51
|
+
variant: "body2",
|
|
52
|
+
className: e(
|
|
53
|
+
S,
|
|
54
|
+
"bear-font-medium bear-text-[var(--bear-text-secondary)]"
|
|
55
|
+
),
|
|
56
|
+
children: [
|
|
57
|
+
r,
|
|
58
|
+
n && /* @__PURE__ */ a(
|
|
59
|
+
v,
|
|
60
|
+
{
|
|
61
|
+
as: "span",
|
|
62
|
+
className: "bear-text-red-500 bear-ml-0.5",
|
|
63
|
+
"aria-hidden": "true",
|
|
64
|
+
children: I
|
|
65
|
+
}
|
|
66
|
+
)
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
),
|
|
70
|
+
R,
|
|
71
|
+
o && /* @__PURE__ */ a(
|
|
72
|
+
c,
|
|
73
|
+
{
|
|
74
|
+
component: "p",
|
|
75
|
+
id: m,
|
|
76
|
+
variant: "body2",
|
|
77
|
+
className: e(
|
|
78
|
+
y,
|
|
79
|
+
l ? e(T, "bear-text-red-500") : "bear-text-[var(--bear-text-muted)]"
|
|
80
|
+
),
|
|
81
|
+
children: o
|
|
82
|
+
}
|
|
83
|
+
)
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
) });
|
|
87
|
+
};
|
|
88
|
+
export {
|
|
89
|
+
H as FormControl
|
|
90
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export interface FormControlProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
label?: ReactNode;
|
|
4
|
+
helperText?: ReactNode;
|
|
5
|
+
error?: boolean;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
fullWidth?: boolean;
|
|
9
|
+
id?: string;
|
|
10
|
+
testId?: string;
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
}
|
|
13
|
+
export interface FormControlContextValue {
|
|
14
|
+
disabled: boolean;
|
|
15
|
+
error: boolean;
|
|
16
|
+
required: boolean;
|
|
17
|
+
labelId?: string;
|
|
18
|
+
helperId?: string;
|
|
19
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react/jsx-runtime"),s=require("react"),r=require("../../utils/cn.cjs"),$=require("../../utils/generateBearId.utils.cjs"),V=require("../../utils/useBearId.cjs"),A=require("./FormField.const.cjs"),ee=require("../../context/BearProvider.cjs"),re=require("../../hooks/useFormControl/useFormControl.cjs"),R=s.forwardRef(({label:E,helperText:z,error:_,success:k,size:C="md",leftAddon:l,rightAddon:g,fullWidth:M=!1,required:D=!1,variant:B="outlined",className:L,disabled:u,value:x,defaultValue:F,placeholder:O,onFocus:o,onBlur:i,...p},P)=>{var w;const a=re.useFormControl(),y=B==="filled",n=B==="standard",f=s.useContext(ee.BearContext),e=(w=f==null?void 0:f.components)==null?void 0:w.FormField,T=e==null?void 0:e.root,Z=e==null?void 0:e.input,G=e==null?void 0:e.label,H=e==null?void 0:e.helper,j=e==null?void 0:e.addon,J=y?e==null?void 0:e.filled:n?e==null?void 0:e.standard:e==null?void 0:e.outlined,[c,q]=s.useState(!1),K=V.useBearId("FormField"),v=$.resolveBearId(p.id,K),Q=u??(a==null?void 0:a.disabled),S=D??(a==null?void 0:a.required),U=!!_||(a==null?void 0:a.error),W=x!=null&&x!==""||F!=null&&F!=="",I=c||W,t=U,d=!!k&&!t,h=A.FORMFIELD_SIZE_CLASSES[C],N=_||k||z,X=s.useCallback(m=>{q(!0),o==null||o(m)},[o]),Y=s.useCallback(m=>{q(!1),i==null||i(m)},[i]);return b.jsxs("div",{className:r.cn("Bear-FormField bear-flex bear-flex-col bear-gap-1",M&&"bear-w-full"),style:T,children:[b.jsxs("div",{className:"Bear-FormField__wrapper bear-relative bear-flex bear-items-center",children:[l&&b.jsx("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:j,children:l}),b.jsx("input",{ref:P,id:v,disabled:Q,value:x,defaultValue:F,placeholder:I?O:void 0,"aria-invalid":t||void 0,onFocus:X,onBlur:Y,className:r.cn("Bear-FormField__input bear-peer bear-w-full bear-rounded-lg bear-border bear-outline-none bear-transition-all bear-duration-200",y?r.cn("bear-bg-gray-100 bear-border-transparent bear-rounded-t-lg bear-rounded-b-none bear-border-b-2","dark:bear-bg-gray-800",t?"bear-border-b-red-500":d?"bear-border-b-green-500":c?"bear-border-b-bear-500":"bear-border-b-gray-400 dark:bear-border-b-gray-500"):n?r.cn("bear-bg-transparent bear-rounded-none bear-border-0 bear-border-b-2",t?"bear-border-b-red-500":d?"bear-border-b-green-500":c?"bear-border-b-bear-500":"bear-border-b-gray-300 dark:bear-border-b-gray-600"):r.cn("bear-bg-white dark:bear-bg-gray-900",t?"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":r.cn("bear-border-gray-300 dark:bear-border-gray-600","focus:bear-border-bear-500 focus:bear-ring-2 focus:bear-ring-bear-500/30","dark:focus:bear-border-bear-400")),"bear-text-gray-900 dark:bear-text-white placeholder:bear-text-gray-400 dark:placeholder:bear-text-gray-500",u&&"bear-opacity-50 bear-cursor-not-allowed",l&&"bear-pl-10",g&&"bear-pr-10",h.field,n&&"focus:bear-ring-0",L),style:{...J,...Z},...p}),b.jsxs("label",{htmlFor:v,className:r.cn("Bear-FormField__label bear-absolute bear-left-0 bear-pointer-events-none bear-origin-top-left","bear-transition-all bear-duration-200 bear-select-none",l?"bear-ml-10":"bear-ml-4",I?r.cn(y?h.labelFloat:n?"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",t?"bear-text-red-500":d?"bear-text-green-500":c?"bear-text-bear-500 dark:bear-text-bear-400":"bear-text-gray-500 dark:bear-text-gray-400"):r.cn(h.labelRest,"bear--translate-y-1/2","bear-text-gray-500 dark:bear-text-gray-400"),u&&"bear-opacity-50"),style:G,children:[E,S&&b.jsx("span",{className:"bear-text-red-500 bear-ml-0.5",children:"*"})]}),g&&b.jsx("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:j,children:g})]}),N&&b.jsx("p",{className:r.cn("Bear-FormField__helper bear-text-xs bear-ml-4",t?"bear-text-red-500":d?"bear-text-green-500":"bear-text-gray-500 dark:bear-text-gray-400"),style:H,children:N})]})});R.displayName="FormField";exports.FormField=R;
|
|
@@ -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;
|