@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
|
@@ -22,17 +22,18 @@
|
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
24
|
import classNames from "classnames";
|
|
25
|
+
import { useCallback } from "react";
|
|
25
26
|
import { HotKey } from "../../hotkeys/HotKey";
|
|
26
27
|
import {
|
|
27
|
-
type ChildProp,
|
|
28
28
|
type AriaProps,
|
|
29
|
+
type ChildProp,
|
|
29
30
|
type ColorType,
|
|
30
31
|
type CssProp,
|
|
32
|
+
type PaletteType,
|
|
31
33
|
type TestProps,
|
|
32
34
|
} from "../../types";
|
|
33
35
|
import { CoreIcons } from "../../types/icons";
|
|
34
36
|
import { Icon } from "../icon/Icon";
|
|
35
|
-
import { useCallback } from "react";
|
|
36
37
|
|
|
37
38
|
export interface NavigatorProps
|
|
38
39
|
extends CssProp,
|
|
@@ -42,7 +43,7 @@ export interface NavigatorProps
|
|
|
42
43
|
/**
|
|
43
44
|
* navigator button color
|
|
44
45
|
*/
|
|
45
|
-
color?: ColorType | string;
|
|
46
|
+
color?: ColorType | PaletteType | string;
|
|
46
47
|
/**
|
|
47
48
|
* navigation handler
|
|
48
49
|
*/
|
|
@@ -38,7 +38,6 @@ import {
|
|
|
38
38
|
import { CoreIcons } from "../../types/icons";
|
|
39
39
|
import { Loading } from "../animations/Animations";
|
|
40
40
|
import { Icon } from "../icon/Icon";
|
|
41
|
-
import classes from "./Panel.module.css";
|
|
42
41
|
|
|
43
42
|
export interface PanelProps
|
|
44
43
|
extends CssProp,
|
|
@@ -146,7 +145,7 @@ export const Panel = ({
|
|
|
146
145
|
return (
|
|
147
146
|
<div
|
|
148
147
|
className={classNames(
|
|
149
|
-
|
|
148
|
+
"fabric-panel",
|
|
150
149
|
className,
|
|
151
150
|
"rounded-capped overflow-hidden outline grid",
|
|
152
151
|
expanded ? "fixed inset-4 z-50" : "relative",
|
|
@@ -172,7 +171,7 @@ export const Panel = ({
|
|
|
172
171
|
<header
|
|
173
172
|
role="none"
|
|
174
173
|
className={classNames(
|
|
175
|
-
|
|
174
|
+
"fabric-panelHeader",
|
|
176
175
|
headerClassName,
|
|
177
176
|
"flex flex-nowrap items-center area-head",
|
|
178
177
|
)}
|
|
@@ -182,7 +181,7 @@ export const Panel = ({
|
|
|
182
181
|
{onBack && (
|
|
183
182
|
<Icon
|
|
184
183
|
data-ref="panelBack"
|
|
185
|
-
className={classNames(
|
|
184
|
+
className={classNames("fabric-panelAction", "cursor-pointer")}
|
|
186
185
|
icon={CoreIcons.chevronLeft}
|
|
187
186
|
onClick={onBack}
|
|
188
187
|
/>
|
|
@@ -215,7 +214,7 @@ export const Panel = ({
|
|
|
215
214
|
{expandable && (
|
|
216
215
|
<Icon
|
|
217
216
|
data-ref="panelExpand"
|
|
218
|
-
className={classNames(
|
|
217
|
+
className={classNames("fabric-panelAction", "cursor-pointer")}
|
|
219
218
|
icon={expanded ? CoreIcons.minimize : CoreIcons.maximize}
|
|
220
219
|
onClick={toggleExpand}
|
|
221
220
|
/>
|
|
@@ -223,7 +222,7 @@ export const Panel = ({
|
|
|
223
222
|
{!expanded && collapsable && (
|
|
224
223
|
<Icon
|
|
225
224
|
data-ref="panelCollapse"
|
|
226
|
-
className={classNames(
|
|
225
|
+
className={classNames("fabric-panelAction", "cursor-pointer")}
|
|
227
226
|
icon={collapsed ? CoreIcons.expand : CoreIcons.collapse}
|
|
228
227
|
onClick={toggleCollapse}
|
|
229
228
|
/>
|
|
@@ -231,7 +230,7 @@ export const Panel = ({
|
|
|
231
230
|
{!expanded && onClose && (
|
|
232
231
|
<Icon
|
|
233
232
|
data-ref="panelClose"
|
|
234
|
-
className={classNames(
|
|
233
|
+
className={classNames("fabric-panelAction", "cursor-pointer")}
|
|
235
234
|
icon={CoreIcons.close}
|
|
236
235
|
onClick={onClose}
|
|
237
236
|
/>
|
|
@@ -243,7 +242,7 @@ export const Panel = ({
|
|
|
243
242
|
<div
|
|
244
243
|
data-ref="panelBody"
|
|
245
244
|
className={classNames(
|
|
246
|
-
|
|
245
|
+
"fabric-panelBody",
|
|
247
246
|
"area-content grid overflow-hidden",
|
|
248
247
|
)}
|
|
249
248
|
>
|
|
@@ -28,7 +28,6 @@ import {
|
|
|
28
28
|
useMemoDebugger,
|
|
29
29
|
} from "../../hooks/useEffectDebugger";
|
|
30
30
|
import { type ChildrenProp } from "../../types";
|
|
31
|
-
import classes from "./Panel.module.css";
|
|
32
31
|
|
|
33
32
|
export interface PanelGroupProps extends ChildrenProp {
|
|
34
33
|
/**
|
|
@@ -81,7 +80,7 @@ export const PanelGroup = ({
|
|
|
81
80
|
<div
|
|
82
81
|
data-ref="panelGroup"
|
|
83
82
|
className={classNames(
|
|
84
|
-
|
|
83
|
+
"fabric-panelGroup",
|
|
85
84
|
"flex flex-col overflow-auto area-content p-px",
|
|
86
85
|
)}
|
|
87
86
|
>
|
|
@@ -24,9 +24,8 @@
|
|
|
24
24
|
import { Format } from "@react-fabric/utilities";
|
|
25
25
|
import classNames from "classnames";
|
|
26
26
|
import { useMemoDebugger } from "../../hooks/useEffectDebugger";
|
|
27
|
-
import { type ColorType } from "../../types";
|
|
28
|
-
import {
|
|
29
|
-
import classes from "./Progress.module.css";
|
|
27
|
+
import { type PaletteType, type ColorType } from "../../types";
|
|
28
|
+
import { getColor } from "../../utils";
|
|
30
29
|
|
|
31
30
|
export interface ProgressProps {
|
|
32
31
|
/**
|
|
@@ -40,7 +39,7 @@ export interface ProgressProps {
|
|
|
40
39
|
/**
|
|
41
40
|
* color
|
|
42
41
|
*/
|
|
43
|
-
color?: ColorType;
|
|
42
|
+
color?: ColorType | PaletteType;
|
|
44
43
|
/**
|
|
45
44
|
* animate
|
|
46
45
|
*/
|
|
@@ -64,7 +63,7 @@ const SizeMap: KeyValue = {
|
|
|
64
63
|
export const ProgressBar = ({
|
|
65
64
|
value = 0,
|
|
66
65
|
size,
|
|
67
|
-
color = "primary",
|
|
66
|
+
color = "primary-500",
|
|
68
67
|
label = "",
|
|
69
68
|
animate,
|
|
70
69
|
}: ProgressProps) => {
|
|
@@ -87,12 +86,12 @@ export const ProgressBar = ({
|
|
|
87
86
|
return (
|
|
88
87
|
<div
|
|
89
88
|
className={classNames(
|
|
90
|
-
|
|
91
|
-
getColorClass(color),
|
|
89
|
+
"fabric-progressbar",
|
|
92
90
|
"block bg-dimmed relative rounded font-bold overflow-hidden whitespace-nowrap",
|
|
93
91
|
)}
|
|
94
92
|
style={{
|
|
95
93
|
...progressVar,
|
|
94
|
+
color: getColor(color),
|
|
96
95
|
minHeight: SizeMap[size ?? ""],
|
|
97
96
|
fontSize: SizeMap[size ?? ""],
|
|
98
97
|
}}
|
|
@@ -106,8 +105,8 @@ export const ProgressBar = ({
|
|
|
106
105
|
)}
|
|
107
106
|
<div
|
|
108
107
|
className={classNames(
|
|
109
|
-
|
|
110
|
-
animate &&
|
|
108
|
+
"fabric-progressTrack",
|
|
109
|
+
animate && "fabric-progressAnimate",
|
|
111
110
|
"h-full overflow-clip bg-current relative z-0",
|
|
112
111
|
)}
|
|
113
112
|
/>
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
import { Format } from "@react-fabric/utilities";
|
|
25
25
|
import classNames from "classnames";
|
|
26
26
|
import { useMemoDebugger } from "../../hooks/useEffectDebugger";
|
|
27
|
-
import { type ColorType } from "../../types";
|
|
28
|
-
import {
|
|
27
|
+
import { type PaletteType, type ColorType } from "../../types";
|
|
28
|
+
import { getColor } from "../../utils";
|
|
29
29
|
|
|
30
30
|
export interface ProgressProps {
|
|
31
31
|
/**
|
|
@@ -39,7 +39,7 @@ export interface ProgressProps {
|
|
|
39
39
|
/**
|
|
40
40
|
* color
|
|
41
41
|
*/
|
|
42
|
-
color?: ColorType;
|
|
42
|
+
color?: ColorType | PaletteType;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
const SizeMap: KeyValue = {
|
|
@@ -53,7 +53,7 @@ const SizeMap: KeyValue = {
|
|
|
53
53
|
export const ProgressCircle = ({
|
|
54
54
|
value = 0,
|
|
55
55
|
size = "sm",
|
|
56
|
-
color = "primary",
|
|
56
|
+
color = "primary-500",
|
|
57
57
|
}: ProgressProps) => {
|
|
58
58
|
/** ***************** make sure value is between 0 and 100 *******************/
|
|
59
59
|
const actualValue = useMemoDebugger(
|
|
@@ -75,12 +75,9 @@ export const ProgressCircle = ({
|
|
|
75
75
|
/** ***************** component *******************/
|
|
76
76
|
return (
|
|
77
77
|
<div
|
|
78
|
-
className={classNames(
|
|
79
|
-
"inline-block w-[4em] h-[4em] text-lg relative",
|
|
80
|
-
getColorClass(color),
|
|
81
|
-
)}
|
|
78
|
+
className={classNames("inline-block w-[4em] h-[4em] text-lg relative")}
|
|
82
79
|
aria-hidden="true"
|
|
83
|
-
style={{ fontSize: SizeMap[size] }}
|
|
80
|
+
style={{ fontSize: SizeMap[size], color: getColor(color) }}
|
|
84
81
|
>
|
|
85
82
|
<svg
|
|
86
83
|
viewBox="0 0 100 100"
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
type BadgeType,
|
|
31
31
|
type CallbackReturn,
|
|
32
32
|
type ChildrenProp,
|
|
33
|
-
type
|
|
33
|
+
type ColorState,
|
|
34
34
|
type CssProp,
|
|
35
35
|
type IconProps,
|
|
36
36
|
type PolymorphicProps,
|
|
@@ -41,7 +41,6 @@ import {
|
|
|
41
41
|
import { Badge, getBadgeProps } from "../badge/Badge";
|
|
42
42
|
import { DropdownTool } from "../dropdown/DropdownTool";
|
|
43
43
|
import { Icon } from "../icon/Icon";
|
|
44
|
-
import classes from "./TabPanel.module.css";
|
|
45
44
|
|
|
46
45
|
export interface TabProps
|
|
47
46
|
extends Partial<ChildrenProp>,
|
|
@@ -62,7 +61,7 @@ export interface TabProps
|
|
|
62
61
|
/**
|
|
63
62
|
* tab color
|
|
64
63
|
*/
|
|
65
|
-
color?:
|
|
64
|
+
color?: ColorState;
|
|
66
65
|
/**
|
|
67
66
|
* tab badge
|
|
68
67
|
*/
|
|
@@ -138,7 +137,7 @@ export const Tab = <Tag extends React.ElementType = "button">({
|
|
|
138
137
|
data-color={color}
|
|
139
138
|
data-inner-clickable
|
|
140
139
|
className={classNames(
|
|
141
|
-
|
|
140
|
+
"fabric-tabButton",
|
|
142
141
|
className,
|
|
143
142
|
active && "active pointer-events-none",
|
|
144
143
|
active && activeClassName,
|
|
@@ -34,7 +34,6 @@ import {
|
|
|
34
34
|
import { type CallbackReturn, type ChildrenProp } from "../../types";
|
|
35
35
|
import { nodeCheck } from "../../utils";
|
|
36
36
|
import { Tab } from "./Tab";
|
|
37
|
-
import classes from "./TabPanel.module.css";
|
|
38
37
|
|
|
39
38
|
export interface TabPanelProps extends ChildrenProp<typeof Tab> {
|
|
40
39
|
/**
|
|
@@ -135,7 +134,7 @@ export const TabPanel = ({
|
|
|
135
134
|
return (
|
|
136
135
|
<div
|
|
137
136
|
className={classNames(
|
|
138
|
-
|
|
137
|
+
"fabric-tabPanel",
|
|
139
138
|
"area-content grid bg-base overflow-hidden",
|
|
140
139
|
)}
|
|
141
140
|
data-orientation={orientation}
|
|
@@ -143,7 +142,7 @@ export const TabPanel = ({
|
|
|
143
142
|
>
|
|
144
143
|
<div
|
|
145
144
|
className={classNames(
|
|
146
|
-
|
|
145
|
+
"fabric-tabHeader",
|
|
147
146
|
headerClassName,
|
|
148
147
|
justify && `justify-${justify}`,
|
|
149
148
|
["start", "end"].includes(orientation) && "flex-col",
|
|
@@ -153,7 +152,7 @@ export const TabPanel = ({
|
|
|
153
152
|
{prepend}
|
|
154
153
|
<div
|
|
155
154
|
className={classNames(
|
|
156
|
-
|
|
155
|
+
"fabric-tabList",
|
|
157
156
|
justify && `justify-${justify}`,
|
|
158
157
|
["start", "end"].includes(orientation) && "flex-col",
|
|
159
158
|
["bottom", "end"].includes(orientation) ? "self-start" : "self-end",
|
package/src/core/aside/Aside.tsx
CHANGED
|
@@ -45,7 +45,6 @@ import {
|
|
|
45
45
|
} from "../../types";
|
|
46
46
|
import { CoreIcons } from "../../types/icons";
|
|
47
47
|
import { ErrorBoundary } from "../boundary/ErrorBoundary";
|
|
48
|
-
import classes from "./Aside.module.css";
|
|
49
48
|
|
|
50
49
|
export interface AsideProps
|
|
51
50
|
extends IconProps,
|
|
@@ -197,7 +196,7 @@ export const Aside = ({
|
|
|
197
196
|
|
|
198
197
|
return (
|
|
199
198
|
<aside
|
|
200
|
-
className={classNames(
|
|
199
|
+
className={classNames("fabric-aside", className, "overflow-hidden grid")}
|
|
201
200
|
data-align={align}
|
|
202
201
|
data-flyout={peek}
|
|
203
202
|
data-loading={loading}
|
|
@@ -208,7 +207,7 @@ export const Aside = ({
|
|
|
208
207
|
>
|
|
209
208
|
<header
|
|
210
209
|
className={classNames(
|
|
211
|
-
|
|
210
|
+
"fabric-asideHeader",
|
|
212
211
|
headerClassName,
|
|
213
212
|
"grid area-head items-center",
|
|
214
213
|
)}
|
|
@@ -217,7 +216,7 @@ export const Aside = ({
|
|
|
217
216
|
{title && (
|
|
218
217
|
<div
|
|
219
218
|
className={classNames(
|
|
220
|
-
|
|
219
|
+
"fabric-asideTitle",
|
|
221
220
|
"truncate py-0.5 px-1 select-none pointer-events-none",
|
|
222
221
|
)}
|
|
223
222
|
>
|
|
@@ -227,7 +226,7 @@ export const Aside = ({
|
|
|
227
226
|
{collapsable && (
|
|
228
227
|
<Icon
|
|
229
228
|
aria-label={isCollapsed ? "expand" : "collapse"}
|
|
230
|
-
className={classNames(
|
|
229
|
+
className={classNames("fabric-asideCollapse", "p-2 select-none")}
|
|
231
230
|
icon={CoreIcons.chevronLeft}
|
|
232
231
|
rtlFlip
|
|
233
232
|
onClick={toggleCollapse}
|
|
@@ -241,12 +240,12 @@ export const Aside = ({
|
|
|
241
240
|
color={iconColor}
|
|
242
241
|
rtlFlip={rtlFlip}
|
|
243
242
|
className={classNames(
|
|
244
|
-
|
|
243
|
+
"fabric-asideIcon",
|
|
245
244
|
"p-1 text-lg select-none pointer-events-none",
|
|
246
245
|
)}
|
|
247
246
|
/>
|
|
248
247
|
)}
|
|
249
|
-
{actions && <div className={
|
|
248
|
+
{actions && <div className={"fabric-asideActions"}>{actions}</div>}
|
|
250
249
|
</header>
|
|
251
250
|
{loading && <Loading />}
|
|
252
251
|
{isCollapsed && (
|
|
@@ -254,14 +253,14 @@ export const Aside = ({
|
|
|
254
253
|
role="none"
|
|
255
254
|
onClick={tryPeek}
|
|
256
255
|
data-ref="asidePlaceholder"
|
|
257
|
-
className={
|
|
256
|
+
className={"fabric-asidePlaceholder"}
|
|
258
257
|
/>
|
|
259
258
|
)}
|
|
260
259
|
<section
|
|
261
260
|
ref={elementRef}
|
|
262
261
|
data-ref="asideBody"
|
|
263
262
|
className={classNames(
|
|
264
|
-
|
|
263
|
+
"fabric-asideBody",
|
|
265
264
|
bodyClassName,
|
|
266
265
|
"overflow-hidden grid",
|
|
267
266
|
)}
|
|
@@ -273,7 +272,7 @@ export const Aside = ({
|
|
|
273
272
|
<div
|
|
274
273
|
{...resizeHandleProps}
|
|
275
274
|
className={classNames(
|
|
276
|
-
|
|
275
|
+
"fabric-asideResizer",
|
|
277
276
|
"before:absolute before:inset-0 before:w-1 before:top-1/2 before:-translate-y-1/2 before:transition-all",
|
|
278
277
|
)}
|
|
279
278
|
/>
|
|
@@ -29,7 +29,6 @@ import { Fragment } from "react/jsx-runtime";
|
|
|
29
29
|
import { useMemoDebugger } from "../../hooks/useEffectDebugger";
|
|
30
30
|
import { usePropToggle } from "../../hooks/usePropToggle";
|
|
31
31
|
import { type ChildrenProp } from "../../types";
|
|
32
|
-
import classes from "./ErrorBoundary.module.css";
|
|
33
32
|
import { ErrorIcon } from "./ErrorIcon";
|
|
34
33
|
import { useGlobals } from "../../context/Global";
|
|
35
34
|
|
|
@@ -53,7 +52,7 @@ const ErrorMessage = ({ error, errorElement }: KeyValue) => {
|
|
|
53
52
|
return (
|
|
54
53
|
<Fragment>
|
|
55
54
|
<ErrorIcon />
|
|
56
|
-
<div className={classNames(
|
|
55
|
+
<div className={classNames("fabric-boundaryMessage", "p-2")}>
|
|
57
56
|
<EE error={error} />
|
|
58
57
|
</div>
|
|
59
58
|
</Fragment>
|
|
@@ -64,10 +63,12 @@ const ErrorStack = ({ error, stack }: KeyValue) => {
|
|
|
64
63
|
const [show, toggleShow] = usePropToggle(false);
|
|
65
64
|
useLogger().error(error, {}, stack);
|
|
66
65
|
return (
|
|
67
|
-
<div
|
|
66
|
+
<div
|
|
67
|
+
className={classNames("fabric-boundaryDetail", "overflow-hidden grid")}
|
|
68
|
+
>
|
|
68
69
|
<div
|
|
69
70
|
className={classNames(
|
|
70
|
-
|
|
71
|
+
"fabric-boundaryLink",
|
|
71
72
|
"px-2 py-1 text-xs text-end",
|
|
72
73
|
)}
|
|
73
74
|
>
|
|
@@ -78,7 +79,7 @@ const ErrorStack = ({ error, stack }: KeyValue) => {
|
|
|
78
79
|
{show && (
|
|
79
80
|
<div
|
|
80
81
|
className={classNames(
|
|
81
|
-
|
|
82
|
+
"fabric-boundaryStack",
|
|
82
83
|
"overflow-auto p-2 text-xs border-t",
|
|
83
84
|
)}
|
|
84
85
|
>
|
|
@@ -122,13 +123,13 @@ export class ErrorBoundary extends Component<
|
|
|
122
123
|
return (
|
|
123
124
|
<div
|
|
124
125
|
className={classNames(
|
|
125
|
-
|
|
126
|
+
"fabric-errorBoundary",
|
|
126
127
|
"grid grid-rows-1 overflow-hidden p-0.5 rounded-capped",
|
|
127
128
|
)}
|
|
128
129
|
>
|
|
129
130
|
<div
|
|
130
131
|
className={classNames(
|
|
131
|
-
|
|
132
|
+
"fabric-boundaryContent",
|
|
132
133
|
"overflow-hidden grid rounded-capped",
|
|
133
134
|
)}
|
|
134
135
|
>
|
|
@@ -22,13 +22,12 @@
|
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
24
|
import classNames from "classnames";
|
|
25
|
-
import classes from "./ErrorBoundary.module.css";
|
|
26
25
|
|
|
27
26
|
export const ErrorIcon = () => (
|
|
28
27
|
<svg
|
|
29
28
|
xmlns="http://www.w3.org/2000/svg"
|
|
30
29
|
viewBox="0 0 64 64"
|
|
31
|
-
className={classNames(
|
|
30
|
+
className={classNames("fabric-boundaryIcon", "size-6 m-2")}
|
|
32
31
|
>
|
|
33
32
|
<path
|
|
34
33
|
fill="#808080"
|
|
@@ -34,7 +34,6 @@ import {
|
|
|
34
34
|
type TestProps,
|
|
35
35
|
} from "../../types";
|
|
36
36
|
import { ErrorBoundary } from "../boundary/ErrorBoundary";
|
|
37
|
-
import classes from "./Content.module.css";
|
|
38
37
|
|
|
39
38
|
export interface ContentProps
|
|
40
39
|
extends ChildrenProp,
|
|
@@ -89,7 +88,7 @@ export const Content = ({
|
|
|
89
88
|
data-test-value={testValue}
|
|
90
89
|
ref={resizeHandle}
|
|
91
90
|
onScroll={scrollHandler}
|
|
92
|
-
className={classNames(
|
|
91
|
+
className={classNames("fabric-content", "area-content", className)}
|
|
93
92
|
>
|
|
94
93
|
<ErrorBoundary>{children}</ErrorBoundary>
|
|
95
94
|
</section>
|
|
@@ -22,27 +22,15 @@
|
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
24
|
import classNames from "classnames";
|
|
25
|
-
import { useMemoDebugger } from "../../hooks/useEffectDebugger";
|
|
26
25
|
import {
|
|
27
26
|
type AriaProps,
|
|
28
27
|
type ChildrenProp,
|
|
29
|
-
type ColorWithGrays,
|
|
30
28
|
type CssProp,
|
|
31
29
|
type TestProps,
|
|
32
30
|
} from "../../types";
|
|
33
|
-
import { getBgClass, getColor, getColorClass } from "../../utils";
|
|
34
|
-
import classes from "./HeadFoot.module.css";
|
|
35
31
|
|
|
36
32
|
interface BaseProps extends CssProp, AriaProps, ChildrenProp, TestProps {
|
|
37
33
|
dir?: "ltr" | "rtl";
|
|
38
|
-
/**
|
|
39
|
-
* background color
|
|
40
|
-
*/
|
|
41
|
-
bg?: ColorWithGrays | string;
|
|
42
|
-
/**
|
|
43
|
-
* background color
|
|
44
|
-
*/
|
|
45
|
-
color?: ColorWithGrays | string;
|
|
46
34
|
}
|
|
47
35
|
|
|
48
36
|
type DefaultProps = BaseProps & { flex?: false };
|
|
@@ -58,8 +46,6 @@ const HeadFoot = ({
|
|
|
58
46
|
as: E,
|
|
59
47
|
children,
|
|
60
48
|
className,
|
|
61
|
-
bg,
|
|
62
|
-
color,
|
|
63
49
|
flex,
|
|
64
50
|
area,
|
|
65
51
|
dir,
|
|
@@ -67,37 +53,18 @@ const HeadFoot = ({
|
|
|
67
53
|
justify = "start",
|
|
68
54
|
...aria
|
|
69
55
|
}: KeyValue & { as: "header" | "footer" }) => {
|
|
70
|
-
/** ***************** style map *******************/
|
|
71
|
-
const styles = useMemoDebugger(
|
|
72
|
-
() => {
|
|
73
|
-
const s: KeyValue = {};
|
|
74
|
-
if (bg) {
|
|
75
|
-
s.backgroundColor = getColor(bg);
|
|
76
|
-
}
|
|
77
|
-
if (color) {
|
|
78
|
-
s.color = getColor(color);
|
|
79
|
-
}
|
|
80
|
-
return s;
|
|
81
|
-
},
|
|
82
|
-
[bg],
|
|
83
|
-
"HeadFoot styles",
|
|
84
|
-
);
|
|
85
|
-
|
|
86
56
|
return (
|
|
87
57
|
<E
|
|
88
58
|
dir={dir}
|
|
89
59
|
className={classNames(
|
|
90
|
-
|
|
60
|
+
"fabric-headfoot",
|
|
91
61
|
className,
|
|
92
|
-
bg && getBgClass(bg),
|
|
93
|
-
color && getColorClass(color),
|
|
94
62
|
area === "head" ? "area-head" : "area-foot",
|
|
95
63
|
`leading-none`,
|
|
96
64
|
flex && "flex flex-nowrap",
|
|
97
65
|
align && `items-${align}`,
|
|
98
66
|
justify && `justify-${justify}`,
|
|
99
67
|
)}
|
|
100
|
-
style={styles}
|
|
101
68
|
{...aria}
|
|
102
69
|
>
|
|
103
70
|
{children}
|
package/src/core/page/Page.tsx
CHANGED
|
@@ -25,7 +25,6 @@ import classNames from "classnames";
|
|
|
25
25
|
import { Loading } from "../../components/animations/Animations";
|
|
26
26
|
import { Icon } from "../../components/icon/Icon";
|
|
27
27
|
import { type ChildrenProp, type IconProps, type TestProps } from "../../types";
|
|
28
|
-
import classes from "./Page.module.css";
|
|
29
28
|
|
|
30
29
|
export interface PageProps extends IconProps, ChildrenProp, TestProps {
|
|
31
30
|
/**
|
|
@@ -68,7 +67,7 @@ export const Page = ({
|
|
|
68
67
|
data-test-value={testValue}
|
|
69
68
|
data-loading={loading}
|
|
70
69
|
className={classNames(
|
|
71
|
-
|
|
70
|
+
"fabric-page",
|
|
72
71
|
"overflow-hidden grid area-content",
|
|
73
72
|
paper && "shadow-paper m-[6px] rounded-capped",
|
|
74
73
|
)}
|
|
@@ -77,7 +76,7 @@ export const Page = ({
|
|
|
77
76
|
<div
|
|
78
77
|
data-ref="pageTitle"
|
|
79
78
|
className={classNames(
|
|
80
|
-
|
|
79
|
+
"fabric-pageTitle",
|
|
81
80
|
"select-none flex gap-1 items-center justify-center px-1 py-0.5 font-medium text-center",
|
|
82
81
|
titleClassName,
|
|
83
82
|
)}
|
|
@@ -29,7 +29,6 @@ import {
|
|
|
29
29
|
type SizeTypeWithZero,
|
|
30
30
|
type TestProps,
|
|
31
31
|
} from "../../types";
|
|
32
|
-
import classes from "./Responsive.module.css";
|
|
33
32
|
|
|
34
33
|
export interface ContainerProps
|
|
35
34
|
extends AriaProps,
|
|
@@ -101,7 +100,7 @@ export const Container = ({
|
|
|
101
100
|
return (
|
|
102
101
|
<div
|
|
103
102
|
className={classNames(
|
|
104
|
-
|
|
103
|
+
"fabric-container",
|
|
105
104
|
className,
|
|
106
105
|
!fullWidth && "container mx-auto",
|
|
107
106
|
)}
|
|
@@ -126,7 +125,7 @@ export const Row = ({
|
|
|
126
125
|
return (
|
|
127
126
|
<div
|
|
128
127
|
className={classNames(
|
|
129
|
-
|
|
128
|
+
"fabric-row",
|
|
130
129
|
className,
|
|
131
130
|
"flex",
|
|
132
131
|
orient === "row" && "flex-row",
|
|
@@ -156,9 +155,9 @@ export const Col = ({
|
|
|
156
155
|
return (
|
|
157
156
|
<div
|
|
158
157
|
className={classNames(
|
|
159
|
-
|
|
158
|
+
"fabric-col",
|
|
160
159
|
className,
|
|
161
|
-
stretchContent &&
|
|
160
|
+
stretchContent && "stretchContent",
|
|
162
161
|
flex === "fill" && "flex-1",
|
|
163
162
|
flex === "full" && "flex-full",
|
|
164
163
|
flex === "auto" && "flex-initial",
|
|
@@ -24,7 +24,6 @@
|
|
|
24
24
|
import classNames from "classnames";
|
|
25
25
|
import { type ChildrenProp, type CssProp, type RefProp } from "../../types";
|
|
26
26
|
import { ErrorBoundary } from "../boundary/ErrorBoundary";
|
|
27
|
-
import classes from "./Section.module.css";
|
|
28
27
|
|
|
29
28
|
/**
|
|
30
29
|
* The section component provides a structured layout used within a page to organize and display content in a sectioned format, ensuring a consistent and intuitive user experience.
|
|
@@ -43,7 +42,7 @@ export const Section = ({
|
|
|
43
42
|
dir={dir}
|
|
44
43
|
ref={ref}
|
|
45
44
|
className={classNames(
|
|
46
|
-
|
|
45
|
+
"fabric-section",
|
|
47
46
|
className,
|
|
48
47
|
"grid area-content overflow-hidden",
|
|
49
48
|
)}
|
|
@@ -25,7 +25,6 @@ import { isColor } from "@react-fabric/utilities";
|
|
|
25
25
|
import classNames from "classnames";
|
|
26
26
|
import { useMemo } from "react";
|
|
27
27
|
import { type ChildrenProp } from "../../types";
|
|
28
|
-
import classes from "./Theme.module.css";
|
|
29
28
|
|
|
30
29
|
export interface ThemeProps {
|
|
31
30
|
/**
|
|
@@ -36,9 +35,9 @@ export interface ThemeProps {
|
|
|
36
35
|
* branding css className
|
|
37
36
|
*
|
|
38
37
|
* .branding {
|
|
39
|
-
* --primary: #color;
|
|
40
|
-
* --accent: #color;
|
|
41
|
-
* --tint: #color;
|
|
38
|
+
* --color-primary: #color;
|
|
39
|
+
* --color-accent: #color;
|
|
40
|
+
* --color-tint: #color;
|
|
42
41
|
* }
|
|
43
42
|
*/
|
|
44
43
|
branding?: string;
|
|
@@ -75,22 +74,22 @@ export const ThemeProvider = ({
|
|
|
75
74
|
const styles = useMemo(() => {
|
|
76
75
|
const ret: KeyValue = {};
|
|
77
76
|
if (primaryColor && isColor(primaryColor)) {
|
|
78
|
-
ret["--primary"] = primaryColor;
|
|
77
|
+
ret["--color-primary"] = primaryColor;
|
|
79
78
|
}
|
|
80
79
|
if (primaryColor && !isColor(primaryColor)) {
|
|
81
|
-
ret["--primary"] = `var(
|
|
80
|
+
ret["--color-primary"] = `var(--color-${primaryColor})`;
|
|
82
81
|
}
|
|
83
82
|
if (accentColor && isColor(accentColor)) {
|
|
84
|
-
ret["--accent"] = accentColor;
|
|
83
|
+
ret["--color-accent"] = accentColor;
|
|
85
84
|
}
|
|
86
85
|
if (accentColor && !isColor(accentColor)) {
|
|
87
|
-
ret["--accent"] = `var(
|
|
86
|
+
ret["--color-accent"] = `var(--color-${accentColor})`;
|
|
88
87
|
}
|
|
89
88
|
if (tintColor && isColor(tintColor)) {
|
|
90
|
-
ret["--tint"] = tintColor;
|
|
89
|
+
ret["--color-tint"] = tintColor;
|
|
91
90
|
}
|
|
92
91
|
if (tintColor && !isColor(tintColor)) {
|
|
93
|
-
ret["--tint"] = `var(
|
|
92
|
+
ret["--color-tint"] = `var(--color-${tintColor})`;
|
|
94
93
|
}
|
|
95
94
|
return ret;
|
|
96
95
|
}, [primaryColor, accentColor, tintColor]);
|
|
@@ -101,7 +100,7 @@ export const ThemeProvider = ({
|
|
|
101
100
|
data-color-scheme={colorScheme}
|
|
102
101
|
data-rounding={rounding}
|
|
103
102
|
className={classNames(
|
|
104
|
-
|
|
103
|
+
"fabric-themeProvider",
|
|
105
104
|
"contents theme-base",
|
|
106
105
|
branding,
|
|
107
106
|
)}
|