Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
41a7bbe
feat: use aria-invalid and :user-invalid instead of is-invalid and :i…
MaxLardenois Feb 23, 2026
cefc8ab
feat: improve css in control item and use aria-invalid/:user-invalid …
MaxLardenois Feb 23, 2026
29556e0
feat: use aria-invalid and user-invalid on text inputs
MaxLardenois Feb 23, 2026
c0518a8
feat: use aria-invalid and user-invalid on text area
MaxLardenois Feb 23, 2026
f982752
fix: remove unwanted bootstrap invalid handling
MaxLardenois Feb 23, 2026
52e4d24
Restore form-validation documentation page
hannahiss Feb 11, 2026
65a7a8a
Restore form-validation documentation page
hannahiss Feb 11, 2026
d410303
Restore form-validation documentation page
hannahiss Feb 11, 2026
46b80d4
fix form ids and needs validation
hannahiss Feb 13, 2026
cda0a68
doc
hannahiss Feb 13, 2026
68b8389
ids
hannahiss Feb 13, 2026
43332f8
ids
hannahiss Feb 13, 2026
867db65
feat: update with :user-invalid and aria-invalid
MaxLardenois Mar 3, 2026
ce67984
feat(docs): add an inline search field for component in list doc page
MaxLardenois Mar 3, 2026
1b31ce9
fix: typo
MaxLardenois Mar 3, 2026
95efe9d
feat: add user input validity check
MaxLardenois Mar 3, 2026
5a65748
feat: handle correctly aria-describedby
MaxLardenois Mar 3, 2026
964130f
Merge branch 'ouds/main' into ouds/main-ml-component-finder
MaxLardenois Mar 4, 2026
558f4f3
Apply suggestions from code review
MaxLardenois Mar 4, 2026
ab7228e
feat: after review
MaxLardenois Mar 4, 2026
45c3fc2
fix: remove settimeout
MaxLardenois Mar 5, 2026
b122851
fix: after review
MaxLardenois Mar 6, 2026
3adcefe
feat: more info on a11y
MaxLardenois Mar 6, 2026
e2bcaa7
oupsie button label
MaxLardenois Mar 6, 2026
73b8cb0
feat(docs): double component in components cards where possible like …
MaxLardenois Mar 9, 2026
ff7e87c
after copilot review
MaxLardenois Mar 9, 2026
d72e58b
Merge branch 'ouds/main' into ouds/main-his-form-validation
MaxLardenois Mar 9, 2026
0453e1e
Merge branch 'ouds/main' into ouds/main-ml-have-each-component-in-lig…
MaxLardenois Mar 9, 2026
c007c07
feat: update components details
MaxLardenois Mar 9, 2026
4aa0d2c
feat: add headings in page
MaxLardenois Mar 9, 2026
67a0798
fix: remove aria-current
MaxLardenois Mar 9, 2026
8818e1a
fix: missing helper text
MaxLardenois Mar 9, 2026
9833ac7
Merge branch 'ouds/main' into ouds/main-ml-component-finder
MaxLardenois Mar 9, 2026
4d81394
Merge branch 'ouds/main-his-form-validation' into ouds/main-ml-compon…
MaxLardenois Mar 9, 2026
a69636a
Merge branch 'ouds/main-ml-have-each-component-in-light-and-dark-mode…
MaxLardenois Mar 9, 2026
f4d9881
fix: forgotten modif
MaxLardenois Mar 9, 2026
afed057
feat: add search by first letter
MaxLardenois Mar 9, 2026
20418fe
feat: add inputmode
MaxLardenois Mar 10, 2026
3b8a985
test input mode
MaxLardenois Mar 10, 2026
c55f547
test input mode 2
MaxLardenois Mar 10, 2026
4831735
test input modee
MaxLardenois Mar 10, 2026
4e6b946
fix: right quote
MaxLardenois Mar 10, 2026
b9ec773
fix: right end quote
MaxLardenois Mar 10, 2026
e072017
fix: again vnu
MaxLardenois Mar 10, 2026
ff901be
fix: legend behavior
MaxLardenois Mar 11, 2026
4bfd22b
fix: to relaucnh ci
MaxLardenois Mar 11, 2026
ba02835
Merge branch 'ouds/main' into ouds/main-ml-component-finder
MaxLardenois Mar 12, 2026
2a0b3cf
fix: remove merge errors
MaxLardenois Mar 12, 2026
2ff54f2
feat: add no filter option, label on top
MaxLardenois Mar 12, 2026
c97d904
feat: update wording and remove flex on fieldset
MaxLardenois Mar 13, 2026
2378c88
fix: reboot
MaxLardenois Mar 13, 2026
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
5 changes: 4 additions & 1 deletion build/vnu-jar.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ execFile('java', ['-version'], (error, stdout, stderr) => {
'Attribute “switch” not allowed on element “input” at this point.',
'Element “style” not allowed as child of element “div” in this context.*',
// Allow empty option in select
'Element “option” without attribute “label” must not be empty.'
'Element “option” without attribute “label” must not be empty.',
// Allow inputmode
'.*The “inputmode” attribute is not supported in all browsers.*'
// !!! WARNING !!! check both quotes you are using when updating this list
// End mod
].join('|')

Expand Down
7 changes: 3 additions & 4 deletions scss/_reboot.scss
Original file line number Diff line number Diff line change
Expand Up @@ -624,10 +624,10 @@ textarea {
// 2. Reset the default outline behavior of fieldsets so they don't affect page layout.

fieldset {
min-width: 0; // 1
min-inline-size: 0; // 1
padding: 0; // 2
margin: 0; // 2
border: 0; // 2
border: unset; // 2
}

// 1. By using `float: left`, the legend will behave like a block element.
Expand All @@ -636,8 +636,7 @@ fieldset {
// See https://github.com/twbs/bootstrap/issues/29712

legend {
float: left; // 1
width: 100%;
float: left;
padding: 0;
margin-bottom: $legend-margin-bottom;
font-weight: $legend-font-weight;
Expand Down
2 changes: 1 addition & 1 deletion site/src/components/shortcodes/ComponentCard.astro
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ interface Props {
const { component, idPrefix } = Astro.props
---

<li class="col">
<li class="col" data-name={component.name.toLowerCase()}>
<div class="card h-100">
<div class="card-top bg-secondary">
<div class="ratio-16x9 d-flex flex-column justify-content-center align-items-center" inert>
Expand Down
99 changes: 99 additions & 0 deletions site/src/components/shortcodes/ComponentFinder.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
---
import { getVersionedDocsPath } from '@libs/path'
import { componentsDetails } from '../../../data/components-details'

const existingStartingLetters = [...new Set(componentsDetails.map((component) => component.name.charAt(0)))]
---

<ouds-component-finder>
<form class="needs-validation mb-gridgap" novalidate onsubmit="return false">
<div class="text-input mb-small">
<div class="text-input-container">
<svg aria-hidden="true">
<use xlink:href={getVersionedDocsPath('assets/img/ouds-web-sprite.svg#search')}></use>
</svg>
<label for="oudsComponentFinderInput">
Start typing to filter components <span class="visually-hidden">and update the component list below</span>
</label>
<input
type="search"
name="componentFinderInput"
id="oudsComponentFinderInput"
class="text-input-field"
pattern="[a-zA-Z \\-]+"
placeholder=" "
data-feedback-id="componentSearchFeedback"
inputmode="search"
/>
</div>
<p id="usernameFeedback" class="error-text">Alphabetical characters only.</p>
</div>
<fieldset class="d-md-flex align-items-center gap-xsmall" data-alpha-filter>
<legend class="my-md-none flex-shrink-0">
<span class="visually-hidden">filter by </span>Starting letter:
</legend>
<div class="chips-container">
<div class="chip chip-filter">
<input type="radio" id="radioCheckAll" name="componentFinderAlpha" value="all" checked />
<label class="chip-interactive" for="radioCheckAll">No filter</label>
</div>
{
existingStartingLetters.map((char) => (
<div class="chip chip-filter">
<input type="radio" id={`radioCheck${char}`} name="componentFinderAlpha" value={char.toLowerCase()} />
<label class="chip-interactive" for={`radioCheck${char}`}>
{char}
</label>
</div>
))
}
</div>
</fieldset>
</form>
<ul class="list-unstyled row gy-large row-cols-1 row-cols-sm-2 row-cols-xl-3 row-cols-2xl-4" data-component-list>
<slot />
</ul>
</ouds-component-finder>

<script>
class OudsComponentFinder extends HTMLElement {
connectedCallback() {
const searchForm = this.querySelector('form') as HTMLFormElement
if (!searchForm) return
const finderInput = searchForm.elements.namedItem('componentFinderInput') as HTMLInputElement
const finderAlpha = searchForm.elements.namedItem('componentFinderAlpha') as RadioNodeList
const alphaFieldset = this.querySelector('[data-alpha-filter]')
if (!finderInput || !alphaFieldset || !finderAlpha) return

finderInput.addEventListener('input', () => {
this.resetList()
this.resetAlphaFinder()
if (finderInput.value && finderInput.checkValidity()) {
this.querySelectorAll(
`ul[data-component-list] > :not([data-name*="${finderInput.value.toLowerCase()}"])`
).forEach((elt) => elt.classList.add('d-none'))
}
})

alphaFieldset.addEventListener('change', () => {
this.resetList()
if (finderAlpha.value && finderAlpha.value !== 'all') {
this.querySelectorAll(`ul[data-component-list] > :not([data-name^="${finderAlpha.value}"])`).forEach((elt) =>
elt.classList.add('d-none')
)
}
})
}

resetList() {
this.querySelectorAll('ul[data-component-list] > *').forEach((elt) => elt.classList.remove('d-none'))
}

resetAlphaFinder() {
this.querySelectorAll('input[type=radio]').forEach((elt) => ((elt as HTMLInputElement).checked = false))
;(this.querySelector('input[type=radio][value="all"]') as HTMLInputElement).checked = true
}
}

customElements.define('ouds-component-finder', OudsComponentFinder)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm wondering if we need the web component here, the js should work just fine even without it right ?

Copy link
Copy Markdown
Collaborator Author

@MaxLardenois MaxLardenois Mar 5, 2026

Choose a reason for hiding this comment

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

We do not per se, but it permits to constrain the JS to here. Also a thing proposed by Astro

</script>
7 changes: 5 additions & 2 deletions site/src/content/docs/components.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,20 @@ aliases:
- "/docs/components/"
- "/docs/[[config:docs_version]]/components/"
toc: true
extra_js:
- src: "[[docsref:/assets/js/validate-forms.js]]"
async: true
---

import { componentsDetails } from '../../../data/components-details'

## Alphabetical order

<ul class="list-unstyled row gy-large row-cols-1 row-cols-sm-2 row-cols-xl-3 row-cols-2xl-4">
<ComponentFinder>
{
componentsDetails.map((component) => <ComponentCard component={component} idPrefix={'_alpha'} />)
}
</ul>
</ComponentFinder>

<hr />

Expand Down
1 change: 1 addition & 0 deletions site/src/types/auto-import.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export declare global {
export const CalloutSoon: typeof import('@shortcodes/CalloutSoon.astro').default
export const Code: typeof import('@shortcodes/Code.astro').default
export const ComponentCard: typeof import('@shortcodes/ComponentCard.astro').default
export const ComponentFinder: typeof import('@shortcodes/ComponentFinder.astro').default
export const DeprecatedIn: typeof import('@shortcodes/DeprecatedIn.astro').default
export const EnableBtnCloseTooltip: typeof import('@shortcodes/EnableBtnCloseTooltip.astro').default
export const Example: typeof import('@shortcodes/Example.astro').default
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading