@neo-design/foundations 1.0.0-rc.4
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/LICENSE +21 -0
- package/README.md +18 -0
- package/css/alert.css +133 -0
- package/css/aspect-ratio.css +32 -0
- package/css/badge.css +57 -0
- package/css/banner.css +220 -0
- package/css/button-icon.css +14 -0
- package/css/button.css +174 -0
- package/css/checkbox.css +124 -0
- package/css/chips-group.css +26 -0
- package/css/chips.css +88 -0
- package/css/combobox.css +229 -0
- package/css/empty-state.css +149 -0
- package/css/index.css +36 -0
- package/css/link.css +39 -0
- package/css/menu.css +112 -0
- package/css/modal-dialog.css +204 -0
- package/css/modal-fullscreen.css +145 -0
- package/css/radio-button.css +132 -0
- package/css/select.css +181 -0
- package/css/snackbar.css +85 -0
- package/css/spinner.css +21 -0
- package/css/tabs.css +126 -0
- package/css/tag.css +38 -0
- package/css/text-field.css +224 -0
- package/css/toggle.css +53 -0
- package/css/tooltip.css +32 -0
- package/icon-aliases.mjs +57 -0
- package/icons/README.md +84 -0
- package/icons/icons.css +16 -0
- package/icons/index.json +843 -0
- package/icons/sprite.mjs +2 -0
- package/package.json +44 -0
- package/tokens/_brand.mjs +3 -0
- package/tokens/_primitives.mjs +44 -0
- package/tokens/_util.mjs +12 -0
- package/tokens/api-js.mjs +11 -0
- package/tokens/breakpoints.mjs +8 -0
- package/tokens/color-semantic.mjs +47 -0
- package/tokens/color.mjs +58 -0
- package/tokens/component-tokens.mjs +24 -0
- package/tokens/container.mjs +8 -0
- package/tokens/iconSize.mjs +18 -0
- package/tokens/neo-color.css +97 -0
- package/tokens/neo-foundations.css +250 -0
- package/tokens/radius.mjs +18 -0
- package/tokens/shadows.mjs +14 -0
- package/tokens/spacing.mjs +21 -0
- package/tokens/stroke.mjs +15 -0
- package/tokens/typography.mjs +59 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Neo Design System contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# `@neo-design/foundations`
|
|
2
|
+
|
|
3
|
+
**Who it is for:** dev, with React or without it. **Ships**: yes — these are the system's foundations.
|
|
4
|
+
|
|
5
|
+
Neo's semantic tokens in JS and in CSS, the icons and the plain CSS layer. It does not depend on React or
|
|
6
|
+
on Material UI: `@neo-design/mui` uses it underneath, and an app in another framework can use it on its own.
|
|
7
|
+
|
|
8
|
+
| import | what it ships |
|
|
9
|
+
|---|---|
|
|
10
|
+
| `@neo-design/foundations/tokens.css` · `/foundations.css` | the tokens as CSS variables — [`tokens/neo-color.css`](tokens/neo-color.css) and [`tokens/neo-foundations.css`](tokens/neo-foundations.css) |
|
|
11
|
+
| `@neo-design/foundations/icons.css` · `/sprite` · `/icons.json` | the icon layer: the classes, the sprite as a string and the index — see [`icons/README.md`](icons/README.md) |
|
|
12
|
+
| `@neo-design/foundations/css/<component>.css` | one plain sheet per component, to consume without React — [`css/index.css`](css/index.css) loads them all |
|
|
13
|
+
|
|
14
|
+
The `css/` sheets resolve their variables against the two token sheets, so those load first.
|
|
15
|
+
|
|
16
|
+
**How to mount it, and the full reference, are in the repository this package is published from** —
|
|
17
|
+
its README covers installation, and `docs/dev/` covers the token dictionary, the layout recipe and
|
|
18
|
+
the composition examples.
|
package/css/alert.css
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/* packages/foundations/css/alert.css — emitted without comments. The reasoning behind each decision lives in Neo's source repository. */
|
|
2
|
+
|
|
3
|
+
.alert {
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: flex-start;
|
|
6
|
+
gap: var(--neo-space-xs-rem);
|
|
7
|
+
padding-inline: var(--neo-space-lg-rem);
|
|
8
|
+
padding-block: var(--neo-space-md-rem);
|
|
9
|
+
border-radius: var(--neo-radius-sm);
|
|
10
|
+
border-width: var(--neo-stroke-xs);
|
|
11
|
+
border-style: solid;
|
|
12
|
+
width: 100%;
|
|
13
|
+
box-sizing: border-box;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.alert__icon {
|
|
17
|
+
flex-shrink: 0;
|
|
18
|
+
width: var(--neo-icon-size-md-rem);
|
|
19
|
+
height: var(--neo-icon-size-md-rem);
|
|
20
|
+
margin-top: var(--neo-space-xs-rem);
|
|
21
|
+
margin-right: var(--neo-space-xs-rem);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.alert__body {
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
gap: var(--neo-space-xs-rem);
|
|
28
|
+
flex: 1;
|
|
29
|
+
min-width: 0;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.alert__title,
|
|
33
|
+
.alert__description {
|
|
34
|
+
margin: 0;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.alert__title {
|
|
38
|
+
font-size: var(--neo-type-title-xs-bold-size-rem);
|
|
39
|
+
font-weight: var(--neo-type-title-xs-bold-weight);
|
|
40
|
+
line-height: var(--neo-type-title-xs-bold-line-height-rem);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.alert__text {
|
|
44
|
+
display: flex;
|
|
45
|
+
flex-direction: column;
|
|
46
|
+
gap: var(--neo-space-xs-rem);
|
|
47
|
+
padding-block: var(--neo-space-xs-rem);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.alert__description {
|
|
51
|
+
font-size: var(--neo-type-body-md-regular-size-rem);
|
|
52
|
+
font-weight: var(--neo-type-body-md-regular-weight);
|
|
53
|
+
line-height: var(--neo-type-body-md-regular-line-height-rem);
|
|
54
|
+
display: -webkit-box;
|
|
55
|
+
-webkit-box-orient: vertical;
|
|
56
|
+
-webkit-line-clamp: 3;
|
|
57
|
+
overflow: hidden;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.alert__link {
|
|
61
|
+
color: var(--text--base--default);
|
|
62
|
+
font-size: var(--neo-type-body-md-medium-size-rem);
|
|
63
|
+
font-weight: var(--neo-type-body-md-medium-weight);
|
|
64
|
+
line-height: var(--neo-type-body-md-medium-line-height-rem);
|
|
65
|
+
text-decoration: underline;
|
|
66
|
+
text-decoration-color: currentColor;
|
|
67
|
+
text-underline-offset: 2px;
|
|
68
|
+
text-decoration-thickness: 1px;
|
|
69
|
+
text-decoration-skip-ink: auto;
|
|
70
|
+
cursor: pointer;
|
|
71
|
+
display: inline-flex;
|
|
72
|
+
align-items: center;
|
|
73
|
+
align-self: flex-start;
|
|
74
|
+
min-height: 24px;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
.alert__close {
|
|
79
|
+
flex-shrink: 0;
|
|
80
|
+
color: var(--icon--base--default);
|
|
81
|
+
background: var(--fill--tertiary--default);
|
|
82
|
+
border: none;
|
|
83
|
+
cursor: pointer;
|
|
84
|
+
padding: 0;
|
|
85
|
+
display: flex;
|
|
86
|
+
align-items: center;
|
|
87
|
+
justify-content: center;
|
|
88
|
+
width: var(--neo-icon-size-lg-rem);
|
|
89
|
+
height: var(--neo-icon-size-lg-rem);
|
|
90
|
+
border-radius: var(--neo-radius-pill);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.alert__close svg {
|
|
94
|
+
width: var(--neo-icon-size-xs-rem);
|
|
95
|
+
height: var(--neo-icon-size-xs-rem);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.alert__close:focus-visible {
|
|
99
|
+
outline: var(--neo-stroke-focus-ring-width) solid var(--focus--ring--default);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
.alert--info {
|
|
104
|
+
background: var(--fill--semantic--info--soft);
|
|
105
|
+
border-color: var(--border--semantic--info);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.alert--info .alert__title { color: var(--text--semantic--info); }
|
|
109
|
+
.alert--info .alert__description { color: var(--text--base--default); }
|
|
110
|
+
|
|
111
|
+
.alert--success {
|
|
112
|
+
background: var(--fill--semantic--success--soft);
|
|
113
|
+
border-color: var(--border--semantic--success);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.alert--success .alert__title { color: var(--text--semantic--success); }
|
|
117
|
+
.alert--success .alert__description { color: var(--text--base--default); }
|
|
118
|
+
|
|
119
|
+
.alert--warning {
|
|
120
|
+
background: var(--fill--semantic--warning--soft);
|
|
121
|
+
border-color: var(--border--semantic--warning);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.alert--warning .alert__title { color: var(--text--semantic--warning); }
|
|
125
|
+
.alert--warning .alert__description { color: var(--text--base--default); }
|
|
126
|
+
|
|
127
|
+
.alert--error {
|
|
128
|
+
background: var(--fill--semantic--error--soft);
|
|
129
|
+
border-color: var(--border--semantic--error-soft);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.alert--error .alert__title { color: var(--text--semantic--error); }
|
|
133
|
+
.alert--error .alert__description { color: var(--text--base--default); }
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/* packages/foundations/css/aspect-ratio.css — emitted without comments. The reasoning behind each decision lives in Neo's source repository. */
|
|
2
|
+
|
|
3
|
+
.aspect-ratio {
|
|
4
|
+
display: block;
|
|
5
|
+
width: 100%;
|
|
6
|
+
aspect-ratio: 16 / 9;
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.aspect-ratio > img,
|
|
11
|
+
.aspect-ratio > video,
|
|
12
|
+
.aspect-ratio > picture,
|
|
13
|
+
.aspect-ratio > svg {
|
|
14
|
+
display: block;
|
|
15
|
+
width: 100%;
|
|
16
|
+
height: 100%;
|
|
17
|
+
object-fit: cover;
|
|
18
|
+
object-position: center;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.aspect-ratio--1-1 { aspect-ratio: 1 / 1; }
|
|
22
|
+
.aspect-ratio--16-9 { aspect-ratio: 16 / 9; }
|
|
23
|
+
.aspect-ratio--4-3 { aspect-ratio: 4 / 3; }
|
|
24
|
+
.aspect-ratio--3-4 { aspect-ratio: 3 / 4; }
|
|
25
|
+
.aspect-ratio--21-9 { aspect-ratio: 21 / 9; }
|
|
26
|
+
|
|
27
|
+
.aspect-ratio--contain > img,
|
|
28
|
+
.aspect-ratio--contain > video,
|
|
29
|
+
.aspect-ratio--contain > picture,
|
|
30
|
+
.aspect-ratio--contain > svg {
|
|
31
|
+
object-fit: contain;
|
|
32
|
+
}
|
package/css/badge.css
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/* packages/foundations/css/badge.css — emitted without comments. The reasoning behind each decision lives in Neo's source repository. */
|
|
2
|
+
|
|
3
|
+
.badge {
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
padding-inline: var(--neo-space-md-rem);
|
|
7
|
+
padding-block: var(--neo-space-xs-rem);
|
|
8
|
+
border: var(--neo-stroke-xs) solid transparent;
|
|
9
|
+
border-radius: var(--neo-radius-pill);
|
|
10
|
+
font-size: var(--neo-type-body-md-medium-size-rem);
|
|
11
|
+
font-weight: var(--neo-type-body-md-medium-weight);
|
|
12
|
+
line-height: var(--neo-type-body-md-medium-line-height-rem);
|
|
13
|
+
white-space: nowrap;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.badge--error { background: var(--fill--semantic--error--soft); border-color: var(--border--semantic--error-soft); color: var(--text--semantic--error); }
|
|
17
|
+
.badge--warning { background: var(--fill--semantic--warning--soft); border-color: var(--border--semantic--warning); color: var(--text--semantic--warning); }
|
|
18
|
+
.badge--success { background: var(--fill--semantic--success--soft); border-color: var(--border--semantic--success); color: var(--text--semantic--success); }
|
|
19
|
+
.badge--info { background: var(--fill--semantic--info--soft); border-color: var(--border--semantic--info); color: var(--text--semantic--info); }
|
|
20
|
+
.badge--neutral { background: var(--fill--base--light); border-color: var(--border--base--default); color: var(--text--base--default); }
|
|
21
|
+
|
|
22
|
+
.badge--dot {
|
|
23
|
+
width: 8px;
|
|
24
|
+
height: 8px;
|
|
25
|
+
padding: 0;
|
|
26
|
+
border: none;
|
|
27
|
+
border-radius: var(--neo-radius-pill);
|
|
28
|
+
background: var(--fill--semantic--error--solid);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.badge--number {
|
|
32
|
+
justify-content: center;
|
|
33
|
+
min-width: 20px;
|
|
34
|
+
height: 20px;
|
|
35
|
+
padding-inline: var(--neo-space-xs-rem);
|
|
36
|
+
padding-block: 0;
|
|
37
|
+
border: none;
|
|
38
|
+
border-radius: var(--neo-radius-pill);
|
|
39
|
+
background: var(--fill--semantic--error--solid);
|
|
40
|
+
color: var(--text--base--contrast);
|
|
41
|
+
font-size: var(--neo-type-caption-sm-medium-size-rem);
|
|
42
|
+
font-weight: var(--neo-type-caption-sm-medium-weight);
|
|
43
|
+
line-height: var(--neo-type-caption-sm-medium-line-height-rem);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.notification {
|
|
47
|
+
position: relative;
|
|
48
|
+
display: inline-flex;
|
|
49
|
+
justify-content: center;
|
|
50
|
+
align-items: center;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.notification .badge {
|
|
54
|
+
position: absolute;
|
|
55
|
+
top: var(--neo-space-xs-rem);
|
|
56
|
+
right: var(--neo-space-xs-rem);
|
|
57
|
+
}
|
package/css/banner.css
ADDED
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
/* packages/foundations/css/banner.css — emitted without comments. The reasoning behind each decision lives in Neo's source repository. */
|
|
2
|
+
|
|
3
|
+
.banner-shell {
|
|
4
|
+
container-type: inline-size;
|
|
5
|
+
container-name: banner;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.banner {
|
|
9
|
+
display: grid;
|
|
10
|
+
grid-template-columns: 1fr;
|
|
11
|
+
grid-template-rows: auto 1fr;
|
|
12
|
+
overflow: hidden;
|
|
13
|
+
position: relative;
|
|
14
|
+
border-radius: var(--neo-radius-lg);
|
|
15
|
+
background: var(--fill--base--default);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.banner:not(.banner--small) .banner__content { grid-row: 1; }
|
|
19
|
+
.banner:not(.banner--small):not(.banner--full-photo) .banner__media { grid-row: 2; }
|
|
20
|
+
|
|
21
|
+
.banner--large { height: 504px; }
|
|
22
|
+
.banner--medium { height: 340px; }
|
|
23
|
+
.banner--small { height: 148px; }
|
|
24
|
+
|
|
25
|
+
.banner--small { grid-template-rows: minmax(0, 1fr); }
|
|
26
|
+
|
|
27
|
+
.banner--large:not(.banner--full-photo) { grid-template-rows: auto 223px; }
|
|
28
|
+
.banner--medium:not(.banner--full-photo) { grid-template-rows: auto 127px; }
|
|
29
|
+
.banner--large:not(.banner--full-photo) .banner__content { min-height: 281px; }
|
|
30
|
+
.banner--medium:not(.banner--full-photo) .banner__content { min-height: 217px; }
|
|
31
|
+
|
|
32
|
+
@container banner (min-width: 720px) {
|
|
33
|
+
.banner { grid-template-columns: 1fr 1fr; grid-template-rows: none; }
|
|
34
|
+
.banner:not(.banner--small) .banner__content { grid-column: 1; grid-row: 1; }
|
|
35
|
+
.banner:not(.banner--small):not(.banner--full-photo) .banner__media { grid-column: 2; grid-row: 1; }
|
|
36
|
+
.banner--large { height: 374px; }
|
|
37
|
+
.banner--medium { height: 230px; }
|
|
38
|
+
.banner--small { height: 90px; }
|
|
39
|
+
.banner--large:not(.banner--full-photo),
|
|
40
|
+
.banner--medium:not(.banner--full-photo) { grid-template-rows: none; }
|
|
41
|
+
.banner--large:not(.banner--full-photo) .banner__content,
|
|
42
|
+
.banner--medium:not(.banner--full-photo) .banner__content { min-height: auto; }
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.banner__content {
|
|
46
|
+
display: flex;
|
|
47
|
+
flex-direction: column;
|
|
48
|
+
justify-content: center;
|
|
49
|
+
align-items: flex-start;
|
|
50
|
+
gap: var(--neo-space-sm-rem);
|
|
51
|
+
padding-top: var(--neo-space-2xl-rem);
|
|
52
|
+
padding-inline: var(--neo-space-xl-rem);
|
|
53
|
+
padding-bottom: var(--neo-space-lg-rem);
|
|
54
|
+
min-width: 0;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.banner:not(.banner--large) .banner__icon { display: none; }
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
.banner__icon {
|
|
61
|
+
display: flex;
|
|
62
|
+
align-items: center;
|
|
63
|
+
justify-content: center;
|
|
64
|
+
width: var(--neo-icon-size-2xl-rem);
|
|
65
|
+
height: var(--neo-icon-size-2xl-rem);
|
|
66
|
+
flex-shrink: 0;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.banner__icon > svg {
|
|
70
|
+
width: 100%;
|
|
71
|
+
height: 100%;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.banner__title,
|
|
75
|
+
.banner__subtitle,
|
|
76
|
+
.banner__description { align-self: stretch; flex-shrink: 0; }
|
|
77
|
+
|
|
78
|
+
.banner--small .banner__description { flex-grow: 1; }
|
|
79
|
+
|
|
80
|
+
.banner__title {
|
|
81
|
+
margin: 0 0 var(--neo-space-xs-rem);
|
|
82
|
+
color: var(--text--base--default);
|
|
83
|
+
font-size: var(--neo-type-title-md-bold-size-rem);
|
|
84
|
+
font-weight: var(--neo-type-title-md-bold-weight);
|
|
85
|
+
line-height: var(--neo-type-title-md-bold-line-height-rem);
|
|
86
|
+
display: -webkit-box;
|
|
87
|
+
-webkit-box-orient: vertical;
|
|
88
|
+
-webkit-line-clamp: 2;
|
|
89
|
+
overflow: hidden;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
@container banner (min-width: 720px) {
|
|
93
|
+
.banner--large .banner__title {
|
|
94
|
+
font-size: var(--neo-type-title-lg-bold-size-rem);
|
|
95
|
+
line-height: var(--neo-type-title-lg-bold-line-height-rem);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.banner__subtitle {
|
|
100
|
+
margin: 0;
|
|
101
|
+
color: var(--text--base--default);
|
|
102
|
+
font-size: var(--neo-type-title-sm-bold-size-rem);
|
|
103
|
+
font-weight: var(--neo-type-title-sm-bold-weight);
|
|
104
|
+
line-height: var(--neo-type-title-sm-bold-line-height-rem);
|
|
105
|
+
overflow: hidden;
|
|
106
|
+
text-overflow: ellipsis;
|
|
107
|
+
white-space: nowrap;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
@container banner (min-width: 720px) {
|
|
111
|
+
.banner--large .banner__subtitle {
|
|
112
|
+
font-size: var(--neo-type-title-md-bold-size-rem);
|
|
113
|
+
line-height: var(--neo-type-title-md-bold-line-height-rem);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.banner__description {
|
|
118
|
+
margin: 0;
|
|
119
|
+
color: var(--text--base--default);
|
|
120
|
+
font-size: var(--neo-type-body-md-regular-size-rem);
|
|
121
|
+
font-weight: var(--neo-type-body-md-regular-weight);
|
|
122
|
+
line-height: var(--neo-type-body-md-regular-line-height-rem);
|
|
123
|
+
display: -webkit-box;
|
|
124
|
+
-webkit-box-orient: vertical;
|
|
125
|
+
-webkit-line-clamp: 3;
|
|
126
|
+
overflow: hidden;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
@container banner (min-width: 720px) {
|
|
130
|
+
.banner--large .banner__description {
|
|
131
|
+
font-size: var(--neo-type-body-lg-regular-size-rem);
|
|
132
|
+
line-height: var(--neo-type-body-lg-regular-line-height-rem);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.banner__actions {
|
|
137
|
+
display: flex;
|
|
138
|
+
gap: var(--neo-space-md-rem);
|
|
139
|
+
padding-top: var(--neo-space-sm-rem);
|
|
140
|
+
align-items: center;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.banner--large .banner__actions { align-self: stretch; }
|
|
144
|
+
.banner--medium.banner--full-photo .banner__actions { align-self: stretch; }
|
|
145
|
+
|
|
146
|
+
.banner--full-photo.banner--large .banner__actions,
|
|
147
|
+
.banner--full-photo.banner--medium .banner__actions { display: grid; }
|
|
148
|
+
|
|
149
|
+
.banner--full-photo.banner--large .banner__actions > :not(button):not(a),
|
|
150
|
+
.banner--full-photo.banner--medium .banner__actions > :not(button):not(a) { display: contents; }
|
|
151
|
+
|
|
152
|
+
.banner__media { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
|
|
153
|
+
.banner__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
|
|
154
|
+
|
|
155
|
+
.banner--small { grid-template-columns: 1fr 108px; }
|
|
156
|
+
.banner--small .banner__media { order: 1; }
|
|
157
|
+
.banner--small .banner__content {
|
|
158
|
+
padding: var(--neo-space-lg-rem) var(--neo-space-md-rem);
|
|
159
|
+
}
|
|
160
|
+
.banner--small.banner--image-left { grid-template-columns: 108px 1fr; }
|
|
161
|
+
.banner--small.banner--image-left .banner__media { order: -1; }
|
|
162
|
+
|
|
163
|
+
@container banner (min-width: 720px) {
|
|
164
|
+
.banner__content { padding: var(--neo-space-2xl-rem); }
|
|
165
|
+
.banner--small { grid-template-columns: 1fr 280px; }
|
|
166
|
+
.banner--small .banner__content {
|
|
167
|
+
padding: var(--neo-space-lg-rem) var(--neo-space-2xl-rem);
|
|
168
|
+
flex-direction: row;
|
|
169
|
+
align-items: center;
|
|
170
|
+
justify-content: flex-end;
|
|
171
|
+
gap: var(--neo-space-xl-rem);
|
|
172
|
+
}
|
|
173
|
+
.banner--large.banner--full-photo .banner__actions,
|
|
174
|
+
.banner--medium.banner--full-photo .banner__actions { align-self: flex-start; }
|
|
175
|
+
.banner--full-photo.banner--large .banner__actions,
|
|
176
|
+
.banner--full-photo.banner--medium .banner__actions { display: flex; }
|
|
177
|
+
.banner--full-photo.banner--large .banner__actions > :not(button):not(a),
|
|
178
|
+
.banner--full-photo.banner--medium .banner__actions > :not(button):not(a) { display: block; }
|
|
179
|
+
.banner--small .banner__title,
|
|
180
|
+
.banner--small .banner__subtitle,
|
|
181
|
+
.banner--small .banner__description { align-self: auto; }
|
|
182
|
+
.banner--small .banner__description { flex: 1; min-height: 0; }
|
|
183
|
+
.banner--small .banner__actions { flex: none; align-self: auto; }
|
|
184
|
+
.banner--small.banner--image-left { grid-template-columns: 280px 1fr; }
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.banner--full-photo .banner__media {
|
|
188
|
+
position: absolute;
|
|
189
|
+
inset: 0;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.banner--full-photo .banner__media::after {
|
|
193
|
+
content: "";
|
|
194
|
+
position: absolute;
|
|
195
|
+
inset: 0;
|
|
196
|
+
background: linear-gradient(90deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.banner--full-photo .banner__content { position: relative; z-index: 1; }
|
|
200
|
+
|
|
201
|
+
.banner--full-photo:not(.banner--small) .banner__content { padding-bottom: var(--neo-space-2xl-rem); }
|
|
202
|
+
.banner--large.banner--full-photo .banner__content { justify-content: flex-start; }
|
|
203
|
+
.banner--full-photo:not(.banner--small) { grid-template-rows: minmax(0, 1fr); }
|
|
204
|
+
.banner--large.banner--full-photo .banner__content,
|
|
205
|
+
.banner--medium.banner--full-photo .banner__content { justify-content: flex-start; }
|
|
206
|
+
.banner--large.banner--full-photo .banner__actions,
|
|
207
|
+
.banner--medium.banner--full-photo .banner__actions { margin-top: auto; }
|
|
208
|
+
.banner--large.banner--full-photo .banner__actions { align-items: flex-end; }
|
|
209
|
+
.banner--full-photo .banner__title,
|
|
210
|
+
.banner--full-photo .banner__subtitle,
|
|
211
|
+
.banner--full-photo .banner__description { color: var(--text--base--contrast); }
|
|
212
|
+
|
|
213
|
+
@container banner (min-width: 720px) {
|
|
214
|
+
.banner--large.banner--full-photo .banner__content,
|
|
215
|
+
.banner--large.banner--full-photo .banner__content,
|
|
216
|
+
.banner--medium.banner--full-photo .banner__content { justify-content: center; }
|
|
217
|
+
.banner--large.banner--full-photo .banner__actions,
|
|
218
|
+
.banner--medium.banner--full-photo .banner__actions { margin-top: 0; }
|
|
219
|
+
.banner--large.banner--full-photo .banner__actions { align-items: center; }
|
|
220
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* packages/foundations/css/button-icon.css — emitted without comments. The reasoning behind each decision lives in Neo's source repository. */
|
|
2
|
+
|
|
3
|
+
.btn--icon-only.btn--large { padding: 0; width: var(--neo-button-height-lg-rem); height: var(--neo-button-height-lg-rem); }
|
|
4
|
+
.btn--icon-only.btn--medium { padding: 0; width: var(--neo-button-height-md-rem); height: var(--neo-button-height-md-rem); }
|
|
5
|
+
.btn--icon-only.btn--small { padding: 0; width: var(--neo-button-height-sm-rem); height: var(--neo-button-height-sm-rem); }
|
|
6
|
+
|
|
7
|
+
.btn--icon-only svg.icon--xs { width: var(--neo-icon-size-xs-rem); height: var(--neo-icon-size-xs-rem); }
|
|
8
|
+
.btn--icon-only svg.icon--sm { width: var(--neo-icon-size-sm-rem); height: var(--neo-icon-size-sm-rem); }
|
|
9
|
+
.btn--icon-only svg.icon--md { width: var(--neo-icon-size-md-rem); height: var(--neo-icon-size-md-rem); }
|
|
10
|
+
.btn--icon-only svg.icon--lg { width: var(--neo-icon-size-lg-rem); height: var(--neo-icon-size-lg-rem); }
|
|
11
|
+
.btn--icon-only svg.icon--xl { width: var(--neo-icon-size-xl-rem); height: var(--neo-icon-size-xl-rem); }
|
|
12
|
+
.btn--icon-only svg.icon--2xl { width: var(--neo-icon-size-2xl-rem); height: var(--neo-icon-size-2xl-rem); }
|
|
13
|
+
.btn--icon-only svg.icon--3xl { width: var(--neo-icon-size-3xl-rem); height: var(--neo-icon-size-3xl-rem); }
|
|
14
|
+
.btn--icon-only svg.icon--4xl { width: var(--neo-icon-size-4xl-rem); height: var(--neo-icon-size-4xl-rem); }
|
package/css/button.css
ADDED
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
/* packages/foundations/css/button.css — emitted without comments. The reasoning behind each decision lives in Neo's source repository. */
|
|
2
|
+
|
|
3
|
+
.btn {
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
gap: var(--neo-space-sm-rem);
|
|
8
|
+
white-space: nowrap;
|
|
9
|
+
border-radius: var(--neo-radius-pill);
|
|
10
|
+
cursor: pointer;
|
|
11
|
+
font-weight: var(--neo-type-body-lg-medium-weight);
|
|
12
|
+
white-space: nowrap;
|
|
13
|
+
transition: background 100ms ease, color 100ms ease, border-color 100ms ease, box-shadow 100ms ease;
|
|
14
|
+
text-decoration: none;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.btn:focus-visible {
|
|
18
|
+
outline: var(--neo-stroke-focus-ring-width) solid var(--focus--ring--default);
|
|
19
|
+
outline-offset: 0.125rem;
|
|
20
|
+
box-shadow: 0 0 0 var(--neo-stroke-focus-ring-width) var(--focus--gap--default);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.btn--inverse:focus-visible {
|
|
24
|
+
outline-color: var(--focus--ring--inverse);
|
|
25
|
+
box-shadow: 0 0 0 var(--neo-stroke-focus-ring-width) var(--focus--gap--inverse);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.btn[disabled],
|
|
29
|
+
.btn--disabled {
|
|
30
|
+
cursor: not-allowed;
|
|
31
|
+
pointer-events: none;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.btn svg {
|
|
35
|
+
flex-shrink: 0;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.btn--large {
|
|
39
|
+
padding-inline: var(--neo-space-xl-rem);
|
|
40
|
+
padding-block: var(--neo-space-sm-rem);
|
|
41
|
+
font-size: var(--neo-type-title-sm-medium-size-rem);
|
|
42
|
+
line-height: var(--neo-type-title-sm-medium-line-height-rem);
|
|
43
|
+
min-height: var(--neo-button-height-lg-rem);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.btn--medium {
|
|
47
|
+
padding-inline: var(--neo-space-lg-rem);
|
|
48
|
+
padding-block: var(--neo-space-sm-rem);
|
|
49
|
+
font-size: var(--neo-type-body-lg-medium-size-rem);
|
|
50
|
+
line-height: var(--neo-type-body-lg-medium-line-height-rem);
|
|
51
|
+
min-height: var(--neo-button-height-md-rem);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.btn--small {
|
|
55
|
+
padding-inline: var(--neo-space-md-rem);
|
|
56
|
+
padding-block: var(--neo-space-xs-rem);
|
|
57
|
+
font-size: var(--neo-type-body-md-medium-size-rem);
|
|
58
|
+
font-weight: var(--neo-type-body-md-medium-weight);
|
|
59
|
+
line-height: var(--neo-type-body-md-medium-line-height-rem);
|
|
60
|
+
min-height: var(--neo-button-height-sm-rem);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.btn--large svg { width: var(--neo-icon-size-md-rem); height: var(--neo-icon-size-md-rem); }
|
|
64
|
+
.btn--medium svg { width: var(--neo-icon-size-sm-rem); height: var(--neo-icon-size-sm-rem); }
|
|
65
|
+
.btn--small svg { width: var(--neo-icon-size-xs-rem); height: var(--neo-icon-size-xs-rem); }
|
|
66
|
+
|
|
67
|
+
.btn--primary {
|
|
68
|
+
background: var(--fill--primary--default);
|
|
69
|
+
color: var(--text--base--contrast);
|
|
70
|
+
border-color: transparent;
|
|
71
|
+
}
|
|
72
|
+
.btn--primary:hover { background: var(--fill--primary--hover); }
|
|
73
|
+
.btn--primary:active { background: var(--fill--primary--active); }
|
|
74
|
+
.btn--primary[disabled] {
|
|
75
|
+
background: var(--fill--base--disabled);
|
|
76
|
+
color: var(--text--base--disabled);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.btn--secondary {
|
|
80
|
+
background: var(--fill--secondary--default);
|
|
81
|
+
color: var(--text--base--default);
|
|
82
|
+
border-color: transparent;
|
|
83
|
+
}
|
|
84
|
+
.btn--secondary:hover { background: var(--fill--secondary--hover); }
|
|
85
|
+
.btn--secondary:active { background: var(--fill--secondary--active); }
|
|
86
|
+
.btn--secondary[disabled] {
|
|
87
|
+
color: var(--text--base--disabled);
|
|
88
|
+
border-color: transparent;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.btn--tertiary {
|
|
92
|
+
background: var(--fill--tertiary--default);
|
|
93
|
+
color: var(--text--base--default);
|
|
94
|
+
border-color: transparent;
|
|
95
|
+
}
|
|
96
|
+
.btn--tertiary:hover { background: var(--fill--tertiary--hover); }
|
|
97
|
+
.btn--tertiary:active { background: var(--fill--tertiary--active); }
|
|
98
|
+
.btn--tertiary[disabled] { color: var(--text--base--disabled); }
|
|
99
|
+
|
|
100
|
+
.btn--inverse.btn--primary {
|
|
101
|
+
background: var(--fill--primary--inverse--default);
|
|
102
|
+
color: var(--text--base--default);
|
|
103
|
+
border-color: transparent;
|
|
104
|
+
}
|
|
105
|
+
.btn--inverse.btn--primary:hover { background: var(--fill--primary--inverse--hover); }
|
|
106
|
+
.btn--inverse.btn--primary:active { background: var(--fill--primary--inverse--active); }
|
|
107
|
+
|
|
108
|
+
.btn--inverse.btn--secondary {
|
|
109
|
+
background: var(--fill--secondary--inverse--default);
|
|
110
|
+
color: var(--text--base--contrast);
|
|
111
|
+
box-shadow: inset 0 0 0 var(--neo-stroke-xs) var(--border--base--contrast);
|
|
112
|
+
}
|
|
113
|
+
.btn--inverse.btn--secondary:hover { background: var(--fill--secondary--inverse--hover); }
|
|
114
|
+
.btn--inverse.btn--secondary:active { background: var(--fill--secondary--inverse--active); }
|
|
115
|
+
|
|
116
|
+
.btn--inverse.btn--tertiary {
|
|
117
|
+
background: var(--fill--tertiary--inverse--default);
|
|
118
|
+
color: var(--text--base--contrast);
|
|
119
|
+
border-color: transparent;
|
|
120
|
+
}
|
|
121
|
+
.btn--inverse.btn--tertiary:hover { background: var(--fill--tertiary--inverse--hover); }
|
|
122
|
+
.btn--inverse.btn--tertiary:active { background: var(--fill--tertiary--inverse--active); }
|
|
123
|
+
|
|
124
|
+
.btn--inverse[disabled],
|
|
125
|
+
.btn--inverse.btn--disabled {
|
|
126
|
+
background: var(--fill--base--disabled);
|
|
127
|
+
color: var(--text--base--disabled);
|
|
128
|
+
border-color: transparent;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.btn--brand {
|
|
132
|
+
background: var(--fill--brand--primary--default);
|
|
133
|
+
color: var(--text--base--contrast);
|
|
134
|
+
font-size: var(--neo-type-title-md-bold-size-rem);
|
|
135
|
+
font-weight: var(--neo-type-title-md-bold-weight);
|
|
136
|
+
line-height: var(--neo-type-title-md-bold-line-height-rem);
|
|
137
|
+
}
|
|
138
|
+
.btn--brand:hover { background: var(--fill--brand--primary--hover); }
|
|
139
|
+
.btn--brand:active { background: var(--fill--brand--primary--active); }
|
|
140
|
+
.btn--brand.btn--secondary {
|
|
141
|
+
background: var(--fill--brand--secondary--default);
|
|
142
|
+
color: var(--text--base--brand-strong);
|
|
143
|
+
}
|
|
144
|
+
.btn--brand.btn--secondary:hover { background: var(--fill--brand--secondary--hover); }
|
|
145
|
+
.btn--brand.btn--secondary:active { background: var(--fill--brand--secondary--active); }
|
|
146
|
+
|
|
147
|
+
.btn--brand.btn--tertiary {
|
|
148
|
+
background: var(--fill--brand--tertiary--default);
|
|
149
|
+
color: var(--text--base--brand-strong);
|
|
150
|
+
}
|
|
151
|
+
.btn--brand.btn--tertiary:hover { background: var(--fill--brand--tertiary--hover); }
|
|
152
|
+
.btn--brand.btn--tertiary:active { background: var(--fill--brand--tertiary--active); }
|
|
153
|
+
|
|
154
|
+
.btn--brand[disabled],
|
|
155
|
+
.btn--brand.btn--disabled {
|
|
156
|
+
background: var(--fill--base--disabled);
|
|
157
|
+
color: var(--text--base--disabled);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.btn--primary svg { fill: var(--icon--base--contrast); color: var(--icon--base--contrast); }
|
|
161
|
+
.btn--secondary svg,
|
|
162
|
+
.btn--tertiary svg { fill: var(--icon--base--default); color: var(--icon--base--default); }
|
|
163
|
+
.btn--inverse.btn--primary svg { fill: var(--icon--base--default); color: var(--icon--base--default); }
|
|
164
|
+
.btn--inverse.btn--secondary svg,
|
|
165
|
+
.btn--inverse.btn--tertiary svg { fill: var(--icon--base--contrast); color: var(--icon--base--contrast); }
|
|
166
|
+
.btn--brand svg { fill: var(--icon--base--contrast); color: var(--icon--base--contrast); }
|
|
167
|
+
.btn--brand.btn--secondary svg,
|
|
168
|
+
.btn--brand.btn--tertiary svg { fill: var(--icon--base--brand-strong); color: var(--icon--base--brand-strong); }
|
|
169
|
+
.btn[disabled] svg,
|
|
170
|
+
.btn--disabled svg {
|
|
171
|
+
fill: var(--icon--base--disabled);
|
|
172
|
+
color: var(--icon--base--disabled);
|
|
173
|
+
}
|
|
174
|
+
|