@react-fabric/core 1.0.0-beta.5 → 1.0.0-beta.52
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/{src/components/actionLabel/ActionLabel.module.css → css/components/_actionLabel.css} +4 -4
- package/{src/overlays/alert/Alert.module.css → css/components/_alert.css} +3 -3
- package/{src/components/animations/Animations.module.css → css/components/_animations.css} +9 -9
- package/{src/components/avatar/Avatar.module.css → css/components/_avatar.css} +11 -11
- package/{src/components/badge/Badge.module.css → css/components/_badge.css} +19 -17
- package/{src/components/breadcrumbs/Breadcrumbs.module.css → css/components/_breadcrumbs.css} +49 -44
- package/{src/components/button/Button.module.css → css/components/_button.css} +69 -79
- package/{src/components/card/Card.module.css → css/components/_card.css} +50 -28
- package/{src/components/chip/Chip.module.css → css/components/_chip.css} +14 -10
- package/{src/components/collapsable/Collapsable.module.css → css/components/_collapsable.css} +3 -3
- package/css/components/_divider.css +38 -0
- package/{src/components/dropdown/Dropdown.module.css → css/components/_dropdown.css} +2 -2
- package/{src/overlays/flyout/Flyout.module.css → css/components/_flyout.css} +6 -6
- package/{src/components/icon/Icon.module.css → css/components/_icon.css} +8 -5
- package/{src/components/media/Media.module.css → css/components/_media.css} +17 -17
- package/{src/components/menu/Menu.module.css → css/components/_menu.css} +19 -20
- package/{src/overlays/message/Message.module.css → css/components/_message.css} +2 -2
- package/{src/components/meter/Meter.module.css → css/components/_meter.css} +10 -10
- package/{src/overlays/modal/Modal.module.css → css/components/_modal.css} +8 -8
- package/{src/components/panel/Panel.module.css → css/components/_panel.css} +17 -17
- package/{src/components/progress/Progress.module.css → css/components/_progress.css} +7 -10
- package/{src/components/tabpanel/TabPanel.module.css → css/components/_tabPanel.css} +73 -84
- package/{src/overlays/toast/Toast.module.css → css/components/_toast.css} +2 -2
- package/css/components/_tooltip.css +29 -0
- package/{src/core/content/Content.module.css → css/components/index.css} +25 -18
- package/{src/core/aside/Aside.module.css → css/core/_aside.css} +56 -42
- package/{src/core/section/Section.module.css → css/core/_content.css} +5 -3
- package/{src/core/boundary/ErrorBoundary.module.css → css/core/_errorboundary.css} +9 -9
- package/{src/core/headfoot/HeadFoot.module.css → css/core/_headfoot.css} +4 -10
- package/{src/core/page/Page.module.css → css/core/_page.css} +10 -14
- package/{src/core/responsive/Responsive.module.css → css/core/_responsive.css} +10 -10
- package/css/core/_section.css +28 -0
- package/{src/core/theme/Theme.module.css → css/core/_theme.css} +3 -3
- package/{src/typography/Typography.module.css → css/core/_typography.css} +14 -12
- package/{src/core/viewport/Viewport.module.css → css/core/_viewport.css} +7 -3
- package/css/core/index.css +33 -0
- package/css/reset/_gradients.css +8 -8
- package/css/reset/_reset.css +42 -224
- package/css/reset/_text.css +14 -29
- package/css/reset/_theme.css +331 -52
- package/css/reset/index.css +4 -4
- package/css/styles.css +7 -6
- package/css/theme/_colors.css +320 -0
- package/css/theme/_utilities.css +530 -0
- package/css/theme/index.css +45 -0
- package/dist/cjs/components/actionLabel/ActionLabel.js +26 -8
- package/dist/cjs/components/animations/Animations.js +118 -24
- package/dist/cjs/components/avatar/Avatar.js +43 -16
- package/dist/cjs/components/avatar/AvatarGroup.js +22 -4
- package/dist/cjs/components/badge/Badge.js +35 -6
- package/dist/cjs/components/breadcrumbs/Breadcrumbs.js +39 -8
- package/dist/cjs/components/button/Button.js +42 -15
- package/dist/cjs/components/button/ButtonGroup.js +30 -3
- package/dist/cjs/components/button/ConfirmButton.js +32 -4
- package/dist/cjs/components/button/ToggleButtonGroup.js +41 -15
- package/dist/cjs/components/callout/Callout.js +44 -4
- package/dist/cjs/components/card/Card.js +48 -10
- package/dist/cjs/components/card/CardCover.js +36 -5
- package/dist/cjs/components/card/FlipContent.js +56 -0
- package/dist/cjs/components/chip/Chip.js +32 -7
- package/dist/cjs/components/collapsable/Collapsable.js +32 -6
- package/dist/cjs/components/divider/Divider.js +30 -7
- package/dist/cjs/components/dropdown/Dropdown.js +48 -9
- package/dist/cjs/components/dropdown/DropdownTool.js +4 -3
- package/dist/cjs/components/empty/EmptyContent.js +35 -5
- package/dist/cjs/components/icon/Icon.js +44 -16
- package/dist/cjs/components/media/Media.js +172 -75
- package/dist/cjs/components/menu/ContextMenu.js +49 -10
- package/dist/cjs/components/menu/Menu.js +74 -21
- package/dist/cjs/components/menu/MenuItem.js +51 -16
- package/dist/cjs/components/meter/Meter.js +26 -3
- package/dist/cjs/components/navigator/Navigator.js +48 -13
- package/dist/cjs/components/panel/Panel.js +47 -9
- package/dist/cjs/components/panel/PanelGroup.js +25 -2
- package/dist/cjs/components/panel/PanelStack.js +31 -0
- package/dist/cjs/components/progress/ProgressBar.js +31 -9
- package/dist/cjs/components/progress/ProgressCircle.js +29 -7
- package/dist/cjs/components/tabpanel/Tab.js +89 -38
- package/dist/cjs/components/tabpanel/TabPanel.js +53 -16
- package/dist/cjs/context/Global.js +28 -1
- package/dist/cjs/context/NotificationCenter.js +3 -3
- package/dist/cjs/core/aside/Aside.js +49 -11
- package/dist/cjs/core/boundary/ErrorBoundary.js +23 -8
- package/dist/cjs/core/boundary/ErrorIcon.js +1 -2
- package/dist/cjs/core/content/Content.js +15 -8
- package/dist/cjs/core/headfoot/HeadFoot.js +44 -20
- package/dist/cjs/core/page/Page.js +40 -29
- package/dist/cjs/core/responsive/Responsive.js +59 -6
- package/dist/cjs/core/section/Section.js +1 -2
- package/dist/cjs/core/theme/ThemeProvider.js +32 -10
- package/dist/cjs/core/viewport/Viewport.js +18 -2
- package/dist/cjs/hooks/useControlledValue.js +12 -0
- package/dist/cjs/hooks/useDebounce.js +14 -1
- package/dist/cjs/hooks/useEffectDebugger.js +54 -2
- package/dist/cjs/hooks/useIsDark.js +8 -0
- package/dist/cjs/hooks/useIsRtl.js +12 -0
- package/dist/cjs/hooks/useNavigator.js +6 -4
- package/dist/cjs/hooks/useOverlayService.js +24 -0
- package/dist/cjs/hooks/usePropToggle.js +16 -5
- package/dist/cjs/hooks/useResize.js +18 -0
- package/dist/cjs/hooks/useResizeObserver.js +20 -1
- package/dist/cjs/hooks/useStorage.js +39 -0
- package/dist/cjs/hotkeys/HotKeyLabel.js +1 -1
- package/dist/cjs/hotkeys/HotKeyWrapper.js +3 -1
- package/dist/cjs/index.js +8 -2
- package/dist/cjs/overlays/alert/Alert.js +20 -14
- package/dist/cjs/overlays/flyout/Flyout.js +49 -60
- package/dist/cjs/overlays/message/Message.js +6 -3
- package/dist/cjs/overlays/modal/Modal.js +16 -12
- package/dist/cjs/overlays/toast/Toast.js +17 -9
- package/dist/cjs/overlays/tooltip/Tooltip.js +24 -11
- package/dist/cjs/types/icons.js +10 -1
- package/dist/cjs/typography/Abbr.js +32 -6
- package/dist/cjs/typography/{Link.js → Anchor.js} +23 -5
- package/dist/cjs/typography/Mark.js +22 -4
- package/dist/cjs/typography/Text.js +30 -5
- package/dist/cjs/typography/Title.js +19 -4
- package/dist/cjs/utils/cloneElement.js +47 -0
- package/dist/cjs/utils/getColor.js +1 -18
- package/dist/esm/components/actionLabel/ActionLabel.js +26 -8
- package/dist/esm/components/animations/Animations.js +119 -25
- package/dist/esm/components/avatar/Avatar.js +44 -17
- package/dist/esm/components/avatar/AvatarGroup.js +22 -4
- package/dist/esm/components/badge/Badge.js +36 -7
- package/dist/esm/components/breadcrumbs/Breadcrumbs.js +39 -8
- package/dist/esm/components/button/Button.js +42 -15
- package/dist/esm/components/button/ButtonGroup.js +31 -4
- package/dist/esm/components/button/ConfirmButton.js +32 -4
- package/dist/esm/components/button/ToggleButtonGroup.js +42 -16
- package/dist/esm/components/callout/Callout.js +44 -4
- package/dist/esm/components/card/Card.js +49 -11
- package/dist/esm/components/card/CardCover.js +36 -5
- package/dist/esm/components/card/FlipContent.js +56 -0
- package/dist/esm/components/chip/Chip.js +33 -8
- package/dist/esm/components/collapsable/Collapsable.js +32 -6
- package/dist/esm/components/divider/Divider.js +31 -8
- package/dist/esm/components/dropdown/Dropdown.js +48 -9
- package/dist/esm/components/dropdown/DropdownTool.js +4 -3
- package/dist/esm/components/empty/EmptyContent.js +35 -5
- package/dist/esm/components/icon/Icon.js +44 -16
- package/dist/esm/components/media/Media.js +173 -76
- package/dist/esm/components/menu/ContextMenu.js +51 -12
- package/dist/esm/components/menu/Menu.js +76 -23
- package/dist/esm/components/menu/MenuItem.js +45 -10
- package/dist/esm/components/meter/Meter.js +26 -3
- package/dist/esm/components/navigator/Navigator.js +48 -13
- package/dist/esm/components/panel/Panel.js +47 -9
- package/dist/esm/components/panel/PanelGroup.js +25 -2
- package/dist/esm/components/panel/PanelStack.js +31 -0
- package/dist/esm/components/progress/ProgressBar.js +31 -9
- package/dist/esm/components/progress/ProgressCircle.js +29 -7
- package/dist/esm/components/tabpanel/Tab.js +90 -39
- package/dist/esm/components/tabpanel/TabPanel.js +53 -16
- package/dist/esm/context/Global.js +28 -1
- package/dist/esm/context/NotificationCenter.js +3 -3
- package/dist/esm/core/aside/Aside.js +49 -11
- package/dist/esm/core/boundary/ErrorBoundary.js +23 -8
- package/dist/esm/core/boundary/ErrorIcon.js +1 -2
- package/dist/esm/core/content/Content.js +15 -8
- package/dist/esm/core/headfoot/HeadFoot.js +44 -20
- package/dist/esm/core/page/Page.js +40 -29
- package/dist/esm/core/responsive/Responsive.js +59 -6
- package/dist/esm/core/section/Section.js +1 -2
- package/dist/esm/core/theme/ThemeProvider.js +32 -10
- package/dist/esm/core/viewport/Viewport.js +18 -2
- package/dist/esm/hooks/useControlledValue.js +12 -0
- package/dist/esm/hooks/useDebounce.js +14 -1
- package/dist/esm/hooks/useEffectDebugger.js +54 -2
- package/dist/esm/hooks/useIsDark.js +8 -0
- package/dist/esm/hooks/useIsRtl.js +12 -0
- package/dist/esm/hooks/useNavigator.js +7 -5
- package/dist/esm/hooks/useOverlayService.js +24 -0
- package/dist/esm/hooks/usePropToggle.js +16 -5
- package/dist/esm/hooks/useResize.js +18 -0
- package/dist/esm/hooks/useResizeObserver.js +20 -1
- package/dist/esm/hooks/useStorage.js +39 -0
- package/dist/esm/hotkeys/HotKeyLabel.js +1 -1
- package/dist/esm/hotkeys/HotKeyWrapper.js +3 -1
- package/dist/esm/index.js +4 -1
- package/dist/esm/overlays/alert/Alert.js +21 -15
- package/dist/esm/overlays/flyout/Flyout.js +52 -63
- package/dist/esm/overlays/message/Message.js +7 -4
- package/dist/esm/overlays/modal/Modal.js +17 -13
- package/dist/esm/overlays/toast/Toast.js +18 -10
- package/dist/esm/overlays/tooltip/Tooltip.js +24 -11
- package/dist/esm/types/icons.js +10 -1
- package/dist/esm/typography/Abbr.js +32 -6
- package/dist/esm/typography/{Link.js → Anchor.js} +24 -6
- package/dist/esm/typography/Mark.js +22 -4
- package/dist/esm/typography/Text.js +31 -6
- package/dist/esm/typography/Title.js +20 -5
- package/dist/esm/utils/cloneElement.js +47 -0
- package/dist/esm/utils/getColor.js +2 -16
- package/dist/types/components/actionLabel/ActionLabel.d.ts +23 -4
- package/dist/types/components/animations/Animations.d.ts +84 -5
- package/dist/types/components/avatar/Avatar.d.ts +29 -5
- package/dist/types/components/avatar/AvatarGroup.d.ts +19 -1
- package/dist/types/components/badge/Badge.d.ts +30 -1
- package/dist/types/components/breadcrumbs/Breadcrumbs.d.ts +31 -2
- package/dist/types/components/button/Button.d.ts +29 -6
- package/dist/types/components/button/ButtonGroup.d.ts +28 -3
- package/dist/types/components/button/ConfirmButton.d.ts +28 -3
- package/dist/types/components/button/ToggleButtonGroup.d.ts +39 -11
- package/dist/types/components/callout/Callout.d.ts +29 -3
- package/dist/types/components/card/Card.d.ts +42 -4
- package/dist/types/components/card/CardCover.d.ts +25 -0
- package/dist/types/components/card/FlipContent.d.ts +28 -0
- package/dist/types/components/chip/Chip.d.ts +24 -4
- package/dist/types/components/collapsable/Collapsable.d.ts +33 -3
- package/dist/types/components/divider/Divider.d.ts +30 -7
- package/dist/types/components/dropdown/Dropdown.d.ts +40 -1
- package/dist/types/components/dropdown/DropdownTool.d.ts +27 -1
- package/dist/types/components/empty/EmptyContent.d.ts +32 -3
- package/dist/types/components/icon/Icon.d.ts +32 -6
- package/dist/types/components/index.d.ts +2 -1
- package/dist/types/components/media/Media.d.ts +56 -2
- package/dist/types/components/menu/ContextMenu.d.ts +21 -2
- package/dist/types/components/menu/Menu.d.ts +29 -0
- package/dist/types/components/menu/MenuItem.d.ts +22 -2
- package/dist/types/components/menu/types.d.ts +3 -2
- package/dist/types/components/meter/Meter.d.ts +24 -0
- package/dist/types/components/navigator/Navigator.d.ts +29 -4
- package/dist/types/components/panel/Panel.d.ts +37 -1
- package/dist/types/components/panel/PanelGroup.d.ts +24 -0
- package/dist/types/components/panel/PanelStack.d.ts +31 -0
- package/dist/types/components/progress/ProgressBar.d.ts +23 -3
- package/dist/types/components/progress/ProgressCircle.d.ts +22 -3
- package/dist/types/components/tabpanel/Tab.d.ts +36 -5
- package/dist/types/components/tabpanel/TabPanel.d.ts +43 -1
- package/dist/types/context/Global.d.ts +24 -1
- package/dist/types/core/aside/Aside.d.ts +38 -1
- package/dist/types/core/boundary/ErrorBoundary.d.ts +18 -2
- package/dist/types/core/content/Content.d.ts +9 -3
- package/dist/types/core/headfoot/HeadFoot.d.ts +41 -9
- package/dist/types/core/page/Page.d.ts +29 -4
- package/dist/types/core/responsive/Responsive.d.ts +58 -3
- package/dist/types/core/section/Section.d.ts +16 -1
- package/dist/types/core/theme/ThemeProvider.d.ts +25 -5
- package/dist/types/core/viewport/Viewport.d.ts +15 -1
- package/dist/types/hooks/useControlledValue.d.ts +13 -2
- package/dist/types/hooks/useDebounce.d.ts +12 -0
- package/dist/types/hooks/useEffectDebugger.d.ts +49 -0
- package/dist/types/hooks/useIsDark.d.ts +8 -0
- package/dist/types/hooks/useIsRtl.d.ts +12 -0
- package/dist/types/hooks/useNavigator.d.ts +18 -1
- package/dist/types/hooks/useOverlayService.d.ts +28 -9
- package/dist/types/hooks/usePropToggle.d.ts +16 -5
- package/dist/types/hooks/useResize.d.ts +19 -1
- package/dist/types/hooks/useResizeObserver.d.ts +20 -1
- package/dist/types/hooks/useStorage.d.ts +38 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/overlays/alert/Alert.d.ts +2 -3
- package/dist/types/overlays/flyout/Flyout.d.ts +3 -2
- package/dist/types/overlays/message/Message.d.ts +2 -3
- package/dist/types/overlays/modal/Modal.d.ts +12 -3
- package/dist/types/overlays/toast/Toast.d.ts +2 -3
- package/dist/types/overlays/tooltip/Tooltip.d.ts +2 -2
- package/dist/types/types/icons.d.ts +10 -1
- package/dist/types/types/index.d.ts +26 -6
- package/dist/types/typography/Abbr.d.ts +34 -4
- package/dist/types/typography/Anchor.d.ts +42 -0
- package/dist/types/typography/Copy.d.ts +15 -0
- package/dist/types/typography/Mark.d.ts +22 -4
- package/dist/types/typography/Text.d.ts +27 -1
- package/dist/types/typography/Title.d.ts +16 -1
- package/dist/types/typography/index.d.ts +1 -1
- package/dist/types/utils/cloneElement.d.ts +2 -0
- package/dist/types/utils/getColor.d.ts +1 -4
- package/dist/types/utils/index.d.ts +1 -0
- package/package.json +11 -13
- package/src/components/actionLabel/ActionLabel.tsx +38 -11
- package/src/components/animations/Animations.tsx +118 -33
- package/src/components/avatar/Avatar.tsx +106 -91
- package/src/components/avatar/AvatarGroup.tsx +23 -5
- package/src/components/badge/Badge.tsx +41 -9
- package/src/components/breadcrumbs/Breadcrumbs.tsx +42 -9
- package/src/components/button/Button.tsx +50 -23
- package/src/components/button/ButtonGroup.tsx +33 -7
- package/src/components/button/ConfirmButton.tsx +41 -7
- package/src/components/button/ToggleButtonGroup.tsx +74 -47
- package/src/components/callout/Callout.tsx +55 -12
- package/src/components/card/Card.tsx +64 -15
- package/src/components/card/CardCover.tsx +36 -6
- package/src/components/card/FlipContent.tsx +90 -0
- package/src/components/chip/Chip.tsx +39 -13
- package/src/components/collapsable/Collapsable.tsx +38 -7
- package/src/components/divider/Divider.tsx +42 -16
- package/src/components/dropdown/Dropdown.tsx +46 -11
- package/src/components/dropdown/DropdownTool.tsx +30 -3
- package/src/components/empty/EmptyContent.tsx +47 -6
- package/src/components/icon/Icon.tsx +85 -68
- package/src/components/index.ts +2 -1
- package/src/components/media/Media.tsx +195 -106
- package/src/components/menu/ContextMenu.tsx +55 -11
- package/src/components/menu/Menu.tsx +85 -30
- package/src/components/menu/MenuItem.tsx +40 -9
- package/src/components/menu/types.ts +3 -2
- package/src/components/meter/Meter.tsx +26 -3
- package/src/components/navigator/Navigator.tsx +58 -7
- package/src/components/panel/Panel.tsx +47 -9
- package/src/components/panel/PanelGroup.tsx +25 -2
- package/src/components/panel/PanelStack.tsx +31 -0
- package/src/components/progress/ProgressBar.tsx +33 -14
- package/src/components/progress/ProgressCircle.tsx +29 -13
- package/src/components/tabpanel/Tab.tsx +112 -64
- package/src/components/tabpanel/TabPanel.tsx +67 -12
- package/src/context/Global.tsx +28 -1
- package/src/context/NotificationCenter.tsx +3 -3
- package/src/core/aside/Aside.tsx +50 -12
- package/src/core/boundary/ErrorBoundary.tsx +25 -8
- package/src/core/boundary/ErrorIcon.tsx +1 -2
- package/src/core/content/Content.tsx +23 -13
- package/src/core/headfoot/HeadFoot.tsx +42 -35
- package/src/core/page/Page.tsx +44 -6
- package/src/core/responsive/Responsive.tsx +66 -8
- package/src/core/section/Section.tsx +17 -3
- package/src/core/theme/ThemeProvider.tsx +35 -14
- package/src/core/viewport/Viewport.tsx +16 -3
- package/src/hooks/useControlledValue.tsx +12 -0
- package/src/hooks/useDebounce.ts +13 -1
- package/src/hooks/useEffectDebugger.ts +50 -2
- package/src/hooks/useIsDark.ts +8 -0
- package/src/hooks/useIsRtl.ts +12 -0
- package/src/hooks/useNavigator.tsx +28 -5
- package/src/hooks/useOverlayService.tsx +36 -6
- package/src/hooks/usePropToggle.ts +16 -5
- package/src/hooks/useResize.ts +19 -1
- package/src/hooks/useResizeObserver.ts +32 -9
- package/src/hooks/useStorage.ts +38 -0
- package/src/hotkeys/HotKeyLabel.tsx +1 -1
- package/src/hotkeys/HotKeyWrapper.tsx +3 -1
- package/src/index.ts +4 -0
- package/src/overlays/alert/Alert.tsx +28 -32
- package/src/overlays/flyout/Flyout.tsx +71 -84
- package/src/overlays/message/Message.tsx +10 -7
- package/src/overlays/modal/Modal.tsx +37 -15
- package/src/overlays/toast/Toast.tsx +18 -27
- package/src/overlays/tooltip/Tooltip.tsx +43 -18
- package/src/types/icons.ts +18 -3
- package/src/types/index.ts +268 -27
- package/src/typography/Abbr.tsx +44 -11
- package/src/typography/{Link.tsx → Anchor.tsx} +26 -14
- package/src/typography/Copy.tsx +15 -0
- package/src/typography/Mark.tsx +24 -10
- package/src/typography/Text.tsx +31 -13
- package/src/typography/Title.tsx +18 -7
- package/src/typography/index.ts +1 -1
- package/src/{overlays/tooltip/Tooltip.module.css → utils/cloneElement.ts} +21 -27
- package/src/utils/getColor.ts +1 -17
- package/src/utils/index.ts +1 -0
- package/css/index.js +0 -250
- package/css/tailwind/colors.ts +0 -158
- package/dist/cjs/components/actionLabel/ActionLabel.module.css +0 -1
- package/dist/cjs/components/animations/Animations.module.css +0 -1
- package/dist/cjs/components/avatar/Avatar.module.css +0 -1
- package/dist/cjs/components/badge/Badge.module.css +0 -1
- package/dist/cjs/components/breadcrumbs/Breadcrumbs.module.css +0 -1
- package/dist/cjs/components/button/Button.module.css +0 -1
- package/dist/cjs/components/card/Card.module.css +0 -1
- package/dist/cjs/components/chip/Chip.module.css +0 -1
- package/dist/cjs/components/collapsable/Collapsable.module.css +0 -1
- package/dist/cjs/components/dropdown/Dropdown.module.css +0 -1
- package/dist/cjs/components/icon/Icon.module.css +0 -1
- package/dist/cjs/components/media/Media.module.css +0 -1
- package/dist/cjs/components/menu/Menu.module.css +0 -1
- package/dist/cjs/components/meter/Meter.module.css +0 -1
- package/dist/cjs/components/panel/Panel.module.css +0 -1
- package/dist/cjs/components/progress/Progress.module.css +0 -1
- package/dist/cjs/components/tabpanel/TabPanel.module.css +0 -1
- package/dist/cjs/core/aside/Aside.module.css +0 -1
- package/dist/cjs/core/boundary/ErrorBoundary.module.css +0 -1
- package/dist/cjs/core/content/Content.module.css +0 -1
- package/dist/cjs/core/headfoot/HeadFoot.module.css +0 -1
- package/dist/cjs/core/page/Page.module.css +0 -1
- package/dist/cjs/core/responsive/Responsive.module.css +0 -1
- package/dist/cjs/core/section/Section.module.css +0 -1
- package/dist/cjs/core/theme/Theme.module.css +0 -1
- package/dist/cjs/core/viewport/Viewport.module.css +0 -1
- package/dist/cjs/overlays/alert/Alert.module.css +0 -1
- package/dist/cjs/overlays/flyout/Flyout.module.css +0 -1
- package/dist/cjs/overlays/message/Message.module.css +0 -1
- package/dist/cjs/overlays/modal/Modal.module.css +0 -1
- package/dist/cjs/overlays/toast/Toast.module.css +0 -1
- package/dist/cjs/overlays/tooltip/Tooltip.module.css +0 -1
- package/dist/cjs/typography/Typography.module.css +0 -1
- package/dist/esm/components/actionLabel/ActionLabel.module.css +0 -1
- package/dist/esm/components/animations/Animations.module.css +0 -1
- package/dist/esm/components/avatar/Avatar.module.css +0 -1
- package/dist/esm/components/badge/Badge.module.css +0 -1
- package/dist/esm/components/breadcrumbs/Breadcrumbs.module.css +0 -1
- package/dist/esm/components/button/Button.module.css +0 -1
- package/dist/esm/components/card/Card.module.css +0 -1
- package/dist/esm/components/chip/Chip.module.css +0 -1
- package/dist/esm/components/collapsable/Collapsable.module.css +0 -1
- package/dist/esm/components/dropdown/Dropdown.module.css +0 -1
- package/dist/esm/components/icon/Icon.module.css +0 -1
- package/dist/esm/components/media/Media.module.css +0 -1
- package/dist/esm/components/menu/Menu.module.css +0 -1
- package/dist/esm/components/meter/Meter.module.css +0 -1
- package/dist/esm/components/panel/Panel.module.css +0 -1
- package/dist/esm/components/progress/Progress.module.css +0 -1
- package/dist/esm/components/tabpanel/TabPanel.module.css +0 -1
- package/dist/esm/core/aside/Aside.module.css +0 -1
- package/dist/esm/core/boundary/ErrorBoundary.module.css +0 -1
- package/dist/esm/core/content/Content.module.css +0 -1
- package/dist/esm/core/headfoot/HeadFoot.module.css +0 -1
- package/dist/esm/core/page/Page.module.css +0 -1
- package/dist/esm/core/responsive/Responsive.module.css +0 -1
- package/dist/esm/core/section/Section.module.css +0 -1
- package/dist/esm/core/theme/Theme.module.css +0 -1
- package/dist/esm/core/viewport/Viewport.module.css +0 -1
- package/dist/esm/overlays/alert/Alert.module.css +0 -1
- package/dist/esm/overlays/flyout/Flyout.module.css +0 -1
- package/dist/esm/overlays/message/Message.module.css +0 -1
- package/dist/esm/overlays/modal/Modal.module.css +0 -1
- package/dist/esm/overlays/toast/Toast.module.css +0 -1
- package/dist/esm/overlays/tooltip/Tooltip.module.css +0 -1
- package/dist/esm/typography/Typography.module.css +0 -1
- package/dist/types/typography/Link.d.ts +0 -25
|
@@ -2,26 +2,47 @@
|
|
|
2
2
|
|
|
3
3
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
4
4
|
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
5
|
-
var react = require('@floating-ui/react');
|
|
5
|
+
var react$1 = require('@floating-ui/react');
|
|
6
6
|
var utilities = require('@react-fabric/utilities');
|
|
7
7
|
var classNames = require('classnames');
|
|
8
|
-
var react
|
|
8
|
+
var react = require('react');
|
|
9
|
+
var HotKey = require('../../hotkeys/HotKey.js');
|
|
9
10
|
var HotKeyLabel = require('../../hotkeys/HotKeyLabel.js');
|
|
10
11
|
require('@babel/runtime/helpers/slicedToArray');
|
|
11
12
|
require('react-i18next');
|
|
12
13
|
require('../../hooks/useEffectDebugger.js');
|
|
13
14
|
var jsxRuntime = require('react/jsx-runtime');
|
|
14
|
-
require('../../hotkeys/HotKeyWrapper.js');
|
|
15
15
|
var Tooltip = require('../../overlays/tooltip/Tooltip.js');
|
|
16
16
|
var Badge = require('../badge/Badge.js');
|
|
17
17
|
var Icon = require('../icon/Icon.js');
|
|
18
18
|
require('../../types/icons.js');
|
|
19
|
-
|
|
19
|
+
require('../../hotkeys/HotKeyWrapper.js');
|
|
20
20
|
|
|
21
|
-
var _excluded = ["as", "label", "color", "className", "icon", "iconBg", "iconColor", "appendLabel", "rtlFlip", "altIcon", "id", "active", "disabled", "onClick", "badge", "hotKey", "minimal", "data-open", "ref"],
|
|
21
|
+
var _excluded = ["as", "label", "color", "className", "icon", "iconBg", "iconColor", "appendLabel", "rtlFlip", "altIcon", "id", "active", "disabled", "onClick", "badge", "hotKey", "tabIndex", "minimal", "data-open", "ref"],
|
|
22
22
|
_excluded2 = ["children"];
|
|
23
23
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
24
24
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
25
|
+
/**
|
|
26
|
+
* A menu item component that can be used in a dropdown or menu.
|
|
27
|
+
* It supports various features such as icons, badges, hotkeys, and more.
|
|
28
|
+
* It can be customized with different colors, icons, and behaviors.
|
|
29
|
+
*
|
|
30
|
+
* @param {MenuItemProps} props
|
|
31
|
+
* @returns A JSX element representing the menu item.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```jsx
|
|
35
|
+
* <MenuItem
|
|
36
|
+
* label="Settings"
|
|
37
|
+
* icon="settings"
|
|
38
|
+
* onClick={() => console.log("Settings clicked")}
|
|
39
|
+
* hotKey="Ctrl+S"
|
|
40
|
+
* badge={{ count: 3, color: "red" }}
|
|
41
|
+
* />
|
|
42
|
+
* ```
|
|
43
|
+
*
|
|
44
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/core-components-menu--docs} for documentation.
|
|
45
|
+
*/
|
|
25
46
|
var MenuItem = function MenuItem(_ref) {
|
|
26
47
|
var as = _ref.as,
|
|
27
48
|
label = _ref.label,
|
|
@@ -40,29 +61,36 @@ var MenuItem = function MenuItem(_ref) {
|
|
|
40
61
|
_onClick = _ref.onClick,
|
|
41
62
|
badge = _ref.badge,
|
|
42
63
|
hotKey = _ref.hotKey,
|
|
64
|
+
_ref$tabIndex = _ref.tabIndex,
|
|
65
|
+
tabIndex = _ref$tabIndex === void 0 ? -1 : _ref$tabIndex,
|
|
43
66
|
minimal = _ref.minimal,
|
|
44
67
|
childOpen = _ref["data-open"],
|
|
45
68
|
ref = _ref.ref,
|
|
46
69
|
aria = _objectWithoutProperties(_ref, _excluded);
|
|
47
|
-
var
|
|
48
|
-
var
|
|
70
|
+
var elRef = react.useRef(null);
|
|
71
|
+
var tree = react$1.useFloatingTree();
|
|
72
|
+
var badgeProps = react.useMemo(function () {
|
|
49
73
|
return Badge.getBadgeProps(badge);
|
|
50
74
|
}, [badge]);
|
|
51
|
-
|
|
75
|
+
react.useEffect(function () {
|
|
76
|
+
var _elRef$current;
|
|
77
|
+
tabIndex === 0 && ((_elRef$current = elRef.current) === null || _elRef$current === void 0 ? void 0 : _elRef$current.focus());
|
|
78
|
+
}, [tabIndex]);
|
|
79
|
+
var iconEl = react.useMemo(function () {
|
|
52
80
|
var _path;
|
|
53
81
|
var path = icon;
|
|
54
82
|
if (minimal && !path) {
|
|
55
83
|
path = utilities.iconToken(label);
|
|
56
84
|
}
|
|
57
85
|
return /*#__PURE__*/jsxRuntime.jsx(Icon.Icon, {
|
|
58
|
-
className: classNames(
|
|
86
|
+
className: classNames("fabric-menuIcon", minimal && "minimal"),
|
|
59
87
|
icon: (_path = path) !== null && _path !== void 0 ? _path : "",
|
|
60
88
|
bg: iconBg,
|
|
61
89
|
color: iconColor,
|
|
62
90
|
rtlFlip: rtlFlip
|
|
63
91
|
});
|
|
64
92
|
}, [icon, iconBg, iconColor, rtlFlip, minimal, label]);
|
|
65
|
-
var Wrapper = react
|
|
93
|
+
var Wrapper = react.useCallback(function (_ref2) {
|
|
66
94
|
var children = _ref2.children,
|
|
67
95
|
rest = _objectWithoutProperties(_ref2, _excluded2);
|
|
68
96
|
return minimal ? /*#__PURE__*/jsxRuntime.jsx(Tooltip.Tooltip, _objectSpread(_objectSpread({
|
|
@@ -71,11 +99,11 @@ var MenuItem = function MenuItem(_ref) {
|
|
|
71
99
|
disabled: childOpen
|
|
72
100
|
}, rest), {}, {
|
|
73
101
|
children: children
|
|
74
|
-
})) : /*#__PURE__*/jsxRuntime.jsx(react
|
|
102
|
+
})) : /*#__PURE__*/jsxRuntime.jsx(react.Fragment, {
|
|
75
103
|
children: children
|
|
76
104
|
});
|
|
77
105
|
}, [minimal, label, childOpen]);
|
|
78
|
-
var menuLabel = react
|
|
106
|
+
var menuLabel = react.useMemo(function () {
|
|
79
107
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
80
108
|
className: "flex flex-nowrap text-start items-center",
|
|
81
109
|
children: [iconEl, !minimal && /*#__PURE__*/jsxRuntime.jsx("label", {
|
|
@@ -98,20 +126,27 @@ var MenuItem = function MenuItem(_ref) {
|
|
|
98
126
|
}, [iconEl, minimal, appendLabel, label, badge, badgeProps, hotKey, active]);
|
|
99
127
|
var E = as !== null && as !== void 0 ? as : "button";
|
|
100
128
|
return /*#__PURE__*/jsxRuntime.jsx(Wrapper, _objectSpread(_objectSpread({}, aria), {}, {
|
|
101
|
-
children: /*#__PURE__*/jsxRuntime.
|
|
102
|
-
ref: ref,
|
|
129
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(E, _objectSpread(_objectSpread({
|
|
130
|
+
ref: utilities.mergeRefs(ref, elRef),
|
|
103
131
|
"data-dropdown-dismiss": true,
|
|
104
132
|
"data-color": color,
|
|
105
|
-
className: classNames(
|
|
133
|
+
className: classNames("fabric-menuItem cursor-pointer", className, active && "active", minimal && "minimal", disabled && "disabled", "rounded-capped relative max-w-[50vw] my-0.5"),
|
|
106
134
|
"data-active": active,
|
|
107
135
|
"data-open": childOpen,
|
|
108
136
|
disabled: disabled,
|
|
109
137
|
"data-id": id,
|
|
138
|
+
tabIndex: tabIndex,
|
|
110
139
|
onClick: function onClick(e) {
|
|
111
140
|
(_onClick === null || _onClick === void 0 ? void 0 : _onClick(e)) !== false && (tree === null || tree === void 0 ? void 0 : tree.events.emit("click"));
|
|
112
141
|
}
|
|
113
142
|
}, minimal ? {} : aria), {}, {
|
|
114
|
-
children:
|
|
143
|
+
children: [hotKey && /*#__PURE__*/jsxRuntime.jsx(HotKey.HotKey, {
|
|
144
|
+
keyCombo: hotKey,
|
|
145
|
+
handler: function handler() {
|
|
146
|
+
var _elRef$current2, _elRef$current2$click;
|
|
147
|
+
return (_elRef$current2 = elRef.current) === null || _elRef$current2 === void 0 || (_elRef$current2$click = _elRef$current2.click) === null || _elRef$current2$click === void 0 ? void 0 : _elRef$current2$click.call(_elRef$current2);
|
|
148
|
+
}
|
|
149
|
+
}), menuLabel]
|
|
115
150
|
}))
|
|
116
151
|
}));
|
|
117
152
|
};
|
|
@@ -5,12 +5,35 @@ var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProp
|
|
|
5
5
|
var utilities = require('@react-fabric/utilities');
|
|
6
6
|
var classNames = require('classnames');
|
|
7
7
|
var useEffectDebugger = require('../../hooks/useEffectDebugger.js');
|
|
8
|
-
var Meter_module = require('./Meter.module.css');
|
|
9
8
|
var jsxRuntime = require('react/jsx-runtime');
|
|
10
9
|
|
|
11
10
|
var _excluded = ["value", "hideLabel", "className"];
|
|
12
11
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13
12
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13
|
+
/**
|
|
14
|
+
* A component that displays a visual representation of a value as a series of dots.
|
|
15
|
+
* It is useful for showing progress or completion status in a compact form.
|
|
16
|
+
* The meter consists of 6 dots, each representing approximately 16.67% of the total value.
|
|
17
|
+
* The active dots are filled based on the value provided, and the remaining dots are empty.
|
|
18
|
+
* The component can also display a label showing the percentage value.
|
|
19
|
+
*
|
|
20
|
+
* @param {MeterProps} props - The properties for the Meter component.
|
|
21
|
+
* @returns {JSX.Element} The rendered Meter component.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```jsx
|
|
25
|
+
* <Meter value={75} />
|
|
26
|
+
* // Renders a meter with 4 active dots and a label showing "75%"
|
|
27
|
+
*
|
|
28
|
+
* <Meter value={50} hideLabel />
|
|
29
|
+
* // Renders a meter with 3 active dots and no label
|
|
30
|
+
*
|
|
31
|
+
* <Meter value={100} className="custom-meter" />
|
|
32
|
+
* // Renders a meter with all 6 active dots and a custom class name
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/core-components-meter--docs} for more details.
|
|
36
|
+
*/
|
|
14
37
|
var Meter = function Meter(_ref) {
|
|
15
38
|
var value = _ref.value,
|
|
16
39
|
hideLabel = _ref.hideLabel,
|
|
@@ -21,11 +44,11 @@ var Meter = function Meter(_ref) {
|
|
|
21
44
|
return value / 16.67;
|
|
22
45
|
}, [value], "Meter activeCount");
|
|
23
46
|
return /*#__PURE__*/jsxRuntime.jsxs("div", _objectSpread(_objectSpread({
|
|
24
|
-
className: classNames(
|
|
47
|
+
className: classNames("fabric-meter", className, "flex flex-nowrap items-center gap-[2px]")
|
|
25
48
|
}, aria), {}, {
|
|
26
49
|
children: [[0, 1, 2, 3, 4, 5].map(function (step) {
|
|
27
50
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
28
|
-
className: classNames(
|
|
51
|
+
className: classNames("fabric-meterBar", "first-of-type:rounded-s last-of-type:rounded-e bg-tint-100 relative outline -outline-offset-1 outline-muted overflow-hidden after:absolute after:inset-0"),
|
|
29
52
|
"data-active": activeCount >= step,
|
|
30
53
|
style: {
|
|
31
54
|
"--width": "".concat(Math.min((activeCount - step) * 100, 100), "%")
|
|
@@ -3,49 +3,84 @@
|
|
|
3
3
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
4
4
|
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
5
5
|
var classNames = require('classnames');
|
|
6
|
+
var react = require('react');
|
|
6
7
|
var HotKey = require('../../hotkeys/HotKey.js');
|
|
7
8
|
var icons = require('../../types/icons.js');
|
|
8
9
|
var Icon = require('../icon/Icon.js');
|
|
10
|
+
var utilities = require('@react-fabric/utilities');
|
|
9
11
|
var jsxRuntime = require('react/jsx-runtime');
|
|
10
12
|
|
|
11
|
-
var _excluded = ["className", "onNavigate", "color"];
|
|
13
|
+
var _excluded = ["className", "onNavigate", "color", "children", "length", "current", "disableKeyHandlers"];
|
|
12
14
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13
15
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
16
|
+
/**
|
|
17
|
+
* A component that provides navigation controls for traversing through items.
|
|
18
|
+
* It includes previous and next buttons, and supports keyboard navigation.
|
|
19
|
+
*
|
|
20
|
+
* @param {NavigatorProps} props - The properties for the Navigator component.
|
|
21
|
+
* @returns {JSX.Element} The rendered Navigator component.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```jsx
|
|
25
|
+
* <Navigator
|
|
26
|
+
* className="my-navigator"
|
|
27
|
+
* onNavigate={(dir) => console.log(`Navigate ${dir === -1 ? 'previous' : 'next'}`)}
|
|
28
|
+
* color="blue"
|
|
29
|
+
* length={10}
|
|
30
|
+
* current={0}
|
|
31
|
+
* >
|
|
32
|
+
* <span>Current Item: 1</span>
|
|
33
|
+
* </Navigator>
|
|
34
|
+
* ```
|
|
35
|
+
*
|
|
36
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/core-components-navigator--docs} for more details.
|
|
37
|
+
*/
|
|
14
38
|
var Navigator = function Navigator(_ref) {
|
|
15
39
|
var className = _ref.className,
|
|
16
40
|
onNavigate = _ref.onNavigate,
|
|
17
41
|
color = _ref.color,
|
|
42
|
+
children = _ref.children,
|
|
43
|
+
length = _ref.length,
|
|
44
|
+
current = _ref.current,
|
|
45
|
+
disableKeyHandlers = _ref.disableKeyHandlers,
|
|
18
46
|
aria = _objectWithoutProperties(_ref, _excluded);
|
|
47
|
+
var navPrev = react.useCallback(function () {
|
|
48
|
+
return (utilities.isEmpty(current) || current !== 0) && onNavigate(-1);
|
|
49
|
+
}, [onNavigate, current]);
|
|
50
|
+
var navNext = react.useCallback(function () {
|
|
51
|
+
return (utilities.isEmpty(current) || current + 1 < (length !== null && length !== void 0 ? length : 0)) && onNavigate(+1);
|
|
52
|
+
}, [onNavigate, current, length]);
|
|
19
53
|
return /*#__PURE__*/jsxRuntime.jsxs("div", _objectSpread(_objectSpread({
|
|
20
|
-
|
|
54
|
+
"data-ref": "navigator",
|
|
55
|
+
className: classNames(className, "inline-flex items-center leading-none")
|
|
21
56
|
}, aria), {}, {
|
|
22
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(HotKey.HotKey, {
|
|
57
|
+
children: [!disableKeyHandlers && /*#__PURE__*/jsxRuntime.jsx(HotKey.HotKey, {
|
|
23
58
|
keyCombo: "left",
|
|
24
|
-
handler:
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
}), /*#__PURE__*/jsxRuntime.jsx(HotKey.HotKey, {
|
|
59
|
+
handler: navPrev
|
|
60
|
+
}), !disableKeyHandlers && /*#__PURE__*/jsxRuntime.jsx(HotKey.HotKey, {
|
|
28
61
|
keyCombo: "right",
|
|
29
|
-
handler:
|
|
30
|
-
return onNavigate(1);
|
|
31
|
-
}
|
|
62
|
+
handler: navNext
|
|
32
63
|
}), /*#__PURE__*/jsxRuntime.jsx(Icon.Icon, {
|
|
33
64
|
rtlFlip: true,
|
|
34
65
|
color: color,
|
|
35
66
|
className: "text-[1em] p-1",
|
|
36
67
|
"aria-label": "previous",
|
|
68
|
+
"data-ref": "previous",
|
|
37
69
|
icon: icons.CoreIcons.chevronLeft,
|
|
70
|
+
disabled: !utilities.isEmpty(current) && current === 0,
|
|
38
71
|
onClick: function onClick(e) {
|
|
39
|
-
return [e.stopPropagation(),
|
|
72
|
+
return [e.stopPropagation(), navPrev()];
|
|
40
73
|
}
|
|
41
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Icon.Icon, {
|
|
74
|
+
}), children, /*#__PURE__*/jsxRuntime.jsx(Icon.Icon, {
|
|
42
75
|
rtlFlip: true,
|
|
43
76
|
className: "text-[1em] p-1",
|
|
44
77
|
color: color,
|
|
45
78
|
"aria-label": "next",
|
|
79
|
+
"data-ref": "next",
|
|
46
80
|
icon: icons.CoreIcons.chevronRight,
|
|
81
|
+
disabled: !utilities.isEmpty(current) && current + 1 === length,
|
|
47
82
|
onClick: function onClick(e) {
|
|
48
|
-
return [e.stopPropagation(),
|
|
83
|
+
return [e.stopPropagation(), navNext()];
|
|
49
84
|
}
|
|
50
85
|
})]
|
|
51
86
|
}));
|
|
@@ -9,12 +9,48 @@ var usePropToggle = require('../../hooks/usePropToggle.js');
|
|
|
9
9
|
var icons = require('../../types/icons.js');
|
|
10
10
|
var Animations = require('../animations/Animations.js');
|
|
11
11
|
var Icon = require('../icon/Icon.js');
|
|
12
|
-
var Panel_module = require('./Panel.module.css');
|
|
13
12
|
var jsxRuntime = require('react/jsx-runtime');
|
|
14
13
|
|
|
15
14
|
var _excluded = ["children", "className", "titleClassName", "headerClassName", "title", "actions", "icon", "iconBg", "iconColor", "rtlFlip", "panelId", "height", "width", "minHeight", "minWidth", "maxHeight", "maxWidth", "loading", "expandable", "expanded", "onExpand", "collapsable", "collapsed", "onCollapse", "onClose", "onBack"];
|
|
16
15
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
17
16
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
17
|
+
/**
|
|
18
|
+
* A component that represents a panel with a header, body, and optional actions.
|
|
19
|
+
* It supports expandable and collapsible functionality, loading state, and customizable styles.
|
|
20
|
+
* The panel can be resized and has a fixed position when expanded.
|
|
21
|
+
* It can be customized with different colors, icons, and behaviors.
|
|
22
|
+
* This component is useful for displaying content in a structured way, allowing users to interact with it through actions and toggles.
|
|
23
|
+
* It can be used in various applications where panels are needed, such as dashboards, settings pages, or content management systems.
|
|
24
|
+
*
|
|
25
|
+
* @param {PanelProps} props - The properties for the Panel component.
|
|
26
|
+
* @returns {JSX.Element} The rendered Panel component.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```jsx
|
|
30
|
+
* <Panel
|
|
31
|
+
* title="Panel Title"
|
|
32
|
+
* icon={CoreIcons.info}
|
|
33
|
+
* iconBg="bg-blue-500"
|
|
34
|
+
* iconColor="text-white"
|
|
35
|
+
* actions={<button>Action</button>}
|
|
36
|
+
* expandable
|
|
37
|
+
* collapsable
|
|
38
|
+
* onExpand={() => console.log("Expanded")}
|
|
39
|
+
* onCollapse={() => console.log("Collapsed")}
|
|
40
|
+
* onClose={() => console.log("Closed")}
|
|
41
|
+
* height="400px"
|
|
42
|
+
* width="300px"
|
|
43
|
+
* minHeight="200px"
|
|
44
|
+
* minWidth="200px"
|
|
45
|
+
* maxHeight="600px"
|
|
46
|
+
* maxWidth="600px"
|
|
47
|
+
* >
|
|
48
|
+
* <p>This is the content of the panel.</p>
|
|
49
|
+
* </Panel>
|
|
50
|
+
* ```
|
|
51
|
+
*
|
|
52
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/core-components-panel--docs} for more details.
|
|
53
|
+
*/
|
|
18
54
|
var Panel = function Panel(_ref) {
|
|
19
55
|
var children = _ref.children,
|
|
20
56
|
className = _ref.className,
|
|
@@ -55,7 +91,7 @@ var Panel = function Panel(_ref) {
|
|
|
55
91
|
return !!expandable || !!collapsable || !!onClose;
|
|
56
92
|
}, [expandable, collapsable, onClose]);
|
|
57
93
|
return /*#__PURE__*/jsxRuntime.jsxs("div", _objectSpread(_objectSpread({
|
|
58
|
-
className: classNames(
|
|
94
|
+
className: classNames("fabric-panel", className, "rounded-capped overflow-hidden outline grid", expanded ? "fixed inset-4 z-50" : "relative"),
|
|
59
95
|
"data-ref": "panel",
|
|
60
96
|
"data-collapsed": collapsed,
|
|
61
97
|
style: expanded ? {} : collapsed ? {
|
|
@@ -73,11 +109,12 @@ var Panel = function Panel(_ref) {
|
|
|
73
109
|
}, aria), {}, {
|
|
74
110
|
children: [/*#__PURE__*/jsxRuntime.jsxs("header", {
|
|
75
111
|
role: "none",
|
|
76
|
-
className: classNames(
|
|
112
|
+
className: classNames("fabric-panelHeader", headerClassName, "flex flex-nowrap items-center area-head"),
|
|
113
|
+
"data-ref": "panelHeader",
|
|
77
114
|
onClick: collapsable ? toggleCollapse : undefined,
|
|
78
115
|
children: [onBack && /*#__PURE__*/jsxRuntime.jsx(Icon.Icon, {
|
|
79
116
|
"data-ref": "panelBack",
|
|
80
|
-
className: classNames(
|
|
117
|
+
className: classNames("fabric-panelAction", "cursor-pointer"),
|
|
81
118
|
icon: icons.CoreIcons.chevronLeft,
|
|
82
119
|
onClick: onBack
|
|
83
120
|
}), icon && /*#__PURE__*/jsxRuntime.jsx(Icon.Icon, {
|
|
@@ -90,7 +127,7 @@ var Panel = function Panel(_ref) {
|
|
|
90
127
|
className: classNames(titleClassName, "flex-1 select-none truncate", title && "py-1 first:px-2"),
|
|
91
128
|
children: title
|
|
92
129
|
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
93
|
-
className: "px-1",
|
|
130
|
+
className: "px-1 leading-none",
|
|
94
131
|
children: actions
|
|
95
132
|
}), hasTools && /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
96
133
|
role: "none",
|
|
@@ -100,23 +137,24 @@ var Panel = function Panel(_ref) {
|
|
|
100
137
|
},
|
|
101
138
|
children: [expandable && /*#__PURE__*/jsxRuntime.jsx(Icon.Icon, {
|
|
102
139
|
"data-ref": "panelExpand",
|
|
103
|
-
className: classNames(
|
|
140
|
+
className: classNames("fabric-panelAction", "cursor-pointer"),
|
|
104
141
|
icon: expanded ? icons.CoreIcons.minimize : icons.CoreIcons.maximize,
|
|
105
142
|
onClick: toggleExpand
|
|
106
143
|
}), !expanded && collapsable && /*#__PURE__*/jsxRuntime.jsx(Icon.Icon, {
|
|
107
144
|
"data-ref": "panelCollapse",
|
|
108
|
-
className: classNames(
|
|
145
|
+
className: classNames("fabric-panelAction", "cursor-pointer"),
|
|
109
146
|
icon: collapsed ? icons.CoreIcons.expand : icons.CoreIcons.collapse,
|
|
110
147
|
onClick: toggleCollapse
|
|
111
148
|
}), !expanded && onClose && /*#__PURE__*/jsxRuntime.jsx(Icon.Icon, {
|
|
112
149
|
"data-ref": "panelClose",
|
|
113
|
-
className: classNames(
|
|
150
|
+
className: classNames("fabric-panelAction", "cursor-pointer"),
|
|
114
151
|
icon: icons.CoreIcons.close,
|
|
115
152
|
onClick: onClose
|
|
116
153
|
})]
|
|
117
154
|
})]
|
|
118
155
|
}), (!collapsed || expanded) && /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
119
|
-
|
|
156
|
+
"data-ref": "panelBody",
|
|
157
|
+
className: classNames("fabric-panelBody", "area-content grid overflow-hidden"),
|
|
120
158
|
children: [loading && /*#__PURE__*/jsxRuntime.jsx(Animations.Loading, {}), children]
|
|
121
159
|
})]
|
|
122
160
|
}));
|
|
@@ -4,9 +4,32 @@ var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
|
4
4
|
var classNames = require('classnames');
|
|
5
5
|
var react = require('react');
|
|
6
6
|
var useEffectDebugger = require('../../hooks/useEffectDebugger.js');
|
|
7
|
-
var Panel_module = require('./Panel.module.css');
|
|
8
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
9
8
|
|
|
9
|
+
/**
|
|
10
|
+
* A component that groups multiple panels together, allowing for one panel to be expanded at a time.
|
|
11
|
+
* This component allows you to manage a group of panels where only one can be expanded at a time.
|
|
12
|
+
* It accepts an `activePanel` prop to control which panel is currently expanded,
|
|
13
|
+
* and an `onActiveChange` callback that is triggered when the active panel changes.
|
|
14
|
+
* It uses the `Panel` component to render each individual panel within the group.
|
|
15
|
+
*
|
|
16
|
+
* @param {PanelGroupProps} props - The properties for the PanelGroup component.
|
|
17
|
+
* @returns {JSX.Element} The rendered PanelGroup component.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```jsx
|
|
21
|
+
* <PanelGroup
|
|
22
|
+
* activePanel="panel1"
|
|
23
|
+
* onActiveChange={(panelId) => console.log(`Active panel changed to: ${panelId}`)}
|
|
24
|
+
* >
|
|
25
|
+
* <Panel panelId="panel1" title="Panel 1">Content for Panel 1</Panel>
|
|
26
|
+
* <Panel panelId="panel2" title="Panel 2">Content for Panel 2</Panel>
|
|
27
|
+
* <Panel panelId="panel3" title="Panel 3">Content for Panel 3</Panel>
|
|
28
|
+
* </PanelGroup>
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
31
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/core-components-panel--docs} for more details.
|
|
32
|
+
*/
|
|
10
33
|
var PanelGroup = function PanelGroup(_ref) {
|
|
11
34
|
var children = _ref.children,
|
|
12
35
|
activePanel = _ref.activePanel,
|
|
@@ -33,7 +56,7 @@ var PanelGroup = function PanelGroup(_ref) {
|
|
|
33
56
|
}, [onActiveChange, expandedPanel]);
|
|
34
57
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
35
58
|
"data-ref": "panelGroup",
|
|
36
|
-
className: classNames(
|
|
59
|
+
className: classNames("fabric-panelGroup", "flex flex-col overflow-auto area-content p-px"),
|
|
37
60
|
children: react.Children.toArray(children).map(function (child, index) {
|
|
38
61
|
return /*#__PURE__*/react.cloneElement(child, {
|
|
39
62
|
panelId: child.props.panelId || index,
|
|
@@ -10,6 +10,37 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
10
10
|
var _excluded = ["active", "children", "className", "onPanelChange", "onBack"];
|
|
11
11
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12
12
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13
|
+
/**
|
|
14
|
+
* A component that manages a stack of panels, allowing navigation between them.
|
|
15
|
+
* This component allows you to manage a stack of panels where you can navigate between them.
|
|
16
|
+
* It accepts an `active` prop to control which panel is currently active,
|
|
17
|
+
* an `onPanelChange` callback that is triggered when the active panel changes,
|
|
18
|
+
* and an `onBack` callback to handle navigation to the previous panel in the history.
|
|
19
|
+
* It uses the `Panel` component to render each individual panel within the stack.
|
|
20
|
+
* The component maintains a history of panels to allow back navigation,
|
|
21
|
+
* and it updates the active panel based on user interactions.
|
|
22
|
+
*
|
|
23
|
+
* @param {PanelStackProps} props - The properties for the PanelStack component.
|
|
24
|
+
* @returns {JSX.Element} The rendered PanelStack component.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```jsx
|
|
28
|
+
* <PanelStack
|
|
29
|
+
* active="panel1"
|
|
30
|
+
* onPanelChange={(panelId) => console.log(`Active panel changed to: ${panelId}`)}
|
|
31
|
+
* onBack={(currentPanel, nextPanel) => {
|
|
32
|
+
* console.log(`Navigating back from ${currentPanel} to ${nextPanel}`);
|
|
33
|
+
* return true; // return false to prevent navigation
|
|
34
|
+
* }}
|
|
35
|
+
* >
|
|
36
|
+
* <Panel panelId="panel1" title="Panel 1">Content for Panel 1</Panel>
|
|
37
|
+
* <Panel panelId="panel2" title="Panel 2">Content for Panel 2</Panel>
|
|
38
|
+
* <Panel panelId="panel3" title="Panel 3">Content for Panel 3</Panel>
|
|
39
|
+
* </PanelStack>
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
42
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/core-components-panelstack--docs} for more details.
|
|
43
|
+
*/
|
|
13
44
|
var PanelStack = function PanelStack(_ref) {
|
|
14
45
|
_ref.active;
|
|
15
46
|
var children = _ref.children,
|
|
@@ -4,9 +4,9 @@ var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
|
4
4
|
var utilities = require('@react-fabric/utilities');
|
|
5
5
|
var classNames = require('classnames');
|
|
6
6
|
var useEffectDebugger = require('../../hooks/useEffectDebugger.js');
|
|
7
|
-
|
|
8
|
-
var Progress_module = require('./Progress.module.css');
|
|
7
|
+
require('react');
|
|
9
8
|
var jsxRuntime = require('react/jsx-runtime');
|
|
9
|
+
var getColor = require('../../utils/getColor.js');
|
|
10
10
|
|
|
11
11
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12
12
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -19,29 +19,51 @@ var SizeMap = {
|
|
|
19
19
|
lg: "1.5rem",
|
|
20
20
|
xl: "2rem"
|
|
21
21
|
};
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* A component that displays a progress bar indicating the completion percentage of a task or operation.
|
|
25
|
+
* The progress bar is styled with a background color and a track that fills based on the value provided.
|
|
26
|
+
* It can also display a label showing the percentage value.
|
|
27
|
+
* The label can be customized or hidden based on the props provided.
|
|
28
|
+
*
|
|
29
|
+
* @param {ProgressProps} props - The properties for the ProgressBar component.
|
|
30
|
+
* @returns {JSX.Element} The rendered ProgressBar component.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```jsx
|
|
34
|
+
* <ProgressBar value={0.75} size="md" color="primary-500" label="Loading" animate />
|
|
35
|
+
* // Renders a progress bar with 75% completion, medium size, primary color, and a label "Loading"
|
|
36
|
+
*
|
|
37
|
+
* <ProgressBar value={0.5} size="lg" color="success-500" />
|
|
38
|
+
* // Renders a progress bar with 50% completion, large size, and success color without a label
|
|
39
|
+
* ```
|
|
40
|
+
*
|
|
41
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/core-components-progress--docs} for more details.
|
|
42
|
+
*/
|
|
22
43
|
var ProgressBar = function ProgressBar(_ref) {
|
|
23
44
|
var _ref$value = _ref.value,
|
|
24
45
|
value = _ref$value === void 0 ? 0 : _ref$value,
|
|
25
46
|
size = _ref.size,
|
|
26
47
|
_ref$color = _ref.color,
|
|
27
|
-
color = _ref$color === void 0 ? "primary" : _ref$color,
|
|
48
|
+
color = _ref$color === void 0 ? "primary-500" : _ref$color,
|
|
28
49
|
_ref$label = _ref.label,
|
|
29
50
|
label = _ref$label === void 0 ? "" : _ref$label,
|
|
30
51
|
animate = _ref.animate;
|
|
31
52
|
/** ***************** make sure value is between 0 and 100 *******************/
|
|
32
53
|
var actualValue = useEffectDebugger.useMemoDebugger(function () {
|
|
33
|
-
return Math.min(Math.max(value, 0),
|
|
54
|
+
return Math.min(Math.max(value, 0), 1);
|
|
34
55
|
}, [value], "ProgressBar value");
|
|
35
56
|
var progressVar = useEffectDebugger.useMemoDebugger(function () {
|
|
36
57
|
return {
|
|
37
|
-
"--progress": actualValue
|
|
58
|
+
"--progress": actualValue * 100
|
|
38
59
|
};
|
|
39
60
|
}, [actualValue], "ProgressBar cssVar");
|
|
40
61
|
|
|
41
62
|
/** ***************** component *******************/
|
|
42
63
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
43
|
-
className: classNames(
|
|
64
|
+
className: classNames("fabric-progressbar", "block bg-dimmed relative rounded font-bold overflow-hidden whitespace-nowrap"),
|
|
44
65
|
style: _objectSpread(_objectSpread({}, progressVar), {}, {
|
|
66
|
+
color: getColor.getColor(color),
|
|
45
67
|
minHeight: SizeMap[size !== null && size !== void 0 ? size : ""],
|
|
46
68
|
fontSize: SizeMap[size !== null && size !== void 0 ? size : ""]
|
|
47
69
|
}),
|
|
@@ -49,12 +71,12 @@ var ProgressBar = function ProgressBar(_ref) {
|
|
|
49
71
|
"aria-hidden": "true",
|
|
50
72
|
children: [!["xxs", "xs", "sm"].includes(size !== null && size !== void 0 ? size : "") && /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
51
73
|
className: "absolute inset-0 text-center z-0 align-top",
|
|
52
|
-
children: [label, " ", utilities.Format.percent(actualValue
|
|
74
|
+
children: [label, " ", utilities.Format.percent(actualValue)]
|
|
53
75
|
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
54
|
-
className: classNames(
|
|
76
|
+
className: classNames("fabric-progressTrack", animate && "fabric-progressAnimate", "h-full overflow-clip bg-current relative z-0")
|
|
55
77
|
}), !["xxs", "xs", "sm"].includes(size !== null && size !== void 0 ? size : "") && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
56
78
|
className: classNames("h-full absolute inset-0 overflow-hidden z-1"),
|
|
57
|
-
"data-label": "".concat(label, " ").concat(utilities.Format.percent(actualValue
|
|
79
|
+
"data-label": "".concat(label, " ").concat(utilities.Format.percent(actualValue))
|
|
58
80
|
})]
|
|
59
81
|
});
|
|
60
82
|
};
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
var utilities = require('@react-fabric/utilities');
|
|
4
4
|
var classNames = require('classnames');
|
|
5
5
|
var useEffectDebugger = require('../../hooks/useEffectDebugger.js');
|
|
6
|
-
|
|
6
|
+
require('react');
|
|
7
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
+
var getColor = require('../../utils/getColor.js');
|
|
8
9
|
|
|
9
10
|
/*
|
|
10
11
|
* React Fabric
|
|
@@ -36,30 +37,51 @@ var SizeMap = {
|
|
|
36
37
|
lg: "1.5rem",
|
|
37
38
|
xl: "2rem"
|
|
38
39
|
};
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* A circular progress indicator that visually represents a percentage of completion.
|
|
43
|
+
* It displays a circular track with a stroke that fills based on the `value` prop.
|
|
44
|
+
* The component is customizable with size and color props.
|
|
45
|
+
*
|
|
46
|
+
* @param {ProgressProps} props - The properties for the ProgressCircle component.
|
|
47
|
+
* @returns {JSX.Element} - A circular progress indicator.
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```jsx
|
|
51
|
+
* <ProgressCircle value={0.75} size="md" color="primary-500" />
|
|
52
|
+
* // Renders a circular progress indicator with 75% completion, medium size, and primary color.
|
|
53
|
+
*
|
|
54
|
+
* <ProgressCircle value={0.5} size="lg" color="secondary-500" />
|
|
55
|
+
* // Renders a circular progress indicator with 50% completion, large size, and secondary color.
|
|
56
|
+
* ```
|
|
57
|
+
*
|
|
58
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/core-components-progress--docs} for more details.
|
|
59
|
+
*/
|
|
39
60
|
var ProgressCircle = function ProgressCircle(_ref) {
|
|
40
61
|
var _ref$value = _ref.value,
|
|
41
62
|
value = _ref$value === void 0 ? 0 : _ref$value,
|
|
42
63
|
_ref$size = _ref.size,
|
|
43
64
|
size = _ref$size === void 0 ? "sm" : _ref$size,
|
|
44
65
|
_ref$color = _ref.color,
|
|
45
|
-
color = _ref$color === void 0 ? "primary" : _ref$color;
|
|
66
|
+
color = _ref$color === void 0 ? "primary-500" : _ref$color;
|
|
46
67
|
/** ***************** make sure value is between 0 and 100 *******************/
|
|
47
68
|
var actualValue = useEffectDebugger.useMemoDebugger(function () {
|
|
48
|
-
return Math.min(Math.max(value, 0),
|
|
69
|
+
return Math.min(Math.max(value, 0), 1);
|
|
49
70
|
}, [value], "ProgressCirle value");
|
|
50
71
|
|
|
51
72
|
/** ***************** calculate stroke offset by actual value *******************/
|
|
52
73
|
var strokeDashoffset = useEffectDebugger.useMemoDebugger(function () {
|
|
53
74
|
var circumfrence = Math.PI * 2 * 44;
|
|
54
|
-
return circumfrence * (1 - actualValue
|
|
75
|
+
return circumfrence * (1 - actualValue);
|
|
55
76
|
}, [actualValue], "ProgressCirle dashOffset");
|
|
56
77
|
|
|
57
78
|
/** ***************** component *******************/
|
|
58
79
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
59
|
-
className: classNames("inline-block w-[4em] h-[4em] text-lg relative"
|
|
80
|
+
className: classNames("inline-block w-[4em] h-[4em] text-lg relative"),
|
|
60
81
|
"aria-hidden": "true",
|
|
61
82
|
style: {
|
|
62
|
-
fontSize: SizeMap[size]
|
|
83
|
+
fontSize: SizeMap[size],
|
|
84
|
+
color: getColor.getColor(color)
|
|
63
85
|
},
|
|
64
86
|
children: [/*#__PURE__*/jsxRuntime.jsxs("svg", {
|
|
65
87
|
viewBox: "0 0 100 100",
|
|
@@ -88,7 +110,7 @@ var ProgressCircle = function ProgressCircle(_ref) {
|
|
|
88
110
|
})]
|
|
89
111
|
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
90
112
|
className: "flex w-full h-full items-center justify-center select-none font-bold text-[0.625em]",
|
|
91
|
-
children: utilities.Format.percent(actualValue
|
|
113
|
+
children: utilities.Format.percent(actualValue)
|
|
92
114
|
})]
|
|
93
115
|
});
|
|
94
116
|
};
|