-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: scafolder filters panel components
- Loading branch information
Showing
16 changed files
with
231 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<script setup> | ||
import SearchFormControl from '@/components/SearchFormControl.vue' | ||
defineProps({ | ||
modelValue: { | ||
type: String | ||
}, | ||
placeholder: { | ||
type: String, | ||
default: 'Search in filters' | ||
} | ||
}) | ||
const emit = defineEmits(['update:modelValue']) | ||
</script> | ||
|
||
<template> | ||
<search-form-control | ||
:model-value="modelValue" | ||
:placeholder="placeholder" | ||
class="filters-panel-search" | ||
@update:modelValue="emit('update:modelValue', $event)" | ||
/> | ||
</template> |
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,17 @@ | ||
<script setup> | ||
import FiltersPanelSectionTitle from '@/components/FiltersPanelSectionTitle.vue' | ||
defineProps({ | ||
title: { | ||
type: String | ||
} | ||
}) | ||
</script> | ||
|
||
<template> | ||
<div class="filters-panel-section"> | ||
<filters-panel-section-title :title="title"> | ||
<slot name="title"></slot> | ||
</filters-panel-section-title> | ||
</div> | ||
</template> |
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,5 @@ | ||
<script setup></script> | ||
|
||
<template> | ||
<div class="filters-panel-section-filter"></div> | ||
</template> |
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,5 @@ | ||
<script setup></script> | ||
|
||
<template> | ||
<div class="filters-panel-section-filter-entry"></div> | ||
</template> |
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,5 @@ | ||
<script setup></script> | ||
|
||
<template> | ||
<div class="filters-panel-section-filter-footer"></div> | ||
</template> |
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,19 @@ | ||
<script setup> | ||
defineProps({ | ||
title: { | ||
type: String | ||
} | ||
}) | ||
</script> | ||
|
||
<template> | ||
<h3 class="filters-panel-section-title text-primary-emphasis"> | ||
<slot>{{ title }}</slot> | ||
</h3> | ||
</template> | ||
|
||
<style lang="scss" scoped> | ||
.filters-panel-section-title { | ||
font-size: 1em; | ||
} | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<script setup> | ||
import IconButton from '@/components/IconButton.vue' | ||
const emit = defineEmits(['close']) | ||
</script> | ||
|
||
<template> | ||
<icon-button class="filters-panel-toggler" variant="outline-dark" icon-left="x" @click="emit('close')"> | ||
<slot>Close filters</slot> | ||
</icon-button> | ||
</template> |
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,46 @@ | ||
import FiltersPanelToggler from "@/components/FiltersPanelToggler.vue" | ||
import FiltersPanelSearch from "@/components/FiltersPanelSearch.vue" | ||
import FiltersPanelSection from "@/components/FiltersPanelSection.vue" | ||
import FiltersPanelSectionTitle from "@/components/FiltersPanelSectionTitle.vue" | ||
import FiltersPanelSectionFilter from "@/components/FiltersPanelSectionFilter.vue" | ||
import FiltersPanelSectionFilterEntry from "@/components/FiltersPanelSectionFilterEntry.vue" | ||
import FiltersPanelSectionFilterFooter from "@/components/FiltersPanelSectionFilterFooter.vue" | ||
|
||
export default { | ||
title: 'Components/FiltersPanel', | ||
tags: ['autodocs'], | ||
argTypes: {}, | ||
args: {}, | ||
render: (args) => ({ | ||
components: { | ||
FiltersPanelToggler, | ||
FiltersPanelSearch, | ||
FiltersPanelSection, | ||
FiltersPanelSectionTitle, | ||
FiltersPanelSectionFilter, | ||
FiltersPanelSectionFilterEntry, | ||
FiltersPanelSectionFilterFooter | ||
}, | ||
setup: () => ({ args }), | ||
template: ` | ||
<div style="max-width: 320px; background-color: var(--bs-light-bg-subtle);" class="p-3"> | ||
<filters-panel-toggler class="mb-5" /> | ||
<filters-panel-search class="mb-5" /> | ||
<filters-panel-section title="Documents info"> | ||
<filters-panel-section-filter name="project" title="Project"> | ||
<filters-panel-section-filter-entry label="Banana Papers" value="banana-papers" /> | ||
<filters-panel-section-filter-entry label="Citrus Confidential" value="citrus-confidential" /> | ||
<filters-panel-section-filter-entry label="FigCEN Files" value="figcen-files" /> | ||
</filters-panel-section-filter> | ||
<filters-panel-section-filter name="contentType" title="File type"> | ||
<filters-panel-section-filter-entry label="Portable Document Format (PDF)" value="application/pdf" /> | ||
<filters-panel-section-filter-entry label="JPEG" value="image/jpg" /> | ||
<filters-panel-section-filter-entry label="Excel 95-2003 Wordbook" value="application/vnd.ms-excel" /> | ||
</filters-panel-section-filter> | ||
</filters-panel-section> | ||
</div> | ||
` | ||
}) | ||
} | ||
|
||
export const Default = {} |
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 @@ | ||
export default { | ||
title: 'Components/FiltersPanel/Search', | ||
tags: ['autodocs'], | ||
argTypes: {}, | ||
args: {}, | ||
render: (args) => ({ | ||
components: { }, | ||
setup: () => ({ args }), | ||
template: `` | ||
}) | ||
} | ||
|
||
export const Default = {} |
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 @@ | ||
export default { | ||
title: 'Components/FiltersPanel/Section', | ||
tags: ['autodocs'], | ||
argTypes: {}, | ||
args: {}, | ||
render: (args) => ({ | ||
components: { }, | ||
setup: () => ({ args }), | ||
template: `` | ||
}) | ||
} | ||
|
||
export const Default = {} |
13 changes: 13 additions & 0 deletions
13
src/stories/components/FiltersPanelSectionFilter.stories.js
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 @@ | ||
export default { | ||
title: 'Components/FiltersPanel/Section/Filter', | ||
tags: ['autodocs'], | ||
argTypes: {}, | ||
args: {}, | ||
render: (args) => ({ | ||
components: { }, | ||
setup: () => ({ args }), | ||
template: `` | ||
}) | ||
} | ||
|
||
export const Default = {} |
13 changes: 13 additions & 0 deletions
13
src/stories/components/FiltersPanelSectionFilterEntry.stories.js
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 @@ | ||
export default { | ||
title: 'Components/FiltersPanel/Section/Filter/Entry', | ||
tags: ['autodocs'], | ||
argTypes: {}, | ||
args: {}, | ||
render: (args) => ({ | ||
components: { }, | ||
setup: () => ({ args }), | ||
template: `` | ||
}) | ||
} | ||
|
||
export const Default = {} |
13 changes: 13 additions & 0 deletions
13
src/stories/components/FiltersPanelSectionFilterFooter.stories.js
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 @@ | ||
export default { | ||
title: 'Components/FiltersPanel/Section/Filter/Footer', | ||
tags: ['autodocs'], | ||
argTypes: {}, | ||
args: {}, | ||
render: (args) => ({ | ||
components: { }, | ||
setup: () => ({ args }), | ||
template: `` | ||
}) | ||
} | ||
|
||
export const Default = {} |
13 changes: 13 additions & 0 deletions
13
src/stories/components/FiltersPanelSectionTitle.stories.js
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 @@ | ||
export default { | ||
title: 'Components/FiltersPanel/Section/Title', | ||
tags: ['autodocs'], | ||
argTypes: {}, | ||
args: {}, | ||
render: (args) => ({ | ||
components: { }, | ||
setup: () => ({ args }), | ||
template: `` | ||
}) | ||
} | ||
|
||
export const Default = {} |
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 @@ | ||
export default { | ||
title: 'Components/FiltersPanel/Toggler', | ||
tags: ['autodocs'], | ||
argTypes: {}, | ||
args: {}, | ||
render: (args) => ({ | ||
components: { }, | ||
setup: () => ({ args }), | ||
template: `` | ||
}) | ||
} | ||
|
||
export const Default = {} |