@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
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { type ContentProps } from "../../core/content/Content";
|
|
3
2
|
import { type HeadFootProps } from "../../core/headfoot/HeadFoot";
|
|
4
3
|
import { type AriaProps, type ChildrenProp, type CollapseProps, type CssProp, type ExpandProps, type IconProps, type TestProps } from "../../types";
|
|
@@ -56,4 +55,41 @@ export interface PanelProps extends CssProp, AriaProps, TestProps, IconProps, Ex
|
|
|
56
55
|
*/
|
|
57
56
|
onClose?: () => void;
|
|
58
57
|
}
|
|
58
|
+
/**
|
|
59
|
+
* A component that represents a panel with a header, body, and optional actions.
|
|
60
|
+
* It supports expandable and collapsible functionality, loading state, and customizable styles.
|
|
61
|
+
* The panel can be resized and has a fixed position when expanded.
|
|
62
|
+
* It can be customized with different colors, icons, and behaviors.
|
|
63
|
+
* This component is useful for displaying content in a structured way, allowing users to interact with it through actions and toggles.
|
|
64
|
+
* It can be used in various applications where panels are needed, such as dashboards, settings pages, or content management systems.
|
|
65
|
+
*
|
|
66
|
+
* @param {PanelProps} props - The properties for the Panel component.
|
|
67
|
+
* @returns {JSX.Element} The rendered Panel component.
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```jsx
|
|
71
|
+
* <Panel
|
|
72
|
+
* title="Panel Title"
|
|
73
|
+
* icon={CoreIcons.info}
|
|
74
|
+
* iconBg="bg-blue-500"
|
|
75
|
+
* iconColor="text-white"
|
|
76
|
+
* actions={<button>Action</button>}
|
|
77
|
+
* expandable
|
|
78
|
+
* collapsable
|
|
79
|
+
* onExpand={() => console.log("Expanded")}
|
|
80
|
+
* onCollapse={() => console.log("Collapsed")}
|
|
81
|
+
* onClose={() => console.log("Closed")}
|
|
82
|
+
* height="400px"
|
|
83
|
+
* width="300px"
|
|
84
|
+
* minHeight="200px"
|
|
85
|
+
* minWidth="200px"
|
|
86
|
+
* maxHeight="600px"
|
|
87
|
+
* maxWidth="600px"
|
|
88
|
+
* >
|
|
89
|
+
* <p>This is the content of the panel.</p>
|
|
90
|
+
* </Panel>
|
|
91
|
+
* ```
|
|
92
|
+
*
|
|
93
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/core-components-panel--docs} for more details.
|
|
94
|
+
*/
|
|
59
95
|
export declare const Panel: ({ children, className, titleClassName, headerClassName, title, actions, icon, iconBg, iconColor, rtlFlip, panelId, height, width, minHeight, minWidth, maxHeight, maxWidth, loading, expandable, expanded: _expanded, onExpand, collapsable, collapsed: _collapsed, onCollapse, onClose, onBack, ...aria }: PanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -9,4 +9,28 @@ export interface PanelGroupProps extends ChildrenProp {
|
|
|
9
9
|
*/
|
|
10
10
|
onActiveChange?: (panelId: string) => void;
|
|
11
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* A component that groups multiple panels together, allowing for one panel to be expanded at a time.
|
|
14
|
+
* This component allows you to manage a group of panels where only one can be expanded at a time.
|
|
15
|
+
* It accepts an `activePanel` prop to control which panel is currently expanded,
|
|
16
|
+
* and an `onActiveChange` callback that is triggered when the active panel changes.
|
|
17
|
+
* It uses the `Panel` component to render each individual panel within the group.
|
|
18
|
+
*
|
|
19
|
+
* @param {PanelGroupProps} props - The properties for the PanelGroup component.
|
|
20
|
+
* @returns {JSX.Element} The rendered PanelGroup component.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```jsx
|
|
24
|
+
* <PanelGroup
|
|
25
|
+
* activePanel="panel1"
|
|
26
|
+
* onActiveChange={(panelId) => console.log(`Active panel changed to: ${panelId}`)}
|
|
27
|
+
* >
|
|
28
|
+
* <Panel panelId="panel1" title="Panel 1">Content for Panel 1</Panel>
|
|
29
|
+
* <Panel panelId="panel2" title="Panel 2">Content for Panel 2</Panel>
|
|
30
|
+
* <Panel panelId="panel3" title="Panel 3">Content for Panel 3</Panel>
|
|
31
|
+
* </PanelGroup>
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/core-components-panel--docs} for more details.
|
|
35
|
+
*/
|
|
12
36
|
export declare const PanelGroup: ({ children, activePanel, onActiveChange, }: PanelGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -13,4 +13,35 @@ export interface PanelStackProps extends CssProp, ChildrenProp {
|
|
|
13
13
|
*/
|
|
14
14
|
onBack?: (panelId: string, nextPanelId: string) => boolean | undefined;
|
|
15
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* A component that manages a stack of panels, allowing navigation between them.
|
|
18
|
+
* This component allows you to manage a stack of panels where you can navigate between them.
|
|
19
|
+
* It accepts an `active` prop to control which panel is currently active,
|
|
20
|
+
* an `onPanelChange` callback that is triggered when the active panel changes,
|
|
21
|
+
* and an `onBack` callback to handle navigation to the previous panel in the history.
|
|
22
|
+
* It uses the `Panel` component to render each individual panel within the stack.
|
|
23
|
+
* The component maintains a history of panels to allow back navigation,
|
|
24
|
+
* and it updates the active panel based on user interactions.
|
|
25
|
+
*
|
|
26
|
+
* @param {PanelStackProps} props - The properties for the PanelStack component.
|
|
27
|
+
* @returns {JSX.Element} The rendered PanelStack component.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```jsx
|
|
31
|
+
* <PanelStack
|
|
32
|
+
* active="panel1"
|
|
33
|
+
* onPanelChange={(panelId) => console.log(`Active panel changed to: ${panelId}`)}
|
|
34
|
+
* onBack={(currentPanel, nextPanel) => {
|
|
35
|
+
* console.log(`Navigating back from ${currentPanel} to ${nextPanel}`);
|
|
36
|
+
* return true; // return false to prevent navigation
|
|
37
|
+
* }}
|
|
38
|
+
* >
|
|
39
|
+
* <Panel panelId="panel1" title="Panel 1">Content for Panel 1</Panel>
|
|
40
|
+
* <Panel panelId="panel2" title="Panel 2">Content for Panel 2</Panel>
|
|
41
|
+
* <Panel panelId="panel3" title="Panel 3">Content for Panel 3</Panel>
|
|
42
|
+
* </PanelStack>
|
|
43
|
+
* ```
|
|
44
|
+
*
|
|
45
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/core-components-panelstack--docs} for more details.
|
|
46
|
+
*/
|
|
16
47
|
export declare const PanelStack: ({ active, children, className, onPanelChange, onBack, ...rest }: PanelStackProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { type ColorType } from "../../types";
|
|
1
|
+
import { type PaletteType, type ColorType } from "../../types";
|
|
2
2
|
export interface ProgressProps {
|
|
3
3
|
/**
|
|
4
|
-
* progress value (0-
|
|
4
|
+
* progress value (0-1)
|
|
5
5
|
*/
|
|
6
6
|
value: number;
|
|
7
7
|
/**
|
|
@@ -11,7 +11,7 @@ export interface ProgressProps {
|
|
|
11
11
|
/**
|
|
12
12
|
* color
|
|
13
13
|
*/
|
|
14
|
-
color?: ColorType;
|
|
14
|
+
color?: ColorType | PaletteType;
|
|
15
15
|
/**
|
|
16
16
|
* animate
|
|
17
17
|
*/
|
|
@@ -21,4 +21,24 @@ export interface ProgressProps {
|
|
|
21
21
|
*/
|
|
22
22
|
label?: string;
|
|
23
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* A component that displays a progress bar indicating the completion percentage of a task or operation.
|
|
26
|
+
* The progress bar is styled with a background color and a track that fills based on the value provided.
|
|
27
|
+
* It can also display a label showing the percentage value.
|
|
28
|
+
* The label can be customized or hidden based on the props provided.
|
|
29
|
+
*
|
|
30
|
+
* @param {ProgressProps} props - The properties for the ProgressBar component.
|
|
31
|
+
* @returns {JSX.Element} The rendered ProgressBar component.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```jsx
|
|
35
|
+
* <ProgressBar value={0.75} size="md" color="primary-500" label="Loading" animate />
|
|
36
|
+
* // Renders a progress bar with 75% completion, medium size, primary color, and a label "Loading"
|
|
37
|
+
*
|
|
38
|
+
* <ProgressBar value={0.5} size="lg" color="success-500" />
|
|
39
|
+
* // Renders a progress bar with 50% completion, large size, and success color without a label
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
42
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/core-components-progress--docs} for more details.
|
|
43
|
+
*/
|
|
24
44
|
export declare const ProgressBar: ({ value, size, color, label, animate, }: ProgressProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { type ColorType } from "../../types";
|
|
1
|
+
import { type PaletteType, type ColorType } from "../../types";
|
|
2
2
|
export interface ProgressProps {
|
|
3
3
|
/**
|
|
4
|
-
* progress value (0-
|
|
4
|
+
* progress value (0-1)
|
|
5
5
|
*/
|
|
6
6
|
value: number;
|
|
7
7
|
/**
|
|
@@ -11,6 +11,25 @@ export interface ProgressProps {
|
|
|
11
11
|
/**
|
|
12
12
|
* color
|
|
13
13
|
*/
|
|
14
|
-
color?: ColorType;
|
|
14
|
+
color?: ColorType | PaletteType;
|
|
15
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* A circular progress indicator that visually represents a percentage of completion.
|
|
18
|
+
* It displays a circular track with a stroke that fills based on the `value` prop.
|
|
19
|
+
* The component is customizable with size and color props.
|
|
20
|
+
*
|
|
21
|
+
* @param {ProgressProps} props - The properties for the ProgressCircle component.
|
|
22
|
+
* @returns {JSX.Element} - A circular progress indicator.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```jsx
|
|
26
|
+
* <ProgressCircle value={0.75} size="md" color="primary-500" />
|
|
27
|
+
* // Renders a circular progress indicator with 75% completion, medium size, and primary color.
|
|
28
|
+
*
|
|
29
|
+
* <ProgressCircle value={0.5} size="lg" color="secondary-500" />
|
|
30
|
+
* // Renders a circular progress indicator with 50% completion, large size, and secondary color.
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/core-components-progress--docs} for more details.
|
|
34
|
+
*/
|
|
16
35
|
export declare const ProgressCircle: ({ value, size, color, }: ProgressProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ReactElement } from "react";
|
|
2
|
-
import { type AriaProps, type BadgeType, type CallbackReturn, type ChildrenProp, type
|
|
3
|
-
export interface TabProps extends Partial<ChildrenProp>, CssProp, RefProp, AriaProps, TestProps, IconProps {
|
|
2
|
+
import { type AriaProps, type BadgeType, type CallbackReturn, type ChildrenProp, type ColorState, type CssProp, type IconProps, type PolymorphicProps, type RefProp, type TestProps, type TooltipProp } from "../../types";
|
|
3
|
+
export interface TabProps extends Partial<ChildrenProp>, CssProp, RefProp, AriaProps, TestProps, IconProps, TooltipProp {
|
|
4
4
|
/**
|
|
5
5
|
* tab id
|
|
6
6
|
*/
|
|
@@ -12,11 +12,11 @@ export interface TabProps extends Partial<ChildrenProp>, CssProp, RefProp, AriaP
|
|
|
12
12
|
/**
|
|
13
13
|
* tab color
|
|
14
14
|
*/
|
|
15
|
-
color?:
|
|
15
|
+
color?: ColorState;
|
|
16
16
|
/**
|
|
17
17
|
* tab badge
|
|
18
18
|
*/
|
|
19
|
-
badge?: BadgeType;
|
|
19
|
+
badge?: string | number | BadgeType;
|
|
20
20
|
/**
|
|
21
21
|
* disabled
|
|
22
22
|
*/
|
|
@@ -42,4 +42,35 @@ export interface TabProps extends Partial<ChildrenProp>, CssProp, RefProp, AriaP
|
|
|
42
42
|
*/
|
|
43
43
|
onClick?: (id: string) => CallbackReturn;
|
|
44
44
|
}
|
|
45
|
-
|
|
45
|
+
/**
|
|
46
|
+
* A component that represents a tab in a tabbed interface. It can display an icon, label, badge, and actions.
|
|
47
|
+
* It supports polymorphic rendering, allowing it to be rendered as different HTML elements.
|
|
48
|
+
* It also supports tooltips, active states, and click handling.
|
|
49
|
+
*
|
|
50
|
+
* @param {TabProps} props - The properties for the Tab component.
|
|
51
|
+
* @returns {JSX.Element} The rendered Tab component.
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```jsx
|
|
55
|
+
* <Tab
|
|
56
|
+
* id="tab1"
|
|
57
|
+
* label="Tab 1"
|
|
58
|
+
* icon="home"
|
|
59
|
+
* iconBg="bg-blue-500"
|
|
60
|
+
* iconColor="text-white"
|
|
61
|
+
* badge="New"
|
|
62
|
+
* onClick={(id) => console.log(`Tab clicked: ${id}`)}
|
|
63
|
+
* onClose={() => console.log("Tab closed")}
|
|
64
|
+
* active={true}
|
|
65
|
+
* actions={<button>Action</button>}
|
|
66
|
+
* color="primary"
|
|
67
|
+
* tooltip="This is a tab"
|
|
68
|
+
* activeClassName="bg-blue-100"
|
|
69
|
+
* />
|
|
70
|
+
* // Renders a tab with label "Tab 1", home icon, blue background, white text, badge "New",
|
|
71
|
+
* // and an action button. The tab is active and has a tooltip.
|
|
72
|
+
* ```
|
|
73
|
+
*
|
|
74
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/core-components-tabpanel--docs} for more details.
|
|
75
|
+
*/
|
|
76
|
+
export declare const Tab: <Tag extends React.ElementType = "button">({ ref, as, id, className, label, icon, iconBg, iconColor, rtlFlip, badge, disabled, onClose, active, onClick, tabFlex, color, actions, tooltip, activeClassName, ...aria }: TabProps & PolymorphicProps<Tag>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
1
2
|
import { type CallbackReturn, type ChildrenProp } from "../../types";
|
|
2
3
|
import { Tab } from "./Tab";
|
|
3
4
|
export interface TabPanelProps extends ChildrenProp<typeof Tab> {
|
|
@@ -29,6 +30,14 @@ export interface TabPanelProps extends ChildrenProp<typeof Tab> {
|
|
|
29
30
|
* tab list className
|
|
30
31
|
*/
|
|
31
32
|
headerClassName?: string;
|
|
33
|
+
/**
|
|
34
|
+
* append element
|
|
35
|
+
*/
|
|
36
|
+
append?: ReactNode;
|
|
37
|
+
/**
|
|
38
|
+
* prepend element
|
|
39
|
+
*/
|
|
40
|
+
prepend?: ReactNode;
|
|
32
41
|
/**
|
|
33
42
|
* change handler
|
|
34
43
|
*/
|
|
@@ -38,4 +47,37 @@ export interface TabPanelProps extends ChildrenProp<typeof Tab> {
|
|
|
38
47
|
*/
|
|
39
48
|
onBeforeChange?: (nextTab: string, currentTab?: string) => CallbackReturn;
|
|
40
49
|
}
|
|
41
|
-
|
|
50
|
+
/**
|
|
51
|
+
* A component that provides a tabbed interface for displaying content.
|
|
52
|
+
* It allows users to switch between different tabs, each containing its own content.
|
|
53
|
+
* It supports various orientations, justify options, and variants for the tab header.
|
|
54
|
+
* It also provides hooks for handling tab changes before and after they occur.
|
|
55
|
+
* This component is useful for organizing content into separate sections that can be easily navigated by the user.
|
|
56
|
+
* It can be customized with different styles and behaviors to fit the needs of the application.
|
|
57
|
+
*
|
|
58
|
+
* @param {TabPanelProps} props - The properties for the TabPanel component.
|
|
59
|
+
* @returns {JSX.Element} The rendered TabPanel component.
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```jsx
|
|
63
|
+
* <TabPanel
|
|
64
|
+
* orientation="top"
|
|
65
|
+
* activeTab="tab1"
|
|
66
|
+
* justify="start"
|
|
67
|
+
* variant="solid"
|
|
68
|
+
* tabFlex={true}
|
|
69
|
+
* onBeforeChange={(nextTab, currentTab) => {
|
|
70
|
+
* console.log(`Switching from ${currentTab} to ${nextTab}`);
|
|
71
|
+
* return true; // or false to prevent change
|
|
72
|
+
* }}
|
|
73
|
+
* onChange={(id) => console.log(`Active tab changed to: ${id}`)}
|
|
74
|
+
* >
|
|
75
|
+
* <Tab id="tab1" label="Tab 1">Content for Tab 1</Tab>
|
|
76
|
+
* <Tab id="tab2" label="Tab 2">Content for Tab 2</Tab>
|
|
77
|
+
* <Tab id="tab3" label="Tab 3">Content for Tab 3</Tab>
|
|
78
|
+
* </TabPanel>
|
|
79
|
+
* ```
|
|
80
|
+
*
|
|
81
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/core-components-tabpanel--docs} for more details.
|
|
82
|
+
*/
|
|
83
|
+
export declare const TabPanel: ({ children, headerClassName, orientation, activeTab, justify, variant, tabFlex, append, prepend, gap, onBeforeChange, onChange, }: TabPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -53,7 +53,15 @@ export declare const ApplicationProvider: FC<GlobalProps>;
|
|
|
53
53
|
*/
|
|
54
54
|
export declare const useGlobals: () => GlobalContextType;
|
|
55
55
|
/**
|
|
56
|
-
* global application context
|
|
56
|
+
* Hook to access the global application context.
|
|
57
|
+
* This hook provides access to the global context values, including the current locale, calendar, and color scheme.
|
|
58
|
+
*
|
|
59
|
+
* @returns {GlobalContextType} The global context values excluding the error element.
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```jsx
|
|
63
|
+
* const { changeLocale, currentLocale, toggleColorScheme } = useApplicationContext();
|
|
64
|
+
* ```
|
|
57
65
|
*/
|
|
58
66
|
export declare const useApplicationContext: () => {
|
|
59
67
|
/**
|
|
@@ -77,5 +85,20 @@ export declare const useApplicationContext: () => {
|
|
|
77
85
|
currentColorScheme: State["colorScheme"];
|
|
78
86
|
notificationManager: NotificationManagerRef;
|
|
79
87
|
};
|
|
88
|
+
/**
|
|
89
|
+
* Hook to access the notification manager from the global context.
|
|
90
|
+
* This hook provides methods to show alerts, errors, messages, and toasts.
|
|
91
|
+
* It returns a reference to the notification manager, which can be used to display notifications in the application.
|
|
92
|
+
*
|
|
93
|
+
* @returns {NotificationManagerRef} The notification manager reference.
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* ```jsx
|
|
97
|
+
* const notificationService = useNotificationService();
|
|
98
|
+
* notificationService.showMessage("Hello World");
|
|
99
|
+
* ```
|
|
100
|
+
*
|
|
101
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/core-components-notifications--notifications} for more details on available methods.
|
|
102
|
+
*/
|
|
80
103
|
export declare const useNotificationService: () => NotificationManagerRef;
|
|
81
104
|
export {};
|
|
@@ -51,6 +51,43 @@ export interface AsideProps extends IconProps, ChildrenProp, CollapseProps, CssP
|
|
|
51
51
|
minWidth?: number | string;
|
|
52
52
|
}
|
|
53
53
|
/**
|
|
54
|
-
*
|
|
54
|
+
* A sidebar component that can be collapsed, resized, and has a flyout feature.
|
|
55
|
+
* It supports a title, icon, actions, and loading state.
|
|
56
|
+
* It can be aligned to the start or end of the page.
|
|
57
|
+
*
|
|
58
|
+
* @param {AsideProps} props - The properties for the Aside component.
|
|
59
|
+
* @returns {JSX.Element} The rendered Aside component.
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```jsx
|
|
63
|
+
* <Aside
|
|
64
|
+
* title="Sidebar Title"
|
|
65
|
+
* icon={CoreIcons.menu}
|
|
66
|
+
* iconBg="bg-gray-200"
|
|
67
|
+
* iconColor="text-gray-800"
|
|
68
|
+
* rtlFlip={true}
|
|
69
|
+
* className="custom-aside"
|
|
70
|
+
* bodyClassName="custom-aside-body"
|
|
71
|
+
* headerClassName="custom-aside-header"
|
|
72
|
+
* resizeable={true}
|
|
73
|
+
* flyout={true}
|
|
74
|
+
* onFlyout={() => console.log("Flyout triggered")}
|
|
75
|
+
* collapsed={false}
|
|
76
|
+
* collapsable={true}
|
|
77
|
+
* onCollapse={() => console.log("Collapsed toggled")}
|
|
78
|
+
* actions={<button>Action</button>}
|
|
79
|
+
* loading={false}
|
|
80
|
+
* align="start"
|
|
81
|
+
* width="20rem"
|
|
82
|
+
* minWidth="2rem"
|
|
83
|
+
* maxWidth="30vw"
|
|
84
|
+
* data-testid="aside-test"
|
|
85
|
+
* data-test-value="aside-value"
|
|
86
|
+
* >
|
|
87
|
+
* <Content>This is the content of the aside.</Content>
|
|
88
|
+
* </Aside>
|
|
89
|
+
* ```
|
|
90
|
+
*
|
|
91
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/story/core-application--aside} for more details.
|
|
55
92
|
*/
|
|
56
93
|
export declare const Aside: ({ children, title, icon, iconBg, iconColor, rtlFlip, className, bodyClassName, headerClassName, resizeable, flyout, onFlyout, collapsed, collapsable, onCollapse, actions, loading, align, width: wd, minWidth, maxWidth, "data-testid": testId, "data-test-value": testValue, }: AsideProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,23 @@
|
|
|
1
1
|
import { Component } from "react";
|
|
2
2
|
import { type ChildrenProp } from "../../types";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* ErrorBoundary component to catch JavaScript errors anywhere in the child component tree,
|
|
5
|
+
* log those errors, and display a fallback UI.
|
|
6
|
+
* It can also display a custom error element if provided.
|
|
7
|
+
* This component is useful for preventing the entire application from crashing
|
|
8
|
+
* when an error occurs in a part of the component tree.
|
|
9
|
+
* It can be used to wrap any part of the application.
|
|
10
|
+
* It supports custom error display components and provides a default error message.
|
|
11
|
+
* It also conditionally displays the error stack trace in development mode.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```jsx
|
|
15
|
+
* <ErrorBoundary errorElement={CustomErrorComponent}>
|
|
16
|
+
* <YourComponent />
|
|
17
|
+
* </ErrorBoundary>
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/story/core-application--error-boundary}
|
|
5
21
|
*/
|
|
6
22
|
export declare class ErrorBoundary extends Component<{
|
|
7
23
|
/**
|
|
@@ -22,5 +38,5 @@ export declare class ErrorBoundary extends Component<{
|
|
|
22
38
|
};
|
|
23
39
|
constructor(props: AnyObject);
|
|
24
40
|
componentDidCatch(error: Error): void;
|
|
25
|
-
render(): string | number | boolean | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
41
|
+
render(): string | number | bigint | boolean | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
26
42
|
}
|
|
@@ -1,15 +1,21 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type MouseEvent } from "react";
|
|
2
|
+
import { type ChildrenProp, type CssProp, type RefProp, type ScrollObject, type SizeObject, type TestProps } from "../../types";
|
|
2
3
|
export interface ContentProps extends ChildrenProp, CssProp, RefProp, TestProps {
|
|
3
4
|
/**
|
|
4
5
|
* scroll vevent handler
|
|
5
6
|
*/
|
|
6
|
-
onScroll?: (event:
|
|
7
|
+
onScroll?: (scroll: ScrollObject, event: MouseEvent<HTMLDivElement>) => void;
|
|
7
8
|
/**
|
|
8
9
|
* scroll vevent handler
|
|
9
10
|
*/
|
|
10
11
|
onResize?: (event: SizeObject) => void;
|
|
11
12
|
}
|
|
12
13
|
/**
|
|
13
|
-
*
|
|
14
|
+
* Content component that wraps children in a section element.
|
|
15
|
+
* It uses a resize observer to handle resizing and a debounced scroll handler.
|
|
16
|
+
* It also includes an error boundary to catch any errors in the children.
|
|
17
|
+
*
|
|
18
|
+
* @param {ContentProps} props - The properties for the Content component.
|
|
19
|
+
* @returns A section element containing the children wrapped in an error boundary.
|
|
14
20
|
*/
|
|
15
21
|
export declare const Content: ({ ref, children, className, onScroll, onResize, "data-testid": testId, "data-test-value": testValue, }: ContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,14 +1,6 @@
|
|
|
1
|
-
import { type AriaProps, type ChildrenProp, type
|
|
1
|
+
import { type AriaProps, type ChildrenProp, type CssProp, type TestProps } from "../../types";
|
|
2
2
|
interface BaseProps extends CssProp, AriaProps, ChildrenProp, TestProps {
|
|
3
3
|
dir?: "ltr" | "rtl";
|
|
4
|
-
/**
|
|
5
|
-
* background color
|
|
6
|
-
*/
|
|
7
|
-
bg?: ColorWithGrays | string;
|
|
8
|
-
/**
|
|
9
|
-
* background color
|
|
10
|
-
*/
|
|
11
|
-
color?: ColorWithGrays | string;
|
|
12
4
|
}
|
|
13
5
|
type DefaultProps = BaseProps & {
|
|
14
6
|
flex?: false;
|
|
@@ -19,6 +11,46 @@ type FlexProps = BaseProps & {
|
|
|
19
11
|
justify?: "start" | "end" | "center" | "between";
|
|
20
12
|
};
|
|
21
13
|
export type HeadFootProps = DefaultProps | FlexProps;
|
|
14
|
+
/**
|
|
15
|
+
* Header component that wraps children in a header element.
|
|
16
|
+
* It uses the HeadFoot component to handle layout and styling.
|
|
17
|
+
* It accepts properties for direction, alignment, and justification,
|
|
18
|
+
* allowing for flexible layout configurations.
|
|
19
|
+
* The `as` prop is set to "header" to render the element as a header.
|
|
20
|
+
* The `area` prop is set to "head" to indicate that this is a header area.
|
|
21
|
+
* It can be used to create a consistent header layout across an application.
|
|
22
|
+
*
|
|
23
|
+
* @param {HeadFootProps} props - The properties for the Header component.
|
|
24
|
+
* @returns A header element containing the children wrapped in the HeadFoot component.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```jsx
|
|
28
|
+
* <Header className="custom-header" dir="ltr">
|
|
29
|
+
* <h1>Header content goes here</h1>
|
|
30
|
+
* </Header>
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
22
33
|
export declare const Header: (props: HeadFootProps) => import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
/**
|
|
35
|
+
* Footer component that wraps children in a footer element.
|
|
36
|
+
* It uses the HeadFoot component to handle layout and styling.
|
|
37
|
+
* It accepts properties for direction, alignment, and justification,
|
|
38
|
+
* allowing for flexible layout configurations.
|
|
39
|
+
* The `as` prop is set to "footer" to render the element as a footer.
|
|
40
|
+
* The `area` prop is set to "foot" to indicate that this is a footer area.
|
|
41
|
+
* It can be used to create a consistent footer layout across an application.
|
|
42
|
+
* * The Footer component is designed to be flexible and can be styled with custom classes.
|
|
43
|
+
* It supports both default and flex layouts, allowing for alignment and justification of its children.
|
|
44
|
+
*
|
|
45
|
+
* @param {HeadFootProps} props - The properties for the Footer component.
|
|
46
|
+
* @returns A footer element containing the children wrapped in the HeadFoot component.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```jsx
|
|
50
|
+
* <Footer className="custom-footer" dir="ltr">
|
|
51
|
+
* <p>Footer content goes here</p>
|
|
52
|
+
* </Footer>
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
23
55
|
export declare const Footer: (props: HeadFootProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
56
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type ChildrenProp, type IconProps, type TestProps } from "../../types";
|
|
2
|
-
export interface PageProps extends IconProps, ChildrenProp, TestProps {
|
|
1
|
+
import { type ChildrenProp, type IconProps, type RefProp, type TestProps } from "../../types";
|
|
2
|
+
export interface PageProps extends IconProps, ChildrenProp, TestProps, RefProp<HTMLDivElement> {
|
|
3
3
|
/**
|
|
4
4
|
* page title
|
|
5
5
|
*/
|
|
@@ -18,6 +18,31 @@ export interface PageProps extends IconProps, ChildrenProp, TestProps {
|
|
|
18
18
|
loading?: boolean;
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
21
|
+
* Page component that wraps children in a div element.
|
|
22
|
+
* It includes a title section with an optional icon and a loading indicator.
|
|
23
|
+
* The component can be styled with a paper effect, page icon and title.
|
|
24
|
+
* It also accepts a loading prop to display a loading indicator.
|
|
25
|
+
*
|
|
26
|
+
* @param {PageProps} props - The properties for the Page component.
|
|
27
|
+
* @returns A div element containing the title and children, with optional loading indicator.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```jsx
|
|
31
|
+
* <Page
|
|
32
|
+
* title="My Page"
|
|
33
|
+
* icon="home"
|
|
34
|
+
* iconBg="bg-blue-500"
|
|
35
|
+
* iconColor="text-white"
|
|
36
|
+
* loading={false}
|
|
37
|
+
* paper={true}
|
|
38
|
+
* data-testid="my-page"
|
|
39
|
+
* data-test-value="page-value"
|
|
40
|
+
* >
|
|
41
|
+
* <p>This is the content of the page.</p>
|
|
42
|
+
* </Page>
|
|
43
|
+
* // Renders a page with a title, icon, and content.
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/story/core-application--page} for more details.
|
|
22
47
|
*/
|
|
23
|
-
export declare const Page: ({ children, paper, title, titleClassName, icon, rtlFlip, iconBg, iconColor, loading, "data-testid": testId, "data-test-value": testValue, }: PageProps) => import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
export declare const Page: ({ ref, children, paper, title, titleClassName, icon, rtlFlip, iconBg, iconColor, loading, "data-testid": testId, "data-test-value": testValue, ...rest }: PageProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -39,15 +39,70 @@ export interface ColProps extends AriaProps, CssProp, TestProps, Partial<Childre
|
|
|
39
39
|
/**
|
|
40
40
|
* column flex
|
|
41
41
|
*/
|
|
42
|
-
flex?: "auto" | "fill" | "full";
|
|
42
|
+
flex?: "auto" | "fill" | "full" | "initial" | "content";
|
|
43
43
|
/**
|
|
44
44
|
* stretch inner content
|
|
45
45
|
*/
|
|
46
46
|
stretchContent?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* truncate text
|
|
49
|
+
*/
|
|
50
|
+
truncate?: boolean;
|
|
47
51
|
}
|
|
48
52
|
/**
|
|
49
|
-
*
|
|
53
|
+
* Container component that wraps children in a div element.
|
|
54
|
+
* It supports full width, gutter size, and additional CSS classes.
|
|
55
|
+
* It can be used to create a responsive layout with optional gutters for spacing.
|
|
56
|
+
* It accepts properties for full width, gutter size, and additional CSS classes.
|
|
57
|
+
*
|
|
58
|
+
* @param {ContainerProps} props - The properties for the Container component.
|
|
59
|
+
* @returns A div element containing the children with optional full width and gutter size.
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```jsx
|
|
63
|
+
* <Container fullWidth={true} gutter="16px" className="custom-container">
|
|
64
|
+
* <p>This is a container with full width and gutter.</p>
|
|
65
|
+
* </Container>
|
|
66
|
+
* ```
|
|
50
67
|
*/
|
|
51
68
|
export declare const Container: ({ children, fullWidth, className, gutter, ...aria }: ContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
69
|
+
/**
|
|
70
|
+
* Row component that allows for flexible layout of columns.
|
|
71
|
+
* It supports various flex properties, alignment, and wrapping.
|
|
72
|
+
* It can be used to create a responsive layout with optional gutters for spacing.
|
|
73
|
+
* It accepts properties for gutter size, orientation, alignment, justification, and additional CSS classes.
|
|
74
|
+
*
|
|
75
|
+
* @param {RowProps} props - The properties for the Row component.
|
|
76
|
+
* @returns A div element representing a row with the specified flex and alignment properties.
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* ```jsx
|
|
80
|
+
* <Row gutter="16px" orient="row" align="center" justify="between">
|
|
81
|
+
* <Col flex="fill">Column 1</Col>
|
|
82
|
+
* <Col flex="fill">Column 2</Col>
|
|
83
|
+
* </Row>
|
|
84
|
+
* // Renders a row with two columns, each taking equal space, centered vertically and spaced evenly.
|
|
85
|
+
* ```
|
|
86
|
+
*
|
|
87
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/story/core-application--responsive} for more details.
|
|
88
|
+
*/
|
|
52
89
|
export declare const Row: ({ children, gutter, noWrap, orient, align, justify, className, ...aria }: RowProps) => import("react/jsx-runtime").JSX.Element;
|
|
53
|
-
|
|
90
|
+
/**
|
|
91
|
+
* Column component that allows for flexible layout within a row.
|
|
92
|
+
* It supports various flex properties, alignment, and truncation.
|
|
93
|
+
* It can be used to create a responsive layout with optional stretching of inner content.
|
|
94
|
+
* It accepts properties for flex size, alignment, truncation, and additional CSS classes.
|
|
95
|
+
*
|
|
96
|
+
* @param {ColProps} props - The properties for the Col component.
|
|
97
|
+
* @returns A div element representing a column with the specified flex and alignment properties.
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
* ```jsx
|
|
101
|
+
* <Col flex="fill" align="center" truncate className="custom-col">
|
|
102
|
+
* <p>This is a column with flexible layout.</p>
|
|
103
|
+
* </Col>
|
|
104
|
+
* ```
|
|
105
|
+
*
|
|
106
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/story/core-application--responsive} for more details.
|
|
107
|
+
*/
|
|
108
|
+
export declare const Col: ({ children, flex, align, truncate, className, stretchContent, ...aria }: ColProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
import { type ChildrenProp, type CssProp, type RefProp } from "../../types";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* A component that represents a section of content within a page, with templated grid layout.
|
|
4
|
+
* It can be used to group related content together and can be styled with additional CSS classes.
|
|
5
|
+
* It supports RTL (right-to-left) text direction.
|
|
6
|
+
*
|
|
7
|
+
* @param {ChildrenProp} children - The children to be rendered inside the section.
|
|
8
|
+
* @param {CssProp} className - Additional CSS classes to apply to the section.
|
|
9
|
+
* @param {RefProp<HTMLDivElement>} ref - A ref to the section element.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```jsx
|
|
13
|
+
* <Section className="my-section" ref={sectionRef}>
|
|
14
|
+
* <p>This is a section.</p>
|
|
15
|
+
* </Section>
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/core-application--section} for more details.
|
|
4
19
|
*/
|
|
5
20
|
export declare const Section: ({ children, className, dir, ref, }: ChildrenProp & CssProp & RefProp<HTMLDivElement> & {
|
|
6
21
|
dir?: "ltr" | "rtl";
|