@olenbetong/synergi-react 2.1.0 → 2.1.1
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/es/ColorCard/index.css +161 -0
- package/es/DateNavigator/index.css +96 -0
- package/es/Spinner/index.css +74 -0
- package/es/ValueToggleGroup/index.css +79 -0
- package/package.json +2 -3
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
.ObColorCard-root {
|
|
2
|
+
--bg-color-border: black;
|
|
3
|
+
--bg-color-main: white;
|
|
4
|
+
--bg-size: 0.75rem;
|
|
5
|
+
--card-color: rgb(0, 0, 0);
|
|
6
|
+
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: stretch;
|
|
9
|
+
min-height: 10rem;
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
border-radius: 0.25rem;
|
|
12
|
+
box-shadow: 0 1px 12px rgba(0, 0, 0, 0.15), 0 1px 6px rgba(0, 0, 0, 0.25);
|
|
13
|
+
color: #666;
|
|
14
|
+
background-image: linear-gradient(
|
|
15
|
+
to right,
|
|
16
|
+
var(--bg-color-border),
|
|
17
|
+
var(--bg-color-border) var(--bg-size),
|
|
18
|
+
var(--bg-color-main) var(--bg-size),
|
|
19
|
+
var(--bg-color-main)
|
|
20
|
+
);
|
|
21
|
+
font-family:
|
|
22
|
+
"Variable Bahnschrift",
|
|
23
|
+
"Bahnschrift",
|
|
24
|
+
"Open Sans",
|
|
25
|
+
-apple-system,
|
|
26
|
+
BlinkMacSystemFont,
|
|
27
|
+
"Segoe UI",
|
|
28
|
+
Roboto,
|
|
29
|
+
"Helvetica Neue",
|
|
30
|
+
Arial,
|
|
31
|
+
sans-serif,
|
|
32
|
+
"Apple Color Emoji",
|
|
33
|
+
"Segoe UI Emoji",
|
|
34
|
+
"Segoe UI Symbol";
|
|
35
|
+
font-size: 1rem;
|
|
36
|
+
transition: all ease-in-out 300ms;
|
|
37
|
+
cursor: pointer;
|
|
38
|
+
|
|
39
|
+
&:nth-of-type(5n + 1) {
|
|
40
|
+
--bg-color-border: rgb(178, 108, 190);
|
|
41
|
+
}
|
|
42
|
+
&:nth-of-type(5n + 2) {
|
|
43
|
+
--bg-color-border: rgb(79, 164, 61);
|
|
44
|
+
}
|
|
45
|
+
&:nth-of-type(5n + 3) {
|
|
46
|
+
--bg-color-border: rgb(246, 170, 23);
|
|
47
|
+
}
|
|
48
|
+
&:nth-of-type(5n + 4) {
|
|
49
|
+
--bg-color-border: rgb(218, 93, 83);
|
|
50
|
+
}
|
|
51
|
+
&:nth-of-type(5n + 5) {
|
|
52
|
+
--bg-color-border: rgb(23, 162, 184);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&:hover,
|
|
56
|
+
&:focus {
|
|
57
|
+
--bg-color-main: #f5f5f5;
|
|
58
|
+
box-shadow: 0 3px 18px rgba(0, 0, 0, 0.15), 0 3px 12px rgba(0, 0, 0, 0.25);
|
|
59
|
+
text-decoration: none;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@media screen and (min-width: 48rem) {
|
|
63
|
+
font-size: 1.2rem;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.ObColorCard-column {
|
|
68
|
+
display: flex;
|
|
69
|
+
flex: 1 1 100%;
|
|
70
|
+
flex-direction: column;
|
|
71
|
+
justify-content: space-between;
|
|
72
|
+
margin: 1rem 0;
|
|
73
|
+
padding: 0.5rem 1.5rem 0.5rem 1rem;
|
|
74
|
+
overflow: hidden;
|
|
75
|
+
text-overflow: ellipsis;
|
|
76
|
+
|
|
77
|
+
&:first-child {
|
|
78
|
+
margin-left: var(--bg-size, 0.75rem);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&.ObColorCard-minor {
|
|
82
|
+
flex: 0 0 4rem;
|
|
83
|
+
border-right: 1px solid #e3e3e3;
|
|
84
|
+
transition: margin ease-in-out 300ms;
|
|
85
|
+
|
|
86
|
+
@media screen and (min-width: 48rem) {
|
|
87
|
+
flex: 0 0 8rem;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.ObColorCard-detailLabel {
|
|
93
|
+
color: #696969;
|
|
94
|
+
font-size: 0.8rem;
|
|
95
|
+
text-transform: uppercase;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.ObColorCard-detail {
|
|
99
|
+
&:not(:last-child) {
|
|
100
|
+
margin-right: 1.5rem;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
&.ObColorCard-primary,
|
|
104
|
+
&.ObColorCard-primary .ObColorCard-detailValue {
|
|
105
|
+
font-size: 1.25rem;
|
|
106
|
+
font-weight: 300;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
&.ObColorCard-primary .ObColorCard-detailValue {
|
|
110
|
+
color: unset;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
@media screen and (min-width: 48rem) {
|
|
114
|
+
font-size: 1rem;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.ObColorCard-detailValue {
|
|
119
|
+
color: #555555;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.ObColorCard-stepList {
|
|
123
|
+
display: flex;
|
|
124
|
+
flex-direction: column;
|
|
125
|
+
gap: 1rem;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.ObColorCard-step {
|
|
129
|
+
position: relative;
|
|
130
|
+
text-box-trim: trim-both;
|
|
131
|
+
|
|
132
|
+
display: flex;
|
|
133
|
+
align-items: flex-start;
|
|
134
|
+
gap: 0.5rem;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.ObColorCard-step::before {
|
|
138
|
+
flex: 0.6em 0 0;
|
|
139
|
+
content: "";
|
|
140
|
+
|
|
141
|
+
position: relative;
|
|
142
|
+
top: 0.25em; /* half the height difference of text and the circle */
|
|
143
|
+
|
|
144
|
+
width: 0.6em;
|
|
145
|
+
height: 0.6em;
|
|
146
|
+
background: white;
|
|
147
|
+
border: 2px solid var(--bg-color-border, #999);
|
|
148
|
+
border-radius: 50%;
|
|
149
|
+
box-sizing: border-box;
|
|
150
|
+
z-index: 1;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.ObColorCard-step:not(:last-child)::after {
|
|
154
|
+
content: "";
|
|
155
|
+
position: absolute;
|
|
156
|
+
top: calc(0.25em + 0.6em + 0.15em); /* dot top + dot height + 0.15em spacing */
|
|
157
|
+
left: calc(0.3em - 1px); /* half of the circle width minus half the border width */
|
|
158
|
+
height: calc(100% - 0.95em + 1rem + 0.0625em); /* height of container - top + gap */
|
|
159
|
+
border-left: 2px dotted #999;
|
|
160
|
+
z-index: 0;
|
|
161
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--ob-datenavigator-height: 3rem;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.ObDateNavigator-icon {
|
|
6
|
+
display: inline-block;
|
|
7
|
+
|
|
8
|
+
svg {
|
|
9
|
+
width: 0.625em;
|
|
10
|
+
position: relative;
|
|
11
|
+
top: -1px;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.ObDateNavigator-root {
|
|
16
|
+
background-color: hsl(220, 20%, 96%);
|
|
17
|
+
background-color: var(--block-header-color-bg);
|
|
18
|
+
display: flex;
|
|
19
|
+
font-size: 1rem;
|
|
20
|
+
outline: none;
|
|
21
|
+
|
|
22
|
+
&:focus-visible {
|
|
23
|
+
outline: 2px solid var(--brand-dark, #336699);
|
|
24
|
+
outline-offset: 2px;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.ObDateNavigator-arrow {
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
flex: 0 0 var(--ob-datenavigator-height);
|
|
32
|
+
justify-content: center;
|
|
33
|
+
|
|
34
|
+
height: var(--ob-datenavigator-height);
|
|
35
|
+
|
|
36
|
+
cursor: pointer;
|
|
37
|
+
text-align: center;
|
|
38
|
+
|
|
39
|
+
&:hover:not(:disabled) {
|
|
40
|
+
background-color: #e3e3e3;
|
|
41
|
+
background-color: var(--block-header-button-hover);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&:disabled {
|
|
45
|
+
cursor: not-allowed;
|
|
46
|
+
color: rgba(0 0 0 / 0.2);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.ObDateNavigator-arrowLeft {
|
|
51
|
+
border-right: 1px solid #dddddd;
|
|
52
|
+
order: 1;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.ObDateNavigator-arrowRight {
|
|
56
|
+
border-left: 1px solid #dddddd;
|
|
57
|
+
order: 3;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.ObDateNavigator-date {
|
|
61
|
+
display: flex;
|
|
62
|
+
flex: 1 1 100%;
|
|
63
|
+
flex-direction: column;
|
|
64
|
+
justify-content: center;
|
|
65
|
+
order: 2;
|
|
66
|
+
|
|
67
|
+
height: var(--ob-datenavigator-height);
|
|
68
|
+
|
|
69
|
+
text-align: center;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.ObDateNavigator-today {
|
|
73
|
+
order: 4;
|
|
74
|
+
padding: 0 1rem;
|
|
75
|
+
height: var(--ob-datenavigator-height);
|
|
76
|
+
display: flex;
|
|
77
|
+
align-items: center;
|
|
78
|
+
justify-content: center;
|
|
79
|
+
font-size: 0.875rem;
|
|
80
|
+
color: var(--brand-dark, #336699);
|
|
81
|
+
text-transform: uppercase;
|
|
82
|
+
cursor: pointer;
|
|
83
|
+
|
|
84
|
+
text-wrap: nowrap;
|
|
85
|
+
|
|
86
|
+
border-left: 1px solid #dddddd;
|
|
87
|
+
|
|
88
|
+
&:hover:not(:disabled) {
|
|
89
|
+
background-color: var(--block-header-button-hover);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
&:focus-visible {
|
|
93
|
+
outline: 2px solid var(--brand-dark, #336699);
|
|
94
|
+
outline-offset: 2px;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
|
|
2
|
+
.ObSpinner-wrapper, .ObSpinner-fullPage {
|
|
3
|
+
--bullet-size: 0.5em;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.ObSpinner-root {
|
|
7
|
+
display: inline-block;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.ObSpinner-fullPage {
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
|
|
15
|
+
height: 100vh;
|
|
16
|
+
width: 100vw;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.ObSpinner-spinner {
|
|
20
|
+
display: inline-block;
|
|
21
|
+
height: calc(var(--bullet-size) * 1.5);
|
|
22
|
+
position: relative;
|
|
23
|
+
width: calc(var(--bullet-size) * 5);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.ObSpinner-bullet {
|
|
27
|
+
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
28
|
+
background: #666;
|
|
29
|
+
border-radius: 50%;
|
|
30
|
+
height: var(--bullet-size);
|
|
31
|
+
position: absolute;
|
|
32
|
+
top: 0.2rem;
|
|
33
|
+
width: var(--bullet-size);
|
|
34
|
+
|
|
35
|
+
&:nth-child(1) {
|
|
36
|
+
animation: scaleAnimation 0.6s infinite ease-in-out;
|
|
37
|
+
left: calc(var(--bullet-size) * 0.5);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&:nth-child(2) {
|
|
41
|
+
animation: translateAnimation 0.6s infinite ease-in-out;
|
|
42
|
+
left: calc(var(--bullet-size) * 0.5);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&:nth-child(3) {
|
|
46
|
+
animation: translateAnimation 0.6s infinite ease-in-out;
|
|
47
|
+
left: calc(var(--bullet-size) * 2.4);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&:nth-child(4) {
|
|
51
|
+
animation: scaleAnimation 0.6s infinite ease-in-out reverse;
|
|
52
|
+
left: calc(var(--bullet-size) * 4);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@keyframes scaleAnimation {
|
|
57
|
+
from {
|
|
58
|
+
transform: scale(0);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
to {
|
|
62
|
+
transform: scale(1);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
@keyframes translateAnimation {
|
|
67
|
+
from {
|
|
68
|
+
transform: translate(0, 0);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
to {
|
|
72
|
+
transform: translate(calc(var(--bullet-size) * 1.65), 0);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
.ObValueToggleGroup {
|
|
2
|
+
padding: 0.25rem;
|
|
3
|
+
border: 2px solid rgb(0 0 0 / 0.2);
|
|
4
|
+
border-radius: 4px;
|
|
5
|
+
|
|
6
|
+
display: flex;
|
|
7
|
+
gap: 0.25rem;
|
|
8
|
+
flex-wrap: wrap;
|
|
9
|
+
|
|
10
|
+
&.vertical {
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
align-items: center;
|
|
13
|
+
|
|
14
|
+
& .ObValueToggleOption {
|
|
15
|
+
width: 100%;
|
|
16
|
+
|
|
17
|
+
& .ObValueToggleLabel {
|
|
18
|
+
width: 100%;
|
|
19
|
+
text-align: center;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&:focus-within {
|
|
25
|
+
border-color: rgb(0 0 0 / 0.8);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.ObValueToggleOption {
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
margin: 0;
|
|
33
|
+
position: relative;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.ObValueToggleOption input {
|
|
37
|
+
position: absolute;
|
|
38
|
+
width: 1px;
|
|
39
|
+
height: 1px;
|
|
40
|
+
padding: 0;
|
|
41
|
+
margin: -1px;
|
|
42
|
+
overflow: hidden;
|
|
43
|
+
clip: rect(0, 0, 0, 0);
|
|
44
|
+
border: 0;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.ObValueToggleLabel {
|
|
48
|
+
font-size: 0.8em;
|
|
49
|
+
margin: 0 0.2em;
|
|
50
|
+
padding: 0.3em 0.5em;
|
|
51
|
+
text-transform: uppercase;
|
|
52
|
+
transition: background 0.2s ease, color 0.2s ease;
|
|
53
|
+
border-radius: 4px;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.ObValueToggleOption:hover input:not(:disabled) + .ObValueToggleLabel {
|
|
57
|
+
cursor: pointer;
|
|
58
|
+
background: #ccc;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.ObValueToggleOption input:checked + .ObValueToggleLabel {
|
|
62
|
+
--color-bg: var(--brand-dark);
|
|
63
|
+
background-color: var(--color-bg);
|
|
64
|
+
color: white;
|
|
65
|
+
cursor: default;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.ObValueToggleOption input:disabled + .ObValueToggleLabel {
|
|
69
|
+
color: rgb(0 0 0 / 0.5);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.ObValueToggleOption input:checked:focus-visible + .ObValueToggleLabel {
|
|
73
|
+
--color-bg: var(--brand-light);
|
|
74
|
+
outline: 2px solid var(--brand-light);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.ObValueToggleOption input:checked:hover + .ObValueToggleLabel {
|
|
78
|
+
background-color: var(--color-bg);
|
|
79
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@olenbetong/synergi-react",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "Standalone React component for SynergiWeb and Partner Portal",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./es/index.d.ts",
|
|
@@ -79,8 +79,7 @@
|
|
|
79
79
|
"replace-in-files": "^3.0.0"
|
|
80
80
|
},
|
|
81
81
|
"scripts": {
|
|
82
|
-
"build": "pnpm run build:tsc
|
|
83
|
-
"build:tsc": "find . -name '*.tsbuildinfo' -delete && rm -rf ./es && tsc",
|
|
82
|
+
"build": "pnpm run build:tsc:post && pnpm run build:esbuild && pnpm run build:sass && pnpm run build:sass:components",
|
|
84
83
|
"build:esbuild": "rm -rf ./dist && node --experimental-strip-types ../../scripts/esbuild.ts",
|
|
85
84
|
"build:sass": "sass ./src/index.scss ./dist/styles/styles.css --source-map-urls=relative --style compressed",
|
|
86
85
|
"build:sass:components": "node ./scripts/buildSassComponents.mjs",
|