Migrated timeline

pull/5507/head
Cagatay Civici 2024-02-16 11:36:00 +03:00
parent 8b959ab76c
commit 6ebc7594d8
3 changed files with 187 additions and 0 deletions

View File

@ -42,6 +42,7 @@ import tabview from 'primevue/theme/aura/tabview';
import tag from 'primevue/theme/aura/tag';
import terminal from 'primevue/theme/aura/terminal';
import tieredmenu from 'primevue/theme/aura/tieredmenu';
import timeline from 'primevue/theme/aura/timeline';
import toast from 'primevue/theme/aura/toast';
import toolbar from 'primevue/theme/aura/toolbar';
import tooltip from 'primevue/theme/aura/tooltip';
@ -203,6 +204,7 @@ export default {
tieredmenu,
tag,
terminal,
timeline,
toast,
toolbar
},

View File

@ -0,0 +1,179 @@
export default {
variables: {
colorScheme: {
light: {
marker: {
background: '{surface.0}',
borderColor: '{surface.200}',
contentColor: '{primary.color}'
},
connector: {
color: '{surface.200}'
}
},
dark: {
marker: {
background: '{surface.900}',
borderColor: '{surface.700}',
contentColor: '{primary.color}'
},
connector: {
color: '{surface.700}'
}
}
}
},
css: `
.p-timeline {
display: flex;
flex-grow: 1;
flex-direction: column;
}
.p-timeline-left .p-timeline-event-opposite {
text-align: right;
}
.p-timeline-left .p-timeline-event-content {
text-align: left;
}
.p-timeline-right .p-timeline-event {
flex-direction: row-reverse;
}
.p-timeline-right .p-timeline-event-opposite {
text-align: left;
}
.p-timeline-right .p-timeline-event-content {
text-align: right;
}
.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) {
flex-direction: row-reverse;
}
.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(odd) .p-timeline-event-opposite {
text-align: right;
}
.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(odd) .p-timeline-event-content {
text-align: left;
}
.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) .p-timeline-event-opposite {
text-align: left;
}
.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) .p-timeline-event-content {
text-align: right;
}
.p-timeline-vertical .p-timeline-event-opposite,
.p-timeline-vertical .p-timeline-event-content {
padding: 0 1rem;
}
.p-timeline-vertical .p-timeline-event-connector {
width: 2px;
}
.p-timeline-event {
display: flex;
position: relative;
min-height: 70px;
}
.p-timeline-event:last-child {
min-height: 0;
}
.p-timeline-event-opposite {
flex: 1;
padding: 0 1rem;
}
.p-timeline-event-content {
flex: 1;
padding: 0 1rem;
}
.p-timeline-event-separator {
flex: 0;
display: flex;
align-items: center;
flex-direction: column;
}
.p-timeline-event-marker {
display: inline-flex;
align-items: center;
justify-content: center;
position: relative;
align-self: baseline;
border: 2px solid var(--p-timeline-marker-border-color);
border-radius: 50%;
width: 1.125rem;
height: 1.125rem;
background-color: var(--p-timeline-marker-background);
}
.p-timeline-event-marker::before {
content: " ";
border-radius: 50%;
width: 0.375rem;
height: 0.375rem;
background-color: var(--p-timeline-marker-content-color);
}
.p-timeline-event-marker::after {
content: " ";
position: absolute;
width: 100%;
height: 100%;
border-radius: 50%;
box-shadow: 0px 0.5px 0px 0px rgba(0, 0, 0, 0.06), 0px 1px 1px 0px rgba(0, 0, 0, 0.12);
}
.p-timeline-event-connector {
flex-grow: 1;
background-color: var(--p-timeline-connector-color);
}
.p-timeline-horizontal {
flex-direction: row;
}
.p-timeline-horizontal .p-timeline-event {
flex-direction: column;
flex: 1;
}
.p-timeline-horizontal .p-timeline-event:last-child {
flex: 0;
}
.p-timeline-horizontal .p-timeline-event-separator {
flex-direction: row;
}
.p-timeline-horizontal .p-timeline-event-connector {
width: 100%;
height: 2px;
}
.p-timeline-horizontal .p-timeline-event-opposite,
.p-timeline-horizontal .p-timeline-event-content {
padding: 1rem 0;
}
.p-timeline-horizontal.p-timeline-alternate .p-timeline-event:nth-child(even) {
flex-direction: column-reverse;
}
.p-timeline-bottom .p-timeline-event {
flex-direction: column-reverse;
}
`
};

View File

@ -0,0 +1,6 @@
{
"main": "./index.cjs.js",
"module": "./index.esm.js",
"unpkg": "./index.min.js",
"types": "./index.d.ts"
}