+
+
+
+
+
+
+
+
+
+
+
+
Selected Options Object:
+
{{ JSON.stringify(selectedOptions, null, 2) }}
+
+
+
+
+
+
+ 📋
+ Event Log
+ {{ eventLog.length }} events
+
+
+
+
+
{{ event.message }}
+
+
+
🎯
+
No events yet. Interact with the filters to see events here.
+
+
+
+
+ `
+ }
+}
+
+export function Long() {
+ return {
+ components: { FilterSelections },
+ data() {
+ return { filters: longFilters }
+ },
+ provide() {
+ return {
+ theme: computed(() => 'dlc'),
+ }
+ },
+ template: `
+
+
+
+
+
+
+
+
+
+
+
Selected Options Object:
+
{{ JSON.stringify(selectedOptions, null, 2) }}
+
+ Date Range:
+ {{ dateRange.minValue }} - {{ dateRange.maxValue }}
+
+
+
+ `
+ }
+}
+
+export function MultipleCustomSlots() {
+ return {
+ components: { FilterSelections, YearRangeFilter },
+ provide() {
+ return {
+ theme: computed(() => 'dlc'),
+ }
+ },
+ data() {
+ return {
+ filters: [
+ {
+ name: 'Date Range',
+ slotName: 'dateRange',
+ },
+ {
+ name: 'Price Range',
+ slotName: 'priceRange',
+ },
+ {
+ name: 'Subject',
+ slotName: 'subject',
+ options: [
+ { label: 'History', value: 'history', count: 15420 },
+ { label: 'Literature', value: 'literature', count: 8930 },
+ { label: 'Science', value: 'science', count: 12650 }
+ ],
+ showAll: true
+ }
+ ],
+ selectedOptions: {},
+ dateRange: { minValue: 1950, maxValue: 2000 },
+ priceRange: { minValue: 100, maxValue: 500 }
+ }
+ },
+ methods: {
+ onSelectionChange(selections) {
+ this.selectedOptions = selections
+ },
+ onDateRangeChange(range) {
+ // Only log/handle externally
+ },
+ onPriceRangeChange(range) {
+ // Only log/handle externally
+ }
+ },
+ template: `
+
+
+
+
+
+
+
+
+
+
+
+
+
Selected Options Object:
+
{{ JSON.stringify(selectedOptions, null, 2) }}
+
+
URL Query:
+
{{ JSON.stringify($route && $route.query ? $route.query : {}, null, 2) }}
+
+
+
+
+
+
+ 📋
+ Event Log
+ {{ eventLog.length }} events
+
+
+
+
+
{{ event.message }}
+
+
+
🎯
+
No events yet. Interact with the filters to see events here.
+
+
+
+
+ `
+ }
+}
+
+export function Long() {
+ return {
+ components: { RefineSearchPanel },
+ data() {
+ return { filters: longFilters }
+ },
+ provide() {
+ return {
+ theme: computed(() => 'dlc'),
+ }
+ },
+ template: `
+
+
+
+
+
+
+
+
+
+
+
Selected Options Object:
+
{{ JSON.stringify(selectedOptions, null, 2) }}
+
+
URL Query:
+
{{ JSON.stringify($route && $route.query ? $route.query : {}, null, 2) }}
+
+
+
+
+ `
+ }
+}
+
+export function MultipleCustomSlots() {
+ return {
+ components: { RefineSearchPanel, YearRangeFilter },
+ provide() {
+ return {
+ theme: computed(() => 'dlc'),
+ }
+ },
+ data() {
+ return {
+ filters: [
+ {
+ name: 'Date Range',
+ slotName: 'dateRange',
+ },
+ {
+ name: 'Price Range',
+ slotName: 'priceRange',
+ },
+ {
+ name: 'Subject',
+ slotName: 'subject',
+ options: [
+ { label: 'History', value: 'history', count: 15420 },
+ { label: 'Literature', value: 'literature', count: 8930 },
+ { label: 'Science', value: 'science', count: 12650 }
+ ],
+ showAll: true
+ }
+ ],
+ selectedOptions: {},
+ dateRange: { minValue: 1950, maxValue: 2000 },
+ priceRange: { minValue: 100, maxValue: 500 }
+ }
+ },
+ methods: {
+ onSelectionChange(selections) {
+ this.selectedOptions = selections
+ },
+ onDateRangeChange(range) {
+ // Only log/handle externally in a real app
+ },
+ onPriceRangeChange(range) {
+ // Only log/handle externally in a real app
+ }
+ },
+ template: `
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
URL Query:
+
{{ JSON.stringify($route && $route.query ? $route.query : {}, null, 2) }}
+
+
+ `
+ }
+}
diff --git a/packages/vue-component-library/src/styles/dlc/_filter-selections.scss b/packages/vue-component-library/src/styles/dlc/_filter-selections.scss
new file mode 100644
index 000000000..7859212f1
--- /dev/null
+++ b/packages/vue-component-library/src/styles/dlc/_filter-selections.scss
@@ -0,0 +1,176 @@
+.filter-selections,
+.filter-selections.dlc {
+ .filter-item {
+ &.is-opened {
+ .filter-summary {
+ background-color: var(--color-primary-blue-01);
+ }
+ }
+ }
+
+ .filter-chevron {
+ font-size: 12px;
+
+ @include animate-normal;
+ }
+
+ .effect-slide-toggle.is-opened .filter-chevron {
+ transform: rotate(180deg);
+ }
+
+ .filter-summary {
+ padding: 7px 15px;
+
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+
+ background-color: var(--color-white);
+
+ color: var(--color-secondary-grey-05);
+ font-weight: 500;
+ font-size: 18px;
+ font-family: var(--font-secondary);
+
+ cursor: pointer;
+
+ @include animate-normal;
+
+ &.is-filtered {
+ .filter-chevron {
+ transform: rotate(0deg);
+ }
+ }
+ }
+
+ .filter-options {
+ position: relative;
+ }
+
+ .filter-option {
+ padding: 7px 15px;
+
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+
+ color: var(--color-secondary-grey-05);
+ font-weight: 500;
+ font-size: 18px;
+ font-family: var(--font-secondary);
+
+ cursor: pointer;
+ @include animate-normal;
+
+ &.is-selected {
+ background-color: var(--color-secondary-blue-02);
+ color: var(--color-white);
+ z-index: 10;
+
+ .option-count {
+ color: var(--color-primary-blue-02);
+ font-weight: 500;
+ }
+ }
+ }
+
+ .option-checkbox {
+ position: absolute;
+
+ opacity: 0;
+
+ pointer-events: none;
+ }
+
+ .option-right {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+ }
+
+ .option-count {
+ color: var(--color-secondary-grey-03);
+ font-size: 16px;
+ font-family: var(--font-secondary);
+ font-weight: 400;
+
+ @include animate-normal;
+ }
+
+ .option-remove {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+
+ width: 20px;
+ height: 20px;
+
+ color: var(--color-white);
+ font-size: 30px;
+ font-weight: light;
+
+ @include animate-normal;
+ }
+
+ .see-all {
+ display: flex;
+ align-items: center;
+ justify-content: flex-start;
+ gap: 8px;
+
+ font-weight: 500;
+ color: var(--color-secondary-grey-05);
+
+ .see-all-arrow {
+ translate: 0 -3px;
+ font-size: 22px;
+ line-height: 1;
+ @include animate-normal;
+ }
+ }
+
+ // Hovers
+ @media #{$has-hover} {
+ .filter-summary:hover {
+ background-color: var(--color-primary-blue-01);
+ }
+
+ .filter-option:hover,
+ .see-all:hover {
+ background-color: var(--color-secondary-blue-02);
+ color: var(--color-white);
+
+ .see-all-arrow {
+ transform: translateX(4px);
+ }
+
+ .option-count {
+ color: var(--color-primary-blue-02);
+ }
+ }
+ }
+
+ // TransitionGroup animations for filter options
+ .filter-option-move,
+ .filter-option-leave-active,
+ .filter-option-enter-active {
+ @include animate-normal;
+ }
+
+ .filter-option-enter-from {
+ opacity: 0;
+ }
+
+ .filter-option-leave-to {
+ opacity: 0;
+ z-index: 1;
+ position: absolute;
+ }
+
+ // Ensure leaving items are taken out of layout flow so that moving
+ // animations can be calculated correctly
+ .filter-option-leave-active {
+ position: absolute;
+ width: 100%;
+ }
+}
diff --git a/packages/vue-component-library/src/styles/dlc/_refine-search-panel.scss b/packages/vue-component-library/src/styles/dlc/_refine-search-panel.scss
new file mode 100644
index 000000000..7b96cdbbe
--- /dev/null
+++ b/packages/vue-component-library/src/styles/dlc/_refine-search-panel.scss
@@ -0,0 +1,51 @@
+.refine-search-panel,
+.refine-search-panel.dlc {
+ max-width: 300px;
+
+ border: 1px solid var(--color-secondary-grey-02);
+ border-radius: 8px;
+
+ .filter-reveal-summary {
+ padding: 7px 15px;
+
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+
+ cursor: pointer;
+
+ @include animate-normal;
+
+ .filter-title {
+ margin: 0;
+
+ color: var(--color-primary-blue-05);
+ font-size: 16px;
+ font-weight: medium;
+ text-transform: uppercase;
+ font-family: var(--font-primary);
+ }
+
+ .filter-chevron {
+ font-size: 12px;
+ @include animate-normal;
+ }
+ }
+
+ /* Rotate chevron when opened */
+ &.is-opened .filter-chevron {
+ transform: rotate(180deg);
+ }
+
+ // Hovers
+ @media #{$has-hover} {
+ .filter-reveal-summary:hover {
+ background-color: var(--color-primary-blue-01);
+ }
+ }
+
+ // Breakpoints
+ @media #{$small} {
+ max-width: 100%;
+ }
+}