@react-fabric/core 1.0.0-beta.4 → 1.0.0-beta.40
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} +68 -78
- package/{src/components/card/Card.module.css → css/components/_card.css} +32 -28
- package/{src/components/chip/Chip.module.css → css/components/_chip.css} +15 -11
- package/{src/components/collapsable/Collapsable.module.css → css/components/_collapsable.css} +3 -3
- package/css/components/_divider.css +32 -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} +15 -16
- 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} +42 -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 +41 -223
- package/css/reset/_text.css +14 -29
- package/css/reset/_theme.css +315 -32
- 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 +44 -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 +7 -2
- package/dist/cjs/components/button/ToggleButtonGroup.js +3 -3
- package/dist/cjs/components/callout/Callout.js +15 -4
- package/dist/cjs/components/card/Card.js +8 -7
- package/dist/cjs/components/card/CardCover.js +10 -5
- package/dist/cjs/components/chip/Chip.js +11 -7
- package/dist/cjs/components/collapsable/Collapsable.js +5 -5
- package/dist/cjs/components/divider/Divider.js +10 -7
- package/dist/cjs/components/dropdown/Dropdown.js +5 -4
- package/dist/cjs/components/dropdown/DropdownTool.js +4 -3
- package/dist/cjs/components/icon/Icon.js +15 -14
- 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 +39 -20
- 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 +16 -9
- 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 +6 -5
- package/dist/cjs/components/progress/ProgressCircle.js +6 -4
- package/dist/cjs/components/tabpanel/Tab.js +58 -38
- package/dist/cjs/components/tabpanel/TabPanel.js +20 -16
- 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 +3 -3
- package/dist/cjs/core/responsive/Responsive.js +3 -4
- package/dist/cjs/core/section/Section.js +1 -2
- package/dist/cjs/core/theme/ThemeProvider.js +7 -8
- package/dist/cjs/core/viewport/Viewport.js +4 -2
- package/dist/cjs/hooks/useNavigator.js +6 -4
- package/dist/cjs/hotkeys/HotKeyLabel.js +1 -1
- package/dist/cjs/hotkeys/HotKeyWrapper.js +3 -1
- package/dist/cjs/index.js +6 -2
- package/dist/cjs/overlays/alert/Alert.js +19 -13
- package/dist/cjs/overlays/flyout/Flyout.js +42 -44
- package/dist/cjs/overlays/message/Message.js +6 -3
- package/dist/cjs/overlays/modal/Modal.js +9 -10
- package/dist/cjs/overlays/toast/Toast.js +17 -9
- package/dist/cjs/overlays/tooltip/Tooltip.js +20 -8
- package/dist/cjs/types/icons.js +4 -0
- package/dist/cjs/typography/Abbr.js +2 -3
- 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 +44 -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 +7 -2
- package/dist/esm/components/button/ToggleButtonGroup.js +4 -4
- package/dist/esm/components/callout/Callout.js +15 -4
- package/dist/esm/components/card/Card.js +8 -7
- package/dist/esm/components/card/CardCover.js +10 -5
- package/dist/esm/components/chip/Chip.js +12 -8
- package/dist/esm/components/collapsable/Collapsable.js +5 -5
- package/dist/esm/components/divider/Divider.js +11 -8
- package/dist/esm/components/dropdown/Dropdown.js +5 -4
- package/dist/esm/components/dropdown/DropdownTool.js +4 -3
- package/dist/esm/components/icon/Icon.js +15 -14
- 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 +41 -22
- 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 +16 -9
- 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 +6 -5
- package/dist/esm/components/progress/ProgressCircle.js +6 -4
- package/dist/esm/components/tabpanel/Tab.js +59 -39
- package/dist/esm/components/tabpanel/TabPanel.js +20 -16
- 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 +3 -3
- package/dist/esm/core/responsive/Responsive.js +3 -4
- package/dist/esm/core/section/Section.js +1 -2
- package/dist/esm/core/theme/ThemeProvider.js +7 -8
- package/dist/esm/core/viewport/Viewport.js +4 -2
- package/dist/esm/hooks/useNavigator.js +7 -5
- package/dist/esm/hotkeys/HotKeyLabel.js +1 -1
- package/dist/esm/hotkeys/HotKeyWrapper.js +3 -1
- package/dist/esm/index.js +3 -1
- package/dist/esm/overlays/alert/Alert.js +20 -14
- package/dist/esm/overlays/flyout/Flyout.js +43 -45
- package/dist/esm/overlays/message/Message.js +7 -4
- package/dist/esm/overlays/modal/Modal.js +10 -11
- package/dist/esm/overlays/toast/Toast.js +18 -10
- package/dist/esm/overlays/tooltip/Tooltip.js +20 -8
- package/dist/esm/types/icons.js +4 -0
- package/dist/esm/typography/Abbr.js +2 -3
- 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 +44 -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 +2 -2
- package/dist/types/components/card/Card.d.ts +3 -3
- package/dist/types/components/chip/Chip.d.ts +3 -3
- package/dist/types/components/collapsable/Collapsable.d.ts +5 -1
- package/dist/types/components/divider/Divider.d.ts +7 -3
- package/dist/types/components/dropdown/DropdownTool.d.ts +2 -1
- package/dist/types/components/icon/Icon.d.ts +3 -3
- 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 +2 -2
- package/dist/types/components/navigator/Navigator.d.ts +4 -4
- package/dist/types/components/progress/ProgressBar.d.ts +2 -2
- package/dist/types/components/progress/ProgressCircle.d.ts +2 -2
- package/dist/types/components/tabpanel/Tab.d.ts +5 -5
- package/dist/types/components/tabpanel/TabPanel.d.ts +10 -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/responsive/Responsive.d.ts +1 -1
- package/dist/types/core/theme/ThemeProvider.d.ts +4 -4
- package/dist/types/hooks/useOverlayService.d.ts +3 -5
- package/dist/types/index.d.ts +3 -0
- package/dist/types/overlays/alert/Alert.d.ts +2 -2
- package/dist/types/overlays/flyout/Flyout.d.ts +3 -2
- package/dist/types/overlays/message/Message.d.ts +2 -2
- package/dist/types/overlays/modal/Modal.d.ts +4 -3
- package/dist/types/overlays/toast/Toast.d.ts +2 -2
- package/dist/types/overlays/tooltip/Tooltip.d.ts +1 -1
- package/dist/types/types/icons.d.ts +4 -0
- package/dist/types/types/index.d.ts +18 -6
- package/dist/types/typography/Abbr.d.ts +6 -2
- package/dist/types/typography/Anchor.d.ts +25 -0
- package/dist/types/typography/Mark.d.ts +2 -2
- 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 +7 -9
- 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 +15 -5
- package/src/components/button/ToggleButtonGroup.tsx +5 -5
- package/src/components/callout/Callout.tsx +26 -11
- package/src/components/card/Card.tsx +10 -7
- package/src/components/card/CardCover.tsx +11 -6
- package/src/components/chip/Chip.tsx +17 -13
- package/src/components/collapsable/Collapsable.tsx +9 -4
- package/src/components/divider/Divider.tsx +15 -10
- package/src/components/dropdown/Dropdown.tsx +5 -5
- package/src/components/dropdown/DropdownTool.tsx +5 -3
- package/src/components/icon/Icon.tsx +55 -67
- package/src/components/media/Media.tsx +141 -106
- package/src/components/menu/ContextMenu.tsx +36 -11
- package/src/components/menu/Menu.tsx +51 -30
- package/src/components/menu/MenuItem.tsx +19 -9
- package/src/components/menu/types.ts +2 -2
- package/src/components/meter/Meter.tsx +2 -3
- package/src/components/navigator/Navigator.tsx +19 -5
- package/src/components/panel/Panel.tsx +10 -9
- package/src/components/panel/PanelGroup.tsx +1 -2
- package/src/components/progress/ProgressBar.tsx +8 -9
- package/src/components/progress/ProgressCircle.tsx +6 -9
- package/src/components/tabpanel/Tab.tsx +81 -64
- package/src/components/tabpanel/TabPanel.tsx +34 -12
- 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 +3 -3
- package/src/core/responsive/Responsive.tsx +8 -7
- package/src/core/section/Section.tsx +1 -2
- package/src/core/theme/ThemeProvider.tsx +11 -12
- package/src/core/viewport/Viewport.tsx +1 -2
- package/src/hooks/useNavigator.tsx +10 -5
- package/src/hooks/useOverlayService.tsx +12 -6
- 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 +25 -31
- package/src/overlays/flyout/Flyout.tsx +65 -64
- package/src/overlays/message/Message.tsx +10 -7
- package/src/overlays/modal/Modal.tsx +18 -13
- package/src/overlays/toast/Toast.tsx +18 -27
- package/src/overlays/tooltip/Tooltip.tsx +30 -9
- package/src/types/icons.ts +9 -0
- package/src/types/index.ts +240 -27
- package/src/typography/Abbr.tsx +15 -9
- 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/utils/cloneElement.ts +44 -0
- 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
- package/src/overlays/tooltip/Tooltip.module.css +0 -53
|
@@ -11,7 +11,6 @@ import { usePropToggle } from '../../hooks/usePropToggle.js';
|
|
|
11
11
|
import { useResize } from '../../hooks/useResize.js';
|
|
12
12
|
import { CoreIcons } from '../../types/icons.js';
|
|
13
13
|
import { ErrorBoundary } from '../boundary/ErrorBoundary.js';
|
|
14
|
-
import classes from './Aside.module.css';
|
|
15
14
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
16
15
|
|
|
17
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; }
|
|
@@ -103,21 +102,23 @@ var Aside = function Aside(_ref) {
|
|
|
103
102
|
};
|
|
104
103
|
}, [width, minWidth, maxWidth]);
|
|
105
104
|
return /*#__PURE__*/jsxs("aside", {
|
|
106
|
-
className: classNames(
|
|
105
|
+
className: classNames("fabric-aside", className, "overflow-hidden grid"),
|
|
107
106
|
"data-align": align,
|
|
108
107
|
"data-flyout": peek,
|
|
108
|
+
"data-loading": loading,
|
|
109
109
|
"data-collapsed": isCollapsed,
|
|
110
110
|
style: isCollapsed ? undefined : widthStyles,
|
|
111
111
|
"data-testid": testId,
|
|
112
112
|
"data-test-value": testValue,
|
|
113
113
|
children: [/*#__PURE__*/jsxs("header", {
|
|
114
|
-
className: classNames(
|
|
114
|
+
className: classNames("fabric-asideHeader", headerClassName, "grid area-head items-center"),
|
|
115
|
+
"data-ref": "asideHeader",
|
|
115
116
|
children: [title && /*#__PURE__*/jsx("div", {
|
|
116
|
-
className: classNames(
|
|
117
|
+
className: classNames("fabric-asideTitle", "truncate py-0.5 px-1 select-none pointer-events-none"),
|
|
117
118
|
children: title
|
|
118
119
|
}), collapsable && /*#__PURE__*/jsx(Icon, {
|
|
119
120
|
"aria-label": isCollapsed ? "expand" : "collapse",
|
|
120
|
-
className: classNames(
|
|
121
|
+
className: classNames("fabric-asideCollapse", "p-2 select-none"),
|
|
121
122
|
icon: CoreIcons.chevronLeft,
|
|
122
123
|
rtlFlip: true,
|
|
123
124
|
onClick: toggleCollapse,
|
|
@@ -127,26 +128,26 @@ var Aside = function Aside(_ref) {
|
|
|
127
128
|
bg: iconBg,
|
|
128
129
|
color: iconColor,
|
|
129
130
|
rtlFlip: rtlFlip,
|
|
130
|
-
className: classNames(
|
|
131
|
+
className: classNames("fabric-asideIcon", "p-1 text-lg select-none pointer-events-none")
|
|
131
132
|
}), actions && /*#__PURE__*/jsx("div", {
|
|
132
|
-
className:
|
|
133
|
+
className: "fabric-asideActions",
|
|
133
134
|
children: actions
|
|
134
135
|
})]
|
|
135
136
|
}), loading && /*#__PURE__*/jsx(Loading, {}), isCollapsed && /*#__PURE__*/jsx("div", {
|
|
136
137
|
role: "none",
|
|
137
138
|
onClick: tryPeek,
|
|
138
139
|
"data-ref": "asidePlaceholder",
|
|
139
|
-
className:
|
|
140
|
+
className: "fabric-asidePlaceholder"
|
|
140
141
|
}), /*#__PURE__*/jsx("section", {
|
|
141
142
|
ref: elementRef,
|
|
142
143
|
"data-ref": "asideBody",
|
|
143
|
-
className: classNames(
|
|
144
|
+
className: classNames("fabric-asideBody", bodyClassName, "overflow-hidden grid"),
|
|
144
145
|
style: isCollapsed ? widthStyles : undefined,
|
|
145
146
|
children: /*#__PURE__*/jsx(ErrorBoundary, {
|
|
146
147
|
children: children
|
|
147
148
|
})
|
|
148
149
|
}), resizeable && /*#__PURE__*/jsx("div", _objectSpread(_objectSpread({}, resizeHandleProps), {}, {
|
|
149
|
-
className: classNames(
|
|
150
|
+
className: classNames("fabric-asideResizer", "before:absolute before:inset-0 before:w-1 before:top-1/2 before:-translate-y-1/2 before:transition-all")
|
|
150
151
|
}))]
|
|
151
152
|
});
|
|
152
153
|
};
|
|
@@ -13,7 +13,6 @@ import { useTranslation } from 'react-i18next';
|
|
|
13
13
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
14
14
|
import { useMemoDebugger } from '../../hooks/useEffectDebugger.js';
|
|
15
15
|
import { usePropToggle } from '../../hooks/usePropToggle.js';
|
|
16
|
-
import classes from './ErrorBoundary.module.css';
|
|
17
16
|
import { ErrorIcon } from './ErrorIcon.js';
|
|
18
17
|
import { useGlobals } from '../../context/Global.js';
|
|
19
18
|
|
|
@@ -43,7 +42,7 @@ var ErrorMessage = function ErrorMessage(_ref2) {
|
|
|
43
42
|
}, [], "ErrorBoundary element");
|
|
44
43
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
45
44
|
children: [/*#__PURE__*/jsx(ErrorIcon, {}), /*#__PURE__*/jsx("div", {
|
|
46
|
-
className: classNames(
|
|
45
|
+
className: classNames("fabric-boundaryMessage", "p-2"),
|
|
47
46
|
children: /*#__PURE__*/jsx(EE, {
|
|
48
47
|
error: error
|
|
49
48
|
})
|
|
@@ -59,9 +58,9 @@ var ErrorStack = function ErrorStack(_ref4) {
|
|
|
59
58
|
toggleShow = _usePropToggle2[1];
|
|
60
59
|
useLogger().error(error, {}, stack);
|
|
61
60
|
return /*#__PURE__*/jsxs("div", {
|
|
62
|
-
className: classNames(
|
|
61
|
+
className: classNames("fabric-boundaryDetail", "overflow-hidden grid"),
|
|
63
62
|
children: [/*#__PURE__*/jsx("div", {
|
|
64
|
-
className: classNames(
|
|
63
|
+
className: classNames("fabric-boundaryLink", "px-2 py-1 text-xs text-end"),
|
|
65
64
|
children: /*#__PURE__*/jsx("span", {
|
|
66
65
|
role: "link",
|
|
67
66
|
tabIndex: 0,
|
|
@@ -70,7 +69,7 @@ var ErrorStack = function ErrorStack(_ref4) {
|
|
|
70
69
|
children: show ? "Hide Detail" : "Show Detail"
|
|
71
70
|
})
|
|
72
71
|
}), show && /*#__PURE__*/jsx("div", {
|
|
73
|
-
className: classNames(
|
|
72
|
+
className: classNames("fabric-boundaryStack", "overflow-auto p-2 text-xs border-t"),
|
|
74
73
|
children: /*#__PURE__*/jsx("pre", {
|
|
75
74
|
className: "whitespace-pre-wrap",
|
|
76
75
|
children: stack
|
|
@@ -110,9 +109,9 @@ var ErrorBoundary = /*#__PURE__*/function (_Component) {
|
|
|
110
109
|
var E = this.props.errorElement;
|
|
111
110
|
// You can render any custom fallback UI
|
|
112
111
|
return /*#__PURE__*/jsx("div", {
|
|
113
|
-
className: classNames(
|
|
112
|
+
className: classNames("fabric-errorBoundary", "grid grid-rows-1 overflow-hidden p-0.5 rounded-capped"),
|
|
114
113
|
children: /*#__PURE__*/jsxs("div", {
|
|
115
|
-
className: classNames(
|
|
114
|
+
className: classNames("fabric-boundaryContent", "overflow-hidden grid rounded-capped"),
|
|
116
115
|
children: [/*#__PURE__*/jsx(ErrorMessage, {
|
|
117
116
|
error: this.state.error,
|
|
118
117
|
errorElement: E
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import classNames from 'classnames';
|
|
4
|
-
import classes from './ErrorBoundary.module.css';
|
|
5
4
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
6
5
|
|
|
7
6
|
/*
|
|
@@ -31,7 +30,7 @@ var ErrorIcon = function ErrorIcon() {
|
|
|
31
30
|
return /*#__PURE__*/jsxs("svg", {
|
|
32
31
|
xmlns: "http://www.w3.org/2000/svg",
|
|
33
32
|
viewBox: "0 0 64 64",
|
|
34
|
-
className: classNames(
|
|
33
|
+
className: classNames("fabric-boundaryIcon", "size-6 m-2"),
|
|
35
34
|
children: [/*#__PURE__*/jsx("path", {
|
|
36
35
|
fill: "#808080",
|
|
37
36
|
d: "M64 32c0 17.673-14.327 32-32 32s-32-14.327-32-32 14.327-32 32-32 32 14.327 32 32z"
|
|
@@ -5,7 +5,6 @@ import { useImperativeHandle } from 'react';
|
|
|
5
5
|
import { useDebounce } from '../../hooks/useDebounce.js';
|
|
6
6
|
import { useResizeObserver } from '../../hooks/useResizeObserver.js';
|
|
7
7
|
import { ErrorBoundary } from '../boundary/ErrorBoundary.js';
|
|
8
|
-
import classes from './Content.module.css';
|
|
9
8
|
import { jsx } from 'react/jsx-runtime';
|
|
10
9
|
|
|
11
10
|
/*
|
|
@@ -44,12 +43,15 @@ var Content = function Content(_ref) {
|
|
|
44
43
|
testValue = _ref["data-test-value"];
|
|
45
44
|
var resizeHandle = useResizeObserver(onResize);
|
|
46
45
|
var scrollHandler = useDebounce(function (e) {
|
|
46
|
+
var el = e.target;
|
|
47
47
|
onScroll === null || onScroll === void 0 || onScroll({
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
48
|
+
left: el.scrollLeft,
|
|
49
|
+
top: el.scrollTop,
|
|
50
|
+
scrollHeight: el.scrollHeight,
|
|
51
|
+
scrollWidth: el.scrollWidth,
|
|
52
|
+
width: el.offsetWidth,
|
|
53
|
+
height: el.offsetHeight
|
|
54
|
+
}, e);
|
|
53
55
|
}, [onScroll]);
|
|
54
56
|
useImperativeHandle(ref, function () {
|
|
55
57
|
return resizeHandle.current;
|
|
@@ -60,7 +62,7 @@ var Content = function Content(_ref) {
|
|
|
60
62
|
"data-test-value": testValue,
|
|
61
63
|
ref: resizeHandle,
|
|
62
64
|
onScroll: scrollHandler,
|
|
63
|
-
className: classNames(
|
|
65
|
+
className: classNames("fabric-content", "area-content", className),
|
|
64
66
|
children: /*#__PURE__*/jsx(ErrorBoundary, {
|
|
65
67
|
children: children
|
|
66
68
|
})
|
|
@@ -3,21 +3,15 @@
|
|
|
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 { useMemoDebugger } from '../../hooks/useEffectDebugger.js';
|
|
7
|
-
import { getColor, getBgClass, getColorClass } from '../../utils/getColor.js';
|
|
8
|
-
import '@react-fabric/utilities';
|
|
9
|
-
import classes from './HeadFoot.module.css';
|
|
10
6
|
import { jsx } from 'react/jsx-runtime';
|
|
11
7
|
|
|
12
|
-
var _excluded = ["as", "children", "className", "
|
|
8
|
+
var _excluded = ["as", "children", "className", "flex", "area", "dir", "align", "justify"];
|
|
13
9
|
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
10
|
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
11
|
var HeadFoot = function HeadFoot(_ref) {
|
|
16
12
|
var E = _ref.as,
|
|
17
13
|
children = _ref.children,
|
|
18
14
|
className = _ref.className,
|
|
19
|
-
bg = _ref.bg,
|
|
20
|
-
color = _ref.color,
|
|
21
15
|
flex = _ref.flex,
|
|
22
16
|
area = _ref.area,
|
|
23
17
|
dir = _ref.dir,
|
|
@@ -26,21 +20,9 @@ var HeadFoot = function HeadFoot(_ref) {
|
|
|
26
20
|
_ref$justify = _ref.justify,
|
|
27
21
|
justify = _ref$justify === void 0 ? "start" : _ref$justify,
|
|
28
22
|
aria = _objectWithoutProperties(_ref, _excluded);
|
|
29
|
-
/** ***************** style map *******************/
|
|
30
|
-
var styles = useMemoDebugger(function () {
|
|
31
|
-
var s = {};
|
|
32
|
-
if (bg) {
|
|
33
|
-
s.backgroundColor = getColor(bg);
|
|
34
|
-
}
|
|
35
|
-
if (color) {
|
|
36
|
-
s.color = getColor(color);
|
|
37
|
-
}
|
|
38
|
-
return s;
|
|
39
|
-
}, [bg], "HeadFoot styles");
|
|
40
23
|
return /*#__PURE__*/jsx(E, _objectSpread(_objectSpread({
|
|
41
24
|
dir: dir,
|
|
42
|
-
className: classNames(
|
|
43
|
-
style: styles
|
|
25
|
+
className: classNames("fabric-headfoot", className, area === "head" ? "area-head" : "area-foot", "leading-none", flex && "flex flex-nowrap", align && "items-".concat(align), justify && "justify-".concat(justify))
|
|
44
26
|
}, aria), {}, {
|
|
45
27
|
children: children
|
|
46
28
|
}));
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import { Loading } from '../../components/animations/Animations.js';
|
|
5
5
|
import { Icon } from '../../components/icon/Icon.js';
|
|
6
|
-
import classes from './Page.module.css';
|
|
7
6
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
8
7
|
|
|
9
8
|
/*
|
|
@@ -47,10 +46,11 @@ var Page = function Page(_ref) {
|
|
|
47
46
|
return /*#__PURE__*/jsxs("div", {
|
|
48
47
|
"data-testid": testId,
|
|
49
48
|
"data-test-value": testValue,
|
|
50
|
-
|
|
49
|
+
"data-loading": loading,
|
|
50
|
+
className: classNames("fabric-page", "overflow-hidden grid area-content", paper && "shadow-paper m-[6px] rounded-capped"),
|
|
51
51
|
children: [title && /*#__PURE__*/jsxs("div", {
|
|
52
52
|
"data-ref": "pageTitle",
|
|
53
|
-
className: classNames(
|
|
53
|
+
className: classNames("fabric-pageTitle", "select-none flex gap-1 items-center justify-center px-1 py-0.5 font-medium text-center", titleClassName),
|
|
54
54
|
children: [icon && /*#__PURE__*/jsx(Icon, {
|
|
55
55
|
icon: icon,
|
|
56
56
|
size: "1.25em",
|
|
@@ -3,7 +3,6 @@
|
|
|
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 classes from './Responsive.module.css';
|
|
7
6
|
import { jsx } from 'react/jsx-runtime';
|
|
8
7
|
|
|
9
8
|
var _excluded = ["children", "fullWidth", "className", "gutter"],
|
|
@@ -21,7 +20,7 @@ var Container = function Container(_ref) {
|
|
|
21
20
|
gutter = _ref.gutter,
|
|
22
21
|
aria = _objectWithoutProperties(_ref, _excluded);
|
|
23
22
|
return /*#__PURE__*/jsx("div", _objectSpread(_objectSpread({
|
|
24
|
-
className: classNames(
|
|
23
|
+
className: classNames("fabric-container", className, !fullWidth && "container mx-auto"),
|
|
25
24
|
"data-gutter": gutter
|
|
26
25
|
}, aria), {}, {
|
|
27
26
|
children: children
|
|
@@ -39,7 +38,7 @@ var Row = function Row(_ref2) {
|
|
|
39
38
|
className = _ref2.className,
|
|
40
39
|
aria = _objectWithoutProperties(_ref2, _excluded2);
|
|
41
40
|
return /*#__PURE__*/jsx("div", _objectSpread(_objectSpread({
|
|
42
|
-
className: classNames(
|
|
41
|
+
className: classNames("fabric-row", className, "flex", orient === "row" && "flex-row", orient === "col" && "flex-col", orient === "row-reverse" && "flex-row-reverse", orient === "col-reverse" && "flex-col-reverse", noWrap ? "flex-nowrap" : "flex-wrap", "justify-".concat(justify), "items-".concat(align)),
|
|
43
42
|
"data-gutter": gutter
|
|
44
43
|
}, aria), {}, {
|
|
45
44
|
children: children
|
|
@@ -53,7 +52,7 @@ var Col = function Col(_ref3) {
|
|
|
53
52
|
stretchContent = _ref3.stretchContent,
|
|
54
53
|
aria = _objectWithoutProperties(_ref3, _excluded3);
|
|
55
54
|
return /*#__PURE__*/jsx("div", _objectSpread(_objectSpread({
|
|
56
|
-
className: classNames(
|
|
55
|
+
className: classNames("fabric-col", className, stretchContent && "stretchContent", flex === "fill" && "flex-1", flex === "full" && "flex-full", flex === "auto" && "flex-auto", flex === "initial" && "flex-initial", flex === "content" && "flex-none", align && "self-".concat(align))
|
|
57
56
|
}, aria), {}, {
|
|
58
57
|
children: children
|
|
59
58
|
}));
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import { ErrorBoundary } from '../boundary/ErrorBoundary.js';
|
|
5
|
-
import classes from './Section.module.css';
|
|
6
5
|
import { jsx } from 'react/jsx-runtime';
|
|
7
6
|
|
|
8
7
|
/*
|
|
@@ -37,7 +36,7 @@ var Section = function Section(_ref) {
|
|
|
37
36
|
"data-ref": "section",
|
|
38
37
|
dir: dir,
|
|
39
38
|
ref: ref,
|
|
40
|
-
className: classNames(
|
|
39
|
+
className: classNames("fabric-section", className, "grid area-content overflow-hidden"),
|
|
41
40
|
children: /*#__PURE__*/jsx(ErrorBoundary, {
|
|
42
41
|
children: children
|
|
43
42
|
})
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import { isColor } from '@react-fabric/utilities';
|
|
4
4
|
import classNames from 'classnames';
|
|
5
5
|
import { useMemo } from 'react';
|
|
6
|
-
import classes from './Theme.module.css';
|
|
7
6
|
import { jsx } from 'react/jsx-runtime';
|
|
8
7
|
|
|
9
8
|
/*
|
|
@@ -43,22 +42,22 @@ var ThemeProvider = function ThemeProvider(_ref) {
|
|
|
43
42
|
var styles = useMemo(function () {
|
|
44
43
|
var ret = {};
|
|
45
44
|
if (primaryColor && isColor(primaryColor)) {
|
|
46
|
-
ret["--primary"] = primaryColor;
|
|
45
|
+
ret["--color-primary"] = primaryColor;
|
|
47
46
|
}
|
|
48
47
|
if (primaryColor && !isColor(primaryColor)) {
|
|
49
|
-
ret["--primary"] = "var(--".concat(primaryColor, ")");
|
|
48
|
+
ret["--color-primary"] = "var(--color-".concat(primaryColor, ")");
|
|
50
49
|
}
|
|
51
50
|
if (accentColor && isColor(accentColor)) {
|
|
52
|
-
ret["--accent"] = accentColor;
|
|
51
|
+
ret["--color-accent"] = accentColor;
|
|
53
52
|
}
|
|
54
53
|
if (accentColor && !isColor(accentColor)) {
|
|
55
|
-
ret["--accent"] = "var(--".concat(accentColor, ")");
|
|
54
|
+
ret["--color-accent"] = "var(--color-".concat(accentColor, ")");
|
|
56
55
|
}
|
|
57
56
|
if (tintColor && isColor(tintColor)) {
|
|
58
|
-
ret["--tint"] = tintColor;
|
|
57
|
+
ret["--color-tint"] = tintColor;
|
|
59
58
|
}
|
|
60
59
|
if (tintColor && !isColor(tintColor)) {
|
|
61
|
-
ret["--tint"] = "var(--".concat(tintColor, ")");
|
|
60
|
+
ret["--color-tint"] = "var(--color-".concat(tintColor, ")");
|
|
62
61
|
}
|
|
63
62
|
return ret;
|
|
64
63
|
}, [primaryColor, accentColor, tintColor]);
|
|
@@ -66,7 +65,7 @@ var ThemeProvider = function ThemeProvider(_ref) {
|
|
|
66
65
|
style: styles,
|
|
67
66
|
"data-color-scheme": colorScheme,
|
|
68
67
|
"data-rounding": rounding,
|
|
69
|
-
className: classNames(
|
|
68
|
+
className: classNames("fabric-themeProvider", "contents theme-base", branding),
|
|
70
69
|
children: children
|
|
71
70
|
});
|
|
72
71
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import classNames from 'classnames';
|
|
4
|
-
import classes from './Viewport.module.css';
|
|
5
4
|
import { jsx } from 'react/jsx-runtime';
|
|
6
5
|
|
|
7
6
|
/*
|
|
@@ -27,11 +26,14 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
27
26
|
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
28
27
|
*/
|
|
29
28
|
|
|
29
|
+
/**
|
|
30
|
+
* The application viewport is the main container that defines the visible area where content is displayed and interacted with.
|
|
31
|
+
*/
|
|
30
32
|
var Viewport = function Viewport(_ref) {
|
|
31
33
|
var children = _ref.children;
|
|
32
34
|
return /*#__PURE__*/jsx("div", {
|
|
33
35
|
"data-ref": "viewport",
|
|
34
|
-
className: classNames(
|
|
36
|
+
className: classNames("fabric-viewport", "grid overflow-hidden absolute inset-0"),
|
|
35
37
|
children: children
|
|
36
38
|
});
|
|
37
39
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
4
|
-
import { useState, useCallback, useMemo } from 'react';
|
|
4
|
+
import { useState, useRef, useCallback, useMemo } from 'react';
|
|
5
5
|
import { jsxs } from 'react/jsx-runtime';
|
|
6
6
|
|
|
7
7
|
var useNavigator = function useNavigator() {
|
|
@@ -11,17 +11,19 @@ var useNavigator = function useNavigator() {
|
|
|
11
11
|
_useState2 = _slicedToArray(_useState, 2),
|
|
12
12
|
currentIndex = _useState2[0],
|
|
13
13
|
setCurrentIndex = _useState2[1];
|
|
14
|
+
var refCurrent = useRef(defaultIndex);
|
|
14
15
|
var onNavigate = useCallback(function (dir) {
|
|
15
16
|
if (dir === -1) {
|
|
16
|
-
|
|
17
|
+
refCurrent.current = refCurrent.current > 0 ? refCurrent.current - 1 : totalCount - 1;
|
|
17
18
|
}
|
|
18
19
|
if (dir === 1) {
|
|
19
|
-
|
|
20
|
+
refCurrent.current = refCurrent.current + 1 < totalCount ? refCurrent.current + 1 : 0;
|
|
20
21
|
}
|
|
21
|
-
|
|
22
|
+
setCurrentIndex(refCurrent.current);
|
|
23
|
+
}, [totalCount]);
|
|
22
24
|
var headLabel = useMemo(function () {
|
|
23
25
|
return /*#__PURE__*/jsxs("span", {
|
|
24
|
-
className: "text-muted leading-none",
|
|
26
|
+
className: "text-muted leading-none select-none",
|
|
25
27
|
children: [currentIndex + 1, "/", totalCount]
|
|
26
28
|
});
|
|
27
29
|
}, [currentIndex, totalCount]);
|
|
@@ -44,7 +44,7 @@ var HotKeyLabel = function HotKeyLabel(_ref) {
|
|
|
44
44
|
}, "label")];
|
|
45
45
|
}, [keyCombo], "HotKey label");
|
|
46
46
|
return /*#__PURE__*/jsx("kbd", {
|
|
47
|
-
className: "hotkey-label inline-flex gap-1 select-none self-center font-mono items-center text-[0.625rem] leading-4 bg-tint-500/
|
|
47
|
+
className: "hotkey-label inline-flex gap-1 select-none self-center font-mono items-center text-[0.625rem] leading-4 bg-tint-500/20 text-tint-900/65 whitespace-nowrap rounded px-2 mx-1",
|
|
48
48
|
children: label
|
|
49
49
|
});
|
|
50
50
|
};
|
|
@@ -46,7 +46,9 @@ var HotKeyWrapper = /*#__PURE__*/memo(function (_ref) {
|
|
|
46
46
|
ctrl = _ref4.ctrl,
|
|
47
47
|
meta = _ref4.meta,
|
|
48
48
|
shift = _ref4.shift;
|
|
49
|
-
return (key.toLowerCase() === keyCode.toLowerCase() || key.toLowerCase() === code.toLowerCase()
|
|
49
|
+
return (key.toLowerCase() === keyCode.toLowerCase() || key.toLowerCase() === code.toLowerCase() ||
|
|
50
|
+
// work around for macos alt+key issue
|
|
51
|
+
"key".concat(key.toLowerCase()) === code.toLowerCase()) && alt === altKey && ctrl === ctrlKey && meta === metaKey && shift === shiftKey;
|
|
50
52
|
});
|
|
51
53
|
if (find !== null && find !== void 0 && find.handler) {
|
|
52
54
|
find.handler();
|
package/dist/esm/index.js
CHANGED
|
@@ -51,14 +51,15 @@ import 'react';
|
|
|
51
51
|
import 'react-i18next';
|
|
52
52
|
export { CoreIcons } from './types/icons.js';
|
|
53
53
|
export { Title } from './typography/Title.js';
|
|
54
|
+
export { cloneChildren } from './utils/cloneElement.js';
|
|
54
55
|
import '@react-fabric/utilities';
|
|
55
56
|
import 'react/jsx-runtime';
|
|
56
57
|
export { Flyout } from './overlays/flyout/Flyout.js';
|
|
57
58
|
export { Modal } from './overlays/modal/Modal.js';
|
|
58
59
|
export { Tooltip } from './overlays/tooltip/Tooltip.js';
|
|
59
60
|
export { Abbr } from './typography/Abbr.js';
|
|
61
|
+
export { Anchor } from './typography/Anchor.js';
|
|
60
62
|
export { Copy } from './typography/Copy.js';
|
|
61
|
-
export { Link } from './typography/Link.js';
|
|
62
63
|
export { Mark } from './typography/Mark.js';
|
|
63
64
|
export { Text } from './typography/Text.js';
|
|
64
65
|
export { useClientService } from './hooks/useClientService.js';
|
|
@@ -73,4 +74,5 @@ export { useResizeObserver } from './hooks/useResizeObserver.js';
|
|
|
73
74
|
export { useLocalStorage, useSessionStorage } from './hooks/useStorage.js';
|
|
74
75
|
export { HotKey } from './hotkeys/HotKey.js';
|
|
75
76
|
export { HotKeyLabel } from './hotkeys/HotKeyLabel.js';
|
|
77
|
+
export { HotKeyWrapper } from './hotkeys/HotKeyWrapper.js';
|
|
76
78
|
export { ApplicationProvider, useApplicationContext, useGlobals, useNotificationService } from './context/Global.js';
|
|
@@ -11,10 +11,9 @@ import { Button } from '../../components/button/Button.js';
|
|
|
11
11
|
import { Icon } from '../../components/icon/Icon.js';
|
|
12
12
|
import { CoreIcons } from '../../types/icons.js';
|
|
13
13
|
import { Title } from '../../typography/Title.js';
|
|
14
|
-
import { getColorClass, getBorderClass } from '../../utils/getColor.js';
|
|
15
|
-
import '@react-fabric/utilities';
|
|
16
|
-
import classes from './Alert.module.css';
|
|
17
14
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
15
|
+
import { getColor } from '../../utils/getColor.js';
|
|
16
|
+
import '@react-fabric/utilities';
|
|
18
17
|
|
|
19
18
|
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; }
|
|
20
19
|
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; }
|
|
@@ -60,28 +59,28 @@ var Alert = function Alert(_ref) {
|
|
|
60
59
|
icon: icon,
|
|
61
60
|
size: "md",
|
|
62
61
|
rtlFlip: rtlFlip,
|
|
63
|
-
color: color
|
|
62
|
+
color: "".concat(color, "-600")
|
|
64
63
|
});
|
|
65
64
|
switch (color) {
|
|
66
65
|
case "danger":
|
|
67
66
|
return /*#__PURE__*/jsx(AnimationIndicator, {
|
|
68
67
|
type: "cross",
|
|
69
|
-
|
|
68
|
+
color: "danger-600"
|
|
70
69
|
});
|
|
71
70
|
case "success":
|
|
72
71
|
return /*#__PURE__*/jsx(AnimationIndicator, {
|
|
73
72
|
type: "check",
|
|
74
|
-
|
|
73
|
+
color: "success-600"
|
|
75
74
|
});
|
|
76
75
|
case "warning":
|
|
77
76
|
return /*#__PURE__*/jsx(AnimationIndicator, {
|
|
78
77
|
type: "exclaim",
|
|
79
|
-
|
|
78
|
+
color: "warning-600"
|
|
80
79
|
});
|
|
81
80
|
default:
|
|
82
81
|
return /*#__PURE__*/jsx(AnimationIndicator, {
|
|
83
82
|
type: type === "confirm" ? "question" : "info",
|
|
84
|
-
|
|
83
|
+
color: "".concat(color, "-600")
|
|
85
84
|
});
|
|
86
85
|
}
|
|
87
86
|
}, [color, type, icon]);
|
|
@@ -102,27 +101,34 @@ var Alert = function Alert(_ref) {
|
|
|
102
101
|
style: {
|
|
103
102
|
zIndex: "var(--z-overlay-mask)"
|
|
104
103
|
},
|
|
105
|
-
className: "bg-
|
|
104
|
+
className: "bg-tint-100/50 backdrop-blur-sm grid place-items-center",
|
|
106
105
|
children: /*#__PURE__*/jsx(FloatingFocusManager, {
|
|
107
106
|
context: context,
|
|
108
107
|
children: /*#__PURE__*/jsxs("dialog", _objectSpread(_objectSpread({
|
|
109
108
|
role: "alertdialog",
|
|
110
|
-
className: classNames(
|
|
109
|
+
className: classNames("fabric-alert", "grid bg-base border-2 pointer-events-auto overflow-hidden rounded-capped select-none", "min-w-72 max-w-sm p-6 relative outline-0 shadow-lg"),
|
|
110
|
+
style: {
|
|
111
|
+
borderColor: getColor("".concat(color, "-300"))
|
|
112
|
+
},
|
|
111
113
|
ref: refs.setFloating
|
|
112
114
|
}, getFloatingProps()), {}, {
|
|
113
115
|
children: [/*#__PURE__*/jsx("div", {
|
|
114
116
|
className: classNames("area-[icon] text-lg py-2"),
|
|
115
117
|
children: iconType
|
|
116
118
|
}), /*#__PURE__*/jsx(Title, {
|
|
117
|
-
className: "font-medium area-[title]",
|
|
119
|
+
className: "font-medium area-[title] self-center",
|
|
118
120
|
children: title
|
|
119
|
-
}), /*#__PURE__*/jsx("
|
|
121
|
+
}), /*#__PURE__*/jsx("div", {
|
|
120
122
|
className: "area-[message] py-4",
|
|
121
123
|
children: message
|
|
122
124
|
}), type === "prompt" && /*#__PURE__*/jsx("input", {
|
|
123
125
|
value: value,
|
|
124
126
|
placeholder: placeholder,
|
|
125
|
-
className: classNames("border rounded
|
|
127
|
+
className: classNames("area-[input] appearance-none outline-0 border rounded w-full px-2 py-1"),
|
|
128
|
+
style: {
|
|
129
|
+
borderColor: getColor("".concat(color, "-200")),
|
|
130
|
+
"--tw-ring-color": getColor("".concat(color, "-500"))
|
|
131
|
+
},
|
|
126
132
|
ref: function ref(e) {
|
|
127
133
|
return e != null && setTimeout(function () {
|
|
128
134
|
return e.focus();
|
|
@@ -158,7 +164,7 @@ var Alert = function Alert(_ref) {
|
|
|
158
164
|
variant: "solid",
|
|
159
165
|
color: color,
|
|
160
166
|
onClick: function onClick() {
|
|
161
|
-
return handleClose(true);
|
|
167
|
+
return handleClose(type === "prompt" ? value : true);
|
|
162
168
|
},
|
|
163
169
|
children: okLabel !== null && okLabel !== void 0 ? okLabel : t("action.ok", "OK")
|
|
164
170
|
})]
|