+
{children}
);
-};
+});
diff --git a/webapp/packages/core-blocks/src/Slide/SlideElement.m.css b/webapp/packages/core-blocks/src/Slide/SlideElement.m.css
new file mode 100644
index 0000000000..8e8bf031b8
--- /dev/null
+++ b/webapp/packages/core-blocks/src/Slide/SlideElement.m.css
@@ -0,0 +1,22 @@
+.slideElement {
+ width: 100%;
+ height: 100%;
+ display: inline-block;
+ vertical-align: top;
+ white-space: normal;
+ transition: transform cubic-bezier(0.4, 0, 0.2, 1) 0.6s;
+ transform: translateX(-100%);
+
+ &:first-child {
+ transition: width cubic-bezier(0.4, 0, 0.2, 1) 0.6s;
+ width: 100%;
+ }
+}
+
+.open .slideElement {
+ transform: translateX(0%);
+
+ &:first-child {
+ width: calc(100% - 120px);
+ }
+}
diff --git a/webapp/packages/core-blocks/src/Slide/SlideElement.tsx b/webapp/packages/core-blocks/src/Slide/SlideElement.tsx
index d25a30fe04..1232635cf9 100644
--- a/webapp/packages/core-blocks/src/Slide/SlideElement.tsx
+++ b/webapp/packages/core-blocks/src/Slide/SlideElement.tsx
@@ -5,11 +5,20 @@
* Licensed under the Apache License, Version 2.0.
* you may not use this file except in compliance with the License.
*/
+import { observer } from 'mobx-react-lite';
+
+import { s } from '../s';
+import { useS } from '../useS';
+import style from './SlideElement.m.css';
interface Props {
className?: string;
+ children?: React.ReactNode;
+ open?: boolean;
}
-export const SlideElement: React.FC
> = function SlideElement({ children, className }) {
- return {children}
;
-};
+export const SlideElement = observer(function SlideElement({ children, className }) {
+ const styles = useS(style);
+
+ return {children}
;
+});
diff --git a/webapp/packages/core-blocks/src/Slide/SlideOverlay.m.css b/webapp/packages/core-blocks/src/Slide/SlideOverlay.m.css
new file mode 100644
index 0000000000..24fe671718
--- /dev/null
+++ b/webapp/packages/core-blocks/src/Slide/SlideOverlay.m.css
@@ -0,0 +1,40 @@
+.slideOverlay {
+ z-index: 1;
+ position: absolute;
+ cursor: pointer;
+ display: flex;
+ align-items: center;
+ width: 0;
+ height: 0;
+ top: 0;
+ left: 0;
+ background: rgb(0 0 0 / 0%);
+ transition: background cubic-bezier(0.4, 0, 0.2, 1) 0.6s;
+}
+
+.iconBtn {
+ composes: theme-background-surface theme-text-on-surface theme-ripple from global;
+ box-sizing: border-box;
+ margin-left: 36px;
+ width: 48px;
+ height: 48px;
+ padding: 16px;
+ border-radius: 50%;
+ display: none;
+ overflow: hidden;
+ align-items: center;
+ transform: rotate(90deg);
+}
+.icon {
+ width: 100%;
+}
+
+.open .slideOverlay {
+ width: 100%;
+ height: 100%;
+ background: rgb(0 0 0 / 35%);
+
+ & > div {
+ display: flex;
+ }
+}
diff --git a/webapp/packages/core-blocks/src/Slide/SlideOverlay.tsx b/webapp/packages/core-blocks/src/Slide/SlideOverlay.tsx
index 32a5b01b12..e3c01e15b9 100644
--- a/webapp/packages/core-blocks/src/Slide/SlideOverlay.tsx
+++ b/webapp/packages/core-blocks/src/Slide/SlideOverlay.tsx
@@ -5,43 +5,28 @@
* Licensed under the Apache License, Version 2.0.
* you may not use this file except in compliance with the License.
*/
+import { observer } from 'mobx-react-lite';
import styled, { css } from 'reshadow';
import { Icon } from '../Icon';
+import { s } from '../s';
+import { useS } from '../useS';
+import style from './SlideOverlay.m.css';
interface Props {
className?: string;
onClick?: () => void;
+ open?: boolean;
}
-const styles = css`
- div {
- z-index: 1;
- }
- icon-btn {
- composes: theme-background-surface theme-text-on-surface theme-ripple from global;
- box-sizing: border-box;
- margin-left: 36px;
- width: 48px;
- height: 48px;
- padding: 16px;
- border-radius: 50%;
- display: none;
- overflow: hidden;
- align-items: center;
- transform: rotate(90deg);
- }
- Icon {
- width: 100%;
- }
-`;
+export const SlideOverlay = observer(function SlideOverlay({ className, onClick }) {
+ const styles = useS(style);
-export const SlideOverlay: React.FC = function SlideOverlay({ className, onClick }) {
- return styled(styles)(
-
-
-
-
-
,
+ return (
+
);
-};
+});
diff --git a/webapp/packages/core-blocks/src/Split/Pane.m.css b/webapp/packages/core-blocks/src/Split/Pane.m.css
new file mode 100644
index 0000000000..c568a40f92
--- /dev/null
+++ b/webapp/packages/core-blocks/src/Split/Pane.m.css
@@ -0,0 +1,6 @@
+.pane {
+ flex: 1 1 0%;
+ overflow: auto;
+ z-index: 0;
+ display: flex;
+}
diff --git a/webapp/packages/core-blocks/src/Split/Pane.tsx b/webapp/packages/core-blocks/src/Split/Pane.tsx
index 3db678268b..ebde075b93 100644
--- a/webapp/packages/core-blocks/src/Split/Pane.tsx
+++ b/webapp/packages/core-blocks/src/Split/Pane.tsx
@@ -6,7 +6,14 @@
* you may not use this file except in compliance with the License.
*/
import { Pane as BasePane, PaneProps } from 'go-split';
+import { observer } from 'mobx-react-lite';
-export function Pane(props: PaneProps) {
- return ;
-}
+import { s } from '../s';
+import { useS } from '../useS';
+import style from './Pane.m.css';
+
+export const Pane = observer(function Pane({ className, ...rest }) {
+ const styles = useS(style);
+
+ return ;
+});
diff --git a/webapp/packages/core-blocks/src/Split/ResizeControls.m.css b/webapp/packages/core-blocks/src/Split/ResizeControls.m.css
new file mode 100644
index 0000000000..57ce16b931
--- /dev/null
+++ b/webapp/packages/core-blocks/src/Split/ResizeControls.m.css
@@ -0,0 +1,42 @@
+.resizerControls {
+ composes: theme-background-background theme-text-on-secondary from global;
+ position: relative;
+ flex: 0 1 auto;
+ cursor: ew-resize;
+ user-select: none;
+ z-index: 1;
+ transition: background-color 0.3s ease-in-out;
+
+ &:before {
+ content: ' ';
+ position: absolute;
+ width: 4px;
+ height: 100%;
+ top: 0;
+ left: -1px;
+ cursor: ew-resize;
+ box-sizing: border-box;
+ }
+
+ &.vertical {
+ width: 2px;
+ }
+
+ &.horizontal {
+ cursor: ns-resize;
+ height: 2px;
+ width: initial;
+
+ &:before {
+ height: 4px;
+ width: 100%;
+ top: -1px;
+ left: 0;
+ cursor: ns-resize;
+ }
+ }
+}
+
+div.resizerControls:hover {
+ background-color: var(--theme-primary);
+}
diff --git a/webapp/packages/core-blocks/src/Split/ResizerControls.tsx b/webapp/packages/core-blocks/src/Split/ResizerControls.tsx
index d87a27bb34..e3917994e4 100644
--- a/webapp/packages/core-blocks/src/Split/ResizerControls.tsx
+++ b/webapp/packages/core-blocks/src/Split/ResizerControls.tsx
@@ -6,17 +6,28 @@
* you may not use this file except in compliance with the License.
*/
import { Resizer } from 'go-split';
+import { observer } from 'mobx-react-lite';
+import { s } from '../s';
+import { useS } from '../useS';
+import style from './ResizeControls.m.css';
import { SplitControls } from './SplitControls';
+import { useSplit } from './useSplit';
interface ResizerControlsProps {
className?: string;
}
-export function ResizerControls({ className }: ResizerControlsProps) {
+export const ResizerControls = observer(function ResizerControls({ className }: ResizerControlsProps) {
+ const styles = useS(style);
+ const split = useSplit();
+
+ const vertical = split.state.split === 'vertical';
+ const horizontal = split.state.split === 'horizontal';
+
return (
-
+
);
-}
+});
diff --git a/webapp/packages/core-blocks/src/Split/Split.m.css b/webapp/packages/core-blocks/src/Split/Split.m.css
new file mode 100644
index 0000000000..ae669a3aa0
--- /dev/null
+++ b/webapp/packages/core-blocks/src/Split/Split.m.css
@@ -0,0 +1,15 @@
+.split {
+ display: flex;
+ flex: 1;
+ overflow: hidden;
+ z-index: 0;
+
+ &.vertical {
+ flex-direction: row;
+ }
+
+ &.horizontal {
+ flex-direction: column;
+ height: 100%;
+ }
+}
diff --git a/webapp/packages/core-blocks/src/Split/Split.tsx b/webapp/packages/core-blocks/src/Split/Split.tsx
index 7961c1b295..04f04522a4 100644
--- a/webapp/packages/core-blocks/src/Split/Split.tsx
+++ b/webapp/packages/core-blocks/src/Split/Split.tsx
@@ -6,9 +6,19 @@
* you may not use this file except in compliance with the License.
*/
import { Split as BaseSplit, SplitProps } from 'go-split';
+import { observer } from 'mobx-react-lite';
+
+import { s } from '../s';
+import { useS } from '../useS';
+import style from './Split.m.css';
export type ISplitProps = SplitProps;
-export function Split(props: ISplitProps) {
- return ;
-}
+export const Split = observer(function Split({ className, split, ...rest }) {
+ const styles = useS(style);
+
+ const vertical = split === 'vertical' || split === undefined;
+ const horizontal = split === 'horizontal';
+
+ return ;
+});
diff --git a/webapp/packages/core-blocks/src/Split/styles.ts b/webapp/packages/core-blocks/src/Split/styles.ts
deleted file mode 100644
index 27276d2b4d..0000000000
--- a/webapp/packages/core-blocks/src/Split/styles.ts
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * CloudBeaver - Cloud Database Manager
- * Copyright (C) 2020-2023 DBeaver Corp and others
- *
- * Licensed under the Apache License, Version 2.0.
- * you may not use this file except in compliance with the License.
- */
-import { css } from 'reshadow';
-
-export const splitStyles = css`
- space {
- display: flex;
- flex-direction: row;
- flex: 1;
- overflow: hidden;
- }
- Split {
- display: flex;
- flex-direction: row;
- flex: 1;
- overflow: hidden;
- z-index: 0;
- }
- Pane {
- flex: 1 1 0%;
- overflow: auto;
- z-index: 0;
- }
-
- ResizerControls {
- composes: theme-background-background theme-text-on-secondary from global;
- position: relative;
- flex: 0 1 auto;
- width: 2px;
- cursor: ew-resize;
- user-select: none;
- z-index: 1;
- transition: background-color 0.3s ease-in-out;
-
- &:hover {
- background-color: var(--theme-primary);
- }
- }
-
- ResizerControls:before {
- content: ' ';
- position: absolute;
- width: 4px;
- height: 100%;
- top: 0;
- left: -1px;
- cursor: ew-resize;
- box-sizing: border-box;
- }
-`;
-
-export const splitHorizontalStyles = css`
- space {
- height: 100%;
- }
- Split {
- flex-direction: column;
- height: 100%;
- }
-
- ResizerControls {
- position: relative;
- cursor: ns-resize;
- height: 2px;
- width: initial;
- }
-
- ResizerControls:before {
- height: 4px;
- width: 100%;
- top: -1px;
- left: 0;
- cursor: ns-resize;
- }
-`;
diff --git a/webapp/packages/core-blocks/src/StatusMessage.m.css b/webapp/packages/core-blocks/src/StatusMessage.m.css
new file mode 100644
index 0000000000..0ff3f4b1c3
--- /dev/null
+++ b/webapp/packages/core-blocks/src/StatusMessage.m.css
@@ -0,0 +1,21 @@
+.statusMessage {
+ overflow: hidden;
+ composes: theme-typography--caption from global;
+ height: 24px;
+ display: flex;
+ align-items: center;
+ gap: 8px;
+}
+.iconOrImage {
+ height: 24px;
+ width: 24px;
+}
+.message,
+.link {
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+}
+.link {
+ cursor: pointer;
+}
diff --git a/webapp/packages/core-blocks/src/StatusMessage.tsx b/webapp/packages/core-blocks/src/StatusMessage.tsx
index 6493721618..5ebdac57c2 100644
--- a/webapp/packages/core-blocks/src/StatusMessage.tsx
+++ b/webapp/packages/core-blocks/src/StatusMessage.tsx
@@ -6,38 +6,16 @@
* you may not use this file except in compliance with the License.
*/
import { observer } from 'mobx-react-lite';
-import styled, { css } from 'reshadow';
import { ENotificationType } from '@cloudbeaver/core-events';
import { IconOrImage } from './IconOrImage';
import { Link } from './Link';
import { useTranslate } from './localization/useTranslate';
+import { s } from './s';
+import style from './StatusMessage.m.css';
import { useErrorDetails } from './useErrorDetails';
-
-const styles = css`
- status-message {
- overflow: hidden;
- composes: theme-typography--caption from global;
- height: 24px;
- display: flex;
- align-items: center;
- gap: 8px;
- }
- IconOrImage {
- height: 24px;
- width: 24px;
- }
- message,
- Link {
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- }
- Link {
- cursor: pointer;
- }
-`;
+import { useS } from './useS';
interface Props {
message?: string | string[] | null;
@@ -48,6 +26,7 @@ interface Props {
}
export const StatusMessage = observer(function StatusMessage({ type, message, exception = null, className, onShowDetails }) {
+ const styles = useS(style);
const translate = useTranslate();
const errorDetails = useErrorDetails(exception);
const isError = type === ENotificationType.Error || exception !== null;
@@ -71,14 +50,22 @@ export const StatusMessage = observer(function StatusMessage({ type, mess
onShowDetails = errorDetails.open;
}
- return styled(styles)(
-
+ return (
+
{message && (
<>
-
-
{onShowDetails ? {message} : message}
+
+
+ {onShowDetails ? (
+
+ {message}
+
+ ) : (
+ message
+ )}
+
>
)}
- ,
+
);
});
diff --git a/webapp/packages/core-blocks/src/TextPlaceholder.m.css b/webapp/packages/core-blocks/src/TextPlaceholder.m.css
new file mode 100644
index 0000000000..bb171c3539
--- /dev/null
+++ b/webapp/packages/core-blocks/src/TextPlaceholder.m.css
@@ -0,0 +1,12 @@
+.container {
+ flex: 1;
+ display: flex;
+ width: 100%;
+ height: 100%;
+ min-width: 230px;
+ margin: auto;
+}
+.content {
+ margin: auto;
+ text-align: center;
+}
diff --git a/webapp/packages/core-blocks/src/TextPlaceholder.tsx b/webapp/packages/core-blocks/src/TextPlaceholder.tsx
index ee0349d773..47c72d3215 100644
--- a/webapp/packages/core-blocks/src/TextPlaceholder.tsx
+++ b/webapp/packages/core-blocks/src/TextPlaceholder.tsx
@@ -5,31 +5,22 @@
* Licensed under the Apache License, Version 2.0.
* you may not use this file except in compliance with the License.
*/
-import styled, { css } from 'reshadow';
-
-const TextPlaceholderStyles = css`
- div {
- flex: 1;
- display: flex;
- width: 100%;
- height: 100%;
- min-width: 230px;
- margin: auto;
- }
- span {
- margin: auto;
- text-align: center;
- }
-`;
+import { s } from './s';
+import style from './TextPlaceholder.m.css';
+import { useS } from './useS';
+import {observer} from "mobx-react-lite";
interface Props {
className?: string;
+ children?: React.ReactNode;
}
-export const TextPlaceholder: React.FC> = function TextPlaceholder(props) {
- return styled(TextPlaceholderStyles)(
-
- {props.children}
-
,
+export const TextPlaceholder = observer(function TextPlaceholder({ className, children }) {
+ const styles = useS(style);
+
+ return (
+
+ {children}
+
);
-};
+});
diff --git a/webapp/packages/core-blocks/src/TimerIcon.m.css b/webapp/packages/core-blocks/src/TimerIcon.m.css
new file mode 100644
index 0000000000..bfe95f5651
--- /dev/null
+++ b/webapp/packages/core-blocks/src/TimerIcon.m.css
@@ -0,0 +1,49 @@
+.timer {
+ position: relative;
+ width: 16px;
+ height: 16px;
+ overflow: hidden;
+
+ & > .icon {
+ width: 16px;
+ height: 16px;
+ }
+
+ & .state {
+ opacity: 0;
+
+ & > .icon {
+ width: 12px;
+ height: 12px;
+ }
+ }
+}
+.state,
+.interval {
+ position: absolute;
+ right: 0;
+ top: 0;
+ display: flex;
+ width: 16px;
+ height: 16px;
+ justify-content: center;
+ align-items: center;
+}
+.timer {
+ &:hover {
+ & .state {
+ opacity: 1;
+ }
+ & .interval {
+ opacity: 0;
+ }
+ }
+
+}
+.interval {
+ font-size: 8px;
+ font-weight: bold;
+ line-height: normal;
+ justify-content: center;
+ align-items: center;
+}
diff --git a/webapp/packages/core-blocks/src/TimerIcon.tsx b/webapp/packages/core-blocks/src/TimerIcon.tsx
index 6cc7755fd4..5eaeae4c3b 100644
--- a/webapp/packages/core-blocks/src/TimerIcon.tsx
+++ b/webapp/packages/core-blocks/src/TimerIcon.tsx
@@ -6,79 +6,28 @@
* you may not use this file except in compliance with the License.
*/
import type React from 'react';
-import styled, { css } from 'reshadow';
-
-import type { ComponentStyle } from '@cloudbeaver/core-theming';
import { Icon } from './Icon';
-import { useStyles } from './useStyles';
-
-const style = css`
- timer {
- position: relative;
- width: 16px;
- height: 16px;
- overflow: hidden;
-
- & > Icon {
- width: 16px;
- height: 16px;
- }
-
- & state {
- opacity: 0;
-
- & > Icon {
- width: 12px;
- height: 12px;
- }
- }
- }
- state,
- interval {
- position: absolute;
- right: 0;
- top: 0;
- display: flex;
- width: 16px;
- height: 16px;
- justify-content: center;
- align-items: center;
- }
- timer:hover {
- & state {
- opacity: 1;
- }
- & interval {
- opacity: 0;
- }
- }
- interval {
- font-size: 8px;
- font-weight: bold;
- line-height: normal;
- justify-content: center;
- align-items: center;
- }
-`;
+import { s } from './s';
+import style from './TimerIcon.m.css';
+import { useS } from './useS';
+import {observer} from "mobx-react-lite";
interface Props {
state: 'play' | 'stop';
interval: number;
- styles?: ComponentStyle;
}
-export const TimerIcon: React.FC> = function TimerIcon({ state, interval, styles, ...rest }) {
- return styled(
- style,
- useStyles(styles),
- )(
-
-
-
-
-
- {interval}
- ,
+export const TimerIcon = observer>(function TimerIcon({ state, interval, ...rest }) {
+ const styles = useS(style);
+
+ return (
+
);
-};
+});
diff --git a/webapp/packages/core-blocks/src/UploadArea.m.css b/webapp/packages/core-blocks/src/UploadArea.m.css
new file mode 100644
index 0000000000..8b06412e90
--- /dev/null
+++ b/webapp/packages/core-blocks/src/UploadArea.m.css
@@ -0,0 +1,8 @@
+.label {
+ cursor: pointer;
+ width: fit-content;
+
+ &.disabled {
+ cursor: default;
+ }
+}
diff --git a/webapp/packages/core-blocks/src/UploadArea.tsx b/webapp/packages/core-blocks/src/UploadArea.tsx
index ad7a7f00c0..a311f2b2b3 100644
--- a/webapp/packages/core-blocks/src/UploadArea.tsx
+++ b/webapp/packages/core-blocks/src/UploadArea.tsx
@@ -5,12 +5,15 @@
* Licensed under the Apache License, Version 2.0.
* you may not use this file except in compliance with the License.
*/
+import { observer } from 'mobx-react-lite';
import { forwardRef, useLayoutEffect } from 'react';
-import styled, { css, use } from 'reshadow';
import { uuid } from '@cloudbeaver/core-utils';
+import { s } from './s';
+import style from './UploadArea.m.css';
import { useRefInherit } from './useRefInherit';
+import { useS } from './useS';
interface Props extends Omit, HTMLInputElement>, 'value'> {
value?: FileList | null;
@@ -19,46 +22,35 @@ interface Props extends Omit(function UploadArea({ id = uuid(), value, reset, children, className, ...rest }, refInherit) {
+ const styles = useS(style);
+ const ref = useRefInherit(refInherit);
- &[|disabled] {
- cursor: default;
- }
- }
-`;
+ const handleChange = async (event: React.ChangeEvent) => {
+ if (rest.onChange) {
+ await (rest.onChange(event) as void | Promise);
-export const UploadArea = forwardRef(function UploadArea(
- { id = uuid(), value, reset, children, className, ...rest },
- refInherit,
-) {
- const ref = useRefInherit(refInherit);
-
- const handleChange = async (event: React.ChangeEvent) => {
- if (rest.onChange) {
- await (rest.onChange(event) as void | Promise);
-
- if (reset) {
- const target = event.target as HTMLInputElement;
- target.value = '';
+ if (reset) {
+ const target = event.target as HTMLInputElement;
+ target.value = '';
+ }
}
- }
- };
+ };
- useLayoutEffect(() => {
- if (ref.current && value !== undefined) {
- ref.current.files = value;
- }
- });
-
- return styled(styles)(
- <>
-
-
- >,
- );
-});
+ useLayoutEffect(() => {
+ if (ref.current && value !== undefined) {
+ ref.current.files = value;
+ }
+ });
+
+ return (
+ <>
+
+
+ >
+ );
+ }),
+);
diff --git a/webapp/packages/core-blocks/src/index.ts b/webapp/packages/core-blocks/src/index.ts
index 55d1767248..837dab904c 100644
--- a/webapp/packages/core-blocks/src/index.ts
+++ b/webapp/packages/core-blocks/src/index.ts
@@ -62,11 +62,10 @@ export * from './PropertiesTable/PropertiesTable';
export * from './PropertiesTable/IProperty';
export * from './Slide/SlideBox';
-export * from './Slide/SlideBoxStyles';
export * from './Slide/SlideElement';
export * from './Slide/SlideOverlay';
+export { default as SlideBoxStyles } from './Slide/SlideBox.m.css';
-export * from './Split/styles';
export * from './Split/SplitControls';
export * from './Split/Pane';
export * from './Split/ResizerControls';
@@ -93,7 +92,6 @@ export * from './Table/TableSelect';
export * from './Table/getSelectedItems';
export * from './Expand/Expandable';
-export * from './Expand/EXPANDABLE_FORM_STYLES';
export * from './Tree/TreeNode/EventTreeNodeClickFlag';
export * from './Tree/TreeNode/EventTreeNodeExpandFlag';
@@ -108,6 +106,7 @@ export * from './Tree/TreeNode/TreeNodeNested';
export * from './Tree/TreeNode/TreeNodeNestedMessage';
export * from './Tree/TreeNode/TreeNodeSelect';
export * from './Button';
+export { default as ButtonStyles } from './Button.m.css';
export * from './ToolsPanel/ToolsAction';
export * from './ToolsPanel/ToolsPanel';
export { default as ToolsPanelStyles } from './ToolsPanel/ToolsPanel.m.css';
@@ -163,11 +162,13 @@ export * from './FormControls/useForm';
export * from './FormControls/Textarea';
export * from './Link';
export * from './Cell';
+export { default as CellStyles } from './Cell.m.css';
export * from './UploadArea';
export * from './ErrorMessage';
export * from './preventFocusHandler';
export * from './StatusMessage';
export * from './ExceptionMessage';
+export { default as ExceptionMessageStyles } from './ExceptionMessage.m.css';
export * from './getComputed';
export * from './IconButton';
export { default as IconButtonStyles } from './IconButton.m.css';
diff --git a/webapp/packages/plugin-administration/src/Administration/Administration.tsx b/webapp/packages/plugin-administration/src/Administration/Administration.tsx
index fa5d9cb2f8..5d73b38c6e 100644
--- a/webapp/packages/plugin-administration/src/Administration/Administration.tsx
+++ b/webapp/packages/plugin-administration/src/Administration/Administration.tsx
@@ -14,7 +14,6 @@ import {
Loader,
SContext,
SlideBox,
- slideBoxStyles,
SlideElement,
SlideOverlay,
StyleRegistry,
@@ -120,7 +119,7 @@ export const Administration = observer>(function
contentRef.current?.scrollTo({ top: 0, left: 0 });
}, [activeScreen?.item]);
- return styled(useStyles(BASE_TAB_STYLES, verticalTabStyles, administrationStyles, tabsStyles, slideBoxStyles))(
+ return styled(useStyles(BASE_TAB_STYLES, verticalTabStyles, administrationStyles, tabsStyles))(
diff --git a/webapp/packages/plugin-connections/src/ConnectionForm/Options/ProviderPropertiesForm.tsx b/webapp/packages/plugin-connections/src/ConnectionForm/Options/ProviderPropertiesForm.tsx
index ac92393a36..347a1c0705 100644
--- a/webapp/packages/plugin-connections/src/ConnectionForm/Options/ProviderPropertiesForm.tsx
+++ b/webapp/packages/plugin-connections/src/ConnectionForm/Options/ProviderPropertiesForm.tsx
@@ -10,7 +10,6 @@ import { observer } from 'mobx-react-lite';
import {
Container,
Expandable,
- EXPANDABLE_FORM_STYLES,
getPropertyControlType,
Group,
GroupTitle,
@@ -77,7 +76,7 @@ export const ProviderPropertiesForm = observer(function ProviderPropertie
{categories.map((category, index) => (
-
+
= observer(function SSH({ st
)}
-
+
(
},
ref,
) {
+ const styles = useS(style);
const dataPresentationService = useService(DataPresentationService);
const tableViewerStorageService = useService(TableViewerStorageService);
const dataModel = tableViewerStorageService.get(tableId);
@@ -255,13 +200,11 @@ export const TableViewer = observer(
resultExist &&
!simple;
- return styled(
- viewerStyles,
- splitStyles,
- )(
-
-
+ return (
+
+
(
resultIndex={resultIndex}
onPresentationChange={dataTableActions.setPresentation}
/>
-
+
-
-
-
-
+
+
+
+
(
overlay={overlay}
onCancel={() => dataModel.source.cancel()}
/>
-
+
-
-
-
+
+
+
{resultExist && (
(
simple={simple}
/>
)}
-
+
-
+
{!simple && (
(
onClose={dataTableActions.closeValuePresentation}
/>
)}
-
+
- ,
+
);
}),
);
diff --git a/webapp/packages/plugin-log-viewer/src/LogViewer/LogViewer.m.css b/webapp/packages/plugin-log-viewer/src/LogViewer/LogViewer.m.css
new file mode 100644
index 0000000000..8169d0ce49
--- /dev/null
+++ b/webapp/packages/plugin-log-viewer/src/LogViewer/LogViewer.m.css
@@ -0,0 +1,9 @@
+.logViewWrapper,
+.pane {
+ z-index: 0;
+ position: relative;
+ display: flex;
+ flex: 1;
+ flex-direction: column;
+ overflow: hidden;
+}
diff --git a/webapp/packages/plugin-log-viewer/src/LogViewer/LogViewer.tsx b/webapp/packages/plugin-log-viewer/src/LogViewer/LogViewer.tsx
index 467a7cdca7..008016ac7c 100644
--- a/webapp/packages/plugin-log-viewer/src/LogViewer/LogViewer.tsx
+++ b/webapp/packages/plugin-log-viewer/src/LogViewer/LogViewer.tsx
@@ -7,30 +7,16 @@
*/
import { observer } from 'mobx-react-lite';
import { useCallback, useEffect } from 'react';
-import styled, { css } from 'reshadow';
-import { Pane, ResizerControls, Split, splitStyles, TextPlaceholder, useSplitUserState, useStyles, useTranslate } from '@cloudbeaver/core-blocks';
+import { Pane, ResizerControls, s, Split, TextPlaceholder, useS, useSplitUserState, useTranslate } from '@cloudbeaver/core-blocks';
+import style from './LogViewer.m.css';
import { LogViewerInfoPanel } from './LogViewerInfoPanel';
import { LogViewerTable } from './LogViewerTable';
import { useLogViewer } from './useLogViewer';
-const styles = css`
- Pane {
- composes: theme-background-surface theme-text-on-surface from global;
- }
- log-view-wrapper,
- Pane {
- position: relative;
- display: flex;
- flex: 1;
- flex-direction: column;
- overflow: hidden;
- }
-`;
-
export const LogViewer = observer(function LogViewer() {
- const style = useStyles(styles, splitStyles);
+ const styles = useS(style);
const translate = useTranslate();
const logViewerState = useLogViewer();
const splitState = useSplitUserState('log-viewer');
@@ -47,10 +33,15 @@ export const LogViewer = observer(function LogViewer() {
return {translate('plugin_log_viewer_placeholder')};
}
- return styled(style)(
-
-
-
+ return (
+
+
+
-
+
{logViewerState.selectedItem && }
- ,
+
);
});
diff --git a/webapp/packages/plugin-sql-editor/src/SqlEditor.m.css b/webapp/packages/plugin-sql-editor/src/SqlEditor.m.css
new file mode 100644
index 0000000000..ca5ced83f6
--- /dev/null
+++ b/webapp/packages/plugin-sql-editor/src/SqlEditor.m.css
@@ -0,0 +1,12 @@
+.captureView {
+ flex: 1;
+ display: flex;
+ overflow: auto;
+ position: relative;
+}
+.pane {
+ composes: theme-typography--body2 from global;
+}
+.pane:first-child {
+ flex-direction: column;
+}
diff --git a/webapp/packages/plugin-sql-editor/src/SqlEditor.tsx b/webapp/packages/plugin-sql-editor/src/SqlEditor.tsx
index 4d00012187..94d2ffd11b 100644
--- a/webapp/packages/plugin-sql-editor/src/SqlEditor.tsx
+++ b/webapp/packages/plugin-sql-editor/src/SqlEditor.tsx
@@ -6,60 +6,42 @@
* you may not use this file except in compliance with the License.
*/
import { observer } from 'mobx-react-lite';
-import styled, { css } from 'reshadow';
-import { Loader, Pane, ResizerControls, Split, splitHorizontalStyles, splitStyles, useSplitUserState, useStyles } from '@cloudbeaver/core-blocks';
+import { Loader, Pane, ResizerControls, s, Split, useS, useSplitUserState, useStyles } from '@cloudbeaver/core-blocks';
import { useService } from '@cloudbeaver/core-di';
import { CaptureView } from '@cloudbeaver/core-view';
import type { ISqlEditorTabState } from './ISqlEditorTabState';
import { SqlDataSourceService } from './SqlDataSource/SqlDataSourceService';
+import style from './SqlEditor.m.css';
import { SqlEditorLoader } from './SqlEditor/SqlEditorLoader';
import { SqlEditorOverlay } from './SqlEditorOverlay';
import { SqlEditorStatusBar } from './SqlEditorStatusBar';
import { SqlEditorView } from './SqlEditorView';
import { SqlResultTabs } from './SqlResultTabs/SqlResultTabs';
import { useDataSource } from './useDataSource';
-
-const viewerStyles = css`
- CaptureView {
- flex: 1;
- display: flex;
- overflow: auto;
- position: relative;
- }
- Pane {
- composes: theme-typography--body2 from global;
- display: flex;
- position: relative;
- }
- Pane:first-child {
- flex-direction: column;
- }
-`;
-
interface Props {
state: ISqlEditorTabState;
}
export const SqlEditor = observer(function SqlEditor({ state }) {
+ const styles = useS(style);
const sqlEditorView = useService(SqlEditorView);
const sqlDataSourceService = useService(SqlDataSourceService);
- const styles = useStyles(splitStyles, splitHorizontalStyles, viewerStyles);
const dataSource = sqlDataSourceService.get(state.editorId);
useDataSource(dataSource);
const splitState = useSplitUserState(`sql-editor-${dataSource?.sourceKey ?? 'default'}`);
- return styled(styles)(
+ return (
-
+
-
+
-
+
@@ -68,6 +50,6 @@ export const SqlEditor = observer(function SqlEditor({ state }) {
- ,
+
);
});
diff --git a/webapp/packages/plugin-sql-editor/src/SqlResultTabs/ExecutionPlan/ExecutionPlanTreeBlock.m.css b/webapp/packages/plugin-sql-editor/src/SqlResultTabs/ExecutionPlan/ExecutionPlanTreeBlock.m.css
new file mode 100644
index 0000000000..8d3334339a
--- /dev/null
+++ b/webapp/packages/plugin-sql-editor/src/SqlResultTabs/ExecutionPlan/ExecutionPlanTreeBlock.m.css
@@ -0,0 +1,3 @@
+.textarea > :global(textarea) {
+ border: none !important;
+}
diff --git a/webapp/packages/plugin-sql-editor/src/SqlResultTabs/ExecutionPlan/ExecutionPlanTreeBlock.tsx b/webapp/packages/plugin-sql-editor/src/SqlResultTabs/ExecutionPlan/ExecutionPlanTreeBlock.tsx
index f691fbfe5c..b8fd35c59a 100644
--- a/webapp/packages/plugin-sql-editor/src/SqlResultTabs/ExecutionPlan/ExecutionPlanTreeBlock.tsx
+++ b/webapp/packages/plugin-sql-editor/src/SqlResultTabs/ExecutionPlan/ExecutionPlanTreeBlock.tsx
@@ -6,44 +6,28 @@
* you may not use this file except in compliance with the License.
*/
import { observer } from 'mobx-react-lite';
-import styled, { css } from 'reshadow';
import {
Pane,
ResizerControls,
+ s,
Split,
- splitStyles,
Table,
TableBody,
TableColumnHeader,
TableHeader,
Textarea,
TextPlaceholder,
+ useS,
useSplitUserState,
useTranslate,
} from '@cloudbeaver/core-blocks';
import type { SqlExecutionPlanNode } from '@cloudbeaver/core-sdk';
+import style from './ExecutionPlanTreeBlock.m.css';
import { NestedNode } from './NestedNode';
import { useExecutionPlanTreeState } from './useExecutionPlanTreeState';
-const styles = css`
- Pane {
- composes: theme-background-surface theme-text-on-surface from global;
- }
- Split {
- height: 100%;
- flex-direction: column;
- }
- ResizerControls {
- width: 100%;
- height: 2px;
- }
- Textarea > :global(textarea) {
- border: none !important;
- }
-`;
-
interface Props {
nodeList: SqlExecutionPlanNode[];
query: string;
@@ -52,15 +36,13 @@ interface Props {
}
export const ExecutionPlanTreeBlock = observer(function ExecutionPlanTreeBlock({ nodeList, query, onNodeSelect, className }) {
+ const styles = useS(style);
const translate = useTranslate();
const splitState = useSplitUserState('execution-plan-block');
const state = useExecutionPlanTreeState(nodeList, onNodeSelect);
- return styled(
- styles,
- splitStyles,
- )(
-
+ return (
+
{state.nodes.length && state.columns.length ? (
@@ -87,8 +69,8 @@ export const ExecutionPlanTreeBlock = observer(function ExecutionPlanTree
-
+
- ,
+
);
});
diff --git a/webapp/packages/plugin-sql-editor/src/SqlResultTabs/ExecutionPlan/SqlExecutionPlanPanel.m.css b/webapp/packages/plugin-sql-editor/src/SqlResultTabs/ExecutionPlan/SqlExecutionPlanPanel.m.css
new file mode 100644
index 0000000000..4229ea48ab
--- /dev/null
+++ b/webapp/packages/plugin-sql-editor/src/SqlResultTabs/ExecutionPlan/SqlExecutionPlanPanel.m.css
@@ -0,0 +1,5 @@
+.pane {
+ &:first-child {
+ overflow: hidden;
+ }
+}
diff --git a/webapp/packages/plugin-sql-editor/src/SqlResultTabs/ExecutionPlan/SqlExecutionPlanPanel.tsx b/webapp/packages/plugin-sql-editor/src/SqlResultTabs/ExecutionPlan/SqlExecutionPlanPanel.tsx
index b548e6596b..81b3cd2dae 100644
--- a/webapp/packages/plugin-sql-editor/src/SqlResultTabs/ExecutionPlan/SqlExecutionPlanPanel.tsx
+++ b/webapp/packages/plugin-sql-editor/src/SqlResultTabs/ExecutionPlan/SqlExecutionPlanPanel.tsx
@@ -7,30 +7,22 @@
*/
import { observer } from 'mobx-react-lite';
import { useState } from 'react';
-import styled, { css } from 'reshadow';
-import { Loader, Pane, ResizerControls, Split, splitStyles, useSplitUserState } from '@cloudbeaver/core-blocks';
+import { Loader, Pane, ResizerControls, s, Split, useS, useSplitUserState } from '@cloudbeaver/core-blocks';
import { useService } from '@cloudbeaver/core-di';
import type { IExecutionPlanTab } from '../../ISqlEditorTabState';
import { ExecutionPlanTreeBlock } from './ExecutionPlanTreeBlock';
import { PropertiesPanel } from './PropertiesPanel/PropertiesPanel';
+import style from './SqlExecutionPlanPanel.m.css';
import { SqlExecutionPlanService } from './SqlExecutionPlanService';
-const styles = css`
- Pane {
- composes: theme-background-surface theme-text-on-surface from global;
- }
- Pane:first-child {
- overflow: hidden;
- }
-`;
-
interface Props {
executionPlanTab: IExecutionPlanTab;
}
export const SqlExecutionPlanPanel = observer(function SqlExecutionPlanPanel({ executionPlanTab }) {
+ const styles = useS(style);
const sqlExecutionPlanService = useService(SqlExecutionPlanService);
const data = sqlExecutionPlanService.data.get(executionPlanTab.tabId);
const [selectedNode, setSelectedNode] = useState(null);
@@ -40,18 +32,15 @@ export const SqlExecutionPlanPanel = observer(function SqlExecutionPlanPa
return data?.task.cancel()} />;
}
- return styled(
- styles,
- splitStyles,
- )(
+ return (
-
+
-
+
{selectedNode && }
- ,
+
);
});
diff --git a/webapp/packages/plugin-version-update-administration/src/VersionChecker.tsx b/webapp/packages/plugin-version-update-administration/src/VersionChecker.tsx
index 71849ada84..ba5fdc12da 100644
--- a/webapp/packages/plugin-version-update-administration/src/VersionChecker.tsx
+++ b/webapp/packages/plugin-version-update-administration/src/VersionChecker.tsx
@@ -6,19 +6,23 @@
* you may not use this file except in compliance with the License.
*/
import { observer } from 'mobx-react-lite';
-import { css } from 'reshadow';
-import { Cell, IconOrImage, useTranslate } from '@cloudbeaver/core-blocks';
+import { Cell, CellStyles, IconOrImage, s, SContext, StyleRegistry, useS, useTranslate } from '@cloudbeaver/core-blocks';
import { useService } from '@cloudbeaver/core-di';
import { VersionResource, VersionService } from '@cloudbeaver/core-version';
import { VersionUpdateService } from '@cloudbeaver/core-version-update';
-const style = css`
- before {
- width: 40px;
- height: 40px;
- }
-`;
+import VersionCheckCellStyles from './VersionCheckerCellStyles.m.css';
+
+const registry: StyleRegistry = [
+ [
+ CellStyles,
+ {
+ mode: 'append',
+ styles: [VersionCheckCellStyles],
+ },
+ ],
+];
export const VersionChecker = observer(function VersionChecker() {
const translate = useTranslate();
@@ -34,13 +38,10 @@ export const VersionChecker = observer(function VersionChecker() {
: '';
return (
- | }
- description={versionUpdateService.newVersionAvailable ? description : undefined}
- style={style}
- ripple={false}
- >
- {translate(text)}
-
+
+ | } description={versionUpdateService.newVersionAvailable ? description : undefined} ripple={false}>
+ {translate(text)}
+
+
);
});
diff --git a/webapp/packages/plugin-version-update-administration/src/VersionCheckerCellStyles.m.css b/webapp/packages/plugin-version-update-administration/src/VersionCheckerCellStyles.m.css
new file mode 100644
index 0000000000..70e16b37a1
--- /dev/null
+++ b/webapp/packages/plugin-version-update-administration/src/VersionCheckerCellStyles.m.css
@@ -0,0 +1,4 @@
+.before {
+ width: 40px;
+ height: 40px;
+}