@rolemodel/optics 2.0.0 → 2.1.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/.yarn/install-state.gz +0 -0
- package/LICENSE +1 -1
- package/dist/css/addons/fonts/feather_icons.css +939 -0
- package/dist/css/addons/fonts/lucide_icons.css +4672 -0
- package/dist/css/addons/fonts/material_symbols_outlined_variable.css +10 -0
- package/dist/css/addons/fonts/phosphor_icons.css +44 -0
- package/dist/css/addons/fonts/tabler_icons.css +11 -0
- package/dist/css/components/accordion.css +28 -2
- package/dist/css/components/alert.css +3 -3
- package/dist/css/components/icon.css +95 -88
- package/dist/css/components/sidebar.css +3 -4
- package/dist/css/core/fonts/icon_fonts.css +8 -0
- package/dist/css/core/fonts/index.css +8 -0
- package/dist/css/core/fonts/text_fonts.css +16 -0
- package/dist/css/core/tokens/base_tokens.css +1 -16
- package/dist/css/optics.css +3 -0
- package/dist/css/optics.min.css +152 -89
- package/package.json +12 -12
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/*
|
|
2
|
+
See all icons at: https://fonts.google.com/icons?icon.set=Material+Symbols
|
|
3
|
+
Material Symbols supports:
|
|
4
|
+
optical sizing set through: font-variation-settings: 'opsz' {20|40|48}
|
|
5
|
+
font weight set through: font-variation-settings: 'wght' {100..700}
|
|
6
|
+
fill set through: font-variation-settings: 'FILL' {0|1}
|
|
7
|
+
emphasis set through: font-variation-settings: 'GRAD' {-50|0|200}
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
@import 'https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=block';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/*
|
|
2
|
+
See all icons at: https://phosphoricons.com/
|
|
3
|
+
Current version: 2.1.1
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
@import 'https://unpkg.com/@phosphor-icons/web@2.1.1/src/regular/style.css';
|
|
7
|
+
@import 'https://unpkg.com/@phosphor-icons/web@2.1.1/src/thin/style.css';
|
|
8
|
+
@import 'https://unpkg.com/@phosphor-icons/web@2.1.1/src/light/style.css';
|
|
9
|
+
@import 'https://unpkg.com/@phosphor-icons/web@2.1.1/src/bold/style.css';
|
|
10
|
+
@import 'https://unpkg.com/@phosphor-icons/web@2.1.1/src/fill/style.css';
|
|
11
|
+
@import 'https://unpkg.com/@phosphor-icons/web@2.1.1/src/duotone/style.css';
|
|
12
|
+
|
|
13
|
+
/* Note: the important tag is how Phosphor sets up the fonts which is why we replicate them here */
|
|
14
|
+
|
|
15
|
+
/* Phosphor Icons */
|
|
16
|
+
.ph {
|
|
17
|
+
font-weight: unset;
|
|
18
|
+
|
|
19
|
+
/* Fill Modifiers */
|
|
20
|
+
&.icon--filled {
|
|
21
|
+
font-family: 'Phosphor-Fill' !important;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/* Weight Modifiers */
|
|
25
|
+
&.icon--weight-thin {
|
|
26
|
+
font-family: 'Phosphor-Thin' !important;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&.icon--weight-light {
|
|
30
|
+
font-family: 'Phosphor-Light' !important;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&.icon--weight-normal {
|
|
34
|
+
font-family: 'Phosphor' !important;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&.icon--weight-bold {
|
|
38
|
+
font-family: 'Phosphor-Bold' !important;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.ph-duotone {
|
|
43
|
+
font-weight: unset;
|
|
44
|
+
}
|
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
/* Public API (customizable component options) */
|
|
3
3
|
--_op-accordion-summary-min-height: calc(8 * var(--op-size-unit)); /* 32px */
|
|
4
4
|
|
|
5
|
+
overflow: hidden;
|
|
6
|
+
interpolate-size: allow-keywords;
|
|
7
|
+
|
|
8
|
+
/* Elements */
|
|
9
|
+
|
|
5
10
|
summary {
|
|
6
11
|
display: grid;
|
|
7
12
|
min-height: var(--_op-accordion-summary-min-height);
|
|
@@ -23,18 +28,39 @@
|
|
|
23
28
|
}
|
|
24
29
|
|
|
25
30
|
.accordion__marker {
|
|
26
|
-
--
|
|
31
|
+
--__op-icon-font-size: var(--_op-icon-font-size-x-large);
|
|
32
|
+
--__op-icon-optical-size: var(--_op-icon-optical-size-x-large);
|
|
27
33
|
|
|
28
|
-
font-size: var(--op-font-x-large);
|
|
29
34
|
justify-self: flex-end;
|
|
30
35
|
transition: var(--op-transition-accordion);
|
|
31
36
|
user-select: none;
|
|
32
37
|
}
|
|
33
38
|
}
|
|
34
39
|
|
|
40
|
+
&::details-content {
|
|
41
|
+
height: 0;
|
|
42
|
+
transition: var(--op-transition-accordion-content);
|
|
43
|
+
}
|
|
44
|
+
|
|
35
45
|
&[open] {
|
|
36
46
|
summary .accordion__marker {
|
|
37
47
|
rotate: 0.25turn;
|
|
38
48
|
}
|
|
49
|
+
|
|
50
|
+
&::details-content {
|
|
51
|
+
height: auto;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* Modifiers */
|
|
56
|
+
|
|
57
|
+
&.accordion--disable-animation {
|
|
58
|
+
summary .accordion__marker {
|
|
59
|
+
transition: none;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&::details-content {
|
|
63
|
+
transition: none;
|
|
64
|
+
}
|
|
39
65
|
}
|
|
40
66
|
}
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
/* Elements */
|
|
9
9
|
|
|
10
10
|
.alert__icon {
|
|
11
|
-
--
|
|
12
|
-
--
|
|
11
|
+
--__op-icon-font-size: var(--_op-icon-font-size-large);
|
|
12
|
+
--__op-icon-optical-size: var(--_op-icon-optical-size-large);
|
|
13
|
+
--__op-icon-weight: var(--_op-icon-weight-bold);
|
|
13
14
|
|
|
14
|
-
font-size: var(--op-font-large); /* .icon--large styling */
|
|
15
15
|
line-height: var(--op-line-height-dense);
|
|
16
16
|
}
|
|
17
17
|
|
|
@@ -1,114 +1,121 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
--
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
--
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
.icon {
|
|
2
|
+
/* Public API (customizable component options) */
|
|
3
|
+
|
|
4
|
+
/* Weight */
|
|
5
|
+
--_op-icon-weight-light: var(--op-font-weight-light);
|
|
6
|
+
--_op-icon-weight-normal: var(--op-font-weight-normal);
|
|
7
|
+
--_op-icon-weight-semi-bold: var(--op-font-weight-semi-bold);
|
|
8
|
+
--_op-icon-weight-bold: var(--op-font-weight-bold);
|
|
9
|
+
|
|
10
|
+
/* Fill */
|
|
11
|
+
--_op-icon-fill-outlined: 0;
|
|
12
|
+
--_op-icon-fill-filled: 1;
|
|
13
|
+
|
|
14
|
+
/* Emphasis */
|
|
15
|
+
--_op-icon-emphasis-low: -20;
|
|
16
|
+
--_op-icon-emphasis-normal: 0;
|
|
17
|
+
--_op-icon-emphasis-high: 200;
|
|
18
|
+
|
|
19
|
+
/* Size */
|
|
20
|
+
--_op-icon-font-size-small: var(--op-font-small);
|
|
21
|
+
--_op-icon-font-size-medium: var(--op-font-medium);
|
|
22
|
+
--_op-icon-font-size-large: var(--op-font-large);
|
|
23
|
+
--_op-icon-font-size-x-large: var(--op-font-2x-large);
|
|
24
|
+
--_op-icon-optical-size-small: 20;
|
|
25
|
+
--_op-icon-optical-size-medium: 20;
|
|
26
|
+
--_op-icon-optical-size-large: 40;
|
|
27
|
+
--_op-icon-optical-size-x-large: 48;
|
|
28
|
+
|
|
29
|
+
/* Private API (component option defaults) */
|
|
30
|
+
--__op-icon-weight: var(--_op-icon-weight-normal);
|
|
31
|
+
--__op-icon-fill: var(--_op-icon-fill-outlined);
|
|
32
|
+
--__op-icon-emphasis: var(--_op-icon-emphasis-normal);
|
|
33
|
+
--__op-icon-font-size: var(--_op-icon-font-size-medium);
|
|
34
|
+
--__op-icon-optical-size: var(--_op-icon-optical-size-medium);
|
|
35
|
+
|
|
36
|
+
display: inline-block;
|
|
37
|
+
width: var(--__op-icon-font-size);
|
|
38
|
+
height: var(--__op-icon-font-size);
|
|
39
|
+
font-size: var(--__op-icon-font-size);
|
|
40
|
+
font-weight: var(--__op-icon-weight);
|
|
23
41
|
line-height: var(--op-line-height-densest);
|
|
24
42
|
vertical-align: middle;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/* Fill */
|
|
28
|
-
.icon--outlined {
|
|
29
|
-
--op-mso-fill: 0;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.icon--filled {
|
|
33
|
-
--op-mso-fill: 1;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/* Weight */
|
|
37
|
-
.icon--weight-light {
|
|
38
|
-
--op-mso-weight: var(--op-font-weight-light);
|
|
39
|
-
}
|
|
40
43
|
|
|
41
|
-
|
|
42
|
-
--
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
.icon--weight-semi-bold {
|
|
46
|
-
--op-mso-weight: var(--op-font-weight-semi-bold);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.icon--weight-bold {
|
|
50
|
-
--op-mso-weight: var(--op-font-weight-bold);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/* Emphasis */
|
|
54
|
-
.icon--low-emphasis {
|
|
55
|
-
--op-mso-grade: -20;
|
|
56
|
-
}
|
|
44
|
+
/* Fill Modifiers */
|
|
45
|
+
&.icon--outlined {
|
|
46
|
+
--__op-icon-fill: var(--_op-icon-fill-outlined);
|
|
47
|
+
}
|
|
57
48
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
49
|
+
&.icon--filled {
|
|
50
|
+
--__op-icon-fill: var(--_op-icon-fill-filled);
|
|
51
|
+
}
|
|
61
52
|
|
|
62
|
-
|
|
63
|
-
--
|
|
64
|
-
|
|
53
|
+
/* Weight Modifiers */
|
|
54
|
+
&.icon--weight-light {
|
|
55
|
+
--__op-icon-weight: var(--_op-icon-weight-light);
|
|
56
|
+
}
|
|
65
57
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
58
|
+
&.icon--weight-normal {
|
|
59
|
+
--__op-icon-weight: var(--_op-icon-weight-normal);
|
|
60
|
+
}
|
|
69
61
|
|
|
70
|
-
--
|
|
71
|
-
|
|
62
|
+
&.icon--weight-semi-bold {
|
|
63
|
+
--__op-icon-weight: var(--_op-icon-weight-semi-bold);
|
|
64
|
+
}
|
|
72
65
|
|
|
73
|
-
|
|
74
|
-
|
|
66
|
+
&.icon--weight-bold {
|
|
67
|
+
--__op-icon-weight: var(--_op-icon-weight-bold);
|
|
68
|
+
}
|
|
75
69
|
|
|
76
|
-
|
|
77
|
-
|
|
70
|
+
/* Emphasis */
|
|
71
|
+
&.icon--low-emphasis {
|
|
72
|
+
--__op-icon-emphasis: var(--_op-icon-emphasis-low);
|
|
73
|
+
}
|
|
78
74
|
|
|
79
|
-
|
|
80
|
-
|
|
75
|
+
&.icon--normal-emphasis {
|
|
76
|
+
--__op-icon-emphasis: var(--_op-icon-emphasis-normal);
|
|
77
|
+
}
|
|
81
78
|
|
|
82
|
-
--
|
|
83
|
-
|
|
79
|
+
&.icon--high-emphasis {
|
|
80
|
+
--__op-icon-emphasis: var(--_op-icon-emphasis-high);
|
|
81
|
+
}
|
|
84
82
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
83
|
+
/* Size Modifiers */
|
|
84
|
+
&.icon--small {
|
|
85
|
+
--__op-icon-font-size: var(--_op-icon-font-size-small);
|
|
86
|
+
--__op-icon-optical-size: var(--_op-icon-optical-size-small);
|
|
87
|
+
}
|
|
89
88
|
|
|
90
89
|
&.icon--medium {
|
|
91
|
-
font-size: var(--
|
|
92
|
-
|
|
93
|
-
--op-mso-optical-sizing: 20;
|
|
90
|
+
--__op-icon-font-size: var(--_op-icon-font-size-medium);
|
|
91
|
+
--__op-icon-optical-size: var(--_op-icon-optical-size-medium);
|
|
94
92
|
}
|
|
95
93
|
|
|
96
94
|
&.icon--large {
|
|
97
|
-
|
|
98
|
-
|
|
95
|
+
--__op-icon-font-size: var(--_op-icon-font-size-large);
|
|
96
|
+
--__op-icon-optical-size: var(--_op-icon-optical-size-large);
|
|
99
97
|
}
|
|
100
98
|
|
|
101
99
|
&.icon--x-large {
|
|
102
|
-
|
|
103
|
-
|
|
100
|
+
--__op-icon-font-size: var(--_op-icon-font-size-x-large);
|
|
101
|
+
--__op-icon-optical-size: var(--_op-icon-optical-size-x-large);
|
|
104
102
|
}
|
|
105
103
|
}
|
|
106
104
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
105
|
+
/* Material Icons class provided by the Google Fonts CDN */
|
|
106
|
+
.material-symbols-outlined {
|
|
107
|
+
font-variation-settings:
|
|
108
|
+
'FILL' var(--__op-icon-fill),
|
|
109
|
+
'wght' var(--__op-icon-weight),
|
|
110
|
+
'GRAD' var(--__op-icon-emphasis),
|
|
111
|
+
'opsz' var(--__op-icon-optical-size);
|
|
112
|
+
font-weight: unset;
|
|
110
113
|
}
|
|
111
114
|
|
|
112
|
-
|
|
113
|
-
|
|
115
|
+
/* Custom SVG Icons app specific */
|
|
116
|
+
.custom-icons {
|
|
117
|
+
svg {
|
|
118
|
+
width: 100%;
|
|
119
|
+
height: 100%;
|
|
120
|
+
}
|
|
114
121
|
}
|
|
@@ -60,10 +60,9 @@
|
|
|
60
60
|
justify-content: flex-start;
|
|
61
61
|
|
|
62
62
|
.material-symbols-outlined {
|
|
63
|
-
--
|
|
64
|
-
--
|
|
65
|
-
|
|
66
|
-
font-size: var(--op-font-large);
|
|
63
|
+
--__op-icon-font-size: var(--_op-icon-font-size-large);
|
|
64
|
+
--__op-icon-optical-size: var(--_op-icon-optical-size-large);
|
|
65
|
+
--__op-icon-weight: var(--_op-icon-weight-bold);
|
|
67
66
|
}
|
|
68
67
|
}
|
|
69
68
|
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/*
|
|
2
|
+
See all icons at: https://fonts.google.com/icons?icon.set=Material+Symbols
|
|
3
|
+
This import of Material Symbols supports:
|
|
4
|
+
font weight set through: font-variation-settings: 'wght' {100..700}
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/* Material Symbols */
|
|
8
|
+
@import 'https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght@100..700&display=block';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Instead of hosting the font files locally which requires a compiler to handle them, we pull fonts
|
|
3
|
+
from Google's CDN. For more information on the variable font, see:
|
|
4
|
+
https://developers.google.com/fonts/docs/material_symbols#variable_font_with_google_fonts
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
@import 'text_fonts';
|
|
8
|
+
@import 'icon_fonts';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Noto Sans supports:
|
|
3
|
+
font-weight: {anything between 100 and 900}
|
|
4
|
+
font-stretch: {anything between 62.5% and 100%}
|
|
5
|
+
font-style: {normal or italic}
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/*
|
|
9
|
+
Noto Serif supports:
|
|
10
|
+
font-weight: {anything between 100 and 900}
|
|
11
|
+
font-stretch: {anything between 62.5% and 100%}
|
|
12
|
+
font-style: {normal or italic}
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/* Noto Sans and Noto Serif */
|
|
16
|
+
@import 'https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wdth,wght@0,62.5..100,100..900;1,62.5..100,100..900&family=Noto+Serif:ital,wdth,wght@0,62.5..100,100..900;1,62.5..100,100..900&display=swap';
|
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
@import 'https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wdth,wght@0,62.5..100,100..900;1,62.5..100,100..900&family=Noto+Serif:ital,wdth,wght@0,62.5..100,100..900;1,62.5..100,100..900&display=swap';
|
|
2
|
-
|
|
3
|
-
/*
|
|
4
|
-
Noto Sans supports:
|
|
5
|
-
font-weight: {anything between 100 and 900}
|
|
6
|
-
font-stretch: {anything between 62.5% and 100%}
|
|
7
|
-
font-style: {normal or italic}
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
/*
|
|
11
|
-
Noto Serif supports:
|
|
12
|
-
font-weight: {anything between 100 and 900}
|
|
13
|
-
font-stretch: {anything between 62.5% and 100%}
|
|
14
|
-
font-style: {normal or italic}
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
1
|
:root {
|
|
18
2
|
/* Color HSLs
|
|
19
3
|
A theme comprised of a primary, neutral, warning, danger, info, and notice colors.
|
|
@@ -216,6 +200,7 @@ Noto Sans supports:
|
|
|
216
200
|
* @tokens Transition
|
|
217
201
|
*/
|
|
218
202
|
--op-transition-accordion: rotate 120ms ease-in;
|
|
203
|
+
--op-transition-accordion-content: height 300ms ease, content-visibility 300ms ease allow-discrete;
|
|
219
204
|
--op-transition-input: all 120ms ease-in;
|
|
220
205
|
--op-transition-sidebar: all 200ms ease-in-out;
|
|
221
206
|
--op-transition-modal: all 300ms ease-in;
|