@react-fabric/core 1.0.0-beta.5 → 1.0.0-beta.51
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} +6 -6
- 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 +3 -3
- package/dist/cjs/components/animations/Animations.js +29 -18
- package/dist/cjs/components/avatar/Avatar.js +10 -13
- package/dist/cjs/components/avatar/AvatarGroup.js +3 -3
- package/dist/cjs/components/badge/Badge.js +5 -5
- package/dist/cjs/components/breadcrumbs/Breadcrumbs.js +10 -8
- package/dist/cjs/components/button/Button.js +18 -14
- package/dist/cjs/components/button/ButtonGroup.js +4 -3
- package/dist/cjs/components/button/ConfirmButton.js +10 -3
- package/dist/cjs/components/button/ToggleButtonGroup.js +3 -3
- package/dist/cjs/components/callout/Callout.js +16 -4
- package/dist/cjs/components/card/Card.js +14 -10
- package/dist/cjs/components/card/CardCover.js +10 -5
- package/dist/cjs/components/card/FlipContent.js +35 -0
- package/dist/cjs/components/chip/Chip.js +11 -7
- package/dist/cjs/components/collapsable/Collapsable.js +6 -6
- package/dist/cjs/components/divider/Divider.js +11 -7
- package/dist/cjs/components/dropdown/Dropdown.js +6 -9
- package/dist/cjs/components/dropdown/DropdownTool.js +4 -3
- package/dist/cjs/components/empty/EmptyContent.js +8 -5
- package/dist/cjs/components/icon/Icon.js +17 -15
- package/dist/cjs/components/media/Media.js +116 -75
- package/dist/cjs/components/menu/ContextMenu.js +30 -10
- package/dist/cjs/components/menu/Menu.js +44 -21
- package/dist/cjs/components/menu/MenuItem.js +30 -16
- package/dist/cjs/components/meter/Meter.js +2 -3
- package/dist/cjs/components/navigator/Navigator.js +26 -13
- package/dist/cjs/components/panel/Panel.js +10 -9
- package/dist/cjs/components/panel/PanelGroup.js +1 -2
- package/dist/cjs/components/progress/ProgressBar.js +10 -9
- package/dist/cjs/components/progress/ProgressCircle.js +9 -7
- package/dist/cjs/components/tabpanel/Tab.js +58 -38
- package/dist/cjs/components/tabpanel/TabPanel.js +20 -16
- package/dist/cjs/context/Global.js +3 -0
- package/dist/cjs/context/NotificationCenter.js +3 -3
- package/dist/cjs/core/aside/Aside.js +11 -10
- package/dist/cjs/core/boundary/ErrorBoundary.js +6 -7
- package/dist/cjs/core/boundary/ErrorIcon.js +1 -2
- package/dist/cjs/core/content/Content.js +9 -7
- package/dist/cjs/core/headfoot/HeadFoot.js +2 -20
- package/dist/cjs/core/page/Page.js +16 -30
- package/dist/cjs/core/responsive/Responsive.js +5 -5
- package/dist/cjs/core/section/Section.js +1 -2
- package/dist/cjs/core/theme/ThemeProvider.js +11 -9
- package/dist/cjs/core/viewport/Viewport.js +4 -2
- package/dist/cjs/hooks/useDebounce.js +1 -1
- package/dist/cjs/hooks/useEffectDebugger.js +2 -2
- package/dist/cjs/hooks/useNavigator.js +6 -4
- package/dist/cjs/hooks/useResizeObserver.js +1 -1
- 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 +6 -1
- package/dist/cjs/typography/Abbr.js +4 -5
- package/dist/cjs/typography/{Link.js → Anchor.js} +5 -4
- package/dist/cjs/typography/Mark.js +2 -3
- package/dist/cjs/typography/Text.js +3 -4
- package/dist/cjs/typography/Title.js +3 -3
- package/dist/cjs/utils/cloneElement.js +47 -0
- package/dist/cjs/utils/getColor.js +1 -18
- package/dist/esm/components/actionLabel/ActionLabel.js +3 -3
- package/dist/esm/components/animations/Animations.js +30 -19
- package/dist/esm/components/avatar/Avatar.js +11 -14
- package/dist/esm/components/avatar/AvatarGroup.js +3 -3
- package/dist/esm/components/badge/Badge.js +5 -5
- package/dist/esm/components/breadcrumbs/Breadcrumbs.js +10 -8
- package/dist/esm/components/button/Button.js +18 -14
- package/dist/esm/components/button/ButtonGroup.js +5 -4
- package/dist/esm/components/button/ConfirmButton.js +10 -3
- package/dist/esm/components/button/ToggleButtonGroup.js +4 -4
- package/dist/esm/components/callout/Callout.js +16 -4
- package/dist/esm/components/card/Card.js +15 -11
- package/dist/esm/components/card/CardCover.js +10 -5
- package/dist/esm/components/card/FlipContent.js +35 -0
- package/dist/esm/components/chip/Chip.js +12 -8
- package/dist/esm/components/collapsable/Collapsable.js +6 -6
- package/dist/esm/components/divider/Divider.js +12 -8
- package/dist/esm/components/dropdown/Dropdown.js +6 -9
- package/dist/esm/components/dropdown/DropdownTool.js +4 -3
- package/dist/esm/components/empty/EmptyContent.js +8 -5
- package/dist/esm/components/icon/Icon.js +17 -15
- package/dist/esm/components/media/Media.js +117 -76
- package/dist/esm/components/menu/ContextMenu.js +32 -12
- package/dist/esm/components/menu/Menu.js +46 -23
- package/dist/esm/components/menu/MenuItem.js +24 -10
- package/dist/esm/components/meter/Meter.js +2 -3
- package/dist/esm/components/navigator/Navigator.js +26 -13
- package/dist/esm/components/panel/Panel.js +10 -9
- package/dist/esm/components/panel/PanelGroup.js +1 -2
- package/dist/esm/components/progress/ProgressBar.js +10 -9
- package/dist/esm/components/progress/ProgressCircle.js +9 -7
- package/dist/esm/components/tabpanel/Tab.js +59 -39
- package/dist/esm/components/tabpanel/TabPanel.js +20 -16
- package/dist/esm/context/Global.js +3 -0
- package/dist/esm/context/NotificationCenter.js +3 -3
- package/dist/esm/core/aside/Aside.js +11 -10
- package/dist/esm/core/boundary/ErrorBoundary.js +6 -7
- package/dist/esm/core/boundary/ErrorIcon.js +1 -2
- package/dist/esm/core/content/Content.js +9 -7
- package/dist/esm/core/headfoot/HeadFoot.js +2 -20
- package/dist/esm/core/page/Page.js +16 -30
- package/dist/esm/core/responsive/Responsive.js +5 -5
- package/dist/esm/core/section/Section.js +1 -2
- package/dist/esm/core/theme/ThemeProvider.js +11 -9
- package/dist/esm/core/viewport/Viewport.js +4 -2
- package/dist/esm/hooks/useDebounce.js +1 -1
- package/dist/esm/hooks/useEffectDebugger.js +2 -2
- package/dist/esm/hooks/useNavigator.js +7 -5
- package/dist/esm/hooks/useResizeObserver.js +1 -1
- 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 +6 -1
- package/dist/esm/typography/Abbr.js +4 -5
- package/dist/esm/typography/{Link.js → Anchor.js} +6 -5
- package/dist/esm/typography/Mark.js +2 -3
- package/dist/esm/typography/Text.js +4 -5
- package/dist/esm/typography/Title.js +4 -4
- package/dist/esm/utils/cloneElement.js +47 -0
- package/dist/esm/utils/getColor.js +2 -16
- package/dist/types/components/actionLabel/ActionLabel.d.ts +2 -2
- package/dist/types/components/animations/Animations.d.ts +5 -5
- package/dist/types/components/avatar/Avatar.d.ts +3 -3
- package/dist/types/components/badge/Badge.d.ts +5 -1
- package/dist/types/components/breadcrumbs/Breadcrumbs.d.ts +2 -2
- package/dist/types/components/button/Button.d.ts +7 -5
- package/dist/types/components/button/ButtonGroup.d.ts +2 -2
- package/dist/types/components/button/ConfirmButton.d.ts +6 -1
- package/dist/types/components/callout/Callout.d.ts +4 -3
- package/dist/types/components/card/Card.d.ts +8 -4
- package/dist/types/components/card/FlipContent.d.ts +7 -0
- package/dist/types/components/chip/Chip.d.ts +3 -3
- package/dist/types/components/collapsable/Collapsable.d.ts +7 -3
- package/dist/types/components/divider/Divider.d.ts +11 -7
- package/dist/types/components/dropdown/DropdownTool.d.ts +2 -1
- package/dist/types/components/empty/EmptyContent.d.ts +6 -2
- package/dist/types/components/icon/Icon.d.ts +5 -4
- package/dist/types/components/index.d.ts +2 -1
- package/dist/types/components/media/Media.d.ts +2 -2
- package/dist/types/components/menu/ContextMenu.d.ts +2 -1
- package/dist/types/components/menu/MenuItem.d.ts +1 -1
- package/dist/types/components/menu/types.d.ts +3 -2
- package/dist/types/components/navigator/Navigator.d.ts +7 -4
- package/dist/types/components/panel/Panel.d.ts +0 -1
- package/dist/types/components/progress/ProgressBar.d.ts +3 -3
- package/dist/types/components/progress/ProgressCircle.d.ts +3 -3
- package/dist/types/components/tabpanel/Tab.d.ts +5 -5
- package/dist/types/components/tabpanel/TabPanel.d.ts +10 -1
- package/dist/types/core/boundary/ErrorBoundary.d.ts +1 -1
- package/dist/types/core/content/Content.d.ts +3 -2
- package/dist/types/core/headfoot/HeadFoot.d.ts +1 -9
- package/dist/types/core/page/Page.d.ts +3 -3
- package/dist/types/core/responsive/Responsive.d.ts +6 -2
- package/dist/types/core/theme/ThemeProvider.d.ts +4 -4
- package/dist/types/hooks/useOverlayService.d.ts +3 -5
- package/dist/types/hooks/useResize.d.ts +1 -1
- package/dist/types/hooks/useResizeObserver.d.ts +1 -1
- 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 +6 -1
- package/dist/types/types/index.d.ts +26 -6
- package/dist/types/typography/Abbr.d.ts +6 -3
- package/dist/types/typography/Anchor.d.ts +25 -0
- package/dist/types/typography/Mark.d.ts +2 -3
- 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 +15 -6
- package/src/components/animations/Animations.tsx +29 -23
- package/src/components/avatar/Avatar.tsx +74 -88
- package/src/components/avatar/AvatarGroup.tsx +4 -4
- package/src/components/badge/Badge.tsx +11 -7
- package/src/components/breadcrumbs/Breadcrumbs.tsx +13 -9
- package/src/components/button/Button.tsx +27 -22
- package/src/components/button/ButtonGroup.tsx +7 -7
- package/src/components/button/ConfirmButton.tsx +19 -6
- package/src/components/button/ToggleButtonGroup.tsx +5 -5
- package/src/components/callout/Callout.tsx +28 -12
- package/src/components/card/Card.tsx +30 -15
- package/src/components/card/CardCover.tsx +11 -6
- package/src/components/card/FlipContent.tsx +69 -0
- package/src/components/chip/Chip.tsx +19 -13
- package/src/components/collapsable/Collapsable.tsx +12 -7
- package/src/components/divider/Divider.tsx +23 -16
- package/src/components/dropdown/Dropdown.tsx +6 -11
- package/src/components/dropdown/DropdownTool.tsx +5 -3
- package/src/components/empty/EmptyContent.tsx +21 -6
- package/src/components/icon/Icon.tsx +58 -67
- package/src/components/index.ts +2 -1
- package/src/components/media/Media.tsx +141 -106
- package/src/components/menu/ContextMenu.tsx +36 -11
- package/src/components/menu/Menu.tsx +56 -30
- package/src/components/menu/MenuItem.tsx +19 -9
- package/src/components/menu/types.ts +3 -2
- package/src/components/meter/Meter.tsx +2 -3
- package/src/components/navigator/Navigator.tsx +36 -7
- package/src/components/panel/Panel.tsx +10 -9
- package/src/components/panel/PanelGroup.tsx +1 -2
- package/src/components/progress/ProgressBar.tsx +13 -14
- package/src/components/progress/ProgressCircle.tsx +10 -13
- package/src/components/tabpanel/Tab.tsx +81 -64
- package/src/components/tabpanel/TabPanel.tsx +34 -12
- package/src/context/Global.tsx +4 -0
- package/src/context/NotificationCenter.tsx +3 -3
- package/src/core/aside/Aside.tsx +11 -10
- package/src/core/boundary/ErrorBoundary.tsx +8 -7
- package/src/core/boundary/ErrorIcon.tsx +1 -2
- package/src/core/content/Content.tsx +17 -12
- package/src/core/headfoot/HeadFoot.tsx +2 -35
- package/src/core/page/Page.tsx +18 -5
- package/src/core/responsive/Responsive.tsx +14 -7
- package/src/core/section/Section.tsx +1 -2
- package/src/core/theme/ThemeProvider.tsx +14 -13
- package/src/core/viewport/Viewport.tsx +1 -2
- package/src/hooks/useDebounce.ts +1 -1
- package/src/hooks/useEffectDebugger.ts +1 -2
- package/src/hooks/useNavigator.tsx +10 -5
- package/src/hooks/useOverlayService.tsx +12 -6
- package/src/hooks/useResize.ts +1 -1
- package/src/hooks/useResizeObserver.ts +13 -9
- 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 +13 -2
- package/src/types/index.ts +268 -27
- package/src/typography/Abbr.tsx +16 -10
- package/src/typography/{Link.tsx → Anchor.tsx} +8 -13
- package/src/typography/Mark.tsx +4 -9
- package/src/typography/Text.tsx +4 -12
- package/src/typography/Title.tsx +2 -6
- 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
|
@@ -6,11 +6,9 @@ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProper
|
|
|
6
6
|
import { isSvgPath } from '@react-fabric/utilities';
|
|
7
7
|
import BoringAvatar from 'boring-avatars';
|
|
8
8
|
import classNames from 'classnames';
|
|
9
|
-
import { useState } from 'react';
|
|
10
|
-
import { useMemoDebugger } from '../../hooks/useEffectDebugger.js';
|
|
11
|
-
import { getColor, getBgClass, getColorClass } from '../../utils/getColor.js';
|
|
12
|
-
import classes from './Avatar.module.css';
|
|
9
|
+
import { useState, useMemo } from 'react';
|
|
13
10
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
11
|
+
import { getColor } from '../../utils/getColor.js';
|
|
14
12
|
|
|
15
13
|
var _excluded = ["ref", "name", "avatar", "fallbackIcon", "bg", "color", "size", "rounded", "variant", "className", "viewBox", "onClick"];
|
|
16
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; }
|
|
@@ -49,7 +47,7 @@ var Avatar = function Avatar(_ref) {
|
|
|
49
47
|
setFallback = _useState2[1];
|
|
50
48
|
|
|
51
49
|
/** ***************** style map *******************/
|
|
52
|
-
var styles =
|
|
50
|
+
var styles = useMemo(function () {
|
|
53
51
|
var s = {};
|
|
54
52
|
if (bg) {
|
|
55
53
|
s.backgroundColor = getColor(bg);
|
|
@@ -64,15 +62,15 @@ var Avatar = function Avatar(_ref) {
|
|
|
64
62
|
s.fontSize = SizeMap[size];
|
|
65
63
|
}
|
|
66
64
|
return s;
|
|
67
|
-
}, [bg, color, size]
|
|
65
|
+
}, [bg, color, size]);
|
|
68
66
|
|
|
69
67
|
/** ***************** render icon *******************/
|
|
70
|
-
var avatarImage =
|
|
68
|
+
var avatarImage = useMemo(function () {
|
|
71
69
|
setFallback(!avatar);
|
|
72
70
|
return avatar && /*#__PURE__*/jsxs("div", {
|
|
73
71
|
className: "contents",
|
|
74
72
|
children: [/*#__PURE__*/jsx("div", {
|
|
75
|
-
className: classNames(
|
|
73
|
+
className: classNames("fabric-imgPlaceholder", "absolute inset-0 bg-gray animate-pulse")
|
|
76
74
|
}), /*#__PURE__*/jsx("img", {
|
|
77
75
|
src: avatar,
|
|
78
76
|
alt: avatar,
|
|
@@ -86,8 +84,8 @@ var Avatar = function Avatar(_ref) {
|
|
|
86
84
|
}
|
|
87
85
|
})]
|
|
88
86
|
});
|
|
89
|
-
}, [avatar]
|
|
90
|
-
var fallbackAvatar =
|
|
87
|
+
}, [avatar]);
|
|
88
|
+
var fallbackAvatar = useMemo(function () {
|
|
91
89
|
if (fallbackIcon) {
|
|
92
90
|
return isSvgPath(fallbackIcon) ? /*#__PURE__*/jsx("svg", {
|
|
93
91
|
viewBox: viewBox,
|
|
@@ -100,8 +98,7 @@ var Avatar = function Avatar(_ref) {
|
|
|
100
98
|
});
|
|
101
99
|
}
|
|
102
100
|
if (variant === "text") {
|
|
103
|
-
var
|
|
104
|
-
var _ref2 = (_name$match = name.match(/(?=(\w).* (\w).*)|(?=(\w\w).*)/)) !== null && _name$match !== void 0 ? _name$match : [],
|
|
101
|
+
var _ref2 = name.match(/(?=(\w).* (\w).*)|(?=(\w\w).*)/),
|
|
105
102
|
_ref3 = _slicedToArray(_ref2, 4),
|
|
106
103
|
first = _ref3[1],
|
|
107
104
|
second = _ref3[2],
|
|
@@ -128,10 +125,10 @@ var Avatar = function Avatar(_ref) {
|
|
|
128
125
|
variant: variant,
|
|
129
126
|
name: name
|
|
130
127
|
});
|
|
131
|
-
}, [name, variant, fallbackIcon]
|
|
128
|
+
}, [name, variant, fallbackIcon]);
|
|
132
129
|
return /*#__PURE__*/jsxs("dfn", _objectSpread(_objectSpread({
|
|
133
130
|
role: "presentation",
|
|
134
|
-
className: classNames(
|
|
131
|
+
className: classNames("fabric-avatar", className, "select-none relative overflow-hidden inline-block box-content leading-none not-italic text-center", !rounded && "rounded", rounded && "rounded-full"),
|
|
135
132
|
onClick: onClick,
|
|
136
133
|
style: styles,
|
|
137
134
|
"data-clickable": !!onClick,
|
|
@@ -5,7 +5,6 @@ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProper
|
|
|
5
5
|
import classNames from 'classnames';
|
|
6
6
|
import { useMemo, Children } from 'react';
|
|
7
7
|
import { useMemoDebugger } from '../../hooks/useEffectDebugger.js';
|
|
8
|
-
import classes from './Avatar.module.css';
|
|
9
8
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
10
9
|
|
|
11
10
|
var _excluded = ["ref", "children", "className", "totalCount", "rounded", "size"];
|
|
@@ -49,10 +48,11 @@ var AvatarGroup = function AvatarGroup(_ref) {
|
|
|
49
48
|
}, [avatars, totalCount]);
|
|
50
49
|
return /*#__PURE__*/jsxs("div", _objectSpread(_objectSpread({}, aria), {}, {
|
|
51
50
|
ref: ref,
|
|
52
|
-
className: classNames(
|
|
51
|
+
className: classNames("fabric-avatarGroup", className, "inline-flex flex-nowrap", !rounded && "rounded", rounded && "rounded-full"),
|
|
53
52
|
style: styles,
|
|
54
53
|
children: [avatars, !!diff && /*#__PURE__*/jsx("dfn", {
|
|
55
|
-
|
|
54
|
+
"data-ref": "avatarCount",
|
|
55
|
+
className: classNames("fabric-avatar", "select-none relative overflow-hidden inline-block box-content leading-none not-italic text-center", "fabric-avatarGroup--extra"),
|
|
56
56
|
children: /*#__PURE__*/jsx("svg", {
|
|
57
57
|
children: /*#__PURE__*/jsx("text", {
|
|
58
58
|
x: "50%",
|
|
@@ -6,10 +6,9 @@ import { isObject, isNil, isNumber, mergeRefs } from '@react-fabric/utilities';
|
|
|
6
6
|
import classNames from 'classnames';
|
|
7
7
|
import { useMemo, cloneElement } from 'react';
|
|
8
8
|
import { Icon } from '../icon/Icon.js';
|
|
9
|
-
import classes from './Badge.module.css';
|
|
10
9
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
11
10
|
|
|
12
|
-
var _excluded = ["ref", "className", "value", "max", "ping", "block", "placement", "children", "forButton", "icon", "iconBg", "iconColor", "rtlFlip"];
|
|
11
|
+
var _excluded = ["ref", "className", "value", "max", "ping", "block", "inline", "placement", "children", "forButton", "icon", "iconBg", "iconColor", "rtlFlip"];
|
|
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 getBadgeProps = function getBadgeProps(badge) {
|
|
@@ -33,6 +32,7 @@ var Badge = function Badge(_ref) {
|
|
|
33
32
|
max = _ref.max,
|
|
34
33
|
ping = _ref.ping,
|
|
35
34
|
block = _ref.block,
|
|
35
|
+
inline = _ref.inline,
|
|
36
36
|
_ref$placement = _ref.placement,
|
|
37
37
|
placement = _ref$placement === void 0 ? "top-end" : _ref$placement,
|
|
38
38
|
children = _ref.children,
|
|
@@ -59,14 +59,14 @@ var Badge = function Badge(_ref) {
|
|
|
59
59
|
* wrap children in a relative div to float badge, wrapper allows for floating a badge on elements with overflow hidden
|
|
60
60
|
*/
|
|
61
61
|
return /*#__PURE__*/jsxs("div", {
|
|
62
|
-
className: classNames(forButton ? "contents" :
|
|
62
|
+
className: classNames(forButton || inline ? "contents" : block ? "block" : "inline-block", forButton || inline ? "" : "relative"),
|
|
63
63
|
children: [children && /*#__PURE__*/cloneElement(children, _objectSpread(_objectSpread({}, rest), {}, {
|
|
64
64
|
ref: innerRef
|
|
65
|
-
})), (!!ping || label) && /*#__PURE__*/jsxs("div", {
|
|
65
|
+
})), (!!ping || (label !== null && label !== void 0 ? label : icon)) && /*#__PURE__*/jsxs("div", {
|
|
66
66
|
"data-ref": "badge",
|
|
67
67
|
"data-ping": ping,
|
|
68
68
|
"data-placement": placement,
|
|
69
|
-
className: classNames(
|
|
69
|
+
className: classNames("fabric-badge", className, "inline-block p-px min-w-2 min-h-2 text-center select-none rounded-full leading-none z-2 pointer-events-none", forButton && !placement || inline ? "relative" : "absolute"),
|
|
70
70
|
children: [label && /*#__PURE__*/jsx("span", {
|
|
71
71
|
className: "p-1",
|
|
72
72
|
children: label
|
|
@@ -5,9 +5,8 @@ import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
|
5
5
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
6
6
|
import classNames from 'classnames';
|
|
7
7
|
import { useMemo, Children } from 'react';
|
|
8
|
-
import {
|
|
8
|
+
import { Anchor } from '../../typography/Anchor.js';
|
|
9
9
|
import { Dropdown } from '../dropdown/Dropdown.js';
|
|
10
|
-
import classes from './Breadcrumbs.module.css';
|
|
11
10
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
12
11
|
|
|
13
12
|
var _excluded = ["variant", "className", "separator", "children", "color"];
|
|
@@ -34,13 +33,14 @@ var Breadcrumbs = function Breadcrumbs(_ref) {
|
|
|
34
33
|
overflow = _useMemo2[1],
|
|
35
34
|
end = _useMemo2[2];
|
|
36
35
|
return /*#__PURE__*/jsxs("nav", _objectSpread(_objectSpread({
|
|
36
|
+
"data-ref": "breadcrumbs",
|
|
37
37
|
"data-color": color,
|
|
38
38
|
"data-variant": variant,
|
|
39
|
-
className: classNames(
|
|
39
|
+
className: classNames("fabric-breadcrumbs", className, "flex flex-nowrap items-center")
|
|
40
40
|
}, aria), {}, {
|
|
41
41
|
children: [start.map(function (link, idx) {
|
|
42
42
|
return /*#__PURE__*/jsx("li", {
|
|
43
|
-
className:
|
|
43
|
+
className: "fabric-breadcrumbLink",
|
|
44
44
|
"data-separator": separator,
|
|
45
45
|
children: link
|
|
46
46
|
}, idx);
|
|
@@ -48,19 +48,21 @@ var Breadcrumbs = function Breadcrumbs(_ref) {
|
|
|
48
48
|
closeOnClick: true,
|
|
49
49
|
showArrow: true,
|
|
50
50
|
children: [/*#__PURE__*/jsx("li", {
|
|
51
|
-
className:
|
|
51
|
+
className: "fabric-breadcrumbLink",
|
|
52
52
|
"data-separator": separator,
|
|
53
|
-
|
|
53
|
+
"data-ref": "breadcrumbOverflow",
|
|
54
|
+
children: /*#__PURE__*/jsx(Anchor, {
|
|
55
|
+
"data-": true,
|
|
54
56
|
children: "..."
|
|
55
57
|
})
|
|
56
58
|
}), /*#__PURE__*/jsx("div", {
|
|
57
59
|
"data-color": color,
|
|
58
|
-
className: classNames(
|
|
60
|
+
className: classNames("fabric-breadcrumbOverflow", "flex flex-col"),
|
|
59
61
|
children: overflow
|
|
60
62
|
})]
|
|
61
63
|
}), end === null || end === void 0 ? void 0 : end.map(function (link, idx) {
|
|
62
64
|
return /*#__PURE__*/jsx("li", {
|
|
63
|
-
className:
|
|
65
|
+
className: "fabric-breadcrumbLink",
|
|
64
66
|
"data-separator": separator,
|
|
65
67
|
children: link
|
|
66
68
|
}, idx);
|
|
@@ -10,11 +10,11 @@ import { useEffectDebugger } from '../../hooks/useEffectDebugger.js';
|
|
|
10
10
|
import { HotKey } from '../../hotkeys/HotKey.js';
|
|
11
11
|
import { HotKeyLabel } from '../../hotkeys/HotKeyLabel.js';
|
|
12
12
|
import { Tooltip } from '../../overlays/tooltip/Tooltip.js';
|
|
13
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
14
|
+
import { getColor } from '../../utils/getColor.js';
|
|
13
15
|
import { AnimationIndicator } from '../animations/Animations.js';
|
|
14
16
|
import { getBadgeProps, Badge } from '../badge/Badge.js';
|
|
15
17
|
import { Icon } from '../icon/Icon.js';
|
|
16
|
-
import classes from './Button.module.css';
|
|
17
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
18
18
|
|
|
19
19
|
var _excluded = ["as", "ref", "children", "className", "active", "color", "icon", "iconBg", "iconColor", "iconAlign", "altIcon", "rtlFlip", "rounded", "size", "disabled", "loading", "variant", "badge", "fullWidth", "spinOnHover", "onClick", "actionMessage", "stopPropagation", "type", "hotKey", "showActionDone", "showActionDoneEvent", "tabIndex", "data-ref"];
|
|
20
20
|
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; }
|
|
@@ -101,7 +101,7 @@ var Button = function Button(_ref) {
|
|
|
101
101
|
return {
|
|
102
102
|
content: actionMessage,
|
|
103
103
|
placement: "top",
|
|
104
|
-
color: color,
|
|
104
|
+
color: "".concat(color, "-100"),
|
|
105
105
|
open: true
|
|
106
106
|
};
|
|
107
107
|
}
|
|
@@ -109,24 +109,25 @@ var Button = function Button(_ref) {
|
|
|
109
109
|
var badgeProps = useMemo(function () {
|
|
110
110
|
return getBadgeProps(badge);
|
|
111
111
|
}, [badge]);
|
|
112
|
+
var hotKeyHandler = useRef(function () {
|
|
113
|
+
var _refEl$current;
|
|
114
|
+
!disabled && ((_refEl$current = refEl.current) === null || _refEl$current === void 0 ? void 0 : _refEl$current.click());
|
|
115
|
+
});
|
|
112
116
|
var E = as !== null && as !== void 0 ? as : "button";
|
|
113
117
|
return /*#__PURE__*/jsxs("div", {
|
|
114
|
-
className: classNames(
|
|
118
|
+
className: classNames("fabric-buttonWrapper", className, "relative align-text-top select-none focus-within:z-1", fullWidth ? "block w-full" : "inline-block"),
|
|
115
119
|
"data-ref": dataRef !== null && dataRef !== void 0 ? dataRef : "button",
|
|
116
120
|
"data-size": size,
|
|
117
121
|
"data-loading": busy || loading,
|
|
118
122
|
"data-disabled": disabled,
|
|
119
123
|
children: [hotKey && /*#__PURE__*/jsx(HotKey, {
|
|
120
124
|
keyCombo: hotKey,
|
|
121
|
-
handler:
|
|
122
|
-
var _refEl$current;
|
|
123
|
-
return !disabled && ((_refEl$current = refEl.current) === null || _refEl$current === void 0 ? void 0 : _refEl$current.click());
|
|
124
|
-
}
|
|
125
|
+
handler: hotKeyHandler.current
|
|
125
126
|
}), /*#__PURE__*/jsx(TooltipWrapper, _objectSpread(_objectSpread({}, tooltipProps), {}, {
|
|
126
127
|
children: /*#__PURE__*/jsxs(E, _objectSpread(_objectSpread({
|
|
127
128
|
ref: mergeRefs(ref, refEl),
|
|
128
129
|
role: "button",
|
|
129
|
-
className: classNames(
|
|
130
|
+
className: classNames("fabric-button", "pointer-events-auto cursor-pointer select-none flex flex-nowrap w-full h-full items-center border-0 -outline-offset-1 justify-center max-w-72 p-0 font-sans font-medium appearance-none", "focus-visible:ring-2 focus-visible:ring-offset-2 buttonInner", fullWidth && "max-w-full w-full", rounded && "rounded-full", spinOnHover && "fabric-spinOnHover"),
|
|
130
131
|
type: type,
|
|
131
132
|
disabled: disabled,
|
|
132
133
|
tabIndex: tabIndex,
|
|
@@ -137,29 +138,32 @@ var Button = function Button(_ref) {
|
|
|
137
138
|
"data-variant": variant
|
|
138
139
|
}, aria), {}, {
|
|
139
140
|
children: [icon && /*#__PURE__*/jsx(Icon, {
|
|
140
|
-
className:
|
|
141
|
+
className: "fabric-buttonIcon",
|
|
141
142
|
icon: icon,
|
|
142
143
|
bg: iconBg,
|
|
143
144
|
color: iconColor,
|
|
144
145
|
rtlFlip: rtlFlip,
|
|
145
146
|
"data-align": iconAlign
|
|
146
147
|
}), /*#__PURE__*/isValidElement(children) && /*#__PURE__*/jsx("div", {
|
|
147
|
-
className:
|
|
148
|
+
className: "fabric-buttonChild",
|
|
148
149
|
children: children
|
|
149
150
|
}), isString(children) && /*#__PURE__*/jsx("label", {
|
|
150
|
-
className: classNames(
|
|
151
|
+
className: classNames("fabric-buttonLabel", "truncate"),
|
|
151
152
|
"data-colored-icon": !!iconBg,
|
|
152
153
|
children: children
|
|
153
154
|
}), !isNil(badge) && /*#__PURE__*/jsx(Badge, _objectSpread({}, badgeProps)), hotKey && /*#__PURE__*/jsx(HotKeyLabel, {
|
|
154
155
|
keyCombo: hotKey
|
|
155
156
|
}), altIcon && /*#__PURE__*/jsx(Icon, {
|
|
156
|
-
className:
|
|
157
|
+
className: "fabric-altIcon",
|
|
157
158
|
icon: altIcon,
|
|
158
159
|
rtlFlip: true
|
|
159
160
|
})]
|
|
160
161
|
}))
|
|
161
162
|
})), actionDone && /*#__PURE__*/jsx("div", {
|
|
162
|
-
className: classNames("absolute inset-0 overflow-hidden flex justify-center items-center",
|
|
163
|
+
className: classNames("absolute inset-0 overflow-hidden flex justify-center items-center", rounded ? "rounded-full" : "rounded"),
|
|
164
|
+
style: {
|
|
165
|
+
backgroundColor: getColor("".concat(color, "-300"))
|
|
166
|
+
},
|
|
163
167
|
children: /*#__PURE__*/jsx(AnimationIndicator, {
|
|
164
168
|
type: "check",
|
|
165
169
|
color: color
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
4
4
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
5
5
|
import classNames from 'classnames';
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
6
|
+
import { cloneElement } from 'react';
|
|
7
|
+
import { cloneChildren } from '../../utils/cloneElement.js';
|
|
8
|
+
import '@react-fabric/utilities';
|
|
8
9
|
import { jsx } from 'react/jsx-runtime';
|
|
9
10
|
|
|
10
11
|
var _excluded = ["vertical", "className", "children", "variant", "rounded", "disabled", "fullWidth", "color", "size"];
|
|
@@ -23,9 +24,9 @@ var ButtonGroup = function ButtonGroup(_ref) {
|
|
|
23
24
|
aria = _objectWithoutProperties(_ref, _excluded);
|
|
24
25
|
return /*#__PURE__*/jsx("div", _objectSpread(_objectSpread({
|
|
25
26
|
"data-ref": "buttonGroup",
|
|
26
|
-
className: classNames(
|
|
27
|
+
className: classNames("fabric-buttonGroup", className, fullWidth ? "flex" : "inline-flex", "flex-nowrap align-middle rounded", vertical && "vertical", vertical && "flex-col items-stretch")
|
|
27
28
|
}, aria), {}, {
|
|
28
|
-
children:
|
|
29
|
+
children: cloneChildren(children, function (child) {
|
|
29
30
|
return /*#__PURE__*/cloneElement(child, _objectSpread({
|
|
30
31
|
color: color,
|
|
31
32
|
size: size,
|
|
@@ -11,7 +11,7 @@ import { useTranslation } from 'react-i18next';
|
|
|
11
11
|
import { Button } from './Button.js';
|
|
12
12
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
13
13
|
|
|
14
|
-
var _excluded = ["ref", "message", "color", "okLabel", "cancelLabel", "onClick", "loading", "actionMessage", "showActionDone", "showActionDoneEvent"],
|
|
14
|
+
var _excluded = ["ref", "message", "color", "okLabel", "cancelLabel", "onClick", "loading", "placement", "actionMessage", "showActionDone", "showActionDoneEvent"],
|
|
15
15
|
_excluded2 = ["ref"];
|
|
16
16
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
17
17
|
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; }
|
|
@@ -26,6 +26,8 @@ var ConfirmButton = function ConfirmButton(_ref) {
|
|
|
26
26
|
cancelLabel = _ref.cancelLabel,
|
|
27
27
|
onClick = _ref.onClick,
|
|
28
28
|
loading = _ref.loading,
|
|
29
|
+
_ref$placement = _ref.placement,
|
|
30
|
+
placement = _ref$placement === void 0 ? "bottom" : _ref$placement,
|
|
29
31
|
actionMessage = _ref.actionMessage,
|
|
30
32
|
showActionDone = _ref.showActionDone,
|
|
31
33
|
_ref$showActionDoneEv = _ref.showActionDoneEvent,
|
|
@@ -77,7 +79,7 @@ var ConfirmButton = function ConfirmButton(_ref) {
|
|
|
77
79
|
}
|
|
78
80
|
},
|
|
79
81
|
strategy: "fixed",
|
|
80
|
-
placement:
|
|
82
|
+
placement: placement,
|
|
81
83
|
whileElementsMounted: autoUpdate,
|
|
82
84
|
middleware: [shift({
|
|
83
85
|
padding: 8
|
|
@@ -123,18 +125,22 @@ var ConfirmButton = function ConfirmButton(_ref) {
|
|
|
123
125
|
"data-color": color,
|
|
124
126
|
className: classNames("select-none not-italic rounded-capped shadow-lg outline outline-muted bg-base"),
|
|
125
127
|
ref: refs.setFloating,
|
|
126
|
-
style:
|
|
128
|
+
style: _objectSpread({
|
|
129
|
+
zIndex: "var(--z-popover)"
|
|
130
|
+
}, floatingStyles)
|
|
127
131
|
}, getFloatingProps()), {}, {
|
|
128
132
|
children: [/*#__PURE__*/jsxs("div", {
|
|
129
133
|
className: "font-medium ",
|
|
130
134
|
children: [/*#__PURE__*/jsx("p", {
|
|
131
135
|
className: "py-2 px-4",
|
|
136
|
+
"data-ref": "confirmMessage",
|
|
132
137
|
children: message
|
|
133
138
|
}), /*#__PURE__*/jsxs("div", {
|
|
134
139
|
className: "flex justify-end py-2 px-4 gap-2",
|
|
135
140
|
children: [/*#__PURE__*/jsx(Button, {
|
|
136
141
|
size: "sm",
|
|
137
142
|
variant: "link",
|
|
143
|
+
"data-ref": "confirmCancel",
|
|
138
144
|
color: color,
|
|
139
145
|
onClick: function onClick() {
|
|
140
146
|
return [clickHandler(false), setIsOpen(false)];
|
|
@@ -145,6 +151,7 @@ var ConfirmButton = function ConfirmButton(_ref) {
|
|
|
145
151
|
variant: "solid",
|
|
146
152
|
color: color,
|
|
147
153
|
autoFocus: true,
|
|
154
|
+
"data-ref": "confirmOk",
|
|
148
155
|
onClick: function onClick() {
|
|
149
156
|
return [clickHandler(true), setIsOpen(false)];
|
|
150
157
|
},
|
|
@@ -5,9 +5,9 @@ import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
|
5
5
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
6
6
|
import { isArray, EMPTY_ARRAY } from '@react-fabric/utilities';
|
|
7
7
|
import classNames from 'classnames';
|
|
8
|
-
import { useMemo, useCallback,
|
|
8
|
+
import { useMemo, useCallback, cloneElement } from 'react';
|
|
9
9
|
import { useControlledValue } from '../../hooks/useControlledValue.js';
|
|
10
|
-
import
|
|
10
|
+
import { cloneChildren } from '../../utils/cloneElement.js';
|
|
11
11
|
import { jsx } from 'react/jsx-runtime';
|
|
12
12
|
|
|
13
13
|
var _excluded = ["vertical", "className", "children", "variant", "rounded", "disabled", "fullWidth", "color", "size", "value", "onChange"];
|
|
@@ -46,9 +46,9 @@ var ToggleButtonGroup = function ToggleButtonGroup(_ref) {
|
|
|
46
46
|
};
|
|
47
47
|
}, [currentValue, onChange]);
|
|
48
48
|
return /*#__PURE__*/jsx("div", _objectSpread(_objectSpread({
|
|
49
|
-
className: classNames(
|
|
49
|
+
className: classNames("fabric-buttonGroup", className, fullWidth ? "flex" : "inline-flex", "flex-nowrap align-middle", vertical && "vertical", vertical && "flex-col")
|
|
50
50
|
}, aria), {}, {
|
|
51
|
-
children:
|
|
51
|
+
children: cloneChildren(children, function (child) {
|
|
52
52
|
return /*#__PURE__*/cloneElement(child, _objectSpread(_objectSpread({
|
|
53
53
|
color: color,
|
|
54
54
|
size: size,
|
|
@@ -4,14 +4,22 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
|
4
4
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
5
5
|
import classNames from 'classnames';
|
|
6
6
|
import { CoreIcons } from '../../types/icons.js';
|
|
7
|
-
import { getBgClass, getColorClass, getBorderClass } from '../../utils/getColor.js';
|
|
8
|
-
import '@react-fabric/utilities';
|
|
9
7
|
import { Icon } from '../icon/Icon.js';
|
|
10
8
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
11
9
|
|
|
12
10
|
var _excluded = ["children", "color", "legend", "title", "icon", "border", "onClose", "className"];
|
|
13
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; }
|
|
14
12
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13
|
+
var colors = {
|
|
14
|
+
none: "bg-base text-tint-900 border-tint-100",
|
|
15
|
+
tint: "bg-tint-50/50 text-tint-800 border-tint-300",
|
|
16
|
+
primary: "bg-primary-50/50 text-primary-800 border-primary-300",
|
|
17
|
+
accent: "bg-accent-50/50 text-accent-800 border-accent-300",
|
|
18
|
+
info: "bg-info-50/50 text-info-800 border-info-300",
|
|
19
|
+
danger: "bg-danger-50/50 text-danger-800 border-danger-300",
|
|
20
|
+
success: "bg-success-50/50 text-success-800 border-success-300",
|
|
21
|
+
warning: "bg-warning-50/50 text-warning-800 border-warning-300"
|
|
22
|
+
};
|
|
15
23
|
var Callout = function Callout(_ref) {
|
|
16
24
|
var children = _ref.children,
|
|
17
25
|
_ref$color = _ref.color,
|
|
@@ -24,19 +32,22 @@ var Callout = function Callout(_ref) {
|
|
|
24
32
|
className = _ref.className,
|
|
25
33
|
aria = _objectWithoutProperties(_ref, _excluded);
|
|
26
34
|
return /*#__PURE__*/jsxs("fieldset", _objectSpread(_objectSpread({
|
|
27
|
-
className: classNames(
|
|
35
|
+
className: classNames("block rounded-capped border max-w-full relative overflow-hidden mb-4", colors[color], className, border === "dashed" && "border-dashed", border === "dotted" && "border-dotted")
|
|
28
36
|
}, aria), {}, {
|
|
29
37
|
children: [legend && /*#__PURE__*/jsx("legend", {
|
|
30
38
|
className: "px-2 mx-4 font-medium",
|
|
39
|
+
"data-ref": "calloutLegend",
|
|
31
40
|
children: legend
|
|
32
41
|
}), /*#__PURE__*/jsxs("div", {
|
|
33
42
|
className: classNames("break-words whitespace-break-spaces p-2"),
|
|
34
43
|
children: [/*#__PURE__*/jsxs("div", {
|
|
35
44
|
className: "flex flex-nowrap items-center text-xl pe-4 gap-2 mb-4 empty:mb-0",
|
|
36
45
|
children: [icon && /*#__PURE__*/jsx(Icon, {
|
|
37
|
-
icon: icon
|
|
46
|
+
icon: icon,
|
|
47
|
+
"data-ref": "calloutIcon"
|
|
38
48
|
}), title && /*#__PURE__*/jsx("p", {
|
|
39
49
|
className: "flex-1",
|
|
50
|
+
"data-ref": "calloutTitle",
|
|
40
51
|
children: title
|
|
41
52
|
})]
|
|
42
53
|
}), /*#__PURE__*/jsx("div", {
|
|
@@ -45,6 +56,7 @@ var Callout = function Callout(_ref) {
|
|
|
45
56
|
})]
|
|
46
57
|
}), onClose && /*#__PURE__*/jsx(Icon, {
|
|
47
58
|
size: "md",
|
|
59
|
+
"data-ref": "calloutClose",
|
|
48
60
|
className: classNames("absolute end-2", legend ? "top-0" : "top-2"),
|
|
49
61
|
icon: CoreIcons.close,
|
|
50
62
|
onClick: onClose
|
|
@@ -4,15 +4,14 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
|
4
4
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
5
5
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
6
6
|
import classNames from 'classnames';
|
|
7
|
-
import { useMemo, Children } from 'react';
|
|
7
|
+
import { useMemo, Children, useCallback } from 'react';
|
|
8
8
|
import { ErrorBoundary } from '../../core/boundary/ErrorBoundary.js';
|
|
9
9
|
import { Header, Footer } from '../../core/headfoot/HeadFoot.js';
|
|
10
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
10
11
|
import '@react-fabric/utilities';
|
|
11
12
|
import { nodeCheck } from '../../utils/nodeCheck.js';
|
|
12
|
-
import classes from './Card.module.css';
|
|
13
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
14
13
|
|
|
15
|
-
var _excluded = ["children", "className", "bodyClassName", "selected", "selectedRibbon", "onClick", "flex", "draggable", "dragKey", "dragData"];
|
|
14
|
+
var _excluded = ["children", "className", "bodyClassName", "selected", "selectedRibbon", "onClick", "onDragStart", "flex", "draggable", "dragKey", "dragData", "ref"];
|
|
16
15
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
17
16
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
18
17
|
var Card = function Card(_ref) {
|
|
@@ -22,10 +21,12 @@ var Card = function Card(_ref) {
|
|
|
22
21
|
selected = _ref.selected,
|
|
23
22
|
selectedRibbon = _ref.selectedRibbon,
|
|
24
23
|
onClick = _ref.onClick,
|
|
24
|
+
onDragStart = _ref.onDragStart,
|
|
25
25
|
flex = _ref.flex,
|
|
26
26
|
draggable = _ref.draggable,
|
|
27
27
|
dragKey = _ref.dragKey,
|
|
28
28
|
dragData = _ref.dragData,
|
|
29
|
+
ref = _ref.ref,
|
|
29
30
|
aria = _objectWithoutProperties(_ref, _excluded);
|
|
30
31
|
var _useMemo = useMemo(function () {
|
|
31
32
|
return Children.toArray(children).reduce(function (ret, node) {
|
|
@@ -37,20 +38,23 @@ var Card = function Card(_ref) {
|
|
|
37
38
|
header = _useMemo2[0],
|
|
38
39
|
body = _useMemo2[1],
|
|
39
40
|
footer = _useMemo2[2];
|
|
41
|
+
var handleDragStart = useCallback(function (event) {
|
|
42
|
+
var _event$dataTransfer;
|
|
43
|
+
dragKey && ((_event$dataTransfer = event.dataTransfer) === null || _event$dataTransfer === void 0 ? void 0 : _event$dataTransfer.setData(dragKey, JSON.stringify(dragData)));
|
|
44
|
+
dragKey && (onDragStart === null || onDragStart === void 0 ? void 0 : onDragStart(event, dragKey, dragData));
|
|
45
|
+
}, [onDragStart, dragKey, dragData]);
|
|
40
46
|
return /*#__PURE__*/jsx("div", {
|
|
41
|
-
className: classNames(
|
|
47
|
+
className: classNames("fabric-cardWrapper", "rounded-capped relative grid", flex && "flex-1", selected && selectedRibbon && "selected", selected && "outline-2 outline-accent-500 outline-offset-2"),
|
|
42
48
|
children: /*#__PURE__*/jsx(ErrorBoundary, {
|
|
43
49
|
children: /*#__PURE__*/jsxs("div", _objectSpread(_objectSpread({
|
|
44
|
-
className: classNames(
|
|
50
|
+
className: classNames("fabric-card", className, "rounded-capped flex flex-col flex-nowrap overflow-hidden", onClick && "clickable"),
|
|
45
51
|
draggable: draggable,
|
|
46
|
-
onDragStart: !draggable ? undefined :
|
|
47
|
-
|
|
48
|
-
return dragKey && ((_e$dataTransfer = e.dataTransfer) === null || _e$dataTransfer === void 0 ? void 0 : _e$dataTransfer.setData(dragKey, JSON.stringify(dragData)));
|
|
49
|
-
}
|
|
52
|
+
onDragStart: !draggable ? undefined : handleDragStart,
|
|
53
|
+
ref: ref
|
|
50
54
|
}, aria), {}, {
|
|
51
55
|
children: [header, /*#__PURE__*/jsx("div", {
|
|
52
56
|
role: "none",
|
|
53
|
-
className: classNames(
|
|
57
|
+
className: classNames("fabric-cardBody", bodyClassName, "flex-1"),
|
|
54
58
|
onClick: onClick,
|
|
55
59
|
children: body
|
|
56
60
|
}), footer]
|
|
@@ -5,15 +5,19 @@ import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
|
5
5
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
6
6
|
import classNames from 'classnames';
|
|
7
7
|
import { useMemo, Children } from 'react';
|
|
8
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
8
9
|
import '@react-fabric/utilities';
|
|
9
10
|
import { nodeCheck } from '../../utils/nodeCheck.js';
|
|
10
11
|
import { Image, Video } from '../media/Media.js';
|
|
11
|
-
import classes from './Card.module.css';
|
|
12
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
13
12
|
|
|
14
13
|
var _excluded = ["className", "children", "height", "justify", "colorScheme"];
|
|
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
|
+
var scheme = {
|
|
17
|
+
inheritScheme: "inheritScheme",
|
|
18
|
+
light: "light",
|
|
19
|
+
dark: "dark"
|
|
20
|
+
};
|
|
17
21
|
var CardCover = function CardCover(_ref) {
|
|
18
22
|
var className = _ref.className,
|
|
19
23
|
children = _ref.children,
|
|
@@ -21,7 +25,8 @@ var CardCover = function CardCover(_ref) {
|
|
|
21
25
|
height = _ref$height === void 0 ? 120 : _ref$height,
|
|
22
26
|
_ref$justify = _ref.justify,
|
|
23
27
|
justify = _ref$justify === void 0 ? "end" : _ref$justify,
|
|
24
|
-
colorScheme = _ref.colorScheme,
|
|
28
|
+
_ref$colorScheme = _ref.colorScheme,
|
|
29
|
+
colorScheme = _ref$colorScheme === void 0 ? "inheritScheme" : _ref$colorScheme,
|
|
25
30
|
aria = _objectWithoutProperties(_ref, _excluded);
|
|
26
31
|
var _useMemo = useMemo(function () {
|
|
27
32
|
return Children.toArray(children).reduce(function (ret, node) {
|
|
@@ -36,10 +41,10 @@ var CardCover = function CardCover(_ref) {
|
|
|
36
41
|
style: {
|
|
37
42
|
height: height
|
|
38
43
|
},
|
|
39
|
-
className: classNames(
|
|
44
|
+
className: classNames("fabric-cardCover", scheme[colorScheme], "relative z-0")
|
|
40
45
|
}, aria), {}, {
|
|
41
46
|
children: [media, /*#__PURE__*/jsx("div", {
|
|
42
|
-
className: classNames(
|
|
47
|
+
className: classNames("fabric-cardCoverContent", "relative pointer-events-none z-1 flex flex-col flex-nowrap p-4 h-full", "justify-".concat(justify), className),
|
|
43
48
|
children: body
|
|
44
49
|
})]
|
|
45
50
|
}));
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
4
|
+
import classNames from 'classnames';
|
|
5
|
+
import { useState, useImperativeHandle, Children, isValidElement, cloneElement } from 'react';
|
|
6
|
+
import { jsx } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
var FlipContent = function FlipContent(_ref) {
|
|
9
|
+
var ref = _ref.ref,
|
|
10
|
+
children = _ref.children;
|
|
11
|
+
var _useState = useState(false),
|
|
12
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
13
|
+
showBack = _useState2[0],
|
|
14
|
+
setShowBack = _useState2[1];
|
|
15
|
+
useImperativeHandle(ref, function () {
|
|
16
|
+
return {
|
|
17
|
+
flipCard: function flipCard() {
|
|
18
|
+
return setShowBack(!showBack);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
}, [showBack]);
|
|
22
|
+
return /*#__PURE__*/jsx("div", {
|
|
23
|
+
className: "relative flex-1",
|
|
24
|
+
"data-card-flip": showBack,
|
|
25
|
+
children: Children.map(children, function (child, idx) {
|
|
26
|
+
var _child$props$classNam, _child$props;
|
|
27
|
+
return /*#__PURE__*/isValidElement(child) && /*#__PURE__*/cloneElement(child, {
|
|
28
|
+
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"),
|
|
29
|
+
"data-card-flip-face": idx === 0 ? "front" : "back"
|
|
30
|
+
});
|
|
31
|
+
})
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export { FlipContent };
|