Skip to content

Commit

Permalink
Implementing Size, Spacing and Dimension tokens and associated doc
Browse files Browse the repository at this point in the history
  • Loading branch information
louismaximepiton committed Oct 24, 2024
1 parent 147459f commit 33dc6ce
Show file tree
Hide file tree
Showing 81 changed files with 24,864 additions and 1,409 deletions.
12 changes: 6 additions & 6 deletions .bundlewatch.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"files": [
{
"path": "./dist/css/ouds-web-bootstrap.css",
"maxSize": "51.0 kB"
"maxSize": "61.0 kB"
},
{
"path": "./dist/css/ouds-web-bootstrap.min.css",
"maxSize": "47.75 kB"
"maxSize": "58.0 kB"
},
{
"path": "./dist/css/ouds-web-grid.css",
Expand All @@ -26,19 +26,19 @@
},
{
"path": "./dist/css/ouds-web-utilities.css",
"maxSize": "14.25 kB"
"maxSize": "20.75 kB"
},
{
"path": "./dist/css/ouds-web-utilities.min.css",
"maxSize": "13.5 kB"
"maxSize": "19.75 kB"
},
{
"path": "./dist/css/ouds-web.css",
"maxSize": "49.0 kB"
"maxSize": "54.75 kB"
},
{
"path": "./dist/css/ouds-web.min.css",
"maxSize": "45.5 kB"
"maxSize": "51.5 kB"
},
{
"path": "./dist/js/ouds-web.bundle.js",
Expand Down
14 changes: 13 additions & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,18 @@
"navigations",
"navs",
"Neue",
"nhuge",
"njumbo",
"nmedium",
"noindex",
"nshort",
"nshorter",
"nshortest",
"nsmash",
"nspacious",
"ntall",
"ntaller",
"ntallest",
"Noto",
"offcanvas",
"offcanvases",
Expand Down Expand Up @@ -120,6 +131,7 @@
"svgs",
"tabbable",
"tarteaucitron",
"tblrsexy",
"textareas",
"tiktok",
"toggleable",
Expand Down Expand Up @@ -160,4 +172,4 @@
"CHANGELOG.md"
],
"useGitignore": true
}
}
8 changes: 4 additions & 4 deletions js/tests/integration/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
<title>Hello, world!</title>
</head>
<body>
<div class="container-fluid py-4">
<div class="container-fluid py-tall">
<h1>Hello, world!</h1>

<div class="mt-5">
<button type="button" class="btn btn-secondary mb-3" data-bs-toggle="tooltip" data-bs-placement="top" title="Tooltip on top">
<div class="mt-spacious">
<button type="button" class="btn btn-secondary mb-medium" data-bs-toggle="tooltip" data-bs-placement="top" title="Tooltip on top">
Tooltip on top
</button>

<div id="carouselExampleIndicators" class="carousel slide mt-2" data-bs-ride="carousel">
<div id="carouselExampleIndicators" class="carousel slide mt-shorter" data-bs-ride="carousel">
<div class="carousel-indicators">
<button type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide-to="0" aria-label="Slide 1"></button>
<button type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide-to="1" class="active" aria-current="true" aria-label="Slide 2"></button>
Expand Down
4 changes: 2 additions & 2 deletions js/tests/unit/toast.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ describe('Toast', () => {
return new Promise(resolve => {
fixtureEl.innerHTML = [
'<div class="toast" data-bs-delay="1" data-bs-autohide="false" data-bs-animation="false">',
' <button type="button" class="ms-2 mb-1 btn-close" data-bs-dismiss="toast"><span class="visually-hidden">Close</span></button>', // OUDS mod: replace aria-label="Close" with a visually hidden span (a11y)
' <button type="button" class="ms-shorter mb-shortest btn-close" data-bs-dismiss="toast"><span class="visually-hidden">Close</span></button>', // OUDS mod: replace aria-label="Close" with a visually hidden span (a11y)
'</div>'
].join('')

Expand Down Expand Up @@ -99,7 +99,7 @@ describe('Toast', () => {

fixtureEl.innerHTML = [
'<div class="toast" data-bs-autohide="false" data-bs-animation="false">',
' <button type="button" class="ms-2 mb-1 btn-close" data-bs-dismiss="toast"><span class="visually-hidden">Close</span></button>', // OUDS mod: replace aria-label="Close" with a visually hidden span (a11y)
' <button type="button" class="ms-shorter mb-shortest btn-close" data-bs-dismiss="toast"><span class="visually-hidden">Close</span></button>', // OUDS mod: replace aria-label="Close" with a visually hidden span (a11y)
'</div>'
].join('')

Expand Down
8 changes: 4 additions & 4 deletions js/tests/visual/collapse.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ <h1>Collapse <small>Bootstrap Visual Test</small></h1>
<div id="accordion" role="tablist">
<div class="card" role="presentation">
<div class="card-header" role="tab" id="headingOne">
<h5 class="mb-0">
<h5 class="mb-none">
<a data-bs-toggle="collapse" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
Collapsible Group Item #1
</a>
Expand All @@ -28,7 +28,7 @@ <h5 class="mb-0">
</div>
<div class="card" role="presentation">
<div class="card-header" role="tab" id="headingTwo">
<h5 class="mb-0">
<h5 class="mb-none">
<a class="collapsed" data-bs-toggle="collapse" href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
Collapsible Group Item #2
</a>
Expand All @@ -42,7 +42,7 @@ <h5 class="mb-0">
</div>
<div class="card" role="presentation">
<div class="card-header" role="tab" id="headingThree">
<h5 class="mb-0">
<h5 class="mb-none">
<a class="collapsed" data-bs-toggle="collapse" href="#collapseThree" aria-expanded="false" aria-controls="collapseThree">
Collapsible Group Item #3
</a>
Expand All @@ -56,7 +56,7 @@ <h5 class="mb-0">
</div>
<div class="card" role="presentation">
<div class="card-header" role="tab" id="headingFour">
<h5 class="mb-0">
<h5 class="mb-none">
<a class="collapsed" data-bs-toggle="collapse" href="#collapseFour" aria-expanded="false" aria-controls="collapseFour">
Collapsible Group Item with XSS in data-bs-parent
</a>
Expand Down
14 changes: 7 additions & 7 deletions js/tests/visual/dropdown.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ <h1>Dropdown <small>Bootstrap Visual Test</small></h1>
</div>
</nav>

<ul class="nav nav-pills mt-3">
<ul class="nav nav-pills mt-medium">
<li class="nav-item">
<a class="nav-link active" href="#">Active</a>
</li>
Expand All @@ -60,7 +60,7 @@ <h1>Dropdown <small>Bootstrap Visual Test</small></h1>
</ul>

<div class="row">
<div class="col-sm-12 mt-4">
<div class="col-sm-12 mt-tall">
<div class="dropdown">
<button type="button" class="btn btn-secondary" data-bs-toggle="dropdown" aria-expanded="false">Dropdown</button>
<div class="dropdown-menu">
Expand All @@ -80,7 +80,7 @@ <h1>Dropdown <small>Bootstrap Visual Test</small></h1>
</div>
</div>

<div class="col-sm-12 mt-4">
<div class="col-sm-12 mt-tall">
<div class="btn-group dropup">
<button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">Dropup</button>
<ul class="dropdown-menu">
Expand All @@ -102,7 +102,7 @@ <h1>Dropdown <small>Bootstrap Visual Test</small></h1>
</div>
</div>

<div class="col-sm-12 mt-4">
<div class="col-sm-12 mt-tall">
<div class="btn-group dropup">
<a href="#" class="btn btn-secondary">Dropup split align end</a>
<button type="button" id="dropdown-page-subheader-button-3" class="btn btn-secondary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false">
Expand All @@ -124,7 +124,7 @@ <h1>Dropdown <small>Bootstrap Visual Test</small></h1>
</div>
</div>

<div class="col-sm-12 mt-4">
<div class="col-sm-12 mt-tall">
<div class="btn-group dropend">
<a href="#" class="btn btn-secondary">Dropend split</a>
<button type="button" id="dropdown-page-subheader-button-4" class="btn btn-secondary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false">
Expand Down Expand Up @@ -172,7 +172,7 @@ <h1>Dropdown <small>Bootstrap Visual Test</small></h1>
</div>

<div class="row">
<div class="col-sm-3 mt-4">
<div class="col-sm-3 mt-tall">
<div class="btn-group dropdown">
<button type="button" class="btn btn-secondary">Dropdown reference</button>
<button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false" data-bs-reference="parent">
Expand All @@ -185,7 +185,7 @@ <h1>Dropdown <small>Bootstrap Visual Test</small></h1>
</ul>
</div>
</div>
<div class="col-sm-3 mt-4">
<div class="col-sm-3 mt-tall">
<div class="dropdown">
<button class="btn btn-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown" data-bs-display="static" aria-expanded="false">
Dropdown menu without Popper
Expand Down
12 changes: 6 additions & 6 deletions js/tests/visual/input.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,26 @@ <h1>Input <small>Bootstrap Visual Test</small></h1>

<h2>No layout</h2>

<div class="mb-3">
<div class="mb-medium">
Text
<input class="form-control">
</div>
<div class="mb-3">
<div class="mb-medium">
Email
<input type="email" class="form-control">
</div>
<div class="mb-3">
<div class="mb-medium">
Number
<input type="number" class="form-control">
</div>
<div class="mb-3">
<div class="mb-medium">
Date
<input type="date" class="form-control">
</div>

<h2>Flex</h2>

<div class="d-flex flex-wrap gap-3 mb-3">
<div class="d-flex flex-wrap gap-medium mb-medium">
<div>
Text
<input class="form-control">
Expand All @@ -53,7 +53,7 @@ <h2>Flex</h2>

<h2>Grid</h2>

<div class="row mb-3">
<div class="row mb-medium">
<div class="col">
Text
<input class="form-control">
Expand Down
10 changes: 5 additions & 5 deletions js/tests/visual/modal.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
</div>
</nav>

<div class="container-fluid mt-3">
<div class="container-fluid mt-medium">
<h1>Modal <small>Bootstrap Visual Test</small></h1>

<div class="modal fade" id="myModal" tabindex="-1" aria-labelledby="myModalLabel" aria-hidden="true">
Expand All @@ -59,7 +59,7 @@ <h4>Tooltips in a modal</h4>
<div id="accordion" role="tablist">
<div class="card" role="presentation">
<div class="card-header" role="tab" id="headingOne">
<h5 class="mb-0">
<h5 class="mb-none">
<a data-bs-toggle="collapse" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
Collapsible Group Item #1
</a>
Expand All @@ -74,7 +74,7 @@ <h5 class="mb-0">
</div>
<div class="card" role="presentation">
<div class="card-header" role="tab" id="headingTwo">
<h5 class="mb-0">
<h5 class="mb-none">
<a class="collapsed" data-bs-toggle="collapse" href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
Collapsible Group Item #2
</a>
Expand All @@ -88,7 +88,7 @@ <h5 class="mb-0">
</div>
<div class="card" role="presentation">
<div class="card-header" role="tab" id="headingThree">
<h5 class="mb-0">
<h5 class="mb-none">
<a class="collapsed" data-bs-toggle="collapse" href="#collapseThree" aria-expanded="false" aria-controls="collapseThree">
Collapsible Group Item #3
</a>
Expand Down Expand Up @@ -188,7 +188,7 @@ <h1 class="modal-title h4" id="slowModalLabel">Lorem slowly</h1>

<br><br>

<div class="text-bg-dark p-2" id="tall" style="display: none;">
<div class="text-bg-dark p-shorter" id="tall" style="display: none;">
Tall body content to force the page to have a scrollbar.
</div>

Expand Down
8 changes: 4 additions & 4 deletions js/tests/visual/toast.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<div class="container-fluid">
<h1>Toast <small>Bootstrap Visual Test</small></h1>

<div class="row mt-3">
<div class="row mt-medium">
<div class="col-md-12">
<button id="btnShowToast" class="btn btn-primary">Show toast</button>
<button id="btnHideToast" class="btn btn-primary">Hide toast</button>
Expand All @@ -28,7 +28,7 @@ <h1>Toast <small>Bootstrap Visual Test</small></h1>
<div class="notifications">
<div id="toastAutoHide" class="toast" role="alert" aria-live="assertive" aria-atomic="true" data-bs-delay="2000">
<div class="toast-header">
<span class="d-block bg-primary rounded me-2" style="width: 20px; height: 20px;"></span>
<span class="d-block bg-primary rounded me-shorter" style="width: 20px; height: 20px;"></span>
<strong class="me-auto">Bootstrap</strong>
<small>11 mins ago</small>
</div>
Expand All @@ -39,10 +39,10 @@ <h1>Toast <small>Bootstrap Visual Test</small></h1>

<div class="toast" data-bs-autohide="false" role="alert" aria-live="assertive" aria-atomic="true">
<div class="toast-header">
<span class="d-block bg-primary rounded me-2" style="width: 20px; height: 20px;"></span>
<span class="d-block bg-primary rounded me-shorter" style="width: 20px; height: 20px;"></span>
<strong class="me-auto">Bootstrap</strong>
<small class="text-body-secondary">2 seconds ago</small>
<button type="button" class="ms-2 mb-1 btn-close" data-bs-dismiss="toast"><span class="visually-hidden">Close</span></button><!--OUDS mod: a11y-->
<button type="button" class="ms-shorter mb-shortest btn-close" data-bs-dismiss="toast"><span class="visually-hidden">Close</span></button><!--OUDS mod: a11y-->
</div>
<div class="toast-body">
Heads up, toasts will stack automatically
Expand Down
8 changes: 4 additions & 4 deletions js/tests/visual/tooltip.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,21 +63,21 @@ <h1>Tooltip <small>OUDS Web Visual Test</small></h1>
<div class="col-sm-3">
<div id="target" title="Test tooltip on transformed element"></div>
</div>
<div id="shadow" class="pt-5"></div>
<div id="shadow" class="pt-spacious"></div>
</div>
<div id="customContainer"></div>

<div class="row mt-4 border-top">
<div class="row mt-tall border-top">
<hr>
<div class="h4">Test Selector triggered tooltips</div>
<div id="wrapperTriggeredBySelector">
<div class="py-2 selectorButtonsBlock">
<div class="py-shorter selectorButtonsBlock">
<button type="button" class="btn btn-secondary bs-dynamic-tooltip" title="random title">Using title</button>
<button type="button" class="btn btn-secondary bs-dynamic-tooltip" data-bs-title="random title">Using bs-title</button>
</div>

</div>
<div class="mt-3">
<div class="mt-medium">
<button type="button" class="btn btn-primary" onclick="duplicateButtons()">Duplicate above two buttons</button>
</div>
</div>
Expand Down
Loading

0 comments on commit 33dc6ce

Please sign in to comment.