@rolemodel/optics 0.4.2 → 0.5.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/NEW_COMPONENT.md +59 -0
- package/README.md +12 -0
- package/dist/css/optics.css +580 -221
- package/dist/css/optics.css.map +1 -1
- package/dist/scss/components/accordion.scss +1 -1
- package/dist/scss/components/avatar.scss +7 -6
- package/dist/scss/components/button.scss +1 -29
- package/dist/scss/components/card.scss +15 -5
- package/dist/scss/components/confirm-dialog.scss +7 -13
- package/dist/scss/components/form.scss +25 -2
- package/dist/scss/components/icon.scss +4 -1
- package/dist/scss/components/index.scss +6 -0
- package/dist/scss/components/modal.scss +16 -23
- package/dist/scss/components/navbar.scss +61 -0
- package/dist/scss/components/side_panel.scss +94 -0
- package/dist/scss/components/sidebar.scss +6 -6
- package/dist/scss/components/spinner.scss +55 -0
- package/dist/scss/components/switch.scss +106 -0
- package/dist/scss/components/tab.scss +84 -0
- package/dist/scss/components/table.scss +3 -3
- package/dist/scss/components/tag.scss +174 -0
- package/dist/scss/components/tooltip.scss +3 -3
- package/dist/scss/core/layout.scss +8 -1
- package/dist/scss/core/tokens/base_tokens.scss +56 -16
- package/dist/scss/core/tokens/dark_mode_tokens.scss +47 -42
- package/dist/scss/core/tokens/scale_color_tokens.scss +48 -51
- package/dist/scss/core/utilities.scss +15 -3
- package/dist/tokens/tokens.json +62 -2
- package/package.json +25 -24
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
%spinner-global {
|
|
2
|
+
--_op-spinner-indicator-color: var(--op-color-primary-base);
|
|
3
|
+
--_op-spinner-track-color: var(--op-color-neutral-plus-four);
|
|
4
|
+
--_op-spinner-track-width-x-small: var(--op-border-width);
|
|
5
|
+
--_op-spinner-track-width-small: var(--op-border-width-large);
|
|
6
|
+
--_op-spinner-track-width-medium: calc(var(--op-border-width-large) + var(--op-border-width));
|
|
7
|
+
--_op-spinner-track-width-large: var(--op-border-width-x-large);
|
|
8
|
+
--_op-spinner-diameter-x-small: calc(6 * var(--op-size-unit)); // 24px
|
|
9
|
+
--_op-spinner-diameter-small: calc(10 * var(--op-size-unit)); // 40px
|
|
10
|
+
--_op-spinner-diameter-medium: calc(15 * var(--op-size-unit)); // 60px
|
|
11
|
+
--_op-spinner-diameter-large: calc(20 * var(--op-size-unit)); // 80px
|
|
12
|
+
--_op-spinner-animation-duration: 0.8s;
|
|
13
|
+
--_op-spinner-animation-timing-function: linear;
|
|
14
|
+
|
|
15
|
+
// Private API (don't touch these)
|
|
16
|
+
--__op-spinner-diameter: var(--_op-spinner-diameter-large);
|
|
17
|
+
--__op-spinner-track-width: var(--_op-spinner-track-width-large);
|
|
18
|
+
|
|
19
|
+
width: var(--__op-spinner-diameter);
|
|
20
|
+
height: var(--__op-spinner-diameter);
|
|
21
|
+
border: var(--__op-spinner-track-width) solid var(--_op-spinner-track-color);
|
|
22
|
+
border-radius: var(--__op-spinner-diameter);
|
|
23
|
+
border-top-color: var(--_op-spinner-indicator-color);
|
|
24
|
+
animation: spinner var(--_op-spinner-animation-duration) var(--_op-spinner-animation-timing-function) infinite;
|
|
25
|
+
|
|
26
|
+
&.spinner--x-small {
|
|
27
|
+
--__op-spinner-diameter: var(--_op-spinner-diameter-x-small);
|
|
28
|
+
--__op-spinner-track-width: var(--_op-spinner-track-width-x-small);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&.spinner--small {
|
|
32
|
+
--__op-spinner-diameter: var(--_op-spinner-diameter-small);
|
|
33
|
+
--__op-spinner-track-width: var(--_op-spinner-track-width-small);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&.spinner--medium {
|
|
37
|
+
--__op-spinner-diameter: var(--_op-spinner-diameter-medium);
|
|
38
|
+
--__op-spinner-track-width: var(--_op-spinner-track-width-medium);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&.spinner--large {
|
|
42
|
+
--__op-spinner-diameter: var(--_op-spinner-diameter-large);
|
|
43
|
+
--__op-spinner-track-width: var(--_op-spinner-track-width-large);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.spinner {
|
|
48
|
+
@extend %spinner-global;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@keyframes spinner {
|
|
52
|
+
to {
|
|
53
|
+
transform: rotate(360deg);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
%switch-global {
|
|
2
|
+
// Public API (allowed to be overridden)
|
|
3
|
+
--_op-switch-height-small: calc(4 * var(--op-size-unit)); // 16px
|
|
4
|
+
--_op-switch-height-large: calc(6 * var(--op-size-unit)); // 24px
|
|
5
|
+
--_op-switch-width-small: calc(7 * var(--op-size-unit)); // 28px
|
|
6
|
+
--_op-switch-width-large: calc(11 * var(--op-size-unit)); // 44px
|
|
7
|
+
--_op-switch-opacity-disabled: var(--op-opacity-disabled);
|
|
8
|
+
--_op-switch-switch-padding: var(--op-space-2x-small);
|
|
9
|
+
|
|
10
|
+
// Private API (don't touch these)
|
|
11
|
+
--__op-switch-width: var(--_op-switch-width-large);
|
|
12
|
+
--__op-switch-height: var(--_op-switch-height-large);
|
|
13
|
+
--__op-switch-switch-size: calc(var(--__op-switch-height) - var(--_op-switch-switch-padding));
|
|
14
|
+
--__op-switch-half-switch-padding: calc(var(--_op-switch-switch-padding) / 2);
|
|
15
|
+
|
|
16
|
+
position: relative;
|
|
17
|
+
display: flex;
|
|
18
|
+
|
|
19
|
+
input {
|
|
20
|
+
width: 0;
|
|
21
|
+
height: 0;
|
|
22
|
+
margin-right: calc(-1 * var(--op-space-2x-small));
|
|
23
|
+
|
|
24
|
+
&:disabled + label {
|
|
25
|
+
cursor: not-allowed;
|
|
26
|
+
opacity: var(--_op-switch-opacity-disabled);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&:checked + label {
|
|
30
|
+
background-color: var(--op-color-primary-base);
|
|
31
|
+
box-shadow: none;
|
|
32
|
+
|
|
33
|
+
&::after {
|
|
34
|
+
left: calc(100% - var(--__op-switch-half-switch-padding));
|
|
35
|
+
transform: translateX(-100%);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&:hover + label {
|
|
40
|
+
&::after {
|
|
41
|
+
background-color: var(--op-color-primary-plus-five);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&:focus-visible + label {
|
|
46
|
+
box-shadow:
|
|
47
|
+
0 0 0 var(--op-border-width-large) var(--op-color-primary-plus-six),
|
|
48
|
+
inset var(--op-border-all) var(--op-color-primary-minus-three);
|
|
49
|
+
|
|
50
|
+
&::after {
|
|
51
|
+
background-color: var(--op-color-neutral-plus-five);
|
|
52
|
+
box-shadow: var(--op-border-all) var(--op-color-primary-minus-three);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&:focus-visible:checked + label {
|
|
57
|
+
&::after {
|
|
58
|
+
background-color: var(--op-color-primary-plus-six);
|
|
59
|
+
box-shadow: var(--op-border-all) var(--op-color-primary-minus-two);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
label {
|
|
65
|
+
position: relative;
|
|
66
|
+
display: block;
|
|
67
|
+
width: var(--__op-switch-width);
|
|
68
|
+
height: var(--__op-switch-height);
|
|
69
|
+
border-radius: var(--op-radius-pill);
|
|
70
|
+
background: var(--op-color-neutral-base);
|
|
71
|
+
box-shadow: inset var(--op-border-all) var(--op-color-neutral-plus-three);
|
|
72
|
+
text-indent: -9999px; // Normally text would not be put in the label, but this hides it in case you do put text in the label
|
|
73
|
+
|
|
74
|
+
&::after {
|
|
75
|
+
position: absolute;
|
|
76
|
+
top: var(--__op-switch-half-switch-padding);
|
|
77
|
+
left: var(--__op-switch-half-switch-padding);
|
|
78
|
+
width: var(--__op-switch-switch-size);
|
|
79
|
+
height: var(--__op-switch-switch-size);
|
|
80
|
+
border-radius: var(--op-radius-circle);
|
|
81
|
+
background-color: var(--op-color-neutral-plus-eight);
|
|
82
|
+
content: '';
|
|
83
|
+
transition: var(--op-transition-input);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// Size Modifiers
|
|
88
|
+
&.switch--small {
|
|
89
|
+
--__op-switch-width: var(--_op-switch-width-small);
|
|
90
|
+
--__op-switch-height: var(--_op-switch-height-small);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&.switch--large {
|
|
94
|
+
--__op-switch-width: var(--_op-switch-width-large);
|
|
95
|
+
--__op-switch-height: var(--_op-switch-height-large);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// Prevent labels after the toggle being full width
|
|
99
|
+
& + label {
|
|
100
|
+
width: fit-content;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.switch {
|
|
105
|
+
@extend %switch-global;
|
|
106
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
%tab-group-global {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
%tab-global {
|
|
7
|
+
// Public API
|
|
8
|
+
--_op-tab-font-small: var(--op-font-x-small);
|
|
9
|
+
--_op-tab-font-large: var(--op-font-small);
|
|
10
|
+
--_op-tab-padding-small: calc(var(--op-space-2x-small) + var(--op-space-3x-small)) var(--op-space-medium);
|
|
11
|
+
--_op-tab-padding-large: var(--op-space-x-small) var(--op-space-medium) var(--op-space-small) var(--op-space-medium);
|
|
12
|
+
--_op-tab-indicator-width-small: var(--op-border-width-large);
|
|
13
|
+
--_op-tab-indicator-width-large: var(--op-border-width-x-large);
|
|
14
|
+
--_op-tab-disabled-opacity: var(--op-opacity-disabled);
|
|
15
|
+
|
|
16
|
+
// Private API
|
|
17
|
+
--__op-tab-font-size: var(--_op-tab-font-large);
|
|
18
|
+
--__op-tab-padding: var(--_op-tab-padding-large);
|
|
19
|
+
--__op-tab-indicator-width: var(--_op-tab-indicator-width-large);
|
|
20
|
+
--__op-tab-indicator: inset 0 calc(-1 * var(--__op-tab-indicator-width)) 0 0;
|
|
21
|
+
|
|
22
|
+
padding: var(--__op-tab-padding);
|
|
23
|
+
background-color: var(--op-color-background);
|
|
24
|
+
color: var(--op-color-on-background);
|
|
25
|
+
font-size: var(--__op-tab-font-size);
|
|
26
|
+
text-decoration: none;
|
|
27
|
+
|
|
28
|
+
&.tab--active {
|
|
29
|
+
box-shadow: var(--__op-tab-indicator) var(--op-color-primary-plus-one);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Focus State
|
|
33
|
+
&:focus,
|
|
34
|
+
&:focus-within,
|
|
35
|
+
&:focus-visible {
|
|
36
|
+
outline: none;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Focus State
|
|
40
|
+
&:focus-visible:not(.tab--disabled) {
|
|
41
|
+
z-index: 1;
|
|
42
|
+
box-shadow: var(--op-input-focus-primary);
|
|
43
|
+
|
|
44
|
+
&.tab--active {
|
|
45
|
+
box-shadow:
|
|
46
|
+
var(--__op-tab-indicator) var(--op-color-primary-plus-one),
|
|
47
|
+
var(--op-input-focus-primary);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Disabled State
|
|
52
|
+
&.tab--disabled {
|
|
53
|
+
opacity: var(--_op-tab-disabled-opacity);
|
|
54
|
+
pointer-events: none;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// Hover State
|
|
58
|
+
&:hover {
|
|
59
|
+
background-color: var(--op-color-primary-plus-seven);
|
|
60
|
+
box-shadow: var(--__op-tab-indicator) var(--op-color-primary-base);
|
|
61
|
+
color: var(--op-color-primary-on-plus-seven);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// Size Modifiers
|
|
65
|
+
&.tab--small {
|
|
66
|
+
--__op-tab-padding: var(--_op-tab-padding-small);
|
|
67
|
+
--__op-tab-font-size: var(--_op-tab-font-small);
|
|
68
|
+
--__op-tab-indicator-width: var(--_op-tab-indicator-width-small);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&.tab--large {
|
|
72
|
+
--__op-tab-padding: var(--_op-tab-padding-large);
|
|
73
|
+
--__op-tab-font-size: var(--_op-tab-font-large);
|
|
74
|
+
--__op-tab-indicator-width: var(--_op-tab-indicator-width-large);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.tab-group {
|
|
79
|
+
@extend %tab-group-global;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.tab {
|
|
83
|
+
@extend %tab-global;
|
|
84
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
%table-global {
|
|
2
2
|
// Public API
|
|
3
3
|
// Cells (for height, the appropriate variable is used when using the density modifiers)
|
|
4
|
-
--_op-table-cell-height-default: calc(var(--op-
|
|
5
|
-
--_op-table-cell-height-comfortable: calc(var(--op-
|
|
6
|
-
--_op-table-cell-height-compact: calc(var(--op-
|
|
4
|
+
--_op-table-cell-height-default: calc(11 * var(--op-size-unit)); // 44px
|
|
5
|
+
--_op-table-cell-height-comfortable: calc(16 * var(--op-size-unit)); // 64px
|
|
6
|
+
--_op-table-cell-height-compact: calc(8 * var(--op-size-unit)); // 32px
|
|
7
7
|
|
|
8
8
|
// Private API
|
|
9
9
|
// These allow for overriding specific padding versions easier.
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
%tag-global {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
justify-content: center;
|
|
5
|
+
padding: var(--op-space-2x-small);
|
|
6
|
+
border-radius: var(--op-radius-pill);
|
|
7
|
+
background-color: var(--op-color-neutral-plus-four);
|
|
8
|
+
color: var(--op-color-neutral-on-plus-four);
|
|
9
|
+
font-size: var(--op-font-x-small);
|
|
10
|
+
font-weight: var(--op-font-weight-bold);
|
|
11
|
+
letter-spacing: var(--op-letter-spacing-label);
|
|
12
|
+
line-height: var(--op-line-height-dense);
|
|
13
|
+
user-select: none;
|
|
14
|
+
white-space: nowrap;
|
|
15
|
+
|
|
16
|
+
.tag__label {
|
|
17
|
+
padding-inline: var(--op-space-2x-small);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.btn--icon {
|
|
21
|
+
--__op-btn-height: var(--op-font-medium);
|
|
22
|
+
|
|
23
|
+
// Hover State
|
|
24
|
+
&:hover {
|
|
25
|
+
background-color: var(--op-color-neutral-minus-three);
|
|
26
|
+
box-shadow: none;
|
|
27
|
+
color: var(--op-color-neutral-on-minus-three);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Focus State
|
|
31
|
+
&:focus-visible {
|
|
32
|
+
background-color: var(--op-color-neutral-base);
|
|
33
|
+
box-shadow: var(--op-input-focus-neutral);
|
|
34
|
+
color: var(--op-color-neutral-on-base);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.tag-readonly {
|
|
40
|
+
@extend %tag-global;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.tag-primary {
|
|
44
|
+
@extend %tag-global;
|
|
45
|
+
|
|
46
|
+
background-color: var(--op-color-primary-base);
|
|
47
|
+
color: var(--op-color-primary-on-base);
|
|
48
|
+
|
|
49
|
+
.btn--icon {
|
|
50
|
+
color: var(--op-color-primary-on-base);
|
|
51
|
+
|
|
52
|
+
// Hover State
|
|
53
|
+
&:hover {
|
|
54
|
+
background-color: var(--op-color-primary-minus-three);
|
|
55
|
+
box-shadow: none;
|
|
56
|
+
color: var(--op-color-primary-on-minus-three);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Focus State
|
|
60
|
+
&:focus-visible {
|
|
61
|
+
background-color: var(--op-color-primary-base);
|
|
62
|
+
box-shadow: var(--op-input-focus-primary);
|
|
63
|
+
color: var(--op-color-primary-on-base);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.tag-danger {
|
|
69
|
+
@extend %tag-global;
|
|
70
|
+
|
|
71
|
+
background-color: var(--op-color-alerts-danger-base);
|
|
72
|
+
color: var(--op-color-alerts-danger-on-base);
|
|
73
|
+
|
|
74
|
+
/* stylelint-disable no-descending-specificity */
|
|
75
|
+
.btn--icon {
|
|
76
|
+
color: var(--op-color-alerts-danger-on-base);
|
|
77
|
+
|
|
78
|
+
// Hover State
|
|
79
|
+
&:hover {
|
|
80
|
+
background-color: var(--op-color-alerts-danger-minus-three);
|
|
81
|
+
box-shadow: none;
|
|
82
|
+
color: var(--op-color-alerts-danger-on-minus-three);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// Focus State
|
|
86
|
+
&:focus-visible {
|
|
87
|
+
background-color: var(--op-color-alerts-danger-base);
|
|
88
|
+
box-shadow: var(--op-input-focus-danger);
|
|
89
|
+
color: var(--op-color-alerts-danger-on-base);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
/* stylelint-enable no-descending-specificity */
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.tag-warning {
|
|
96
|
+
@extend %tag-global;
|
|
97
|
+
|
|
98
|
+
background-color: var(--op-color-alerts-warning-base);
|
|
99
|
+
color: var(--op-color-alerts-warning-on-base);
|
|
100
|
+
|
|
101
|
+
/* stylelint-disable no-descending-specificity */
|
|
102
|
+
.btn--icon {
|
|
103
|
+
color: var(--op-color-alerts-warning-on-base);
|
|
104
|
+
|
|
105
|
+
// Hover State
|
|
106
|
+
&:hover {
|
|
107
|
+
background-color: var(--op-color-alerts-warning-minus-three);
|
|
108
|
+
box-shadow: none;
|
|
109
|
+
color: var(--op-color-alerts-warning-on-minus-three);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// Focus State
|
|
113
|
+
&:focus-visible {
|
|
114
|
+
background-color: var(--op-color-alerts-warning-base);
|
|
115
|
+
box-shadow: var(--op-input-focus-warning);
|
|
116
|
+
color: var(--op-color-alerts-warning-on-base);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
/* stylelint-enable no-descending-specificity */
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.tag-info {
|
|
123
|
+
@extend %tag-global;
|
|
124
|
+
|
|
125
|
+
background-color: var(--op-color-alerts-info-base);
|
|
126
|
+
color: var(--op-color-alerts-info-on-base);
|
|
127
|
+
|
|
128
|
+
/* stylelint-disable no-descending-specificity */
|
|
129
|
+
.btn--icon {
|
|
130
|
+
color: var(--op-color-alerts-info-on-base);
|
|
131
|
+
|
|
132
|
+
// Hover State
|
|
133
|
+
&:hover {
|
|
134
|
+
background-color: var(--op-color-alerts-info-minus-three);
|
|
135
|
+
box-shadow: none;
|
|
136
|
+
color: var(--op-color-alerts-info-on-minus-three);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// Focus State
|
|
140
|
+
&:focus-visible {
|
|
141
|
+
background-color: var(--op-color-alerts-info-base);
|
|
142
|
+
box-shadow: var(--op-input-focus-info);
|
|
143
|
+
color: var(--op-color-alerts-info-on-base);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
/* stylelint-enable no-descending-specificity */
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.tag-notice {
|
|
150
|
+
@extend %tag-global;
|
|
151
|
+
|
|
152
|
+
background-color: var(--op-color-alerts-notice-base);
|
|
153
|
+
color: var(--op-color-alerts-notice-on-base);
|
|
154
|
+
|
|
155
|
+
/* stylelint-disable no-descending-specificity */
|
|
156
|
+
.btn--icon {
|
|
157
|
+
color: var(--op-color-alerts-notice-on-base);
|
|
158
|
+
|
|
159
|
+
// Hover State
|
|
160
|
+
&:hover {
|
|
161
|
+
background-color: var(--op-color-alerts-notice-minus-three);
|
|
162
|
+
box-shadow: none;
|
|
163
|
+
color: var(--op-color-alerts-notice-on-minus-three);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// Focus State
|
|
167
|
+
&:focus-visible {
|
|
168
|
+
background-color: var(--op-color-alerts-notice-base);
|
|
169
|
+
box-shadow: var(--op-input-focus-notice);
|
|
170
|
+
color: var(--op-color-alerts-notice-on-base);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
/* stylelint-enable no-descending-specificity */
|
|
174
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
%tooltip-global {
|
|
2
2
|
// Public API
|
|
3
|
-
--_op-tooltip-max-width: calc(
|
|
3
|
+
--_op-tooltip-max-width: calc(50 * var(--op-size-unit)); // 200px
|
|
4
4
|
--_op-tooltip-padding: var(--op-space-x-small) var(--op-space-medium);
|
|
5
5
|
--_op-tooltip-background-color: var(--op-color-neutral-minus-max);
|
|
6
6
|
--_op-tooltip-text-color: var(--op-color-neutral-on-minus-max);
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
&::before,
|
|
15
15
|
&::after {
|
|
16
|
-
opacity:
|
|
16
|
+
opacity: var(--op-opacity-none);
|
|
17
17
|
transition: var(--op-transition-tooltip);
|
|
18
18
|
visibility: hidden;
|
|
19
19
|
}
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
&:hover {
|
|
49
49
|
&::before,
|
|
50
50
|
&::after {
|
|
51
|
-
opacity:
|
|
51
|
+
opacity: var(--op-opacity-full);
|
|
52
52
|
visibility: visible;
|
|
53
53
|
}
|
|
54
54
|
}
|
|
@@ -21,12 +21,19 @@
|
|
|
21
21
|
|
|
22
22
|
.app__content {
|
|
23
23
|
width: 100%;
|
|
24
|
-
max-width:
|
|
24
|
+
max-width: var(--op-breakpoint-medium);
|
|
25
25
|
flex-grow: 1;
|
|
26
26
|
padding: 0 var(--op-space-large);
|
|
27
27
|
margin: 0 auto;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
+
.app__content-no-margin {
|
|
31
|
+
width: 100%;
|
|
32
|
+
flex-grow: 1;
|
|
33
|
+
padding: 0 var(--op-space-large);
|
|
34
|
+
overflow-y: auto;
|
|
35
|
+
}
|
|
36
|
+
|
|
30
37
|
.app__footer {
|
|
31
38
|
position: sticky;
|
|
32
39
|
z-index: var(--op-z-index-footer);
|
|
@@ -64,6 +64,41 @@
|
|
|
64
64
|
--op-color-alerts-notice-l: 64%;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
+
@mixin opacities {
|
|
68
|
+
/**
|
|
69
|
+
* @tokens Opacities
|
|
70
|
+
* @presenter Opacity
|
|
71
|
+
*/
|
|
72
|
+
--op-opacity-none: 0;
|
|
73
|
+
--op-opacity-overlay: 0.2;
|
|
74
|
+
--op-opacity-disabled: 0.4;
|
|
75
|
+
--op-opacity-half: 0.5;
|
|
76
|
+
--op-opacity-full: 1;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// Breakpoints are duplicated here for use as variables with calculations and for use in @media queries.
|
|
80
|
+
// We use SCSS variables outside the root since support for custom properties / css variables
|
|
81
|
+
// is not yet available
|
|
82
|
+
// https://drafts.csswg.org/css-env-1/
|
|
83
|
+
// https://bholmes.dev/blog/alternative-to-css-variable-media-queries/
|
|
84
|
+
@mixin breakpoints {
|
|
85
|
+
/**
|
|
86
|
+
* @tokens Breakpoints
|
|
87
|
+
* @presenter Spacing
|
|
88
|
+
*/
|
|
89
|
+
--op-breakpoint-x-small: 512px; // vertical phone
|
|
90
|
+
--op-breakpoint-small: 768px; // vertical ipad
|
|
91
|
+
--op-breakpoint-medium: 1024px; // landscape ipad
|
|
92
|
+
--op-breakpoint-large: 1280px; // small laptop
|
|
93
|
+
--op-breakpoint-x-large: 1440px; // medium laptop
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
$breakpoint-x-small: 512px; // vertical phone
|
|
97
|
+
$breakpoint-small: 768px; // vertical ipad
|
|
98
|
+
$breakpoint-medium: 1024px; // landscape ipad
|
|
99
|
+
$breakpoint-large: 1280px; // small laptop
|
|
100
|
+
$breakpoint-x-large: 1440px; // medium laptop
|
|
101
|
+
|
|
67
102
|
@mixin border-radius {
|
|
68
103
|
/**
|
|
69
104
|
* @tokens Border Radius
|
|
@@ -195,8 +230,8 @@
|
|
|
195
230
|
/**
|
|
196
231
|
* @tokens Encoded Images
|
|
197
232
|
*/
|
|
198
|
-
--op-encoded-images-dropdown-arrow-width: var(--op-space-scale-unit); // No way to string interpolate
|
|
199
|
-
--op-encoded-images-dropdown-arrow: url(
|
|
233
|
+
--op-encoded-images-dropdown-arrow-width: calc(1.2 * var(--op-space-scale-unit)); // 12px No way to string interpolate
|
|
234
|
+
--op-encoded-images-dropdown-arrow: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iOSIgdmlld0JveD0iMCAwIDEyIDkiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik02IDguMzc1MDFMMCAyLjM3NTAxTDEuNCAwLjk3NTAwNkw2IDUuNTc1MDFMMTAuNiAwLjk3NTAwNkwxMiAyLjM3NTAxTDYgOC4zNzUwMVoiIGZpbGw9IiMwQTBBMEIiLz4KPC9zdmc+Cg==');
|
|
200
235
|
}
|
|
201
236
|
|
|
202
237
|
@mixin fonts {
|
|
@@ -225,6 +260,14 @@
|
|
|
225
260
|
--op-space-4x-large: calc(var(--op-space-scale-unit) * 8); // 80px
|
|
226
261
|
}
|
|
227
262
|
|
|
263
|
+
@mixin sizing-scales {
|
|
264
|
+
/**
|
|
265
|
+
* @tokens Size Scale
|
|
266
|
+
* @presenter Spacing
|
|
267
|
+
*/
|
|
268
|
+
--op-size-unit: 0.4rem; // 4px;
|
|
269
|
+
}
|
|
270
|
+
|
|
228
271
|
@mixin shadows {
|
|
229
272
|
/**
|
|
230
273
|
* @tokens Shadows
|
|
@@ -273,29 +316,25 @@
|
|
|
273
316
|
--op-input-outer-focus: 0 0 0 var(--op-border-width-x-large);
|
|
274
317
|
--op-input-focus-primary: var(--op-input-inner-focus) var(--op-color-primary-plus-two),
|
|
275
318
|
var(--op-input-outer-focus) var(--op-color-primary-plus-five);
|
|
319
|
+
--op-input-focus-neutral: var(--op-input-inner-focus) var(--op-color-neutral-plus-two),
|
|
320
|
+
var(--op-input-outer-focus) var(--op-color-neutral-plus-five);
|
|
276
321
|
--op-input-focus-danger: var(--op-input-inner-focus) var(--op-color-alerts-danger-plus-two),
|
|
277
322
|
var(--op-input-outer-focus) var(--op-color-alerts-danger-plus-five);
|
|
278
323
|
--op-input-focus-warning: var(--op-input-inner-focus) var(--op-color-alerts-warning-plus-two),
|
|
279
324
|
var(--op-input-outer-focus) var(--op-color-alerts-warning-plus-five);
|
|
325
|
+
--op-input-focus-info: var(--op-input-inner-focus) var(--op-color-alerts-info-plus-two),
|
|
326
|
+
var(--op-input-outer-focus) var(--op-color-alerts-info-plus-five);
|
|
327
|
+
--op-input-focus-notice: var(--op-input-inner-focus) var(--op-color-alerts-notice-plus-two),
|
|
328
|
+
var(--op-input-outer-focus) var(--op-color-alerts-notice-plus-five);
|
|
280
329
|
}
|
|
281
330
|
|
|
282
|
-
// We use SCSS variables outside the root since support for custom properties / css variables
|
|
283
|
-
// is not yet available
|
|
284
|
-
// https://drafts.csswg.org/css-env-1/
|
|
285
|
-
// https://bholmes.dev/blog/alternative-to-css-variable-media-queries/
|
|
286
|
-
|
|
287
|
-
/**
|
|
288
|
-
* @tokens Breakpoints
|
|
289
|
-
*/
|
|
290
|
-
$breakpoint-x-small: 512px; // vertical phone
|
|
291
|
-
$breakpoint-small: 768px; // vertical ipad
|
|
292
|
-
$breakpoint-medium: 1024px; // landscape ipad
|
|
293
|
-
$breakpoint-large: 1280px; // small laptop
|
|
294
|
-
$breakpoint-x-large: 1440px; // medium laptop
|
|
295
|
-
|
|
296
331
|
:root {
|
|
297
332
|
// Color HSLs
|
|
298
333
|
@include color-varieties;
|
|
334
|
+
@include opacities;
|
|
335
|
+
|
|
336
|
+
// Breakpoints
|
|
337
|
+
@include breakpoints;
|
|
299
338
|
|
|
300
339
|
// Border
|
|
301
340
|
@include border-radius;
|
|
@@ -320,6 +359,7 @@ $breakpoint-x-large: 1440px; // medium laptop
|
|
|
320
359
|
@include encoded-images;
|
|
321
360
|
|
|
322
361
|
// Spacing
|
|
362
|
+
@include sizing-scales;
|
|
323
363
|
@include spacing-scales;
|
|
324
364
|
|
|
325
365
|
// Shadows
|