@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
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
4
|
+
var classNames = require('classnames');
|
|
5
|
+
var react = require('react');
|
|
6
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* A component that allows flipping between front and back content.
|
|
10
|
+
* It uses a ref to control the flipping action, which toggles the visibility of the front and back content.
|
|
11
|
+
* The component accepts children elements, which should be valid React elements representing the front and back content.
|
|
12
|
+
* The front content is expected to be the first child, and the back content is expected to be the second child.
|
|
13
|
+
* The component applies specific classes to the children based on their position (front or back) and manages the flipping state internally.
|
|
14
|
+
* The `flipCard` method can be called to toggle the visibility of the back content.
|
|
15
|
+
*
|
|
16
|
+
* @param {Props} props - The properties for the FlipContent component.
|
|
17
|
+
* @returns {JSX.Element} The rendered FlipContent component.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```jsx
|
|
21
|
+
* <FlipContent ref={flipRef}>
|
|
22
|
+
* <div className="front">Front Content</div>
|
|
23
|
+
* <div className="back">Back Content</div>
|
|
24
|
+
* </FlipContent>
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/core-components-flipcontent--docs}
|
|
28
|
+
*/
|
|
29
|
+
var FlipContent = function FlipContent(_ref) {
|
|
30
|
+
var ref = _ref.ref,
|
|
31
|
+
children = _ref.children;
|
|
32
|
+
var _useState = react.useState(false),
|
|
33
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
34
|
+
showBack = _useState2[0],
|
|
35
|
+
setShowBack = _useState2[1];
|
|
36
|
+
react.useImperativeHandle(ref, function () {
|
|
37
|
+
return {
|
|
38
|
+
flipCard: function flipCard() {
|
|
39
|
+
return setShowBack(!showBack);
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
}, [showBack]);
|
|
43
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
44
|
+
className: "relative flex-1",
|
|
45
|
+
"data-card-flip": showBack,
|
|
46
|
+
children: react.Children.map(children, function (child, idx) {
|
|
47
|
+
var _child$props$classNam, _child$props;
|
|
48
|
+
return /*#__PURE__*/react.isValidElement(child) && /*#__PURE__*/react.cloneElement(child, {
|
|
49
|
+
className: classNames((_child$props$classNam = (_child$props = child.props) === null || _child$props === void 0 ? void 0 : _child$props.className) !== null && _child$props$classNam !== void 0 ? _child$props$classNam : "", idx === 0 ? "bg-base relative" : "bg-base absolute inset-0"),
|
|
50
|
+
"data-card-flip-face": idx === 0 ? "front" : "back"
|
|
51
|
+
});
|
|
52
|
+
})
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
exports.FlipContent = FlipContent;
|
|
@@ -5,11 +5,10 @@ var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProp
|
|
|
5
5
|
var classNames = require('classnames');
|
|
6
6
|
var react = require('react');
|
|
7
7
|
var useEffectDebugger = require('../../hooks/useEffectDebugger.js');
|
|
8
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
8
9
|
var getColor = require('../../utils/getColor.js');
|
|
9
10
|
require('@react-fabric/utilities');
|
|
10
11
|
var Icon = require('../icon/Icon.js');
|
|
11
|
-
var Chip_module = require('./Chip.module.css');
|
|
12
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
13
12
|
|
|
14
13
|
var _excluded = ["ref", "children", "className", "size", "color", "variant", "icon", "iconBg", "iconColor", "rtlFlip", "disabled", "onClick", "onIconClick", "onRemove", "rounded", "stopPropagation", "as"];
|
|
15
14
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -21,6 +20,27 @@ var SizeMap = {
|
|
|
21
20
|
lg: "1.5rem",
|
|
22
21
|
xl: "2rem"
|
|
23
22
|
};
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* A component that represents a small block of information, often used for tags, categories, or actions.
|
|
26
|
+
* It allows customization of size, color, variant, and includes optional icon and remove functionality.
|
|
27
|
+
* It supports various properties for styling and interaction, including click handlers and disabled state.
|
|
28
|
+
* It can be used in various contexts, such as filtering options, displaying tags, or representing user actions.
|
|
29
|
+
* It can be styled with custom CSS classes and supports features like rounded edges and click handling.
|
|
30
|
+
* It can also include an icon and a remove button, making it versatile for different use cases.
|
|
31
|
+
*
|
|
32
|
+
* @param {ChipProps} props - The properties for the Chip component.
|
|
33
|
+
* @returns {JSX.Element} The rendered Chip component.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```jsx
|
|
37
|
+
* <Chip color="primary" size="md" className="my-chip">
|
|
38
|
+
* Example Chip
|
|
39
|
+
* </Chip>
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
42
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/core-components-chip--docs} for more details.
|
|
43
|
+
*/
|
|
24
44
|
var Chip = function Chip(_ref) {
|
|
25
45
|
var ref = _ref.ref,
|
|
26
46
|
children = _ref.children,
|
|
@@ -66,25 +86,30 @@ var Chip = function Chip(_ref) {
|
|
|
66
86
|
return /*#__PURE__*/jsxRuntime.jsxs(E, _objectSpread(_objectSpread({
|
|
67
87
|
ref: ref,
|
|
68
88
|
role: "term",
|
|
69
|
-
|
|
89
|
+
"data-ref": "chip",
|
|
90
|
+
className: classNames("fabric-chip", className, "select-none inline-flex flex-nowrap items-center align-middle max-w-72 rounded", rounded && "rounded-full", !!onClick && "clickable", disabled && "disabled"),
|
|
70
91
|
style: styles,
|
|
71
92
|
"data-variant": variant,
|
|
72
93
|
"data-inner-clickable": !!onClick,
|
|
73
|
-
onClick: clickHandler
|
|
94
|
+
onClick: disabled ? undefined : clickHandler
|
|
74
95
|
}, aria), {}, {
|
|
75
96
|
children: [icon && /*#__PURE__*/jsxRuntime.jsx(Icon.Icon, {
|
|
76
|
-
|
|
97
|
+
"data-ref": "chipIcon",
|
|
98
|
+
className: classNames("fabric-chipIcon", "m-1 flex-auto"),
|
|
77
99
|
icon: icon,
|
|
78
100
|
bg: iconBg,
|
|
79
101
|
onClick: onIconClick,
|
|
80
102
|
color: iconColor,
|
|
81
103
|
rtlFlip: rtlFlip
|
|
82
104
|
}), children && /*#__PURE__*/jsxRuntime.jsx("label", {
|
|
83
|
-
|
|
105
|
+
"data-ref": "chipLabel",
|
|
106
|
+
className: classNames("fabric-chipLabel", "truncate"),
|
|
84
107
|
children: children
|
|
85
108
|
}), onRemove && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
86
109
|
role: "none",
|
|
87
|
-
|
|
110
|
+
"data-ref": "chipRemove",
|
|
111
|
+
"data-inner-cliackable": true,
|
|
112
|
+
className: classNames("fabric-chipRemove", "cursor-pointer pe-1 opacity-65 hover:opacity-90"),
|
|
88
113
|
onClick: removeHandler,
|
|
89
114
|
children: "\xD7"
|
|
90
115
|
})]
|
|
@@ -8,12 +8,37 @@ var classNames = require('classnames');
|
|
|
8
8
|
var react = require('react');
|
|
9
9
|
var icons = require('../../types/icons.js');
|
|
10
10
|
var Icon = require('../icon/Icon.js');
|
|
11
|
-
var Collapsable_module = require('./Collapsable.module.css');
|
|
12
11
|
var jsxRuntime = require('react/jsx-runtime');
|
|
13
12
|
|
|
14
|
-
var _excluded = ["ref", "disabled", "className", "bodyClassName", "headerClassName", "children", "iconAlign", "iconClosed", "iconOpen", "open", "onClose", "onOpen"];
|
|
13
|
+
var _excluded = ["ref", "disabled", "className", "bodyClassName", "headerClassName", "children", "iconAlign", "stickyHeader", "iconClosed", "iconOpen", "open", "onClose", "onOpen"];
|
|
15
14
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
16
15
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
16
|
+
/**
|
|
17
|
+
* A component that can be expanded or collapsed to show or hide content.
|
|
18
|
+
* It is useful for organizing content in a way that allows users to focus on the information they are interested in.
|
|
19
|
+
* It supports custom icons for open and closed states, alignment options, and can be made sticky.
|
|
20
|
+
* This component is ideal for creating accordions, expandable panels, or sections that can be toggled by the user.
|
|
21
|
+
*
|
|
22
|
+
* @param {CollapsableProps} props - The properties for the Collapsable component.
|
|
23
|
+
* @returns {JSX.Element} The rendered Collapsable component.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```jsx
|
|
27
|
+
* <Collapsable
|
|
28
|
+
* iconAlign="start"
|
|
29
|
+
* iconOpen={CoreIcons.chevronDown}
|
|
30
|
+
* iconClosed={CoreIcons.chevronRight}
|
|
31
|
+
* open={true}
|
|
32
|
+
* onOpen={() => console.log("Opened")}
|
|
33
|
+
* onClose={() => console.log("Closed")}
|
|
34
|
+
* >
|
|
35
|
+
* <div>Header Content</div>
|
|
36
|
+
* <div>Body Content</div>
|
|
37
|
+
* </Collapsable>
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/core-components-collapsable--docs} for more details.
|
|
41
|
+
*/
|
|
17
42
|
var Collapsable = function Collapsable(_ref) {
|
|
18
43
|
var ref = _ref.ref,
|
|
19
44
|
disabled = _ref.disabled,
|
|
@@ -22,6 +47,7 @@ var Collapsable = function Collapsable(_ref) {
|
|
|
22
47
|
headerClassName = _ref.headerClassName,
|
|
23
48
|
children = _ref.children,
|
|
24
49
|
iconAlign = _ref.iconAlign,
|
|
50
|
+
stickyHeader = _ref.stickyHeader,
|
|
25
51
|
_ref$iconClosed = _ref.iconClosed,
|
|
26
52
|
iconClosed = _ref$iconClosed === void 0 ? icons.CoreIcons.chevronRight : _ref$iconClosed,
|
|
27
53
|
_ref$iconOpen = _ref.iconOpen,
|
|
@@ -57,12 +83,12 @@ var Collapsable = function Collapsable(_ref) {
|
|
|
57
83
|
head = _useMemo2[0],
|
|
58
84
|
body = _useMemo2[1];
|
|
59
85
|
return /*#__PURE__*/jsxRuntime.jsxs("div", _objectSpread(_objectSpread({
|
|
60
|
-
className: classNames(
|
|
86
|
+
className: classNames("fabric-collapsable", className)
|
|
61
87
|
}, aria), {}, {
|
|
62
88
|
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
63
89
|
role: "none",
|
|
64
90
|
ref: headRef,
|
|
65
|
-
className: classNames(
|
|
91
|
+
className: classNames("fabric-collapsableHead", "flex gap-1 flex-nowrap py-2 font-medium cursor-pointer items-center select-none hover:opacity-70", headerClassName, stickyHeader && "bg-base sticky top-0 py-1 z-10", iconAlign === "end" ? "flex-row-reverse" : "flex-row"),
|
|
66
92
|
onClick: function onClick() {
|
|
67
93
|
return !disabled && setOpenState(!openState);
|
|
68
94
|
},
|
|
@@ -71,12 +97,12 @@ var Collapsable = function Collapsable(_ref) {
|
|
|
71
97
|
icon: openState ? iconOpen : iconClosed,
|
|
72
98
|
rtlFlip: true
|
|
73
99
|
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
74
|
-
className: "flex-1
|
|
100
|
+
className: "flex-1",
|
|
75
101
|
children: head
|
|
76
102
|
})]
|
|
77
103
|
}), openState && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
78
104
|
ref: bodyRef,
|
|
79
|
-
className: classNames(
|
|
105
|
+
className: classNames("fabric-collapsableBody", bodyClassName),
|
|
80
106
|
children: body
|
|
81
107
|
})]
|
|
82
108
|
}));
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
var classNames = require('classnames');
|
|
4
4
|
var react = require('react');
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
5
6
|
var getColor = require('../../utils/getColor.js');
|
|
6
7
|
require('@react-fabric/utilities');
|
|
7
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
8
8
|
|
|
9
9
|
/*
|
|
10
10
|
* React Fabric
|
|
@@ -29,11 +29,32 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
29
29
|
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
30
30
|
*/
|
|
31
31
|
|
|
32
|
+
/**
|
|
33
|
+
* A component that represents a visual divider between content.
|
|
34
|
+
* It can be used to separate sections of content, with optional text labels.
|
|
35
|
+
* It supports both horizontal and vertical orientations, customizable colors,
|
|
36
|
+
* styles, and alignment options.
|
|
37
|
+
*
|
|
38
|
+
* @param {DividerProps} props - The properties for the Divider component.
|
|
39
|
+
* @returns {JSX.Element} The rendered Divider component.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```jsx
|
|
43
|
+
* <Divider color="primary" align="center" style="dashed">
|
|
44
|
+
* Divider Text
|
|
45
|
+
* </Divider>
|
|
46
|
+
* // Renders a horizontal divider with primary color, centered text, and dashed style.
|
|
47
|
+
* ```
|
|
48
|
+
*
|
|
49
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/core-components-divider--docs} for more details.
|
|
50
|
+
*/
|
|
32
51
|
var Divider = function Divider(_ref) {
|
|
33
52
|
var children = _ref.children,
|
|
34
|
-
color = _ref.color,
|
|
53
|
+
_ref$color = _ref.color,
|
|
54
|
+
color = _ref$color === void 0 ? "tint-300" : _ref$color,
|
|
35
55
|
vertical = _ref.vertical,
|
|
36
|
-
|
|
56
|
+
labelClassName = _ref.labelClassName,
|
|
57
|
+
style = _ref.style,
|
|
37
58
|
_ref$align = _ref.align,
|
|
38
59
|
align = _ref$align === void 0 ? "start" : _ref$align,
|
|
39
60
|
className = _ref.className;
|
|
@@ -42,17 +63,19 @@ var Divider = function Divider(_ref) {
|
|
|
42
63
|
className = _ref2.className;
|
|
43
64
|
return /*#__PURE__*/jsxRuntime.jsx("hr", {
|
|
44
65
|
style: {
|
|
45
|
-
flex: flex
|
|
66
|
+
flex: flex,
|
|
67
|
+
borderColor: getColor.getColor(color),
|
|
68
|
+
borderStyle: style
|
|
46
69
|
},
|
|
47
|
-
className: classNames(className, vertical && "vertical", !flex && "self-stretch", vertical ? "
|
|
70
|
+
className: classNames(className, vertical && "vertical", !flex && "self-stretch", vertical ? "fabric-divider--vertical" : "fabric-divider--horizontal")
|
|
48
71
|
});
|
|
49
72
|
}, [color, vertical]);
|
|
50
73
|
return children ? /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
51
|
-
className: classNames("flex flex-nowrap items-center", vertical && "flex-col", className),
|
|
74
|
+
className: classNames("flex flex-nowrap items-center fabric-divider", vertical && "flex-col", className),
|
|
52
75
|
children: [/*#__PURE__*/jsxRuntime.jsx(Rule, {
|
|
53
76
|
flex: align === "start" ? "0 0 1rem" : "1 1 1em"
|
|
54
77
|
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
55
|
-
className: classNames("px-2 whitespace-nowrap", vertical ? "
|
|
78
|
+
className: classNames("px-2 whitespace-nowrap", vertical ? "fabric-divider-label--vertical" : "fabric-divider-label--horizontal", labelClassName, "rounded-full text-[0.75em]", vertical && "origin-center -rotate-90 z-1"),
|
|
56
79
|
children: children
|
|
57
80
|
}), /*#__PURE__*/jsxRuntime.jsx(Rule, {
|
|
58
81
|
flex: align === "end" ? "0 0 1rem" : "1 1 1em"
|
|
@@ -6,7 +6,6 @@ var react = require('@floating-ui/react');
|
|
|
6
6
|
var utilities = require('@react-fabric/utilities');
|
|
7
7
|
var classNames = require('classnames');
|
|
8
8
|
var react$1 = require('react');
|
|
9
|
-
var Dropdown_module = require('./Dropdown.module.css');
|
|
10
9
|
var jsxRuntime = require('react/jsx-runtime');
|
|
11
10
|
|
|
12
11
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -115,6 +114,7 @@ var DropdownElement = function DropdownElement(_ref) {
|
|
|
115
114
|
e.stopPropagation();
|
|
116
115
|
}
|
|
117
116
|
})), {}, {
|
|
117
|
+
"data-inner-clickable": "true",
|
|
118
118
|
"data-dropdown-open": isOpen ? true : undefined,
|
|
119
119
|
ref: innerRef
|
|
120
120
|
})), isOpen && /*#__PURE__*/jsxRuntime.jsxs(react.FloatingPortal, {
|
|
@@ -123,15 +123,12 @@ var DropdownElement = function DropdownElement(_ref) {
|
|
|
123
123
|
context: context,
|
|
124
124
|
modal: true,
|
|
125
125
|
children: /*#__PURE__*/jsxRuntime.jsxs("div", _objectSpread(_objectSpread({
|
|
126
|
-
ref:
|
|
127
|
-
var _el$querySelector;
|
|
128
|
-
refs.setFloating(el);
|
|
129
|
-
el === null || el === void 0 || (_el$querySelector = el.querySelector("input,textarea,button")) === null || _el$querySelector === void 0 || _el$querySelector.focus();
|
|
130
|
-
},
|
|
126
|
+
ref: refs.setFloating,
|
|
131
127
|
style: _objectSpread({
|
|
132
128
|
minWidth: minWidth,
|
|
133
129
|
zIndex: "var(--z-popover)"
|
|
134
|
-
}, floatingStyles)
|
|
130
|
+
}, floatingStyles),
|
|
131
|
+
"data-ref": "dropdownBody"
|
|
135
132
|
}, getFloatingProps({
|
|
136
133
|
onClick: function onClick(e) {
|
|
137
134
|
return e.stopPropagation();
|
|
@@ -139,25 +136,67 @@ var DropdownElement = function DropdownElement(_ref) {
|
|
|
139
136
|
})), {}, {
|
|
140
137
|
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
141
138
|
role: "none",
|
|
142
|
-
className: classNames(
|
|
139
|
+
className: classNames("fabric-dropdownBody", dropdownClassName, !plainDropdown && "shadow-lg bg-base ring-1 ring-tint-100", "rounded-capped overflow-auto scroll-thin grid max-h-[70vh]"),
|
|
143
140
|
onMouseUpCapture: tryClosing,
|
|
144
141
|
children: panel
|
|
145
142
|
}), showArrow && /*#__PURE__*/jsxRuntime.jsx(react.FloatingArrow, {
|
|
146
143
|
ref: arrowRef,
|
|
147
144
|
context: context,
|
|
148
145
|
strokeWidth: 0.5,
|
|
149
|
-
className: "fill-base stroke-
|
|
146
|
+
className: "fill-base stroke-dimmed"
|
|
150
147
|
})]
|
|
151
148
|
}))
|
|
152
149
|
})]
|
|
153
150
|
})]
|
|
154
151
|
});
|
|
155
152
|
};
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* A component that displays a dropdown menu with an anchor and a panel.
|
|
156
|
+
* It supports various features such as placement, arrow display, click handling,
|
|
157
|
+
* and event handling for opening and closing the dropdown.
|
|
158
|
+
*
|
|
159
|
+
* @param props - Dropdown properties
|
|
160
|
+
* @returns JSX Element
|
|
161
|
+
*
|
|
162
|
+
* @example
|
|
163
|
+
* ```jsx
|
|
164
|
+
* <Dropdown
|
|
165
|
+
* placement="bottom"
|
|
166
|
+
* showArrow
|
|
167
|
+
* closeOnClick
|
|
168
|
+
* fitToParent
|
|
169
|
+
* onOpen={() => console.log("Dropdown opened")}
|
|
170
|
+
* onClose={() => console.log("Dropdown closed")}
|
|
171
|
+
* >
|
|
172
|
+
* <button>Open Dropdown</button>
|
|
173
|
+
* <div>
|
|
174
|
+
* <DropdownDismiss>
|
|
175
|
+
* <button>Dismiss</button>
|
|
176
|
+
* </DropdownDismiss>
|
|
177
|
+
* <p>Dropdown Content</p>
|
|
178
|
+
* </div>
|
|
179
|
+
* </Dropdown>
|
|
180
|
+
* ```
|
|
181
|
+
*
|
|
182
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/core-components-dropdown--docs} for more details.
|
|
183
|
+
* @see {@link https://floating-ui.com/docs/react} for more details on Floating UI.
|
|
184
|
+
*/
|
|
156
185
|
var Dropdown = function Dropdown(props) {
|
|
157
186
|
return /*#__PURE__*/jsxRuntime.jsx(react.FloatingTree, {
|
|
158
187
|
children: /*#__PURE__*/jsxRuntime.jsx(DropdownElement, _objectSpread({}, props))
|
|
159
188
|
});
|
|
160
189
|
};
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* A component that allows dismissing the dropdown when clicked.
|
|
193
|
+
* It can be used inside the dropdown panel to provide a dismiss area.
|
|
194
|
+
* It supports an optional `dismiss` prop to control whether the dropdown should be dismissed on click.
|
|
195
|
+
*
|
|
196
|
+
* @param children - The children elements to render inside the dismiss area.
|
|
197
|
+
* @param dismiss - Whether to dismiss the dropdown on click (default: true).
|
|
198
|
+
* @returns JSX Element
|
|
199
|
+
*/
|
|
161
200
|
var DropdownDismiss = function DropdownDismiss(_ref3) {
|
|
162
201
|
var children = _ref3.children,
|
|
163
202
|
_ref3$dismiss = _ref3.dismiss,
|
|
@@ -8,18 +8,19 @@ var Icon = require('../icon/Icon.js');
|
|
|
8
8
|
var Dropdown = require('./Dropdown.js');
|
|
9
9
|
var jsxRuntime = require('react/jsx-runtime');
|
|
10
10
|
|
|
11
|
-
var _excluded = ["children", "className", "groupHover"];
|
|
11
|
+
var _excluded = ["children", "className", "groupHover", "icon"];
|
|
12
12
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13
13
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
14
14
|
var DropdownTool = function DropdownTool(_ref) {
|
|
15
15
|
var children = _ref.children,
|
|
16
16
|
className = _ref.className,
|
|
17
17
|
groupHover = _ref.groupHover,
|
|
18
|
+
icon = _ref.icon,
|
|
18
19
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
19
20
|
return /*#__PURE__*/jsxRuntime.jsxs(Dropdown.Dropdown, _objectSpread(_objectSpread({}, props), {}, {
|
|
20
21
|
children: [/*#__PURE__*/jsxRuntime.jsx(Icon.Icon, {
|
|
21
|
-
icon: icons.CoreIcons.caretDown,
|
|
22
|
-
className: classNames(
|
|
22
|
+
icon: icon !== null && icon !== void 0 ? icon : icons.CoreIcons.caretDown,
|
|
23
|
+
className: classNames("outline bg-tint-50/50 flex-content pointer-events-auto cursor-pointer", className, groupHover && "hidden group-hover/tool:inline-block data-[dropdown-open]:inline-block")
|
|
23
24
|
}), children]
|
|
24
25
|
}));
|
|
25
26
|
};
|
|
@@ -5,10 +5,11 @@ var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProp
|
|
|
5
5
|
var utilities = require('@react-fabric/utilities');
|
|
6
6
|
var classNames = require('classnames');
|
|
7
7
|
var react = require('react');
|
|
8
|
-
var Icon = require('../icon/Icon.js');
|
|
9
8
|
var jsxRuntime = require('react/jsx-runtime');
|
|
9
|
+
var getColor = require('../../utils/getColor.js');
|
|
10
|
+
var Icon = require('../icon/Icon.js');
|
|
10
11
|
|
|
11
|
-
var _excluded = ["children", "title", "message", "icon", "className", "size"];
|
|
12
|
+
var _excluded = ["children", "title", "message", "icon", "className", "size", "iconColor"];
|
|
12
13
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13
14
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
14
15
|
var SizeMap = {
|
|
@@ -48,6 +49,33 @@ var DefaultIcon = function DefaultIcon() {
|
|
|
48
49
|
})]
|
|
49
50
|
});
|
|
50
51
|
};
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* A component that displays a message and an optional icon when there is no content to show.
|
|
55
|
+
* It allows customization of title, message, icon, size, and additional CSS properties.
|
|
56
|
+
* It can also accept children elements for additional actions or information.
|
|
57
|
+
* This component is useful for displaying a friendly message when data is not available,
|
|
58
|
+
* such as in empty states of lists, tables, or other content areas.
|
|
59
|
+
*
|
|
60
|
+
* @param {EmptyContentProps} props - The properties for the EmptyContent component.
|
|
61
|
+
* @returns {JSX.Element} The rendered EmptyContent component.
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```jsx
|
|
65
|
+
* <EmptyContent
|
|
66
|
+
* title="No Data Available"
|
|
67
|
+
* message="Please check back later."
|
|
68
|
+
* icon="empty"
|
|
69
|
+
* iconColor="tint-700"
|
|
70
|
+
* size="md"
|
|
71
|
+
* >
|
|
72
|
+
* <Button onClick={() => console.log("Action clicked")}>Retry</Button>
|
|
73
|
+
* </EmptyContent>
|
|
74
|
+
* // Renders an empty content area with a title, message, icon, and a button for retrying the action.
|
|
75
|
+
* ```
|
|
76
|
+
*
|
|
77
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/core-components-emptycontent--docs} for more details.
|
|
78
|
+
*/
|
|
51
79
|
var EmptyContent = function EmptyContent(_ref) {
|
|
52
80
|
var children = _ref.children,
|
|
53
81
|
title = _ref.title,
|
|
@@ -55,6 +83,7 @@ var EmptyContent = function EmptyContent(_ref) {
|
|
|
55
83
|
icon = _ref.icon,
|
|
56
84
|
className = _ref.className,
|
|
57
85
|
size = _ref.size,
|
|
86
|
+
iconColor = _ref.iconColor,
|
|
58
87
|
test = _objectWithoutProperties(_ref, _excluded);
|
|
59
88
|
return /*#__PURE__*/jsxRuntime.jsxs("div", _objectSpread(_objectSpread({
|
|
60
89
|
className: classNames("p-6 flex flex-col items-center area-content", className),
|
|
@@ -65,18 +94,19 @@ var EmptyContent = function EmptyContent(_ref) {
|
|
|
65
94
|
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
66
95
|
className: "leading-none",
|
|
67
96
|
style: {
|
|
68
|
-
fontSize: "4em"
|
|
97
|
+
fontSize: "4em",
|
|
98
|
+
color: getColor.getColor(iconColor !== null && iconColor !== void 0 ? iconColor : "tint-700")
|
|
69
99
|
},
|
|
70
100
|
children: [utilities.isString(icon) && /*#__PURE__*/jsxRuntime.jsx(Icon.Icon, {
|
|
71
101
|
icon: icon
|
|
72
102
|
}), /*#__PURE__*/react.isValidElement(icon) && icon, !icon && /*#__PURE__*/jsxRuntime.jsx(DefaultIcon, {})]
|
|
73
|
-
}), title && /*#__PURE__*/jsxRuntime.jsx("
|
|
103
|
+
}), title && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
74
104
|
className: "font-medium text-center text-dimmed",
|
|
75
105
|
style: {
|
|
76
106
|
fontSize: "1.5em"
|
|
77
107
|
},
|
|
78
108
|
children: title
|
|
79
|
-
}), /*#__PURE__*/jsxRuntime.jsx("
|
|
109
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
80
110
|
className: "font-medium text-center text-muted",
|
|
81
111
|
style: {
|
|
82
112
|
fontSize: "0.875em"
|
|
@@ -4,12 +4,11 @@ var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
|
4
4
|
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
5
5
|
var utilities = require('@react-fabric/utilities');
|
|
6
6
|
var classNames = require('classnames');
|
|
7
|
-
var
|
|
8
|
-
var getColor = require('../../utils/getColor.js');
|
|
9
|
-
var Icon_module = require('./Icon.module.css');
|
|
7
|
+
var react = require('react');
|
|
10
8
|
var jsxRuntime = require('react/jsx-runtime');
|
|
9
|
+
var getColor = require('../../utils/getColor.js');
|
|
11
10
|
|
|
12
|
-
var _excluded = ["ref", "icon", "bg", "color", "size", "rtlFlip", "animate", "rounded", "viewBox", "className", "onClick"];
|
|
11
|
+
var _excluded = ["ref", "icon", "bg", "color", "size", "rtlFlip", "animate", "rounded", "disabled", "viewBox", "className", "onClick"];
|
|
13
12
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
14
13
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
15
14
|
var SvgTextSize = ["", ".875em", ".525em", ".35em", ".25em"];
|
|
@@ -22,7 +21,33 @@ var SizeMap = {
|
|
|
22
21
|
};
|
|
23
22
|
|
|
24
23
|
/**
|
|
25
|
-
*
|
|
24
|
+
* A versatile icon component that supports SVG paths, webfont icons, and text icons.
|
|
25
|
+
* It can be styled with background color, icon color, size, and animations.
|
|
26
|
+
* It also supports RTL flipping and rounded corners.
|
|
27
|
+
* The component can be used as a standalone icon or as part of other components.
|
|
28
|
+
* It accepts various properties to customize its appearance and behavior.
|
|
29
|
+
* These include `bg`, `color`, `size`, `rtlFlip`, `animate`, and `rounded`.
|
|
30
|
+
*
|
|
31
|
+
* @param {IconProps} props - The properties for the Icon component.
|
|
32
|
+
* @returns {JSX.Element} The rendered Icon component.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```jsx
|
|
36
|
+
* <Icon
|
|
37
|
+
* icon="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"
|
|
38
|
+
* bg="bg-blue-500"
|
|
39
|
+
* color="text-white"
|
|
40
|
+
* size="lg"
|
|
41
|
+
* rtlFlip={true}
|
|
42
|
+
* animate="spin"
|
|
43
|
+
* rounded={true}
|
|
44
|
+
* onClick={() => console.log("Icon clicked")}
|
|
45
|
+
* />
|
|
46
|
+
* // Renders an icon with a SVG path, blue background, white text color,
|
|
47
|
+
* // large size, RTL flip, spin animation, rounded corners, and a click handler.
|
|
48
|
+
* ```
|
|
49
|
+
*
|
|
50
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/core-components-icon--docs} for more details.
|
|
26
51
|
*/
|
|
27
52
|
var Icon = function Icon(_ref) {
|
|
28
53
|
var ref = _ref.ref,
|
|
@@ -34,13 +59,14 @@ var Icon = function Icon(_ref) {
|
|
|
34
59
|
rtlFlip = _ref.rtlFlip,
|
|
35
60
|
animate = _ref.animate,
|
|
36
61
|
rounded = _ref.rounded,
|
|
62
|
+
disabled = _ref.disabled,
|
|
37
63
|
_ref$viewBox = _ref.viewBox,
|
|
38
64
|
viewBox = _ref$viewBox === void 0 ? "0 0 24 24" : _ref$viewBox,
|
|
39
65
|
className = _ref.className,
|
|
40
66
|
onClick = _ref.onClick,
|
|
41
67
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
42
68
|
/** ***************** style map *******************/
|
|
43
|
-
var styles =
|
|
69
|
+
var styles = react.useMemo(function () {
|
|
44
70
|
var s = {};
|
|
45
71
|
if (bg) {
|
|
46
72
|
s.backgroundColor = getColor.getColor(bg);
|
|
@@ -55,16 +81,15 @@ var Icon = function Icon(_ref) {
|
|
|
55
81
|
s.fontSize = SizeMap[size];
|
|
56
82
|
}
|
|
57
83
|
return s;
|
|
58
|
-
}, [bg, color, size]
|
|
84
|
+
}, [bg, color, size]);
|
|
59
85
|
|
|
60
86
|
/** ***************** check if icon is svg path *******************/
|
|
61
|
-
var isSvg =
|
|
87
|
+
var isSvg = react.useMemo(function () {
|
|
62
88
|
return utilities.isSvgPath(icon);
|
|
63
|
-
}, [icon]
|
|
89
|
+
}, [icon]);
|
|
64
90
|
|
|
65
91
|
/** ***************** render icon *******************/
|
|
66
|
-
var iconEl =
|
|
67
|
-
var _SvgTextSize$icon$len;
|
|
92
|
+
var iconEl = react.useMemo(function () {
|
|
68
93
|
if (!utilities.isString(icon)) {
|
|
69
94
|
throw Error("Invalid icon expected string");
|
|
70
95
|
}
|
|
@@ -83,22 +108,25 @@ var Icon = function Icon(_ref) {
|
|
|
83
108
|
dominantBaseline: "middle",
|
|
84
109
|
textAnchor: "middle",
|
|
85
110
|
style: {
|
|
86
|
-
fontSize:
|
|
111
|
+
fontSize: SvgTextSize[icon.length]
|
|
87
112
|
},
|
|
88
113
|
children: icon
|
|
89
114
|
})
|
|
90
115
|
}) : /*#__PURE__*/jsxRuntime.jsx("i", {
|
|
91
116
|
className: "".concat(icon)
|
|
92
117
|
});
|
|
93
|
-
}, [icon, isSvg, viewBox]
|
|
94
|
-
return /*#__PURE__*/jsxRuntime.jsx("dfn", _objectSpread(_objectSpread({
|
|
95
|
-
ref:
|
|
118
|
+
}, [icon, isSvg, viewBox]);
|
|
119
|
+
return /*#__PURE__*/jsxRuntime.jsx("dfn", _objectSpread(_objectSpread({
|
|
120
|
+
"data-ref": "icon",
|
|
121
|
+
ref: ref
|
|
122
|
+
}, rest), {}, {
|
|
96
123
|
role: "presentation",
|
|
97
|
-
className: classNames(
|
|
124
|
+
className: classNames("fabric-icon", "select-none overflow-hidden box-content leading-none not-italic text-center", !rounded && "rounded", rounded && "rounded-full", animate && "animate-".concat(animate), !!onClick && disabled && "opacity-30 pointer-events-none", className),
|
|
98
125
|
onClick: onClick,
|
|
99
126
|
"data-flip": rtlFlip,
|
|
100
127
|
style: styles,
|
|
101
128
|
"data-clickable": !!onClick,
|
|
129
|
+
"data-inner-clickable": !!onClick,
|
|
102
130
|
children: iconEl
|
|
103
131
|
}));
|
|
104
132
|
};
|