@oscarpalmer/oui 0.10.0 → 0.12.0
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/css/badge.css +6 -4
- package/dist/css/button.css +31 -26
- package/dist/css/color.css +25 -25
- package/dist/css/content.css +193 -0
- package/dist/css/form.css +404 -219
- package/dist/css/message.css +23 -16
- package/dist/css/reset.css +3 -1
- package/dist/css/table.css +26 -9
- package/package.json +4 -4
- package/src/css/badge.scss +8 -7
- package/src/css/button.scss +28 -57
- package/src/css/color.scss +25 -25
- package/src/css/content.scss +156 -0
- package/src/css/form.scss +300 -131
- package/src/css/message.scss +29 -21
- package/src/css/mixins.scss +62 -0
- package/src/css/reset.scss +3 -2
- package/src/css/table.scss +32 -7
package/src/css/message.scss
CHANGED
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
/*! https://github.com/oscarpalmer/oui */
|
|
2
2
|
|
|
3
|
+
@use './mixins.scss' as mixins;
|
|
4
|
+
|
|
3
5
|
.oui-message {
|
|
4
6
|
:where(&) {
|
|
5
|
-
--oui-shadow-
|
|
6
|
-
in
|
|
7
|
-
var(--oui-shadow, var(--oui-gray-6)),
|
|
8
|
-
transparent
|
|
7
|
+
--oui-shadow-mixed: color-mix(
|
|
8
|
+
in oklab,
|
|
9
|
+
var(--oui-shadow-value, var(--oui-gray-6)),
|
|
10
|
+
transparent 92.5%
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
@include mixins.card(
|
|
14
|
+
color-mix(
|
|
15
|
+
in oklab,
|
|
16
|
+
var(--oui-background, var(--oui-gray-0)),
|
|
17
|
+
transparent 25%
|
|
18
|
+
),
|
|
19
|
+
var(--oui-shadow-mixed),
|
|
9
20
|
);
|
|
10
21
|
|
|
11
|
-
padding: 1em;
|
|
12
22
|
display: inline-flex;
|
|
13
23
|
flex-flow: column nowrap;
|
|
14
24
|
gap: 1em;
|
|
15
|
-
background-color: color-mix(
|
|
16
|
-
in oklab,
|
|
17
|
-
var(--oui-background, var(--oui-gray-0)),
|
|
18
|
-
transparent 25%
|
|
19
|
-
);
|
|
20
|
-
border-radius: 0.5em;
|
|
21
|
-
box-shadow: 0 0 0 1px var(--oui-shadow-value),
|
|
22
|
-
0 1px 2px 0 var(--oui-shadow-value), 0 2px 4px 0 var(--oui-shadow-value);
|
|
23
25
|
color: var(--oui-foreground, var(--oui-gray-8));
|
|
24
26
|
line-height: 1.25;
|
|
25
27
|
}
|
|
@@ -31,8 +33,8 @@
|
|
|
31
33
|
|
|
32
34
|
:where(& hr) {
|
|
33
35
|
height: 1px;
|
|
34
|
-
margin: 0 -
|
|
35
|
-
background-color: var(--oui-
|
|
36
|
+
margin: 0 -1.25em;
|
|
37
|
+
background-color: var(--oui-border, var(--oui-gray-2));
|
|
36
38
|
border: none;
|
|
37
39
|
}
|
|
38
40
|
|
|
@@ -44,37 +46,43 @@
|
|
|
44
46
|
|
|
45
47
|
:where(&-blue, &-info) {
|
|
46
48
|
--oui-background: var(--oui-blue-0);
|
|
49
|
+
--oui-border: var(--oui-blue-2);
|
|
47
50
|
--oui-foreground: var(--oui-blue-8);
|
|
48
|
-
--oui-shadow: var(--oui-blue-6);
|
|
51
|
+
--oui-shadow-value: var(--oui-blue-6);
|
|
49
52
|
}
|
|
50
53
|
|
|
51
54
|
:where(&-green, &-success) {
|
|
52
55
|
--oui-background: var(--oui-green-0);
|
|
56
|
+
--oui-border: var(--oui-green-2);
|
|
53
57
|
--oui-foreground: var(--oui-green-8);
|
|
54
|
-
--oui-shadow: var(--oui-green-6);
|
|
58
|
+
--oui-shadow-value: var(--oui-green-6);
|
|
55
59
|
}
|
|
56
60
|
|
|
57
61
|
:where(&-orange, &-warning) {
|
|
58
62
|
--oui-background: var(--oui-orange-0);
|
|
63
|
+
--oui-border: var(--oui-orange-2);
|
|
59
64
|
--oui-foreground: var(--oui-orange-8);
|
|
60
|
-
--oui-shadow: var(--oui-orange-6);
|
|
65
|
+
--oui-shadow-value: var(--oui-orange-6);
|
|
61
66
|
}
|
|
62
67
|
|
|
63
68
|
:where(&-purple, &-special) {
|
|
64
69
|
--oui-background: var(--oui-purple-0);
|
|
70
|
+
--oui-border: var(--oui-purple-2);
|
|
65
71
|
--oui-foreground: var(--oui-purple-8);
|
|
66
|
-
--oui-shadow: var(--oui-purple-6);
|
|
72
|
+
--oui-shadow-value: var(--oui-purple-6);
|
|
67
73
|
}
|
|
68
74
|
|
|
69
75
|
:where(&-red, &-error) {
|
|
70
76
|
--oui-background: var(--oui-red-0);
|
|
77
|
+
--oui-border: var(--oui-red-2);
|
|
71
78
|
--oui-foreground: var(--oui-red-8);
|
|
72
|
-
--oui-shadow: var(--oui-red-6);
|
|
79
|
+
--oui-shadow-value: var(--oui-red-6);
|
|
73
80
|
}
|
|
74
81
|
|
|
75
82
|
:where(&-yellow, &-notice) {
|
|
76
83
|
--oui-background: var(--oui-yellow-0);
|
|
84
|
+
--oui-border: var(--oui-yellow-2);
|
|
77
85
|
--oui-foreground: var(--oui-yellow-8);
|
|
78
|
-
--oui-shadow: var(--oui-yellow-6);
|
|
86
|
+
--oui-shadow-value: var(--oui-yellow-6);
|
|
79
87
|
}
|
|
80
88
|
}
|
package/src/css/mixins.scss
CHANGED
|
@@ -1,3 +1,65 @@
|
|
|
1
|
+
@mixin button() {
|
|
2
|
+
--oui-background-percentage: 25%;
|
|
3
|
+
--oui-foreground-percentage: 0%;
|
|
4
|
+
--oui-outline-percentage: 100%;
|
|
5
|
+
--oui-shadow-inset: color-mix(in oklab, white, transparent 75%);
|
|
6
|
+
--oui-shadow-percentage: 82.5%;
|
|
7
|
+
|
|
8
|
+
--oui-shadow-value: color-mix(
|
|
9
|
+
in oklab,
|
|
10
|
+
var(--oui-outline-value, var(--oui-gray-6)),
|
|
11
|
+
transparent var(--oui-shadow-percentage)
|
|
12
|
+
);
|
|
13
|
+
|
|
14
|
+
@include shadow(var(--oui-shadow-value), var(--oui-shadow-inset));
|
|
15
|
+
|
|
16
|
+
padding: 0.5em 0.75em;
|
|
17
|
+
display: inline-flex;
|
|
18
|
+
flex-flow: row wrap;
|
|
19
|
+
gap: 0.75em;
|
|
20
|
+
align-items: center;
|
|
21
|
+
border-radius: 0.25em;
|
|
22
|
+
background-color: color-mix(
|
|
23
|
+
in oklab,
|
|
24
|
+
var(--oui-background-value, var(--oui-gray-2)),
|
|
25
|
+
transparent var(--oui-background-percentage)
|
|
26
|
+
);
|
|
27
|
+
outline: 4px solid
|
|
28
|
+
color-mix(
|
|
29
|
+
in oklab,
|
|
30
|
+
var(--oui-outline-value, var(--oui-gray-6)),
|
|
31
|
+
transparent var(--oui-outline-percentage)
|
|
32
|
+
);
|
|
33
|
+
border: none;
|
|
34
|
+
color: color-mix(
|
|
35
|
+
in oklab,
|
|
36
|
+
var(--oui-foreground-value, var(--oui-gray-8)),
|
|
37
|
+
transparent var(--oui-foreground-percentage)
|
|
38
|
+
);
|
|
39
|
+
line-height: 1.25;
|
|
40
|
+
transition: 0.125s ease-in-out;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@mixin card($backgroundColor: var(--oui-absolute), $boxShadowColor: color-mix(
|
|
44
|
+
in oklab,
|
|
45
|
+
var(--oui-gray-6),
|
|
46
|
+
transparent 92.5%
|
|
47
|
+
)) {
|
|
48
|
+
@include shadow($boxShadowColor);
|
|
49
|
+
|
|
50
|
+
padding: 1em 1.25em;
|
|
51
|
+
background-color: $backgroundColor;
|
|
52
|
+
border-radius: 0.5em;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@mixin shadow($color: rgba(0, 0, 0, 0.05), $inset: transparent) {
|
|
56
|
+
box-shadow:
|
|
57
|
+
inset 0 1px 0 0 $inset,
|
|
58
|
+
0 0 0 1px $color,
|
|
59
|
+
0 1px 2px -.5px $color,
|
|
60
|
+
0 2px 4px -1px $color,
|
|
61
|
+
}
|
|
62
|
+
|
|
1
63
|
@mixin visuallyHidden() {
|
|
2
64
|
width: 1px !important;
|
|
3
65
|
height: 1px !important;
|
package/src/css/reset.scss
CHANGED
|
@@ -178,8 +178,9 @@
|
|
|
178
178
|
:where(select, input[list]) {
|
|
179
179
|
appearance: none; // Change the inconsistent appearance in all browsers [SE]
|
|
180
180
|
padding-right: 1em; // ditto
|
|
181
|
-
background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='4'%3E%3Cpath d='M4 0h6L7 4'/%3E%3C/svg%3E")
|
|
182
|
-
|
|
181
|
+
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='4'%3E%3Cpath d='M4 0h6L7 4'/%3E%3C/svg%3E");
|
|
182
|
+
background-position: right center / 1em; // ditto
|
|
183
|
+
background-repeat: no-repeat; // ditto
|
|
183
184
|
border-radius: 0; // ditto
|
|
184
185
|
}
|
|
185
186
|
|
package/src/css/table.scss
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
.oui-table {
|
|
4
4
|
:where(&) {
|
|
5
5
|
width: 100%;
|
|
6
|
+
background-color: var(--oui-absolute);
|
|
6
7
|
}
|
|
7
8
|
|
|
8
9
|
:where(&-wrapper) {
|
|
@@ -29,41 +30,65 @@
|
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
:where(& tbody tr:nth-of-type(2n)) {
|
|
32
|
-
background-color: color-mix(in oklab, var(--oui-blue-0), transparent
|
|
33
|
+
background-color: color-mix(in oklab, var(--oui-blue-0), transparent 50%);
|
|
33
34
|
}
|
|
34
35
|
|
|
35
36
|
:where(& th, & tfoot td) {
|
|
36
37
|
background-color: var(--oui-gray-1);
|
|
37
38
|
border: solid var(--oui-gray-3);
|
|
38
39
|
border-width: 0 1px 0 0;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
:where(& thead th, & tfoot td) {
|
|
39
43
|
position: sticky;
|
|
40
44
|
left: 0;
|
|
41
45
|
z-index: 1;
|
|
42
46
|
|
|
43
47
|
&::after {
|
|
44
48
|
content: '';
|
|
45
|
-
|
|
49
|
+
width: 100%;
|
|
50
|
+
height: 4px;
|
|
51
|
+
background-image: linear-gradient(
|
|
52
|
+
to var(--oui-shadow-direction),
|
|
53
|
+
rgba(0, 0, 0, 0.1),
|
|
54
|
+
transparent
|
|
55
|
+
);
|
|
46
56
|
position: absolute;
|
|
47
57
|
}
|
|
48
58
|
}
|
|
49
59
|
|
|
50
60
|
:where(& th, & td) {
|
|
51
|
-
padding: .5em;
|
|
61
|
+
padding: .5em .625rem;
|
|
52
62
|
}
|
|
53
63
|
|
|
54
|
-
:where(& th) {
|
|
55
|
-
|
|
64
|
+
:where(& thead th) {
|
|
65
|
+
font-size: .75rem;
|
|
66
|
+
font-weight: bold;
|
|
67
|
+
letter-spacing: .1em;
|
|
68
|
+
text-align: left;
|
|
69
|
+
text-transform: uppercase;
|
|
70
|
+
top: 0;
|
|
56
71
|
|
|
57
72
|
&::after {
|
|
58
|
-
|
|
73
|
+
--oui-shadow-direction: bottom;
|
|
74
|
+
|
|
75
|
+
border-top: 1px solid var(--oui-gray-3);
|
|
76
|
+
inset: 100% 0 0 0;
|
|
59
77
|
}
|
|
60
78
|
}
|
|
61
79
|
|
|
80
|
+
:where(&:has(caption) thead th) {
|
|
81
|
+
top: 2rem;
|
|
82
|
+
}
|
|
83
|
+
|
|
62
84
|
:where(& tfoot td) {
|
|
63
85
|
bottom: 0;
|
|
64
86
|
|
|
65
87
|
&::after {
|
|
66
|
-
|
|
88
|
+
--oui-shadow-direction: top;
|
|
89
|
+
|
|
90
|
+
border-bottom: 1px solid var(--oui-gray-3);
|
|
91
|
+
inset: -4px 0 0 0;
|
|
67
92
|
}
|
|
68
93
|
}
|
|
69
94
|
|