Skip to content

Commit

Permalink
BREAKING CHANGE(web): Button has isSymmetrical prop instead of isSqua…
Browse files Browse the repository at this point in the history
…re #DS-1484
  • Loading branch information
curdaj authored and literat committed Oct 17, 2024
1 parent a4e9ec5 commit 04a6ebb
Show file tree
Hide file tree
Showing 12 changed files with 40 additions and 40 deletions.
2 changes: 1 addition & 1 deletion packages/web/src/scss/components/Button/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Loading Button:
<use xlink:href="/icons/svg/sprite.svg#spinner" />
</svg>
</button>
<button type="button" class="Button Button--primary Button--medium Button--square Button--loading" disabled>
<button type="button" class="Button Button--primary Button--medium Button--symmetrical Button--loading" disabled>
<span class="accessibility-hidden">Menu</span>
<svg width="24" height="24" aria-hidden="true">
<use xlink:href="/icons/svg/sprite.svg#hamburger" />
Expand Down
2 changes: 1 addition & 1 deletion packages/web/src/scss/components/Button/_Button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
width: 100%;
}

.Button--square {
.Button--symmetrical {
flex: none;
aspect-ratio: 1;
padding-inline: 0;
Expand Down
6 changes: 3 additions & 3 deletions packages/web/src/scss/components/Button/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ <h2 class="docs-Heading">Size {{size}}</h2>
</svg>
Menu
</button>
<button type="button" class="Button Button--{{color}} Button--{{size}} Button--square">
<button type="button" class="Button Button--{{color}} Button--{{size}} Button--symmetrical">
<span class="accessibility-hidden">Menu</span>
<svg width="24" height="24" aria-hidden="true">
<use xlink:href="/assets/icons/svg/sprite.svg#hamburger" />
Expand Down Expand Up @@ -55,7 +55,7 @@ <h2 class="docs-Heading">Size {{size}}</h2>
</svg>
Menu
</button>
<button type="button" class="Button Button--{{color}} Button--{{size}} Button--square" disabled>
<button type="button" class="Button Button--{{color}} Button--{{size}} Button--symmetrical" disabled>
<span class="accessibility-hidden">Menu</span>
<svg width="24" height="24" aria-hidden="true">
<use xlink:href="/assets/icons/svg/sprite.svg#hamburger" />
Expand Down Expand Up @@ -97,7 +97,7 @@ <h2 class="docs-Heading">Size {{size}}</h2>
<use xlink:href="/assets/icons/svg/sprite.svg#spinner" />
</svg>
</button>
<button type="button" class="Button Button--{{color}} Button--{{size}} Button--square Button--loading" disabled>
<button type="button" class="Button Button--{{color}} Button--{{size}} Button--symmetrical Button--loading" disabled>
<span class="accessibility-hidden">Menu</span>
<svg width="24" height="24" aria-hidden="true">
<use xlink:href="/assets/icons/svg/sprite.svg#hamburger" />
Expand Down
8 changes: 4 additions & 4 deletions packages/web/src/scss/components/Footer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Use the secondary [Button][button] component to create social media links inside
<ul class="Flex Flex--row Flex--wrap Flex--alignmentXCenter Flex--alignmentYCenter">
<!-- Repeat the `<li>` block for each social media link. -->
<li>
<a href="https://www.example.com" class="Button Button--secondary Button--medium Button--square">
<a href="https://www.example.com" class="Button Button--secondary Button--medium Button--symmetrical">
<span class="accessibility-hidden">Facebook</span>
<svg width="24" height="24" aria-hidden="true">
<use xlink:href="/assets/icons/svg/sprite.svg#logo-facebook" />
Expand Down Expand Up @@ -177,23 +177,23 @@ This section is optional and consists of a [Flex][flex] layout with secondary li
<!-- Flex with social media links -->
<ul class="Flex Flex--row Flex--wrap Flex--alignmentXCenter Flex--alignmentYCenter" aria-label="Social media">
<li>
<a href="https://www.example.com" class="Button Button--secondary Button--medium Button--square">
<a href="https://www.example.com" class="Button Button--secondary Button--medium Button--symmetrical">
<span class="accessibility-hidden">Facebook</span>
<svg width="24" height="24" aria-hidden="true">
<use xlink:href="/assets/icons/svg/sprite.svg#logo-facebook" />
</svg>
</a>
</li>
<li>
<a href="https://www.example.com" class="Button Button--secondary Button--medium Button--square">
<a href="https://www.example.com" class="Button Button--secondary Button--medium Button--symmetrical">
<span class="accessibility-hidden">X</span>
<svg width="24" height="24" aria-hidden="true">
<use xlink:href="/assets/icons/svg/sprite.svg#logo-x" />
</svg>
</a>
</li>
<li>
<a href="https://www.example.com" class="Button Button--secondary Button--medium Button--square">
<a href="https://www.example.com" class="Button Button--secondary Button--medium Button--symmetrical">
<span class="accessibility-hidden">YouTube</span>
<svg width="24" height="24" aria-hidden="true">
<use xlink:href="/assets/icons/svg/sprite.svg#logo-youtube" />
Expand Down
10 changes: 5 additions & 5 deletions packages/web/src/scss/components/Footer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -210,39 +210,39 @@ <h3 class="typography-heading-xsmall-semibold mb-700" id="footer-navigation-sect
<!-- Flex with social media links -->
<ul class="Flex Flex--row Flex--wrap Flex--alignmentXCenter Flex--alignmentYCenter">
<li>
<a href="https://www.example.com" class="Button Button--tertiary Button--medium Button--square">
<a href="https://www.example.com" class="Button Button--tertiary Button--medium Button--symmetrical">
<span class="accessibility-hidden">Facebook</span>
<svg width="24" height="24" aria-hidden="true">
<use xlink:href="/assets/icons/svg/sprite.svg#logo-facebook" />
</svg>
</a>
</li>
<li>
<a href="https://www.example.com" class="Button Button--tertiary Button--medium Button--square">
<a href="https://www.example.com" class="Button Button--tertiary Button--medium Button--symmetrical">
<span class="accessibility-hidden">X</span>
<svg width="24" height="24" aria-hidden="true">
<use xlink:href="/assets/icons/svg/sprite.svg#logo-x" />
</svg>
</a>
</li>
<li>
<a href="https://www.example.com" class="Button Button--tertiary Button--medium Button--square">
<a href="https://www.example.com" class="Button Button--tertiary Button--medium Button--symmetrical">
<span class="accessibility-hidden">YouTube</span>
<svg width="24" height="24" aria-hidden="true">
<use xlink:href="/assets/icons/svg/sprite.svg#logo-youtube" />
</svg>
</a>
</li>
<li>
<a href="https://www.example.com" class="Button Button--tertiary Button--medium Button--square">
<a href="https://www.example.com" class="Button Button--tertiary Button--medium Button--symmetrical">
<span class="accessibility-hidden">Google</span>
<svg width="24" height="24" aria-hidden="true">
<use xlink:href="/assets/icons/svg/sprite.svg#logo-google" />
</svg>
</a>
</li>
<li>
<a href="https://www.example.com" class="Button Button--tertiary Button--medium Button--square">
<a href="https://www.example.com" class="Button Button--tertiary Button--medium Button--symmetrical">
<span class="accessibility-hidden">LinkedIn</span>
<svg width="24" height="24" aria-hidden="true">
<use xlink:href="/assets/icons/svg/sprite.svg#logo-linkedin" />
Expand Down
2 changes: 1 addition & 1 deletion packages/web/src/scss/components/Header/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ And the complete Header Dialog:
<div class="HeaderMobileActions">
<button
type="button"
class="Button Button--secondary Button--medium Button--square"
class="Button Button--secondary Button--medium Button--symmetrical"
data-spirit-toggle="offcanvas"
data-spirit-target="#header-dialog-example-1"
aria-controls="header-dialog-example-1"
Expand Down
6 changes: 3 additions & 3 deletions packages/web/src/scss/components/Header/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ <h2 class="docs-Heading">Header with Actions</h2>
<div class="HeaderMobileActions">
<button
type="button"
class="Button Button--secondary Button--medium Button--square"
class="Button Button--secondary Button--medium Button--symmetrical"
data-spirit-toggle="offcanvas"
data-spirit-target="#header-dialog-example-1"
aria-controls="header-dialog-example-1"
Expand Down Expand Up @@ -164,7 +164,7 @@ <h2 class="docs-Heading">Header with Actions and Header Dialog</h2>
<div class="HeaderMobileActions">
<button
type="button"
class="Button Button--secondary Button--medium Button--square"
class="Button Button--secondary Button--medium Button--symmetrical"
data-spirit-toggle="offcanvas"
data-spirit-target="#header-dialog-example-2-main-navigation"
aria-controls="header-dialog-example-2-main-navigation"
Expand Down Expand Up @@ -218,7 +218,7 @@ <h2 class="docs-Heading">Header with Actions and Header Dialog</h2>
>
Marian
</button>
<button type="button" class="Button Button--secondary Button--square Button--medium">
<button type="button" class="Button Button--secondary Button--symmetrical Button--medium">
<svg width="24" height="24" aria-hidden="true">
<use xlink:href="/assets/icons/svg/sprite.svg#search" />
</svg>
Expand Down
4 changes: 2 additions & 2 deletions packages/web/src/scss/components/Modal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ and allows users to easily close it.
<h2 id="modal-example-title" class="ModalHeader__title">Modal Title</h2>
<button
type="button"
class="Button Button--tertiary Button--square Button--medium"
class="Button Button--tertiary Button--symmetrical Button--medium"
data-spirit-dismiss="modal"
data-spirit-target="#modal-example"
aria-controls="modal-example"
Expand Down Expand Up @@ -370,7 +370,7 @@ When you put it all together:
<h2 id="modal-example-title" class="ModalHeader__title">Modal Title</h2>
<button
type="button"
class="Button Button--tertiary Button--square Button--medium"
class="Button Button--tertiary Button--symmetrical Button--medium"
data-spirit-dismiss="modal"
data-spirit-target="#modal-example"
aria-controls="modal-example"
Expand Down
20 changes: 10 additions & 10 deletions packages/web/src/scss/components/Modal/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ <h2 class="docs-Heading">Modal</h2>
<h2 id="example-basic-title" class="ModalHeader__title">Modal Title</h2>
<button
type="button"
class="Button Button--tertiary Button--square Button--medium"
class="Button Button--tertiary Button--symmetrical Button--medium"
data-spirit-dismiss="modal"
data-spirit-target="#example-basic"
aria-controls="example-basic"
Expand Down Expand Up @@ -208,7 +208,7 @@ <h2 id="example-basic-title" class="ModalHeader__title">Modal Title</h2>
<h2 id="example-form-title" class="ModalHeader__title">Modal with a Form</h2>
<button
type="button"
class="Button Button--tertiary Button--square Button--medium"
class="Button Button--tertiary Button--symmetrical Button--medium"
data-spirit-dismiss="modal"
data-spirit-target="#example-form"
aria-controls="example-form"
Expand Down Expand Up @@ -283,7 +283,7 @@ <h2 id="example-form-title" class="ModalHeader__title">Modal with a Form</h2>
<h2 id="example-dropdown-title" class="ModalHeader__title">Modal Title</h2>
<button
type="button"
class="Button Button--tertiary Button--square Button--medium"
class="Button Button--tertiary Button--symmetrical Button--medium"
data-spirit-dismiss="modal"
data-spirit-target="#example-dropdown"
aria-controls="example-dropdown"
Expand Down Expand Up @@ -398,7 +398,7 @@ <h2 id="example-long-content-title" class="ModalHeader__title">
</h2>
<button
type="button"
class="Button Button--tertiary Button--square Button--medium"
class="Button Button--tertiary Button--symmetrical Button--medium"
data-spirit-dismiss="modal"
data-spirit-target="#example-long-content"
aria-controls="example-long-content"
Expand Down Expand Up @@ -483,7 +483,7 @@ <h2 id="example-scrolling-modal-title" class="ModalHeader__title">
</h2>
<button
type="button"
class="Button Button--tertiary Button--square Button--medium"
class="Button Button--tertiary Button--symmetrical Button--medium"
data-spirit-dismiss="modal"
data-spirit-target="#example-scrolling-modal"
aria-controls="example-scrolling-modal"
Expand Down Expand Up @@ -578,7 +578,7 @@ <h2 id="example-scroll-view-title" class="ModalHeader__title">
</h2>
<button
type="button"
class="Button Button--tertiary Button--square Button--medium"
class="Button Button--tertiary Button--symmetrical Button--medium"
data-spirit-dismiss="modal"
data-spirit-target="#example-scroll-view"
aria-controls="example-scroll-view"
Expand Down Expand Up @@ -709,7 +709,7 @@ <h2 id="example-scroll-view-title" class="ModalHeader__title">
<h2 id="example-custom-height-title" class="ModalHeader__title">Modal with Custom Height</h2>
<button
type="button"
class="Button Button--tertiary Button--square Button--medium"
class="Button Button--tertiary Button--symmetrical Button--medium"
data-spirit-dismiss="modal"
data-spirit-target="#example-custom-height"
aria-controls="example-custom-height"
Expand Down Expand Up @@ -1009,7 +1009,7 @@ <h2 class="docs-Heading">Stacking Modals</h2>
<h2 id="example-stacking-parent-title" class="ModalHeader__title">Modal Title</h2>
<button
type="button"
class="Button Button--tertiary Button--square Button--medium"
class="Button Button--tertiary Button--symmetrical Button--medium"
data-spirit-dismiss="modal"
data-spirit-target="#example-stacking-parent"
aria-controls="example-stacking-parent"
Expand Down Expand Up @@ -1068,7 +1068,7 @@ <h2 id="example-stacking-parent-title" class="ModalHeader__title">Modal Title</h
<h2 id="example-stacking-nested-title" class="ModalHeader__title">Stacked Modal Title</h2>
<button
type="button"
class="Button Button--tertiary Button--square Button--medium"
class="Button Button--tertiary Button--symmetrical Button--medium"
data-spirit-dismiss="modal"
data-spirit-target="#example-stacking-nested"
aria-controls="example-stacking-nested"
Expand Down Expand Up @@ -1156,7 +1156,7 @@ <h2 class="docs-Heading">Disabled Backdrop Click</h2>
<h2 id="example-disabled-backdrop-click-title" class="ModalHeader__title">Modal Title</h2>
<button
type="button"
class="Button Button--tertiary Button--square Button--medium"
class="Button Button--tertiary Button--symmetrical Button--medium"
data-spirit-dismiss="modal"
data-spirit-target="#example-disabled-backdrop-click"
aria-controls="example-disabled-backdrop-click"
Expand Down
2 changes: 1 addition & 1 deletion packages/web/src/scss/components/Offcanvas/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The `data-spirit-target` attribute accepts a CSS selector to apply the Offcanvas
```html
<button
type="button"
class="Button Button--inverted Button--medium Button--square"
class="Button Button--inverted Button--medium Button--symmetrical"
data-spirit-toggle="offcanvas"
data-spirit-target="#offcanvas-example"
aria-controls="offcanvas-example"
Expand Down
8 changes: 4 additions & 4 deletions packages/web/src/scss/components/Pagination/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ First item selected:
</a>
</li>
<li class="Pagination__item">
<a href="#" class="Button Button--secondary Button--square">
<a href="#" class="Button Button--secondary Button--symmetrical">
<svg width="24" height="24" aria-hidden="true">
<use xlink:href="/icons/svg/sprite.svg#chevron-right" />
</svg>
Expand All @@ -53,7 +53,7 @@ Middle item selected:
<nav role="navigation" aria-label="Page navigation">
<ul class="Pagination">
<li class="Pagination__item">
<a href="#" class="Button Button--secondary Button--square">
<a href="#" class="Button Button--secondary Button--symmetrical">
<svg width="24" height="24" aria-hidden="true">
<use xlink:href="/icons/svg/sprite.svg#chevron-left" />
</svg>
Expand Down Expand Up @@ -91,7 +91,7 @@ Middle item selected:
</a>
</li>
<li class="Pagination__item">
<a href="#" class="Button Button--secondary Button--square">
<a href="#" class="Button Button--secondary Button--symmetrical">
<svg width="24" height="24" aria-hidden="true">
<use xlink:href="/icons/svg/sprite.svg#chevron-right" />
</svg>
Expand All @@ -108,7 +108,7 @@ Last item selected:
<nav role="navigation" aria-label="Page navigation">
<ul class="Pagination">
<li class="Pagination__item">
<a href="#" class="Button Button--secondary Button--square">
<a href="#" class="Button Button--secondary Button--symmetrical">
<svg width="24" height="24" aria-hidden="true">
<use xlink:href="/icons/svg/sprite.svg#chevron-left" />
</svg>
Expand Down
10 changes: 5 additions & 5 deletions packages/web/src/scss/components/Pagination/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ <h2 class="docs-Heading">Pagination Current First</h2>
</a>
</li>
<li class="Pagination__item">
<a href="#" class="Button Button--secondary Button--medium Button--square">
<a href="#" class="Button Button--secondary Button--medium Button--symmetrical">
<svg width="24" height="24" aria-hidden="true">
<use xlink:href="/assets/icons/svg/sprite.svg#chevron-right" />
</svg>
Expand All @@ -68,7 +68,7 @@ <h2 class="docs-Heading">Pagination Current Middle</h2>
<nav role="navigation" aria-label="Page navigation">
<ul class="Pagination">
<li class="Pagination__item">
<a href="#" class="Button Button--secondary Button--medium Button--square">
<a href="#" class="Button Button--secondary Button--medium Button--symmetrical">
<svg width="24" height="24" aria-hidden="true">
<use xlink:href="/assets/icons/svg/sprite.svg#chevron-left" />
</svg>
Expand Down Expand Up @@ -110,7 +110,7 @@ <h2 class="docs-Heading">Pagination Current Middle</h2>
</a>
</li>
<li class="Pagination__item">
<a href="#" class="Button Button--secondary Button--medium Button--square">
<a href="#" class="Button Button--secondary Button--medium Button--symmetrical">
<svg width="24" height="24" aria-hidden="true">
<use xlink:href="/assets/icons/svg/sprite.svg#chevron-right" />
</svg>
Expand All @@ -133,7 +133,7 @@ <h2 class="docs-Heading">Pagination Current Last</h2>
<nav role="navigation" aria-label="Page navigation">
<ul class="Pagination">
<li class="Pagination__item">
<a href="#" class="Button Button--secondary Button--medium Button--square">
<a href="#" class="Button Button--secondary Button--medium Button--symmetrical">
<svg width="24" height="24" aria-hidden="true">
<use xlink:href="/assets/icons/svg/sprite.svg#chevron-left" />
</svg>
Expand Down Expand Up @@ -224,7 +224,7 @@ <h2 class="docs-Heading">Pagination Current First Centered</h2>
</a>
</li>
<li class="Pagination__item">
<a href="#" class="Button Button--secondary Button--medium Button--square">
<a href="#" class="Button Button--secondary Button--medium Button--symmetrical">
<svg width="24" height="24" aria-hidden="true">
<use xlink:href="/assets/icons/svg/sprite.svg#chevron-right" />
</svg>
Expand Down

0 comments on commit 04a6ebb

Please sign in to comment.