-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
231 additions
and
0 deletions.
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
src/BIMDataComponents/BIMDataSafeZoneInline/BIMDataSafeZoneInline.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,43 @@ | ||
<template> | ||
<div class="safe-zone-inline"> | ||
<BIMDataButton | ||
class="safe-zone-inline__btn-delete" | ||
color="high" | ||
fill | ||
radius | ||
@click="$emit('confirm-delete')" | ||
> | ||
<slot name="content">Delete</slot> | ||
</BIMDataButton> | ||
<BIMDataButton | ||
class="safe-zone-inline__btn-close" | ||
:style="{ width: '15px', order: reverse ? -1 : 0 }" | ||
width="0px" | ||
radius | ||
@click="$emit('cancel-delete')" | ||
> | ||
<BIMDataIcon name="close" size="xxs" color="granite" /> | ||
</BIMDataButton> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import BIMDataIcon from "../BIMDataIcon/BIMDataIcon.vue"; | ||
import BIMDataButton from "../BIMDataButton/BIMDataButton.vue"; | ||
export default { | ||
components: { | ||
BIMDataIcon, | ||
BIMDataButton, | ||
}, | ||
props: { | ||
reverse: { | ||
type: Boolean, | ||
default: false, | ||
}, | ||
}, | ||
emits: ["confirm-delete", "cancel-delete"], | ||
}; | ||
</script> | ||
|
||
<style scoped lang="scss" src="./_BIMDataSafeZoneInline.scss"></style> |
15 changes: 15 additions & 0 deletions
15
src/BIMDataComponents/BIMDataSafeZoneInline/_BIMDataSafeZoneInline.scss
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,15 @@ | ||
.safe-zone-inline { | ||
display: flex; | ||
gap: 9px; | ||
padding: 6px 9px; | ||
border-radius: 5px; | ||
box-shadow: var(--box-shadow); | ||
|
||
&__btn-delete { | ||
width: 90px; | ||
} | ||
|
||
&__btn-close { | ||
padding: 0 8px; | ||
} | ||
} |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
115 changes: 115 additions & 0 deletions
115
src/web/views/Components/SafeZoneInline/SafeZoneInline.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,115 @@ | ||
<template> | ||
<main class="article safe-zone-inline"> | ||
<div class="article-wrapper"> | ||
<BIMDataText component="h1" color="color-primary"> | ||
{{ $route.name }} | ||
</BIMDataText> | ||
<ComponentCode :componentTitle="$route.name" language="javascript"> | ||
<template #module> | ||
<div class="safe-zone-inline__playground"> | ||
<BIMDataButton | ||
class="safe-zone-inline__playground__btn-delete" | ||
fill | ||
radius | ||
icon | ||
@click="isModalOpen = true" | ||
> | ||
<BIMDataIcon name="delete" size="xs" color="high" /> | ||
</BIMDataButton> | ||
<BIMDataSafeZoneInline | ||
class="safe-zone-inline__playground__component" | ||
v-if="isModalOpen" | ||
:reverse="reverse" | ||
@cancel-delete="isModalOpen = false" | ||
@confirm-delete="isModalOpen = false" | ||
/> | ||
</div> | ||
</template> | ||
|
||
<template #parameters> | ||
<p>Change content order</p> | ||
<BIMDataCheckbox text="reverse" v-model="reverse" /> | ||
</template> | ||
|
||
<template #import> | ||
import BIMDataSafeZoneInline from | ||
"@bimdata/design-system/dist/js/BIMDataComponents/BIMDataSafeZoneInline.js"; | ||
</template> | ||
|
||
<template #code> | ||
<pre> | ||
<BIMDataSafeZoneInline :reverse="{{ reverse }}"/> | ||
</pre> | ||
</template> | ||
</ComponentCode> | ||
|
||
<div class="m-t-12"> | ||
<BIMDataText component="h5" color="color-primary" margin="15px 0 0"> | ||
Props: | ||
</BIMDataText> | ||
<BIMDataTable :columns="propsData[0]" :rows="propsData.slice(1)" /> | ||
</div> | ||
<div class="m-t-12"> | ||
<BIMDataText component="h5" color="color-primary" margin="15px 0 0"> | ||
Events: | ||
</BIMDataText> | ||
<BIMDataTable :columns="eventData[0]" :rows="eventData.slice(1)" /> | ||
</div> | ||
<div class="m-t-12"> | ||
<BIMDataText component="h5" color="color-primary" margin="15px 0 0"> | ||
Slots: | ||
</BIMDataText> | ||
<BIMDataTable :columns="slotData[0]" :rows="slotData.slice(1)" /> | ||
</div> | ||
</div> | ||
</main> | ||
</template> | ||
|
||
<script> | ||
import ComponentCode from "../../Elements/ComponentCode/ComponentCode.vue"; | ||
import BIMDataText from "../../../../BIMDataComponents/BIMDataText/BIMDataText.vue"; | ||
import BIMDataIcon from "../../../../BIMDataComponents/BIMDataIcon/BIMDataIcon.vue"; | ||
import BIMDataTable from "../../../../BIMDataComponents/BIMDataTable/BIMDataTable.vue"; | ||
import BIMDataButton from "../../../../BIMDataComponents/BIMDataButton/BIMDataButton.vue"; | ||
import BIMDataCheckbox from "../../../../BIMDataComponents/BIMDataCheckbox/BIMDataCheckbox.vue"; | ||
import BIMDataSafeZoneInline from "../../../../BIMDataComponents/BIMDataSafeZoneInline/BIMDataSafeZoneInline.vue"; | ||
export default { | ||
components: { | ||
ComponentCode, | ||
BIMDataText, | ||
BIMDataIcon, | ||
BIMDataTable, | ||
BIMDataButton, | ||
BIMDataCheckbox, | ||
BIMDataSafeZoneInline, | ||
}, | ||
data() { | ||
return { | ||
isModalOpen: false, | ||
reverse: false, | ||
propsData: [ | ||
["Props", "Type", "Default value", "Description"], | ||
["locale", "String", "en", "Use this props to select a language."], | ||
[ | ||
"reverse", | ||
"Boolean", | ||
"false", | ||
"Use this props to reverse content order.", | ||
], | ||
], | ||
eventData: [ | ||
["Event name", "Description"], | ||
["confirm-delete", "Use this event to confirm delete."], | ||
["cancel-delete", "Use this event to cancel delete."], | ||
], | ||
slotData: [ | ||
["Slot name", "Description"], | ||
["content", "Use this slot to add a custom text."], | ||
], | ||
}; | ||
}, | ||
}; | ||
</script> | ||
|
||
<style lang="scss" scoped src="./_SafeZoneInline.scss"></style> |
13 changes: 13 additions & 0 deletions
13
src/web/views/Components/SafeZoneInline/_SafeZoneInline.scss
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,13 @@ | ||
.safe-zone-inline { | ||
&__playground { | ||
position: relative; | ||
|
||
&__component { | ||
background-color: var(--color-white); | ||
position: absolute; | ||
z-index: 1; | ||
top: -7px; | ||
right: 0px; | ||
} | ||
} | ||
} |
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