Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(dialog): s2 standard dialog migration #2860

Open
wants to merge 20 commits into
base: spectrum-two
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
22f0c76
refactor(dialog): dialog controls/coverage
marissahuysentruyt Jun 17, 2024
581a560
refactor(modal): use corner-radius-800 to match design specs
marissahuysentruyt Aug 30, 2024
9e302ee
refactor(underlay): update comment notes for spectrum-overlay-color
marissahuysentruyt Aug 30, 2024
9f7296b
refactor(dialog): new css for S2 dialog
marissahuysentruyt Aug 30, 2024
36e767a
feat(dialog): rebuild mods
marissahuysentruyt Aug 30, 2024
4440ec9
chore(dialog): create changeset
marissahuysentruyt Aug 30, 2024
f651a9c
docs(dialog): add is-hidden-story tag
marissahuysentruyt Aug 30, 2024
a574a2b
fix(dialog): remove outdated todo comment
marissahuysentruyt Sep 12, 2024
ce0695a
chore(dialog): update peer deps data
marissahuysentruyt Sep 12, 2024
40ea620
chore(dialog): remove outdated comments
marissahuysentruyt Sep 12, 2024
3f54a6f
fix: fixup to updating peer deps
marissahuysentruyt Sep 12, 2024
0ececed
chore: remove divider tests
marissahuysentruyt Oct 21, 2024
b65c9db
chore: update changeset with new notes
marissahuysentruyt Oct 22, 2024
1dbb67a
refactor(dialog): grid,spacing,font updates and fixes
marissahuysentruyt Oct 22, 2024
67985ec
docs(dialog): updates to dialog to better reflect structure
marissahuysentruyt Oct 22, 2024
752c608
chore(buttongroup): add flex-wrap mod property
marissahuysentruyt Oct 30, 2024
94998bd
chore(buttongroup): creates buttongroup changeset
marissahuysentruyt Oct 30, 2024
68e8f0e
chore(dialog): pr updates
marissahuysentruyt Oct 30, 2024
54944bb
chore(buttongroup,dialog): rebuild mods
marissahuysentruyt Oct 30, 2024
4168200
chore(dialog): scope passthrough mods to spectrum-Dialog class
marissahuysentruyt Nov 1, 2024
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: 5 additions & 0 deletions .changeset/few-doors-smile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@spectrum-css/buttongroup": patch
---

Adds a new `--mod-buttongroup-flex-wrap` custom property to leverage if user wish to customize the flex-wrap property.
52 changes: 52 additions & 0 deletions .changeset/metal-fireants-switch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
"@spectrum-css/dialog": major
"@spectrum-css/modal": patch
"@spectrum-css/underlay": patch
---

Spectrum 2 Standard Dialog Migration

This is the migration for both standard dialog. The Divider component is no longer supported in S2 dialogs. In addition, some new and updated tokens are in place to update dialog corner rounding, font treatments, spacing/padding, and maximum/minimum widths. There were several new elements implemented as well, including optional header and footer content, hero/cover images, checkbox and text-only options in the footer content area.

The `.spectrum-Dialog--small`, `.spectrum-Dialog--medium`, and `.spectrum-Dialog--large` sizing classes were deprecated and removed from the CSS in favor of the t-shirt sizes. Additionally, the spelling of the `.spectrum-Dialog--dismissable` class was corrected to `.spectrum-Dialog--dismissible`.

Mod properties are either "new," have been renamed to reflect the respective dialog language, or were removed:

_New Mods_
`--mod-standard-dialog-spacing-title-to-header-content`
`--mod-standard-dialog-spacing-title-to-description`
`--mod-standard-dialog-header-content-font-size`

_Renamed Mods_
`--mod-dialog-confirm-small-width` > `--mod-standard-dialog-max-width-small`
`--mod-dialog-confirm-medium-width` > `--mod-standard-dialog-max-width`
`--mod-dialog-confirm-large-width` > `--mod-standard-dialog-max-width-large`
`--mod-dialog-confirm-border-radius` > `--mod-standard-dialog-border-radius`
`--mod-dialog-confirm-description-text-size` > `--mod-standard-dialog-description-font-size`
`--mod-dialog-confirm-description-text-line-height` > `--mod-standard-dialog-description-line-height`
`--mod-dialog-confirm-description-text-color` > `--mod-standard-dialog-description-text-color`
`--mod-dialog-confirm-description-font-weight` > `--mod-standard-dialog-description-font-weight`
`--mod-dialog-heading-font-weight` > `--mod-standard-dialog-heading-font-weight`
`--mod-dialog-confirm-title-text-line-height` > `--mod-standard-dialog-heading-line-height`
`--mod-dialog-confirm-title-text-color` > `--mod-standard-dialog-heading-text-color`
`--mod-dialog-confirm-title-text-size` > `--mod-standard-dialog-heading-font-size`
`--mod-dialog-confirm-hero-height` > `--mod-standard-dialog-hero-block-size`
`--mod-dialog-min-inline-size` > `--mod-standard-dialog-min-inline-size`
`--mod-dialog-confirm-padding-grid` > `--mod-standard-dialog-spacing-grid-padding`
`--mod-dialog-confirm-footer-padding-top` > `--mod-standard-dialog-spacing-description-to-footer`
`--mod-dialog-confirm-close-button-padding` > `--mod-standard-dialog-spacing-edge-to-close-button`
`--mod-dialog-confirm-gap-size` > `--mod-standard-dialog-spacing-footer-to-button-group`

_Removed Mods_
`--mod-dialog-confirm-buttongroup-padding-top`
`--mod-dialog-confirm-close-button-size`
`--mod-dialog-confirm-description-margin`
`--mod-dialog-confirm-description-padding`
`--mod-dialog-confirm-divider-block-spacing-end`
`--mod-dialog-confirm-divider-block-spacing-start`
`--mod-dialog-confirm-divider-height`

Modal and underlay updates

- Modal component now uses the updated corner rounding.
- Underlay has an updated comment that addresses the overlay-color/overlay-opacity tokens.
28 changes: 14 additions & 14 deletions components/buttongroup/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,28 @@ governing permissions and limitations under the License.
*/

.spectrum-ButtonGroup {
--spectrum-buttongroup-spacing-horizontal: var(--spectrum-spacing-200);
--spectrum-buttongroup-spacing-vertical: var(--spectrum-spacing-200);
--spectrum-buttongroup-spacing-horizontal: var(--spectrum-spacing-200);
--spectrum-buttongroup-spacing-vertical: var(--spectrum-spacing-200);
}

.spectrum-ButtonGroup--sizeS {
--spectrum-buttongroup-spacing-horizontal: var(--spectrum-spacing-100);
--spectrum-buttongroup-spacing-vertical: var(--spectrum-spacing-100);
--spectrum-buttongroup-spacing-horizontal: var(--spectrum-spacing-100);
--spectrum-buttongroup-spacing-vertical: var(--spectrum-spacing-100);
}

.spectrum-ButtonGroup {
display: flex;
flex-wrap: wrap;
gap: var(--mod-buttongroup-spacing-horizontal, var(--spectrum-buttongroup-spacing-horizontal));
justify-content: var(--mod-buttongroup-justify-content, normal);
display: flex;
flex-wrap: var(--mod-buttongroup-flex-wrap, wrap);
gap: var(--mod-buttongroup-spacing-horizontal, var(--spectrum-buttongroup-spacing-horizontal));
justify-content: var(--mod-buttongroup-justify-content, normal);

.spectrum-ButtonGroup-item {
flex-shrink: 0;
}
.spectrum-ButtonGroup-item {
flex-shrink: 0;
}
}

.spectrum-ButtonGroup--vertical {
display: inline-flex;
flex-direction: column;
gap: var(--mod-buttongroup-spacing-vertical, var(--spectrum-buttongroup-spacing-vertical));
display: inline-flex;
flex-direction: column;
gap: var(--mod-buttongroup-spacing-vertical, var(--spectrum-buttongroup-spacing-vertical));
}
1 change: 1 addition & 0 deletions components/buttongroup/metadata/mods.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
| Modifiable custom properties |
| -------------------------------------- |
| `--mod-buttongroup-flex-wrap` |
| `--mod-buttongroup-justify-content` |
| `--mod-buttongroup-spacing-horizontal` |
| `--mod-buttongroup-spacing-vertical` |
Loading
Loading