-
Notifications
You must be signed in to change notification settings - Fork 398
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feat/v2.0.0' into docs/docs-textcat-tutorial
- Loading branch information
Showing
66 changed files
with
1,658 additions
and
1,033 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 75 additions & 0 deletions
75
argilla-frontend/components/base/base-collpasable-panel/BaseCollapsablePanel.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<template> | ||
<div class="panel" :class="isExpanded ? '--expanded' : '--collapsed'"> | ||
<BaseButton class="panel__header" @click="toggleExpand(isExpanded)"> | ||
<slot name="panelHeader" /> | ||
<svgicon | ||
class="panel__header__icon" | ||
:name="isExpanded ? 'chevron-down' : 'chevron-right'" | ||
width="12" | ||
height="12" | ||
/> | ||
</BaseButton> | ||
|
||
<div class="panel__content" v-if="isExpanded"> | ||
<slot name="panelContent" /> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import "assets/icons/chevron-right"; | ||
import "assets/icons/chevron-down"; | ||
export default { | ||
props: { | ||
isExpanded: { | ||
type: Boolean, | ||
default: false, | ||
}, | ||
}, | ||
methods: { | ||
toggleExpand(value) { | ||
this.$emit("toggle-expand", !value); | ||
}, | ||
}, | ||
}; | ||
</script> | ||
<style lang="scss" scoped> | ||
.panel { | ||
flex: 1; | ||
align-items: center; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
border-top: 1px solid $black-10; | ||
&__header { | ||
width: 100%; | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
padding: $base-space $base-space * 2; | ||
@include font-size(13px); | ||
:deep(p) { | ||
text-transform: uppercase; | ||
} | ||
&__icon { | ||
padding: 0; | ||
flex-shrink: 0; | ||
} | ||
&:hover { | ||
:deep(p), | ||
:deep(svg) { | ||
color: darken(palette(grey, 300), 10%); | ||
} | ||
} | ||
} | ||
&__content { | ||
width: 100%; | ||
height: 100%; | ||
padding: $base-space $base-space * 2; | ||
overflow-y: auto; | ||
@include font-size(13px); | ||
} | ||
} | ||
</style> |
113 changes: 55 additions & 58 deletions
113
argilla-frontend/components/base/base-progress/BaseCircleProgress.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,78 +1,75 @@ | ||
<template> | ||
<div | ||
class="circle-progress" | ||
:style="{ width: `${size}px`, height: `${size}px` }" | ||
> | ||
<div class="circle-progress__circle"> | ||
<div | ||
class="circle-progress__progress" | ||
:style="{ | ||
'background-image': `conic-gradient(${progressColor} ${ | ||
value * 3.6 | ||
}deg,#fafafa 0deg)`, | ||
}" | ||
></div> | ||
<div class="circle-progress__value">{{ value }}</div> | ||
</div> | ||
</div> | ||
<div class="donut-chart" :style="pieStyles"></div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
props: { | ||
progressColor: { | ||
type: String, | ||
default: "#ff675f", | ||
}, | ||
value: { | ||
type: Number, | ||
required: true, | ||
validator: (value) => value >= 0 && value <= 100, | ||
}, | ||
size: { | ||
type: Number, | ||
default: 28, | ||
default: 60, | ||
}, | ||
slices: { | ||
type: Array, | ||
default: () => [], | ||
}, | ||
}, | ||
computed: { | ||
pieStyles() { | ||
let acum = 0; | ||
const styles = this.slices.map( | ||
(slice) => `${slice.color} 0 ${(acum += slice.percent)}%` | ||
); | ||
return { | ||
background: `radial-gradient(#fafafa 40%, transparent 41%), conic-gradient( ${styles.join( | ||
"," | ||
)} )`, | ||
}; | ||
}, | ||
sizeStyles() { | ||
return `${this.size}px`; | ||
}, | ||
}, | ||
}; | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
.circle-progress { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
&__circle { | ||
position: relative; | ||
width: 100%; | ||
height: 100%; | ||
border-radius: 50%; | ||
} | ||
&__progress { | ||
<style scoped lang="scss"> | ||
@property --a { | ||
syntax: "<angle>"; | ||
inherits: false; | ||
initial-value: 360deg; | ||
} | ||
.donut-chart { | ||
position: relative; | ||
width: v-bind(sizeStyles); | ||
height: v-bind(sizeStyles); | ||
border-radius: 50%; | ||
overflow: hidden; | ||
&:before { | ||
--a: 360deg; | ||
content: ""; | ||
position: absolute; | ||
width: 102%; | ||
height: 102%; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
border-radius: 50%; | ||
box-sizing: border-box; | ||
transform-origin: center center; | ||
right: 0; | ||
bottom: 0; | ||
background-image: conic-gradient( | ||
transparent var(--a), | ||
palette(grey, 800) 0deg | ||
); | ||
animation: progress 0.5s ease-in-out; | ||
} | ||
&__value { | ||
position: absolute; | ||
height: calc(100% - 6px); | ||
width: calc(100% - 6px); | ||
top: 50%; | ||
left: 50%; | ||
transform: translate(-50%, -50%); | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
@include font-size(11px); | ||
font-weight: 500; | ||
color: $black-54; | ||
background: palette(white); | ||
border-radius: 50%; | ||
} | ||
@keyframes progress { | ||
1% { | ||
--a: 0deg; | ||
} | ||
100% { | ||
--a: 360deg; | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.