mtrl 0.1.0 → 0.1.3
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/index.js +2 -2
- package/package.json +1 -1
- package/src/components/card/actions.js +51 -0
- package/src/components/card/api.js +102 -0
- package/src/components/card/card.js +102 -0
- package/src/components/card/config.js +16 -0
- package/src/components/card/constants.js +68 -0
- package/src/components/card/content.js +51 -0
- package/src/components/card/features.js +218 -0
- package/src/components/card/header.js +92 -0
- package/src/components/card/index.js +7 -0
- package/src/components/card/media.js +56 -0
- package/src/components/card/styles.scss +287 -0
- package/src/core/layout/index.js +3 -1
- package/src/index.js +1 -0
- package/src/styles/themes/_autumn.scss +81 -0
- package/src/styles/themes/_forest.scss +46 -46
- package/src/styles/themes/_spring.scss +71 -0
- package/src/styles/themes/_summer.scss +82 -0
- package/src/styles/themes/_winter.scss +71 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
// src/components/card/header.js
|
|
2
|
+
import { PREFIX } from '../../core/config'
|
|
3
|
+
import { pipe } from '../../core/compose'
|
|
4
|
+
import { createBase, withElement } from '../../core/compose/component'
|
|
5
|
+
import { withText } from '../../core/compose/features'
|
|
6
|
+
import { createElement } from '../../core/dom/create'
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Creates a card header component
|
|
10
|
+
* @param {Object} config - Header configuration
|
|
11
|
+
* @param {string} [config.title] - Title text
|
|
12
|
+
* @param {string} [config.subtitle] - Subtitle text
|
|
13
|
+
* @param {HTMLElement|string} [config.avatar] - Avatar element or HTML string
|
|
14
|
+
* @param {HTMLElement|string} [config.action] - Action element or HTML string
|
|
15
|
+
* @returns {HTMLElement} Card header element
|
|
16
|
+
*/
|
|
17
|
+
export const createCardHeader = (config = {}) => {
|
|
18
|
+
const baseConfig = {
|
|
19
|
+
...config,
|
|
20
|
+
componentName: 'card-header',
|
|
21
|
+
prefix: PREFIX
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
try {
|
|
25
|
+
const header = pipe(
|
|
26
|
+
createBase,
|
|
27
|
+
withElement({
|
|
28
|
+
tag: 'div',
|
|
29
|
+
componentName: 'card-header',
|
|
30
|
+
className: config.class
|
|
31
|
+
})
|
|
32
|
+
)(baseConfig)
|
|
33
|
+
|
|
34
|
+
// Create text container
|
|
35
|
+
const textContainer = createElement({
|
|
36
|
+
tag: 'div',
|
|
37
|
+
className: `${PREFIX}-card-header-text`,
|
|
38
|
+
container: header.element
|
|
39
|
+
})
|
|
40
|
+
|
|
41
|
+
// Add title if provided
|
|
42
|
+
if (config.title) {
|
|
43
|
+
createElement({
|
|
44
|
+
tag: 'h3',
|
|
45
|
+
className: `${PREFIX}-card-header-title`,
|
|
46
|
+
text: config.title,
|
|
47
|
+
container: textContainer
|
|
48
|
+
})
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Add subtitle if provided
|
|
52
|
+
if (config.subtitle) {
|
|
53
|
+
createElement({
|
|
54
|
+
tag: 'h4',
|
|
55
|
+
className: `${PREFIX}-card-header-subtitle`,
|
|
56
|
+
text: config.subtitle,
|
|
57
|
+
container: textContainer
|
|
58
|
+
})
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Add avatar if provided
|
|
62
|
+
if (config.avatar) {
|
|
63
|
+
const avatarElement = typeof config.avatar === 'string'
|
|
64
|
+
? createElement({
|
|
65
|
+
tag: 'div',
|
|
66
|
+
className: `${PREFIX}-card-header-avatar`,
|
|
67
|
+
html: config.avatar
|
|
68
|
+
})
|
|
69
|
+
: config.avatar
|
|
70
|
+
|
|
71
|
+
header.element.insertBefore(avatarElement, header.element.firstChild)
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// Add action if provided
|
|
75
|
+
if (config.action) {
|
|
76
|
+
const actionElement = typeof config.action === 'string'
|
|
77
|
+
? createElement({
|
|
78
|
+
tag: 'div',
|
|
79
|
+
className: `${PREFIX}-card-header-action`,
|
|
80
|
+
html: config.action
|
|
81
|
+
})
|
|
82
|
+
: config.action
|
|
83
|
+
|
|
84
|
+
header.element.appendChild(actionElement)
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
return header.element
|
|
88
|
+
} catch (error) {
|
|
89
|
+
console.error('Card header creation error:', error)
|
|
90
|
+
throw new Error(`Failed to create card header: ${error.message}`)
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// src/components/card/index.js
|
|
2
|
+
export { default } from './card.js'
|
|
3
|
+
export { createCardContent } from './content.js'
|
|
4
|
+
export { createCardHeader } from './header.js'
|
|
5
|
+
export { createCardActions } from './actions.js'
|
|
6
|
+
export { createCardMedia } from './media.js'
|
|
7
|
+
export { CARD_VARIANTS, CARD_ELEVATIONS } from './constants.js'
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
// src/components/card/media.js
|
|
2
|
+
import { PREFIX } from '../../core/config'
|
|
3
|
+
import { pipe } from '../../core/compose'
|
|
4
|
+
import { createBase, withElement } from '../../core/compose/component'
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Creates a card media component
|
|
8
|
+
* @param {Object} config - Media configuration
|
|
9
|
+
* @param {string} [config.src] - Image source URL
|
|
10
|
+
* @param {string} [config.alt] - Image alt text
|
|
11
|
+
* @param {HTMLElement} [config.element] - Custom media element
|
|
12
|
+
* @param {string} [config.aspectRatio='16:9'] - Media aspect ratio
|
|
13
|
+
* @param {boolean} [config.contain=false] - Whether to use object-fit: contain
|
|
14
|
+
* @returns {HTMLElement} Card media element
|
|
15
|
+
*/
|
|
16
|
+
export const createCardMedia = (config = {}) => {
|
|
17
|
+
const baseConfig = {
|
|
18
|
+
...config,
|
|
19
|
+
componentName: 'card-media',
|
|
20
|
+
prefix: PREFIX
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
try {
|
|
24
|
+
const media = pipe(
|
|
25
|
+
createBase,
|
|
26
|
+
withElement({
|
|
27
|
+
tag: 'div',
|
|
28
|
+
componentName: 'card-media',
|
|
29
|
+
className: [
|
|
30
|
+
config.class,
|
|
31
|
+
config.aspectRatio ? `${PREFIX}-card-media--${config.aspectRatio.replace(':', '-')}` : null,
|
|
32
|
+
config.contain ? `${PREFIX}-card-media--contain` : null
|
|
33
|
+
]
|
|
34
|
+
})
|
|
35
|
+
)(baseConfig)
|
|
36
|
+
|
|
37
|
+
// If custom element is provided, use it
|
|
38
|
+
if (config.element instanceof HTMLElement) {
|
|
39
|
+
media.element.appendChild(config.element)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// Otherwise create an image if src is provided
|
|
43
|
+
else if (config.src) {
|
|
44
|
+
const img = document.createElement('img')
|
|
45
|
+
img.src = config.src
|
|
46
|
+
if (config.alt) img.alt = config.alt
|
|
47
|
+
img.className = `${PREFIX}-card-media-img`
|
|
48
|
+
media.element.appendChild(img)
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return media.element
|
|
52
|
+
} catch (error) {
|
|
53
|
+
console.error('Card media creation error:', error)
|
|
54
|
+
throw new Error(`Failed to create card media: ${error.message}`)
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
// src/components/card/styles.scss
|
|
2
|
+
@use '../../styles/abstract/base' as base;
|
|
3
|
+
@use '../../styles/abstract/variables' as v;
|
|
4
|
+
@use '../../styles/abstract/functions' as f;
|
|
5
|
+
@use '../../styles/abstract/mixins' as m;
|
|
6
|
+
@use '../../styles/abstract/theme' as t;
|
|
7
|
+
|
|
8
|
+
$component: '#{base.$prefix}-card';
|
|
9
|
+
|
|
10
|
+
.#{$component} {
|
|
11
|
+
// Base styles
|
|
12
|
+
position: relative;
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
border-radius: v.shape('medium');
|
|
17
|
+
background-color: t.color('surface');
|
|
18
|
+
color: t.color('on-surface');
|
|
19
|
+
overflow: hidden;
|
|
20
|
+
// width: v.card('width');
|
|
21
|
+
width: 340px;
|
|
22
|
+
--card-elevation: m.elevation(2);
|
|
23
|
+
|
|
24
|
+
// Typography
|
|
25
|
+
@include m.typography('body-medium');
|
|
26
|
+
|
|
27
|
+
// Transition for elevation and hover states
|
|
28
|
+
@include m.motion-transition(
|
|
29
|
+
box-shadow,
|
|
30
|
+
background-color,
|
|
31
|
+
border-color
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
// Ripple styles for clickable cards
|
|
35
|
+
.ripple {
|
|
36
|
+
position: absolute;
|
|
37
|
+
border-radius: 50%;
|
|
38
|
+
transform: scale(0);
|
|
39
|
+
pointer-events: none;
|
|
40
|
+
background-color: currentColor;
|
|
41
|
+
opacity: 0.08;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Ensure proper stacking for inner components
|
|
45
|
+
> :not(:last-child) {
|
|
46
|
+
margin-bottom: 0;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// === Variants ===
|
|
50
|
+
|
|
51
|
+
// Elevated variant
|
|
52
|
+
&--elevated {
|
|
53
|
+
// @include m.elevation(m.elevation(2));
|
|
54
|
+
|
|
55
|
+
&:hover {
|
|
56
|
+
--card-elevation: 2;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Filled variant
|
|
61
|
+
&--filled {
|
|
62
|
+
background-color: t.color('surface-container-highest');
|
|
63
|
+
|
|
64
|
+
&:hover.#{$component}--interactive {
|
|
65
|
+
@include m.state-layer(t.color('on-surface'), 'hover');
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// Outlined variant
|
|
70
|
+
&--outlined {
|
|
71
|
+
border: 1px solid t.color('outline');
|
|
72
|
+
background-color: t.color('surface');
|
|
73
|
+
|
|
74
|
+
&:hover.#{$component}--interactive {
|
|
75
|
+
@include m.state-layer(t.color('on-surface'), 'hover');
|
|
76
|
+
border-color: t.color('outline-variant');
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// === Modifiers ===
|
|
81
|
+
|
|
82
|
+
// Interactive cards
|
|
83
|
+
&--interactive {
|
|
84
|
+
cursor: pointer;
|
|
85
|
+
user-select: none;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// Full-width cards
|
|
89
|
+
&--full-width {
|
|
90
|
+
width: 100%;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// === Sub-components ===
|
|
94
|
+
|
|
95
|
+
// Card Header
|
|
96
|
+
&-header {
|
|
97
|
+
display: flex;
|
|
98
|
+
align-items: center;
|
|
99
|
+
padding: 16px;
|
|
100
|
+
|
|
101
|
+
&-avatar {
|
|
102
|
+
margin-right: 16px;
|
|
103
|
+
flex-shrink: 0;
|
|
104
|
+
display: flex;
|
|
105
|
+
align-items: center;
|
|
106
|
+
justify-content: center;
|
|
107
|
+
|
|
108
|
+
img {
|
|
109
|
+
width: 40px;
|
|
110
|
+
height: 40px;
|
|
111
|
+
border-radius: 50%;
|
|
112
|
+
object-fit: cover;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
&-text {
|
|
117
|
+
flex: 1;
|
|
118
|
+
overflow: hidden;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
&-title {
|
|
122
|
+
margin: 0;
|
|
123
|
+
@include m.typography('title-medium');
|
|
124
|
+
@include m.truncate;
|
|
125
|
+
color: t.color('on-surface');
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
&-subtitle {
|
|
129
|
+
margin: 0;
|
|
130
|
+
@include m.typography('body-medium');
|
|
131
|
+
@include m.truncate;
|
|
132
|
+
color: t.color('on-surface-variant');
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
&-action {
|
|
136
|
+
margin-left: 8px;
|
|
137
|
+
flex-shrink: 0;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
// Card Media
|
|
142
|
+
&-media {
|
|
143
|
+
position: relative;
|
|
144
|
+
overflow: hidden;
|
|
145
|
+
|
|
146
|
+
&-img {
|
|
147
|
+
display: block;
|
|
148
|
+
width: 100%;
|
|
149
|
+
object-fit: cover;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
// Aspect ratios
|
|
153
|
+
&--16-9 {
|
|
154
|
+
aspect-ratio: 16 / 9;
|
|
155
|
+
|
|
156
|
+
img {
|
|
157
|
+
height: 100%;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
&--4-3 {
|
|
162
|
+
aspect-ratio: 4 / 3;
|
|
163
|
+
|
|
164
|
+
img {
|
|
165
|
+
height: 100%;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
&--1-1 {
|
|
170
|
+
aspect-ratio: 1 / 1;
|
|
171
|
+
|
|
172
|
+
img {
|
|
173
|
+
height: 100%;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
&--contain {
|
|
178
|
+
img {
|
|
179
|
+
object-fit: contain;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// Card Content
|
|
185
|
+
&-content {
|
|
186
|
+
padding: 16px;
|
|
187
|
+
flex: 1 1 auto;
|
|
188
|
+
|
|
189
|
+
> *:first-child {
|
|
190
|
+
margin-top: 0;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
> *:last-child {
|
|
194
|
+
margin-bottom: 0;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
// When content follows media without padding
|
|
198
|
+
.#{$component}-media + &:not(.#{$component}-content--no-padding) {
|
|
199
|
+
padding-top: 16px;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
// No padding modifier
|
|
203
|
+
&--no-padding {
|
|
204
|
+
padding: 0;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
// Card Actions
|
|
209
|
+
&-actions {
|
|
210
|
+
display: flex;
|
|
211
|
+
flex-wrap: wrap;
|
|
212
|
+
padding: 8px;
|
|
213
|
+
align-items: center;
|
|
214
|
+
|
|
215
|
+
> * {
|
|
216
|
+
margin: 0 4px;
|
|
217
|
+
|
|
218
|
+
&:first-child {
|
|
219
|
+
margin-left: 8px;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
&:last-child {
|
|
223
|
+
margin-right: 8px;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
// Full-bleed actions
|
|
228
|
+
&--full-bleed {
|
|
229
|
+
padding: 0;
|
|
230
|
+
|
|
231
|
+
> * {
|
|
232
|
+
margin: 0;
|
|
233
|
+
border-radius: 0;
|
|
234
|
+
flex: 1 1 auto;
|
|
235
|
+
|
|
236
|
+
&:first-child {
|
|
237
|
+
margin-left: 0;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
&:last-child {
|
|
241
|
+
margin-right: 0;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
// Vertical actions
|
|
247
|
+
&--vertical {
|
|
248
|
+
flex-direction: column;
|
|
249
|
+
|
|
250
|
+
> * {
|
|
251
|
+
width: 100%;
|
|
252
|
+
margin: 4px 0;
|
|
253
|
+
|
|
254
|
+
&:first-child {
|
|
255
|
+
margin-top: 8px;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
&:last-child {
|
|
259
|
+
margin-bottom: 8px;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
// Alignment variations
|
|
265
|
+
&--center {
|
|
266
|
+
justify-content: center;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
&--end {
|
|
270
|
+
justify-content: flex-end;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
&--space-between {
|
|
274
|
+
justify-content: space-between;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
// State classes
|
|
279
|
+
&--state-disabled {
|
|
280
|
+
opacity: 0.38;
|
|
281
|
+
pointer-events: none;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
&--state-loading {
|
|
285
|
+
pointer-events: none;
|
|
286
|
+
}
|
|
287
|
+
}
|
package/src/core/layout/index.js
CHANGED
|
@@ -41,7 +41,9 @@ const createLayout = (schema, container, structure = {}, level = 0, components =
|
|
|
41
41
|
options = schema[i + 2]
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
if (
|
|
44
|
+
if (options.id) {
|
|
45
|
+
name = options.id
|
|
46
|
+
} else if (typeof schema[i + 1] === 'string') {
|
|
45
47
|
name = schema[i + 1]
|
|
46
48
|
if (!schema[i].isElement && !schema[i].isComponent) {
|
|
47
49
|
options.name = name
|
package/src/index.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
export { createElement } from './core/dom/create'
|
|
3
3
|
export { default as createLayout } from './core/layout'
|
|
4
4
|
export { default as createButton } from './components/button'
|
|
5
|
+
export { default as createCard } from './components/card'
|
|
5
6
|
export { default as createCheckbox } from './components/checkbox'
|
|
6
7
|
export { default as createContainer } from './components/container'
|
|
7
8
|
export { default as createMenu } from './components/menu'
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
// src/styles/themes/_autumn.scss
|
|
2
|
+
@use '../abstract/base' as *;
|
|
3
|
+
@use 'base-theme' as *;
|
|
4
|
+
|
|
5
|
+
@include create-theme('autumn') {
|
|
6
|
+
// Key colors with brown as primary and red as secondary
|
|
7
|
+
--#{$prefix}-sys-color-primary: #795548; // Rich brown as primary color
|
|
8
|
+
--#{$prefix}-sys-color-on-primary: #FFFFFF;
|
|
9
|
+
--#{$prefix}-sys-color-primary-container: #FFDCC7;
|
|
10
|
+
--#{$prefix}-sys-color-on-primary-container: #2C1500;
|
|
11
|
+
|
|
12
|
+
--#{$prefix}-sys-color-secondary: #A02A2A; // Autumn red as secondary
|
|
13
|
+
--#{$prefix}-sys-color-on-secondary: #FFFFFF;
|
|
14
|
+
--#{$prefix}-sys-color-secondary-container: #FFDAD4;
|
|
15
|
+
--#{$prefix}-sys-color-on-secondary-container: #410001;
|
|
16
|
+
|
|
17
|
+
--#{$prefix}-sys-color-tertiary: #4D6642; // Dark green like evergreen trees
|
|
18
|
+
--#{$prefix}-sys-color-on-tertiary: #FFFFFF;
|
|
19
|
+
--#{$prefix}-sys-color-tertiary-container: #CFE9BE;
|
|
20
|
+
--#{$prefix}-sys-color-on-tertiary-container: #0A2008;
|
|
21
|
+
|
|
22
|
+
--#{$prefix}-sys-color-quaternary: #8B6500; // Golden yellow like autumn leaves
|
|
23
|
+
--#{$prefix}-sys-color-on-quaternary: #FFFFFF;
|
|
24
|
+
--#{$prefix}-sys-color-quaternary-container: #FFDF8A;
|
|
25
|
+
--#{$prefix}-sys-color-on-quaternary-container: #2C1F00;
|
|
26
|
+
|
|
27
|
+
// Neutral colors with warm, earthy undertones
|
|
28
|
+
--#{$prefix}-sys-color-surface: #FFFBF7;
|
|
29
|
+
--#{$prefix}-sys-color-surface-dim: #EAD7CE;
|
|
30
|
+
--#{$prefix}-sys-color-surface-bright: #FFFBF7;
|
|
31
|
+
--#{$prefix}-sys-color-surface-container-lowest: #FFFFFF;
|
|
32
|
+
--#{$prefix}-sys-color-surface-container-low: #FFF0EA;
|
|
33
|
+
--#{$prefix}-sys-color-surface-container: #F5E1D7;
|
|
34
|
+
--#{$prefix}-sys-color-surface-container-high: #EFDBD1;
|
|
35
|
+
--#{$prefix}-sys-color-surface-container-highest: #E9D5CB;
|
|
36
|
+
|
|
37
|
+
--#{$prefix}-sys-color-on-surface: #201A17;
|
|
38
|
+
--#{$prefix}-sys-color-on-surface-variant: #53433C;
|
|
39
|
+
|
|
40
|
+
--#{$prefix}-sys-color-outline: #85736C;
|
|
41
|
+
--#{$prefix}-sys-color-outline-variant: #D7C1BA;
|
|
42
|
+
|
|
43
|
+
&[data-theme-mode="dark"] {
|
|
44
|
+
// Key colors
|
|
45
|
+
--#{$prefix}-sys-color-primary: #DDB995; // Softer brown
|
|
46
|
+
--#{$prefix}-sys-color-on-primary: #422B09;
|
|
47
|
+
--#{$prefix}-sys-color-primary-container: #5D3F1C;
|
|
48
|
+
--#{$prefix}-sys-color-on-primary-container: #FFDCC7;
|
|
49
|
+
|
|
50
|
+
--#{$prefix}-sys-color-secondary: #FFB4AB; // Vibrant red
|
|
51
|
+
--#{$prefix}-sys-color-on-secondary: #690004;
|
|
52
|
+
--#{$prefix}-sys-color-secondary-container: #93000A;
|
|
53
|
+
--#{$prefix}-sys-color-on-secondary-container: #FFDAD4;
|
|
54
|
+
|
|
55
|
+
--#{$prefix}-sys-color-tertiary: #B4CCA4; // Muted green
|
|
56
|
+
--#{$prefix}-sys-color-on-tertiary: #213515;
|
|
57
|
+
--#{$prefix}-sys-color-tertiary-container: #384F2B;
|
|
58
|
+
--#{$prefix}-sys-color-on-tertiary-container: #CFE9BE;
|
|
59
|
+
|
|
60
|
+
--#{$prefix}-sys-color-quaternary: #FFC147;
|
|
61
|
+
--#{$prefix}-sys-color-on-quaternary: #463300;
|
|
62
|
+
--#{$prefix}-sys-color-quaternary-container: #644900;
|
|
63
|
+
--#{$prefix}-sys-color-on-quaternary-container: #FFDF8A;
|
|
64
|
+
|
|
65
|
+
// Neutral colors
|
|
66
|
+
--#{$prefix}-sys-color-surface: #201A17;
|
|
67
|
+
--#{$prefix}-sys-color-surface-dim: #17120F;
|
|
68
|
+
--#{$prefix}-sys-color-surface-bright: #3D3631;
|
|
69
|
+
--#{$prefix}-sys-color-surface-container-lowest: #130E0B;
|
|
70
|
+
--#{$prefix}-sys-color-surface-container-low: #201A17;
|
|
71
|
+
--#{$prefix}-sys-color-surface-container: #241E1A;
|
|
72
|
+
--#{$prefix}-sys-color-surface-container-high: #2E2723;
|
|
73
|
+
--#{$prefix}-sys-color-surface-container-highest: #39322D;
|
|
74
|
+
|
|
75
|
+
--#{$prefix}-sys-color-on-surface: #EDE0D9;
|
|
76
|
+
--#{$prefix}-sys-color-on-surface-variant: #D7C1BA;
|
|
77
|
+
|
|
78
|
+
--#{$prefix}-sys-color-outline: #A08C85;
|
|
79
|
+
--#{$prefix}-sys-color-outline-variant: #53433C;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
@@ -3,69 +3,69 @@
|
|
|
3
3
|
@use 'base-theme' as *;
|
|
4
4
|
|
|
5
5
|
@include create-theme('forest') {
|
|
6
|
-
// Key colors generated from seed color #
|
|
7
|
-
--#{$prefix}-sys-color-primary: #
|
|
6
|
+
// Key colors generated from seed color #4B5D3A (earthy forest green-brown)
|
|
7
|
+
--#{$prefix}-sys-color-primary: #3F4F2F;
|
|
8
8
|
--#{$prefix}-sys-color-on-primary: #FFFFFF;
|
|
9
|
-
--#{$prefix}-sys-color-primary-container: #
|
|
10
|
-
--#{$prefix}-sys-color-on-primary-container: #
|
|
9
|
+
--#{$prefix}-sys-color-primary-container: #C1D1A8;
|
|
10
|
+
--#{$prefix}-sys-color-on-primary-container: #121D04;
|
|
11
11
|
|
|
12
|
-
--#{$prefix}-sys-color-secondary: #
|
|
12
|
+
--#{$prefix}-sys-color-secondary: #5D5242;
|
|
13
13
|
--#{$prefix}-sys-color-on-secondary: #FFFFFF;
|
|
14
|
-
--#{$prefix}-sys-color-secondary-container: #
|
|
15
|
-
--#{$prefix}-sys-color-on-secondary-container: #
|
|
14
|
+
--#{$prefix}-sys-color-secondary-container: #E1D6C4;
|
|
15
|
+
--#{$prefix}-sys-color-on-secondary-container: #201A10;
|
|
16
16
|
|
|
17
|
-
--#{$prefix}-sys-color-tertiary: #
|
|
17
|
+
--#{$prefix}-sys-color-tertiary: #486446;
|
|
18
18
|
--#{$prefix}-sys-color-on-tertiary: #FFFFFF;
|
|
19
|
-
--#{$prefix}-sys-color-tertiary-container: #
|
|
20
|
-
--#{$prefix}-sys-color-on-tertiary-container: #
|
|
19
|
+
--#{$prefix}-sys-color-tertiary-container: #CAE7C3;
|
|
20
|
+
--#{$prefix}-sys-color-on-tertiary-container: #0A2010;
|
|
21
21
|
|
|
22
|
-
// Neutral colors
|
|
23
|
-
--#{$prefix}-sys-color-surface: #
|
|
24
|
-
--#{$prefix}-sys-color-surface-dim: #
|
|
25
|
-
--#{$prefix}-sys-color-surface-bright: #
|
|
22
|
+
// Neutral colors with earthy undertones
|
|
23
|
+
--#{$prefix}-sys-color-surface: #FAF9F2;
|
|
24
|
+
--#{$prefix}-sys-color-surface-dim: #E0DFD5;
|
|
25
|
+
--#{$prefix}-sys-color-surface-bright: #FAF9F2;
|
|
26
26
|
--#{$prefix}-sys-color-surface-container-lowest: #FFFFFF;
|
|
27
|
-
--#{$prefix}-sys-color-surface-container-low: #
|
|
28
|
-
--#{$prefix}-sys-color-surface-container: #
|
|
29
|
-
--#{$prefix}-sys-color-surface-container-high: #
|
|
30
|
-
--#{$prefix}-sys-color-surface-container-highest: #
|
|
27
|
+
--#{$prefix}-sys-color-surface-container-low: #F4F3EC;
|
|
28
|
+
--#{$prefix}-sys-color-surface-container: #EEEDDE;
|
|
29
|
+
--#{$prefix}-sys-color-surface-container-high: #E8E7D8;
|
|
30
|
+
--#{$prefix}-sys-color-surface-container-highest: #E2E1D2;
|
|
31
31
|
|
|
32
|
-
--#{$prefix}-sys-color-on-surface: #
|
|
33
|
-
--#{$prefix}-sys-color-on-surface-variant: #
|
|
32
|
+
--#{$prefix}-sys-color-on-surface: #1B1C17;
|
|
33
|
+
--#{$prefix}-sys-color-on-surface-variant: #464840;
|
|
34
34
|
|
|
35
|
-
--#{$prefix}-sys-color-outline: #
|
|
36
|
-
--#{$prefix}-sys-color-outline-variant: #
|
|
35
|
+
--#{$prefix}-sys-color-outline: #767B6F;
|
|
36
|
+
--#{$prefix}-sys-color-outline-variant: #C9CCB7;
|
|
37
37
|
|
|
38
38
|
&[data-theme-mode="dark"] {
|
|
39
39
|
// Key colors
|
|
40
|
-
--#{$prefix}-sys-color-primary: #
|
|
41
|
-
--#{$prefix}-sys-color-on-primary: #
|
|
42
|
-
--#{$prefix}-sys-color-primary-container: #
|
|
43
|
-
--#{$prefix}-sys-color-on-primary-container: #
|
|
40
|
+
--#{$prefix}-sys-color-primary: #A5B58D;
|
|
41
|
+
--#{$prefix}-sys-color-on-primary: #213516;
|
|
42
|
+
--#{$prefix}-sys-color-primary-container: #324B23;
|
|
43
|
+
--#{$prefix}-sys-color-on-primary-container: #C1D1A8;
|
|
44
44
|
|
|
45
|
-
--#{$prefix}-sys-color-secondary: #
|
|
46
|
-
--#{$prefix}-sys-color-on-secondary: #
|
|
47
|
-
--#{$prefix}-sys-color-secondary-container: #
|
|
48
|
-
--#{$prefix}-sys-color-on-secondary-container: #
|
|
45
|
+
--#{$prefix}-sys-color-secondary: #C5BAAB;
|
|
46
|
+
--#{$prefix}-sys-color-on-secondary: #362F21;
|
|
47
|
+
--#{$prefix}-sys-color-secondary-container: #4A4231;
|
|
48
|
+
--#{$prefix}-sys-color-on-secondary-container: #E1D6C4;
|
|
49
49
|
|
|
50
|
-
--#{$prefix}-sys-color-tertiary: #
|
|
51
|
-
--#{$prefix}-sys-color-on-tertiary: #
|
|
52
|
-
--#{$prefix}-sys-color-tertiary-container: #
|
|
53
|
-
--#{$prefix}-sys-color-on-tertiary-container: #
|
|
50
|
+
--#{$prefix}-sys-color-tertiary: #AECBA8;
|
|
51
|
+
--#{$prefix}-sys-color-on-tertiary: #123623;
|
|
52
|
+
--#{$prefix}-sys-color-tertiary-container: #2C4D34;
|
|
53
|
+
--#{$prefix}-sys-color-on-tertiary-container: #CAE7C3;
|
|
54
54
|
|
|
55
55
|
// Neutral colors
|
|
56
|
-
--#{$prefix}-sys-color-surface: #
|
|
57
|
-
--#{$prefix}-sys-color-surface-dim: #
|
|
58
|
-
--#{$prefix}-sys-color-surface-bright: #
|
|
59
|
-
--#{$prefix}-sys-color-surface-container-lowest: #
|
|
60
|
-
--#{$prefix}-sys-color-surface-container-low: #
|
|
61
|
-
--#{$prefix}-sys-color-surface-container: #
|
|
62
|
-
--#{$prefix}-sys-color-surface-container-high: #
|
|
63
|
-
--#{$prefix}-sys-color-surface-container-highest: #
|
|
56
|
+
--#{$prefix}-sys-color-surface: #1B1C17;
|
|
57
|
+
--#{$prefix}-sys-color-surface-dim: #13140F;
|
|
58
|
+
--#{$prefix}-sys-color-surface-bright: #383932;
|
|
59
|
+
--#{$prefix}-sys-color-surface-container-lowest: #0F100B;
|
|
60
|
+
--#{$prefix}-sys-color-surface-container-low: #1B1C17;
|
|
61
|
+
--#{$prefix}-sys-color-surface-container: #1F201B;
|
|
62
|
+
--#{$prefix}-sys-color-surface-container-high: #292A25;
|
|
63
|
+
--#{$prefix}-sys-color-surface-container-highest: #34352F;
|
|
64
64
|
|
|
65
|
-
--#{$prefix}-sys-color-on-surface: #
|
|
66
|
-
--#{$prefix}-sys-color-on-surface-variant: #
|
|
65
|
+
--#{$prefix}-sys-color-on-surface: #E3E3DC;
|
|
66
|
+
--#{$prefix}-sys-color-on-surface-variant: #C9CCB7;
|
|
67
67
|
|
|
68
|
-
--#{$prefix}-sys-color-outline: #
|
|
69
|
-
--#{$prefix}-sys-color-outline-variant: #
|
|
68
|
+
--#{$prefix}-sys-color-outline: #929688;
|
|
69
|
+
--#{$prefix}-sys-color-outline-variant: #464840;
|
|
70
70
|
}
|
|
71
71
|
}
|