@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
|
@@ -26,7 +26,7 @@ import { cloneElement } from "react";
|
|
|
26
26
|
import {
|
|
27
27
|
type AriaProps,
|
|
28
28
|
type ChildrenProp,
|
|
29
|
-
type
|
|
29
|
+
type ColorState,
|
|
30
30
|
type CssProp,
|
|
31
31
|
type RefProp,
|
|
32
32
|
type SizeType,
|
|
@@ -34,7 +34,6 @@ import {
|
|
|
34
34
|
} from "../../types";
|
|
35
35
|
import { cloneChildren } from "../../utils";
|
|
36
36
|
import { type Button } from "./Button";
|
|
37
|
-
import classes from "./Button.module.css";
|
|
38
37
|
|
|
39
38
|
export interface ButtonGroupProps
|
|
40
39
|
extends CssProp,
|
|
@@ -57,7 +56,7 @@ export interface ButtonGroupProps
|
|
|
57
56
|
/**
|
|
58
57
|
* button color
|
|
59
58
|
*/
|
|
60
|
-
color?:
|
|
59
|
+
color?: ColorState;
|
|
61
60
|
/**
|
|
62
61
|
* full rounded edges
|
|
63
62
|
*/
|
|
@@ -88,11 +87,11 @@ export const ButtonGroup = ({
|
|
|
88
87
|
<div
|
|
89
88
|
data-ref="buttonGroup"
|
|
90
89
|
className={classNames(
|
|
91
|
-
|
|
90
|
+
"fabric-buttonGroup",
|
|
92
91
|
className,
|
|
93
92
|
fullWidth ? "flex" : "inline-flex",
|
|
94
93
|
"flex-nowrap align-middle rounded",
|
|
95
|
-
vertical &&
|
|
94
|
+
vertical && "vertical",
|
|
96
95
|
vertical && "flex-col items-stretch",
|
|
97
96
|
)}
|
|
98
97
|
{...aria}
|
|
@@ -34,7 +34,6 @@ import {
|
|
|
34
34
|
} from "../../types";
|
|
35
35
|
import { cloneChildren } from "../../utils";
|
|
36
36
|
import { type ButtonProps } from "./Button";
|
|
37
|
-
import classes from "./Button.module.css";
|
|
38
37
|
|
|
39
38
|
interface BaseProps
|
|
40
39
|
extends CssProp,
|
|
@@ -132,11 +131,11 @@ export const ToggleButtonGroup = ({
|
|
|
132
131
|
return (
|
|
133
132
|
<div
|
|
134
133
|
className={classNames(
|
|
135
|
-
|
|
134
|
+
"fabric-buttonGroup",
|
|
136
135
|
className,
|
|
137
136
|
fullWidth ? "flex" : "inline-flex",
|
|
138
137
|
"flex-nowrap align-middle",
|
|
139
|
-
vertical &&
|
|
138
|
+
vertical && "vertical",
|
|
140
139
|
vertical && "flex-col",
|
|
141
140
|
)}
|
|
142
141
|
{...aria}
|
|
@@ -25,13 +25,11 @@ import classNames from "classnames";
|
|
|
25
25
|
import {
|
|
26
26
|
type AriaProps,
|
|
27
27
|
type ChildrenProp,
|
|
28
|
-
type
|
|
28
|
+
type ColorState,
|
|
29
29
|
type CssProp,
|
|
30
|
-
type PaletteType,
|
|
31
30
|
type TestProps,
|
|
32
31
|
} from "../../types";
|
|
33
32
|
import { CoreIcons } from "../../types/icons";
|
|
34
|
-
import { getBgClass, getBorderClass, getColorClass } from "../../utils";
|
|
35
33
|
import { Icon } from "../icon/Icon";
|
|
36
34
|
|
|
37
35
|
export interface CalloutProps
|
|
@@ -42,7 +40,7 @@ export interface CalloutProps
|
|
|
42
40
|
/**
|
|
43
41
|
* callout color
|
|
44
42
|
*/
|
|
45
|
-
color?:
|
|
43
|
+
color?: ColorState;
|
|
46
44
|
/**
|
|
47
45
|
* legend title
|
|
48
46
|
*/
|
|
@@ -65,6 +63,16 @@ export interface CalloutProps
|
|
|
65
63
|
onClose?: () => void;
|
|
66
64
|
}
|
|
67
65
|
|
|
66
|
+
const colors = {
|
|
67
|
+
tint: "bg-tint-50/50 text-tint-800 border-tint-300",
|
|
68
|
+
primary: "bg-primary-50/50 text-primary-800 border-primary-300",
|
|
69
|
+
accent: "bg-accent-50/50 text-accent-800 border-accent-300",
|
|
70
|
+
info: "bg-info-50/50 text-info-800 border-info-300",
|
|
71
|
+
danger: "bg-danger-50/50 text-danger-800 border-danger-300",
|
|
72
|
+
success: "bg-success-50/50 text-success-800 border-success-300",
|
|
73
|
+
warning: "bg-warning-50/50 text-warning-800 border-warning-300",
|
|
74
|
+
};
|
|
75
|
+
|
|
68
76
|
export const Callout = ({
|
|
69
77
|
children,
|
|
70
78
|
// @ts-expect-error ignore
|
|
@@ -80,11 +88,9 @@ export const Callout = ({
|
|
|
80
88
|
return (
|
|
81
89
|
<fieldset
|
|
82
90
|
className={classNames(
|
|
83
|
-
className,
|
|
84
91
|
"block rounded-capped border max-w-full relative overflow-hidden mb-4",
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
getBorderClass(color + "-300"),
|
|
92
|
+
colors[color],
|
|
93
|
+
className,
|
|
88
94
|
border === "dashed" && "border-dashed",
|
|
89
95
|
border === "dotted" && "border-dotted",
|
|
90
96
|
)}
|
|
@@ -43,7 +43,6 @@ import {
|
|
|
43
43
|
type TestProps,
|
|
44
44
|
} from "../../types";
|
|
45
45
|
import { nodeCheck } from "../../utils";
|
|
46
|
-
import classes from "./Card.module.css";
|
|
47
46
|
|
|
48
47
|
export interface CardProps
|
|
49
48
|
extends CssProp,
|
|
@@ -116,20 +115,20 @@ export const Card = ({
|
|
|
116
115
|
return (
|
|
117
116
|
<div
|
|
118
117
|
className={classNames(
|
|
119
|
-
|
|
118
|
+
"fabric-cardWrapper",
|
|
120
119
|
"rounded-capped relative grid",
|
|
121
120
|
flex && "flex-1",
|
|
122
|
-
selected && selectedRibbon &&
|
|
123
|
-
selected && "outline
|
|
121
|
+
selected && selectedRibbon && "selected",
|
|
122
|
+
selected && "outline-2 outline-accent-500 outline-offset-2",
|
|
124
123
|
)}
|
|
125
124
|
>
|
|
126
125
|
<ErrorBoundary>
|
|
127
126
|
<div
|
|
128
127
|
className={classNames(
|
|
129
|
-
|
|
128
|
+
"fabric-card",
|
|
130
129
|
className,
|
|
131
130
|
"rounded-capped flex flex-col flex-nowrap overflow-hidden",
|
|
132
|
-
onClick &&
|
|
131
|
+
onClick && "clickable",
|
|
133
132
|
)}
|
|
134
133
|
draggable={draggable}
|
|
135
134
|
onDragStart={
|
|
@@ -145,7 +144,7 @@ export const Card = ({
|
|
|
145
144
|
{header}
|
|
146
145
|
<div
|
|
147
146
|
role="none"
|
|
148
|
-
className={classNames(
|
|
147
|
+
className={classNames("fabric-cardBody", bodyClassName, "flex-1")}
|
|
149
148
|
onClick={onClick}
|
|
150
149
|
>
|
|
151
150
|
{body}
|
|
@@ -26,7 +26,6 @@ import { Children, useMemo } from "react";
|
|
|
26
26
|
import { type AriaProps, type ChildrenProp, type CssProp } from "../../types";
|
|
27
27
|
import { nodeCheck } from "../../utils";
|
|
28
28
|
import { Image, Video } from "../media/Media";
|
|
29
|
-
import classes from "./Card.module.css";
|
|
30
29
|
|
|
31
30
|
export interface CardCoverProps extends CssProp, AriaProps, ChildrenProp {
|
|
32
31
|
/**
|
|
@@ -43,12 +42,19 @@ export interface CardCoverProps extends CssProp, AriaProps, ChildrenProp {
|
|
|
43
42
|
justify?: "start" | "center" | "end";
|
|
44
43
|
}
|
|
45
44
|
|
|
45
|
+
const scheme = {
|
|
46
|
+
inheritScheme: "inheritScheme",
|
|
47
|
+
light: "light",
|
|
48
|
+
dark: "dark",
|
|
49
|
+
};
|
|
50
|
+
|
|
46
51
|
export const CardCover = ({
|
|
47
52
|
className,
|
|
48
53
|
children,
|
|
49
54
|
height = 120,
|
|
50
55
|
justify = "end",
|
|
51
|
-
|
|
56
|
+
// @ts-expect-error ignore
|
|
57
|
+
colorScheme = "inheritScheme",
|
|
52
58
|
...aria
|
|
53
59
|
}: CardCoverProps) => {
|
|
54
60
|
const [media, body] = useMemo(() => {
|
|
@@ -64,8 +70,8 @@ export const CardCover = ({
|
|
|
64
70
|
<div
|
|
65
71
|
style={{ height }}
|
|
66
72
|
className={classNames(
|
|
67
|
-
|
|
68
|
-
|
|
73
|
+
"fabric-cardCover",
|
|
74
|
+
scheme[colorScheme],
|
|
69
75
|
"relative z-0",
|
|
70
76
|
)}
|
|
71
77
|
{...aria}
|
|
@@ -73,9 +79,8 @@ export const CardCover = ({
|
|
|
73
79
|
{media}
|
|
74
80
|
<div
|
|
75
81
|
className={classNames(
|
|
76
|
-
|
|
82
|
+
"fabric-cardCoverContent",
|
|
77
83
|
"relative pointer-events-none z-1 flex flex-col flex-nowrap p-4 h-full",
|
|
78
|
-
className,
|
|
79
84
|
`justify-${justify}`,
|
|
80
85
|
className,
|
|
81
86
|
)}
|
|
@@ -30,14 +30,14 @@ import {
|
|
|
30
30
|
type ColorType,
|
|
31
31
|
type CssProp,
|
|
32
32
|
type IconProps,
|
|
33
|
+
type PaletteType,
|
|
33
34
|
type PolymorphicProps,
|
|
34
35
|
type RefProp,
|
|
35
36
|
type SizeType,
|
|
36
37
|
type TestProps,
|
|
37
38
|
} from "../../types";
|
|
38
|
-
import { getColor
|
|
39
|
+
import { getColor } from "../../utils";
|
|
39
40
|
import { Icon } from "../icon/Icon";
|
|
40
|
-
import classes from "./Chip.module.css";
|
|
41
41
|
|
|
42
42
|
export interface ChipProps
|
|
43
43
|
extends CssProp,
|
|
@@ -53,7 +53,7 @@ export interface ChipProps
|
|
|
53
53
|
/**
|
|
54
54
|
* chip color (CSS color / tailwind color)
|
|
55
55
|
*/
|
|
56
|
-
color?: ColorType | string;
|
|
56
|
+
color?: ColorType | PaletteType | string;
|
|
57
57
|
/**
|
|
58
58
|
* chip styling
|
|
59
59
|
*/
|
|
@@ -154,13 +154,12 @@ export const Chip = <Tag extends React.ElementType = "div">({
|
|
|
154
154
|
role="term"
|
|
155
155
|
data-ref="chip"
|
|
156
156
|
className={classNames(
|
|
157
|
-
|
|
157
|
+
"fabric-chip",
|
|
158
158
|
className,
|
|
159
|
-
color && getColorClass(color),
|
|
160
159
|
"select-none inline-flex flex-nowrap items-center align-middle max-w-72 rounded",
|
|
161
160
|
rounded && "rounded-full",
|
|
162
|
-
!!onClick &&
|
|
163
|
-
disabled &&
|
|
161
|
+
!!onClick && "clickable",
|
|
162
|
+
disabled && "disabled",
|
|
164
163
|
)}
|
|
165
164
|
style={styles}
|
|
166
165
|
data-variant={variant}
|
|
@@ -171,7 +170,7 @@ export const Chip = <Tag extends React.ElementType = "div">({
|
|
|
171
170
|
{icon && (
|
|
172
171
|
<Icon
|
|
173
172
|
data-ref="chipIcon"
|
|
174
|
-
className={classNames(
|
|
173
|
+
className={classNames("fabric-chipIcon", "m-1")}
|
|
175
174
|
icon={icon}
|
|
176
175
|
bg={iconBg}
|
|
177
176
|
onClick={onIconClick}
|
|
@@ -182,7 +181,7 @@ export const Chip = <Tag extends React.ElementType = "div">({
|
|
|
182
181
|
{children && (
|
|
183
182
|
<label
|
|
184
183
|
data-ref="chipLabel"
|
|
185
|
-
className={classNames(
|
|
184
|
+
className={classNames("fabric-chipLabel", "truncate")}
|
|
186
185
|
>
|
|
187
186
|
{children}
|
|
188
187
|
</label>
|
|
@@ -193,7 +192,7 @@ export const Chip = <Tag extends React.ElementType = "div">({
|
|
|
193
192
|
data-ref="chipRemove"
|
|
194
193
|
data-inner-cliackable
|
|
195
194
|
className={classNames(
|
|
196
|
-
|
|
195
|
+
"fabric-chipRemove",
|
|
197
196
|
"cursor-pointer pe-1 opacity-65 hover:opacity-90",
|
|
198
197
|
)}
|
|
199
198
|
onClick={removeHandler}
|
|
@@ -40,7 +40,6 @@ import {
|
|
|
40
40
|
} from "../../types";
|
|
41
41
|
import { CoreIcons } from "../../types/icons";
|
|
42
42
|
import { Icon } from "../icon/Icon";
|
|
43
|
-
import classes from "./Collapsable.module.css";
|
|
44
43
|
|
|
45
44
|
interface CollapsableRef {
|
|
46
45
|
button: RefObject<HTMLElement>;
|
|
@@ -135,12 +134,12 @@ export const Collapsable = ({
|
|
|
135
134
|
return [h, b];
|
|
136
135
|
}, [children]);
|
|
137
136
|
return (
|
|
138
|
-
<div className={classNames(
|
|
137
|
+
<div className={classNames("fabric-collapsable", className)} {...aria}>
|
|
139
138
|
<div
|
|
140
139
|
role="none"
|
|
141
140
|
ref={headRef}
|
|
142
141
|
className={classNames(
|
|
143
|
-
|
|
142
|
+
"fabric-collapsableHead",
|
|
144
143
|
"flex gap-1 flex-nowrap py-2 font-medium cursor-pointer items-center select-none hover:opacity-70",
|
|
145
144
|
headerClassName,
|
|
146
145
|
stickyHeader && "bg-base sticky top-0 px-2 py-1 z-10",
|
|
@@ -154,7 +153,7 @@ export const Collapsable = ({
|
|
|
154
153
|
{openState && (
|
|
155
154
|
<div
|
|
156
155
|
ref={bodyRef}
|
|
157
|
-
className={classNames(
|
|
156
|
+
className={classNames("fabric-collapsableBody", bodyClassName)}
|
|
158
157
|
>
|
|
159
158
|
{body}
|
|
160
159
|
</div>
|
|
@@ -24,13 +24,12 @@
|
|
|
24
24
|
import classNames from "classnames";
|
|
25
25
|
import { useCallback } from "react";
|
|
26
26
|
import {
|
|
27
|
-
type CssProp,
|
|
28
27
|
type ChildProp,
|
|
29
28
|
type ColorType,
|
|
29
|
+
type CssProp,
|
|
30
30
|
type PaletteType,
|
|
31
31
|
} from "../../types";
|
|
32
|
-
import {
|
|
33
|
-
import classes from "./Divider.module.css";
|
|
32
|
+
import { getColor } from "../../utils";
|
|
34
33
|
|
|
35
34
|
export interface DividerProps extends CssProp, Partial<ChildProp> {
|
|
36
35
|
/**
|
|
@@ -41,10 +40,14 @@ export interface DividerProps extends CssProp, Partial<ChildProp> {
|
|
|
41
40
|
* vertical rule
|
|
42
41
|
*/
|
|
43
42
|
vertical?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* divider label classname(s)
|
|
45
|
+
*/
|
|
46
|
+
labelClassName?: string;
|
|
44
47
|
/**
|
|
45
48
|
* rule color
|
|
46
49
|
*/
|
|
47
|
-
color?: ColorType | PaletteType |
|
|
50
|
+
color?: ColorType | PaletteType | string;
|
|
48
51
|
/**
|
|
49
52
|
* text alignment
|
|
50
53
|
*/
|
|
@@ -53,8 +56,9 @@ export interface DividerProps extends CssProp, Partial<ChildProp> {
|
|
|
53
56
|
|
|
54
57
|
export const Divider = ({
|
|
55
58
|
children,
|
|
56
|
-
color,
|
|
59
|
+
color = "tint-300",
|
|
57
60
|
vertical,
|
|
61
|
+
labelClassName,
|
|
58
62
|
fill,
|
|
59
63
|
align = "start",
|
|
60
64
|
className,
|
|
@@ -63,13 +67,14 @@ export const Divider = ({
|
|
|
63
67
|
({ flex, className }: KeyValue) => {
|
|
64
68
|
return (
|
|
65
69
|
<hr
|
|
66
|
-
style={{ flex }}
|
|
70
|
+
style={{ flex, borderColor: getColor(color) }}
|
|
67
71
|
className={classNames(
|
|
68
72
|
className,
|
|
69
73
|
vertical && "vertical",
|
|
70
74
|
!flex && "self-stretch",
|
|
71
|
-
vertical
|
|
72
|
-
|
|
75
|
+
vertical
|
|
76
|
+
? "fabric-divider--vertical"
|
|
77
|
+
: "fabric-divider--horizontal",
|
|
73
78
|
)}
|
|
74
79
|
/>
|
|
75
80
|
);
|
|
@@ -89,9 +94,8 @@ export const Divider = ({
|
|
|
89
94
|
<div
|
|
90
95
|
className={classNames(
|
|
91
96
|
"px-2 whitespace-nowrap",
|
|
92
|
-
vertical ?
|
|
93
|
-
|
|
94
|
-
!fill && getColorClass((color ?? "tint") + "-600"),
|
|
97
|
+
vertical ? "fabric-divider--vertical" : "fabric-divider--horizontal",
|
|
98
|
+
labelClassName,
|
|
95
99
|
"rounded-full text-[0.75em]",
|
|
96
100
|
vertical && "origin-center -rotate-90 z-1",
|
|
97
101
|
)}
|
|
@@ -54,7 +54,6 @@ import {
|
|
|
54
54
|
useState,
|
|
55
55
|
} from "react";
|
|
56
56
|
import { type ChildProp, type RefProp } from "../../types";
|
|
57
|
-
import classes from "./Dropdown.module.css";
|
|
58
57
|
|
|
59
58
|
export interface DropdownProps extends RefProp {
|
|
60
59
|
children: [React.ReactNode, React.ReactNode];
|
|
@@ -257,7 +256,7 @@ const DropdownElement = ({
|
|
|
257
256
|
<div
|
|
258
257
|
role="none"
|
|
259
258
|
className={classNames(
|
|
260
|
-
|
|
259
|
+
"fabric-dropdownBody",
|
|
261
260
|
dropdownClassName,
|
|
262
261
|
!plainDropdown && "shadow-lg bg-base ring-1 ring-tint-100",
|
|
263
262
|
"rounded-capped overflow-auto scroll-thin grid max-h-[70vh]",
|
|
@@ -271,7 +270,7 @@ const DropdownElement = ({
|
|
|
271
270
|
ref={arrowRef}
|
|
272
271
|
context={context}
|
|
273
272
|
strokeWidth={0.5}
|
|
274
|
-
className="fill-base stroke-
|
|
273
|
+
className="fill-base stroke-dimmed"
|
|
275
274
|
/>
|
|
276
275
|
)}
|
|
277
276
|
</div>
|
|
@@ -48,7 +48,7 @@ export const DropdownTool = ({
|
|
|
48
48
|
icon={icon ?? CoreIcons.caretDown}
|
|
49
49
|
className={classNames(
|
|
50
50
|
className,
|
|
51
|
-
"outline bg-base flex-content pointer-events-auto cursor-pointer",
|
|
51
|
+
"outline bg-base/50 flex-content pointer-events-auto cursor-pointer",
|
|
52
52
|
groupHover &&
|
|
53
53
|
"hidden group-hover/tool:inline-block data-[dropdown-open]:inline-block",
|
|
54
54
|
)}
|
|
@@ -25,6 +25,7 @@ import { isString, isSvgPath } from "@react-fabric/utilities";
|
|
|
25
25
|
import classNames from "classnames";
|
|
26
26
|
import { useMemo } from "react";
|
|
27
27
|
import {
|
|
28
|
+
type PaletteType,
|
|
28
29
|
type AriaProps,
|
|
29
30
|
type ColorType,
|
|
30
31
|
type CssProp,
|
|
@@ -32,8 +33,7 @@ import {
|
|
|
32
33
|
type SizeType,
|
|
33
34
|
type TestProps,
|
|
34
35
|
} from "../../types";
|
|
35
|
-
import {
|
|
36
|
-
import classes from "./Icon.module.css";
|
|
36
|
+
import { getColor } from "../../utils";
|
|
37
37
|
|
|
38
38
|
export interface IconProps extends CssProp, AriaProps, RefProp, TestProps {
|
|
39
39
|
/**
|
|
@@ -43,11 +43,11 @@ export interface IconProps extends CssProp, AriaProps, RefProp, TestProps {
|
|
|
43
43
|
/**
|
|
44
44
|
* background color (CSS color / tailwind color)
|
|
45
45
|
*/
|
|
46
|
-
bg?: ColorType | string;
|
|
46
|
+
bg?: ColorType | PaletteType | string;
|
|
47
47
|
/**
|
|
48
48
|
* icon color (CSS color / tailwind color)
|
|
49
49
|
*/
|
|
50
|
-
color?: ColorType | string;
|
|
50
|
+
color?: ColorType | PaletteType | string;
|
|
51
51
|
/**
|
|
52
52
|
* flip icon in rtl
|
|
53
53
|
*/
|
|
@@ -157,14 +157,12 @@ export const Icon = ({
|
|
|
157
157
|
{...rest}
|
|
158
158
|
role="presentation"
|
|
159
159
|
className={classNames(
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
"select-none overflow-hidden inline-block box-content leading-none not-italic text-center",
|
|
163
|
-
bg && getBgClass(bg),
|
|
164
|
-
color && getColorClass(color),
|
|
160
|
+
"fabric-icon",
|
|
161
|
+
"select-none overflow-hidden box-content leading-none not-italic text-center",
|
|
165
162
|
!rounded && "rounded",
|
|
166
163
|
rounded && "rounded-full",
|
|
167
164
|
animate && `animate-${animate}`,
|
|
165
|
+
className,
|
|
168
166
|
)}
|
|
169
167
|
onClick={onClick}
|
|
170
168
|
data-flip={rtlFlip}
|
|
@@ -27,7 +27,6 @@ import { useMemo, useRef, useState } from "react";
|
|
|
27
27
|
import { type AriaProps, type CssProp, type TestProps } from "../../types";
|
|
28
28
|
import { CoreIcons } from "../../types/icons";
|
|
29
29
|
import { Button } from "../button/Button";
|
|
30
|
-
import classes from "./Media.module.css";
|
|
31
30
|
|
|
32
31
|
export interface BaseProps extends CssProp, TestProps, AriaProps {
|
|
33
32
|
/**
|
|
@@ -44,6 +43,12 @@ export interface BaseProps extends CssProp, TestProps, AriaProps {
|
|
|
44
43
|
fit?: "cover" | "contain" | "fill";
|
|
45
44
|
}
|
|
46
45
|
|
|
46
|
+
const cover = {
|
|
47
|
+
fill: "object-fill",
|
|
48
|
+
cover: "object-cover",
|
|
49
|
+
contain: "object-contain",
|
|
50
|
+
};
|
|
51
|
+
|
|
47
52
|
export interface ImageProps extends BaseProps {
|
|
48
53
|
/**
|
|
49
54
|
* image alt text
|
|
@@ -78,7 +83,7 @@ export const Image = ({
|
|
|
78
83
|
() => (
|
|
79
84
|
<div
|
|
80
85
|
className={classNames(
|
|
81
|
-
|
|
86
|
+
"fabric-mediaPlaceholder",
|
|
82
87
|
"absolute z-1 top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 text-4xl text-gray animate-pulse",
|
|
83
88
|
)}
|
|
84
89
|
>
|
|
@@ -91,9 +96,9 @@ export const Image = ({
|
|
|
91
96
|
<div
|
|
92
97
|
data-ref="image"
|
|
93
98
|
className={classNames(
|
|
94
|
-
|
|
99
|
+
"fabric-mediaContainer",
|
|
95
100
|
"relative overflow-hidden bg-gray inline-block",
|
|
96
|
-
reel &&
|
|
101
|
+
reel && "fabric-mediaReel",
|
|
97
102
|
className,
|
|
98
103
|
)}
|
|
99
104
|
data-colorset={colorSet}
|
|
@@ -106,9 +111,9 @@ export const Image = ({
|
|
|
106
111
|
loading="lazy"
|
|
107
112
|
crossOrigin="anonymous"
|
|
108
113
|
className={classNames(
|
|
109
|
-
|
|
114
|
+
"fabric-media",
|
|
110
115
|
"pointer-events-none w-full h-full",
|
|
111
|
-
fit
|
|
116
|
+
cover[fit],
|
|
112
117
|
)}
|
|
113
118
|
onLoad={(e) => {
|
|
114
119
|
e.currentTarget.previousElementSibling?.remove();
|
|
@@ -138,9 +143,9 @@ export const Video = ({
|
|
|
138
143
|
<div
|
|
139
144
|
data-ref="video"
|
|
140
145
|
className={classNames(
|
|
141
|
-
|
|
146
|
+
"fabric-mediaContainer",
|
|
142
147
|
"relative overflow-hidden bg-gray inline-block",
|
|
143
|
-
reel &&
|
|
148
|
+
reel && "fabric-mediaReel",
|
|
144
149
|
className,
|
|
145
150
|
)}
|
|
146
151
|
onMouseEnter={() => {
|
|
@@ -153,7 +158,7 @@ export const Video = ({
|
|
|
153
158
|
>
|
|
154
159
|
<div
|
|
155
160
|
className={classNames(
|
|
156
|
-
|
|
161
|
+
"fabric-mediaPlaceholder",
|
|
157
162
|
"absolute z-1 top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 text-5xl animate-pulse",
|
|
158
163
|
)}
|
|
159
164
|
>
|
|
@@ -166,7 +171,7 @@ export const Video = ({
|
|
|
166
171
|
poster={poster}
|
|
167
172
|
autoPlay={autoPlay}
|
|
168
173
|
className={classNames(
|
|
169
|
-
|
|
174
|
+
"fabric-media",
|
|
170
175
|
"pointer-events-none w-full h-full",
|
|
171
176
|
fit && `object-${fit}`,
|
|
172
177
|
)}
|
|
@@ -184,14 +189,14 @@ export const Video = ({
|
|
|
184
189
|
<div
|
|
185
190
|
data-inner-clickable
|
|
186
191
|
className={classNames(
|
|
187
|
-
|
|
192
|
+
"fabric-mediaControls",
|
|
188
193
|
"absolute bottom-6 end-6 rounded-full flex flex-col",
|
|
189
194
|
)}
|
|
190
195
|
>
|
|
191
196
|
<Button
|
|
192
197
|
rounded
|
|
193
198
|
variant="link"
|
|
194
|
-
className={
|
|
199
|
+
className={"fabric-mediaControlPlaceholder"}
|
|
195
200
|
icon={CoreIcons.ellipsis}
|
|
196
201
|
aria-label="controls"
|
|
197
202
|
/>
|
|
@@ -199,7 +204,7 @@ export const Video = ({
|
|
|
199
204
|
rounded
|
|
200
205
|
variant="link"
|
|
201
206
|
aria-label="controls"
|
|
202
|
-
className={
|
|
207
|
+
className={"fabric-mediaControlAction"}
|
|
203
208
|
onClick={() => {
|
|
204
209
|
videoRef.current &&
|
|
205
210
|
(videoRef.current.volume = videoRef.current.volume ? 0 : 1);
|
|
@@ -210,7 +215,7 @@ export const Video = ({
|
|
|
210
215
|
rounded
|
|
211
216
|
variant="link"
|
|
212
217
|
aria-label="controls"
|
|
213
|
-
className={
|
|
218
|
+
className={"fabric-mediaControlAction"}
|
|
214
219
|
onClick={() => {
|
|
215
220
|
videoRef.current?.paused
|
|
216
221
|
? videoRef.current?.play()
|
|
@@ -233,7 +233,7 @@ const MenuComponent = ({
|
|
|
233
233
|
menuClassName,
|
|
234
234
|
"flex flex-col bg-base p-1 menu-list",
|
|
235
235
|
isNested &&
|
|
236
|
-
"outline shadow-lg rounded-capped max-h-96 overflow-auto scroll-thin z-
|
|
236
|
+
"outline shadow-lg rounded-capped max-h-96 overflow-auto scroll-thin z-(--z-popover)",
|
|
237
237
|
)}
|
|
238
238
|
autoFocus
|
|
239
239
|
ref={mergeRefs(isNested ? refs.setFloating : ref)}
|
|
@@ -31,7 +31,6 @@ import { Tooltip } from "../../overlays";
|
|
|
31
31
|
import { type PolymorphicProps } from "../../types";
|
|
32
32
|
import { Badge, getBadgeProps } from "../badge/Badge";
|
|
33
33
|
import { Icon } from "../icon/Icon";
|
|
34
|
-
import classes from "./Menu.module.css";
|
|
35
34
|
import { type MenuItemProps } from "./types";
|
|
36
35
|
|
|
37
36
|
export const MenuItem = <Tag extends React.ElementType = "button">({
|
|
@@ -77,7 +76,7 @@ export const MenuItem = <Tag extends React.ElementType = "button">({
|
|
|
77
76
|
}
|
|
78
77
|
return (
|
|
79
78
|
<Icon
|
|
80
|
-
className={classNames(
|
|
79
|
+
className={classNames("fabric-menuIcon", minimal && "minimal")}
|
|
81
80
|
icon={path ?? ""}
|
|
82
81
|
bg={iconBg}
|
|
83
82
|
color={iconColor}
|
|
@@ -146,11 +145,11 @@ export const MenuItem = <Tag extends React.ElementType = "button">({
|
|
|
146
145
|
data-dropdown-dismiss
|
|
147
146
|
data-color={color}
|
|
148
147
|
className={classNames(
|
|
149
|
-
|
|
148
|
+
"fabric-menuItem",
|
|
150
149
|
className,
|
|
151
|
-
active &&
|
|
152
|
-
minimal &&
|
|
153
|
-
disabled &&
|
|
150
|
+
active && "active",
|
|
151
|
+
minimal && "minimal",
|
|
152
|
+
disabled && "disabled",
|
|
154
153
|
"rounded-capped relative max-w-[50vw] my-0.5",
|
|
155
154
|
)}
|
|
156
155
|
data-active={active}
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
type BadgeType,
|
|
28
28
|
type CallbackReturn,
|
|
29
29
|
type ChildrenProp,
|
|
30
|
-
type
|
|
30
|
+
type ColorState,
|
|
31
31
|
type CssProp,
|
|
32
32
|
type IconProps,
|
|
33
33
|
type TestProps,
|
|
@@ -53,7 +53,7 @@ export interface MenuItemProps
|
|
|
53
53
|
/**
|
|
54
54
|
* menu color
|
|
55
55
|
*/
|
|
56
|
-
color?:
|
|
56
|
+
color?: ColorState;
|
|
57
57
|
/**
|
|
58
58
|
* item active
|
|
59
59
|
*/
|
|
@@ -25,7 +25,6 @@ import { Format } from "@react-fabric/utilities";
|
|
|
25
25
|
import classNames from "classnames";
|
|
26
26
|
import { useMemoDebugger } from "../../hooks/useEffectDebugger";
|
|
27
27
|
import { type AriaProps, type CssProp, type TestProps } from "../../types";
|
|
28
|
-
import classes from "./Meter.module.css";
|
|
29
28
|
|
|
30
29
|
export interface MeterProps extends CssProp, AriaProps, TestProps {
|
|
31
30
|
/**
|
|
@@ -51,7 +50,7 @@ export const Meter = ({ value, hideLabel, className, ...aria }: MeterProps) => {
|
|
|
51
50
|
return (
|
|
52
51
|
<div
|
|
53
52
|
className={classNames(
|
|
54
|
-
|
|
53
|
+
"fabric-meter",
|
|
55
54
|
className,
|
|
56
55
|
"flex flex-nowrap items-center gap-[2px]",
|
|
57
56
|
)}
|
|
@@ -61,7 +60,7 @@ export const Meter = ({ value, hideLabel, className, ...aria }: MeterProps) => {
|
|
|
61
60
|
<div
|
|
62
61
|
key={step}
|
|
63
62
|
className={classNames(
|
|
64
|
-
|
|
63
|
+
"fabric-meterBar",
|
|
65
64
|
"first-of-type:rounded-s last-of-type:rounded-e bg-tint-100 relative outline -outline-offset-1 outline-muted overflow-hidden after:absolute after:inset-0",
|
|
66
65
|
)}
|
|
67
66
|
data-active={activeCount >= step}
|