@olenbetong/synergi-react 4.2.3 → 4.2.4
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/package.json +7 -7
- package/src/chrome/AppShell/index.tsx +29 -29
- package/src/chrome/openReport.ts +34 -34
- package/src/colorScheme.ts +81 -81
- package/src/components/DateNavigator/index.tsx +186 -186
- package/src/components/FilePond.tsx +312 -312
- package/src/components/ImageEditor/ImageEditor.tsx +348 -348
- package/src/components/ImageEditor/index.ts +9 -9
- package/src/components/ImageEditor/plugins/cropPlugin/CropOverlay.tsx +165 -165
- package/src/components/ImageEditor/plugins/cropPlugin/CropToolbar.tsx +48 -48
- package/src/components/ImageEditor/plugins/cropPlugin/useCropTool.ts +405 -405
- package/src/components/ImageEditor/plugins/redactPlugin/RedactToolbar.tsx +47 -47
- package/src/components/ImageEditor/plugins/zoomPlugin/ZoomContext.tsx +23 -23
- package/src/components/ImageEditor/plugins/zoomPlugin/ZoomControls.tsx +40 -40
- package/src/components/ImageEditor/useActiveTool.ts +21 -21
- package/src/components/ImageEditor/useEdgeDetection.ts +319 -319
- package/src/components/ImageEditor/useImageHistory.ts +197 -197
- package/src/components/ImageEditor/useOpenCV.ts +184 -184
- package/src/components/LinkedCardList/index.scss +95 -95
- package/src/components/MergeProgressDialog/index.tsx +249 -249
- package/src/components/PageBanner/index.tsx +80 -80
- package/src/components/PdfViewer/PdfViewer.tsx +158 -158
- package/src/components/ProgressBar/index.scss +96 -96
- package/src/components/SplitContainer/index.tsx +333 -333
- package/src/components/Toolbar/index.tsx +232 -232
- package/src/designsystemet-web-types.d.ts +24 -24
- package/src/elements/ElementDamage/DamageFormButtons.tsx +35 -35
- package/src/elements/ElementDamage/DescriptionInput.tsx +120 -120
- package/src/elements/ElementDamage/DuplicateDamage/DesktopView.tsx +82 -82
- package/src/elements/ElementDamage/DuplicateDamage/DublicateElementDamageDialog.tsx +67 -67
- package/src/elements/ElementDamage/DuplicateDamage/PhoneView.tsx +45 -45
- package/src/elements/ElementDamage/ElementNumberTextField.tsx +41 -41
- package/src/elements/ElementDamage/RegisterFix.tsx +100 -100
- package/src/elements/ElementDamage/SubmitButtons.tsx +40 -40
- package/src/elements/ElementDamage/TransportElementSelect.tsx +52 -52
- package/src/elements/ElementLookup.tsx +123 -123
- package/src/elements/ElementLookupDialog/BarcodeScanner/decoder.ts +32 -32
- package/src/elements/ElementLookupDialog/BarcodeScanner/decoders/dbr.ts +118 -118
- package/src/elements/ElementLookupDialog/BarcodeScanner/decoders/native.ts +103 -103
- package/src/elements/ElementLookupDialog/BarcodeScanner/decoders/zxing.ts +95 -95
- package/src/elements/ElementLookupDialog/BarcodeScanner/decoders.test.ts +118 -118
- package/src/elements/ElementLookupDialog/BarcodeScanner/duplicateFilter.ts +21 -21
- package/src/elements/ElementLookupDialog/BarcodeScanner/index.tsx +90 -90
- package/src/elements/ElementLookupDialog/BarcodeScanner/useScanner.ts +280 -280
- package/src/elements/ElementLookupDialog/HIDScanner/index.tsx +67 -67
- package/src/elements/ElementLookupDialog/Manual/ManualForm.tsx +141 -141
- package/src/elements/ElementLookupDialog/index.tsx +226 -226
- package/src/elements/ElementLookupDialog/utils/Giai.ts +209 -209
- package/src/elements/ProjectSelect.tsx +130 -130
- package/src/elements/index.ts +15 -15
- package/src/filter/index.ts +34 -34
- package/src/i18n.ts +13 -13
- package/src/index.ts +77 -77
- package/src/mui/MuiThemeProvider.tsx +174 -174
- package/src/mui/index.ts +1 -1
- package/src/test/setup.ts +8 -8
|
@@ -1,158 +1,158 @@
|
|
|
1
|
-
import { useEffect, useMemo, useRef, useState } from "react";
|
|
2
|
-
import { Document, Page, pdfjs } from "react-pdf";
|
|
3
|
-
import "./PdfViewer.css";
|
|
4
|
-
|
|
5
|
-
/*
|
|
6
|
-
* pdf.js parses in a Web Worker that must be loaded from a URL on the page's origin. On the
|
|
7
|
-
* 2026 templates pdfjs-dist comes from the platform bundle through the import map, and the
|
|
8
|
-
* platform serves the worker next to it - so resolve the specifier the way the browser does
|
|
9
|
-
* and step up one level. This makes the viewer platform-only: off the platform (a legacy
|
|
10
|
-
* template bundling this package) the specifier does not resolve, pdf.js logs a warning and
|
|
11
|
-
* parses on the main thread. A `new URL(..., import.meta.url)` fallback would make Vite emit
|
|
12
|
-
* the 1.2 MB worker into every consumer's build output without anything ever serving it.
|
|
13
|
-
*/
|
|
14
|
-
function platformWorkerUrl(): string | undefined {
|
|
15
|
-
try {
|
|
16
|
-
return new URL("../pdf.worker.min.js", import.meta.resolve("pdfjs-dist")).toString();
|
|
17
|
-
} catch {
|
|
18
|
-
console.warn("PdfViewer: pdfjs-dist is not on the page's import map; pdf.js will parse on the main thread.");
|
|
19
|
-
return undefined;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
let workerUrl = platformWorkerUrl();
|
|
24
|
-
if (workerUrl) {
|
|
25
|
-
pdfjs.GlobalWorkerOptions.workerSrc = workerUrl;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
type PdfViewerProps = { url?: string; file?: string | Blob | ArrayBuffer };
|
|
29
|
-
|
|
30
|
-
export function PdfViewer({ url, file }: PdfViewerProps) {
|
|
31
|
-
let [numPages, setNumPages] = useState(0);
|
|
32
|
-
let [error, setError] = useState<string | null>(null);
|
|
33
|
-
let containerRef = useRef<HTMLDivElement | null>(null);
|
|
34
|
-
let [containerWidth, setContainerWidth] = useState<number>(0);
|
|
35
|
-
let [containerHeight, setContainerHeight] = useState<number>(0);
|
|
36
|
-
let [scale, setScale] = useState<number>(1);
|
|
37
|
-
let [naturalPageSize, setNaturalPageSize] = useState<{
|
|
38
|
-
w: number;
|
|
39
|
-
h: number;
|
|
40
|
-
} | null>(null);
|
|
41
|
-
|
|
42
|
-
const pages = useMemo(() => Array.from({ length: numPages }, (_, i) => i + 1), [numPages]);
|
|
43
|
-
|
|
44
|
-
// Observe container size to support fit-to-page calculations
|
|
45
|
-
useEffect(() => {
|
|
46
|
-
let el = containerRef.current;
|
|
47
|
-
if (!el) return;
|
|
48
|
-
let ro = new ResizeObserver((entries) => {
|
|
49
|
-
let cr = entries[0].contentRect;
|
|
50
|
-
setContainerWidth(Math.max(1, Math.floor(cr.width)));
|
|
51
|
-
setContainerHeight(Math.max(1, Math.floor(cr.height)));
|
|
52
|
-
});
|
|
53
|
-
ro.observe(el);
|
|
54
|
-
setContainerWidth(Math.max(1, Math.floor(el.clientWidth)));
|
|
55
|
-
setContainerHeight(Math.max(1, Math.floor(el.clientHeight)));
|
|
56
|
-
return () => ro.disconnect();
|
|
57
|
-
}, []);
|
|
58
|
-
|
|
59
|
-
// Intercept browser zoom gestures and zoom the PDF instead
|
|
60
|
-
useEffect(() => {
|
|
61
|
-
let el = containerRef.current;
|
|
62
|
-
if (!el) return;
|
|
63
|
-
|
|
64
|
-
const clamp = (v: number, min: number, max: number) => Math.min(max, Math.max(min, v));
|
|
65
|
-
const zoomBy = (delta: number) => {
|
|
66
|
-
// Smooth exponential zoom for trackpads/mice
|
|
67
|
-
const factor = Math.exp(delta * 0.001);
|
|
68
|
-
setScale((s) => clamp(s * factor, 0.25, 5));
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
const onWheel = (e: WheelEvent) => {
|
|
72
|
-
if (e.ctrlKey) {
|
|
73
|
-
// ctrl+wheel is usually browser zoom; override for PDF zoom
|
|
74
|
-
e.preventDefault();
|
|
75
|
-
zoomBy(-e.deltaY);
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
const onKeyDown = (e: KeyboardEvent) => {
|
|
80
|
-
if (!e.ctrlKey) return;
|
|
81
|
-
const key = e.key;
|
|
82
|
-
if (key === "+" || key === "=" || key === "Add") {
|
|
83
|
-
e.preventDefault();
|
|
84
|
-
setScale((s) => clamp(s * 1.1, 0.25, 5));
|
|
85
|
-
} else if (key === "-" || key === "_" || key === "Subtract") {
|
|
86
|
-
e.preventDefault();
|
|
87
|
-
setScale((s) => clamp(s / 1.1, 0.25, 5));
|
|
88
|
-
} else if (key === "0") {
|
|
89
|
-
e.preventDefault();
|
|
90
|
-
setScale(1);
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
el.addEventListener("wheel", onWheel, { passive: false });
|
|
95
|
-
window.addEventListener("keydown", onKeyDown, { passive: false });
|
|
96
|
-
return () => {
|
|
97
|
-
el.removeEventListener("wheel", onWheel as EventListener);
|
|
98
|
-
window.removeEventListener("keydown", onKeyDown as EventListener);
|
|
99
|
-
};
|
|
100
|
-
}, []);
|
|
101
|
-
|
|
102
|
-
// When source changes, reset auto-fit baseline
|
|
103
|
-
useEffect(() => {
|
|
104
|
-
setNaturalPageSize(null);
|
|
105
|
-
setScale(1);
|
|
106
|
-
}, [url, file]);
|
|
107
|
-
|
|
108
|
-
// Compute base width to fit full page into container, then apply zoom scale.
|
|
109
|
-
// If we don't yet know page's natural size, default to fit-to-width.
|
|
110
|
-
const fitBaseWidth = useMemo(() => {
|
|
111
|
-
if (!naturalPageSize) return containerWidth || 1000;
|
|
112
|
-
const { w, h } = naturalPageSize;
|
|
113
|
-
if (w <= 0 || h <= 0) return containerWidth || 1000;
|
|
114
|
-
// width to fit by height: containerHeight * (w/h)
|
|
115
|
-
const widthByHeight = (containerHeight || 1000) * (w / h);
|
|
116
|
-
// Fit to page means respecting both constraints
|
|
117
|
-
return Math.min(Math.max(1, containerWidth || 1000), Math.max(1, widthByHeight));
|
|
118
|
-
}, [naturalPageSize, containerWidth, containerHeight]);
|
|
119
|
-
|
|
120
|
-
const pageWidth = Math.max(1, Math.round(fitBaseWidth * scale));
|
|
121
|
-
|
|
122
|
-
return (
|
|
123
|
-
<div ref={containerRef} className="pdfViewerContainer">
|
|
124
|
-
<div className="pdfViewerContent">
|
|
125
|
-
<Document
|
|
126
|
-
file={file ?? url}
|
|
127
|
-
onLoadSuccess={({ numPages }) => setNumPages(numPages)}
|
|
128
|
-
onLoadError={(e) => setError((e as Error)?.message ?? "Failed to load PDF")}
|
|
129
|
-
>
|
|
130
|
-
{pages.map((pageNumber) => (
|
|
131
|
-
<Page
|
|
132
|
-
key={pageNumber}
|
|
133
|
-
pageNumber={pageNumber}
|
|
134
|
-
renderTextLayer={false}
|
|
135
|
-
renderAnnotationLayer={false}
|
|
136
|
-
width={pageWidth}
|
|
137
|
-
onLoadSuccess={(p) => {
|
|
138
|
-
// Capture natural page size once for fit-to-page calculation
|
|
139
|
-
try {
|
|
140
|
-
// pdf.js viewport at scale 1
|
|
141
|
-
const vp = p.getViewport({ scale: 1 });
|
|
142
|
-
const w = Number(vp?.width) || Number((p as any).width) || 0;
|
|
143
|
-
const h = Number(vp?.height) || Number((p as any).height) || 0;
|
|
144
|
-
if (w > 0 && h > 0 && !naturalPageSize) {
|
|
145
|
-
setNaturalPageSize({ w, h });
|
|
146
|
-
}
|
|
147
|
-
} catch {
|
|
148
|
-
// Ignore, fallback to fit-to-width when unknown
|
|
149
|
-
}
|
|
150
|
-
}}
|
|
151
|
-
/>
|
|
152
|
-
))}
|
|
153
|
-
</Document>
|
|
154
|
-
</div>
|
|
155
|
-
{error && <div style={{ color: "#b00020", padding: 8 }}>Error loading PDF: {error}</div>}
|
|
156
|
-
</div>
|
|
157
|
-
);
|
|
158
|
-
}
|
|
1
|
+
import { useEffect, useMemo, useRef, useState } from "react";
|
|
2
|
+
import { Document, Page, pdfjs } from "react-pdf";
|
|
3
|
+
import "./PdfViewer.css";
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
* pdf.js parses in a Web Worker that must be loaded from a URL on the page's origin. On the
|
|
7
|
+
* 2026 templates pdfjs-dist comes from the platform bundle through the import map, and the
|
|
8
|
+
* platform serves the worker next to it - so resolve the specifier the way the browser does
|
|
9
|
+
* and step up one level. This makes the viewer platform-only: off the platform (a legacy
|
|
10
|
+
* template bundling this package) the specifier does not resolve, pdf.js logs a warning and
|
|
11
|
+
* parses on the main thread. A `new URL(..., import.meta.url)` fallback would make Vite emit
|
|
12
|
+
* the 1.2 MB worker into every consumer's build output without anything ever serving it.
|
|
13
|
+
*/
|
|
14
|
+
function platformWorkerUrl(): string | undefined {
|
|
15
|
+
try {
|
|
16
|
+
return new URL("../pdf.worker.min.js", import.meta.resolve("pdfjs-dist")).toString();
|
|
17
|
+
} catch {
|
|
18
|
+
console.warn("PdfViewer: pdfjs-dist is not on the page's import map; pdf.js will parse on the main thread.");
|
|
19
|
+
return undefined;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
let workerUrl = platformWorkerUrl();
|
|
24
|
+
if (workerUrl) {
|
|
25
|
+
pdfjs.GlobalWorkerOptions.workerSrc = workerUrl;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
type PdfViewerProps = { url?: string; file?: string | Blob | ArrayBuffer };
|
|
29
|
+
|
|
30
|
+
export function PdfViewer({ url, file }: PdfViewerProps) {
|
|
31
|
+
let [numPages, setNumPages] = useState(0);
|
|
32
|
+
let [error, setError] = useState<string | null>(null);
|
|
33
|
+
let containerRef = useRef<HTMLDivElement | null>(null);
|
|
34
|
+
let [containerWidth, setContainerWidth] = useState<number>(0);
|
|
35
|
+
let [containerHeight, setContainerHeight] = useState<number>(0);
|
|
36
|
+
let [scale, setScale] = useState<number>(1);
|
|
37
|
+
let [naturalPageSize, setNaturalPageSize] = useState<{
|
|
38
|
+
w: number;
|
|
39
|
+
h: number;
|
|
40
|
+
} | null>(null);
|
|
41
|
+
|
|
42
|
+
const pages = useMemo(() => Array.from({ length: numPages }, (_, i) => i + 1), [numPages]);
|
|
43
|
+
|
|
44
|
+
// Observe container size to support fit-to-page calculations
|
|
45
|
+
useEffect(() => {
|
|
46
|
+
let el = containerRef.current;
|
|
47
|
+
if (!el) return;
|
|
48
|
+
let ro = new ResizeObserver((entries) => {
|
|
49
|
+
let cr = entries[0].contentRect;
|
|
50
|
+
setContainerWidth(Math.max(1, Math.floor(cr.width)));
|
|
51
|
+
setContainerHeight(Math.max(1, Math.floor(cr.height)));
|
|
52
|
+
});
|
|
53
|
+
ro.observe(el);
|
|
54
|
+
setContainerWidth(Math.max(1, Math.floor(el.clientWidth)));
|
|
55
|
+
setContainerHeight(Math.max(1, Math.floor(el.clientHeight)));
|
|
56
|
+
return () => ro.disconnect();
|
|
57
|
+
}, []);
|
|
58
|
+
|
|
59
|
+
// Intercept browser zoom gestures and zoom the PDF instead
|
|
60
|
+
useEffect(() => {
|
|
61
|
+
let el = containerRef.current;
|
|
62
|
+
if (!el) return;
|
|
63
|
+
|
|
64
|
+
const clamp = (v: number, min: number, max: number) => Math.min(max, Math.max(min, v));
|
|
65
|
+
const zoomBy = (delta: number) => {
|
|
66
|
+
// Smooth exponential zoom for trackpads/mice
|
|
67
|
+
const factor = Math.exp(delta * 0.001);
|
|
68
|
+
setScale((s) => clamp(s * factor, 0.25, 5));
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const onWheel = (e: WheelEvent) => {
|
|
72
|
+
if (e.ctrlKey) {
|
|
73
|
+
// ctrl+wheel is usually browser zoom; override for PDF zoom
|
|
74
|
+
e.preventDefault();
|
|
75
|
+
zoomBy(-e.deltaY);
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
const onKeyDown = (e: KeyboardEvent) => {
|
|
80
|
+
if (!e.ctrlKey) return;
|
|
81
|
+
const key = e.key;
|
|
82
|
+
if (key === "+" || key === "=" || key === "Add") {
|
|
83
|
+
e.preventDefault();
|
|
84
|
+
setScale((s) => clamp(s * 1.1, 0.25, 5));
|
|
85
|
+
} else if (key === "-" || key === "_" || key === "Subtract") {
|
|
86
|
+
e.preventDefault();
|
|
87
|
+
setScale((s) => clamp(s / 1.1, 0.25, 5));
|
|
88
|
+
} else if (key === "0") {
|
|
89
|
+
e.preventDefault();
|
|
90
|
+
setScale(1);
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
el.addEventListener("wheel", onWheel, { passive: false });
|
|
95
|
+
window.addEventListener("keydown", onKeyDown, { passive: false });
|
|
96
|
+
return () => {
|
|
97
|
+
el.removeEventListener("wheel", onWheel as EventListener);
|
|
98
|
+
window.removeEventListener("keydown", onKeyDown as EventListener);
|
|
99
|
+
};
|
|
100
|
+
}, []);
|
|
101
|
+
|
|
102
|
+
// When source changes, reset auto-fit baseline
|
|
103
|
+
useEffect(() => {
|
|
104
|
+
setNaturalPageSize(null);
|
|
105
|
+
setScale(1);
|
|
106
|
+
}, [url, file]);
|
|
107
|
+
|
|
108
|
+
// Compute base width to fit full page into container, then apply zoom scale.
|
|
109
|
+
// If we don't yet know page's natural size, default to fit-to-width.
|
|
110
|
+
const fitBaseWidth = useMemo(() => {
|
|
111
|
+
if (!naturalPageSize) return containerWidth || 1000;
|
|
112
|
+
const { w, h } = naturalPageSize;
|
|
113
|
+
if (w <= 0 || h <= 0) return containerWidth || 1000;
|
|
114
|
+
// width to fit by height: containerHeight * (w/h)
|
|
115
|
+
const widthByHeight = (containerHeight || 1000) * (w / h);
|
|
116
|
+
// Fit to page means respecting both constraints
|
|
117
|
+
return Math.min(Math.max(1, containerWidth || 1000), Math.max(1, widthByHeight));
|
|
118
|
+
}, [naturalPageSize, containerWidth, containerHeight]);
|
|
119
|
+
|
|
120
|
+
const pageWidth = Math.max(1, Math.round(fitBaseWidth * scale));
|
|
121
|
+
|
|
122
|
+
return (
|
|
123
|
+
<div ref={containerRef} className="pdfViewerContainer">
|
|
124
|
+
<div className="pdfViewerContent">
|
|
125
|
+
<Document
|
|
126
|
+
file={file ?? url}
|
|
127
|
+
onLoadSuccess={({ numPages }) => setNumPages(numPages)}
|
|
128
|
+
onLoadError={(e) => setError((e as Error)?.message ?? "Failed to load PDF")}
|
|
129
|
+
>
|
|
130
|
+
{pages.map((pageNumber) => (
|
|
131
|
+
<Page
|
|
132
|
+
key={pageNumber}
|
|
133
|
+
pageNumber={pageNumber}
|
|
134
|
+
renderTextLayer={false}
|
|
135
|
+
renderAnnotationLayer={false}
|
|
136
|
+
width={pageWidth}
|
|
137
|
+
onLoadSuccess={(p) => {
|
|
138
|
+
// Capture natural page size once for fit-to-page calculation
|
|
139
|
+
try {
|
|
140
|
+
// pdf.js viewport at scale 1
|
|
141
|
+
const vp = p.getViewport({ scale: 1 });
|
|
142
|
+
const w = Number(vp?.width) || Number((p as any).width) || 0;
|
|
143
|
+
const h = Number(vp?.height) || Number((p as any).height) || 0;
|
|
144
|
+
if (w > 0 && h > 0 && !naturalPageSize) {
|
|
145
|
+
setNaturalPageSize({ w, h });
|
|
146
|
+
}
|
|
147
|
+
} catch {
|
|
148
|
+
// Ignore, fallback to fit-to-width when unknown
|
|
149
|
+
}
|
|
150
|
+
}}
|
|
151
|
+
/>
|
|
152
|
+
))}
|
|
153
|
+
</Document>
|
|
154
|
+
</div>
|
|
155
|
+
{error && <div style={{ color: "#b00020", padding: 8 }}>Error loading PDF: {error}</div>}
|
|
156
|
+
</div>
|
|
157
|
+
);
|
|
158
|
+
}
|
|
@@ -1,96 +1,96 @@
|
|
|
1
|
-
@use "../../styles/variables";
|
|
2
|
-
|
|
3
|
-
.ObProgressBar-root {
|
|
4
|
-
height: 1.5em;
|
|
5
|
-
width: 100%;
|
|
6
|
-
appearance: none;
|
|
7
|
-
-webkit-appearance: none;
|
|
8
|
-
background-color: whiteSmoke;
|
|
9
|
-
border: none;
|
|
10
|
-
border-radius: 3px;
|
|
11
|
-
box-shadow: 0 2px 3px rgba(0, 0, 0, 0.2) inset;
|
|
12
|
-
color: royalblue;
|
|
13
|
-
position: relative;
|
|
14
|
-
|
|
15
|
-
&::-webkit-progress-bar {
|
|
16
|
-
background-color: whiteSmoke;
|
|
17
|
-
border-radius: 3px;
|
|
18
|
-
box-shadow: 0 2px 3px rgba(0, 0, 0, 0.2) inset;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
&::-webkit-progress-value {
|
|
22
|
-
background-image:
|
|
23
|
-
linear-gradient(
|
|
24
|
-
135deg,
|
|
25
|
-
transparent,
|
|
26
|
-
transparent 33%,
|
|
27
|
-
rgba(0, 0, 0, 0.1) 33%,
|
|
28
|
-
rgba(0, 0, 0, 0.1) 66%,
|
|
29
|
-
transparent 66%
|
|
30
|
-
),
|
|
31
|
-
linear-gradient(top, rgba(255, 255, 255, 0.25), rgba(0, 0, 0, 0.2)),
|
|
32
|
-
linear-gradient(left, var(--brand-primary), var(--brand-light));
|
|
33
|
-
background-image:
|
|
34
|
-
-webkit-linear-gradient(
|
|
35
|
-
135deg,
|
|
36
|
-
transparent,
|
|
37
|
-
transparent 33%,
|
|
38
|
-
rgba(0, 0, 0, 0.1) 33%,
|
|
39
|
-
rgba(0, 0, 0, 0.1) 66%,
|
|
40
|
-
transparent 66%
|
|
41
|
-
),
|
|
42
|
-
-webkit-linear-gradient(top, rgba(255, 255, 255, 0.25), rgba(0, 0, 0, 0.2)),
|
|
43
|
-
-webkit-linear-gradient(left, var(--brand-primary), var(--brand-light));
|
|
44
|
-
background-size:
|
|
45
|
-
35px 20px,
|
|
46
|
-
100% 100%,
|
|
47
|
-
100% 100%;
|
|
48
|
-
border-radius: 3px;
|
|
49
|
-
position: relative;
|
|
50
|
-
transition: width 0.5s ease-out;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
&::-webkit-progress-value:after {
|
|
54
|
-
background-color: white;
|
|
55
|
-
content: "";
|
|
56
|
-
|
|
57
|
-
border-radius: 100%;
|
|
58
|
-
height: 5px;
|
|
59
|
-
|
|
60
|
-
position: absolute;
|
|
61
|
-
right: 7px;
|
|
62
|
-
top: 7px;
|
|
63
|
-
width: 5px;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
&::-moz-progress-bar {
|
|
67
|
-
background-image:
|
|
68
|
-
linear-gradient(
|
|
69
|
-
135deg,
|
|
70
|
-
transparent,
|
|
71
|
-
transparent 33%,
|
|
72
|
-
rgba(0, 0, 0, 0.1) 33%,
|
|
73
|
-
rgba(0, 0, 0, 0.1) 66%,
|
|
74
|
-
transparent 66%
|
|
75
|
-
),
|
|
76
|
-
linear-gradient(top, rgba(255, 255, 255, 0.25), rgba(0, 0, 0, 0.2)),
|
|
77
|
-
linear-gradient(left, var(--brand-primary), var(--brand-light));
|
|
78
|
-
background-image:
|
|
79
|
-
-moz-linear-gradient(
|
|
80
|
-
135deg,
|
|
81
|
-
transparent,
|
|
82
|
-
transparent 33%,
|
|
83
|
-
rgba(0, 0, 0, 0.1) 33%,
|
|
84
|
-
rgba(0, 0, 0, 0.1) 66%,
|
|
85
|
-
transparent 66%
|
|
86
|
-
),
|
|
87
|
-
-moz-linear-gradient(top, rgba(255, 255, 255, 0.25), rgba(0, 0, 0, 0.2)),
|
|
88
|
-
-moz-linear-gradient(left, var(--brand-primary), var(--brand-light));
|
|
89
|
-
background-size:
|
|
90
|
-
35px 20px,
|
|
91
|
-
100% 100%,
|
|
92
|
-
100% 100%;
|
|
93
|
-
border-radius: 3px;
|
|
94
|
-
transition: width 0.5s ease-out;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
1
|
+
@use "../../styles/variables";
|
|
2
|
+
|
|
3
|
+
.ObProgressBar-root {
|
|
4
|
+
height: 1.5em;
|
|
5
|
+
width: 100%;
|
|
6
|
+
appearance: none;
|
|
7
|
+
-webkit-appearance: none;
|
|
8
|
+
background-color: whiteSmoke;
|
|
9
|
+
border: none;
|
|
10
|
+
border-radius: 3px;
|
|
11
|
+
box-shadow: 0 2px 3px rgba(0, 0, 0, 0.2) inset;
|
|
12
|
+
color: royalblue;
|
|
13
|
+
position: relative;
|
|
14
|
+
|
|
15
|
+
&::-webkit-progress-bar {
|
|
16
|
+
background-color: whiteSmoke;
|
|
17
|
+
border-radius: 3px;
|
|
18
|
+
box-shadow: 0 2px 3px rgba(0, 0, 0, 0.2) inset;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&::-webkit-progress-value {
|
|
22
|
+
background-image:
|
|
23
|
+
linear-gradient(
|
|
24
|
+
135deg,
|
|
25
|
+
transparent,
|
|
26
|
+
transparent 33%,
|
|
27
|
+
rgba(0, 0, 0, 0.1) 33%,
|
|
28
|
+
rgba(0, 0, 0, 0.1) 66%,
|
|
29
|
+
transparent 66%
|
|
30
|
+
),
|
|
31
|
+
linear-gradient(top, rgba(255, 255, 255, 0.25), rgba(0, 0, 0, 0.2)),
|
|
32
|
+
linear-gradient(left, var(--brand-primary), var(--brand-light));
|
|
33
|
+
background-image:
|
|
34
|
+
-webkit-linear-gradient(
|
|
35
|
+
135deg,
|
|
36
|
+
transparent,
|
|
37
|
+
transparent 33%,
|
|
38
|
+
rgba(0, 0, 0, 0.1) 33%,
|
|
39
|
+
rgba(0, 0, 0, 0.1) 66%,
|
|
40
|
+
transparent 66%
|
|
41
|
+
),
|
|
42
|
+
-webkit-linear-gradient(top, rgba(255, 255, 255, 0.25), rgba(0, 0, 0, 0.2)),
|
|
43
|
+
-webkit-linear-gradient(left, var(--brand-primary), var(--brand-light));
|
|
44
|
+
background-size:
|
|
45
|
+
35px 20px,
|
|
46
|
+
100% 100%,
|
|
47
|
+
100% 100%;
|
|
48
|
+
border-radius: 3px;
|
|
49
|
+
position: relative;
|
|
50
|
+
transition: width 0.5s ease-out;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&::-webkit-progress-value:after {
|
|
54
|
+
background-color: white;
|
|
55
|
+
content: "";
|
|
56
|
+
|
|
57
|
+
border-radius: 100%;
|
|
58
|
+
height: 5px;
|
|
59
|
+
|
|
60
|
+
position: absolute;
|
|
61
|
+
right: 7px;
|
|
62
|
+
top: 7px;
|
|
63
|
+
width: 5px;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&::-moz-progress-bar {
|
|
67
|
+
background-image:
|
|
68
|
+
linear-gradient(
|
|
69
|
+
135deg,
|
|
70
|
+
transparent,
|
|
71
|
+
transparent 33%,
|
|
72
|
+
rgba(0, 0, 0, 0.1) 33%,
|
|
73
|
+
rgba(0, 0, 0, 0.1) 66%,
|
|
74
|
+
transparent 66%
|
|
75
|
+
),
|
|
76
|
+
linear-gradient(top, rgba(255, 255, 255, 0.25), rgba(0, 0, 0, 0.2)),
|
|
77
|
+
linear-gradient(left, var(--brand-primary), var(--brand-light));
|
|
78
|
+
background-image:
|
|
79
|
+
-moz-linear-gradient(
|
|
80
|
+
135deg,
|
|
81
|
+
transparent,
|
|
82
|
+
transparent 33%,
|
|
83
|
+
rgba(0, 0, 0, 0.1) 33%,
|
|
84
|
+
rgba(0, 0, 0, 0.1) 66%,
|
|
85
|
+
transparent 66%
|
|
86
|
+
),
|
|
87
|
+
-moz-linear-gradient(top, rgba(255, 255, 255, 0.25), rgba(0, 0, 0, 0.2)),
|
|
88
|
+
-moz-linear-gradient(left, var(--brand-primary), var(--brand-light));
|
|
89
|
+
background-size:
|
|
90
|
+
35px 20px,
|
|
91
|
+
100% 100%,
|
|
92
|
+
100% 100%;
|
|
93
|
+
border-radius: 3px;
|
|
94
|
+
transition: width 0.5s ease-out;
|
|
95
|
+
}
|
|
96
|
+
}
|