@focus-reactive/payload-plugin-translator 0.1.1 → 0.1.2
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/dist/client/app/cache/CacheProvider.export.js +1 -1
- package/dist/client/entities/translation/ui/CompletedTranslationStatus/styles.module.scss +3 -0
- package/dist/client/entities/translation/ui/FailedTranslationStatus/styles.module.scss +3 -0
- package/dist/client/entities/translation/ui/TranslationDirection/styles.module.scss +16 -0
- package/dist/client/features/collection-translation-form/ui/styles.module.scss +31 -0
- package/dist/client/features/collection-translation-popup/ui/styles.module.scss +18 -0
- package/dist/client/features/collection-translation-progress/ui/styles.module.scss +8 -0
- package/dist/client/features/open-document-translation-popup/ui/styles.module.scss +11 -0
- package/dist/client/features/translate-document-form/ui/styles.module.scss +18 -0
- package/dist/client/shared/ui/Alert/styles.module.scss +31 -0
- package/dist/client/shared/ui/Button/styles.module.scss +103 -0
- package/dist/client/shared/ui/Checkbox/styles.module.scss +17 -0
- package/dist/client/shared/ui/ColorIndicator/styles.module.scss +37 -0
- package/dist/client/shared/ui/Description/styles.module.scss +14 -0
- package/dist/client/shared/ui/Divider/styles.module.scss +56 -0
- package/dist/client/shared/ui/Label/styles.module.scss +12 -0
- package/dist/client/shared/ui/Loading/styles.module.scss +141 -0
- package/dist/client/shared/ui/Popup/styles.module.scss +7 -0
- package/dist/client/shared/ui/ProgressBar/styles.module.scss +64 -0
- package/dist/client/shared/ui/Select/styles.module.scss +55 -0
- package/dist/client/shared/ui/StatusCounter/styles.module.scss +46 -0
- package/dist/client/shared/ui/StatusIndicator/styles.module.scss +12 -0
- package/dist/client/shared/ui/Tooltip/styles.module.scss +84 -0
- package/dist/client/shared/ui/form/FormCheckbox/styles.module.scss +23 -0
- package/dist/client/shared/ui/form/FormCheckboxPublish/styles.module.scss +16 -0
- package/dist/client/shared/ui/form/FormSelectStrategy/styles.module.scss +16 -0
- package/dist/client/shared/utils/componentPath.d.ts +1 -1
- package/dist/client/shared/utils/componentPath.js +1 -1
- package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.export.js +1 -1
- package/dist/client/widgets/translate-document/ui/TranslateDocument.export.js +1 -1
- package/package.json +30 -17
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { clientComponentPath } from '../../shared/utils/componentPath';
|
|
2
2
|
export class CacheProviderExport {
|
|
3
|
-
path = clientComponentPath('app/cache/CacheProvider
|
|
3
|
+
path = clientComponentPath('app/cache/CacheProvider');
|
|
4
4
|
serverProps;
|
|
5
5
|
constructor(basePath){
|
|
6
6
|
this.serverProps = {
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
.fieldset {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: 0.75rem;
|
|
5
|
+
border-width: 0;
|
|
6
|
+
margin: 0;
|
|
7
|
+
padding: 0;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.row {
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: flex-end;
|
|
13
|
+
gap: 0.75rem;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.locale-group {
|
|
17
|
+
display: flex;
|
|
18
|
+
gap: 1rem;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.select-locale-field {
|
|
22
|
+
min-width: 70px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.strategy-field {
|
|
26
|
+
min-width: 150px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.submit-button {
|
|
30
|
+
width: 100%;
|
|
31
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
.popup-content {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: 1rem;
|
|
5
|
+
padding: 1.5rem 1rem;
|
|
6
|
+
max-width: 350px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.popup-trigger-button {
|
|
10
|
+
font-size: 1.3rem;
|
|
11
|
+
display: flex;
|
|
12
|
+
gap: 0.25rem;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.arrow {
|
|
16
|
+
font-size: 1rem;
|
|
17
|
+
font-weight: bold;
|
|
18
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
.alert {
|
|
2
|
+
padding: 12px 16px;
|
|
3
|
+
border-radius: 6px;
|
|
4
|
+
border: 1px solid;
|
|
5
|
+
font-size: 14px;
|
|
6
|
+
line-height: 1.5;
|
|
7
|
+
margin: 8px 0;
|
|
8
|
+
|
|
9
|
+
&--transparent {
|
|
10
|
+
background-color: transparent;
|
|
11
|
+
color: var(--theme-text);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
&--info {
|
|
15
|
+
background-color: var(--color-blue-50);
|
|
16
|
+
border-color: var(--color-blue-400);
|
|
17
|
+
color: var(--color-blue-700);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&--warning {
|
|
21
|
+
background-color: var(--color-warning-50);
|
|
22
|
+
border-color: var(--color-warning-400);
|
|
23
|
+
color: var(--color-warning-700);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&--error {
|
|
27
|
+
background-color: var(--color-error-50);
|
|
28
|
+
border-color: var(--color-error-400);
|
|
29
|
+
color: var(--color-error-700);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
.button {
|
|
2
|
+
border-radius: var(--style-radius-m);
|
|
3
|
+
appearance: none;
|
|
4
|
+
cursor: pointer;
|
|
5
|
+
display: inline-flex;
|
|
6
|
+
flex-shrink: 0;
|
|
7
|
+
justify-content: center;
|
|
8
|
+
align-items: center;
|
|
9
|
+
text-decoration: none;
|
|
10
|
+
transition: background 0.1sease-in-out, opacity 0.2sease-in-out, border-color 0.2sease-in-out;
|
|
11
|
+
background: none;
|
|
12
|
+
padding-block: 0.25rem;
|
|
13
|
+
padding-inline: var(--padding-inline);
|
|
14
|
+
height: var(--height);
|
|
15
|
+
border: none;
|
|
16
|
+
width: var(--button-width);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.icon-button {
|
|
20
|
+
width: var(--width);
|
|
21
|
+
padding-inline: 0;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.start-content {
|
|
25
|
+
display: flex;
|
|
26
|
+
margin-right: calc(var(--base) / 2);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.outlined {
|
|
30
|
+
border: 1px solid var(--theme-elevation-200);
|
|
31
|
+
|
|
32
|
+
&:hover:not(:disabled),
|
|
33
|
+
&:focus {
|
|
34
|
+
border-color: var(--theme-elevation-100);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&:disabled {
|
|
38
|
+
cursor: not-allowed;
|
|
39
|
+
background-color: var(--theme-elevation-200);
|
|
40
|
+
color: var(--theme-elevation-800);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.filled {
|
|
45
|
+
color: var(--theme-elevation-0);
|
|
46
|
+
background-color: var(--theme-elevation-800);
|
|
47
|
+
|
|
48
|
+
&:focus,
|
|
49
|
+
&:hover:not(:disabled) {
|
|
50
|
+
background-color: var(--theme-elevation-600);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&:disabled {
|
|
54
|
+
cursor: not-allowed;
|
|
55
|
+
background-color: var(--theme-elevation-200);
|
|
56
|
+
color: var(--theme-elevation-800);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.unstyled {
|
|
61
|
+
background: none;
|
|
62
|
+
border: none;
|
|
63
|
+
padding: 0;
|
|
64
|
+
margin: 0;
|
|
65
|
+
cursor: pointer;
|
|
66
|
+
display: inline-flex;
|
|
67
|
+
align-items: center;
|
|
68
|
+
justify-content: center;
|
|
69
|
+
appearance: none;
|
|
70
|
+
|
|
71
|
+
&:disabled {
|
|
72
|
+
cursor: not-allowed;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&:hover:not(:disabled),
|
|
76
|
+
&:focus {
|
|
77
|
+
background-color: transparent
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.transparent {
|
|
82
|
+
background-color: transparent;
|
|
83
|
+
|
|
84
|
+
&:hover:not(:disabled),
|
|
85
|
+
&:focus {
|
|
86
|
+
background-color: var(--theme-elevation-50);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.light {
|
|
91
|
+
background-color: var(--theme-elevation-100);
|
|
92
|
+
|
|
93
|
+
&:hover:not(:disabled),
|
|
94
|
+
&:focus {
|
|
95
|
+
background-color: var(--theme-elevation-150);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&:disabled {
|
|
99
|
+
cursor: not-allowed;
|
|
100
|
+
background-color: var(--theme-elevation-50);
|
|
101
|
+
color: var(--theme-elevation-400);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
.checkbox {
|
|
2
|
+
width: 1rem;
|
|
3
|
+
height: 1rem;
|
|
4
|
+
margin: 0;
|
|
5
|
+
cursor: pointer;
|
|
6
|
+
accent-color: var(--theme-elevation-800);
|
|
7
|
+
|
|
8
|
+
&:disabled {
|
|
9
|
+
cursor: not-allowed;
|
|
10
|
+
opacity: 0.5;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
&--error {
|
|
14
|
+
outline: 2px solid var(--theme-error-500);
|
|
15
|
+
outline-offset: 2px;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
.indicator {
|
|
2
|
+
width: 8px;
|
|
3
|
+
height: 8px;
|
|
4
|
+
border-radius: 50%;
|
|
5
|
+
flex-shrink: 0;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.blue-indicator {
|
|
9
|
+
background-color: #3b82f6;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.green-indicator {
|
|
13
|
+
background-color: #10b981;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.red-indicator {
|
|
17
|
+
background-color: var(--theme-error-600);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.gray-indicator {
|
|
21
|
+
background-color: var(--color-base-250);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.animated {
|
|
25
|
+
animation: pulse 2s ease-in-out infinite;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@keyframes pulse {
|
|
29
|
+
0%,
|
|
30
|
+
100% {
|
|
31
|
+
opacity: 1;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
50% {
|
|
35
|
+
opacity: 0.5;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
.divider {
|
|
2
|
+
flex-shrink: 0;
|
|
3
|
+
border: none;
|
|
4
|
+
margin: 0;
|
|
5
|
+
|
|
6
|
+
&.horizontal {
|
|
7
|
+
width: 100%;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
&.vertical {
|
|
11
|
+
height: 100%;
|
|
12
|
+
align-self: stretch;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
&.sm {
|
|
16
|
+
&.horizontal {
|
|
17
|
+
height: 1px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&.vertical {
|
|
21
|
+
width: 1px;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&.md {
|
|
26
|
+
&.horizontal {
|
|
27
|
+
height: 2px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&.vertical {
|
|
31
|
+
width: 2px;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&.lg {
|
|
36
|
+
&.horizontal {
|
|
37
|
+
height: 3px;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&.vertical {
|
|
41
|
+
width: 3px;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&.light {
|
|
46
|
+
background-color: var(--theme-elevation-150);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&.medium {
|
|
50
|
+
background-color: var(--theme-elevation-200);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&.dark {
|
|
54
|
+
background-color: var(--theme-elevation-300);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
.loading-overlay {
|
|
2
|
+
isolation: isolate;
|
|
3
|
+
position: relative;
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
pointer-events: none;
|
|
8
|
+
transition-property: left, width;
|
|
9
|
+
transition: 250ms ease;
|
|
10
|
+
|
|
11
|
+
&.loading-overlay--entering {
|
|
12
|
+
opacity: 1;
|
|
13
|
+
animation: fade-in ease;
|
|
14
|
+
pointer-events: all;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&.loading-overlay--exiting {
|
|
18
|
+
opacity: 0;
|
|
19
|
+
animation: fade-out ease;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&:after {
|
|
23
|
+
content: '';
|
|
24
|
+
position: absolute;
|
|
25
|
+
top: 0;
|
|
26
|
+
left: 0;
|
|
27
|
+
width: 100%;
|
|
28
|
+
height: 100%;
|
|
29
|
+
opacity: 0.85;
|
|
30
|
+
z-index: -1;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&__bars {
|
|
34
|
+
display: grid;
|
|
35
|
+
gap: 7px;
|
|
36
|
+
align-items: center;
|
|
37
|
+
|
|
38
|
+
&_small {
|
|
39
|
+
grid-template-columns: 1fr 1fr;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&_medium {
|
|
43
|
+
grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&__bar {
|
|
48
|
+
background-color: currentColor;
|
|
49
|
+
|
|
50
|
+
&_size-small {
|
|
51
|
+
height: 10px;
|
|
52
|
+
width: 2px;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&_size-medium {
|
|
56
|
+
height: 15px;
|
|
57
|
+
width: 2px;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&:nth-child(1) {
|
|
61
|
+
transform: translateY(0);
|
|
62
|
+
animation: animate-bar--odd 1.25s infinite;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&:nth-child(2) {
|
|
66
|
+
transform: translateY(-2px);
|
|
67
|
+
animation: animate-bar--even 1.25s infinite;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&:nth-child(3) {
|
|
71
|
+
transform: translateY(0);
|
|
72
|
+
animation: animate-bar--odd 1.25s infinite;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&:nth-child(4) {
|
|
76
|
+
transform: translateY(-2px);
|
|
77
|
+
animation: animate-bar--even 1.25s infinite;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&:nth-child(5) {
|
|
81
|
+
transform: translateY(0);
|
|
82
|
+
animation: animate-bar--odd 1.25s infinite;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&__text {
|
|
87
|
+
margin-top: base(0.75);
|
|
88
|
+
text-transform: uppercase;
|
|
89
|
+
font-family: var(--font-body);
|
|
90
|
+
font-size: base(0.65);
|
|
91
|
+
letter-spacing: 3px;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
@keyframes animate-bar--even {
|
|
96
|
+
0% {
|
|
97
|
+
transform: translateY(2px);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
50% {
|
|
101
|
+
transform: translateY(-2px);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
100% {
|
|
105
|
+
transform: translateY(2px);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
@keyframes animate-bar--odd {
|
|
110
|
+
0% {
|
|
111
|
+
transform: translateY(-2px);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
50% {
|
|
115
|
+
transform: translateY(2px);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
100% {
|
|
119
|
+
transform: translateY(-2px);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
@keyframes fade-in {
|
|
124
|
+
0% {
|
|
125
|
+
opacity: 0;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
100% {
|
|
129
|
+
opacity: 1;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
@keyframes fade-out {
|
|
134
|
+
0% {
|
|
135
|
+
opacity: 1;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
100% {
|
|
139
|
+
opacity: 0;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
.container {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
gap: var(--spacing-xs);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.track {
|
|
8
|
+
background-color: var(--color-base-300);
|
|
9
|
+
border-radius: var(--border-radius);
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
position: relative;
|
|
12
|
+
|
|
13
|
+
&.small {
|
|
14
|
+
height: 4px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&.medium {
|
|
18
|
+
height: 8px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&.large {
|
|
22
|
+
height: 12px;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.fill {
|
|
27
|
+
height: 100%;
|
|
28
|
+
transition: width 0.3s ease-in-out;
|
|
29
|
+
border-radius: var(--border-radius);
|
|
30
|
+
|
|
31
|
+
&.blue-fill {
|
|
32
|
+
background-color: var(--color-blue-500);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&.green-fill {
|
|
36
|
+
background-color: var(--color-success-500);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&.red-fill {
|
|
40
|
+
background-color: var(--color-error-500);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&.gray-fill {
|
|
44
|
+
background-color: var(--color-base-400);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.label {
|
|
49
|
+
font-family: var(--font-mono);
|
|
50
|
+
color: var(--color-base-600);
|
|
51
|
+
white-space: nowrap;
|
|
52
|
+
|
|
53
|
+
&.small-label {
|
|
54
|
+
font-size: var(--font-size-sm);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&.medium-label {
|
|
58
|
+
font-size: var(--font-size-sm);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&.large-label {
|
|
62
|
+
font-size: var(--font-size-base);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
.select {
|
|
2
|
+
width: 100%;
|
|
3
|
+
height: var(--height, 40px);
|
|
4
|
+
padding-top: calc((var(--height, 40px) - var(--font-size, 1rem) * 1.2) / 2);
|
|
5
|
+
padding-bottom: calc((var(--height, 40px) - var(--font-size, 1rem) * 1.2) / 2);
|
|
6
|
+
padding-left: var(--padding-inline, 0.75rem);
|
|
7
|
+
padding-right: calc(var(--padding-inline, 0.75rem) + 24px);
|
|
8
|
+
/* extra space for arrow */
|
|
9
|
+
border: 1px solid var(--theme-elevation-150);
|
|
10
|
+
border-radius: var(--style-radius-s);
|
|
11
|
+
background: var(--theme-input-bg);
|
|
12
|
+
color: var(--theme-elevation-800);
|
|
13
|
+
font-size: var(--font-size, 1rem);
|
|
14
|
+
flex-shrink: 0;
|
|
15
|
+
|
|
16
|
+
appearance: none;
|
|
17
|
+
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='currentColor' viewBox='0 0 20 20' %3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
|
|
18
|
+
background-position: right var(--padding-inline, 0.75rem) center;
|
|
19
|
+
background-repeat: no-repeat;
|
|
20
|
+
background-size: 16px 16px;
|
|
21
|
+
|
|
22
|
+
&:focus {
|
|
23
|
+
outline: 2px solid var(--theme-success-200);
|
|
24
|
+
outline-offset: -1px;
|
|
25
|
+
border-color: var(--theme-success-500);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&:disabled {
|
|
29
|
+
opacity: 0.5;
|
|
30
|
+
cursor: not-allowed;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* Size-specific styles if needed */
|
|
35
|
+
.size-sm {
|
|
36
|
+
background-size: 12px 12px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.size-md {
|
|
40
|
+
background-size: 14px 14px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.size-lg {
|
|
44
|
+
background-size: 16px 16px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.selectError {
|
|
48
|
+
border-color: var(--theme-error-600);
|
|
49
|
+
background: var(--theme-error-100);
|
|
50
|
+
|
|
51
|
+
&:focus {
|
|
52
|
+
outline: 2px solid var(--theme-error-200);
|
|
53
|
+
outline-offset: -1px;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
.container {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
gap: var(--spacing-xs);
|
|
5
|
+
|
|
6
|
+
&.small {
|
|
7
|
+
.count {
|
|
8
|
+
font-size: var(--font-size-sm);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.label {
|
|
12
|
+
font-size: var(--font-size-xs);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&.medium {
|
|
17
|
+
.count {
|
|
18
|
+
font-size: var(--font-size-base);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.label {
|
|
22
|
+
font-size: var(--font-size-sm);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.indicator {
|
|
28
|
+
flex-shrink: 0;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.content {
|
|
32
|
+
display: flex;
|
|
33
|
+
flex-direction: column;
|
|
34
|
+
gap: 1px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.count {
|
|
38
|
+
font-weight: var(--font-weight-semibold);
|
|
39
|
+
color: var(--color-base-800);
|
|
40
|
+
line-height: 1.2;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.label {
|
|
44
|
+
color: var(--color-base-600);
|
|
45
|
+
line-height: 1.2;
|
|
46
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
.status-indicator {
|
|
2
|
+
border: 1px solid var(--theme-elevation-100);
|
|
3
|
+
border-radius: var(--style-radius-s);
|
|
4
|
+
position: relative;
|
|
5
|
+
height: 32px;
|
|
6
|
+
padding: 0.5rem 1rem;
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
white-space: nowrap;
|
|
10
|
+
box-sizing: border-box;
|
|
11
|
+
gap: 0.5rem;
|
|
12
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
.content {
|
|
2
|
+
background: var(--theme-elevation-50);
|
|
3
|
+
color: var(--theme-elevation-900);
|
|
4
|
+
padding: 0.5rem 0.75rem;
|
|
5
|
+
border-radius: var(--style-radius-s);
|
|
6
|
+
border: 1px solid var(--theme-elevation-150);
|
|
7
|
+
font-size: 0.8125rem;
|
|
8
|
+
line-height: 1.4;
|
|
9
|
+
max-width: 280px;
|
|
10
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
|
11
|
+
z-index: 9999;
|
|
12
|
+
white-space: pre-line;
|
|
13
|
+
|
|
14
|
+
animation-duration: 150ms;
|
|
15
|
+
animation-timing-function: ease-out;
|
|
16
|
+
|
|
17
|
+
&[data-state='delayed-open'][data-side='top'] {
|
|
18
|
+
animation-name: slideDownAndFade;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&[data-state='delayed-open'][data-side='bottom'] {
|
|
22
|
+
animation-name: slideUpAndFade;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&[data-state='delayed-open'][data-side='left'] {
|
|
26
|
+
animation-name: slideRightAndFade;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&[data-state='delayed-open'][data-side='right'] {
|
|
30
|
+
animation-name: slideLeftAndFade;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.arrow {
|
|
35
|
+
fill: var(--theme-elevation-50);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@keyframes slideUpAndFade {
|
|
39
|
+
from {
|
|
40
|
+
opacity: 0;
|
|
41
|
+
transform: translateY(4px);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
to {
|
|
45
|
+
opacity: 1;
|
|
46
|
+
transform: translateY(0);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@keyframes slideDownAndFade {
|
|
51
|
+
from {
|
|
52
|
+
opacity: 0;
|
|
53
|
+
transform: translateY(-4px);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
to {
|
|
57
|
+
opacity: 1;
|
|
58
|
+
transform: translateY(0);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@keyframes slideLeftAndFade {
|
|
63
|
+
from {
|
|
64
|
+
opacity: 0;
|
|
65
|
+
transform: translateX(4px);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
to {
|
|
69
|
+
opacity: 1;
|
|
70
|
+
transform: translateX(0);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
@keyframes slideRightAndFade {
|
|
75
|
+
from {
|
|
76
|
+
opacity: 0;
|
|
77
|
+
transform: translateX(-4px);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
to {
|
|
81
|
+
opacity: 1;
|
|
82
|
+
transform: translateX(0);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
.container {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: 0.25rem;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.label {
|
|
8
|
+
display: inline-flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
gap: 0.5rem;
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
|
|
13
|
+
&:has(input:disabled) {
|
|
14
|
+
cursor: not-allowed;
|
|
15
|
+
opacity: 0.6;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.label__text {
|
|
20
|
+
font-size: 0.875rem;
|
|
21
|
+
line-height: 1.25rem;
|
|
22
|
+
color: var(--theme-elevation-800);
|
|
23
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
.label {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
gap: 0.375rem;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.label__icon {
|
|
8
|
+
display: inline-flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
color: var(--theme-elevation-500);
|
|
11
|
+
cursor: help;
|
|
12
|
+
|
|
13
|
+
&:hover {
|
|
14
|
+
color: var(--theme-elevation-800);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
.label {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
gap: 0.375rem;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.label__icon {
|
|
8
|
+
display: inline-flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
color: var(--theme-elevation-500);
|
|
11
|
+
cursor: help;
|
|
12
|
+
|
|
13
|
+
&:hover {
|
|
14
|
+
color: var(--theme-elevation-800);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Creates a full path to a client component for Payload's import map.
|
|
3
|
-
* @param relativePath - Path relative to the client folder (e.g., 'widgets/translate-document/ui/TranslateDocument.server
|
|
3
|
+
* @param relativePath - Path relative to the client folder (e.g., 'widgets/translate-document/ui/TranslateDocument.server')
|
|
4
4
|
*/
|
|
5
5
|
export declare function clientComponentPath(relativePath: string): string;
|
|
6
6
|
//# sourceMappingURL=componentPath.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const PACKAGE_NAME = '@focus-reactive/payload-plugin-translator';
|
|
2
2
|
/**
|
|
3
3
|
* Creates a full path to a client component for Payload's import map.
|
|
4
|
-
* @param relativePath - Path relative to the client folder (e.g., 'widgets/translate-document/ui/TranslateDocument.server
|
|
4
|
+
* @param relativePath - Path relative to the client folder (e.g., 'widgets/translate-document/ui/TranslateDocument.server')
|
|
5
5
|
*/ export function clientComponentPath(relativePath) {
|
|
6
6
|
return `${PACKAGE_NAME}/client/${relativePath}`;
|
|
7
7
|
}
|
package/dist/client/widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.export.js
CHANGED
|
@@ -9,7 +9,7 @@ export class BulkDocumentTranslationDashboard {
|
|
|
9
9
|
access
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
|
-
path = clientComponentPath('widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.server
|
|
12
|
+
path = clientComponentPath('widgets/bulk-translation-dashboard/ui/BulkTranslationDashboard.server');
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
//# sourceMappingURL=BulkTranslationDashboard.export.js.map
|
|
@@ -12,7 +12,7 @@ export class TranslateDocumentExport {
|
|
|
12
12
|
access
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
|
-
path = clientComponentPath('widgets/translate-document/ui/TranslateDocument.server
|
|
15
|
+
path = clientComponentPath('widgets/translate-document/ui/TranslateDocument.server');
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
//# sourceMappingURL=TranslateDocument.export.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@focus-reactive/payload-plugin-translator",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Translation plugin for Payload CMS 3.x. Automatically translate your localized content using any translation provider.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
],
|
|
27
27
|
"exports": {
|
|
28
28
|
".": {
|
|
29
|
-
"import": "./
|
|
30
|
-
"types": "./
|
|
29
|
+
"import": "./src/index.ts",
|
|
30
|
+
"types": "./src/index.ts"
|
|
31
31
|
},
|
|
32
32
|
"./client/*": {
|
|
33
|
-
"import": "./
|
|
34
|
-
"types": "./
|
|
33
|
+
"import": "./src/client/*",
|
|
34
|
+
"types": "./src/client/*"
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
37
|
"files": [
|
|
@@ -42,7 +42,29 @@
|
|
|
42
42
|
"LICENSE"
|
|
43
43
|
],
|
|
44
44
|
"publishConfig": {
|
|
45
|
-
"access": "public"
|
|
45
|
+
"access": "public",
|
|
46
|
+
"exports": {
|
|
47
|
+
".": {
|
|
48
|
+
"import": "./dist/index.js",
|
|
49
|
+
"types": "./dist/index.d.ts"
|
|
50
|
+
},
|
|
51
|
+
"./client/*": {
|
|
52
|
+
"import": "./dist/client/*",
|
|
53
|
+
"types": "./dist/client/*"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"scripts": {
|
|
58
|
+
"prepublishOnly": "pnpm build",
|
|
59
|
+
"build": "pnpm build:types && pnpm build:swc && pnpm build:styles",
|
|
60
|
+
"build:types": "tsc -p tsconfig.build.json --emitDeclarationOnly --outDir dist",
|
|
61
|
+
"build:swc": "swc ./src -d ./dist --strip-leading-paths --ignore '**/*.test.ts' --ignore '**/__tests__/**' --ignore '**/__mocks__/**'",
|
|
62
|
+
"build:styles": "copyfiles -u 1 \"src/**/*.scss\" dist",
|
|
63
|
+
"lint": "eslint src",
|
|
64
|
+
"lint:fix": "eslint src --fix",
|
|
65
|
+
"test": "vitest run",
|
|
66
|
+
"test:watch": "vitest",
|
|
67
|
+
"typecheck": "tsc --noEmit"
|
|
46
68
|
},
|
|
47
69
|
"peerDependencies": {
|
|
48
70
|
"@payloadcms/richtext-lexical": "^3.76.0",
|
|
@@ -71,6 +93,7 @@
|
|
|
71
93
|
"@swc/core": "^1.10.0",
|
|
72
94
|
"@types/react": "^19.0.0",
|
|
73
95
|
"@vitest/coverage-v8": "^3.2.4",
|
|
96
|
+
"copyfiles": "^2.4.1",
|
|
74
97
|
"eslint": "^9",
|
|
75
98
|
"eslint-plugin-react-hooks": "6.0.0-rc.2",
|
|
76
99
|
"next": "^15.0.0",
|
|
@@ -79,15 +102,5 @@
|
|
|
79
102
|
"typescript": "^5.7.0",
|
|
80
103
|
"typescript-eslint": "^8.56.0",
|
|
81
104
|
"vitest": "^3.0.0"
|
|
82
|
-
},
|
|
83
|
-
"scripts": {
|
|
84
|
-
"build": "pnpm build:types && pnpm build:swc",
|
|
85
|
-
"build:types": "tsc -p tsconfig.build.json --emitDeclarationOnly --outDir dist",
|
|
86
|
-
"build:swc": "swc ./src -d ./dist --strip-leading-paths --ignore '**/*.test.ts' --ignore '**/__tests__/**' --ignore '**/__mocks__/**'",
|
|
87
|
-
"lint": "eslint src",
|
|
88
|
-
"lint:fix": "eslint src --fix",
|
|
89
|
-
"test": "vitest run",
|
|
90
|
-
"test:watch": "vitest",
|
|
91
|
-
"typecheck": "tsc --noEmit"
|
|
92
105
|
}
|
|
93
|
-
}
|
|
106
|
+
}
|