@react-fabric/core 1.0.0-beta.6 → 1.0.0-beta.61
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} +52 -47
- package/{src/components/button/Button.module.css → css/components/_button.css} +86 -84
- package/{src/components/card/Card.module.css → css/components/_card.css} +54 -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} +12 -9
- package/{src/components/media/Media.module.css → css/components/_media.css} +17 -17
- package/{src/components/menu/Menu.module.css → css/components/_menu.css} +21 -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/css/components/_stepper.css +86 -0
- package/{src/components/tabpanel/TabPanel.module.css → css/components/_tabPanel.css} +130 -85
- 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} +26 -18
- package/{src/core/aside/Aside.module.css → css/core/_aside.css} +60 -48
- 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 +56 -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 +9 -6
- package/css/theme/_colors.css +320 -0
- package/css/theme/_utilities.css +541 -0
- package/css/theme/index.css +45 -0
- package/dist/cjs/components/actionLabel/ActionLabel.js +26 -8
- package/dist/cjs/components/animations/Animations.js +137 -45
- package/dist/cjs/components/avatar/Avatar.js +46 -13
- package/dist/cjs/components/avatar/AvatarGroup.js +22 -4
- package/dist/cjs/components/badge/Badge.js +36 -15
- package/dist/cjs/components/breadcrumbs/Breadcrumbs.js +40 -9
- package/dist/cjs/components/button/Button.js +51 -29
- package/dist/cjs/components/button/ButtonGroup.js +30 -3
- package/dist/cjs/components/button/ConfirmButton.js +28 -2
- package/dist/cjs/components/button/ToggleButtonGroup.js +41 -15
- package/dist/cjs/components/callout/Callout.js +47 -7
- package/dist/cjs/components/card/Card.js +60 -18
- 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 +40 -20
- package/dist/cjs/components/collapsable/Collapsable.js +32 -8
- 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 +2 -3
- package/dist/cjs/components/empty/EmptyContent.js +37 -7
- package/dist/cjs/components/icon/Icon.js +76 -13
- package/dist/cjs/components/media/Media.js +174 -76
- package/dist/cjs/components/menu/ContextMenu.js +19 -0
- package/dist/cjs/components/menu/Menu.js +77 -23
- package/dist/cjs/components/menu/MenuItem.js +54 -27
- package/dist/cjs/components/meter/Meter.js +26 -3
- package/dist/cjs/components/navigator/Navigator.js +50 -18
- package/dist/cjs/components/panel/Panel.js +59 -28
- package/dist/cjs/components/panel/PanelGroup.js +25 -2
- package/dist/cjs/components/panel/PanelStack.js +31 -2
- 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 +39 -16
- package/dist/cjs/components/tabpanel/TabPanel.js +56 -16
- package/dist/cjs/context/Global.js +28 -1
- package/dist/cjs/context/NotificationCenter.js +3 -3
- package/dist/cjs/core/aside/Aside.js +50 -25
- package/dist/cjs/core/boundary/ErrorBoundary.js +25 -8
- package/dist/cjs/core/boundary/ErrorIcon.js +1 -2
- package/dist/cjs/core/content/Content.js +7 -3
- package/dist/cjs/core/headfoot/HeadFoot.js +48 -22
- package/dist/cjs/core/page/Page.js +41 -40
- package/dist/cjs/core/responsive/Responsive.js +59 -6
- package/dist/cjs/core/section/Section.js +12 -29
- 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/useStepper.js +74 -0
- 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 +14 -10
- package/dist/cjs/overlays/alert/Alert.js +24 -17
- package/dist/cjs/overlays/flyout/Flyout.js +48 -65
- package/dist/cjs/overlays/message/Message.js +8 -3
- package/dist/cjs/overlays/modal/Modal.js +19 -23
- package/dist/cjs/overlays/toast/Toast.js +22 -13
- package/dist/cjs/overlays/tooltip/Tooltip.js +25 -13
- package/dist/cjs/typography/Abbr.js +35 -7
- package/dist/cjs/typography/{Link.js → Anchor.js} +23 -5
- package/dist/cjs/typography/Copy.js +1 -2
- package/dist/cjs/typography/Mark.js +25 -5
- 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 +135 -44
- package/dist/esm/components/avatar/Avatar.js +46 -13
- package/dist/esm/components/avatar/AvatarGroup.js +22 -4
- package/dist/esm/components/badge/Badge.js +38 -17
- package/dist/esm/components/breadcrumbs/Breadcrumbs.js +40 -9
- package/dist/esm/components/button/Button.js +53 -31
- package/dist/esm/components/button/ButtonGroup.js +31 -4
- package/dist/esm/components/button/ConfirmButton.js +28 -2
- package/dist/esm/components/button/ToggleButtonGroup.js +42 -16
- package/dist/esm/components/callout/Callout.js +47 -7
- package/dist/esm/components/card/Card.js +61 -19
- 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 +42 -22
- package/dist/esm/components/collapsable/Collapsable.js +32 -8
- 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 +2 -3
- package/dist/esm/components/empty/EmptyContent.js +37 -7
- package/dist/esm/components/icon/Icon.js +78 -16
- package/dist/esm/components/media/Media.js +175 -77
- package/dist/esm/components/menu/ContextMenu.js +19 -0
- package/dist/esm/components/menu/Menu.js +79 -25
- package/dist/esm/components/menu/MenuItem.js +49 -22
- package/dist/esm/components/meter/Meter.js +26 -3
- package/dist/esm/components/navigator/Navigator.js +50 -18
- package/dist/esm/components/panel/Panel.js +61 -30
- package/dist/esm/components/panel/PanelGroup.js +25 -2
- package/dist/esm/components/panel/PanelStack.js +31 -2
- 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 +40 -17
- package/dist/esm/components/tabpanel/TabPanel.js +56 -16
- package/dist/esm/context/Global.js +28 -1
- package/dist/esm/context/NotificationCenter.js +3 -3
- package/dist/esm/core/aside/Aside.js +52 -27
- package/dist/esm/core/boundary/ErrorBoundary.js +25 -8
- package/dist/esm/core/boundary/ErrorIcon.js +1 -2
- package/dist/esm/core/content/Content.js +7 -3
- package/dist/esm/core/headfoot/HeadFoot.js +48 -22
- package/dist/esm/core/page/Page.js +43 -42
- package/dist/esm/core/responsive/Responsive.js +59 -6
- package/dist/esm/core/section/Section.js +12 -29
- 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/useStepper.js +74 -0
- 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 +7 -4
- package/dist/esm/overlays/alert/Alert.js +25 -18
- package/dist/esm/overlays/flyout/Flyout.js +53 -70
- package/dist/esm/overlays/message/Message.js +9 -4
- package/dist/esm/overlays/modal/Modal.js +22 -26
- package/dist/esm/overlays/toast/Toast.js +23 -14
- package/dist/esm/overlays/tooltip/Tooltip.js +25 -13
- package/dist/esm/typography/Abbr.js +35 -7
- package/dist/esm/typography/{Link.js → Anchor.js} +24 -6
- package/dist/esm/typography/Copy.js +1 -2
- package/dist/esm/typography/Mark.js +25 -5
- 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 +21 -2
- package/dist/types/components/animations/Animations.d.ts +105 -7
- package/dist/types/components/avatar/Avatar.d.ts +34 -6
- package/dist/types/components/avatar/AvatarGroup.d.ts +19 -1
- package/dist/types/components/badge/Badge.d.ts +37 -3
- package/dist/types/components/breadcrumbs/Breadcrumbs.d.ts +31 -2
- package/dist/types/components/button/Button.d.ts +39 -7
- package/dist/types/components/button/ButtonGroup.d.ts +28 -3
- package/dist/types/components/button/ConfirmButton.d.ts +23 -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 +44 -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 +34 -5
- package/dist/types/components/collapsable/Collapsable.d.ts +28 -2
- 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 +25 -0
- package/dist/types/components/empty/EmptyContent.d.ts +32 -3
- package/dist/types/components/icon/Icon.d.ts +40 -8
- package/dist/types/components/index.d.ts +3 -2
- package/dist/types/components/media/Media.d.ts +54 -0
- package/dist/types/components/menu/ContextMenu.d.ts +19 -1
- 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 +9 -3
- 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 +43 -4
- 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 +38 -4
- package/dist/types/components/tabpanel/TabPanel.d.ts +51 -2
- package/dist/types/context/Global.d.ts +24 -1
- package/dist/types/core/aside/Aside.d.ts +45 -6
- package/dist/types/core/boundary/ErrorBoundary.d.ts +18 -2
- package/dist/types/core/content/Content.d.ts +6 -1
- package/dist/types/core/headfoot/HeadFoot.d.ts +41 -9
- package/dist/types/core/page/Page.d.ts +32 -4
- package/dist/types/core/responsive/Responsive.d.ts +58 -3
- package/dist/types/core/section/Section.d.ts +18 -3
- 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/useStepper.d.ts +14 -0
- package/dist/types/hooks/useStorage.d.ts +38 -0
- package/dist/types/index.d.ts +4 -1
- package/dist/types/overlays/alert/Alert.d.ts +16 -5
- package/dist/types/overlays/flyout/Flyout.d.ts +9 -4
- package/dist/types/overlays/message/Message.d.ts +16 -5
- package/dist/types/overlays/modal/Modal.d.ts +13 -4
- package/dist/types/overlays/toast/Toast.d.ts +16 -5
- package/dist/types/overlays/tooltip/Tooltip.d.ts +2 -2
- package/dist/types/types/index.d.ts +28 -24
- 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 +1 -0
- package/dist/types/utils/getColor.d.ts +1 -4
- package/dist/types/utils/index.d.ts +1 -0
- package/package.json +17 -16
- package/src/components/actionLabel/ActionLabel.tsx +26 -8
- package/src/components/animations/Animations.tsx +139 -52
- package/src/components/avatar/Avatar.tsx +51 -15
- package/src/components/avatar/AvatarGroup.tsx +23 -5
- package/src/components/badge/Badge.tsx +50 -22
- package/src/components/breadcrumbs/Breadcrumbs.tsx +43 -10
- package/src/components/button/Button.tsx +75 -43
- package/src/components/button/ButtonGroup.tsx +33 -7
- package/src/components/button/ConfirmButton.tsx +31 -3
- package/src/components/button/ToggleButtonGroup.tsx +74 -47
- package/src/components/callout/Callout.tsx +58 -16
- package/src/components/card/Card.tsx +84 -25
- package/src/components/card/CardCover.tsx +36 -6
- package/src/components/card/FlipContent.tsx +90 -0
- package/src/components/chip/Chip.tsx +53 -25
- package/src/components/collapsable/Collapsable.tsx +35 -11
- package/src/components/divider/Divider.tsx +42 -16
- package/src/components/dropdown/Dropdown.tsx +47 -12
- package/src/components/dropdown/DropdownTool.tsx +28 -4
- package/src/components/empty/EmptyContent.tsx +49 -8
- package/src/components/icon/Icon.tsx +96 -18
- package/src/components/index.ts +5 -4
- package/src/components/media/Media.tsx +193 -105
- package/src/components/menu/ContextMenu.tsx +19 -0
- package/src/components/menu/Menu.tsx +88 -32
- package/src/components/menu/MenuItem.tsx +44 -19
- package/src/components/menu/types.ts +9 -8
- package/src/components/meter/Meter.tsx +27 -4
- package/src/components/navigator/Navigator.tsx +60 -12
- package/src/components/panel/Panel.tsx +66 -28
- package/src/components/panel/PanelGroup.tsx +25 -2
- package/src/components/panel/PanelStack.tsx +33 -2
- package/src/components/progress/ProgressBar.tsx +33 -14
- package/src/components/progress/ProgressCircle.tsx +29 -13
- package/src/components/tabpanel/Tab.tsx +47 -24
- package/src/components/tabpanel/TabPanel.tsx +79 -13
- package/src/context/Global.tsx +28 -1
- package/src/context/NotificationCenter.tsx +3 -3
- package/src/core/aside/Aside.tsx +59 -38
- package/src/core/boundary/ErrorBoundary.tsx +26 -8
- package/src/core/boundary/ErrorIcon.tsx +1 -2
- package/src/core/content/Content.tsx +7 -3
- package/src/core/headfoot/HeadFoot.tsx +44 -37
- package/src/core/page/Page.tsx +44 -22
- package/src/core/responsive/Responsive.tsx +66 -8
- package/src/core/section/Section.tsx +26 -4
- 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 +33 -8
- package/src/hooks/usePropToggle.ts +16 -5
- package/src/hooks/useResize.ts +19 -1
- package/src/hooks/useResizeObserver.ts +32 -9
- package/src/hooks/useStepper.tsx +68 -0
- 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 +5 -1
- package/src/overlays/alert/Alert.tsx +51 -36
- package/src/overlays/flyout/Flyout.tsx +74 -99
- package/src/overlays/message/Message.tsx +28 -9
- package/src/overlays/modal/Modal.tsx +39 -34
- package/src/overlays/toast/Toast.tsx +44 -33
- package/src/overlays/tooltip/Tooltip.tsx +44 -20
- package/src/types/global.d.ts +8 -0
- package/src/types/index.ts +293 -47
- package/src/typography/Abbr.tsx +45 -11
- package/src/typography/{Link.tsx → Anchor.tsx} +26 -14
- package/src/typography/Copy.tsx +16 -2
- package/src/typography/Mark.tsx +25 -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/flags.rect.css +0 -1607
- package/css/flags.wavy.css +0 -1606
- 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/types/icons.js +0 -199
- 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/types/icons.js +0 -201
- package/dist/esm/typography/Typography.module.css +0 -1
- package/dist/types/types/icons.d.ts +0 -196
- package/dist/types/typography/Link.d.ts +0 -25
- package/src/types/icons.ts +0 -425
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { Children, isValidElement } from 'react';
|
|
4
|
+
import { Fragment } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
/*
|
|
7
|
+
* React Fabric
|
|
8
|
+
* @version: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* The MIT License (MIT)
|
|
12
|
+
* Copyright (c) 2024 Adarsh Pastakia
|
|
13
|
+
*
|
|
14
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
|
15
|
+
* and associated documentation files (the "Software"), to deal in the Software without restriction,
|
|
16
|
+
* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
17
|
+
* and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
|
|
18
|
+
* subject to the following conditions:
|
|
19
|
+
*
|
|
20
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial
|
|
21
|
+
* portions of the Software.
|
|
22
|
+
*
|
|
23
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
|
|
24
|
+
* TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
25
|
+
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
26
|
+
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
var cloneChildren = function cloneChildren(children, callback) {
|
|
30
|
+
var _Children$map;
|
|
31
|
+
return (_Children$map = Children.map(children, function (c) {
|
|
32
|
+
if ( /*#__PURE__*/isValidElement(c)) {
|
|
33
|
+
if (c.type === Fragment) {
|
|
34
|
+
var _c$props;
|
|
35
|
+
// just compare to `Fragment`
|
|
36
|
+
return cloneChildren((_c$props = c.props) === null || _c$props === void 0 ? void 0 : _c$props.children, callback);
|
|
37
|
+
}
|
|
38
|
+
return c;
|
|
39
|
+
}
|
|
40
|
+
if (c instanceof Promise) {
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
return c;
|
|
44
|
+
})) === null || _Children$map === void 0 ? void 0 : _Children$map.flat().filter(Boolean).map(callback);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export { cloneChildren };
|
|
@@ -29,21 +29,7 @@ var getColor = function getColor(color) {
|
|
|
29
29
|
if (color && isColor(color)) {
|
|
30
30
|
return color;
|
|
31
31
|
}
|
|
32
|
-
|
|
33
|
-
var getBgClass = function getBgClass(bg) {
|
|
34
|
-
if (bg && !isColor(bg)) {
|
|
35
|
-
return "bg-".concat(bg);
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
var getColorClass = function getColorClass(color) {
|
|
39
|
-
if (color && !isColor(color)) {
|
|
40
|
-
return "text-".concat(color);
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
var getBorderClass = function getBorderClass(color) {
|
|
44
|
-
if (color && !isColor(color)) {
|
|
45
|
-
return "border-".concat(color);
|
|
46
|
-
}
|
|
32
|
+
return "var(--color-".concat(color, ")");
|
|
47
33
|
};
|
|
48
34
|
|
|
49
|
-
export {
|
|
35
|
+
export { getColor };
|
|
@@ -15,7 +15,26 @@ export interface ActionLabelProps extends AriaProps, CssProp, ChildProp, TestPro
|
|
|
15
15
|
actions: ReactElement[];
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
|
-
* A
|
|
19
|
-
* useful
|
|
18
|
+
* A label with action buttons that can be aligned to the start or end.
|
|
19
|
+
* This component is useful for displaying a label with associated actions, such as buttons, that can be aligned based on the design requirements.
|
|
20
|
+
* It automatically calculates the width of the action buttons to ensure that the label text does not overflow the container.
|
|
21
|
+
* It uses CSS variables to manage the width of the label text dynamically based on the action buttons' width.
|
|
22
|
+
* This component is designed to be flexible and can be used in various contexts where a label with actions is needed.
|
|
23
|
+
* It supports custom alignment, disabled states, and can be easily styled with additional CSS classes.
|
|
24
|
+
*
|
|
25
|
+
* @param {ActionLabelProps} props - The properties for the ActionLabel component.
|
|
26
|
+
* @returns {JSX.Element} The rendered ActionLabel component.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```jsx
|
|
30
|
+
* <ActionLabel
|
|
31
|
+
* actions={[<Button>Action 1</Button>, <Button>Action 2</Button>]}
|
|
32
|
+
* align="end"
|
|
33
|
+
* >
|
|
34
|
+
* Label Text
|
|
35
|
+
* </ActionLabel>
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/core-components-action-label--docs} for more details.
|
|
20
39
|
*/
|
|
21
40
|
export declare const ActionLabel: ({ children, className, align, actions, disabled, ...rest }: ActionLabelProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,20 +4,118 @@ export interface AnimationProps extends CssProp, AriaProps {
|
|
|
4
4
|
/**
|
|
5
5
|
* icon color
|
|
6
6
|
*/
|
|
7
|
-
color?: ColorType | PaletteType;
|
|
7
|
+
color?: ColorType | PaletteType | string;
|
|
8
8
|
/**
|
|
9
9
|
* icon mark color
|
|
10
10
|
*/
|
|
11
|
-
strokeColor?: ColorType | PaletteType;
|
|
11
|
+
strokeColor?: ColorType | PaletteType | string;
|
|
12
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* A component that displays an animated indicator with a customizable icon type and colors.
|
|
15
|
+
* It can be used to indicate various states such as success, error, or information.
|
|
16
|
+
* The component supports different icon types like check, cross, question, and exclamation.
|
|
17
|
+
* It also allows customization of the icon color and stroke color.
|
|
18
|
+
*
|
|
19
|
+
* @param {AnimationProps} props - The properties for the AnimationIndicator component.
|
|
20
|
+
* @returns {JSX.Element} The rendered AnimationIndicator component.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```jsx
|
|
24
|
+
* <AnimationIndicator
|
|
25
|
+
* type="check"
|
|
26
|
+
* color="primary-500"
|
|
27
|
+
* strokeColor="primary-700"
|
|
28
|
+
* className="my-custom-class"
|
|
29
|
+
* aria-label="Loading"
|
|
30
|
+
* />
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/story/core-components-animations--docs} for more details.
|
|
34
|
+
*/
|
|
13
35
|
export declare const AnimationIndicator: ({ className, color, strokeColor, type, ...aria }: AnimationProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
|
|
15
|
-
|
|
36
|
+
/**
|
|
37
|
+
* A component that displays a loading animation with a customizable icon, color, size, and mask blur.
|
|
38
|
+
* It is typically used to indicate loading states in the UI.
|
|
39
|
+
*
|
|
40
|
+
* @param {Object} props - The properties for the AnimationLoader component.
|
|
41
|
+
* @param {ColorType | PaletteType | string} [props.color="tint-500"] - The color of the loader icon.
|
|
42
|
+
* @param {number | string} [props.size="2rem"] - The size of the loader icon.
|
|
43
|
+
* @param {string} props.icon - The icon to be displayed as the loader.
|
|
44
|
+
* @param {"sm" | "md" | "lg"} [props.maskBlur] - The blur effect for the background mask.
|
|
45
|
+
* @returns {JSX.Element} The rendered AnimationLoader component.
|
|
46
|
+
*/
|
|
47
|
+
export declare const AnimationLoader: ({ color, size, icon, maskBlur, }: {
|
|
48
|
+
icon: string;
|
|
49
|
+
maskBlur?: "sm" | "md" | "lg";
|
|
50
|
+
color?: ColorType | PaletteType | string;
|
|
16
51
|
size?: number | string;
|
|
17
52
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
-
|
|
19
|
-
|
|
53
|
+
/**
|
|
54
|
+
* A component that displays an animated bars loader.
|
|
55
|
+
* It can be customized with color and size properties.
|
|
56
|
+
* This component is typically used to indicate loading states in the UI.
|
|
57
|
+
*
|
|
58
|
+
* @param {Object} props - The properties for the LoadingBars component.
|
|
59
|
+
* @param {ColorType | PaletteType | string} [props.color="tint-500"] - The color of the bars.
|
|
60
|
+
* @param {number | string} [props.size="2rem"] - The size of the bars.
|
|
61
|
+
* @returns {JSX.Element} The rendered LoadingBars component.
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```jsx
|
|
65
|
+
* <LoadingBars color="primary-500" size="3rem" />
|
|
66
|
+
* ```
|
|
67
|
+
*
|
|
68
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/story/core-components-animations--docs} for more details.
|
|
69
|
+
*/
|
|
70
|
+
export declare const LoadingBars: (props: {
|
|
71
|
+
color?: ColorType | PaletteType | string;
|
|
20
72
|
size?: number | string;
|
|
73
|
+
maskBlur?: "sm" | "md" | "lg";
|
|
21
74
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
-
|
|
75
|
+
/**
|
|
76
|
+
* A component that displays a spinner animation.
|
|
77
|
+
* It can be customized with color and size properties.
|
|
78
|
+
* This component is typically used to indicate loading states in the UI.
|
|
79
|
+
*
|
|
80
|
+
* @param {Object} props - The properties for the LoadingSpinner component.
|
|
81
|
+
* @param {ColorType | PaletteType | string} [props.color="tint-700"] - The color of the spinner.
|
|
82
|
+
* @param {number | string} [props.size="2rem"] - The size of the spinner.
|
|
83
|
+
* @returns {JSX.Element} The rendered LoadingSpinner component.
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* ```jsx
|
|
87
|
+
* <LoadingSpinner color="primary-500" size="3rem" />
|
|
88
|
+
* ```
|
|
89
|
+
*
|
|
90
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/story/core-components-animations--docs} for more details.
|
|
91
|
+
*/
|
|
92
|
+
export declare const LoadingSpinner: (props: {
|
|
93
|
+
color?: ColorType | PaletteType | string;
|
|
94
|
+
size?: number | string;
|
|
95
|
+
maskBlur?: "sm" | "md" | "lg";
|
|
96
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
97
|
+
/**
|
|
98
|
+
* A component that displays a skeleton loader with a placeholder for content.
|
|
99
|
+
* It can be customized with color and size properties.
|
|
100
|
+
* This component is typically used to indicate loading states in the cards, panels and virtual lists,
|
|
101
|
+
* providing a visual placeholder for content that is being loaded.
|
|
102
|
+
*
|
|
103
|
+
* @param {CssProp} props - The properties for the Skeleton component.
|
|
104
|
+
* @returns {JSX.Element} The rendered Skeleton component.
|
|
105
|
+
*
|
|
106
|
+
* @example
|
|
107
|
+
* ```jsx
|
|
108
|
+
* <Skeleton className="my-skeleton" />
|
|
109
|
+
* * // Renders a skeleton loader with a placeholder for content.
|
|
110
|
+
* ```
|
|
111
|
+
*
|
|
112
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/story/core-components-animations--docs} for more details.
|
|
113
|
+
*/
|
|
23
114
|
export declare const Skeleton: ({ className, ...rest }: CssProp) => import("react/jsx-runtime").JSX.Element;
|
|
115
|
+
/**
|
|
116
|
+
* A component that displays a loading animation with a top border.
|
|
117
|
+
* It is typically used to indicate that content is being loaded in pages and page sections.
|
|
118
|
+
*
|
|
119
|
+
* @returns {JSX.Element} The rendered Loading component.
|
|
120
|
+
*/
|
|
121
|
+
export declare const LoadingLine: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { type AriaProps, type ColorType, type CssProp, type RefProp, type SizeType, type TestProps } from "../../types";
|
|
1
|
+
import { type PaletteType, type AriaProps, type ColorType, type CssProp, type RefProp, type SizeType, type TestProps } from "../../types";
|
|
3
2
|
export interface AvatarProps extends CssProp, AriaProps, TestProps, RefProp {
|
|
4
3
|
/**
|
|
5
4
|
* avatar name for generated fallback
|
|
@@ -20,11 +19,11 @@ export interface AvatarProps extends CssProp, AriaProps, TestProps, RefProp {
|
|
|
20
19
|
/**
|
|
21
20
|
* background color (CSS color / tailwind color)
|
|
22
21
|
*/
|
|
23
|
-
bg?: ColorType | string;
|
|
22
|
+
bg?: ColorType | PaletteType | string;
|
|
24
23
|
/**
|
|
25
24
|
* icon color (CSS color / tailwind color)
|
|
26
25
|
*/
|
|
27
|
-
color?: ColorType | string;
|
|
26
|
+
color?: ColorType | PaletteType | string;
|
|
28
27
|
/**
|
|
29
28
|
* icon size
|
|
30
29
|
*/
|
|
@@ -37,12 +36,41 @@ export interface AvatarProps extends CssProp, AriaProps, TestProps, RefProp {
|
|
|
37
36
|
* rounded icon
|
|
38
37
|
*/
|
|
39
38
|
rounded?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* prevent click default, useful when component is within a `a` link
|
|
41
|
+
*/
|
|
42
|
+
preventDefault?: boolean;
|
|
40
43
|
/**
|
|
41
44
|
* click handler
|
|
42
45
|
*/
|
|
43
46
|
onClick?: React.MouseEventHandler;
|
|
44
47
|
}
|
|
45
48
|
/**
|
|
46
|
-
*
|
|
49
|
+
* A component that displays an avatar image or a fallback icon with customizable styles and properties.
|
|
50
|
+
* It supports various avatar types, including text-based avatars, and allows for customization of background color, icon color, size, and rounded corners.
|
|
51
|
+
* This component is useful for displaying user avatars in applications, providing a visual representation of users or entities.
|
|
52
|
+
* It can also handle cases where the avatar image fails to load by displaying a fallback icon or text.
|
|
53
|
+
* It uses the Boring Avatars library for generating fallback avatars based on the user's name.
|
|
54
|
+
*
|
|
55
|
+
* @param {AvatarProps} props - The properties for the Avatar component.
|
|
56
|
+
* @returns {JSX.Element} The rendered Avatar component.
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```jsx
|
|
60
|
+
* <Avatar
|
|
61
|
+
* name="John Doe"
|
|
62
|
+
* avatar="https://example.com/avatar.jpg"
|
|
63
|
+
* fallbackIcon="fas fa-user"
|
|
64
|
+
* bg="bg-blue-500"
|
|
65
|
+
* color="text-white"
|
|
66
|
+
* size="md"
|
|
67
|
+
* rounded
|
|
68
|
+
* variant="beam"
|
|
69
|
+
* onClick={() => console.log("Avatar clicked")}
|
|
70
|
+
* />
|
|
71
|
+
* ```
|
|
72
|
+
*
|
|
73
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/story/core-components-avatar--docs} for more details.
|
|
74
|
+
* @see {@link https://boringavatars.com/} for more information on Boring Avatars.
|
|
47
75
|
*/
|
|
48
|
-
export declare const Avatar: ({ ref, name, avatar, fallbackIcon, bg, color, size, rounded, variant, className, viewBox, onClick, ...aria }: AvatarProps) => import("react/jsx-runtime").JSX.Element;
|
|
76
|
+
export declare const Avatar: ({ ref, name, avatar, fallbackIcon, bg, color, size, rounded, variant, className, viewBox, preventDefault, onClick, ...aria }: AvatarProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -18,7 +18,25 @@ export interface AvatarGroupProps extends CssProp, RefProp, AriaProps {
|
|
|
18
18
|
totalCount?: number;
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
21
|
+
* A component that groups multiple avatars together, displaying a count of additional avatars if the total exceeds the visible ones.
|
|
22
|
+
* It allows customization of size, rounding, and additional aria attributes.
|
|
23
|
+
* This component is useful for displaying a collection of user avatars in a compact format, such as in a chat application or user list.
|
|
24
|
+
* It automatically calculates the number of additional avatars based on the `totalCount` prop and the number of children provided.
|
|
25
|
+
*
|
|
26
|
+
* @param {AvatarGroupProps} props - The properties for the AvatarGroup component.
|
|
27
|
+
* @returns {JSX.Element} The rendered AvatarGroup component.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```jsx
|
|
31
|
+
* <AvatarGroup totalCount={5} size="md" className="my-avatar-group">
|
|
32
|
+
* <Avatar name="John Doe" avatar="https://example.com/avatar1.jpg" />
|
|
33
|
+
* <Avatar name="Jane Smith" avatar="https://example.com/avatar2.jpg" />
|
|
34
|
+
* <Avatar name="Alice Johnson" avatar="https://example.com/avatar3.jpg" />
|
|
35
|
+
* <Avatar name="Bob Brown" avatar="https://example.com/avatar4.jpg" />
|
|
36
|
+
* </AvatarGroup>
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/core-components-avatar--docs} for more details.
|
|
22
40
|
*/
|
|
23
41
|
export declare const AvatarGroup: ({ ref, children, className, totalCount, rounded, size, ...aria }: AvatarGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
42
|
export {};
|
|
@@ -1,13 +1,22 @@
|
|
|
1
|
-
import { type BadgeType, type ChildProp, type CssProp, type
|
|
2
|
-
|
|
1
|
+
import { type BadgeType, type ChildProp, type CssProp, type RefProp } from "../../types";
|
|
2
|
+
import { type IconProps } from "../icon/Icon";
|
|
3
|
+
export interface BadgeProps extends CssProp, RefProp, Partial<ChildProp> {
|
|
3
4
|
/**
|
|
4
5
|
* make wrapper a block element
|
|
5
6
|
*/
|
|
6
7
|
block?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* inline badge
|
|
10
|
+
*/
|
|
11
|
+
inline?: boolean;
|
|
7
12
|
/**
|
|
8
13
|
* badge value
|
|
9
14
|
*/
|
|
10
15
|
value?: number | string;
|
|
16
|
+
/**
|
|
17
|
+
* icon path or props
|
|
18
|
+
*/
|
|
19
|
+
icon?: IconProps;
|
|
11
20
|
/**
|
|
12
21
|
* max value for number display
|
|
13
22
|
*/
|
|
@@ -21,5 +30,30 @@ export interface BadgeProps extends CssProp, RefProp, IconProps, Partial<ChildPr
|
|
|
21
30
|
*/
|
|
22
31
|
placement?: "top-start" | "top-end" | "bottom-start" | "bottom-end" | "top" | "bottom" | "start" | "end";
|
|
23
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* Utility function to get badge properties from a badge value or object.
|
|
35
|
+
* It checks if the badge is an object and returns its properties,
|
|
36
|
+
*
|
|
37
|
+
* @param {string | number | BadgeType} badge - The badge value or object.
|
|
38
|
+
* @returns {AnyObject} An object containing badge properties.
|
|
39
|
+
*/
|
|
24
40
|
export declare const getBadgeProps: (badge?: string | number | BadgeType) => AnyObject;
|
|
25
|
-
|
|
41
|
+
/**
|
|
42
|
+
* A component that displays a badge with a value, icon, and optional ping animation.
|
|
43
|
+
* It can be used to indicate notifications, messages, or other important information.
|
|
44
|
+
* It supports various placements, inline or block display, and custom styling.
|
|
45
|
+
* It can also wrap children elements, allowing for flexible usage in buttons or other components.
|
|
46
|
+
*
|
|
47
|
+
* @param {BadgeProps} props - The properties for the Badge component.
|
|
48
|
+
* @returns {JSX.Element} The rendered Badge component.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```jsx
|
|
52
|
+
* <Badge value={5} max={10} ping>
|
|
53
|
+
* <button>Notifications</button>
|
|
54
|
+
* </Badge>
|
|
55
|
+
* ```
|
|
56
|
+
*
|
|
57
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/core-components-badge--docs} for more details.
|
|
58
|
+
*/
|
|
59
|
+
export declare const Badge: ({ ref, className, value, max, ping, block, inline, placement, children, forButton, icon, ...rest }: BadgeProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type AriaProps, type ChildrenProp, type CssProp } from "../../types";
|
|
2
|
-
import {
|
|
3
|
-
export interface BreadcrumbProps extends CssProp, AriaProps, ChildrenProp<typeof
|
|
2
|
+
import { Anchor } from "../../typography/Anchor";
|
|
3
|
+
export interface BreadcrumbProps extends CssProp, AriaProps, ChildrenProp<typeof Anchor> {
|
|
4
4
|
/**
|
|
5
5
|
* breadcrumb styling
|
|
6
6
|
*/
|
|
@@ -14,4 +14,33 @@ export interface BreadcrumbProps extends CssProp, AriaProps, ChildrenProp<typeof
|
|
|
14
14
|
*/
|
|
15
15
|
color?: "primary" | "accent";
|
|
16
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* A navigation component that displays the current page's location within a hierarchy and allows users to navigate back to previous pages.
|
|
19
|
+
* It supports different styles, separators, and colors, and can handle a variable number of breadcrumb links.
|
|
20
|
+
* This component is useful for enhancing user navigation experience in applications with multiple levels of content hierarchy.
|
|
21
|
+
* It automatically manages the display of overflow items when there are too many links to fit in the available space, providing a dropdown for additional links.
|
|
22
|
+
*
|
|
23
|
+
* @param {BreadcrumbProps} props - The properties for the Breadcrumbs component.
|
|
24
|
+
* @returns {JSX.Element} The rendered Breadcrumbs component.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```jsx
|
|
28
|
+
* <Breadcrumbs
|
|
29
|
+
* variant="classic"
|
|
30
|
+
* separator=">"
|
|
31
|
+
* color="primary"
|
|
32
|
+
* className="my-custom-class"
|
|
33
|
+
* aria-label="Breadcrumbs"
|
|
34
|
+
* >
|
|
35
|
+
* <Anchor href="/">Home</Anchor>
|
|
36
|
+
* <Anchor href="/products">Products</Anchor>
|
|
37
|
+
* <Anchor href="/products/shoes">Shoes</Anchor>
|
|
38
|
+
* <Anchor href="/products/shoes/sneakers">Sneakers</Anchor>
|
|
39
|
+
* <Anchor href="/products/shoes/sneakers/nike">Nike</Anchor>
|
|
40
|
+
* <Anchor href="/products/shoes/sneakers/nike/airmax">Air Max</Anchor>
|
|
41
|
+
* </Breadcrumbs>
|
|
42
|
+
* ```
|
|
43
|
+
*
|
|
44
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/core-components-breadcrumbs--docs} for more details.
|
|
45
|
+
*/
|
|
17
46
|
export declare const Breadcrumbs: ({ variant, className, separator, children, color, ...aria }: BreadcrumbProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type MouseEventHandler, type WheelEventHandler } from "react";
|
|
2
|
-
import { type AriaProps, type BadgeType, type CallbackReturn, type
|
|
3
|
-
|
|
2
|
+
import { type AriaProps, type BadgeType, type CallbackReturn, type ColorState, type CssProp, type PolymorphicProps, type RefProp, type SizeType, type TestProps } from "../../types";
|
|
3
|
+
import { type IconProps } from "../icon/Icon";
|
|
4
|
+
export interface BaseProps extends CssProp, AriaProps, RefProp, TestProps {
|
|
4
5
|
/**
|
|
5
6
|
* primary icon alignment
|
|
6
7
|
*/
|
|
@@ -16,7 +17,11 @@ export interface BaseProps extends CssProp, AriaProps, IconProps, RefProp, TestP
|
|
|
16
17
|
/**
|
|
17
18
|
* button color
|
|
18
19
|
*/
|
|
19
|
-
color?:
|
|
20
|
+
color?: ColorState;
|
|
21
|
+
/**
|
|
22
|
+
* icon path or props
|
|
23
|
+
*/
|
|
24
|
+
icon?: IconProps;
|
|
20
25
|
/**
|
|
21
26
|
* button type
|
|
22
27
|
*/
|
|
@@ -24,7 +29,7 @@ export interface BaseProps extends CssProp, AriaProps, IconProps, RefProp, TestP
|
|
|
24
29
|
/**
|
|
25
30
|
* button styling
|
|
26
31
|
*/
|
|
27
|
-
variant?: "outline" | "solid" | "link";
|
|
32
|
+
variant?: "outline" | "soft" | "solid" | "link";
|
|
28
33
|
/**
|
|
29
34
|
* active state with click disabled
|
|
30
35
|
*/
|
|
@@ -74,6 +79,10 @@ export interface BaseProps extends CssProp, AriaProps, IconProps, RefProp, TestP
|
|
|
74
79
|
* keyboard shortcut
|
|
75
80
|
*/
|
|
76
81
|
hotKey?: string;
|
|
82
|
+
/**
|
|
83
|
+
* prevent click default, useful when button is within a `a` link
|
|
84
|
+
*/
|
|
85
|
+
preventDefault?: boolean;
|
|
77
86
|
stopPropagation?: boolean;
|
|
78
87
|
onMouseOut?: MouseEventHandler;
|
|
79
88
|
onMouseOver?: MouseEventHandler;
|
|
@@ -82,14 +91,37 @@ export interface BaseProps extends CssProp, AriaProps, IconProps, RefProp, TestP
|
|
|
82
91
|
onMouseLeave?: MouseEventHandler;
|
|
83
92
|
onWheel?: WheelEventHandler;
|
|
84
93
|
}
|
|
85
|
-
|
|
94
|
+
type ButtonTypeProps = {
|
|
86
95
|
children: string | React.ReactElement;
|
|
87
96
|
"aria-label"?: string;
|
|
88
97
|
} | {
|
|
89
98
|
children?: never;
|
|
90
99
|
"aria-label": string;
|
|
91
100
|
};
|
|
101
|
+
export type ButtonProps<Tag extends React.ElementType = "button"> = BaseProps & ButtonTypeProps & PolymorphicProps<Tag>;
|
|
92
102
|
/**
|
|
93
|
-
*
|
|
103
|
+
* A versatile button component that supports various styles, icons, and actions.
|
|
104
|
+
* It can be used as a primary action button, with options for loading states, action messages, and more.
|
|
105
|
+
* It supports polymorphic rendering, allowing it to be used as different HTML elements (e.g., button, a, div).
|
|
106
|
+
* It also includes features like after action tooltips, badges, and keyboard shortcuts.
|
|
107
|
+
*
|
|
108
|
+
* @param {ButtonProps} props - The properties for the Button component.
|
|
109
|
+
* @returns {JSX.Element} The rendered Button component.
|
|
110
|
+
*
|
|
111
|
+
* @example
|
|
112
|
+
* ```jsx
|
|
113
|
+
* <Button
|
|
114
|
+
* color="primary"
|
|
115
|
+
* size="md"
|
|
116
|
+
* variant="solid"
|
|
117
|
+
* icon="check"
|
|
118
|
+
* onClick={() => console.log("Button clicked!")}
|
|
119
|
+
* >
|
|
120
|
+
* Click Me
|
|
121
|
+
* </Button>
|
|
122
|
+
* ```
|
|
123
|
+
*
|
|
124
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/core-components-button--docs} for more details.
|
|
94
125
|
*/
|
|
95
|
-
export declare const Button: <Tag extends
|
|
126
|
+
export declare const Button: <Tag extends React.ElementType = "button">({ as, ref, children, className, active, color, icon, iconAlign, altIcon, rounded, size, disabled, loading, variant, badge, fullWidth, spinOnHover, onClick, actionMessage, preventDefault, stopPropagation, type, hotKey, showActionDone, showActionDoneEvent, tabIndex, "data-ref": dataRef, ...aria }: ButtonProps<Tag>) => import("react/jsx-runtime").JSX.Element;
|
|
127
|
+
export {};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { type AriaProps, type ChildrenProp, type ColorType, type CssProp, type RefProp, type SizeType, type TestProps } from "../../types";
|
|
1
|
+
import { type AriaProps, type ChildrenProp, type ColorState, type CssProp, type RefProp, type SizeType, type TestProps } from "../../types";
|
|
3
2
|
import { type Button } from "./Button";
|
|
4
3
|
export interface ButtonGroupProps extends CssProp, AriaProps, TestProps, RefProp<HTMLDivElement>, ChildrenProp<React.ReactElement<typeof Button>> {
|
|
5
4
|
/**
|
|
@@ -17,7 +16,7 @@ export interface ButtonGroupProps extends CssProp, AriaProps, TestProps, RefProp
|
|
|
17
16
|
/**
|
|
18
17
|
* button color
|
|
19
18
|
*/
|
|
20
|
-
color?:
|
|
19
|
+
color?: ColorState;
|
|
21
20
|
/**
|
|
22
21
|
* full rounded edges
|
|
23
22
|
*/
|
|
@@ -31,4 +30,30 @@ export interface ButtonGroupProps extends CssProp, AriaProps, TestProps, RefProp
|
|
|
31
30
|
*/
|
|
32
31
|
fullWidth?: boolean;
|
|
33
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* A component that groups buttons together, allowing for consistent styling and behavior across multiple buttons.
|
|
35
|
+
* It supports vertical orientation, various button styles, and can handle properties like size, color, and disabled state.
|
|
36
|
+
* This component is useful for creating button groups that maintain a uniform appearance and functionality,
|
|
37
|
+
* such as toolbars, action groups, or navigation buttons.
|
|
38
|
+
*
|
|
39
|
+
* @param {ButtonGroupProps} props - The properties for the ButtonGroup component.
|
|
40
|
+
* @returns {JSX.Element} The rendered ButtonGroup component.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```jsx
|
|
44
|
+
* <ButtonGroup
|
|
45
|
+
* variant="solid"
|
|
46
|
+
* color="primary"
|
|
47
|
+
* className="my-custom-class"
|
|
48
|
+
* aria-label="Button Group"
|
|
49
|
+
* vertical
|
|
50
|
+
* >
|
|
51
|
+
* <Button>Button 1</Button>
|
|
52
|
+
* <Button>Button 2</Button>
|
|
53
|
+
* <Button>Button 3</Button>
|
|
54
|
+
* </ButtonGroup>
|
|
55
|
+
* ```
|
|
56
|
+
*
|
|
57
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/core-components-buttongroup--docs} for more details.
|
|
58
|
+
*/
|
|
34
59
|
export declare const ButtonGroup: ({ vertical, className, children, variant, rounded, disabled, fullWidth, color, size, ...aria }: ButtonGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { type Placement } from "@floating-ui/react";
|
|
3
2
|
import { type CallbackReturn, type PolymorphicProps, type RefProp } from "../../types";
|
|
4
3
|
import { type BaseProps, type ButtonProps } from "./Button";
|
|
@@ -26,7 +25,28 @@ interface ExtendedProps extends Omit<BaseProps, "onClick">, RefProp {
|
|
|
26
25
|
}
|
|
27
26
|
export type ConfirmButtonProps = ExtendedProps & ButtonProps;
|
|
28
27
|
/**
|
|
29
|
-
*
|
|
28
|
+
* A button that shows a confirmation dialog when clicked, allowing the user to confirm or cancel an action.
|
|
29
|
+
* It supports custom messages, labels, and loading states.
|
|
30
|
+
* This component is useful for actions that require user confirmation, such as deleting items or submitting forms.
|
|
31
|
+
* It uses the Floating UI library to manage the positioning of the confirmation dialog, ensuring it appears correctly relative to the button.
|
|
32
|
+
* It also supports custom placement of the dialog, and can display an action message when the action is completed.
|
|
33
|
+
*
|
|
34
|
+
* @param {ConfirmButtonProps} props - The properties for the ConfirmButton component.
|
|
35
|
+
* @returns {JSX.Element} The rendered ConfirmButton component.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```jsx
|
|
39
|
+
* <ConfirmButton
|
|
40
|
+
* message="Are you sure you want to delete this item?"
|
|
41
|
+
* onClick={(confirmed) => {
|
|
42
|
+
* if (confirmed) {
|
|
43
|
+
* // Perform action
|
|
44
|
+
* }
|
|
45
|
+
* }}
|
|
46
|
+
* />
|
|
47
|
+
* ```
|
|
48
|
+
*
|
|
49
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/core-components-confirmbutton--docs} for more details.
|
|
30
50
|
*/
|
|
31
|
-
export declare const ConfirmButton: <Tag extends
|
|
51
|
+
export declare const ConfirmButton: <Tag extends React.ElementType = "button">({ ref, message, color, okLabel, cancelLabel, onClick, loading, placement, actionMessage, showActionDone, showActionDoneEvent, ...props }: ConfirmButtonProps & PolymorphicProps<Tag>) => import("react/jsx-runtime").JSX.Element;
|
|
32
52
|
export {};
|