Skip to content

Commit 2fde595

Browse files
feat: move RefreshIndicator to component kit
1 parent 56a4b98 commit 2fde595

File tree

4 files changed

+82
-82
lines changed

4 files changed

+82
-82
lines changed

packages/modules/data-widgets/src/themesource/datawidgets/web/_datagrid.scss

Lines changed: 0 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -429,86 +429,6 @@ $root: ".widget-datagrid";
429429
display: contents;
430430
}
431431

432-
&-refresh-container {
433-
grid-column: 1 / -1;
434-
padding: 0;
435-
position: relative;
436-
}
437-
438-
&-refresh-indicator {
439-
-webkit-appearance: none;
440-
-moz-appearance: none;
441-
appearance: none;
442-
background-color: var(--border-color-default, #ced0d3);
443-
border: none;
444-
border-radius: 2px;
445-
color: var(--brand-primary, $dg-brand-primary);
446-
height: 4px;
447-
width: 100%;
448-
position: absolute;
449-
left: 0;
450-
right: 0;
451-
452-
&::-webkit-progress-bar {
453-
background-color: transparent;
454-
}
455-
456-
&::-webkit-progress-value {
457-
background-color: currentColor;
458-
transition: all 0.2s;
459-
}
460-
461-
&::-moz-progress-bar {
462-
background-color: currentColor;
463-
transition: all 0.2s;
464-
}
465-
466-
&::-ms-fill {
467-
border: none;
468-
background-color: currentColor;
469-
transition: all 0.2s;
470-
}
471-
472-
&:indeterminate {
473-
background-size: 200% 100%;
474-
background-image: linear-gradient(
475-
to right,
476-
transparent 50%,
477-
currentColor 50%,
478-
currentColor 60%,
479-
transparent 60%,
480-
transparent 71.5%,
481-
currentColor 71.5%,
482-
currentColor 84%,
483-
transparent 84%
484-
);
485-
animation: progress-linear 3s infinite linear;
486-
}
487-
488-
&:indeterminate::-moz-progress-bar {
489-
background-color: transparent;
490-
}
491-
492-
&:indeterminate::-ms-fill {
493-
animation-name: none;
494-
}
495-
496-
@keyframes progress-linear {
497-
0% {
498-
background-size: 200% 100%;
499-
background-position: left -31.25% top 0%;
500-
}
501-
50% {
502-
background-size: 800% 100%;
503-
background-position: left -49% top 0%;
504-
}
505-
100% {
506-
background-size: 400% 100%;
507-
background-position: left -102% top 0%;
508-
}
509-
}
510-
}
511-
512432
&.widget-datagrid-selection-method-click {
513433
.tr.tr-selected .td {
514434
background-color: $dg-grid-selected-row-background;
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
.mx-refresh-container {
2+
grid-column: 1 / -1;
3+
padding: 0;
4+
position: relative;
5+
}
6+
7+
.mx-refresh-indicator {
8+
-webkit-appearance: none;
9+
-moz-appearance: none;
10+
appearance: none;
11+
background-color: var(--border-color-default, #ced0d3);
12+
border: none;
13+
border-radius: 2px;
14+
color: var(--brand-primary, $dg-brand-primary);
15+
height: 4px;
16+
width: 100%;
17+
position: absolute;
18+
left: 0;
19+
right: 0;
20+
21+
&::-webkit-progress-bar {
22+
background-color: transparent;
23+
}
24+
25+
&::-webkit-progress-value {
26+
background-color: currentColor;
27+
transition: all 0.2s;
28+
}
29+
30+
&::-moz-progress-bar {
31+
background-color: currentColor;
32+
transition: all 0.2s;
33+
}
34+
35+
&::-ms-fill {
36+
border: none;
37+
background-color: currentColor;
38+
transition: all 0.2s;
39+
}
40+
41+
&:indeterminate {
42+
background-size: 200% 100%;
43+
background-image: linear-gradient(
44+
to right,
45+
transparent 50%,
46+
currentColor 50%,
47+
currentColor 60%,
48+
transparent 60%,
49+
transparent 71.5%,
50+
currentColor 71.5%,
51+
currentColor 84%,
52+
transparent 84%
53+
);
54+
animation: progress-linear 3s infinite linear;
55+
}
56+
57+
&:indeterminate::-moz-progress-bar {
58+
background-color: transparent;
59+
}
60+
61+
&:indeterminate::-ms-fill {
62+
animation-name: none;
63+
}
64+
65+
@keyframes progress-linear {
66+
0% {
67+
background-size: 200% 100%;
68+
background-position: left -31.25% top 0%;
69+
}
70+
50% {
71+
background-size: 800% 100%;
72+
background-position: left -49% top 0%;
73+
}
74+
100% {
75+
background-size: 400% 100%;
76+
background-position: left -102% top 0%;
77+
}
78+
}
79+
}

packages/modules/data-widgets/src/themesource/datawidgets/web/main.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
@import "drop-down-sort";
77
@import "gallery";
88
@import "gallery-design-properties";
9+
@import "refresh-indicator";
910
@import "three-state-checkbox";
1011
@import "tree-node";
1112
@import "tree-node-design-properties";

packages/pluggableWidgets/datagrid-web/src/components/RefreshIndicator.tsx renamed to packages/shared/widget-plugin-component-kit/src/RefreshIndicator.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import { createElement, ReactElement } from "react";
33
export function RefreshIndicator(): ReactElement {
44
return (
55
<div className="tr" role="row">
6-
<div className="th widget-datagrid-refresh-container">
7-
<progress className="widget-datagrid-refresh-indicator" />
6+
<div className="th mx-refresh-container">
7+
<progress className="mx-refresh-indicator" />
88
</div>
99
</div>
1010
);

0 commit comments

Comments
 (0)