2024-02-12 17:26:08 +02:00
|
|
|
export default {
|
|
|
|
|
name: 'ButtonUnstyled',
|
|
|
|
|
selector: '.button-unstyled',
|
2024-09-25 00:46:58 +03:00
|
|
|
notEditable: true,
|
2025-02-12 15:45:46 +02:00
|
|
|
transparent: true,
|
2024-02-12 17:26:08 +02:00
|
|
|
states: {
|
2024-03-06 17:42:09 +02:00
|
|
|
toggled: '.toggled',
|
2024-02-12 17:26:08 +02:00
|
|
|
disabled: ':disabled',
|
2025-03-22 16:04:16 -04:00
|
|
|
hover: ':is(:hover, :focus-visible):not(:disabled)',
|
2026-01-06 16:22:52 +02:00
|
|
|
focused: ':focus-within:not(:is(:focus-visible))',
|
2024-02-12 17:26:08 +02:00
|
|
|
},
|
2026-01-06 16:22:52 +02:00
|
|
|
validInnerComponents: ['Text', 'Link', 'Icon', 'Badge'],
|
2024-02-12 17:26:08 +02:00
|
|
|
defaultRules: [
|
|
|
|
|
{
|
|
|
|
|
directives: {
|
2026-01-06 16:22:52 +02:00
|
|
|
shadow: [],
|
|
|
|
|
},
|
2024-02-12 17:26:08 +02:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
component: 'Icon',
|
|
|
|
|
parent: {
|
|
|
|
|
component: 'ButtonUnstyled',
|
2026-01-06 16:22:52 +02:00
|
|
|
state: ['hover'],
|
2024-02-12 17:26:08 +02:00
|
|
|
},
|
|
|
|
|
directives: {
|
2026-01-06 16:22:52 +02:00
|
|
|
textColor: '--parent--text',
|
|
|
|
|
},
|
2024-02-12 17:26:08 +02:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
component: 'Icon',
|
|
|
|
|
parent: {
|
|
|
|
|
component: 'ButtonUnstyled',
|
2026-01-06 16:22:52 +02:00
|
|
|
state: ['toggled'],
|
2024-02-12 17:26:08 +02:00
|
|
|
},
|
|
|
|
|
directives: {
|
2026-01-06 16:22:52 +02:00
|
|
|
textColor: '--parent--text',
|
|
|
|
|
},
|
2024-02-12 17:26:08 +02:00
|
|
|
},
|
|
|
|
|
{
|
2024-03-06 17:42:09 +02:00
|
|
|
component: 'Icon',
|
2024-02-12 17:26:08 +02:00
|
|
|
parent: {
|
|
|
|
|
component: 'ButtonUnstyled',
|
2026-01-06 16:22:52 +02:00
|
|
|
state: ['toggled', 'hover'],
|
2024-02-12 17:26:08 +02:00
|
|
|
},
|
|
|
|
|
directives: {
|
2026-01-06 16:22:52 +02:00
|
|
|
textColor: '--parent--text',
|
|
|
|
|
},
|
2024-02-12 17:26:08 +02:00
|
|
|
},
|
|
|
|
|
{
|
2024-03-06 17:42:09 +02:00
|
|
|
component: 'Icon',
|
2024-02-12 17:26:08 +02:00
|
|
|
parent: {
|
|
|
|
|
component: 'ButtonUnstyled',
|
2026-01-06 16:22:52 +02:00
|
|
|
state: ['toggled', 'focused'],
|
2024-02-12 17:26:08 +02:00
|
|
|
},
|
|
|
|
|
directives: {
|
2026-01-06 16:22:52 +02:00
|
|
|
textColor: '--parent--text',
|
|
|
|
|
},
|
2024-02-12 17:26:08 +02:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
component: 'Icon',
|
2024-03-06 17:42:09 +02:00
|
|
|
parent: {
|
|
|
|
|
component: 'ButtonUnstyled',
|
2026-01-06 16:22:52 +02:00
|
|
|
state: ['toggled', 'focused', 'hover'],
|
2024-03-06 17:42:09 +02:00
|
|
|
},
|
|
|
|
|
directives: {
|
2026-01-06 16:22:52 +02:00
|
|
|
textColor: '--parent--text',
|
|
|
|
|
},
|
2024-03-06 17:42:09 +02:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
component: 'Text',
|
2024-02-12 17:26:08 +02:00
|
|
|
parent: {
|
|
|
|
|
component: 'ButtonUnstyled',
|
2026-01-06 16:22:52 +02:00
|
|
|
state: ['disabled'],
|
2024-02-12 17:26:08 +02:00
|
|
|
},
|
|
|
|
|
directives: {
|
|
|
|
|
textOpacity: 0.25,
|
2026-01-06 16:22:52 +02:00
|
|
|
textOpacityMode: 'blend',
|
|
|
|
|
},
|
2024-02-12 17:26:08 +02:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
component: 'Icon',
|
|
|
|
|
parent: {
|
|
|
|
|
component: 'ButtonUnstyled',
|
2026-01-06 16:22:52 +02:00
|
|
|
state: ['disabled'],
|
2024-02-12 17:26:08 +02:00
|
|
|
},
|
|
|
|
|
directives: {
|
|
|
|
|
textOpacity: 0.25,
|
2026-01-06 16:22:52 +02:00
|
|
|
textOpacityMode: 'blend',
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
],
|
2024-02-12 17:26:08 +02:00
|
|
|
}
|