Skip to content
Merged
Show file tree
Hide file tree
Changes from 145 commits
Commits
Show all changes
151 commits
Select commit Hold shift + click to select a range
db8da7f
adds components list
dChiamp Jun 20, 2025
bd57d86
Update COMPONENTS.md
Sveb Jun 20, 2025
4fa76ad
Update COMPONENTS.md
Sveb Jun 20, 2025
b4dc86d
Update COMPONENTS.md
Sveb Jun 23, 2025
285e079
Update COMPONENTS.md
Sveb Jun 23, 2025
213a640
adds notes
dChiamp Jun 23, 2025
3004c74
Update COMPONENTS.md
Sveb Jun 24, 2025
7a1e0aa
Merge branch 'main' of https://github.com/funkhaus/ucla-library-websi…
dChiamp Jun 24, 2025
e955637
claimed component
austinblanchard Jun 24, 2025
d5e45d1
Update COMPONENTS.md
Sveb Jun 25, 2025
d49eaf5
claim a component
lux-v Jun 25, 2025
4b6cccf
claim a component
lux-v Jun 25, 2025
bfa79d4
Update COMPONENTS.md
Sveb Jun 25, 2025
4852133
Update COMPONENTS.md
Sveb Jun 25, 2025
2120974
Update COMPONENTS.md
Sveb Jun 25, 2025
c5d0581
take a component
lux-v Jun 25, 2025
af0a6b3
take a component
lux-v Jun 25, 2025
2e73be7
take a component
lux-v Jun 25, 2025
88bfe5e
Update COMPONENTS.md
austinblanchard Jun 25, 2025
22b88d7
Update COMPONENTS.md
Sveb Jun 26, 2025
498ab73
Adjust the component name - already exists
Sveb Jun 30, 2025
09c2fd0
take a component
lux-v Jul 1, 2025
0c75f77
take a component
lux-v Jul 1, 2025
a7bf5fa
Update COMPONENTS.md
Sveb Jul 1, 2025
069c123
Update COMPONENTS.md
Sveb Jul 7, 2025
cdb4a86
Update COMPONENTS.md
Sveb Jul 7, 2025
8a29837
Update COMPONENTS.md
austinblanchard Jul 7, 2025
7bdfa7a
Update COMPONENTS.md - marking BentoPod
Sveb Jul 8, 2025
bc0154d
add component
lux-v Jul 8, 2025
597ef57
add component
lux-v Jul 8, 2025
02aafc7
Update COMPONENTS.md
austinblanchard Jul 8, 2025
e675c1b
Update COMPONENTS.md
austinblanchard Jul 8, 2025
2933c6d
take a component
lux-v Jul 9, 2025
d5c665a
take a component
lux-v Jul 9, 2025
e539e14
fix component description
lux-v Jul 9, 2025
4808e2d
Update COMPONENTS.md
Sveb Jul 10, 2025
e372e04
Update COMPONENTS.md
Sveb Jul 10, 2025
7d5d656
change component's name
lux-v Jul 11, 2025
ed656cf
Update COMPONENTS.md
Sveb Jul 14, 2025
877fb65
take a component
lux-v Jul 14, 2025
348494b
take a component
lux-v Jul 15, 2025
45e6cf7
take a component
lux-v Jul 16, 2025
183375c
remove AssetFeaturedImage definition
lux-v Jul 16, 2025
ee9dd92
take a component
lux-v Jul 16, 2025
62919e6
take a components
lux-v Jul 16, 2025
51430d6
take a components
lux-v Jul 16, 2025
f6de890
take a component
lux-v Jul 16, 2025
76226de
take a component
lux-v Jul 16, 2025
d78dda6
add a new line
lux-v Jul 16, 2025
7388620
add detailed component description
lux-v Jul 16, 2025
63b619b
add detailed component description
lux-v Jul 16, 2025
e277dbe
take a component
lux-v Jul 16, 2025
08e03ec
update component description
lux-v Jul 16, 2025
0ee907a
Adds a button component
Sveb Jul 17, 2025
864171d
Update COMPONENTS.md
Sveb Jul 17, 2025
1bb618a
Update COMPONENTS.md
Sveb Jul 17, 2025
54df91d
Update COMPONENTS.md
Sveb Jul 17, 2025
0ed4fbb
Clean up components.md
Sveb Jul 17, 2025
b06efac
Taking the block-collection component
Sveb Jul 21, 2025
d31c91f
Taking the grid-collections component as well.
Sveb Jul 21, 2025
94304d5
Update COMPONENTS.md
Sveb Jul 21, 2025
279744a
Clean up component list
Sveb Jul 23, 2025
82e0566
add spacing
lux-v Jul 23, 2025
d24c553
add spacing
lux-v Jul 23, 2025
c69bfac
Merge branch 'UCLALibrary:main' into main
lux-v Aug 5, 2025
0f9c0aa
update component name
lux-v Aug 6, 2025
a10aa20
Update Button definition
lux-v Aug 11, 2025
7f9084e
Update COMPONENTS.md
lux-v Aug 11, 2025
4b9de5d
Update COMPONENTS.md
lux-v Aug 11, 2025
f3b329f
Remove duplicates
lux-v Aug 11, 2025
2f4300d
remove duplicates
lux-v Aug 11, 2025
2cde0d3
remove duplicates
lux-v Aug 11, 2025
df42ca4
Remove already existing components
lux-v Aug 11, 2025
3db154c
Merge branch 'main' into main
lux-v Aug 12, 2025
9287f6d
take a component
lux-v Aug 12, 2025
33787b8
update package
Sveb Aug 14, 2025
fe7041b
add a component
lux-v Aug 15, 2025
05911af
Take a component
Sveb Aug 15, 2025
92f95f4
adjust prop for block anchor nav
lux-v Aug 15, 2025
b876c86
take a component
lux-v Aug 15, 2025
1d0497d
Update COMPONENTS.md
lux-v Aug 18, 2025
2e670a6
Merge remote-tracking branch 'upstream/main'
Sveb Aug 18, 2025
eec9a91
Merge branch 'main' into main
lux-v Aug 18, 2025
09043d2
Merge remote-tracking branch 'upstream/main'
Sveb Aug 18, 2025
4a3040f
Taking the DropdownSingleSelect
Sveb Aug 19, 2025
99240ef
Merge remote-tracking branch 'upstream/main'
Sveb Aug 20, 2025
f72144c
Take the ButtonDropdownSearch component
Sveb Aug 20, 2025
8301316
Merge remote-tracking branch 'upstream/main'
Sveb Aug 22, 2025
9beaa8f
Merge branch 'UCLALibrary:main' into main
lux-v Aug 26, 2025
b87f27e
Merge remote-tracking branch 'upstream/main'
Sveb Aug 27, 2025
95d50e6
adding the correct packageMenager version for netlify to see.
Sveb Aug 27, 2025
3aeb5a6
Merge pull request #30 from Sveb/installing-the-correct-pnpnm
Sveb Aug 27, 2025
16e863a
Merge remote-tracking branch 'upstream/main'
Sveb Aug 27, 2025
73a286e
Merge branch 'UCLALibrary:main' into main
lux-v Sep 2, 2025
64208d8
Merge remote-tracking branch 'upstream/main'
Sveb Sep 2, 2025
f3e47de
Update COMPONENTS.md
Sveb Sep 3, 2025
cab92c8
Merge branch 'UCLALibrary:main' into main
lux-v Sep 3, 2025
4284ea6
Marking a component as taken
Sveb Sep 3, 2025
d7ec61c
Merge remote-tracking branch 'upstream/main'
Sveb Sep 3, 2025
8817e3b
feat: create the year-range-slider component
Sveb Sep 4, 2025
170b39f
Remove packageManager field from package.json
Sveb Sep 4, 2025
c2a2e75
Merge remote-tracking branch 'upstream/main'
Sveb Sep 4, 2025
83dd2d4
Merge branch 'main' into year-range-slider
Sveb Sep 4, 2025
039a509
Update packages/vue-component-library/src/index.ts
Sveb Sep 4, 2025
7df1d2f
clean up stories.
Sveb Sep 4, 2025
336fda4
Update component statuses and remove completed items
Sveb Sep 4, 2025
33211f0
Merge remote-tracking branch 'upstream/main'
Sveb Sep 4, 2025
fb8fc47
Merge branch 'UCLALibrary:main' into main
lux-v Sep 4, 2025
fe816e4
Merge remote-tracking branch 'upstream/main'
Sveb Sep 8, 2025
21bfbcd
Update COMPONENTS.md
Sveb Sep 8, 2025
b8a8d23
Taking the FiltersDropdown
Sveb Sep 8, 2025
345f8b9
Update COMPONENTS.md
lux-v Sep 8, 2025
89788c4
Add note regarding existing header component tweaks
lux-v Sep 8, 2025
cfbbcd4
Update RefineSearchPanel ownership in COMPONENTS.md
Sveb Sep 10, 2025
12b0865
Merge remote-tracking branch 'upstream/main'
Sveb Sep 11, 2025
90661b7
Update DetailMedia component owner to Svebor
Sveb Sep 11, 2025
12725ef
Update component list
austinblanchard Sep 11, 2025
202ef87
Merge branch 'UCLALibrary:main' into main
lux-v Sep 11, 2025
690b044
Clarify CTAHexButton entry in COMPONENTS.md
lux-v Sep 11, 2025
3fe1723
Update COMPONENTS.md to remove and modify components
Sveb Sep 12, 2025
daf45e8
Merge remote-tracking branch 'upstream/main'
Sveb Sep 15, 2025
6bc549e
Update component status and ownership in COMPONENTS.md
Sveb Sep 15, 2025
f570d75
Update component ownership in COMPONENTS.md
Sveb Sep 15, 2025
5a8fab1
Merge branch 'UCLALibrary:main' into main
lux-v Sep 16, 2025
d902719
Merge branch 'UCLALibrary:main' into main
lux-v Sep 18, 2025
9dc1550
Merge remote-tracking branch 'upstream/main'
Sveb Sep 22, 2025
fb48e3b
Merge branch 'UCLALibrary:main' into main
lux-v Sep 22, 2025
d660e03
Merge remote-tracking branch 'upstream/main'
Sveb Sep 25, 2025
e8a0500
Merge branch 'UCLALibrary:main' into main
lux-v Sep 29, 2025
50aeb69
Merge branch 'UCLALibrary:main' into main
lux-v Oct 1, 2025
c8f5fbb
Merge branch 'UCLALibrary:main' into main
lux-v Oct 2, 2025
cdea736
Merge remote-tracking branch 'upstream/main'
Sveb Oct 2, 2025
26a60ed
Merge branch 'UCLALibrary:main' into main
lux-v Oct 3, 2025
a214856
Merge branch 'UCLALibrary:main' into main
lux-v Oct 9, 2025
78b03ee
Merge branch 'UCLALibrary:main' into main
lux-v Oct 10, 2025
84c0b0a
Merge branch 'UCLALibrary:main' into main
lux-v Oct 16, 2025
db8bcf4
Merge remote-tracking branch 'upstream/main'
Sveb Oct 17, 2025
9778bff
Merge branch 'UCLALibrary:main' into main
lux-v Oct 20, 2025
5ad9942
Merge branch 'UCLALibrary:main' into main
lux-v Oct 20, 2025
8e12a81
Merge branch 'main' into year-range-slider
Sveb Oct 21, 2025
1e8a0da
Merge branch 'main' into year-range-slider
Sveb Oct 21, 2025
2199948
Merge remote-tracking branch 'upstream/main' into year-range-slider
Sveb Oct 21, 2025
d57aa38
Update package.json
Sveb Oct 21, 2025
26559da
Merge branch 'main' into year-range-slider
pghorpade Oct 22, 2025
4afd9db
Merge branch 'main' into year-range-slider
pghorpade Oct 27, 2025
3c931de
Adds to the route queries
Sveb Oct 28, 2025
cf4a4e7
Merge branch 'main' into year-range-slider
pghorpade Oct 29, 2025
a9aa07e
Adjusts the year range slider so it allows for typing and increments …
Sveb Oct 30, 2025
d1ed9fd
Update YearRangeFilter.stories.js
Sveb Oct 30, 2025
08b13b3
Adds a visual debugging feature to the story
Sveb Nov 3, 2025
098e567
Merge branch 'main' into year-range-slider
pghorpade Nov 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Designs:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this file

https://www.figma.com/design/CDhWDARLb36ftkQce1LyLC/Breakpoints?node-id=1-25&m=dev

https://www.figma.com/design/CDhWDARLb36ftkQce1LyLC/Breakpoints?node-id=1-26&p=f&m=dev

Read in Recording:
https://drive.google.com/file/d/17tiGmE4aax-faoo5Rjue2Idbx3OGCFGa/view?usp=sharing

Relevant Links
https://www.library.ucla.edu/
https://digital.library.ucla.edu/catalog/ark:/21198/z1x98m6j
1 change: 1 addition & 0 deletions packages/vue-component-library/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ export { default as NavSearch } from './lib-components/NavSearch.vue'
export { default as NavSecondary } from './lib-components/NavSecondary.vue'
export { default as PageAnchor } from './lib-components/PageAnchor.vue'
export { default as PullQuote } from './lib-components/PullQuote.vue'
export { default as YearRangeFilter } from './lib-components/YearRangeFilter.vue'
export { default as ResponsiveImage } from './lib-components/ResponsiveImage.vue'
export { default as ResponsiveVideo } from './lib-components/ResponsiveVideo.vue'
export { default as RichText } from './lib-components/RichText.vue'
Expand Down
219 changes: 219 additions & 0 deletions packages/vue-component-library/src/lib-components/YearRangeFilter.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,219 @@
<script setup lang="ts">
import { computed, ref, watch } from 'vue'
import { useTheme } from '@/composables/useTheme'

// Props
interface YearRangeFilterProps {
min: number
max: number
minValue: number
maxValue: number
step: number
disabled: boolean
}
const props = defineProps<YearRangeFilterProps>()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Configurable query param names

  • Add optional props like minParam / maxParam so this component stays reusable across pages.


// Emits
const emit = defineEmits(['update:minValue', 'update:maxValue', 'change'])

// THEME
const theme = useTheme()
const classes = computed(() => {
return ['year-range-filter', theme?.value || '']
})

// Local state for the input values
const localMinValue = ref(props.minValue)
const localMaxValue = ref(props.maxValue)

// Watch for prop changes
watch(() => props.minValue, (newVal) => {
localMinValue.value = newVal
})

watch(() => props.maxValue, (newVal) => {
localMaxValue.value = newVal
})

// Handle input changes
function handleMinInput(event: Event) {
const target = event.target as HTMLInputElement | null
if (!target)
return

const value = Number.parseInt(target.value) || props.min
const clampedValue = Math.max(props.min, Math.min(value, localMaxValue.value - props.step))
localMinValue.value = clampedValue
emit('update:minValue', clampedValue)
emit('change', { min: clampedValue, max: localMaxValue.value })
}

function handleMaxInput(event: Event) {
const target = event.target as HTMLInputElement | null
if (!target)
return

const value = Number.parseInt(target.value) || props.max
const clampedValue = Math.min(props.max, Math.max(value, localMinValue.value + props.step))
localMaxValue.value = clampedValue
emit('update:maxValue', clampedValue)
emit('change', { min: localMinValue.value, max: clampedValue })
}

// Handle slider changes
function handleSliderChange(event: Event) {
const target = event.target as HTMLInputElement | null
if (!target)
return

const value = Number.parseInt(target.value)

if (target.dataset.handle === 'min') {
// Prevent min slider from going beyond max slider
const clampedValue = Math.max(props.min, Math.min(value, localMaxValue.value - props.step))
localMinValue.value = clampedValue
// Update the slider value to match the clamped value
target.value = clampedValue.toString()
emit('update:minValue', clampedValue)
}

else {
// Prevent max slider from going below min slider
const clampedValue = Math.min(props.max, Math.max(value, localMinValue.value + props.step))
localMaxValue.value = clampedValue
// Update the slider value to match the clamped value
target.value = clampedValue.toString()
emit('update:maxValue', clampedValue)
}
emit('change', { min: localMinValue.value, max: localMaxValue.value })
}

// Handle mouse events to determine which slider to interact with
function handleSliderMouseDown(event: Event) {
const target = event.currentTarget as HTMLElement | null
if (!target)
return

const rect = target.getBoundingClientRect()
// Ensure event is a MouseEvent to access clientX
if (!(event instanceof MouseEvent))
return

const x = event.clientX - rect.left
const width = rect.width
const percentage = x / width

// Determine which slider is closer to the click position
const minPosition = (localMinValue.value - props.min) / (props.max - props.min)
const maxPosition = (localMaxValue.value - props.min) / (props.max - props.min)

const minDistance = Math.abs(percentage - minPosition)
const maxDistance = Math.abs(percentage - maxPosition)

if (minDistance < maxDistance) {
// Focus on min slider
const minSlider = (event.currentTarget as HTMLElement | null)?.querySelector('.range-slider--min') as HTMLElement | null
if (minSlider)
minSlider.focus()
}
else {
// Focus on max slider
const maxSlider = (event.currentTarget as HTMLElement | null)?.querySelector('.range-slider--max') as HTMLElement | null
if (maxSlider)
maxSlider.focus()
}
}

// Handle limit button click
function handleLimitClick() {
emit('change', { min: localMinValue.value, max: localMaxValue.value })
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Router integration on “Limit”

  • Use useRoute() + useRouter() and push a new query while preserving existing ones.
  • Avoid clobbering other query params; just set year_gte / year_lte (or names you pass via props).
  • Optionally clear pagination (page) when filters change.

}

// Computed styles for the range track
const trackStyle = computed(() => {
const minPercent = ((localMinValue.value - props.min) / (props.max - props.min)) * 100
const maxPercent = ((localMaxValue.value - props.min) / (props.max - props.min)) * 100
return {
background: `linear-gradient(to right,
var(--color-secondary-grey-02) 0%,
var(--color-secondary-grey-02) ${minPercent}%,
var(--color-primary-blue-03) ${minPercent}%,
var(--color-primary-blue-03) ${maxPercent}%,
var(--color-secondary-grey-02) ${maxPercent}%,
var(--color-secondary-grey-02) 100%)`
}
})
</script>

<template>
<div :class="classes">
<!-- Input fields and button row -->
<div class="range-inputs">
<input
v-model.number="localMinValue"
type="number"
:min="min"
:max="max"
:step="step"
:disabled="disabled"
class="range-number-input range-input--min"
@input="handleMinInput"
>
<span class="range-separator" />
<input
v-model.number="localMaxValue"
type="number"
:min="min"
:max="max"
:step="step"
:disabled="disabled"
class="range-number-input range-input--max"
@input="handleMaxInput"
>
<button
type="button"
class="limit-button"
:disabled="disabled"
@click="handleLimitClick"
>
Limit
</button>
</div>

<!-- Range slider -->
<div class="range-slider-container">
<div
class="range-track"
:style="trackStyle"
@mousedown="handleSliderMouseDown"
>
<input
type="range"
:min="min"
:max="max"
:step="step"
:value="localMinValue"
:disabled="disabled"
class="range-slider range-slider--min"
data-handle="min"
@input="handleSliderChange"
>
<input
type="range"
:min="min"
:max="max"
:step="step"
:value="localMaxValue"
:disabled="disabled"
class="range-slider range-slider--max"
data-handle="max"
@input="handleSliderChange"
>
</div>
</div>
</div>
</template>

<style lang="scss" scoped>
@import '@/styles/dlc/_year-range-filter.scss';
</style>
Loading