Migrated Slider

pull/5507/head
Cagatay Civici 2024-02-17 02:17:26 +03:00
parent 1d67e78cee
commit 4813411e04
3 changed files with 121 additions and 0 deletions

View File

@ -39,6 +39,7 @@ import scrollpanel from 'primevue/theme/aura/scrollpanel';
import scrolltop from 'primevue/theme/aura/scrolltop';
import sidebar from 'primevue/theme/aura/sidebar';
import skeleton from 'primevue/theme/aura/skeleton';
import slider from 'primevue/theme/aura/slider';
import speeddial from 'primevue/theme/aura/speeddial';
import splitbutton from 'primevue/theme/aura/splitbutton';
import splitter from 'primevue/theme/aura/splitter';
@ -213,6 +214,7 @@ export default {
scrolltop,
skeleton,
sidebar,
slider,
speeddial,
splitter,
splitbutton,

View File

@ -0,0 +1,113 @@
export default {
variables: {
colorScheme: {
light: {
track: {
background: '{surface.200}'
},
handle: {
background: '{surface.200}',
backgroundHover: '{surface.200}',
contentBackground: '{surface.0}'
},
range: {
background: '{primary.color}'
}
},
dark: {
track: {
background: '{surface.700}'
},
handle: {
background: '{surface.700}',
backgroundHover: '{surface.700}',
contentBackground: '{surface.950}'
},
range: {
background: '{primary.color}'
}
}
}
},
css: `
.p-slider {
position: relative;
background: var(--p-slider-track-background);
border-radius: var(--p-rounded-base);
}
.p-slider-handle {
cursor: grab;
touch-action: none;
display: flex;
justify-content: center;
align-items: center;
height: 20px;
width: 20px;
background: var(--p-slider-handle-background);
border: 0 none;
border-radius: 50%;
transition: background-color var(--p-transition-duration), color var(--p-transition-duration), border-color var(--p-transition-duration), box-shadow var(--p-transition-duration), outline-color var(--p-transition-duration);
outline-color: transparent;
}
.p-slider-handle::before {
content: "";
width: 16px;
height: 16px;
display: block;
background-color: var(--p-slider-handle-content-background);
border-radius: 50%;
box-shadow: 0px 0.5px 0px 0px rgba(0, 0, 0, 0.08), 0px 1px 1px 0px rgba(0, 0, 0, 0.14);
}
.p-slider:not(.p-disabled) .p-slider-handle:hover {
background: var(--p-slider-handle-background-hover);
border-color: transparent;
}
.p-slider-handle:focus-visible {
outline: var(--p-focus-ring-width) var(--p-focus-ring-style) var(--p-focus-ring-color);
outline-offset: 0;
}
.p-slider-range {
display: block;
background: var(--p-slider-range-background);
border-radius: var(--p-rounded-base);
}
.p-slider.p-slider-horizontal {
height: 3px;
}
.p-slider-horizontal .p-slider-range {
top: 0;
left: 0;
height: 100%;
}
.p-slider-horizontal .p-slider-handle {
top: 50%;
margin-top: -10px;
margin-left: -10px;
}
.p-slider-vertical {
height: 100px;
width: 3px;
}
.p-slider-vertical .p-slider-handle {
left: 50%;
margin-left: -10px;
margin-bottom: -10px;
}
.p-slider-vertical .p-slider-range {
bottom: 0;
left: 0;
width: 100%;
}
`
};

View File

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