Refactored Steps
parent
18e37ac90e
commit
cd74265a10
|
@ -6,13 +6,13 @@ const classes = {
|
||||||
menuitem: ({ instance, item, index }) => [
|
menuitem: ({ instance, item, index }) => [
|
||||||
'p-steps-item',
|
'p-steps-item',
|
||||||
{
|
{
|
||||||
'p-highlight p-steps-current': instance.isActive(index),
|
'p-steps-item-active': instance.isActive(index),
|
||||||
'p-disabled': instance.isItemDisabled(item, index)
|
'p-disabled': instance.isItemDisabled(item, index)
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
action: 'p-menuitem-link',
|
action: 'p-steps-item-link',
|
||||||
step: 'p-steps-number',
|
step: 'p-steps-item-number',
|
||||||
label: 'p-steps-title'
|
label: 'p-steps-item-label'
|
||||||
};
|
};
|
||||||
|
|
||||||
export default BaseStyle.extend({
|
export default BaseStyle.extend({
|
||||||
|
|
|
@ -4,7 +4,7 @@ export default {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-steps .p-steps-list {
|
.p-steps-list {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
|
@ -47,7 +47,7 @@ export default {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-steps-item .p-menuitem-link {
|
.p-steps-item-link {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
@ -58,12 +58,12 @@ export default {
|
||||||
outline-color: transparent;
|
outline-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-steps-item .p-menuitem-link:not(.p-disabled):focus-visible {
|
.p-steps-item-link:not(.p-disabled):focus-visible {
|
||||||
outline: ${dt('focus.ring.width')} ${dt('focus.ring.style')} ${dt('focus.ring.color')};
|
outline: ${dt('focus.ring.width')} ${dt('focus.ring.style')} ${dt('focus.ring.color')};
|
||||||
outline-offset: ${dt('focus.ring.offset')};
|
outline-offset: ${dt('focus.ring.offset')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-steps-title {
|
.p-steps-item-label {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
@ -74,7 +74,7 @@ export default {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-steps-number {
|
.p-steps-item-number {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
@ -91,7 +91,7 @@ export default {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-steps-number::after {
|
.p-steps-item-number::after {
|
||||||
content: " ";
|
content: " ";
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -104,12 +104,12 @@ export default {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-steps-current .p-steps-number {
|
.p-steps-item-active .p-steps-item-number {
|
||||||
background: ${dt('steps.marker.active.background')};
|
background: ${dt('steps.marker.active.background')};
|
||||||
color: ${dt('steps.marker.active.color')};
|
color: ${dt('steps.marker.active.color')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-steps-current .p-steps-title {
|
.p-steps-item-active .p-steps-item-label {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: ${dt('steps.item.active.color')};
|
color: ${dt('steps.item.active.color')};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue