dynamically load .style.js files; move the files closer to related components

This commit is contained in:
Henry Jameson 2024-02-18 18:40:14 +02:00
commit 3e198526e6
12 changed files with 57 additions and 62 deletions

View file

@ -0,0 +1,15 @@
export default {
name: 'Attachment',
selector: '.Attachment',
validInnerComponents: [
'Border',
'ButtonUnstyled'
],
defaultRules: [
{
directives: {
roundness: 3
}
}
]
}

View file

@ -40,7 +40,7 @@ export default {
// normal: '' // normal state is implicitly added, it is always included
toggled: '.toggled',
pressed: ':active',
hover: ':hover',
hover: ':hover:not(:disabled)',
focused: ':focus-within',
disabled: ':disabled'
},

View file

@ -5,7 +5,7 @@ export default {
disabled: ':disabled',
toggled: '.toggled',
pressed: ':active',
hover: ':hover',
hover: ':hover:not(:disabled)',
focused: ':focus-within'
},
validInnerComponents: [

View file

@ -11,7 +11,6 @@
.chat-view-body {
box-sizing: border-box;
background-color: var(--chatBg, $fallback--bg);
display: flex;
flex-direction: column;
width: 100%;
@ -38,8 +37,7 @@
.footer {
position: sticky;
bottom: 0;
background-color: $fallback--bg;
background-color: var(--bg, $fallback--bg);
background-color: var(--background);
z-index: 1;
}
@ -62,8 +60,6 @@
position: absolute;
right: 1.3em;
top: -3.2em;
background-color: $fallback--fg;
background-color: var(--btn, $fallback--fg);
display: flex;
justify-content: center;
align-items: center;
@ -80,12 +76,6 @@
visibility: visible;
}
i {
font-size: 1em;
color: $fallback--text;
color: var(--text, $fallback--text);
}
.unread-message-count {
font-size: 0.8em;
left: 50%;

View file

@ -24,7 +24,7 @@ export default {
selector: '.input',
states: {
disabled: ':disabled',
hover: ':hover',
hover: ':hover:not(:disabled)',
focused: ':focus-within'
},
validInnerComponents: [

View file

@ -10,7 +10,8 @@ export default {
'ButtonUnstyled',
'RichContent',
'Input',
'Avatar'
'Avatar',
'Attachment'
],
defaultRules: [
{

View file

@ -0,0 +1,14 @@
export default {
name: 'PollGraph',
selector: '.poll-graph',
validInnerComponents: [
'Text'
],
defaultRules: [
{
directives: {
background: '--accent'
}
}
]
}

View file

@ -10,7 +10,9 @@ export default {
'ButtonUnstyled',
'RichContent',
'Input',
'Avatar'
'Avatar',
'Attachment',
'PollGraph'
],
defaultRules: [
{