@hitachivantara/uikit-react-pentaho 6.0.12 → 6.0.14

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.
@@ -1,183 +1,120 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
1
+ import { useCanvasContext } from "../CanvasContext.js";
2
+ import { HvCanvasPanelTab } from "../PanelTab/PanelTab.js";
3
+ import { HvCanvasPanelTabs } from "../PanelTabs/PanelTabs.js";
4
+ import { staticClasses, useClasses } from "./BottomPanel.styles.js";
2
5
  import { forwardRef, useRef, useState } from "react";
3
6
  import { useResizeDetector } from "react-resize-detector";
4
- import { useDefaultProps, useUniqueId, useControlled, theme, HvActionsGeneric, HvPanel } from "@hitachivantara/uikit-react-core";
7
+ import { HvActionsGeneric, HvPanel, theme, useControlled, useDefaultProps, useUniqueId } from "@hitachivantara/uikit-react-core";
5
8
  import { mergeStyles } from "@hitachivantara/uikit-react-utils";
6
- import { useCanvasContext } from "../CanvasContext.js";
7
- import { useClasses, staticClasses } from "./BottomPanel.styles.js";
8
- import { HvCanvasPanelTabs } from "../PanelTabs/PanelTabs.js";
9
- import { HvCanvasPanelTab } from "../PanelTab/PanelTab.js";
10
- const PANEL_RADIUS = 16;
11
- const HvCanvasBottomPanel = forwardRef(function HvCanvasBottomPanel2(props, ref) {
12
- const {
13
- id: idProp,
14
- className,
15
- children,
16
- open,
17
- tabs,
18
- minimize,
19
- leftActions,
20
- rightActions,
21
- overflowActions,
22
- selectedTabId: selectedTabIdProp,
23
- classes: classesProp,
24
- onTabChange,
25
- onAction,
26
- ...others
27
- } = useDefaultProps("HvCanvasBottomPanel", props);
28
- const { classes, cx } = useClasses(classesProp);
29
- const canvasContext = useCanvasContext();
30
- const sidePanelWidth = canvasContext?.sidePanelWidth ?? 0;
31
- const id = useUniqueId(idProp);
32
- const buttonsWidthRef = useRef(0);
33
- const [isTabsFullWidth, setIsTabsFullWidth] = useState(false);
34
- const [overflowing, setOverflowing] = useState(false);
35
- const { ref: tabRef } = useResizeDetector({
36
- handleHeight: false,
37
- disableRerender: true,
38
- onResize({ width, entry }) {
39
- if (!overflowing && !buttonsWidthRef.current) {
40
- const tabContainer = entry?.target;
41
- const leftActionsWidth = tabContainer?.querySelector(`.${staticClasses.leftActions}`)?.clientWidth ?? 0;
42
- const rightActionsWidth = tabContainer?.querySelector(`.${staticClasses.rightActions}`)?.clientWidth ?? 0;
43
- buttonsWidthRef.current = leftActionsWidth + rightActionsWidth;
44
- }
45
- const hasSpace = (width || 0) - buttonsWidthRef.current > 60;
46
- setOverflowing(!hasSpace);
47
- }
48
- });
49
- const { ref: panelRef } = useResizeDetector({
50
- handleHeight: false,
51
- disableRerender: true,
52
- onResize({ entry }) {
53
- const panelEl = entry?.target;
54
- if (!panelEl) return;
55
- const panelWidth = panelEl.clientWidth;
56
- const firstTab = panelEl.previousElementSibling?.firstElementChild?.firstElementChild;
57
- const tabWidth = firstTab?.clientWidth || 0;
58
- const numTabs = tabs.length;
59
- const tabsWidth = numTabs * tabWidth;
60
- setIsTabsFullWidth(tabsWidth + PANEL_RADIUS >= panelWidth);
61
- }
62
- });
63
- const [selectedTab, setSelectedTab] = useControlled(
64
- selectedTabIdProp,
65
- tabs[0].id
66
- );
67
- const handleTabChange = (event, tabId) => {
68
- setSelectedTab(tabId);
69
- onTabChange?.(event, tabId);
70
- };
71
- const renderEndActions = (tab) => {
72
- const btnsDisabled = selectedTab !== tab.id && !minimize;
73
- if (rightActions && !overflowing) {
74
- return /* @__PURE__ */ jsx(
75
- HvActionsGeneric,
76
- {
77
- maxVisibleActions: 2,
78
- actions: rightActions,
79
- disabled: btnsDisabled,
80
- className: cx(classes.rightActions, {
81
- [classes.actionsDisabled]: btnsDisabled
82
- }),
83
- onAction: (event, action) => onAction?.(event, action, tab.id),
84
- variant: "secondaryGhost",
85
- iconOnly: true
86
- }
87
- );
88
- }
89
- if (overflowActions && overflowing) {
90
- return /* @__PURE__ */ jsx(
91
- HvActionsGeneric,
92
- {
93
- maxVisibleActions: 0,
94
- actions: overflowActions,
95
- disabled: btnsDisabled,
96
- className: cx(classes.rightActions, {
97
- [classes.actionsDisabled]: btnsDisabled
98
- }),
99
- onAction: (event, action) => onAction?.(event, action, tab.id),
100
- variant: "secondaryGhost",
101
- iconOnly: true
102
- }
103
- );
104
- }
105
- return null;
106
- };
107
- return /* @__PURE__ */ jsxs(
108
- "div",
109
- {
110
- id,
111
- ref,
112
- className: cx(
113
- classes.root,
114
- {
115
- [classes.closed]: !open,
116
- [classes.minimized]: minimize,
117
- [classes.multipleTabs]: tabs.length > 1,
118
- [classes.overflowing]: overflowing
119
- },
120
- className
121
- ),
122
- style: {
123
- width: `calc(100% - ${sidePanelWidth}px - 2 * ${theme.space.sm})`,
124
- right: theme.space.sm,
125
- transition: canvasContext?.sidePanelDragging ? "height 0.3s ease, opacity 0.3s ease" : "width 0.3s ease"
126
- },
127
- ...others,
128
- children: [
129
- /* @__PURE__ */ jsx(
130
- HvCanvasPanelTabs,
131
- {
132
- onChange: handleTabChange,
133
- value: selectedTab,
134
- className: classes.tabsRoot,
135
- children: tabs.map((tab, index) => /* @__PURE__ */ jsx(
136
- HvCanvasPanelTab,
137
- {
138
- ref: index === 0 ? tabRef : void 0,
139
- id: `${id}-${tab.id}`,
140
- value: tab.id,
141
- className: classes.tab,
142
- startActions: leftActions && !overflowing && /* @__PURE__ */ jsx(
143
- HvActionsGeneric,
144
- {
145
- maxVisibleActions: 1,
146
- actions: leftActions,
147
- disabled: selectedTab !== tab.id && !minimize,
148
- className: cx(classes.leftActions, {
149
- [classes.actionsDisabled]: selectedTab !== tab.id && !minimize
150
- }),
151
- onAction: (event, action) => onAction?.(event, action, tab.id),
152
- variant: "secondaryGhost",
153
- iconOnly: true
154
- }
155
- ),
156
- endActions: renderEndActions(tab),
157
- children: typeof tab.title === "function" ? tab.title(overflowing) : tab.title
158
- },
159
- tab.id
160
- ))
161
- }
162
- ),
163
- /* @__PURE__ */ jsx(
164
- HvPanel,
165
- {
166
- ref: panelRef,
167
- role: "tabpanel",
168
- "aria-labelledby": `${id}-${selectedTab}`,
169
- className: classes.content,
170
- style: mergeStyles(void 0, {
171
- "--right-border-radius": isTabsFullWidth ? 0 : `${PANEL_RADIUS}px`
172
- }),
173
- children
174
- }
175
- )
176
- ]
177
- }
178
- );
9
+ import { jsx, jsxs } from "react/jsx-runtime";
10
+ //#region src/Canvas/BottomPanel/BottomPanel.tsx
11
+ var PANEL_RADIUS = 16;
12
+ /**
13
+ * A bottom panel component to use in a canvas context.
14
+ */
15
+ var HvCanvasBottomPanel = forwardRef(function HvCanvasBottomPanel(props, ref) {
16
+ const { id: idProp, className, children, open, tabs, minimize, leftActions, rightActions, overflowActions, selectedTabId: selectedTabIdProp, classes: classesProp, onTabChange, onAction, ...others } = useDefaultProps("HvCanvasBottomPanel", props);
17
+ const { classes, cx } = useClasses(classesProp);
18
+ const canvasContext = useCanvasContext();
19
+ const sidePanelWidth = canvasContext?.sidePanelWidth ?? 0;
20
+ const id = useUniqueId(idProp);
21
+ const buttonsWidthRef = useRef(0);
22
+ const [isTabsFullWidth, setIsTabsFullWidth] = useState(false);
23
+ const [overflowing, setOverflowing] = useState(false);
24
+ const { ref: tabRef } = useResizeDetector({
25
+ handleHeight: false,
26
+ disableRerender: true,
27
+ onResize({ width, entry }) {
28
+ if (!overflowing && !buttonsWidthRef.current) {
29
+ const tabContainer = entry?.target;
30
+ buttonsWidthRef.current = (tabContainer?.querySelector(`.${staticClasses.leftActions}`)?.clientWidth ?? 0) + (tabContainer?.querySelector(`.${staticClasses.rightActions}`)?.clientWidth ?? 0);
31
+ }
32
+ setOverflowing(!((width || 0) - buttonsWidthRef.current > 60));
33
+ }
34
+ });
35
+ const { ref: panelRef } = useResizeDetector({
36
+ handleHeight: false,
37
+ disableRerender: true,
38
+ onResize({ entry }) {
39
+ const panelEl = entry?.target;
40
+ if (!panelEl) return;
41
+ const panelWidth = panelEl.clientWidth;
42
+ const tabWidth = (panelEl.previousElementSibling?.firstElementChild?.firstElementChild)?.clientWidth || 0;
43
+ setIsTabsFullWidth(tabs.length * tabWidth + PANEL_RADIUS >= panelWidth);
44
+ }
45
+ });
46
+ const [selectedTab, setSelectedTab] = useControlled(selectedTabIdProp, tabs[0].id);
47
+ const handleTabChange = (event, tabId) => {
48
+ setSelectedTab(tabId);
49
+ onTabChange?.(event, tabId);
50
+ };
51
+ const renderEndActions = (tab) => {
52
+ const btnsDisabled = selectedTab !== tab.id && !minimize;
53
+ if (rightActions && !overflowing) return /* @__PURE__ */ jsx(HvActionsGeneric, {
54
+ maxVisibleActions: 2,
55
+ actions: rightActions,
56
+ disabled: btnsDisabled,
57
+ className: cx(classes.rightActions, { [classes.actionsDisabled]: btnsDisabled }),
58
+ onAction: (event, action) => onAction?.(event, action, tab.id),
59
+ variant: "secondaryGhost",
60
+ iconOnly: true
61
+ });
62
+ if (overflowActions && overflowing) return /* @__PURE__ */ jsx(HvActionsGeneric, {
63
+ maxVisibleActions: 0,
64
+ actions: overflowActions,
65
+ disabled: btnsDisabled,
66
+ className: cx(classes.rightActions, { [classes.actionsDisabled]: btnsDisabled }),
67
+ onAction: (event, action) => onAction?.(event, action, tab.id),
68
+ variant: "secondaryGhost",
69
+ iconOnly: true
70
+ });
71
+ return null;
72
+ };
73
+ return /* @__PURE__ */ jsxs("div", {
74
+ id,
75
+ ref,
76
+ className: cx(classes.root, {
77
+ [classes.closed]: !open,
78
+ [classes.minimized]: minimize,
79
+ [classes.multipleTabs]: tabs.length > 1,
80
+ [classes.overflowing]: overflowing
81
+ }, className),
82
+ style: {
83
+ width: `calc(100% - ${sidePanelWidth}px - 2 * ${theme.space.sm})`,
84
+ right: theme.space.sm,
85
+ transition: canvasContext?.sidePanelDragging ? "height 0.3s ease, opacity 0.3s ease" : "width 0.3s ease"
86
+ },
87
+ ...others,
88
+ children: [/* @__PURE__ */ jsx(HvCanvasPanelTabs, {
89
+ onChange: handleTabChange,
90
+ value: selectedTab,
91
+ className: classes.tabsRoot,
92
+ children: tabs.map((tab, index) => /* @__PURE__ */ jsx(HvCanvasPanelTab, {
93
+ ref: index === 0 ? tabRef : void 0,
94
+ id: `${id}-${tab.id}`,
95
+ value: tab.id,
96
+ className: classes.tab,
97
+ startActions: leftActions && !overflowing && /* @__PURE__ */ jsx(HvActionsGeneric, {
98
+ maxVisibleActions: 1,
99
+ actions: leftActions,
100
+ disabled: selectedTab !== tab.id && !minimize,
101
+ className: cx(classes.leftActions, { [classes.actionsDisabled]: selectedTab !== tab.id && !minimize }),
102
+ onAction: (event, action) => onAction?.(event, action, tab.id),
103
+ variant: "secondaryGhost",
104
+ iconOnly: true
105
+ }),
106
+ endActions: renderEndActions(tab),
107
+ children: typeof tab.title === "function" ? tab.title(overflowing) : tab.title
108
+ }, tab.id))
109
+ }), /* @__PURE__ */ jsx(HvPanel, {
110
+ ref: panelRef,
111
+ role: "tabpanel",
112
+ "aria-labelledby": `${id}-${selectedTab}`,
113
+ className: classes.content,
114
+ style: mergeStyles(void 0, { "--right-border-radius": isTabsFullWidth ? 0 : `${PANEL_RADIUS}px` }),
115
+ children
116
+ })]
117
+ });
179
118
  });
180
- export {
181
- HvCanvasBottomPanel,
182
- staticClasses as canvasBottomPanelClasses
183
- };
119
+ //#endregion
120
+ export { HvCanvasBottomPanel };
@@ -1,56 +1,44 @@
1
1
  import { createClasses, theme } from "@hitachivantara/uikit-react-core";
2
- const { staticClasses, useClasses } = createClasses(
3
- "HvCanvasBottomPanel",
4
- {
5
- root: {
6
- position: "absolute",
7
- display: "flex",
8
- flexDirection: "column",
9
- right: 0,
10
- bottom: 0,
11
- width: "100%",
12
- maxHeight: "500px",
13
- visibility: "visible"
14
- },
15
- closed: {
16
- maxHeight: 0,
17
- visibility: "hidden"
18
- },
19
- minimized: {
20
- "& $content": {
21
- display: "none"
22
- },
23
- "& $tab": {
24
- backgroundColor: theme.colors.bgContainer,
25
- ...theme.typography.label
26
- }
27
- },
28
- multipleTabs: {
29
- "& $tab": { maxWidth: "288px" }
30
- },
31
- overflowing: {},
32
- tab: {
33
- padding: theme.space.xs
34
- },
35
- tabsRoot: {
36
- position: "relative"
37
- },
38
- leftActions: {},
39
- rightActions: {},
40
- actionsDisabled: {
41
- pointerEvents: "none",
42
- "&&& button": {
43
- pointerEvents: "none",
44
- "&,&:hover": {
45
- backgroundColor: "transparent",
46
- borderColor: "transparent"
47
- }
48
- }
49
- },
50
- content: { borderTopRightRadius: "var(--right-border-radius)" }
51
- }
52
- );
53
- export {
54
- staticClasses,
55
- useClasses
56
- };
2
+ //#region src/Canvas/BottomPanel/BottomPanel.styles.tsx
3
+ var { staticClasses, useClasses } = createClasses("HvCanvasBottomPanel", {
4
+ root: {
5
+ position: "absolute",
6
+ display: "flex",
7
+ flexDirection: "column",
8
+ right: 0,
9
+ bottom: 0,
10
+ width: "100%",
11
+ maxHeight: "500px",
12
+ visibility: "visible"
13
+ },
14
+ closed: {
15
+ maxHeight: 0,
16
+ visibility: "hidden"
17
+ },
18
+ minimized: {
19
+ "& $content": { display: "none" },
20
+ "& $tab": {
21
+ backgroundColor: theme.colors.bgContainer,
22
+ ...theme.typography.label
23
+ }
24
+ },
25
+ multipleTabs: { "& $tab": { maxWidth: "288px" } },
26
+ overflowing: {},
27
+ tab: { padding: theme.space.xs },
28
+ tabsRoot: { position: "relative" },
29
+ leftActions: {},
30
+ rightActions: {},
31
+ actionsDisabled: {
32
+ pointerEvents: "none",
33
+ "&&& button": {
34
+ pointerEvents: "none",
35
+ "&,&:hover": {
36
+ backgroundColor: "transparent",
37
+ borderColor: "transparent"
38
+ }
39
+ }
40
+ },
41
+ content: { borderTopRightRadius: "var(--right-border-radius)" }
42
+ });
43
+ //#endregion
44
+ export { staticClasses, useClasses };
@@ -1,46 +1,42 @@
1
+ import { createContext, useCallback, useContext, useMemo, useState } from "react";
1
2
  import { jsx } from "react/jsx-runtime";
2
- import { createContext, useState, useCallback, useMemo, useContext } from "react";
3
- const HvCanvasContext = createContext(null);
4
- const HvCanvasProvider = ({
5
- children
6
- }) => {
7
- const [sidePanelOpen, setSidePanelOpen] = useState(false);
8
- const [width, setWidth] = useState(0);
9
- const [sidePanelDragging, setSidePanelDragging] = useState(false);
10
- const handleSidePanelWidth = useCallback((newWidth) => {
11
- setWidth(newWidth);
12
- }, []);
13
- const handleSidePanelOpen = useCallback((open) => {
14
- setSidePanelOpen(open);
15
- }, []);
16
- const handleSidePanelDragging = useCallback((dragging) => {
17
- setSidePanelDragging(dragging);
18
- }, []);
19
- const value = useMemo(
20
- () => ({
21
- sidePanelOpen,
22
- handleSidePanelOpen,
23
- sidePanelWidth: sidePanelOpen ? width : 0,
24
- handleSidePanelWidth,
25
- sidePanelDragging,
26
- handleSidePanelDragging
27
- }),
28
- [
29
- sidePanelOpen,
30
- handleSidePanelOpen,
31
- width,
32
- handleSidePanelWidth,
33
- sidePanelDragging,
34
- handleSidePanelDragging
35
- ]
36
- );
37
- return /* @__PURE__ */ jsx(HvCanvasContext.Provider, { value, children });
3
+ //#region src/Canvas/CanvasContext.tsx
4
+ var HvCanvasContext = createContext(null);
5
+ var HvCanvasProvider = ({ children }) => {
6
+ const [sidePanelOpen, setSidePanelOpen] = useState(false);
7
+ const [width, setWidth] = useState(0);
8
+ const [sidePanelDragging, setSidePanelDragging] = useState(false);
9
+ const handleSidePanelWidth = useCallback((newWidth) => {
10
+ setWidth(newWidth);
11
+ }, []);
12
+ const handleSidePanelOpen = useCallback((open) => {
13
+ setSidePanelOpen(open);
14
+ }, []);
15
+ const handleSidePanelDragging = useCallback((dragging) => {
16
+ setSidePanelDragging(dragging);
17
+ }, []);
18
+ const value = useMemo(() => ({
19
+ sidePanelOpen,
20
+ handleSidePanelOpen,
21
+ sidePanelWidth: sidePanelOpen ? width : 0,
22
+ handleSidePanelWidth,
23
+ sidePanelDragging,
24
+ handleSidePanelDragging
25
+ }), [
26
+ sidePanelOpen,
27
+ handleSidePanelOpen,
28
+ width,
29
+ handleSidePanelWidth,
30
+ sidePanelDragging,
31
+ handleSidePanelDragging
32
+ ]);
33
+ return /* @__PURE__ */ jsx(HvCanvasContext.Provider, {
34
+ value,
35
+ children
36
+ });
38
37
  };
39
- const useCanvasContext = () => {
40
- return useContext(HvCanvasContext);
41
- };
42
- export {
43
- HvCanvasContext,
44
- HvCanvasProvider,
45
- useCanvasContext
38
+ var useCanvasContext = () => {
39
+ return useContext(HvCanvasContext);
46
40
  };
41
+ //#endregion
42
+ export { HvCanvasContext, HvCanvasProvider, useCanvasContext };
@@ -1,42 +1,34 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
1
+ import { useClasses } from "./PanelTab.styles.js";
2
2
  import { forwardRef, useRef } from "react";
3
- import { Tab } from "@mui/base";
4
3
  import { useDefaultProps } from "@hitachivantara/uikit-react-core";
5
- import { useClasses } from "./PanelTab.styles.js";
6
- import { staticClasses } from "./PanelTab.styles.js";
7
- const HvCanvasPanelTab = forwardRef(function HvCanvasPanelTab2(props, ref) {
8
- const {
9
- classes: classesProp,
10
- className,
11
- style,
12
- startActions,
13
- endActions,
14
- ...others
15
- } = useDefaultProps("HvCanvasPanelTab", props);
16
- const tabRef = useRef(null);
17
- const { classes, cx } = useClasses(classesProp);
18
- return (
19
- // oxlint-disable-next-line jsx_a11y/click-events-have-key-events,jsx_a11y/no-static-element-interactions, simulate tab click
20
- /* @__PURE__ */ jsxs(
21
- "div",
22
- {
23
- ref,
24
- style,
25
- className: cx(classes.root, className),
26
- onClick: (evt) => {
27
- if (evt.target === tabRef.current) return;
28
- tabRef.current?.click();
29
- },
30
- children: [
31
- startActions,
32
- /* @__PURE__ */ jsx(Tab, { ref: tabRef, className: classes.tab, ...others }),
33
- endActions
34
- ]
35
- }
36
- )
37
- );
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ import { Tab } from "@mui/base";
6
+ //#region src/Canvas/PanelTab/PanelTab.tsx
7
+ /**
8
+ * The tab component to use inside `HvCanvasPanelTabs`.
9
+ */
10
+ var HvCanvasPanelTab = forwardRef(function HvCanvasPanelTab(props, ref) {
11
+ const { classes: classesProp, className, style, startActions, endActions, ...others } = useDefaultProps("HvCanvasPanelTab", props);
12
+ const tabRef = useRef(null);
13
+ const { classes, cx } = useClasses(classesProp);
14
+ return /* @__PURE__ */ jsxs("div", {
15
+ ref,
16
+ style,
17
+ className: cx(classes.root, className),
18
+ onClick: (evt) => {
19
+ if (evt.target === tabRef.current) return;
20
+ tabRef.current?.click();
21
+ },
22
+ children: [
23
+ startActions,
24
+ /* @__PURE__ */ jsx(Tab, {
25
+ ref: tabRef,
26
+ className: classes.tab,
27
+ ...others
28
+ }),
29
+ endActions
30
+ ]
31
+ });
38
32
  });
39
- export {
40
- HvCanvasPanelTab,
41
- staticClasses as canvasPanelTabClasses
42
- };
33
+ //#endregion
34
+ export { HvCanvasPanelTab };
@@ -1,48 +1,41 @@
1
+ import { createClasses, outlineStyles, theme } from "@hitachivantara/uikit-react-core";
1
2
  import { tabClasses } from "@mui/base";
2
- import { createClasses, theme, outlineStyles } from "@hitachivantara/uikit-react-core";
3
- const { staticClasses, useClasses } = createClasses("HvCanvasPanelTab", {
4
- root: {
5
- height: "100%",
6
- display: "flex",
7
- position: "relative",
8
- alignItems: "center",
9
- justifyContent: "center",
10
- borderRadius: `${theme.radii.large} ${theme.radii.large} 0 0`,
11
- backgroundColor: theme.colors.bgPage,
12
- overflow: "hidden",
13
- width: "100%",
14
- boxShadow: "0px -2px 8px 0px #4141410F",
15
- color: theme.colors.textDisabled,
16
- "&:hover": {
17
- cursor: "pointer"
18
- },
19
- "&:has(:focus)": {
20
- backgroundColor: theme.colors.bgContainer
21
- },
22
- [`:has(.${tabClasses.selected})`]: {
23
- color: theme.colors.text,
24
- backgroundColor: theme.colors.bgContainer
25
- },
26
- "&:has(:focus-visible)": {
27
- ...outlineStyles
28
- }
29
- },
30
- tab: {
31
- appearance: "none",
32
- color: theme.colors.textSubtle,
33
- backgroundColor: "inherit",
34
- cursor: "inherit",
35
- textAlign: "initial",
36
- flex: 1,
37
- paddingInlineEnd: 0,
38
- paddingInlineStart: 0,
39
- [`&.${tabClasses.selected}`]: {
40
- color: theme.colors.text,
41
- fontWeight: theme.fontWeights.semibold
42
- }
43
- }
3
+ //#region src/Canvas/PanelTab/PanelTab.styles.tsx
4
+ var { staticClasses, useClasses } = createClasses("HvCanvasPanelTab", {
5
+ root: {
6
+ height: "100%",
7
+ display: "flex",
8
+ position: "relative",
9
+ alignItems: "center",
10
+ justifyContent: "center",
11
+ borderRadius: `${theme.radii.large} ${theme.radii.large} 0 0`,
12
+ backgroundColor: theme.colors.bgPage,
13
+ overflow: "hidden",
14
+ width: "100%",
15
+ boxShadow: "0px -2px 8px 0px #4141410F",
16
+ color: theme.colors.textDisabled,
17
+ "&:hover": { cursor: "pointer" },
18
+ "&:has(:focus)": { backgroundColor: theme.colors.bgContainer },
19
+ [`:has(.${tabClasses.selected})`]: {
20
+ color: theme.colors.text,
21
+ backgroundColor: theme.colors.bgContainer
22
+ },
23
+ "&:has(:focus-visible)": { ...outlineStyles }
24
+ },
25
+ tab: {
26
+ appearance: "none",
27
+ color: theme.colors.textSubtle,
28
+ backgroundColor: "inherit",
29
+ cursor: "inherit",
30
+ textAlign: "initial",
31
+ flex: 1,
32
+ paddingInlineEnd: 0,
33
+ paddingInlineStart: 0,
34
+ [`&.${tabClasses.selected}`]: {
35
+ color: theme.colors.text,
36
+ fontWeight: theme.fontWeights.semibold
37
+ }
38
+ }
44
39
  });
45
- export {
46
- staticClasses,
47
- useClasses
48
- };
40
+ //#endregion
41
+ export { staticClasses, useClasses };