@forgedevstack/bear 1.3.0 → 1.3.1
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.context.cjs +1 -0
- package/dist/components/Accordion/Accordion.context.d.ts +2 -0
- package/dist/components/Accordion/Accordion.context.js +5 -0
- package/dist/components/Accordion/Accordion.d.ts +2 -22
- package/dist/components/Accordion/Accordion.js +21 -73
- package/dist/components/Accordion/components/AccordionItem/AccordionItem.cjs +1 -0
- package/dist/components/Accordion/components/AccordionItem/AccordionItem.const.d.ts +1 -0
- package/dist/components/Accordion/components/AccordionItem/AccordionItem.d.ts +2 -0
- package/dist/components/Accordion/components/AccordionItem/AccordionItem.js +60 -0
- package/dist/components/Accordion/components/AccordionItem/AccordionItem.types.d.ts +1 -0
- package/dist/components/Accordion/components/AccordionItem/AccordionItem.utils.cjs +1 -0
- package/dist/components/Accordion/components/AccordionItem/AccordionItem.utils.d.ts +1 -0
- package/dist/components/Accordion/components/AccordionItem/AccordionItem.utils.js +4 -0
- package/dist/components/Accordion/components/AccordionItem/index.d.ts +2 -0
- package/dist/components/Accordion/components/index.d.ts +2 -0
- package/dist/components/Accordion/hooks/index.d.ts +1 -0
- package/dist/components/Accordion/hooks/useAccordion.cjs +1 -0
- package/dist/components/Accordion/hooks/useAccordion.d.ts +2 -0
- package/dist/components/Accordion/hooks/useAccordion.js +12 -0
- package/dist/components/Accordion/index.d.ts +3 -3
- package/dist/components/ActionIcon/ActionIcon.cjs +1 -1
- package/dist/components/ActionIcon/ActionIcon.const.cjs +1 -1
- package/dist/components/ActionIcon/ActionIcon.const.d.ts +0 -1
- package/dist/components/ActionIcon/ActionIcon.const.js +1 -2
- package/dist/components/ActionIcon/ActionIcon.d.ts +4 -2
- package/dist/components/ActionIcon/ActionIcon.js +37 -32
- package/dist/components/ActionIcon/ActionIcon.types.d.ts +6 -4
- package/dist/components/ActiveBar/ActiveBar.cjs +1 -8
- package/dist/components/ActiveBar/ActiveBar.const.cjs +1 -0
- package/dist/components/ActiveBar/ActiveBar.const.d.ts +7 -1
- package/dist/components/ActiveBar/ActiveBar.const.js +28 -0
- package/dist/components/ActiveBar/ActiveBar.js +79 -72
- package/dist/components/ActiveBar/ActiveBar.types.d.ts +4 -2
- package/dist/components/ActivityItem/ActivityItem.cjs +1 -1
- package/dist/components/ActivityItem/ActivityItem.d.ts +1 -6
- package/dist/components/ActivityItem/ActivityItem.js +47 -40
- package/dist/components/Affix/Affix.cjs +1 -1
- package/dist/components/Affix/Affix.d.ts +1 -2
- package/dist/components/Affix/Affix.js +68 -53
- package/dist/components/Affix/Affix.types.d.ts +13 -0
- package/dist/components/Affix/Affix.utils.cjs +1 -0
- package/dist/components/Affix/Affix.utils.d.ts +3 -0
- package/dist/components/Affix/Affix.utils.js +10 -0
- package/dist/components/Affix/index.d.ts +1 -1
- package/dist/components/Alert/Alert.cjs +1 -1
- package/dist/components/Alert/Alert.const.cjs +1 -1
- package/dist/components/Alert/Alert.const.d.ts +0 -10
- package/dist/components/Alert/Alert.const.js +30 -10
- package/dist/components/Alert/Alert.d.ts +1 -14
- package/dist/components/Alert/Alert.js +55 -80
- package/dist/components/AlertDialog/AlertDialog.cjs +1 -1
- package/dist/components/AlertDialog/AlertDialog.d.ts +1 -2
- package/dist/components/AlertDialog/AlertDialog.js +75 -67
- package/dist/components/AlertDialog/AlertDialog.types.d.ts +0 -15
- package/dist/components/AlertDialog/index.d.ts +0 -1
- package/dist/components/Anchor/Anchor.cjs +1 -1
- package/dist/components/Anchor/Anchor.d.ts +1 -2
- package/dist/components/Anchor/Anchor.js +69 -61
- package/dist/components/AnimatedCounter/AnimatedCounter.cjs +1 -1
- package/dist/components/AnimatedCounter/AnimatedCounter.d.ts +1 -2
- package/dist/components/AnimatedCounter/AnimatedCounter.js +45 -43
- package/dist/components/AnimatedCounter/AnimatedCounter.types.d.ts +2 -12
- package/dist/components/AppBar/AppBar.cjs +1 -1
- package/dist/components/AppBar/AppBar.const.cjs +1 -1
- package/dist/components/AppBar/AppBar.const.d.ts +4 -36
- package/dist/components/AppBar/AppBar.const.js +7 -27
- package/dist/components/AppBar/AppBar.d.ts +1 -2
- package/dist/components/AppBar/AppBar.js +43 -64
- package/dist/components/AppShell/AppShell.cjs +1 -1
- package/dist/components/AppShell/AppShell.const.cjs +1 -1
- package/dist/components/AppShell/AppShell.const.d.ts +0 -17
- package/dist/components/AppShell/AppShell.const.js +3 -20
- package/dist/components/AppShell/AppShell.d.ts +1 -2
- package/dist/components/AppShell/AppShell.js +54 -50
- package/dist/components/AspectRatio/AspectRatio.cjs +1 -1
- package/dist/components/AspectRatio/AspectRatio.d.ts +1 -2
- package/dist/components/AspectRatio/AspectRatio.js +23 -21
- package/dist/components/Autocomplete/Autocomplete.cjs +1 -1
- package/dist/components/Autocomplete/Autocomplete.d.ts +1 -16
- package/dist/components/Autocomplete/Autocomplete.js +120 -134
- package/dist/components/Autocomplete/hooks/index.d.ts +1 -0
- package/dist/components/Autocomplete/hooks/useAutocomplete.cjs +1 -0
- package/dist/components/Autocomplete/hooks/useAutocomplete.d.ts +25 -0
- package/dist/components/Autocomplete/hooks/useAutocomplete.js +78 -0
- package/dist/components/Avatar/Avatar.cjs +1 -1
- package/dist/components/Avatar/Avatar.const.cjs +1 -1
- package/dist/components/Avatar/Avatar.const.d.ts +4 -7
- package/dist/components/Avatar/Avatar.const.js +12 -12
- package/dist/components/Avatar/Avatar.d.ts +2 -16
- package/dist/components/Avatar/Avatar.js +51 -66
- package/dist/components/Avatar/components/AvatarGroup/AvatarGroup.cjs +1 -0
- package/dist/components/Avatar/components/AvatarGroup/AvatarGroup.const.d.ts +1 -0
- package/dist/components/Avatar/components/AvatarGroup/AvatarGroup.d.ts +2 -0
- package/dist/components/Avatar/components/AvatarGroup/AvatarGroup.js +39 -0
- package/dist/components/Avatar/components/AvatarGroup/AvatarGroup.types.d.ts +1 -0
- package/dist/components/Avatar/components/AvatarGroup/AvatarGroup.utils.cjs +1 -0
- package/dist/components/Avatar/components/AvatarGroup/AvatarGroup.utils.d.ts +5 -0
- package/dist/components/Avatar/components/AvatarGroup/AvatarGroup.utils.js +9 -0
- package/dist/components/Avatar/components/AvatarGroup/index.d.ts +2 -0
- package/dist/components/Avatar/components/index.d.ts +2 -0
- package/dist/components/Avatar/index.d.ts +2 -1
- package/dist/components/BackTop/BackTop.cjs +1 -1
- package/dist/components/BackTop/BackTop.const.cjs +1 -1
- package/dist/components/BackTop/BackTop.const.d.ts +21 -27
- package/dist/components/BackTop/BackTop.const.js +13 -7
- package/dist/components/BackTop/BackTop.d.ts +1 -19
- package/dist/components/BackTop/BackTop.js +65 -66
- package/dist/components/BackTop/BackTop.types.d.ts +2 -14
- package/dist/components/Backdrop/Backdrop.cjs +1 -1
- package/dist/components/Backdrop/Backdrop.d.ts +1 -2
- package/dist/components/Backdrop/Backdrop.js +39 -38
- package/dist/components/Backdrop/index.d.ts +1 -1
- package/dist/components/Badge/Badge.cjs +1 -1
- package/dist/components/Badge/Badge.constants.cjs +1 -1
- package/dist/components/Badge/Badge.constants.d.ts +0 -2
- package/dist/components/Badge/Badge.constants.js +6 -7
- package/dist/components/Badge/Badge.d.ts +1 -12
- package/dist/components/Badge/Badge.js +45 -41
- package/dist/components/Badge/Badge.types.d.ts +0 -5
- package/dist/components/Banner/Banner.cjs +1 -1
- package/dist/components/Banner/Banner.const.cjs +1 -1
- package/dist/components/Banner/Banner.const.d.ts +2 -17
- package/dist/components/Banner/Banner.const.js +16 -25
- package/dist/components/Banner/Banner.d.ts +1 -2
- package/dist/components/Banner/Banner.js +58 -57
- package/dist/components/Biometric/Biometric.cjs +1 -1
- package/dist/components/Biometric/Biometric.const.cjs +1 -0
- package/dist/components/Biometric/Biometric.const.d.ts +7 -1
- package/dist/components/Biometric/Biometric.const.js +31 -0
- package/dist/components/Biometric/Biometric.d.ts +1 -2
- package/dist/components/Biometric/Biometric.js +57 -106
- package/dist/components/Biometric/Biometric.types.d.ts +2 -1
- package/dist/components/Biometric/Biometric.utils.cjs +1 -0
- package/dist/components/Biometric/Biometric.utils.d.ts +9 -0
- package/dist/components/Biometric/Biometric.utils.js +5 -0
- package/dist/components/Biometric/components/BiometricIcon/BiometricIcon.cjs +1 -0
- package/dist/components/Biometric/components/BiometricIcon/BiometricIcon.const.cjs +1 -0
- package/dist/components/Biometric/components/BiometricIcon/BiometricIcon.const.d.ts +5 -0
- package/dist/components/Biometric/components/BiometricIcon/BiometricIcon.const.js +11 -0
- package/dist/components/Biometric/components/BiometricIcon/BiometricIcon.d.ts +2 -0
- package/dist/components/Biometric/components/BiometricIcon/BiometricIcon.js +21 -0
- package/dist/components/Biometric/components/BiometricIcon/helpers/FaceSvg.cjs +1 -0
- package/dist/components/Biometric/components/BiometricIcon/helpers/FaceSvg.d.ts +4 -0
- package/dist/components/Biometric/components/BiometricIcon/helpers/FaceSvg.js +17 -0
- package/dist/components/Biometric/components/BiometricIcon/helpers/FingerprintSvg.cjs +1 -0
- package/dist/components/Biometric/components/BiometricIcon/helpers/FingerprintSvg.d.ts +4 -0
- package/dist/components/Biometric/components/BiometricIcon/helpers/FingerprintSvg.js +18 -0
- package/dist/components/Biometric/components/BiometricIcon/helpers/IrisSvg.cjs +1 -0
- package/dist/components/Biometric/components/BiometricIcon/helpers/IrisSvg.d.ts +4 -0
- package/dist/components/Biometric/components/BiometricIcon/helpers/IrisSvg.js +15 -0
- package/dist/components/Biometric/components/BiometricIcon/index.d.ts +1 -0
- package/dist/components/Biometric/components/BiometricScanRipple/BiometricScanRipple.cjs +1 -0
- package/dist/components/Biometric/components/BiometricScanRipple/BiometricScanRipple.d.ts +2 -0
- package/dist/components/Biometric/components/BiometricScanRipple/BiometricScanRipple.js +27 -0
- package/dist/components/Biometric/components/BiometricScanRipple/BiometricScanRipple.types.d.ts +3 -0
- package/dist/components/Biometric/components/BiometricScanRipple/index.d.ts +2 -0
- package/dist/components/Biometric/components/BiometricTrigger/BiometricTrigger.cjs +1 -0
- package/dist/components/Biometric/components/BiometricTrigger/BiometricTrigger.d.ts +2 -0
- package/dist/components/Biometric/components/BiometricTrigger/BiometricTrigger.js +61 -0
- package/dist/components/Biometric/components/BiometricTrigger/BiometricTrigger.types.d.ts +10 -0
- package/dist/components/Biometric/components/BiometricTrigger/index.d.ts +2 -0
- package/dist/components/Biometric/components/index.d.ts +3 -0
- package/dist/components/Biometric/useBiometric.cjs +1 -1
- package/dist/components/Biometric/useBiometric.js +18 -16
- package/dist/components/Blockquote/Blockquote.cjs +1 -1
- package/dist/components/Blockquote/Blockquote.const.cjs +1 -1
- package/dist/components/Blockquote/Blockquote.const.d.ts +0 -2
- package/dist/components/Blockquote/Blockquote.const.js +2 -4
- package/dist/components/Blockquote/Blockquote.d.ts +1 -2
- package/dist/components/Blockquote/Blockquote.js +36 -37
- package/dist/components/BottomNavigation/BottomNavigation.cjs +1 -1
- package/dist/components/BottomNavigation/BottomNavigation.const.cjs +1 -1
- package/dist/components/BottomNavigation/BottomNavigation.const.d.ts +2 -8
- package/dist/components/BottomNavigation/BottomNavigation.const.js +3 -6
- package/dist/components/BottomNavigation/BottomNavigation.d.ts +1 -2
- package/dist/components/BottomNavigation/BottomNavigation.js +42 -41
- package/dist/components/BottomNavigation/BottomNavigation.types.d.ts +2 -1
- package/dist/components/BottomNavigation/index.d.ts +1 -1
- package/dist/components/BottomSheet/BottomSheet.cjs +1 -1
- package/dist/components/BottomSheet/BottomSheet.const.cjs +1 -0
- package/dist/components/BottomSheet/BottomSheet.const.d.ts +2 -1
- package/dist/components/BottomSheet/BottomSheet.const.js +10 -0
- package/dist/components/BottomSheet/BottomSheet.d.ts +1 -2
- package/dist/components/BottomSheet/BottomSheet.js +119 -115
- package/dist/components/BottomSheet/BottomSheet.types.d.ts +2 -1
- package/dist/components/BottomSheet/index.d.ts +1 -1
- package/dist/components/Button/Button.types.d.ts +1 -2
- package/dist/components/Calendar/Calendar.cjs +1 -1
- package/dist/components/Calendar/Calendar.js +127 -108
- package/dist/components/Calendar/Calendar.types.d.ts +7 -7
- package/dist/components/Chat/Chat.cjs +1 -1
- package/dist/components/Chat/Chat.js +3 -2
- package/dist/components/DatePicker/DatePicker.cjs +1 -1
- package/dist/components/DatePicker/DatePicker.const.cjs +1 -0
- package/dist/components/DatePicker/DatePicker.const.d.ts +16 -0
- package/dist/components/DatePicker/DatePicker.const.js +20 -0
- package/dist/components/DatePicker/DatePicker.js +124 -121
- package/dist/components/DatePicker/DatePicker.types.d.ts +3 -3
- package/dist/components/DateRangePicker/DateRangePicker.cjs +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.const.cjs +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.const.d.ts +3 -20
- package/dist/components/DateRangePicker/DateRangePicker.const.js +8 -54
- package/dist/components/DateRangePicker/DateRangePicker.js +125 -116
- package/dist/components/DateRangePicker/DateRangePicker.types.d.ts +2 -1
- package/dist/components/DateRangePicker/DateRangePicker.utils.cjs +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.utils.d.ts +6 -0
- package/dist/components/DateRangePicker/DateRangePicker.utils.js +64 -20
- package/dist/components/Dropdown/Dropdown.cjs +1 -1
- package/dist/components/Dropdown/Dropdown.const.cjs +1 -1
- package/dist/components/Dropdown/Dropdown.const.d.ts +4 -0
- package/dist/components/Dropdown/Dropdown.const.js +6 -2
- package/dist/components/Dropdown/Dropdown.js +109 -116
- package/dist/components/Dropdown/Dropdown.types.d.ts +2 -2
- package/dist/components/FloatingChat/FloatingChat.cjs +1 -1
- package/dist/components/FloatingChat/FloatingChat.js +9 -8
- package/dist/components/GradientText/GradientText.cjs +1 -1
- package/dist/components/GradientText/GradientText.const.cjs +1 -1
- package/dist/components/GradientText/GradientText.const.d.ts +6 -1
- package/dist/components/GradientText/GradientText.const.js +11 -5
- package/dist/components/GradientText/GradientText.js +20 -19
- package/dist/components/Icon/index.cjs +1 -1
- package/dist/components/Icon/index.d.ts +14 -0
- package/dist/components/Icon/index.js +58 -39
- package/dist/components/MediaPlayer/MediaPlayer.types.d.ts +1 -1
- package/dist/components/MessageList/MessageList.cjs +1 -1
- package/dist/components/MessageList/MessageList.js +37 -36
- package/dist/components/OverlayPortal/OverlayPortal.cjs +1 -0
- package/dist/components/OverlayPortal/OverlayPortal.const.cjs +1 -0
- package/dist/components/OverlayPortal/OverlayPortal.const.d.ts +4 -0
- package/dist/components/OverlayPortal/OverlayPortal.const.js +12 -0
- package/dist/components/OverlayPortal/OverlayPortal.d.ts +2 -0
- package/dist/components/OverlayPortal/OverlayPortal.js +45 -0
- package/dist/components/OverlayPortal/OverlayPortal.types.d.ts +13 -0
- package/dist/components/OverlayPortal/index.d.ts +2 -0
- package/dist/components/Rating/Rating.cjs +1 -1
- package/dist/components/Rating/Rating.const.cjs +1 -1
- package/dist/components/Rating/Rating.const.d.ts +4 -12
- package/dist/components/Rating/Rating.const.js +15 -14
- package/dist/components/Rating/Rating.d.ts +1 -13
- package/dist/components/Rating/Rating.js +98 -136
- package/dist/components/Rating/Rating.types.d.ts +12 -18
- package/dist/components/Rating/Rating.utils.cjs +1 -0
- package/dist/components/Rating/Rating.utils.d.ts +6 -0
- package/dist/components/Rating/Rating.utils.js +18 -0
- package/dist/components/Rating/components/StarIcon/StarIcon.cjs +1 -0
- package/dist/components/Rating/components/StarIcon/StarIcon.d.ts +2 -0
- package/dist/components/Rating/components/StarIcon/StarIcon.js +14 -0
- package/dist/components/Rating/components/StarIcon/index.d.ts +1 -0
- package/dist/components/Rating/index.d.ts +1 -1
- package/dist/components/ResizablePanel/ResizablePanel.cjs +1 -1
- package/dist/components/ResizablePanel/ResizablePanel.const.cjs +1 -1
- package/dist/components/ResizablePanel/ResizablePanel.const.d.ts +1 -11
- package/dist/components/ResizablePanel/ResizablePanel.const.js +3 -9
- package/dist/components/ResizablePanel/ResizablePanel.d.ts +1 -16
- package/dist/components/ResizablePanel/ResizablePanel.js +44 -51
- package/dist/components/ResizablePanel/ResizablePanel.utils.cjs +1 -1
- package/dist/components/ResizablePanel/ResizablePanel.utils.d.ts +4 -9
- package/dist/components/ResizablePanel/ResizablePanel.utils.js +9 -9
- package/dist/components/ResizablePanel/useResizablePanel.cjs +1 -0
- package/dist/components/ResizablePanel/useResizablePanel.d.ts +12 -0
- package/dist/components/ResizablePanel/useResizablePanel.js +33 -0
- package/dist/components/ResizableTextarea/ResizableTextarea.cjs +1 -1
- package/dist/components/ResizableTextarea/ResizableTextarea.d.ts +1 -2
- package/dist/components/ResizableTextarea/ResizableTextarea.js +106 -91
- package/dist/components/ResizableTextarea/ResizableTextarea.utils.cjs +1 -0
- package/dist/components/ResizableTextarea/ResizableTextarea.utils.d.ts +3 -0
- package/dist/components/ResizableTextarea/ResizableTextarea.utils.js +12 -0
- package/dist/components/Result/Result.cjs +1 -1
- package/dist/components/Result/Result.const.cjs +1 -1
- package/dist/components/Result/Result.const.d.ts +0 -8
- package/dist/components/Result/Result.const.js +7 -14
- package/dist/components/Result/Result.d.ts +1 -3
- package/dist/components/Result/Result.js +37 -24
- package/dist/components/Result/Result.utils.cjs +1 -0
- package/dist/components/Result/Result.utils.d.ts +4 -0
- package/dist/components/Result/Result.utils.js +22 -0
- package/dist/components/Result/index.d.ts +1 -1
- package/dist/components/RichEditor/RichEditor.cjs +1 -1
- package/dist/components/RichEditor/RichEditor.const.cjs +1 -141
- package/dist/components/RichEditor/RichEditor.const.d.ts +22 -11
- package/dist/components/RichEditor/RichEditor.const.js +84 -197
- package/dist/components/RichEditor/RichEditor.d.ts +1 -17
- package/dist/components/RichEditor/RichEditor.js +62 -352
- package/dist/components/RichEditor/RichEditor.types.d.ts +1 -1
- package/dist/components/RichEditor/components/ToolbarButton/ToolbarButton.cjs +1 -1
- package/dist/components/RichEditor/components/ToolbarButton/ToolbarButton.d.ts +1 -3
- package/dist/components/RichEditor/components/ToolbarButton/ToolbarButton.js +17 -17
- package/dist/components/RichEditor/components/ToolbarButton/index.d.ts +1 -1
- package/dist/components/RichEditor/components/ToolbarColorPicker/ToolbarColorPicker.cjs +1 -1
- package/dist/components/RichEditor/components/ToolbarColorPicker/ToolbarColorPicker.const.cjs +1 -0
- package/dist/components/RichEditor/components/ToolbarColorPicker/ToolbarColorPicker.const.d.ts +7 -0
- package/dist/components/RichEditor/components/ToolbarColorPicker/ToolbarColorPicker.const.js +5 -0
- package/dist/components/RichEditor/components/ToolbarColorPicker/ToolbarColorPicker.d.ts +1 -3
- package/dist/components/RichEditor/components/ToolbarColorPicker/ToolbarColorPicker.js +114 -115
- package/dist/components/RichEditor/components/ToolbarColorPicker/index.d.ts +1 -1
- package/dist/components/RichEditor/components/ToolbarDropdown/ToolbarDropdown.cjs +1 -1
- package/dist/components/RichEditor/components/ToolbarDropdown/ToolbarDropdown.d.ts +1 -3
- package/dist/components/RichEditor/components/ToolbarDropdown/ToolbarDropdown.js +66 -43
- package/dist/components/RichEditor/components/ToolbarDropdown/index.d.ts +1 -1
- package/dist/components/RichEditor/components/ToolbarMore/ToolbarMore.cjs +1 -1
- package/dist/components/RichEditor/components/ToolbarMore/ToolbarMore.d.ts +2 -4
- package/dist/components/RichEditor/components/ToolbarMore/ToolbarMore.js +50 -52
- package/dist/components/RichEditor/components/ToolbarSignature/ToolbarSignature.cjs +1 -0
- package/dist/components/RichEditor/components/ToolbarSignature/ToolbarSignature.d.ts +2 -0
- package/dist/components/RichEditor/components/ToolbarSignature/ToolbarSignature.js +78 -0
- package/dist/components/RichEditor/components/ToolbarSignature/ToolbarSignature.types.d.ts +5 -0
- package/dist/components/RichEditor/components/ToolbarSignature/index.d.ts +2 -0
- package/dist/components/RichEditor/components/index.d.ts +1 -0
- package/dist/components/RichEditor/helpers/IconRender.cjs +1 -0
- package/dist/components/RichEditor/helpers/IconRender.d.ts +1 -0
- package/dist/components/RichEditor/helpers/IconRender.js +29 -0
- package/dist/components/RichEditor/helpers/formatHelpers.cjs +1 -1
- package/dist/components/RichEditor/helpers/formatHelpers.d.ts +0 -42
- package/dist/components/RichEditor/helpers/formatHelpers.js +32 -21
- package/dist/components/RichEditor/helpers/toolbarItemRender.cjs +1 -0
- package/dist/components/RichEditor/helpers/toolbarItemRender.d.ts +8 -0
- package/dist/components/RichEditor/helpers/toolbarItemRender.js +183 -0
- package/dist/components/RichEditor/index.d.ts +1 -1
- package/dist/components/RichEditor/useRichEditor/index.d.ts +2 -0
- package/dist/components/RichEditor/useRichEditor/useRichEditor.cjs +1 -0
- package/dist/components/RichEditor/useRichEditor/useRichEditor.d.ts +2 -0
- package/dist/components/RichEditor/useRichEditor/useRichEditor.js +140 -0
- package/dist/components/RichEditor/useRichEditor/useRichEditor.types.d.ts +39 -0
- package/dist/components/RingProgress/RingProgress.cjs +1 -1
- package/dist/components/RingProgress/RingProgress.const.cjs +1 -1
- package/dist/components/RingProgress/RingProgress.const.d.ts +0 -2
- package/dist/components/RingProgress/RingProgress.const.js +4 -5
- package/dist/components/RingProgress/RingProgress.d.ts +1 -3
- package/dist/components/RingProgress/RingProgress.js +48 -45
- package/dist/components/RingProgress/RingProgress.utils.cjs +1 -0
- package/dist/components/RingProgress/RingProgress.utils.d.ts +13 -0
- package/dist/components/RingProgress/RingProgress.utils.js +16 -0
- package/dist/components/RingProgress/index.d.ts +1 -1
- package/dist/components/ScrollArea/ScrollArea.cjs +1 -1
- package/dist/components/ScrollArea/ScrollArea.const.cjs +1 -0
- package/dist/components/ScrollArea/ScrollArea.const.d.ts +15 -1
- package/dist/components/ScrollArea/ScrollArea.const.js +18 -0
- package/dist/components/ScrollArea/ScrollArea.d.ts +1 -2
- package/dist/components/ScrollArea/ScrollArea.js +24 -35
- package/dist/components/ScrollArea/ScrollArea.utils.cjs +1 -0
- package/dist/components/ScrollArea/ScrollArea.utils.d.ts +1 -0
- package/dist/components/ScrollArea/ScrollArea.utils.js +7 -0
- package/dist/components/SegmentedControl/SegmentedControl.cjs +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.const.cjs +1 -0
- package/dist/components/SegmentedControl/SegmentedControl.const.d.ts +5 -1
- package/dist/components/SegmentedControl/SegmentedControl.const.js +8 -0
- package/dist/components/SegmentedControl/SegmentedControl.d.ts +1 -2
- package/dist/components/SegmentedControl/SegmentedControl.js +47 -45
- package/dist/components/Select/Select.cjs +1 -1
- package/dist/components/Select/Select.const.cjs +1 -1
- package/dist/components/Select/Select.const.js +6 -7
- package/dist/components/Select/Select.js +110 -124
- package/dist/components/Select/Select.types.d.ts +2 -1
- package/dist/components/SignPad/SignPad.const.cjs +1 -1
- package/dist/components/SignPad/SignPad.const.d.ts +3 -3
- package/dist/components/SignPad/SignPad.const.js +3 -3
- package/dist/components/TimePicker/TimePicker.cjs +1 -1
- package/dist/components/TimePicker/TimePicker.constants.cjs +1 -1
- package/dist/components/TimePicker/TimePicker.constants.d.ts +5 -1
- package/dist/components/TimePicker/TimePicker.constants.js +29 -25
- package/dist/components/TimePicker/TimePicker.js +110 -82
- package/dist/components/TimePicker/TimePicker.types.d.ts +4 -3
- package/dist/components/Transition/Transition.cjs +1 -1
- package/dist/components/Transition/Transition.js +56 -53
- package/dist/components/TreeSelect/TreeSelect.cjs +1 -1
- package/dist/components/TreeSelect/TreeSelect.const.cjs +1 -1
- package/dist/components/TreeSelect/TreeSelect.const.d.ts +3 -17
- package/dist/components/TreeSelect/TreeSelect.const.js +3 -17
- package/dist/components/TreeSelect/TreeSelect.d.ts +1 -3
- package/dist/components/TreeSelect/TreeSelect.js +164 -144
- package/dist/components/TreeSelect/TreeSelect.types.d.ts +15 -0
- package/dist/components/TreeSelect/TreeSelect.utils.cjs +1 -1
- package/dist/components/TreeSelect/TreeSelect.utils.js +14 -13
- package/dist/components/TreeSelect/components/TreeNodeRow/TreeNodeRow.cjs +1 -0
- package/dist/components/TreeSelect/components/TreeNodeRow/TreeNodeRow.d.ts +2 -0
- package/dist/components/TreeSelect/components/TreeNodeRow/TreeNodeRow.js +68 -0
- package/dist/components/TreeSelect/components/TreeNodeRow/index.d.ts +1 -0
- package/dist/components/TreeSelect/components/TreeSelectExpandControl/TreeSelectExpandControl.cjs +1 -0
- package/dist/components/TreeSelect/components/TreeSelectExpandControl/TreeSelectExpandControl.d.ts +2 -0
- package/dist/components/TreeSelect/components/TreeSelectExpandControl/TreeSelectExpandControl.js +30 -0
- package/dist/components/TreeSelect/components/TreeSelectExpandControl/index.d.ts +1 -0
- package/dist/components/TreeSelect/components/index.d.ts +2 -0
- package/dist/components/TreeView/TreeView.cjs +1 -1
- package/dist/components/TreeView/TreeView.const.cjs +1 -0
- package/dist/components/TreeView/TreeView.const.d.ts +20 -1
- package/dist/components/TreeView/TreeView.const.js +24 -0
- package/dist/components/TreeView/TreeView.d.ts +1 -2
- package/dist/components/TreeView/TreeView.js +48 -73
- package/dist/components/TreeView/TreeView.types.d.ts +26 -0
- package/dist/components/TreeView/components/TreeViewExpandControl/TreeViewExpandControl.cjs +1 -0
- package/dist/components/TreeView/components/TreeViewExpandControl/TreeViewExpandControl.d.ts +2 -0
- package/dist/components/TreeView/components/TreeViewExpandControl/TreeViewExpandControl.js +25 -0
- package/dist/components/TreeView/components/TreeViewExpandControl/index.d.ts +1 -0
- package/dist/components/TreeView/components/TreeViewNode/TreeViewNode.cjs +1 -0
- package/dist/components/TreeView/components/TreeViewNode/TreeViewNode.d.ts +2 -0
- package/dist/components/TreeView/components/TreeViewNode/TreeViewNode.js +97 -0
- package/dist/components/TreeView/components/TreeViewNode/index.d.ts +1 -0
- package/dist/components/TreeView/components/TreeViewNodeIcon/TreeViewNodeIcon.cjs +1 -0
- package/dist/components/TreeView/components/TreeViewNodeIcon/TreeViewNodeIcon.d.ts +2 -0
- package/dist/components/TreeView/components/TreeViewNodeIcon/TreeViewNodeIcon.js +11 -0
- package/dist/components/TreeView/components/TreeViewNodeIcon/index.d.ts +1 -0
- package/dist/components/TreeView/components/index.d.ts +3 -0
- package/dist/components/Typography/Typography.cjs +1 -1
- package/dist/components/Typography/Typography.d.ts +1 -16
- package/dist/components/Typography/Typography.js +67 -72
- package/dist/components/Typography/Typography.utils.cjs +1 -0
- package/dist/components/Typography/Typography.utils.d.ts +5 -0
- package/dist/components/Typography/Typography.utils.js +26 -0
- package/dist/components/VirtualList/VirtualList.cjs +1 -1
- package/dist/components/VirtualList/VirtualList.const.cjs +1 -1
- package/dist/components/VirtualList/VirtualList.const.d.ts +1 -1
- package/dist/components/VirtualList/VirtualList.const.js +4 -2
- package/dist/components/VirtualList/VirtualList.d.ts +1 -1
- package/dist/components/VirtualList/VirtualList.js +29 -28
- package/dist/components/Watermark/Watermark.cjs +1 -1
- package/dist/components/Watermark/Watermark.d.ts +1 -2
- package/dist/components/Watermark/Watermark.js +68 -77
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +342 -338
- package/dist/constants/generals.const.cjs +1 -0
- package/dist/constants/generals.const.d.ts +162 -0
- package/dist/constants/generals.const.js +141 -0
- package/dist/constants/index.d.ts +3 -0
- package/dist/constants/keys.const.cjs +1 -0
- package/dist/constants/keys.const.d.ts +6 -0
- package/dist/constants/keys.const.js +8 -0
- package/dist/constants/numbers.const.cjs +1 -0
- package/dist/constants/numbers.const.d.ts +77 -0
- package/dist/constants/numbers.const.js +70 -0
- package/dist/context/BearProvider.d.ts +1 -2
- package/dist/hooks/index.cjs +1 -1
- package/dist/hooks/index.d.ts +7 -0
- package/dist/hooks/index.js +76 -57
- package/dist/hooks/useBearComponent/useBearComponent.d.ts +1 -1
- package/dist/hooks/useBearComponent/useBearComponent.types.d.ts +1 -1
- package/dist/hooks/useBearDefaultProps.d.ts +1 -1
- package/dist/hooks/useBearStyles.d.ts +1 -1
- package/dist/hooks/useDocumentDarkClass/index.d.ts +1 -0
- package/dist/hooks/useDocumentDarkClass/useDocumentDarkClass.cjs +1 -0
- package/dist/hooks/useDocumentDarkClass/useDocumentDarkClass.d.ts +1 -0
- package/dist/hooks/useDocumentDarkClass/useDocumentDarkClass.js +26 -0
- package/dist/hooks/useFixedAnchorPosition/index.d.ts +4 -0
- package/dist/hooks/useFixedAnchorPosition/useFixedAnchorPosition.cjs +1 -0
- package/dist/hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.cjs +1 -0
- package/dist/hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.d.ts +17 -0
- package/dist/hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.js +20 -0
- package/dist/hooks/useFixedAnchorPosition/useFixedAnchorPosition.d.ts +2 -0
- package/dist/hooks/useFixedAnchorPosition/useFixedAnchorPosition.js +64 -0
- package/dist/hooks/useFixedAnchorPosition/useFixedAnchorPosition.types.d.ts +35 -0
- package/dist/hooks/useFixedAnchorPosition/useFixedAnchorPosition.utils.cjs +1 -0
- package/dist/hooks/useFixedAnchorPosition/useFixedAnchorPosition.utils.d.ts +16 -0
- package/dist/hooks/useFixedAnchorPosition/useFixedAnchorPosition.utils.js +23 -0
- package/dist/hooks/usePointerDrag/index.d.ts +2 -0
- package/dist/hooks/usePointerDrag/usePointerDrag.cjs +1 -0
- package/dist/hooks/usePointerDrag/usePointerDrag.d.ts +2 -0
- package/dist/hooks/usePointerDrag/usePointerDrag.js +32 -0
- package/dist/hooks/usePointerDrag/usePointerDrag.types.d.ts +14 -0
- package/dist/hooks/useResponsive.d.ts +1 -1
- package/dist/hooks/useWindowLayout/index.d.ts +2 -0
- package/dist/hooks/useWindowLayout/useWindowLayout.cjs +1 -0
- package/dist/hooks/useWindowLayout/useWindowLayout.const.cjs +1 -0
- package/dist/hooks/useWindowLayout/useWindowLayout.const.d.ts +2 -0
- package/dist/hooks/useWindowLayout/useWindowLayout.const.js +5 -0
- package/dist/hooks/useWindowLayout/useWindowLayout.d.ts +5 -0
- package/dist/hooks/useWindowLayout/useWindowLayout.js +15 -0
- package/dist/hooks/useWindowLayout/useWindowLayout.types.d.ts +4 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +528 -503
- package/dist/styles/_feedback.css +15 -0
- package/dist/styles/_rich-editor.css +104 -0
- package/dist/styles/_segmented.css +70 -0
- package/dist/styles/main.css +2 -0
- package/dist/styles.css +258 -48
- package/dist/types/index.d.ts +1 -0
- package/dist/types/surface.types.d.ts +6 -0
- package/dist/utils/clamp.utils.cjs +1 -0
- package/dist/utils/clamp.utils.d.ts +1 -0
- package/dist/utils/clamp.utils.js +4 -0
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +32 -30
- package/package.json +1 -1
- package/dist/components/Accordion/Accordion.const.cjs +0 -1
- package/dist/components/Accordion/Accordion.const.d.ts +0 -10
- package/dist/components/Accordion/Accordion.const.js +0 -8
- package/dist/components/ActivityItem/ActivityItem.const.d.ts +0 -1
- package/dist/components/Affix/Affix.const.cjs +0 -1
- package/dist/components/Affix/Affix.const.d.ts +0 -6
- package/dist/components/Affix/Affix.const.js +0 -9
- package/dist/components/AlertDialog/AlertDialog.const.cjs +0 -1
- package/dist/components/AlertDialog/AlertDialog.const.d.ts +0 -5
- package/dist/components/AlertDialog/AlertDialog.const.js +0 -8
- package/dist/components/Anchor/Anchor.const.cjs +0 -1
- package/dist/components/Anchor/Anchor.const.d.ts +0 -9
- package/dist/components/Anchor/Anchor.const.js +0 -11
- package/dist/components/AnimatedCounter/AnimatedCounter.const.cjs +0 -1
- package/dist/components/AnimatedCounter/AnimatedCounter.const.d.ts +0 -5
- package/dist/components/AnimatedCounter/AnimatedCounter.const.js +0 -7
- package/dist/components/AspectRatio/AspectRatio.const.d.ts +0 -1
- package/dist/components/Autocomplete/Autocomplete.const.cjs +0 -1
- package/dist/components/Autocomplete/Autocomplete.const.js +0 -4
- package/dist/components/Backdrop/Backdrop.const.cjs +0 -1
- package/dist/components/Backdrop/Backdrop.const.d.ts +0 -11
- package/dist/components/Backdrop/Backdrop.const.js +0 -14
- package/dist/components/Banner/helpers/BannerErrorSvg.cjs +0 -1
- package/dist/components/Banner/helpers/BannerErrorSvg.js +0 -22
- package/dist/components/Banner/helpers/BannerInfoSvg.cjs +0 -1
- package/dist/components/Banner/helpers/BannerInfoSvg.js +0 -22
- package/dist/components/Banner/helpers/BannerSuccessSvg.cjs +0 -1
- package/dist/components/Banner/helpers/BannerSuccessSvg.js +0 -21
- package/dist/components/Banner/helpers/BannerWarningSvg.cjs +0 -1
- package/dist/components/Banner/helpers/BannerWarningSvg.js +0 -22
- package/dist/components/Biometric/BiometricIcon.cjs +0 -1
- package/dist/components/Biometric/BiometricIcon.d.ts +0 -3
- package/dist/components/Biometric/BiometricIcon.js +0 -45
- package/dist/components/ResizableTextarea/ResizableTextarea.const.cjs +0 -1
- package/dist/components/ResizableTextarea/ResizableTextarea.const.d.ts +0 -2
- package/dist/components/ResizableTextarea/ResizableTextarea.const.js +0 -5
- package/dist/components/Result/Result.icons.cjs +0 -1
- package/dist/components/Result/Result.icons.d.ts +0 -3
- package/dist/components/Result/Result.icons.js +0 -31
|
@@ -1,136 +1,135 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
1
|
+
import { jsxs as t, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { useState as w, useRef as x } from "react";
|
|
3
|
+
import { cn as c } from "../../../../utils/cn.js";
|
|
4
|
+
import { useClickOutsideMultiple as z } from "../../../../hooks/useClickOutside.js";
|
|
5
|
+
import "../../../../context/BearProvider.js";
|
|
6
|
+
import "../../../../hooks/useBearComponent/useBearComponent.js";
|
|
7
|
+
import { TWO_HUNDRED_FORTY as I, ZERO as g, FOUR_HUNDRED as R, SIXTEEN as L, TWELVE as A } from "../../../../constants/numbers.const.js";
|
|
8
|
+
import { COLOR_TYPE_TEXT as e, COLOR_BLACK as H, COLOR_HIGHLIGHT_YELLOW as B } from "../../../../constants/generals.const.js";
|
|
9
|
+
import { useFixedAnchorPosition as D } from "../../../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.js";
|
|
10
|
+
import { ANCHOR_DEFAULT_Z_INDEX as F } from "../../../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.js";
|
|
11
|
+
import "../../../FormControl/FormControl.context.js";
|
|
12
|
+
import { FormatColorTextIcon as P, HighlightIcon as S, CheckIcon as U } from "../../../Icon/index.js";
|
|
13
|
+
import { OverlayPortal as W } from "../../../OverlayPortal/OverlayPortal.js";
|
|
14
|
+
import { Tooltip as _ } from "../../../Tooltip/Tooltip.js";
|
|
15
|
+
import { RICH_EDITOR_COLORS as X } from "../../RichEditor.const.js";
|
|
16
|
+
import { COLOR_RECENT_MAX as Y } from "./ToolbarColorPicker.const.js";
|
|
17
|
+
const nr = (k) => {
|
|
10
18
|
const {
|
|
11
|
-
value:
|
|
12
|
-
onChange:
|
|
13
|
-
title:
|
|
14
|
-
disabled:
|
|
15
|
-
type:
|
|
16
|
-
recentColors:
|
|
17
|
-
onApplyLast:
|
|
18
|
-
} =
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
28
|
-
return document.addEventListener("mousedown", t), () => document.removeEventListener("mousedown", t);
|
|
29
|
-
}, []);
|
|
30
|
-
const f = (t) => {
|
|
31
|
-
v(t), m(!1);
|
|
32
|
-
}, I = c === "text" ? A : L, x = d[0] || a, y = /* @__PURE__ */ n(
|
|
33
|
-
"div",
|
|
34
|
-
{
|
|
35
|
-
className: i(
|
|
36
|
-
"Bear-RichEditor__color-menu p-3 bg-white dark:bg-zinc-800 border border-gray-200 dark:border-zinc-700 rounded-lg shadow-xl min-w-[200px] max-w-[min(90vw,240px)]",
|
|
37
|
-
o ? "fixed z-[9999]" : "absolute bottom-full left-0 mb-1"
|
|
38
|
-
),
|
|
39
|
-
style: o ? { top: h.top, left: h.left } : void 0,
|
|
40
|
-
children: [
|
|
41
|
-
d.length > 0 && /* @__PURE__ */ n("div", { className: "mb-3", children: [
|
|
42
|
-
/* @__PURE__ */ e("p", { className: "text-xs text-gray-500 dark:text-gray-400 mb-1.5", children: "Recent" }),
|
|
43
|
-
/* @__PURE__ */ e("div", { className: "flex gap-1 flex-wrap", children: d.slice(0, 6).map((t, r) => /* @__PURE__ */ e(
|
|
44
|
-
"button",
|
|
45
|
-
{
|
|
46
|
-
type: "button",
|
|
47
|
-
onClick: () => f(t),
|
|
48
|
-
className: i(
|
|
49
|
-
"w-6 h-6 rounded-full border border-gray-300 dark:border-zinc-600 transition-transform hover:scale-110 touch-manipulation",
|
|
50
|
-
a === t && "ring-2 ring-primary-500 ring-offset-1 dark:ring-offset-zinc-800"
|
|
51
|
-
),
|
|
52
|
-
style: { backgroundColor: t },
|
|
53
|
-
title: t
|
|
54
|
-
},
|
|
55
|
-
`recent-${r}`
|
|
56
|
-
)) })
|
|
57
|
-
] }),
|
|
58
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-8 gap-1", children: S.map((t) => /* @__PURE__ */ e(
|
|
59
|
-
"button",
|
|
60
|
-
{
|
|
61
|
-
type: "button",
|
|
62
|
-
onClick: () => f(t),
|
|
63
|
-
className: i(
|
|
64
|
-
"Bear-RichEditor__color-swatch w-5 h-5 rounded-full border border-gray-300 dark:border-zinc-600 transition-transform hover:scale-110 touch-manipulation",
|
|
65
|
-
a === t && "ring-2 ring-primary-500 ring-offset-1 dark:ring-offset-zinc-800"
|
|
66
|
-
),
|
|
67
|
-
style: { backgroundColor: t },
|
|
68
|
-
title: t
|
|
69
|
-
},
|
|
70
|
-
t
|
|
71
|
-
)) }),
|
|
72
|
-
/* @__PURE__ */ n(
|
|
73
|
-
"button",
|
|
74
|
-
{
|
|
75
|
-
type: "button",
|
|
76
|
-
onClick: () => f(""),
|
|
77
|
-
className: "w-full mt-2 px-2 py-1.5 text-xs text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-zinc-700 rounded transition-colors touch-manipulation",
|
|
78
|
-
children: [
|
|
79
|
-
"Remove ",
|
|
80
|
-
c === "text" ? "color" : "highlight"
|
|
81
|
-
]
|
|
82
|
-
}
|
|
83
|
-
)
|
|
84
|
-
]
|
|
85
|
-
}
|
|
19
|
+
value: i,
|
|
20
|
+
onChange: C,
|
|
21
|
+
title: h,
|
|
22
|
+
disabled: a,
|
|
23
|
+
type: n = e,
|
|
24
|
+
recentColors: s = [],
|
|
25
|
+
onApplyLast: u
|
|
26
|
+
} = k, [l, d] = w(!1), p = x(null), f = x(null), { style: E, ready: O } = D({
|
|
27
|
+
anchorRef: p,
|
|
28
|
+
open: l,
|
|
29
|
+
minWidthPx: I
|
|
30
|
+
});
|
|
31
|
+
z(
|
|
32
|
+
[p, f],
|
|
33
|
+
() => d(!1),
|
|
34
|
+
{ enabled: l }
|
|
86
35
|
);
|
|
87
|
-
|
|
88
|
-
|
|
36
|
+
const m = (r) => {
|
|
37
|
+
C(r), d(!1);
|
|
38
|
+
}, N = n === e ? P : S, b = s[g] || i, v = n === e ? H : B, y = n === e ? "Apply last text color" : "Apply last highlight color";
|
|
39
|
+
return /* @__PURE__ */ t("div", { className: "Bear-RichEditor__color-picker relative flex items-center", children: [
|
|
40
|
+
/* @__PURE__ */ o(_, { content: h, delay: R, position: "top", children: /* @__PURE__ */ t(
|
|
89
41
|
"button",
|
|
90
42
|
{
|
|
91
43
|
ref: p,
|
|
92
44
|
type: "button",
|
|
93
|
-
|
|
94
|
-
disabled:
|
|
95
|
-
onClick: () =>
|
|
96
|
-
className:
|
|
97
|
-
"Bear-RichEditor__color-trigger",
|
|
98
|
-
|
|
99
|
-
T,
|
|
45
|
+
"aria-label": h,
|
|
46
|
+
disabled: a,
|
|
47
|
+
onClick: () => d(!l),
|
|
48
|
+
className: c(
|
|
49
|
+
"Bear-RichEditor__color-trigger p-1.5 rounded transition-colors",
|
|
50
|
+
"text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-zinc-700",
|
|
100
51
|
"flex items-center gap-0.5",
|
|
101
|
-
|
|
52
|
+
a && "Bear-RichEditor__color-trigger--disabled opacity-50 cursor-not-allowed"
|
|
102
53
|
),
|
|
103
54
|
children: [
|
|
104
|
-
/* @__PURE__ */
|
|
105
|
-
/* @__PURE__ */
|
|
106
|
-
"span",
|
|
107
|
-
{
|
|
108
|
-
className: "w-3 h-1 rounded-sm mt-0.5",
|
|
109
|
-
style: { backgroundColor: a || (c === "text" ? "#000000" : "#fef08a") }
|
|
110
|
-
}
|
|
111
|
-
)
|
|
55
|
+
/* @__PURE__ */ o(N, { size: L }),
|
|
56
|
+
/* @__PURE__ */ o("span", { className: "w-3 h-1 rounded-sm mt-0.5", style: { backgroundColor: i || v } })
|
|
112
57
|
]
|
|
113
58
|
}
|
|
114
|
-
),
|
|
115
|
-
|
|
59
|
+
) }),
|
|
60
|
+
b && u && /* @__PURE__ */ o(_, { content: y, delay: R, position: "top", children: /* @__PURE__ */ o(
|
|
116
61
|
"button",
|
|
117
62
|
{
|
|
118
63
|
type: "button",
|
|
119
|
-
|
|
120
|
-
disabled:
|
|
121
|
-
onClick: () =>
|
|
122
|
-
className:
|
|
123
|
-
"Bear-RichEditor__color-apply",
|
|
124
|
-
"p-0.5 rounded transition-colors",
|
|
64
|
+
"aria-label": y,
|
|
65
|
+
disabled: a,
|
|
66
|
+
onClick: () => u(b),
|
|
67
|
+
className: c(
|
|
68
|
+
"Bear-RichEditor__color-apply p-0.5 rounded transition-colors",
|
|
125
69
|
"text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-zinc-700",
|
|
126
|
-
|
|
70
|
+
a && "opacity-50 cursor-not-allowed"
|
|
127
71
|
),
|
|
128
|
-
children: /* @__PURE__ */
|
|
72
|
+
children: /* @__PURE__ */ o(U, { size: A })
|
|
73
|
+
}
|
|
74
|
+
) }),
|
|
75
|
+
/* @__PURE__ */ t(
|
|
76
|
+
W,
|
|
77
|
+
{
|
|
78
|
+
open: l,
|
|
79
|
+
ready: O,
|
|
80
|
+
style: E,
|
|
81
|
+
zIndex: F,
|
|
82
|
+
panelRef: f,
|
|
83
|
+
className: "Bear-RichEditor__color-menu p-3 bg-white dark:bg-zinc-800 border border-gray-200 dark:border-zinc-700 rounded-lg shadow-xl min-w-[200px] max-w-[min(90vw,240px)]",
|
|
84
|
+
children: [
|
|
85
|
+
s.length > g && /* @__PURE__ */ t("div", { className: "mb-3", children: [
|
|
86
|
+
/* @__PURE__ */ o("p", { className: "text-xs text-gray-500 dark:text-gray-400 mb-1.5", children: "Recent" }),
|
|
87
|
+
/* @__PURE__ */ o("div", { className: "flex gap-1 flex-wrap", children: s.slice(g, Y).map((r, T) => /* @__PURE__ */ o(
|
|
88
|
+
"button",
|
|
89
|
+
{
|
|
90
|
+
type: "button",
|
|
91
|
+
onClick: () => m(r),
|
|
92
|
+
className: c(
|
|
93
|
+
"w-6 h-6 rounded-full border border-gray-300 dark:border-zinc-600 transition-transform hover:scale-110 touch-manipulation",
|
|
94
|
+
i === r && "ring-2 ring-primary-500 ring-offset-1 dark:ring-offset-zinc-800"
|
|
95
|
+
),
|
|
96
|
+
style: { backgroundColor: r },
|
|
97
|
+
title: r
|
|
98
|
+
},
|
|
99
|
+
`recent-${T}`
|
|
100
|
+
)) })
|
|
101
|
+
] }),
|
|
102
|
+
/* @__PURE__ */ o("div", { className: "grid grid-cols-8 gap-1", children: X.map((r) => /* @__PURE__ */ o(
|
|
103
|
+
"button",
|
|
104
|
+
{
|
|
105
|
+
type: "button",
|
|
106
|
+
onClick: () => m(r),
|
|
107
|
+
className: c(
|
|
108
|
+
"Bear-RichEditor__color-swatch w-5 h-5 rounded-full border border-gray-300 dark:border-zinc-600 transition-transform hover:scale-110 touch-manipulation",
|
|
109
|
+
i === r && "ring-2 ring-primary-500 ring-offset-1 dark:ring-offset-zinc-800"
|
|
110
|
+
),
|
|
111
|
+
style: { backgroundColor: r },
|
|
112
|
+
title: r
|
|
113
|
+
},
|
|
114
|
+
r
|
|
115
|
+
)) }),
|
|
116
|
+
/* @__PURE__ */ t(
|
|
117
|
+
"button",
|
|
118
|
+
{
|
|
119
|
+
type: "button",
|
|
120
|
+
onClick: () => m(""),
|
|
121
|
+
className: "w-full mt-2 px-2 py-1.5 text-xs text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-zinc-700 rounded transition-colors touch-manipulation",
|
|
122
|
+
children: [
|
|
123
|
+
"Remove ",
|
|
124
|
+
n === e ? "color" : "highlight"
|
|
125
|
+
]
|
|
126
|
+
}
|
|
127
|
+
)
|
|
128
|
+
]
|
|
129
129
|
}
|
|
130
|
-
)
|
|
131
|
-
s && (o && typeof document < "u" ? N(y, document.body) : y)
|
|
130
|
+
)
|
|
132
131
|
] });
|
|
133
132
|
};
|
|
134
133
|
export {
|
|
135
|
-
|
|
134
|
+
nr as ToolbarColorPicker
|
|
136
135
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ToolbarColorPicker
|
|
1
|
+
export { ToolbarColorPicker } from './ToolbarColorPicker';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),a=require("react"),h=require("../../../../utils/cn.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),a=require("react"),h=require("../../../../utils/cn.cjs"),R=require("../../../Icon/index.cjs"),w=require("../../../OverlayPortal/OverlayPortal.cjs"),v=require("../../../Tooltip/Tooltip.cjs"),f=require("../../../../hooks/useClickOutside.cjs");require("../../../../context/BearProvider.cjs");require("../../../../hooks/useBearComponent/useBearComponent.cjs");const s=require("../../../../constants/numbers.const.cjs"),E=require("../../../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.cjs"),q=require("../../../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.cjs");require("../../../FormControl/FormControl.context.cjs");const k=b=>{const{options:l,value:c,onChange:g,title:d,disabled:u,icon:p}=b,[o,t]=a.useState(!1),n=a.useRef(null),x=a.useRef(null),{style:y,ready:m}=E.useFixedAnchorPosition({anchorRef:n,open:o,minWidthPx:s.ONE_HUNDRED_FIFTY});f.useClickOutsideMultiple([n,x],()=>t(!1),{enabled:o});const i=l.find(e=>e.value===c),_=e=>{g(e.value),t(!1)};return r.jsxs("div",{className:"Bear-RichEditor__dropdown relative",children:[r.jsx(v.Tooltip,{content:d,delay:s.FOUR_HUNDRED,position:"top",children:r.jsxs("button",{ref:n,type:"button","aria-label":d,disabled:u,onClick:()=>t(!o),className:h.cn("Bear-RichEditor__dropdown-trigger p-1.5 rounded transition-colors","text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-zinc-700","flex items-center gap-1 min-w-[80px]",u&&"Bear-RichEditor__dropdown-trigger--disabled opacity-50 cursor-not-allowed"),children:[p&&r.jsx("span",{className:"Bear-RichEditor__dropdown-icon",children:p}),r.jsx("span",{className:"Bear-RichEditor__dropdown-label text-xs truncate",children:(i==null?void 0:i.label)||"Normal"}),r.jsx(R.ChevronDownIcon,{size:s.TWELVE})]})}),r.jsx(w.OverlayPortal,{open:o,ready:m,style:y,zIndex:q.ANCHOR_DEFAULT_Z_INDEX,panelRef:x,className:"Bear-RichEditor__dropdown-menu min-w-[140px] bg-white dark:bg-zinc-800 border border-gray-200 dark:border-zinc-700 rounded-lg shadow-lg py-1",children:l.map(e=>r.jsx("button",{type:"button",onClick:()=>_(e),className:h.cn("Bear-RichEditor__dropdown-option","w-full px-3 py-2 text-left text-sm transition-colors","hover:bg-gray-100 dark:hover:bg-zinc-700",e.value===c?"bg-primary-50 dark:bg-primary-900/20 text-primary-600 dark:text-primary-400":"text-gray-700 dark:text-gray-300"),children:e.preview||e.label},e.value))})]})};exports.ToolbarDropdown=k;
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
1
|
import { ToolbarDropdownProps } from '../../RichEditor.types';
|
|
3
|
-
export declare const ToolbarDropdown:
|
|
4
|
-
export default ToolbarDropdown;
|
|
2
|
+
export declare const ToolbarDropdown: (props: ToolbarDropdownProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,57 +1,80 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { cn as
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { jsxs as m, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useState as _, useRef as h } from "react";
|
|
3
|
+
import { cn as g } from "../../../../utils/cn.js";
|
|
4
|
+
import { ChevronDownIcon as w } from "../../../Icon/index.js";
|
|
5
|
+
import { OverlayPortal as R } from "../../../OverlayPortal/OverlayPortal.js";
|
|
6
|
+
import { Tooltip as v } from "../../../Tooltip/Tooltip.js";
|
|
7
|
+
import { useClickOutsideMultiple as E } from "../../../../hooks/useClickOutside.js";
|
|
8
|
+
import "../../../../context/BearProvider.js";
|
|
9
|
+
import "../../../../hooks/useBearComponent/useBearComponent.js";
|
|
10
|
+
import { ONE_HUNDRED_FIFTY as N, FOUR_HUNDRED as k, TWELVE as D } from "../../../../constants/numbers.const.js";
|
|
11
|
+
import { useFixedAnchorPosition as B } from "../../../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.js";
|
|
12
|
+
import { ANCHOR_DEFAULT_Z_INDEX as z } from "../../../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.js";
|
|
13
|
+
import "../../../FormControl/FormControl.context.js";
|
|
14
|
+
const M = (u) => {
|
|
15
|
+
const { options: n, value: l, onChange: b, title: d, disabled: s, icon: c } = u, [o, t] = _(!1), a = h(null), p = h(null), { style: f, ready: x } = B({
|
|
16
|
+
anchorRef: a,
|
|
17
|
+
open: o,
|
|
18
|
+
minWidthPx: N
|
|
19
|
+
});
|
|
20
|
+
E(
|
|
21
|
+
[a, p],
|
|
22
|
+
() => t(!1),
|
|
23
|
+
{ enabled: o }
|
|
24
|
+
);
|
|
25
|
+
const i = n.find((r) => r.value === l), y = (r) => {
|
|
26
|
+
b(r.value), t(!1);
|
|
15
27
|
};
|
|
16
|
-
return /* @__PURE__ */
|
|
17
|
-
/* @__PURE__ */
|
|
28
|
+
return /* @__PURE__ */ m("div", { className: "Bear-RichEditor__dropdown relative", children: [
|
|
29
|
+
/* @__PURE__ */ e(v, { content: d, delay: k, position: "top", children: /* @__PURE__ */ m(
|
|
18
30
|
"button",
|
|
19
31
|
{
|
|
32
|
+
ref: a,
|
|
20
33
|
type: "button",
|
|
21
|
-
|
|
22
|
-
disabled:
|
|
23
|
-
onClick: () => t(!
|
|
24
|
-
className:
|
|
25
|
-
"Bear-RichEditor__dropdown-trigger",
|
|
26
|
-
|
|
27
|
-
v,
|
|
34
|
+
"aria-label": d,
|
|
35
|
+
disabled: s,
|
|
36
|
+
onClick: () => t(!o),
|
|
37
|
+
className: g(
|
|
38
|
+
"Bear-RichEditor__dropdown-trigger p-1.5 rounded transition-colors",
|
|
39
|
+
"text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-zinc-700",
|
|
28
40
|
"flex items-center gap-1 min-w-[80px]",
|
|
29
|
-
|
|
41
|
+
s && "Bear-RichEditor__dropdown-trigger--disabled opacity-50 cursor-not-allowed"
|
|
30
42
|
),
|
|
31
43
|
children: [
|
|
32
|
-
|
|
33
|
-
/* @__PURE__ */
|
|
34
|
-
/* @__PURE__ */
|
|
44
|
+
c && /* @__PURE__ */ e("span", { className: "Bear-RichEditor__dropdown-icon", children: c }),
|
|
45
|
+
/* @__PURE__ */ e("span", { className: "Bear-RichEditor__dropdown-label text-xs truncate", children: (i == null ? void 0 : i.label) || "Normal" }),
|
|
46
|
+
/* @__PURE__ */ e(w, { size: D })
|
|
35
47
|
]
|
|
36
48
|
}
|
|
37
|
-
),
|
|
38
|
-
|
|
39
|
-
|
|
49
|
+
) }),
|
|
50
|
+
/* @__PURE__ */ e(
|
|
51
|
+
R,
|
|
40
52
|
{
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
+
open: o,
|
|
54
|
+
ready: x,
|
|
55
|
+
style: f,
|
|
56
|
+
zIndex: z,
|
|
57
|
+
panelRef: p,
|
|
58
|
+
className: "Bear-RichEditor__dropdown-menu min-w-[140px] bg-white dark:bg-zinc-800 border border-gray-200 dark:border-zinc-700 rounded-lg shadow-lg py-1",
|
|
59
|
+
children: n.map((r) => /* @__PURE__ */ e(
|
|
60
|
+
"button",
|
|
61
|
+
{
|
|
62
|
+
type: "button",
|
|
63
|
+
onClick: () => y(r),
|
|
64
|
+
className: g(
|
|
65
|
+
"Bear-RichEditor__dropdown-option",
|
|
66
|
+
"w-full px-3 py-2 text-left text-sm transition-colors",
|
|
67
|
+
"hover:bg-gray-100 dark:hover:bg-zinc-700",
|
|
68
|
+
r.value === l ? "bg-primary-50 dark:bg-primary-900/20 text-primary-600 dark:text-primary-400" : "text-gray-700 dark:text-gray-300"
|
|
69
|
+
),
|
|
70
|
+
children: r.preview || r.label
|
|
71
|
+
},
|
|
72
|
+
r.value
|
|
73
|
+
))
|
|
74
|
+
}
|
|
75
|
+
)
|
|
53
76
|
] });
|
|
54
77
|
};
|
|
55
78
|
export {
|
|
56
|
-
|
|
79
|
+
M as ToolbarDropdown
|
|
57
80
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ToolbarDropdown
|
|
1
|
+
export { ToolbarDropdown } from './ToolbarDropdown';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),m=require("../../../../utils/cn.cjs"),h=require("../../../OverlayPortal/OverlayPortal.cjs"),p=require("../../../Tooltip/Tooltip.cjs"),_=require("../../../../hooks/useClickOutside.cjs");require("../../../../context/BearProvider.cjs");require("../../../../hooks/useBearComponent/useBearComponent.cjs");const i=require("../../../../constants/numbers.const.cjs"),b=require("../../../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.cjs"),g=require("../../../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.cjs");require("../../../FormControl/FormControl.context.cjs");const a=require("../../RichEditor.const.cjs"),R=require("../../../Icon/index.cjs"),y=l=>{const{children:d,disabled:n}=l,[r,s]=t.useState(!1),o=t.useRef(null),c=t.useRef(null),{style:u,ready:x}=b.useFixedAnchorPosition({anchorRef:o,open:r,minWidthPx:i.TWO_HUNDRED_TWENTY,placement:"bottom-end"});return _.useClickOutsideMultiple([o,c],()=>s(!1),{enabled:r}),e.jsxs("div",{className:"Bear-RichEditor__more relative",children:[e.jsx(p.Tooltip,{content:a.TITLE_MORE_OPTIONS,delay:i.FOUR_HUNDRED,position:"top",children:e.jsx("button",{ref:o,type:"button","aria-label":a.TITLE_MORE_OPTIONS,disabled:n,onClick:()=>s(!r),className:m.cn("Bear-RichEditor__more-trigger p-1.5 rounded transition-colors","text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-zinc-700","flex items-center justify-center",r&&"bg-primary-500 text-white",n&&"Bear-RichEditor__more-trigger--disabled opacity-50 cursor-not-allowed"),children:e.jsx(R.MoreHorizIcon,{size:i.SIXTEEN})})}),e.jsx(h.OverlayPortal,{open:r,ready:x,style:u,zIndex:g.ANCHOR_DEFAULT_Z_INDEX,panelRef:c,className:"Bear-RichEditor__more-menu p-2 bg-white dark:bg-zinc-800 border border-gray-200 dark:border-zinc-700 rounded-lg shadow-xl min-w-[200px] max-w-[min(90vw,280px)] max-h-[70vh] overflow-y-auto",children:e.jsx("div",{className:"flex flex-wrap items-center gap-0.5",children:d})})]})};exports.ToolbarMore=y;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
2
|
export interface ToolbarMoreProps {
|
|
3
3
|
children: ReactNode;
|
|
4
4
|
disabled?: boolean;
|
|
5
|
-
/** When true, render menu via portal for mobile (avoids clipping) */
|
|
6
5
|
isMobile?: boolean;
|
|
7
6
|
}
|
|
8
|
-
export declare const ToolbarMore:
|
|
9
|
-
export default ToolbarMore;
|
|
7
|
+
export declare const ToolbarMore: (props: ToolbarMoreProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,63 +1,61 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useState as f, useRef as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"div",
|
|
29
|
-
{
|
|
30
|
-
className: _(
|
|
31
|
-
"Bear-RichEditor__more-menu p-2 bg-white dark:bg-zinc-800 border border-gray-200 dark:border-zinc-700 rounded-lg shadow-xl min-w-[200px] max-w-[min(90vw,280px)] max-h-[70vh] overflow-y-auto",
|
|
32
|
-
t ? "fixed z-[9999]" : "absolute top-full right-0 mt-1 z-50"
|
|
33
|
-
),
|
|
34
|
-
style: t ? { top: d.top, left: d.left } : void 0,
|
|
35
|
-
children: /* @__PURE__ */ e("div", { className: "flex flex-wrap items-center gap-0.5", children: x })
|
|
36
|
-
}
|
|
37
|
-
);
|
|
38
|
-
return /* @__PURE__ */ g("div", { ref: n, className: "Bear-RichEditor__more relative", children: [
|
|
39
|
-
/* @__PURE__ */ e(
|
|
1
|
+
import { jsxs as p, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useState as f, useRef as a } from "react";
|
|
3
|
+
import { cn as h } from "../../../../utils/cn.js";
|
|
4
|
+
import { OverlayPortal as u } from "../../../OverlayPortal/OverlayPortal.js";
|
|
5
|
+
import { Tooltip as g } from "../../../Tooltip/Tooltip.js";
|
|
6
|
+
import { useClickOutsideMultiple as x } from "../../../../hooks/useClickOutside.js";
|
|
7
|
+
import "../../../../context/BearProvider.js";
|
|
8
|
+
import "../../../../hooks/useBearComponent/useBearComponent.js";
|
|
9
|
+
import { TWO_HUNDRED_TWENTY as b, FOUR_HUNDRED as _, SIXTEEN as R } from "../../../../constants/numbers.const.js";
|
|
10
|
+
import { useFixedAnchorPosition as y } from "../../../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.js";
|
|
11
|
+
import { ANCHOR_DEFAULT_Z_INDEX as E } from "../../../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.js";
|
|
12
|
+
import "../../../FormControl/FormControl.context.js";
|
|
13
|
+
import { TITLE_MORE_OPTIONS as m } from "../../RichEditor.const.js";
|
|
14
|
+
import { MoreHorizIcon as N } from "../../../Icon/index.js";
|
|
15
|
+
const A = (l) => {
|
|
16
|
+
const { children: s, disabled: t } = l, [r, i] = f(!1), o = a(null), n = a(null), { style: c, ready: d } = y({
|
|
17
|
+
anchorRef: o,
|
|
18
|
+
open: r,
|
|
19
|
+
minWidthPx: b,
|
|
20
|
+
placement: "bottom-end"
|
|
21
|
+
});
|
|
22
|
+
return x(
|
|
23
|
+
[o, n],
|
|
24
|
+
() => i(!1),
|
|
25
|
+
{ enabled: r }
|
|
26
|
+
), /* @__PURE__ */ p("div", { className: "Bear-RichEditor__more relative", children: [
|
|
27
|
+
/* @__PURE__ */ e(g, { content: m, delay: _, position: "top", children: /* @__PURE__ */ e(
|
|
40
28
|
"button",
|
|
41
29
|
{
|
|
42
|
-
ref:
|
|
30
|
+
ref: o,
|
|
43
31
|
type: "button",
|
|
44
|
-
|
|
45
|
-
disabled:
|
|
46
|
-
onClick: () =>
|
|
47
|
-
className:
|
|
48
|
-
"Bear-RichEditor__more-trigger",
|
|
49
|
-
|
|
50
|
-
v,
|
|
32
|
+
"aria-label": m,
|
|
33
|
+
disabled: t,
|
|
34
|
+
onClick: () => i(!r),
|
|
35
|
+
className: h(
|
|
36
|
+
"Bear-RichEditor__more-trigger p-1.5 rounded transition-colors",
|
|
37
|
+
"text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-zinc-700",
|
|
51
38
|
"flex items-center justify-center",
|
|
52
39
|
r && "bg-primary-500 text-white",
|
|
53
|
-
|
|
40
|
+
t && "Bear-RichEditor__more-trigger--disabled opacity-50 cursor-not-allowed"
|
|
54
41
|
),
|
|
55
|
-
children: /* @__PURE__ */ e(
|
|
42
|
+
children: /* @__PURE__ */ e(N, { size: R })
|
|
43
|
+
}
|
|
44
|
+
) }),
|
|
45
|
+
/* @__PURE__ */ e(
|
|
46
|
+
u,
|
|
47
|
+
{
|
|
48
|
+
open: r,
|
|
49
|
+
ready: d,
|
|
50
|
+
style: c,
|
|
51
|
+
zIndex: E,
|
|
52
|
+
panelRef: n,
|
|
53
|
+
className: "Bear-RichEditor__more-menu p-2 bg-white dark:bg-zinc-800 border border-gray-200 dark:border-zinc-700 rounded-lg shadow-xl min-w-[200px] max-w-[min(90vw,280px)] max-h-[70vh] overflow-y-auto",
|
|
54
|
+
children: /* @__PURE__ */ e("div", { className: "flex flex-wrap items-center gap-0.5", children: s })
|
|
56
55
|
}
|
|
57
|
-
)
|
|
58
|
-
r && (t && typeof document < "u" ? C(m, document.body) : m)
|
|
56
|
+
)
|
|
59
57
|
] });
|
|
60
58
|
};
|
|
61
59
|
export {
|
|
62
|
-
|
|
60
|
+
A as ToolbarMore
|
|
63
61
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("react"),p=require("../../../../utils/cn.cjs"),E=require("../../../../hooks/useClickOutside.cjs");require("../../../../context/BearProvider.cjs");require("../../../../hooks/useBearComponent/useBearComponent.cjs");const n=require("../../../../constants/numbers.const.cjs"),q=require("../../../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.cjs"),y=require("../../../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.cjs");require("../../../FormControl/FormControl.context.cjs");const f=require("../../../Icon/index.cjs"),m=require("../../../OverlayPortal/OverlayPortal.cjs"),T=require("../../../SignPad/SignPad.cjs"),j=require("../../../Tooltip/Tooltip.cjs"),d=require("../../../Button/Button.cjs"),h=require("../../RichEditor.const.cjs"),N=g=>{const{title:a,disabled:c,onInsert:b}=g,[r,t]=i.useState(!1),[o,l]=i.useState(null),s=i.useRef(null),u=i.useRef(null),{style:x,ready:R}=q.useFixedAnchorPosition({anchorRef:s,open:r,minWidthPx:n.FOUR_HUNDRED});E.useClickOutsideMultiple([s,u],()=>t(!1),{enabled:r});const _=()=>{o&&(b(o),l(null),t(!1))};return e.jsxs("div",{className:"Bear-RichEditor__signature relative",children:[e.jsx(j.Tooltip,{content:a,delay:n.FOUR_HUNDRED,position:"top",children:e.jsx("button",{ref:s,type:"button","aria-label":a,disabled:c,onClick:()=>t(!r),className:p.cn("Bear-RichEditor__button p-1.5 rounded transition-colors","text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-zinc-700",r&&"Bear-RichEditor__button--active bg-primary-500 text-white",c&&"Bear-RichEditor__button--disabled opacity-50 cursor-not-allowed"),children:e.jsx(f.EditIcon,{size:n.SIXTEEN})})}),e.jsxs(m.OverlayPortal,{open:r,ready:R,style:x,zIndex:y.ANCHOR_DEFAULT_Z_INDEX,panelRef:u,className:"Bear-RichEditor__signature-menu p-3 bg-white dark:bg-zinc-800 border border-gray-200 dark:border-zinc-700 rounded-lg shadow-xl",children:[e.jsx(T.SignPad,{height:n.TWO_HUNDRED,onChange:l,placeholder:"Sign here"}),e.jsxs("div",{className:"flex justify-end gap-2 mt-2",children:[e.jsx(d.Button,{size:"sm",variant:"ghost",onClick:()=>t(!1),children:h.TITLE_CANCEL}),e.jsx(d.Button,{size:"sm",variant:"primary",onClick:_,disabled:!o,children:h.TITLE_INSERT})]})]})]})};exports.ToolbarSignature=N;
|