Skip to content

Commit 84a39a1

Browse files
committed
bioming
1 parent 39e836e commit 84a39a1

File tree

12 files changed

+99
-37
lines changed

12 files changed

+99
-37
lines changed

web/libs/datamanager/src/components/Common/Badge/Badge.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ import "./Badge.scss";
33

44
export const Badge = ({ children, size, className, color, style }) => {
55
return (
6-
<div className={cn("badge-dm").mod({ size }).mix(className).toClassName()} style={{ ...(style ?? {}), backgroundColor: color }}>
6+
<div
7+
className={cn("badge-dm").mod({ size }).mix(className).toClassName()}
8+
style={{ ...(style ?? {}), backgroundColor: color }}
9+
>
710
{children}
811
</div>
912
);

web/libs/datamanager/src/components/Common/FieldsButton.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export const FieldsButton = injector(
112112
openUpwardForShortViewport={openUpwardForShortViewport}
113113
>
114114
{tooltip ? (
115-
<div className={cn("field-button").toClassName() + " h-[40px] flex items-center"} style={{ zIndex: 1000 }}>
115+
<div className={`${cn("field-button").toClassName()} h-[40px] flex items-center`} style={{ zIndex: 1000 }}>
116116
<Button
117117
tooltip={tooltip}
118118
variant="neutral"

web/libs/datamanager/src/components/Common/Form/Elements/Counter/Counter.jsx

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,10 @@ const Counter = ({
152152

153153
return (
154154
<CounterContext.Provider value={contextValue}>
155-
<div className={cn("counter").mod({ focused, disabled: fieldDisabled }).mix(className).toClassName()} style={style}>
155+
<div
156+
className={cn("counter").mod({ focused, disabled: fieldDisabled }).mix(className).toClassName()}
157+
style={style}
158+
>
156159
<CounterButton type="decrease" />
157160

158161
<input
@@ -192,12 +195,16 @@ const CounterButton = ({ type }) => {
192195
const compareLimit = type === "increase" ? max : min;
193196

194197
return (
198+
// biome-ignore lint/a11y/useValidAnchor: anchor used for styling purposes, todo after bem migration
195199
<a
196200
href="#"
197-
className={cn("counter").elem("btn").mod({
198-
type,
199-
disabled: currentValue === compareLimit || disabled,
200-
}).toClassName()}
201+
className={cn("counter")
202+
.elem("btn")
203+
.mod({
204+
type,
205+
disabled: currentValue === compareLimit || disabled,
206+
})
207+
.toClassName()}
201208
onClick={onClickHandler(type, ref)}
202209
onMouseDownCapture={(e) => e.preventDefault()}
203210
>

web/libs/datamanager/src/components/Common/Form/Elements/Label/Label.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const Label = forwardRef(
2828
{description && <div className={cn("label-dm").elem("description").toClassName()}>{description}</div>}
2929
</div>
3030
</div>,
31-
<div className={cn("label-dm").elem("field").toClassName()}>{children}</div>
31+
<div className={cn("label-dm").elem("field").toClassName()}>{children}</div>,
3232
);
3333
},
3434
);

web/libs/datamanager/src/components/Common/MediaPlayer/MediaPlayer.jsx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1-
import { createRef, useCallback, useEffect, useMemo, useReducer, useRef, useState, forwardRef, createElement } from "react";
1+
import {
2+
createRef,
3+
useCallback,
4+
useEffect,
5+
useMemo,
6+
useReducer,
7+
useRef,
8+
useState,
9+
forwardRef,
10+
createElement,
11+
} from "react";
212
import { IconTimelinePause, IconTimelinePlay } from "@humansignal/icons";
313
import { cn } from "../../../utils/bem";
414
import { filename } from "../../../utils/helpers";
@@ -207,6 +217,6 @@ const MediaSource = forwardRef(({ type = "audio", src, ...props }, ref) => {
207217
ref,
208218
...props,
209219
},
210-
<source src={src} />
220+
<source src={src} />,
211221
);
212222
});

web/libs/datamanager/src/components/Common/Range/Range.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,10 @@ export const Range = forwardRef(
113113
</div>
114114
)}
115115
<div
116-
className={cn("range").elem("body").mod({ "with-icon": isDefined(minIcon) || isDefined(maxIcon) }).toClassName()}
116+
className={cn("range")
117+
.elem("body")
118+
.mod({ "with-icon": isDefined(minIcon) || isDefined(maxIcon) })
119+
.toClassName()}
117120
style={{ [sizeProperty]: size }}
118121
>
119122
<div className={cn("range").elem("line").toClassName()} />

web/libs/datamanager/src/components/Common/Resizer/Resizer.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,10 @@ export const Resizer = ({
7979
</div>
8080

8181
<div
82-
className={cn("resizer").elem("handle").mod({ resizing: showResizerLine !== false && isResizing, quickview: type === "quickview" }).toClassName()}
82+
className={cn("resizer")
83+
.elem("handle")
84+
.mod({ resizing: showResizerLine !== false && isResizing, quickview: type === "quickview" })
85+
.toClassName()}
8386
ref={resizeHandler}
8487
style={handleStyle}
8588
onMouseDown={handleResize}

web/libs/datamanager/src/components/Common/SkeletonLoader/SkeletonLine.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,13 @@ export const SkeletonLine = ({
88
const rows = [];
99

1010
for (let i = 0; i < lineCount; i++) {
11-
rows.push(<div className={cn("skeletonLoader").elem("line").toClassName()} key={i} style={{ "--line-width": width, "--line-height": height } as any} />);
11+
rows.push(
12+
<div
13+
className={cn("skeletonLoader").elem("line").toClassName()}
14+
key={i}
15+
style={{ "--line-width": width, "--line-height": height } as any}
16+
/>,
17+
);
1218
}
1319
return <>{rows}</>;
1420
};

web/libs/datamanager/src/components/DataManager/Toolbar/ActionsButton.jsx

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ const DialogContent = ({ text, form, formRef, store, action }) => {
4141
<div className={cn("dialog-content").toClassName()}>
4242
<div className={cn("dialog-content").elem("text").toClassName()}>{text}</div>
4343
{isLoading && (
44-
<div className={cn("dialog-content").elem("loading").toClassName()} style={{ display: "flex", justifyContent: "center", marginTop: 16 }}>
44+
<div
45+
className={cn("dialog-content").elem("loading").toClassName()}
46+
style={{ display: "flex", justifyContent: "center", marginTop: 16 }}
47+
>
4548
<Spinner />
4649
</div>
4750
)}
@@ -74,19 +77,24 @@ const ActionButton = ({ action, parentRef, store, formRef }) => {
7477
const titleContainer = (
7578
<Menu.Item
7679
key={action.id}
77-
className={cn("actionButton").mod({
78-
hasSeperator: isDeleteAction,
79-
hasSubMenu: action.children?.length > 0,
80-
isSeparator: action.isSeparator,
81-
isTitle: action.isTitle,
82-
danger: isDeleteAction,
83-
disabled: action.disabled,
84-
}).toClassName()}
80+
className={cn("actionButton")
81+
.mod({
82+
hasSeperator: isDeleteAction,
83+
hasSubMenu: action.children?.length > 0,
84+
isSeparator: action.isSeparator,
85+
isTitle: action.isTitle,
86+
danger: isDeleteAction,
87+
disabled: action.disabled,
88+
})
89+
.toClassName()}
8590
size="small"
8691
onClick={onClick}
8792
aria-label={action.title}
8893
>
89-
<div className={cn("actionButton").elem("titleContainer").toClassName()} {...(action.disabled ? { title: action.disabledReason } : {})}>
94+
<div
95+
className={cn("actionButton").elem("titleContainer").toClassName()}
96+
{...(action.disabled ? { title: action.disabledReason } : {})}
97+
>
9098
<div className={cn("actionButton").elem("title").toClassName()}>{action.title}</div>
9199
{hasChildren ? <IconChevronRight className={cn("actionButton").elem("icon").toClassName()} /> : null}
92100
</div>

web/libs/datamanager/src/components/Label/Label.jsx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,19 @@ export const Labeling = injector(
118118
</div>
119119
)}
120120

121-
<div className={cn("label-view").elem("lsf-wrapper").mod({ mode: isExplorerMode ? "explorer" : "labeling" }).toClassName()}>
121+
<div
122+
className={cn("label-view")
123+
.elem("lsf-wrapper")
124+
.mod({ mode: isExplorerMode ? "explorer" : "labeling" })
125+
.toClassName()}
126+
>
122127
{loading && <div className={cn("label-view").elem("waiting").mod({ animated: true }).toClassName()} />}
123-
<div ref={lsfRef} id="label-studio-dm" className={cn("label-view").elem("lsf-container").toClassName()} key="label-studio" />
128+
<div
129+
ref={lsfRef}
130+
id="label-studio-dm"
131+
className={cn("label-view").elem("lsf-container").toClassName()}
132+
key="label-studio"
133+
/>
124134
</div>
125135
</div>
126136
</div>

0 commit comments

Comments
 (0)