@react-fabric/core 1.0.0-beta.36 → 1.0.0-beta.37
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} +2 -2
- 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} +63 -80
- package/{src/components/card/Card.module.css → css/components/_card.css} +32 -28
- package/{src/components/chip/Chip.module.css → css/components/_chip.css} +11 -10
- package/{src/components/collapsable/Collapsable.module.css → css/components/_collapsable.css} +3 -3
- package/{src/components/divider/Divider.module.css → css/components/_divider.css} +3 -3
- 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 -4
- 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} +43 -43
- package/{src/overlays/toast/Toast.module.css → css/components/_toast.css} +2 -2
- package/css/components/_tooltip.css +29 -0
- package/css/components/index.css +47 -0
- package/{src/core/aside/Aside.module.css → css/core/_aside.css} +42 -42
- package/{src/core/content/Content.module.css → css/core/_content.css} +9 -5
- 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 -4
- package/{src/core/page/Page.module.css → css/core/_page.css} +12 -8
- package/{src/core/responsive/Responsive.module.css → css/core/_responsive.css} +10 -10
- package/{src/core/section/Section.module.css → css/core/_section.css} +2 -2
- package/{src/core/theme/Theme.module.css → css/core/_theme.css} +3 -3
- package/{src/typography/Typography.module.css → css/core/_typography.css} +12 -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 +314 -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 +512 -0
- package/css/theme/index.css +44 -0
- package/dist/cjs/components/actionLabel/ActionLabel.js +2 -3
- package/dist/cjs/components/animations/Animations.js +14 -10
- package/dist/cjs/components/avatar/Avatar.js +2 -3
- package/dist/cjs/components/avatar/AvatarGroup.js +2 -3
- package/dist/cjs/components/badge/Badge.js +2 -3
- package/dist/cjs/components/breadcrumbs/Breadcrumbs.js +5 -6
- package/dist/cjs/components/button/Button.js +13 -10
- package/dist/cjs/components/button/ButtonGroup.js +1 -2
- package/dist/cjs/components/button/ToggleButtonGroup.js +1 -2
- package/dist/cjs/components/callout/Callout.js +11 -5
- package/dist/cjs/components/card/Card.js +3 -4
- package/dist/cjs/components/card/CardCover.js +9 -4
- package/dist/cjs/components/chip/Chip.js +4 -5
- package/dist/cjs/components/collapsable/Collapsable.js +3 -4
- package/dist/cjs/components/divider/Divider.js +9 -7
- package/dist/cjs/components/dropdown/Dropdown.js +2 -3
- package/dist/cjs/components/dropdown/DropdownTool.js +1 -1
- package/dist/cjs/components/icon/Icon.js +1 -2
- package/dist/cjs/components/media/Media.js +15 -11
- package/dist/cjs/components/menu/Menu.js +1 -1
- package/dist/cjs/components/menu/MenuItem.js +2 -3
- package/dist/cjs/components/meter/Meter.js +2 -3
- package/dist/cjs/components/navigator/Navigator.js +1 -1
- package/dist/cjs/components/panel/Panel.js +7 -8
- package/dist/cjs/components/panel/PanelGroup.js +1 -2
- package/dist/cjs/components/progress/ProgressBar.js +4 -4
- package/dist/cjs/components/progress/ProgressCircle.js +4 -3
- package/dist/cjs/components/tabpanel/Tab.js +1 -2
- package/dist/cjs/components/tabpanel/TabPanel.js +3 -4
- package/dist/cjs/core/aside/Aside.js +9 -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 +1 -2
- package/dist/cjs/core/headfoot/HeadFoot.js +2 -21
- package/dist/cjs/core/page/Page.js +2 -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/overlays/alert/Alert.js +14 -8
- package/dist/cjs/overlays/flyout/Flyout.js +4 -5
- package/dist/cjs/overlays/message/Message.js +5 -2
- package/dist/cjs/overlays/modal/Modal.js +4 -5
- package/dist/cjs/overlays/toast/Toast.js +16 -8
- package/dist/cjs/overlays/tooltip/Tooltip.js +19 -7
- package/dist/cjs/typography/Abbr.js +1 -2
- package/dist/cjs/typography/Anchor.js +1 -1
- package/dist/cjs/typography/Mark.js +1 -2
- package/dist/cjs/typography/Text.js +2 -3
- package/dist/cjs/typography/Title.js +1 -2
- package/dist/cjs/utils/getColor.js +1 -18
- package/dist/esm/components/actionLabel/ActionLabel.js +2 -3
- package/dist/esm/components/animations/Animations.js +15 -11
- package/dist/esm/components/avatar/Avatar.js +3 -4
- package/dist/esm/components/avatar/AvatarGroup.js +2 -3
- package/dist/esm/components/badge/Badge.js +2 -3
- package/dist/esm/components/breadcrumbs/Breadcrumbs.js +5 -6
- package/dist/esm/components/button/Button.js +13 -10
- package/dist/esm/components/button/ButtonGroup.js +1 -2
- package/dist/esm/components/button/ToggleButtonGroup.js +1 -2
- package/dist/esm/components/callout/Callout.js +11 -5
- package/dist/esm/components/card/Card.js +3 -4
- package/dist/esm/components/card/CardCover.js +9 -4
- package/dist/esm/components/chip/Chip.js +5 -6
- package/dist/esm/components/collapsable/Collapsable.js +3 -4
- package/dist/esm/components/divider/Divider.js +10 -8
- package/dist/esm/components/dropdown/Dropdown.js +2 -3
- package/dist/esm/components/dropdown/DropdownTool.js +1 -1
- package/dist/esm/components/icon/Icon.js +2 -3
- package/dist/esm/components/media/Media.js +15 -11
- package/dist/esm/components/menu/Menu.js +1 -1
- package/dist/esm/components/menu/MenuItem.js +2 -3
- package/dist/esm/components/meter/Meter.js +2 -3
- package/dist/esm/components/navigator/Navigator.js +1 -1
- package/dist/esm/components/panel/Panel.js +7 -8
- package/dist/esm/components/panel/PanelGroup.js +1 -2
- package/dist/esm/components/progress/ProgressBar.js +5 -5
- package/dist/esm/components/progress/ProgressCircle.js +5 -4
- package/dist/esm/components/tabpanel/Tab.js +1 -2
- package/dist/esm/components/tabpanel/TabPanel.js +3 -4
- package/dist/esm/core/aside/Aside.js +9 -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 +1 -2
- package/dist/esm/core/headfoot/HeadFoot.js +2 -21
- package/dist/esm/core/page/Page.js +2 -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/overlays/alert/Alert.js +15 -9
- package/dist/esm/overlays/flyout/Flyout.js +4 -5
- package/dist/esm/overlays/message/Message.js +6 -3
- package/dist/esm/overlays/modal/Modal.js +4 -5
- package/dist/esm/overlays/toast/Toast.js +17 -9
- package/dist/esm/overlays/tooltip/Tooltip.js +19 -7
- package/dist/esm/typography/Abbr.js +2 -3
- package/dist/esm/typography/Anchor.js +2 -2
- package/dist/esm/typography/Mark.js +2 -3
- package/dist/esm/typography/Text.js +3 -4
- package/dist/esm/typography/Title.js +2 -3
- package/dist/esm/utils/getColor.js +2 -16
- package/dist/types/components/animations/Animations.d.ts +4 -4
- package/dist/types/components/avatar/Avatar.d.ts +3 -3
- package/dist/types/components/button/Button.d.ts +2 -2
- package/dist/types/components/button/ButtonGroup.d.ts +2 -2
- package/dist/types/components/callout/Callout.d.ts +2 -2
- package/dist/types/components/chip/Chip.d.ts +2 -2
- package/dist/types/components/divider/Divider.d.ts +7 -3
- package/dist/types/components/icon/Icon.d.ts +3 -3
- package/dist/types/components/menu/types.d.ts +2 -2
- package/dist/types/components/navigator/Navigator.d.ts +2 -2
- 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 +2 -2
- package/dist/types/core/headfoot/HeadFoot.d.ts +1 -9
- package/dist/types/core/theme/ThemeProvider.d.ts +3 -3
- package/dist/types/overlays/alert/Alert.d.ts +2 -2
- package/dist/types/overlays/message/Message.d.ts +2 -2
- package/dist/types/overlays/toast/Toast.d.ts +2 -2
- package/dist/types/overlays/tooltip/Tooltip.d.ts +1 -1
- package/dist/types/types/index.d.ts +10 -5
- package/dist/types/typography/Abbr.d.ts +6 -2
- package/dist/types/typography/Anchor.d.ts +3 -3
- package/dist/types/typography/Mark.d.ts +2 -2
- package/dist/types/utils/getColor.d.ts +1 -4
- package/package.json +16 -7
- package/src/components/actionLabel/ActionLabel.tsx +2 -3
- package/src/components/animations/Animations.tsx +19 -19
- package/src/components/avatar/Avatar.tsx +6 -8
- package/src/components/avatar/AvatarGroup.tsx +3 -4
- package/src/components/badge/Badge.tsx +3 -4
- package/src/components/breadcrumbs/Breadcrumbs.tsx +5 -6
- package/src/components/button/Button.tsx +15 -13
- package/src/components/button/ButtonGroup.tsx +4 -5
- package/src/components/button/ToggleButtonGroup.tsx +2 -3
- package/src/components/callout/Callout.tsx +14 -8
- package/src/components/card/Card.tsx +6 -7
- package/src/components/card/CardCover.tsx +11 -6
- package/src/components/chip/Chip.tsx +9 -10
- package/src/components/collapsable/Collapsable.tsx +3 -4
- package/src/components/divider/Divider.tsx +15 -11
- package/src/components/dropdown/Dropdown.tsx +2 -3
- package/src/components/dropdown/DropdownTool.tsx +1 -1
- package/src/components/icon/Icon.tsx +7 -9
- package/src/components/media/Media.tsx +19 -14
- package/src/components/menu/Menu.tsx +1 -1
- package/src/components/menu/MenuItem.tsx +5 -6
- package/src/components/menu/types.ts +2 -2
- package/src/components/meter/Meter.tsx +2 -3
- package/src/components/navigator/Navigator.tsx +4 -3
- package/src/components/panel/Panel.tsx +7 -8
- 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 +3 -4
- package/src/components/tabpanel/TabPanel.tsx +3 -4
- package/src/core/aside/Aside.tsx +9 -10
- package/src/core/boundary/ErrorBoundary.tsx +8 -7
- package/src/core/boundary/ErrorIcon.tsx +1 -2
- package/src/core/content/Content.tsx +1 -2
- package/src/core/headfoot/HeadFoot.tsx +1 -34
- package/src/core/page/Page.tsx +2 -3
- package/src/core/responsive/Responsive.tsx +4 -5
- package/src/core/section/Section.tsx +1 -2
- package/src/core/theme/ThemeProvider.tsx +10 -11
- package/src/core/viewport/Viewport.tsx +1 -2
- package/src/overlays/alert/Alert.tsx +19 -27
- package/src/overlays/flyout/Flyout.tsx +4 -5
- package/src/overlays/message/Message.tsx +10 -7
- package/src/overlays/modal/Modal.tsx +4 -5
- package/src/overlays/toast/Toast.tsx +18 -27
- package/src/overlays/tooltip/Tooltip.tsx +28 -7
- package/src/types/index.ts +230 -18
- package/src/typography/Abbr.tsx +15 -9
- package/src/typography/Anchor.tsx +5 -10
- package/src/typography/Mark.tsx +4 -9
- package/src/typography/Text.tsx +3 -11
- package/src/typography/Title.tsx +2 -5
- package/src/utils/getColor.ts +1 -17
- 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/divider/Divider.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/divider/Divider.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/src/overlays/tooltip/Tooltip.module.css +0 -53
|
@@ -3,10 +3,10 @@
|
|
|
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 { useCallback } from 'react';
|
|
6
7
|
import { HotKey } from '../../hotkeys/HotKey.js';
|
|
7
8
|
import { CoreIcons } from '../../types/icons.js';
|
|
8
9
|
import { Icon } from '../icon/Icon.js';
|
|
9
|
-
import { useCallback } from 'react';
|
|
10
10
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
11
11
|
|
|
12
12
|
var _excluded = ["className", "onNavigate", "color", "children"];
|
|
@@ -9,7 +9,6 @@ import { usePropToggle } from '../../hooks/usePropToggle.js';
|
|
|
9
9
|
import { CoreIcons } from '../../types/icons.js';
|
|
10
10
|
import { Loading } from '../animations/Animations.js';
|
|
11
11
|
import { Icon } from '../icon/Icon.js';
|
|
12
|
-
import classes from './Panel.module.css';
|
|
13
12
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
14
13
|
|
|
15
14
|
var _excluded = ["children", "className", "titleClassName", "headerClassName", "title", "actions", "icon", "iconBg", "iconColor", "rtlFlip", "panelId", "height", "width", "minHeight", "minWidth", "maxHeight", "maxWidth", "loading", "expandable", "expanded", "onExpand", "collapsable", "collapsed", "onCollapse", "onClose", "onBack"];
|
|
@@ -55,7 +54,7 @@ var Panel = function Panel(_ref) {
|
|
|
55
54
|
return !!expandable || !!collapsable || !!onClose;
|
|
56
55
|
}, [expandable, collapsable, onClose]);
|
|
57
56
|
return /*#__PURE__*/jsxs("div", _objectSpread(_objectSpread({
|
|
58
|
-
className: classNames(
|
|
57
|
+
className: classNames("fabric-panel", className, "rounded-capped overflow-hidden outline grid", expanded ? "fixed inset-4 z-50" : "relative"),
|
|
59
58
|
"data-ref": "panel",
|
|
60
59
|
"data-collapsed": collapsed,
|
|
61
60
|
style: expanded ? {} : collapsed ? {
|
|
@@ -73,12 +72,12 @@ var Panel = function Panel(_ref) {
|
|
|
73
72
|
}, aria), {}, {
|
|
74
73
|
children: [/*#__PURE__*/jsxs("header", {
|
|
75
74
|
role: "none",
|
|
76
|
-
className: classNames(
|
|
75
|
+
className: classNames("fabric-panelHeader", headerClassName, "flex flex-nowrap items-center area-head"),
|
|
77
76
|
"data-ref": "panelHeader",
|
|
78
77
|
onClick: collapsable ? toggleCollapse : undefined,
|
|
79
78
|
children: [onBack && /*#__PURE__*/jsx(Icon, {
|
|
80
79
|
"data-ref": "panelBack",
|
|
81
|
-
className: classNames(
|
|
80
|
+
className: classNames("fabric-panelAction", "cursor-pointer"),
|
|
82
81
|
icon: CoreIcons.chevronLeft,
|
|
83
82
|
onClick: onBack
|
|
84
83
|
}), icon && /*#__PURE__*/jsx(Icon, {
|
|
@@ -101,24 +100,24 @@ var Panel = function Panel(_ref) {
|
|
|
101
100
|
},
|
|
102
101
|
children: [expandable && /*#__PURE__*/jsx(Icon, {
|
|
103
102
|
"data-ref": "panelExpand",
|
|
104
|
-
className: classNames(
|
|
103
|
+
className: classNames("fabric-panelAction", "cursor-pointer"),
|
|
105
104
|
icon: expanded ? CoreIcons.minimize : CoreIcons.maximize,
|
|
106
105
|
onClick: toggleExpand
|
|
107
106
|
}), !expanded && collapsable && /*#__PURE__*/jsx(Icon, {
|
|
108
107
|
"data-ref": "panelCollapse",
|
|
109
|
-
className: classNames(
|
|
108
|
+
className: classNames("fabric-panelAction", "cursor-pointer"),
|
|
110
109
|
icon: collapsed ? CoreIcons.expand : CoreIcons.collapse,
|
|
111
110
|
onClick: toggleCollapse
|
|
112
111
|
}), !expanded && onClose && /*#__PURE__*/jsx(Icon, {
|
|
113
112
|
"data-ref": "panelClose",
|
|
114
|
-
className: classNames(
|
|
113
|
+
className: classNames("fabric-panelAction", "cursor-pointer"),
|
|
115
114
|
icon: CoreIcons.close,
|
|
116
115
|
onClick: onClose
|
|
117
116
|
})]
|
|
118
117
|
})]
|
|
119
118
|
}), (!collapsed || expanded) && /*#__PURE__*/jsxs("div", {
|
|
120
119
|
"data-ref": "panelBody",
|
|
121
|
-
className: classNames(
|
|
120
|
+
className: classNames("fabric-panelBody", "area-content grid overflow-hidden"),
|
|
122
121
|
children: [loading && /*#__PURE__*/jsx(Loading, {}), children]
|
|
123
122
|
})]
|
|
124
123
|
}));
|
|
@@ -4,7 +4,6 @@ import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
|
4
4
|
import classNames from 'classnames';
|
|
5
5
|
import { useState, Children, useCallback, cloneElement } from 'react';
|
|
6
6
|
import { useMemoDebugger, useEffectDebugger } from '../../hooks/useEffectDebugger.js';
|
|
7
|
-
import classes from './Panel.module.css';
|
|
8
7
|
import { jsx } from 'react/jsx-runtime';
|
|
9
8
|
|
|
10
9
|
var PanelGroup = function PanelGroup(_ref) {
|
|
@@ -33,7 +32,7 @@ var PanelGroup = function PanelGroup(_ref) {
|
|
|
33
32
|
}, [onActiveChange, expandedPanel]);
|
|
34
33
|
return /*#__PURE__*/jsx("div", {
|
|
35
34
|
"data-ref": "panelGroup",
|
|
36
|
-
className: classNames(
|
|
35
|
+
className: classNames("fabric-panelGroup", "flex flex-col overflow-auto area-content p-px"),
|
|
37
36
|
children: Children.toArray(children).map(function (child, index) {
|
|
38
37
|
return /*#__PURE__*/cloneElement(child, {
|
|
39
38
|
panelId: child.props.panelId || index,
|
|
@@ -6,8 +6,7 @@ import classNames from 'classnames';
|
|
|
6
6
|
import { useMemoDebugger } from '../../hooks/useEffectDebugger.js';
|
|
7
7
|
import 'react';
|
|
8
8
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
9
|
-
import {
|
|
10
|
-
import classes from './Progress.module.css';
|
|
9
|
+
import { getColor } from '../../utils/getColor.js';
|
|
11
10
|
|
|
12
11
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13
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; }
|
|
@@ -25,7 +24,7 @@ var ProgressBar = function ProgressBar(_ref) {
|
|
|
25
24
|
value = _ref$value === void 0 ? 0 : _ref$value,
|
|
26
25
|
size = _ref.size,
|
|
27
26
|
_ref$color = _ref.color,
|
|
28
|
-
color = _ref$color === void 0 ? "primary" : _ref$color,
|
|
27
|
+
color = _ref$color === void 0 ? "primary-500" : _ref$color,
|
|
29
28
|
_ref$label = _ref.label,
|
|
30
29
|
label = _ref$label === void 0 ? "" : _ref$label,
|
|
31
30
|
animate = _ref.animate;
|
|
@@ -41,8 +40,9 @@ var ProgressBar = function ProgressBar(_ref) {
|
|
|
41
40
|
|
|
42
41
|
/** ***************** component *******************/
|
|
43
42
|
return /*#__PURE__*/jsxs("div", {
|
|
44
|
-
className: classNames(
|
|
43
|
+
className: classNames("fabric-progressbar", "block bg-dimmed relative rounded font-bold overflow-hidden whitespace-nowrap"),
|
|
45
44
|
style: _objectSpread(_objectSpread({}, progressVar), {}, {
|
|
45
|
+
color: getColor(color),
|
|
46
46
|
minHeight: SizeMap[size !== null && size !== void 0 ? size : ""],
|
|
47
47
|
fontSize: SizeMap[size !== null && size !== void 0 ? size : ""]
|
|
48
48
|
}),
|
|
@@ -52,7 +52,7 @@ var ProgressBar = function ProgressBar(_ref) {
|
|
|
52
52
|
className: "absolute inset-0 text-center z-0 align-top",
|
|
53
53
|
children: [label, " ", Format.percent(actualValue / 100)]
|
|
54
54
|
}), /*#__PURE__*/jsx("div", {
|
|
55
|
-
className: classNames(
|
|
55
|
+
className: classNames("fabric-progressTrack", animate && "fabric-progressAnimate", "h-full overflow-clip bg-current relative z-0")
|
|
56
56
|
}), !["xxs", "xs", "sm"].includes(size !== null && size !== void 0 ? size : "") && /*#__PURE__*/jsx("div", {
|
|
57
57
|
className: classNames("h-full absolute inset-0 overflow-hidden z-1"),
|
|
58
58
|
"data-label": "".concat(label, " ").concat(Format.percent(actualValue / 100))
|
|
@@ -5,7 +5,7 @@ import classNames from 'classnames';
|
|
|
5
5
|
import { useMemoDebugger } from '../../hooks/useEffectDebugger.js';
|
|
6
6
|
import 'react';
|
|
7
7
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
8
|
-
import {
|
|
8
|
+
import { getColor } from '../../utils/getColor.js';
|
|
9
9
|
|
|
10
10
|
/*
|
|
11
11
|
* React Fabric
|
|
@@ -43,7 +43,7 @@ var ProgressCircle = function ProgressCircle(_ref) {
|
|
|
43
43
|
_ref$size = _ref.size,
|
|
44
44
|
size = _ref$size === void 0 ? "sm" : _ref$size,
|
|
45
45
|
_ref$color = _ref.color,
|
|
46
|
-
color = _ref$color === void 0 ? "primary" : _ref$color;
|
|
46
|
+
color = _ref$color === void 0 ? "primary-500" : _ref$color;
|
|
47
47
|
/** ***************** make sure value is between 0 and 100 *******************/
|
|
48
48
|
var actualValue = useMemoDebugger(function () {
|
|
49
49
|
return Math.min(Math.max(value, 0), 100);
|
|
@@ -57,10 +57,11 @@ var ProgressCircle = function ProgressCircle(_ref) {
|
|
|
57
57
|
|
|
58
58
|
/** ***************** component *******************/
|
|
59
59
|
return /*#__PURE__*/jsxs("div", {
|
|
60
|
-
className: classNames("inline-block w-[4em] h-[4em] text-lg relative"
|
|
60
|
+
className: classNames("inline-block w-[4em] h-[4em] text-lg relative"),
|
|
61
61
|
"aria-hidden": "true",
|
|
62
62
|
style: {
|
|
63
|
-
fontSize: SizeMap[size]
|
|
63
|
+
fontSize: SizeMap[size],
|
|
64
|
+
color: getColor(color)
|
|
64
65
|
},
|
|
65
66
|
children: [/*#__PURE__*/jsxs("svg", {
|
|
66
67
|
viewBox: "0 0 100 100",
|
|
@@ -16,7 +16,6 @@ import { getBadgeProps, Badge } from '../badge/Badge.js';
|
|
|
16
16
|
import { Icon } from '../icon/Icon.js';
|
|
17
17
|
import '../../types/icons.js';
|
|
18
18
|
import { DropdownTool } from '../dropdown/DropdownTool.js';
|
|
19
|
-
import classes from './TabPanel.module.css';
|
|
20
19
|
|
|
21
20
|
var _excluded = ["ref", "as", "id", "className", "label", "icon", "iconBg", "iconColor", "rtlFlip", "badge", "disabled", "onClose", "active", "onClick", "tabFlex", "color", "actions", "tooltip", "activeClassName"];
|
|
22
21
|
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; }
|
|
@@ -62,7 +61,7 @@ var Tab = function Tab(_ref) {
|
|
|
62
61
|
disabled: disabled,
|
|
63
62
|
"data-color": color,
|
|
64
63
|
"data-inner-clickable": true,
|
|
65
|
-
className: classNames(
|
|
64
|
+
className: classNames("fabric-tabButton", className, active && "active pointer-events-none", active && activeClassName, disabled && "text-tint-500 pointer-events-none", tabFlex ? "flex-1" : "flex-initial max-w-36", minimal ? "min-w-6" : "min-w-18", "flex items-center justify-center px-1 rounded overflow-hidden"),
|
|
66
65
|
onClick: function onClick() {
|
|
67
66
|
return !active && (_onClick === null || _onClick === void 0 ? void 0 : _onClick(id));
|
|
68
67
|
},
|
|
@@ -7,7 +7,6 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
7
7
|
import '@react-fabric/utilities';
|
|
8
8
|
import { nodeCheck } from '../../utils/nodeCheck.js';
|
|
9
9
|
import { Tab } from './Tab.js';
|
|
10
|
-
import classes from './TabPanel.module.css';
|
|
11
10
|
|
|
12
11
|
// TODO: implement append/prepend tab-bar items
|
|
13
12
|
|
|
@@ -56,13 +55,13 @@ var TabPanel = function TabPanel(_ref) {
|
|
|
56
55
|
});
|
|
57
56
|
}, [onBeforeChange, onChange, active]);
|
|
58
57
|
return /*#__PURE__*/jsxs("div", {
|
|
59
|
-
className: classNames(
|
|
58
|
+
className: classNames("fabric-tabPanel", "area-content grid bg-base overflow-hidden"),
|
|
60
59
|
"data-orientation": orientation,
|
|
61
60
|
"data-variant": variant !== null && variant !== void 0 ? variant : "default",
|
|
62
61
|
children: [/*#__PURE__*/jsxs("div", {
|
|
63
|
-
className: classNames(
|
|
62
|
+
className: classNames("fabric-tabHeader", headerClassName, justify && "justify-".concat(justify), ["start", "end"].includes(orientation) && "flex-col", "flex flex-nowrap overflow-hidden items-center"),
|
|
64
63
|
children: [prepend, /*#__PURE__*/jsx("div", {
|
|
65
|
-
className: classNames(
|
|
64
|
+
className: classNames("fabric-tabList", justify && "justify-".concat(justify), ["start", "end"].includes(orientation) && "flex-col", ["bottom", "end"].includes(orientation) ? "self-start" : "self-end", "flex flex-1 flex-nowrap overflow-auto scroll-thin"),
|
|
66
65
|
style: {
|
|
67
66
|
gap: gap
|
|
68
67
|
},
|
|
@@ -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,7 +102,7 @@ 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,
|
|
109
108
|
"data-loading": loading,
|
|
@@ -112,14 +111,14 @@ var Aside = function Aside(_ref) {
|
|
|
112
111
|
"data-testid": testId,
|
|
113
112
|
"data-test-value": testValue,
|
|
114
113
|
children: [/*#__PURE__*/jsxs("header", {
|
|
115
|
-
className: classNames(
|
|
114
|
+
className: classNames("fabric-asideHeader", headerClassName, "grid area-head items-center"),
|
|
116
115
|
"data-ref": "asideHeader",
|
|
117
116
|
children: [title && /*#__PURE__*/jsx("div", {
|
|
118
|
-
className: classNames(
|
|
117
|
+
className: classNames("fabric-asideTitle", "truncate py-0.5 px-1 select-none pointer-events-none"),
|
|
119
118
|
children: title
|
|
120
119
|
}), collapsable && /*#__PURE__*/jsx(Icon, {
|
|
121
120
|
"aria-label": isCollapsed ? "expand" : "collapse",
|
|
122
|
-
className: classNames(
|
|
121
|
+
className: classNames("fabric-asideCollapse", "p-2 select-none"),
|
|
123
122
|
icon: CoreIcons.chevronLeft,
|
|
124
123
|
rtlFlip: true,
|
|
125
124
|
onClick: toggleCollapse,
|
|
@@ -129,26 +128,26 @@ var Aside = function Aside(_ref) {
|
|
|
129
128
|
bg: iconBg,
|
|
130
129
|
color: iconColor,
|
|
131
130
|
rtlFlip: rtlFlip,
|
|
132
|
-
className: classNames(
|
|
131
|
+
className: classNames("fabric-asideIcon", "p-1 text-lg select-none pointer-events-none")
|
|
133
132
|
}), actions && /*#__PURE__*/jsx("div", {
|
|
134
|
-
className:
|
|
133
|
+
className: "fabric-asideActions",
|
|
135
134
|
children: actions
|
|
136
135
|
})]
|
|
137
136
|
}), loading && /*#__PURE__*/jsx(Loading, {}), isCollapsed && /*#__PURE__*/jsx("div", {
|
|
138
137
|
role: "none",
|
|
139
138
|
onClick: tryPeek,
|
|
140
139
|
"data-ref": "asidePlaceholder",
|
|
141
|
-
className:
|
|
140
|
+
className: "fabric-asidePlaceholder"
|
|
142
141
|
}), /*#__PURE__*/jsx("section", {
|
|
143
142
|
ref: elementRef,
|
|
144
143
|
"data-ref": "asideBody",
|
|
145
|
-
className: classNames(
|
|
144
|
+
className: classNames("fabric-asideBody", bodyClassName, "overflow-hidden grid"),
|
|
146
145
|
style: isCollapsed ? widthStyles : undefined,
|
|
147
146
|
children: /*#__PURE__*/jsx(ErrorBoundary, {
|
|
148
147
|
children: children
|
|
149
148
|
})
|
|
150
149
|
}), resizeable && /*#__PURE__*/jsx("div", _objectSpread(_objectSpread({}, resizeHandleProps), {}, {
|
|
151
|
-
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")
|
|
152
151
|
}))]
|
|
153
152
|
});
|
|
154
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
|
/*
|
|
@@ -63,7 +62,7 @@ var Content = function Content(_ref) {
|
|
|
63
62
|
"data-test-value": testValue,
|
|
64
63
|
ref: resizeHandle,
|
|
65
64
|
onScroll: scrollHandler,
|
|
66
|
-
className: classNames(
|
|
65
|
+
className: classNames("fabric-content", "area-content", className),
|
|
67
66
|
children: /*#__PURE__*/jsx(ErrorBoundary, {
|
|
68
67
|
children: children
|
|
69
68
|
})
|
|
@@ -3,22 +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 'react';
|
|
8
6
|
import { jsx } from 'react/jsx-runtime';
|
|
9
|
-
import { getColor, getBgClass, getColorClass } from '../../utils/getColor.js';
|
|
10
|
-
import '@react-fabric/utilities';
|
|
11
|
-
import classes from './HeadFoot.module.css';
|
|
12
7
|
|
|
13
|
-
var _excluded = ["as", "children", "className", "
|
|
8
|
+
var _excluded = ["as", "children", "className", "flex", "area", "dir", "align", "justify"];
|
|
14
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; }
|
|
15
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; }
|
|
16
11
|
var HeadFoot = function HeadFoot(_ref) {
|
|
17
12
|
var E = _ref.as,
|
|
18
13
|
children = _ref.children,
|
|
19
14
|
className = _ref.className,
|
|
20
|
-
bg = _ref.bg,
|
|
21
|
-
color = _ref.color,
|
|
22
15
|
flex = _ref.flex,
|
|
23
16
|
area = _ref.area,
|
|
24
17
|
dir = _ref.dir,
|
|
@@ -27,21 +20,9 @@ var HeadFoot = function HeadFoot(_ref) {
|
|
|
27
20
|
_ref$justify = _ref.justify,
|
|
28
21
|
justify = _ref$justify === void 0 ? "start" : _ref$justify,
|
|
29
22
|
aria = _objectWithoutProperties(_ref, _excluded);
|
|
30
|
-
/** ***************** style map *******************/
|
|
31
|
-
var styles = useMemoDebugger(function () {
|
|
32
|
-
var s = {};
|
|
33
|
-
if (bg) {
|
|
34
|
-
s.backgroundColor = getColor(bg);
|
|
35
|
-
}
|
|
36
|
-
if (color) {
|
|
37
|
-
s.color = getColor(color);
|
|
38
|
-
}
|
|
39
|
-
return s;
|
|
40
|
-
}, [bg], "HeadFoot styles");
|
|
41
23
|
return /*#__PURE__*/jsx(E, _objectSpread(_objectSpread({
|
|
42
24
|
dir: dir,
|
|
43
|
-
className: classNames(
|
|
44
|
-
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))
|
|
45
26
|
}, aria), {}, {
|
|
46
27
|
children: children
|
|
47
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
|
/*
|
|
@@ -48,10 +47,10 @@ var Page = function Page(_ref) {
|
|
|
48
47
|
"data-testid": testId,
|
|
49
48
|
"data-test-value": testValue,
|
|
50
49
|
"data-loading": loading,
|
|
51
|
-
className: classNames(
|
|
50
|
+
className: classNames("fabric-page", "overflow-hidden grid area-content", paper && "shadow-paper m-[6px] rounded-capped"),
|
|
52
51
|
children: [title && /*#__PURE__*/jsxs("div", {
|
|
53
52
|
"data-ref": "pageTitle",
|
|
54
|
-
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),
|
|
55
54
|
children: [icon && /*#__PURE__*/jsx(Icon, {
|
|
56
55
|
icon: icon,
|
|
57
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-initial", flex === "content" && "flex-content", 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
|
};
|
|
@@ -12,9 +12,8 @@ import { Icon } from '../../components/icon/Icon.js';
|
|
|
12
12
|
import { CoreIcons } from '../../types/icons.js';
|
|
13
13
|
import { Title } from '../../typography/Title.js';
|
|
14
14
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
15
|
-
import {
|
|
15
|
+
import { getColor } from '../../utils/getColor.js';
|
|
16
16
|
import '@react-fabric/utilities';
|
|
17
|
-
import classes from './Alert.module.css';
|
|
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]);
|
|
@@ -107,7 +106,10 @@ var Alert = function Alert(_ref) {
|
|
|
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", {
|
|
@@ -122,7 +124,11 @@ var Alert = function Alert(_ref) {
|
|
|
122
124
|
}), type === "prompt" && /*#__PURE__*/jsx("input", {
|
|
123
125
|
value: value,
|
|
124
126
|
placeholder: placeholder,
|
|
125
|
-
className: classNames("area-[input] appearance-none outline-0
|
|
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();
|