v3.8.0
Published on 18 December 2024
Added
- Banner: added
editorial
prop toBanner
to control styling of editorial/holiday Banners - Icon: added icons
language
replace
personal
video_chat
Updated
- Button: updated text wrapping behavior to use
break-word
instead ofbreak-all
- Icon: updated icons
download
upload
share
- Icon: prevent icons from being draggable
- List: improve a11y of
BulletListIcon
by marking images asrole="presentation"
- ModalDialog: remove the dividing line from the non-pinned footer
Fixed
- ProgressBar: added missing accessibility support
- ThumbnailsHero & Carousel: fixed height bug on mobile where the dots for fixed position
ThumbnailsHero
andCarousel
would overflow onto content below
Deprecated
- FormLabel:
skin
prop has been deprecated and is no longer necessary with the new visual language. - StandardForm:
skin
prop has been deprecated and is no longer necessary with the new visual language.
v3.7.2
Published on 06 December 2024
Fixed
- ModalDialog: Fixed footers being cut off by the address bar on iOS 18.0 & 18.1
v3.7.1
Published on 20 November 2024
Updated
- Dropdown & Listbox: updated padding right to a new value viz.
sem.space.9
Fixed
- Banner: DoubleBanner styling overwriting Editorial font skins for holiday banners
v3.7.0
Published on 18 November 2024
Added
- Banner: added
imageFocalPoint
prop toBannerImage
andBannerSecondaryImage
subcomponent to allow different focalPoints for different images
Updated
- SelectionSet: border colors changed to align with secondary Buttons
- StandardTile: removed margin-bottom from tile when rendered inside of a Carousel to better align with the Visual Language
- StandardTile: removed padding-bottom to better utilise the page space and now using flex gap to set apart the sections in a tile
Deprecated
- Banner: deprecated
imageFocalPoint
onBanner
component. Set theimageFocalPoint
on theBannerImage
orBannerSecondaryImage
components instead
Fixed
- Button: removed custom icon styling from button to inherit the default icon skin styling
- ModalDialog: fixed an issue where the dialog would close unintentionally when the mouse was dragged outside the dialog boundaries.
- Popover: fixed the missing drop shadow value
- ToggleSwitch: removed the left and vertical padding
v3.6.1
Published on 06 November 2024
- Carousel: fix invalid element type error by reverting rollup v4 migration released in v3.6.0
v3.6.0
Published on 29 October 2024
Added
- Icon: added icons
promo
resize
ai
share
fill
lock
unlock
file_jpg
file_svg
file_png
- Tabs: added support for adding icons within Tabs
- Tokens: added two new semantic tokens for both bg and border colors
accent-strong-hover-paired
accent-strong-active-paired
- Tokens: added two new semantic spacing tokens for input
sem.space.input.padding.horizontal
sem.space.input.padding.vertical
Updated
- Icon: updated icons
file_ai
file_eps
file_id
file_pdf
file_psd
designer_marketplace
email
- RadioButton: updated the dot size in the selected state from 6px to
{base.space.100}
- Selection Set: update border radius when using
skin="buttons"
- StandardTile: reduce the spacing between content and the image to be
sem.space.4
on large screens andsem.space.3
on small screens. - Tokens: improve color contrast of placeholder text in dark mode
Fixed
- Tokens: adjusted values of
base.color.green.400
,base.color.navy.400
,base.color.grey.400
,base.color.red.400
, andbase.color.yellow.700
to fix contrast issues
Deprecated
- Icon:
- deprecated
iconType
prop value:email
replace withmail
- deprecated
v3.5.0
Published on 09 October 2024
Added
- Icon: add new
skin
prop valueaccent
.
Updated
- AlertBox: reduce the right padding when the alert is not dismissible
- Carousel: slight visual changes to focus state indicator, for more standardization
- Link: links with icons now have increased space between the icon and text
- Button: update long text to wrap to a new line
- SearchInput: updated the icon used for clearing text
- StandardTile: contents within StandardTileOverlay now align to the top
Fixed
- Banner: disabled primary buttons now show correct colors
- Link: fixed irrelevant warning being thrown when using
covering
prop - Pagination: disabling PaginationStep and PaginationButton properly disables the element
- StandardTile:
- fixed Tile Name font skin (which updated the line-height) to match the figma value
- remove the top padding for the Link with
unstyled
skin when used inside the tile content
- SelectionSet: update the line-height for the
standard
andbutton
skin. - TextInput, TextArea: increased font size to 16px on focus in sm and xs screens to prevent auto-zoom in iOS Safari
Deprecated
- Button, Icon components no longer require a style key. The necessary styles are now included in the core stylesheet, as they are pretty commonly used.
v3.4.0
Published on 18 September 2024
Added
- Callout: added
emphasis
prop to style low-emphasis callouts - Icon: added icons
business
cancel
consumer
creditCard
delivery
deliveryFast
home
orderSearch
secure
shuffle
Updated
- AlertBox: updated width to 100% (previously adjusted to fit content length in SWAN 3.3)
- Checkbox: updated the size of "favorite" skin for compact mode
- Button: updated
tertiary
skin to use semantic tokens instead of base tokens for hover and active states - Banner, Button, ModalDialog, PriceBar, SelectionSet, TextInput: where multiple buttons sit side-by-side, they've been changed to use the new semantic spacing token for density. For Price Bar, this means the buttons got 4px closer together.
- Callout: updated standard skin styling to match
skin=inverse
- Icon: updated icons
saveAsCopy
text
- SelectionSet: show background color change on hover and active states.
- StandardTile: updated spacing around the image for the "product"
skin
from 8 to 7. - TextInputWithButtonInset: updated button to use tertiary Button skin styles
- ToggleSwitch: updated the size for compact mode
Fixed
- Accordion: make collapsible non-interactive when it is marked disabled.
- Carousel: Carousel on XS screens using SSR now renders correctly at page load
- ColorSwatches: fixed selected state when focus-visible is also applied
- ModalDialog: fixed button color when nested inside Banner
- StandardTile:
- fixed the border radius for the
standard
skin. - fixed the footer left/right padding to align it horizontally with the tile content for the "product"
skin
.
- fixed the border radius for the
- Tabs: fixed the border separating the tabs from their content to be full-width when center aligned
- Tokens: fixed incorrect values for base green colors
Deprecated
- Callout: deprecated
variant
prop. Useemphasis=low
for overlay; omit or usevariant=standard
for inverse
v3.3.2
Published on 12 September 2024
Fixed
- Banner: secondary button styling for Button now correctly applying override styles for vanilla API
- Checkbox: fixed an issue where the "favorite"
skin
size unintentionally became much smaller in the new visual language (v3.3) - ModalDialog: fixed an issue where ModalDialogs in Safari browsers had unintended horizontal scroll
Deprecated
- Icon: deprecated
skin
prop valuewhite
, usestandard
instead in dark mode
v3.3.1
Published on 09 September 2024
Updated
- ModalDialog: added shadow back above
ModalDialogFooter
in Panel skins
Fixed
- Background Color: fixed missing values in
backgroundColor
-midnight
andwarm-white
- ColorSwatches: fixed selected label to appear behind a hovered label
- Combobox: fixed bug where setting
selectedKey
prop wasn't being passed to underlying library - ModalDialog: fixed bug where footer was not pinning to the bottom of the dialog in Panel skins
- ModalDialog: fixed bug where footer was transparent in Menu variants
- ThumbnailsHero: fixed border on selected thumbnail so that the thumbnail size no longer changes
Deprecated
- Icon: Deprecated icon CSS classes
.swan-icon-size-1em
and.swan-icon-size-1rem
. These are probably just some left over CSS classes. There isn't even a React API for using these.
v3.3.0
Published on 03 September 2024
Implemented the new visual language across the design system foundations and components and introduced compact mode to replace size variants
Added
- AlertBox: added
info
,success
prop values forskin
prop - Button: added
tertiary
prop value forskin
prop - Callout: added
accent
,warning
,success
,help
,promo
prop values forskin
prop - Color: added tokens
sem.color.text.link-active
sem.color.border.input-error
- Compact mode: added
compactMode
core prop - Icon: added
size
prop value "standard" - Icon: added icons
aiSupport
clear
cross
dislike
indeterminate
like
orders
success
warning
star
- Spacing:
- added density tokens
sem.space.between-sections
sem.space.between-subsections
sem.space.between-actions
sem.space.to-actions
- added density prop values
between-sections
between-subsections
between-actions
to-actions
- added size tokens for icons
sem.size.icon.standard
sem.size.icon.dynamic
- added size tokens for minimum click targets
sem.size.click-target.min-height
sem.size.click-target.min-width
- added density tokens
- Tokens: added tokens for selected states
sem.border.width.selected
sem.color.bg.selected-accent-active
sem.color.bg.selected-accent-hover
sem.color.bg.selected-accent
sem.color.border.selected-accent-active
sem.color.border.selected-accent-hover
sem.color.border.selected-accent
- Text Color: added new prop value "info" to the core prop
textColor
- Background Color: added new prop value "info" to the core prop
backgroundColor
Fixed
- Dark mode: fixed dark mode to apply to an element regardless of the nested mode configuration
Deprecated
- AlertBox:
- deprecated
skin
prop values:standard
replace withinfo
positive
replace withsuccess
- deprecated
width
prop
- deprecated
- Banner: deprecated
textHorizontalAlignOnExtraSmall
prop - Button: deprecated
size
prop - Callout:
- deprecated
skin
prop values:standard
replace withinfo
foil
replace withaccent
new
replace withaccent
announcement
replace withaccent
discount
replace withpromo
- deprecated
variant
prop valueoverlay
- deprecated
border
prop
- deprecated
- Dropdown: deprecated
skin
prop valueline
- Icon:
- deprecated
iconType
prop values:closeLarge
replace withclose
closeSmall
replace withclose
toggleOff
replace withcross
plusRounded
replace withadd
satisfaction
replace withguaranteedSatisfaction
caretRight
replace withchevronRight
login
replace witharrowRight
uploadYourArtwork
replace withupload
searchLarge
replace withsearch
clock
replace withorderHistory
myProjects_1
replace withmyProjects
polish
replace withsparkle
deleteStudio
replace withdelete
playRounded
replace withplay
chatReview
replace withliveChat
phoneCall
replace withphone
help
replace withphone
checkRoundedEdges
replace withcheck
checkRoundedEdgesMini
replace withcheck
heartEmpty
replace withheart
heartFilled
replace withheart
starEmpty
replace withstar
starFilled
replace withstar
- deprecated
size
prop values:10p
replace with16p
28p
replace withstandard
32p
replace withstandard
40p
replace withstandard
or a custom illustration48p
replace withstandard
or a custom illustration60p
replace withstandard
or a custom illustration
- deprecated
- Link: deprecated
withIconSeparated
prop - Listbox: deprecated
size
prop - PriceBar: deprecated
showBannerOnly
prop - Spinner: deprecated
skin
prop valuesmini
,tiny
- Tabs: deprecated
wrapHeaders
prop - TextInput: deprecated
size
prop - ThumbnailsHero: deprecated
ThumbnailsHeroContentContainer
,ThumbnailsHeroContent
subcomponents - ToggleSwitch: deprecated
size
prop
v3.2.3
Published on 22 August 2024
Fixed
- Button: fixed active state styling
- Carousel: fixed incorrect white gap appearing below the
skin=promobar
carousel
v3.2.2
Published on 20 August 2024
Fixed
- Icon: fixed incorrect
iconType
prop error
v3.2.1
Published on 15 August 2024
Fixed
- Fixed incorrect token descriptions
- Link: fixed
to
prop not being passed through - Button: fixed new vl styles incorrectly applying to non-vl buttons
v3.2.0
Published on 13 August 2024
Updated
- Popover: changed Popover's drop-shadow to use
sem.elevation.floating
instead ofsem.elevation.overlay
Fixed
- Collapsible: remove border-top when used outside of an Accordion
- Link: fixed icon color on hover when an icon is embedded within it
Deprecated
- FieldSet no longer needs a style key. The styles needed by the component are already included in the core stylesheet.
- MARKETING_COLORS: deprecated
MARKETING_COLORS
from@vp/swan
; import the object from@vp/marketing-colors
instead - Pricing no longer needs a style key. The styles needed by the component are already included in the core stylesheet.
v3.1.1
Published on 30 July 2024
Fixed
- Combobox: fixed issue where custom onBlur prevented the ComboboxPopover from closing when clicking outside of the component
- Popover: fixed issue where popover arrow was not visible
- Fixed the logic for returning the base URL, which previously always returned
SWAN_BASE_CDN_URL
even when a valid tenant and locale were provided. This issue was introduced in version 3.0.0.
v3.1.0
Published on 24 July 2024
Added
- Added descriptions to semantic border-radius, border-width, color-bg, color-border, color-icon, color-text, elevation, focus, space, and z-index tokens
- Icon: added
warning
andsuccess
semantic skins to icons
Updated
- Updated token generation to exclude component tier tokens in exported files
- Updated react components to use default values in place of
.defaultProps
which is marked as deprecated by React and throws a warning in 18.3+. - Carousel:
fade
is no longer required when Carouselskin="promo-bar"
and defaults to true if the prop is not provided - SwanHead: added warning when attempting to load an unsupported style key
Fixed
- Fixed modes overwriting media values of tokens when modes don't have an explicit value
- Fixed
SwanFontSkin
not being exported properly - ButtonBar, Carousel, ColorSwatches, ComboboxInput, FileInput, Listbox, Menu, Pagination, Popover, RadioButton, Range, SearchInput, SelectionSet, Tabs, TextInput, TextArea, and ToggleSwitch: fixed disabled button state to show the not-allowed cursor
- SearchInput: fixed bug with incorrectly generated component types due to issue with
prop-types
- Checkbox: fixed disabled indeterminate checkboxes not showing the disabled style
v3.0.2
Published on 11 July 2024
Fixed
- Carousel: fixed issue where
slidesToShow
prop wasn't working with responsive values during SSR - Listbox: fixed Listbox (and Menu) causing the dialog to close when opening the popover inside of ModalDialog
- Pagination: fixed button size issue on pagination steps with long text
- Popover: allow disabling of the Popover launcher button
v3.0.1
Published on 10 July 2024
Fixed
- Spacing: fixed incorrect space size values for sizes 1-7
- Tabs: add back in removed
wrapHeading
styling - Fixed
fontSize="standard"
mistakenly applying a text color - Fixed media values not being set correctly for explicit
standardMode
usage
v3.0.0
Published on 08 July 2024
Added
- Added
use client
to all exported modules to work with React Server Components - Added new tokens for:
- Color: semantic color tokens for icons
- Spacing: semantic gutter space tokens for in-between spacing
- RatingsStars: added
reviews
,href
andhideRating
props - SwanHead:
- Add
Primary
andSecondary
toSwanFontNameEnum
- Add
SwanFontName
for Ubik support
- Add
- Table: added new
swan-table
CSS class
Updated
- Change classes applied by
textColor
andfontSize
props (in context with breaking change below) - Core props:
warning
anderror
textColor
values no longer adjust font weight- Enable
auto
value for the margin props - All the padding and margin props can now have spacing value 0-12
- Anchor Bar, Color Swatches, Dropdown, Listbox, Step Indicator, Toggle Switch: changed z-index to align with SWAN 3 tokens
- Button: revert horizontal padding to avoid unnecessary visual change
- Carousel:
- Simplified the button positioning logic for skin="promobar"
- Carousel now has a maximum width that matches the width of a Bounded Content, except for "promo bar" Carousels which continue to have no max-width.
- Icon:
- Updated icons across Swan to use new icon color tokens
- Updated Icon component implementation to use css mask-image instead of img src to enable more color options
- Link: updated Link
withIconSeparated
to usegap
instead ofmargin-right
for in-between spacing - Ratings Stars: updated implementation to use css mask-image instead of filters, to be in line with other internal use of icons
- StandardTile: for
product
skin, updated alignment to align contents at the top of the contents rather than the bottom, by removingflex-end
- Tokens: update values for
sem-color-bg-none-active
andsem-color-bg-none-hover
tokens
Fixed
- Increased specificity of font css class names to allow overriding a component's CSS with core props
- Fixed Popover related components stuck to dark mode when switching back and forth between dark mode and standard mode
- Combobox: updated Combobox to support the
skin="error"
prop and to automatically match the error state in a FormField - ModalDialog: fix the alignment of the footer in Panel with Full-Bleed Skin
- Popover: fix scrollbar overlapping with rounded borders. This applies to all popover components with items, including listbox, combobox, and menu.
- SearchInput: focus is no longer lost when clicking the clear button
- SelectionSet:
- Fixed
buttons
skin selected stateborder-radius
to be rounded - When using one of the "tiles" skins, a
Callout
will no longer be absolutely positioned if it's inside the "contents" sub-component.
- Fixed
- StandardTile: fixed height calculation on
product
variant so all tiles have the same height
Breaking
textColor="standard"
andfontSize="standard"
no longer apply the same class (a bug introduced in SWAN v2.22.0). This may cause visual changes if the use was relying on one prop setting both the color and font size- BACKGROUNDS_WITH_MODE: renamed
lightMode
property tostandardMode
- Core Props:
- Updated
fontFamily="secondary"
to be tiempos, which was previously used forfontFamily="special"
- Updated
- SwanHead: remove
GraphikBold
, as it's not allowed for use - Tokens:
- Update the token files path from
@vp/swan/dtcg-tokens/tokens
to@vp/swan/tokens
. - Adjusted colors and required modes of background, text, and border tokens for
accent
,error
,help
,promo
,success
, andwarning
.help
,error
,success
, andwarning
now have support for Standard Mode background colours. This has changed the tokens and React props since their inclusion prior to 3.0.
- Update the token files path from
Removed
- "Graphik bold" font files from the assets
- Dropped base URL support for BrandStore, Masks, Promotique & Vista tenants.
- Removed all the old tokens
- Removed deprecated Icons - Shopping Bag 1-14, 50, Redo (Legacy), and Undo (Legacy)
- Removed holiday-theme and theme related code from
ROOT_CLASSNAMES
andgetRootClassNames
and other internal uses - Removed deprecated props and prop values
- Core Props:
- Removed deprecated
fontSize
values - Removed deprecated
fontWeight="bolder"
value - Removed deprecated
fontFamily="special"
value, usefontFamily="secondary"
instead - Removed deprecated
backgroundColor
andbgc
values - Removed deprecated
backgroundShort
andbgShort
props - Removed deprecated
lightMode
prop. UsestandardMode
instead - Removed deprecated
removeLinkStyles
prop, useLink
component withskin="unstyled"
- Removed deprecated
srOnly
props. UsevisuallyHidden
instead - Removed deprecated
textColor
values
- Removed deprecated
- Accordion:
- Removed
size
andsizeVariant
props - Removed
skin="peek"
prop value
- Removed
- AlertBox: removed
widthVariant
prop - Button:
- Removed
sizeVariant
andwidthVariant
props - Removed
skin="accent"
prop value
- Removed
- ButtonBar: removed
widthVariant
prop - Callout:
- Removed
allCaps
prop, usetextAllCaps
instead - Removed
size="super"
prop value
- Removed
- Carousel:
- Removed
autoplay
prop - Removed
skin="fraction"
prop value
- Removed
- Collapsible: removed
skin
prop- CollapsibleSummary: removed
rich
andrichLastAlign
props
- CollapsibleSummary: removed
- ColorSwatch: removed
sizeVariant
andtitle
props - Combobox: removed
inModal
prop - Dropdown: removed
borderless
androunded
props - FormError: removed
size
andsizeVariant
props - FormHelper: removed
size
andsizeVariant
props - FormLabel: removed
size
andsizeVariant
props - Grid: removed
cardDividers
prop, usedividers
instead - Icon: removed
skin="brand-blue"
prop value - LinkList: removed
skin
prop - List: removed
minimal
prop - ListBox: removed
skin="link"
prop value - Pagination: removed
visuallyHiddenText
prop, useaccessibleText
instead- PaginationButton: removed
visuallyHiddenText
prop, useaccessibleText
instead - PaginationStep: removed
visuallyHiddenText
prop, useaccessibleText
instead
- PaginationButton: removed
- Popover: removed
expanded
prop - RatingsStars: removed
starsToShow
prop - SelectionSet: removed
skin="buttons-with-images"
prop value - StandardTile: removed
skin="gallery"
prop value, and relatedbackground
andimageShadow
props. Useskin="product"
instead. - SwanHead: removed
themeKeys
prop, which was unused - Table: removed
skin
prop - Tabs: removed
fixedWidthHeaders
,fullWidthHeader
,size
andsizeVariant
props - TextInput: removed
size="mega"
prop value andsizeVariant
prop - ToggleSwitch: removed
sizeVariant
prop - ThumbnailsHero:
- Removed
wide
andskin
props and replaced the default styling with the oldunder
skin styling - Removed the
--swan-thumbnails-hero-under-image-height
and--swan-thumbnails-hero-under-image-max-height
CSS variables which were unused
- Removed
- Typography: removed
textSize
,align
,allCaps
,weight
, andoverline
props
- Core Props:
- Breakpoints Mixins : removed
ltXs
andlteXl
mixins and token values - Core Props: removed
13
from spacing (margin/padding/gap) props and css - Color Objects: removed deprecated color objects -
SOURCE_COLORS
,GLOBAL_FONT
,SEMANTIC_COLORS
,MARKETING_BACKGROUNDS
,BACKGROUNDS
, andTEXT_COLORS
. Use color tokens imported fromtokens
ortokensRaw
based on context as appropriate e.g. for background colorstokensRaw.SwanSemColorBgStandard
or for text colortokensRaw.SwanSemColorTextStandard
. Note there are also icon and border semantic color tokens. - Screen Objects/Utilities:
- Removed
getScreenClass
function - Removed deprecated screen objects
SCREEN_CLASSES
,SCREEN_CLASS_MAX_WIDTHS
,SCREEN_CLASS_MIN_WIDTHS
, use breakpoint tokens imported fromtokens
ortokensRaw
based on context as appropriate e.g.tokensRaw.SwanBaseBreakpointMdStart
ortokensRaw.SwanBaseBreakpointMdEnd
. - Removed deprecated screen types
ScreenClasses
andScreenClassWidthMap
, useStyleBreakpoints
instead for type safety.
- Removed
- Spacing Objects:
- Removed
SPACING_SIZES
,SPACING
, andSPACING_PX
objects and types. Use space tokens imported fromtokens
ortokensRaw
based on context as appropriate e.g.tokensRaw.SwanSemSpace4
. - Removed
StyleSpacing
andStyleSpacing0to13
objects. UseStyleSpace
andStyleSpaceWithAuto
instead.
- Removed
- Accordion: removed CSS and vanilla js references to old API
- Card: removed CSS for when Card is used as a selection element (checkbox or radio button), which was available only in the vanilla API.
- ModalDialog: removed old API CSS for positioning buttons when there was not a ModalDialogBody element
- PriceBar: removed old API CSS for vanilla HTML consumers
- Style Keys: removed the
combobox
andmenu
style keys. Their stylesheets have been incorporated into thelistbox
styles - Style Keys: removed the
controlIcon
,detailsBanner
,embeddedTextHero
,legacyCombobox
,legacyListbox
,legacyModalDialog
,legacyPopover
,promoBar
,secondaryTile
,standardBanner
,standardHero
style keys as those components were removed - Removed deprecated components
- Button: removed
ButtonSuperBreak
,TextButton
, andTextButtonSuperBreak
components - ControlIcon: removed
ControlIcon
component and style key, useIcon
instead - DetailsBanner: removed
DetailsBanner
component and style key, useBanner
instead - EmbeddedTextHero: removed
EmbeddedTextHero
component and style key, useBanner
instead - ExperimentsProvider: removed
ExperimentsProvider
component and related props, includingexperiments
core prop - Icon: removed
<Icon[Name]>
inline-svg components, useIcon
component instead - IconBulletList: removed
IconBulletList
component, useBulletList
instead - IconTileSet: removed
IconTileSet
component, use pattern withFlexBox
andBox
instead - LegacyCombobox, LegacyListbox, LegacyModalDialog, LegacyPopover: removed legacy Reach UI Components
- Pagination: removed
PaginationInput
andPaginationLabel
components - Paginator: removed
Paginator
component, usePagination
instead - PipeDivider: removed
PipeDivider
component, usePipeSeparator
instead - Preloader: removed
Preloader
component, useSpinner
instead - PromoBar: removed
Promobar
component, use pattern withFlexBox
instead - SecondaryTile: removed
SecondaryTile
component, style key, and related CSS - SellingPoints: removed
SellingPoints
component - StandardBanner: removed
StandardBanner
component, useBanner
instead - StandardHero: removed
StandardHero
component, useBanner
instead - StandardSection: removed
StandardSection
component, using spacing props instead - StandardTile: removed
StandardTileBackground
component, which was only used withskin="gallery"
which has also been removed - SwanTheme: removed
SwanTheme
component, which was only used inside ofSwanHead
- Table: removed
TableTextNewLine
andTableTextSecondLine
component
- Button: removed
v2.23.0
Published on 21 June 2024
Added
- Avatar - for displaying the avatar image
Updated
- Carousel: updated
slidesToShow
to allow responsive values. This will work with server-side rendering, but requires that the Carousel be wrapped in a<ScreenClassProvider>
to use
v2.22.1
Published on 12 June 2024
- Combobox: fixed issue where popover wasn't closing when clicking outside of the combobox
v2.22.0
Published on 12 June 2024
Added
- Implement new token architecture for:
- Typography
- Space
- Introduced a new typography API, accessible via the
fontSkin
core prop in support of new visual language - Core props: added new values to the core prop
fontSize
in support of new visual language:x4large
,x3large
,x2large
,xlarge
,large
,standard
,small
,xsmall
- Core props: added new semantic
textColor
values to support the new visual language -accent
,help
,promo
,standard
,subtle
,success
Updated
- Popover: add swan root css class to popover element to guarantee styling propagates
Fixed
- Core props: fixed
accent
background colour contrast with standard text - Core props: fixed
error
background colour contrast with dark mode text - Core props: fixed
promo
background colour contrast with standard text - SOURCE_COLORS: fixed red400 to correctly reference a hex code
Deprecated
- Core props: deprecated
fontWeight
valuebolder
. Usebold
instead - Core props: deprecated
fontSize
old scale values "1-6" and "xm2-x6". Use new scale instead. - Core props: deprecated
fontFamily
valuespecial
. No changes required in v2. Usesecondary
in v3. - Color Objects: deprecated
backgroundColor
valuewhite
. Usestandard
instead. - Color Objects: deprecated
textColor
andfontSize
values are now deprecated in code, and will display a warning if used - Core Props: deprecated spacing value
13
for all the margin, padding props. - Screen Objects: deprecated
SCREEN_CLASS_MAX_WIDTHS
,SCREEN_CLASS_MIN_WIDTHS
. Use exported token variables instead - Screen Objects: deprecated
SCREEN_CLASSES
,ScreenClassWidthMap
,ResponsiveModifiers
, andScreenClasses
. UseStyleBreakpoints
for type safety - Spacing Objects: deprecated
SPACING_SIZES
,SPACING
andSPACING_PX
. Use exported token variables instead - Spacing Objects: deprecated multiple spacing types, e.g.
StyleSpacing
andStyleSpacing0to13
. UseStyleSpace
andStyleSpaceWithAuto
for type safety - Table: deprecated
TableTextNewLine
sub-component which is only intended to be used with the deprecatedsimple
skin - RatingsStars: deprecated
starsToShow
prop
v2.21.2
Published on 30 May 2024
Fixed
- Carousel: removed the max-width that was introduced in 2.20, because it was creating problems with the Promo Bar. (We will re-add the max-width in SWAN 3.)
v2.21.1
Published on 28 May 2024
Fixed
- Fixed reference to
process.env.node_env
toprocess.env.NODE_ENV
to fix systemjs web build
v2.21.0
Published on 28 May 2024
Added
- Core props: new semantic
backgroundColor
values to support the new visual language -standard
,strong
,error
,warning
,success
,promo
,help
,accent
- Tokens: added in support for new modes
standardMode
Updated
- Color Objects: Holiday colours now read from private variables, not public tokens.
- Improve consistency of focus-related styling across components
Fixed
- Banner
bgc
not flowing through to full width image variants - Icon
sparkle
visual imperfections
Deprecated
-
Color Objects: deprecated
backgroundColor
values are now deprecated in code, and will display a warning if used -
Color Objects: deprecated
loading-shimmer
value forbackgroundColor
(use the new global proploadingShimmer
instead) -
Tokens: deprecated
lightMode
in favor ofstandardMode
-
Implement new token architecture for:
- Background color
- Border color
- Text color
-
AnchorBar: adds default background color
Updated
- Banner: now accepts a CSS custom prop
--swan-public-marketing-background
to set a custom background color - Color Objects:
MARKETING_COLORS
now includeswhite
andwarmWhite
- Core props: added
loadingShimmer
as a replacement forbackgroundColor="loading-shimmer"
- PipeSeparator: now avoids using a hardcoded
|
character - SkeletonText and SkeletonHeading: changed to use new global
loadingShimmer
feature under the hood
Fixed
- Banner: media query mismatching
- Carousel: in dark mode, arrow button colors are now correct
- Carousel: on super-wide screens, arrow buttons should no longer be far away from the Carousel content.
- ComboboxSearchInput: allow form submission when enter is pressed in the search input
- Combobox, Listbox, Menu, Popover: dark mode not getting consistently applied.
- Callout: text color for new skin in dark mode
- Callout: text color of foil skin in inverse variant in dark mode
Deprecated
- Core prop:
backgroundShort/bgShort
which is obsolete now - Color Objects: deprecated
MARKETING_BACKGROUNDS
, useMARKETING_COLORS
instead for integration with Contentful & Builder - Color Objects: deprecated
SOURCE_COLORS
,GLOBAL_FONT
,SEMANTIC_COLORS
. Use exported token variables instead - Color Objects: deprecated
BACKGROUNDS
andTEXT_COLORS
. UseStyleBackgroundColor
andStyleTextColor
typescript types for type safety
v2.19.1
Published on 03 May 2024
Fixed
- Internal: Tokens output structure
v2.19.0
Published on 03 May 2024
Added
- Implement new token architecture for:
- Border Radius
- Border Width
- Breakpoints
- Elevation
- Z-Index
Updated
- Combobox, Listbox, Menu, and Popover: update to the underlying react-aria dependencies
Fixed
- AnchorBar: added
scroll-padding-top
to HTML element when Anchor Bar is sticky to meet WCAG 2.2 guidelines - AnchorBar: stacking index so that other elements don't overlap on it.
v2.18.2
Published on 18 April 2024
Updated
- Banner: on small screens, the
full-width-image
variant now uses the image as the background
Fixed
- Carousel: flickering which was partially fixed in v2.17.0
v2.18.1
Published on 11 April 2024
Fixed
- SearchInput: fixed CSS issue that cause a red border for arbitrary parent containers of error inputs
v2.18.0
Published on 11 April 2024
New
- Exposed a utility method
waitForStyles
for utilization in testing pipelines that rely on SWAN styles - Added new
<SearchInput/>
component - Combobox: added new
<ComboboxSearchInput />
subcomponent
Fixed
- ExperimentsProvider: fixed forwardRef console warning from SwanProvider
- PipeSeparator: now using correct ARIA role of
role="presentation"
v2.17.0
Published on 28 March 2024
Updated
- Menu: remove 4-item maximum height
Fixed
- Carousel flickering during SSR when
slidesToShow
is a decimal - Listbox: adjust maximum height to match 4 options
Deprecated
See the doc site for more details about deprecations and alternatives
- global
removeLinkStyles
prop - userender
function forLink
instead. - Accordion: deprecated the
peek
value for theskin
prop - use thestandard
skin instead. - Button: deprecated the
ButtonSuperBreak
subcomponent. To maintain a high-quality user experience, we are no longer supporting this feature, and are not providing a direct replacement. - Button: deprecated the
accent
value for theskin
prop. To maintain a high-quality user experience, we are no longer supporting this feature, and are not providing a direct replacement. - ExperimentsProvider: to maintain a high-quality user experience, we are no longer supporting this feature, and are not providing a direct replacement.
- FormLabel, FormHelper, FormError: deprecated the
size
prop. To maintain a high-quality user experience, we are no longer supporting this feature, and are not providing a direct replacement. - Icon: deprecated the
brand-blue
value for theskin
prop. To maintain a high-quality user experience, we are no longer supporting this feature, and are not providing a direct replacement. - Icon: deprecated the
<Icon[Name]>
icon API. Use the<Icon iconType="">
component instead. - IconTileSet: use a pattern of other SWAN components instead.
- LinkList: deprecated the
skin
prop - use a pattern of other SWAN components instead - PaginationInput: use PaginationButton instead, which provides a better user experience.
- PromoBar: use a pattern of other SWAN components instead.
- SecondaryTile: use Standard Tile instead, which provides a better user experience.
- SelectionSet: deprecated the
button-with-images
value for theskin
prop - use a standardSelection Set
with a nested image orStandard Tile
, or aSelection Set
usingtiles-horizontal
,tiles-vertical
, ortiles-mini
instead. - StandardSection: use Spacing instead, which provides updated styling and functionality.
- StandardTile: deprecated
imageShadow
prop, which was only needed for the already-deprecatedgallery
skin. - Table: deprecated the
simple
andcomparison
value for theskin
prop - use thedividers
skin instead, which provides a better user experience. - ThumbnailsHero: deprecated
contentWidth
prop. To maintain a high-quality user experience, we are no longer supporting this feature, and are not providing a direct replacement. - Typography: deprecated the
overline
prop. To maintain a high-quality user experience, we are no longer supporting this feature, and are not providing a direct replacement.
v2.16.0
Published on 15 March 2024
Updated
- Carousel: support generic dark mode containers in promobar skin
Fixed
- Combobox, Listbox, Menu: prevent clicks on items from bleeding through to elements below popover in mobile
- ColorSwatch: fix data urls as background images
- LeftHandNavigation: fixed color contrast issues with hover/selected states; also adjusted border radius
v2.15.0
Published on 04 March 2024
Updated
- Carousel: allow custom id for the component
Fixed
- Typography: the
truncate
feature no longer clips descenders on large type - ModalDialog: dialog close is triggered only when the dialog is open
v2.14.1
Published on 27 February 2024
New
- Added color
black-900
toMARKETING_BACKGROUNDS
Fixed
- Changelog typo
LegacyListbox
,AlertBox
,Collapsible
,Listbox
,ModalDialog
,Preloader
,ProgressiveImage
,ZoomControls
: TypeScript fixes to support the latest version of @types/react, which is more strict
v2.14.0
Published on 26 February 2024
New
- Icon: added new "more-horizontal" icon to support the new
Menu
component
Updated
- Accordion: remove deprecation warning on
size
prop when a value forsize
isn't provided - Combobox, Listbox, and Popover: patch version updates to underlying dependencies: @react-aria/combobox & @react-aria/dialog
- Dropdown: remove deprecation warning on
borderless
prop when a value forborderless
isn't provided
v2.13.1
Published on 08 February 2024
Fixed
- Menu:
MenuList
andMenuSection
are now being exported
v2.13.0
Published on 08 February 2024
Fixed
- Table: fix the header styling for the "comparison" skin
New
- Menu component that opens a popover list of buttons or links
Updated
- Combobox, Listbox, and Popover: update to the underlying react-aria dependencies
Deprecated
- Deprecated the
srOnly
core utility prop, usevisuallyHidden
instead - Accordion: deprecated the
size
prop - all accordions should be standard, not large - Callout: deprecated the
super
value of thesize
prop - use the standard size - Carousel: deprecated the
fraction
value of thesizeIndicator
prop - use thenone
value instead (or omit) - Collapsible: deprecated the
rich
andrichLastAlign
props - use the default styling - Dropdown: deprecated the
borderless
prop - use the default styling - Listbox: deprecated the
link
value of theskin
prop - use the default styling - Popover: deprecated the
expanded
prop - control the open state with a ref on the trigger for better accessibility - SellingPoints: use a pattern of other SWAN components instead; please see the documentation site.
- StandardBanner: use Banner instead, which provides the needed functionality and brings better consistency across Vista.
- StandardHero: use Banner instead, which provides the needed functionality and brings better consistency across Vista.
- StandardTile: deprecated the
gallery
value of theskin
prop - use the standard skin - Tabs: deprecated the
fixedWithHeaders
prop - use the default behavior - Tabs: deprecated the
mega
value of thesize
prop - use the standard size - TextInput: deprecated the
mega
value of thesize
prop - use the standard size - ThumbnailsHero: deprecated the
standard
skin of theskin
prop - use theunder
skin - Typography: deprecated the
textSize
prop - use thefontSize
prop
v2.12.1
Published on 02 February 2024
Fixed
- ModalDialog: close the dialog using the controlled state
v2.12.0
Published on 30 January 2024
New
- new global prop
overflow
that sets CSS overflow
Updated
- AlertBox: align dismiss button to the top-right
- Icon: update download and upload icons
- Button: use
iconPosition
prop to specify the spinner position
Fixed
- ModalDialog: fix the
onRequestDismiss
callback trigger when the modal closes using the escape key - ModalDialog: make
aria-modal="false"
for the modeless dialog
v2.11.0
Published on 11 January 2024
Updated
- Popover: allow more specific arrow positioning to better align with trigger
- Added color
rum
toMARKETING_BACKGROUNDS
- Updated
BACKGROUND_WITH_MODE
's color 'holiday-red-2' (not utilized in FY24) to use dark mode when employed as a background color.
Fixed
- Listbox &
Combobox
: fix popover width not resizing correctly on window resize issue - ModalDialog: fix bug where dialog incorrectly closed when a file input is cancelled
- Popover: fix bug where core SWAN props were not getting applied
- Range: reset user-agent margin for visual consistency
v2.10.0
Published on 30 November 2023
Added
- ThumbnailHero:
<ThumbnailsHeroVideoThumbnailSlide />
component that shows the play icon on the thumbnail for the video slide. - Users can now access and utilize the internal icon
Updated
- SelectionSet: for the
buttons-with-images
skin, make the corner rounded
Fixed
- Callout: Font color of the links within "inverse" Callouts
- ModalDialog: set title element id in modal
aria-labelledby
prop ifaria-label
andaria-labelledby
are not provided - ModalDialog: replace
addEventListener
withremoveEventListener
inuseEffect
cleanup function to address memory issue - Listbox: fix
fullWidth
prop onListboxWitFloatingLabel
not passing toListboxPopover
v2.9.0
Published on 17 November 2023
Added
- Combobox: custom input text now supported with
allowsCustomValue
- Listbox: add placeholder prop to
ListboxButton
for text to display when an option is selected - Listbox and
Combobox
: added new dynamic collections API for larger dataset
Updated
- Combobox and
Listbox
: remove focus ring on Option on hover - Dropdown,
Listbox
, andTextInput
with Floating Labels: now using shared floating label context object. (No visual impact.)
Fixed
- Combobox: fixed popover opening when first letter is typed with async data
- Popover: Fix
PopoverTrigger
ref prop so that the child ref doesn't get swallowed allowing it to be used
v2.8.0
Published on 7 November 2023
Added
- Combobox: now supports floating labels
Fixed
- Popover: Disable scrolling on elements below popover when popover is open. Applies to listbox and combobox as well.
- Table: remove !important from td & th padding to allow for custom padding via props
- Circular dependency issue raised by the hook
useDarkModeExtractor
- Buttonbar: for selected button always show the selected color, even when the button is active or hover.
- ModalDialog: fix dark mode styling of pinned footer in menu variant
v2.7.2
Published on 13 October 2023
Fixed
- StandardBanner and
StandardHero
: reverted Standard Banner and Hero styling from 2.7.0
v2.7.1
Published on 13 October 2023
Fixed
- Banner: using Firefox on Extra-Small screens, image is not wide enough
v2.7.0
Published on 10 October 2023
Updated
- StandardBanner and
StandardHero
: some visual restyling to bring them more in line with the look of the newBanner
Fixed
- Banner: using Safari on Extra-Small screens, image no longer grows too tall
- Button: Clear Selection buttons no longer clip the first button's focus indicator
- Listbox: Fixed lightMode styling when a child of darkMode and cleaned up variables
- Popover dark mode compatibility: Content background was not respecting the
darkMode
prop applied over any ancestor
v2.6.2
Published on 3 October 2023
Fixed
- Color: Updated background color mode to darkMode for holiday-red-1
- Carousel: Set dark mode on carousels when holiday promo bar skins are used
v2.6.1
Published on 29 September 2023
Fixed
- AnchorBar: The circular dependency issue.
v2.6.0
Published on 25 September 2023
Added
- AnchorBar: add new sticky anchor bar component
- Range: new skins for hue, contrast, saturation, and custom Range sliders
- Icon: added
settings
icon
Updated
- Accordion and
Collapsible
: text, border, and icon color now optimized for Dark Mode; disabled colors changed to grey-500 - Banner: "full-width-image" Banner now sets the background color of the text box using CSS variables, instead of a React context object (no API change)
- Banner: min-height on Small and Medium screens, and for all "short" Banners, changed from 260px to 300px
- Update favicon to be 48x48 to align with Google's recommendations
Fixed
- Banner: if you are using both
preferSecondaryImage
andhideImageOnExtraSmall
, images will now be hidden - Carousel: buttons in "promo-bar" skin now have 24x24 touch targets to meet WCAG 2.1 AA minimum size
- LeftHandNavigation: using Dark Mode, "button menu" skin now has enough color contrast
- Listbox: fix issue where selected item wasn't scrolled into view when popover loads (for real)
- PromoBar: text color compatibility issue with
darkMode
- ModalDialog: close button getting overflown when using variant "menu" with bodyWidth "capped"
- StepIndicator: using Dark Mode on smaller screens, arrow buttons are now visible
v2.5.0
Published on 7 September 2023
Added
- Banner: a new component for banners and heroes, to be used instead of
StandardHero
andStandardBanner
going forward. - PromoBar: added
holiday-green
andholiday-beige
skins
Deprecated
- Dropdown: the prop
rounded
, as it doesn't do anything visually any longer
Fixed
- AlertBox: fix issue where uncontrolled dismissible alert box wasn't able to be dismissed
- Callout: fix text color in holiday skin
- Carousel:
- previous/next navigation buttons are now disabled using the "disabled" attribute
- when rendered inside BoundedContent, previous/next buttons were getting clipped by the screen, but are completely visible now
- ControlIconHoverContainer: the hover color for the icon
- Listbox: downgrade react-aria dependency to fix scroll to selected item issue
- PromoBar: fix text color in holiday skin
- SelectionSet: for the "simple-column" skin, selections in focus now show the focus indicator on the checkbox/radio button, but not the text label
Updated
- Color: updated Holiday colors for Holiday CY23/FY24
- Color: updated "warning" color to be a shade of orange (specifically, our "pumpkin" color)
- Color: updated "pumpkin" so that it now has enough color contrast against white, and should now be used as a background color with white text (dark mode)
v2.4.1
Published on 18 August 2023
Fixed
- FlexBox: do not include gap property in inline css if prop is undefined
- Listbox: expanded type of ListboxOption's
label
prop to allow a ReactNode instead of just a string - ProgressiveImage: fix incorrect warning that style key is missing when it's not
- RatingsStars: fix incorrect warning that style key is missing when it's not
- (revert)
Link
: fixed typescript type for props arg ofrender
prop
v2.4.0
Published on 11 August 2023
Added
- Added
arrow-up
andarrow-down
icons - Added
.swan:focus-visible
selector to match.swan-dark-mode:focus-visible
- FileInput: add FileInput component
- Added
collapse
andexpand
icons
Fixed
- SSRPRovider: fix React 18 Suspense issues from react aria's SSRProvider
- Button: adds space between icon and text when skinned as
"link"
- Link: fixed typescript type for props arg of
render
prop - Popover: switched from block to inline display for trigger element to avoid cursor expanding past trigger element
v2.3.1
Published on 28 July 2023
Fixed
- load
focus-visible
polyfill from vanilla js. Check for polyfill script before adding it from react
v2.3.0
Published on 28 July 2023
Added
- Dialog: add
grow
bodyWidth
option to no longer restrict max width - FlexBox: add support for the
gap
property, which takes a SWAN Spacing unit as a value
Updated
- Switch to
:focus-visible
styling so focus rings only appear for keyboard users. Add polyfill for legacy browsers - Link : improve legibility by setting
text-decoration-skip-ink: all
for those browsers that support it - StandardHeroText : top and bottom margin of the text container have been decreased for the
fullWidthImage
option. - StandardHero : min-height of the hero container has been decreased to 480px.
- SelectionSet : all variants now use
word-break: break-word
to minimize the browsers breaking in mid-word - SelectionSet : for
simple-column
skin variant, change the disabled value font color
Fixed
- Accordion:
ColorSwatches
being right-aligned previously - Checkbox: for disabled Checkboxes, check mark is now the correct color of grey
- ModalDialog: fix width of DialogContent on mobile for capped panels
- ThumbnailsHero: show the video control panel on focus
Refactored
- Carousel: reduced css complexity for accessibility override css for peek variant
Deprecated
- DetailsBanner: deprecate DetailsBanner component in favor of Standard Hero or Standard Banner
- EmbeddedTextHero: deprecate EmbeddedTextHero component in favor of Standard Hero or Standard Banner
- StandardHeroImageHighlight: No longer maintain this component
- StandardHeroTextBackgroundImage: No longer maintain this component
v2.2.0
Published on 29 June 2023
Added
- Listbox: new "Listbox With Floating Label" variant, to match "Dropdown With Floating Label"
- Added development warning for missing style key(s)
- Added
BACKGROUND_WITH_MODE
constant to provide a map ofBACKGROUNDS
color with the mode type.
Updated
- Button: focus indicator now uses the global (blue) styling except when inside a Standard Hero or Standard Banner, where we want to maximize color contrast
- ThumbnailsHero: max-height set to 75vh or 800px, whichever is smaller, so that the hero isn't ridiculously tall on really large monitors
- SelectionSet: the various "tiles" skins now attempt to avoid word breaks in mid-word
Fixed
- AlertBox: fix link color for legal warning in dark mode
- Carousel: Disable window scrolling while swiping horizontally
- Carousel: Set dark mode on the carousel when the inverse promo bar skin is used in a slide
- Icon: Used to break the page when an invalid
iconType
is passed. - Listbox: left padding changed to 12px, to match Dropdown
- SelectionSet: for tall sets, clicking on a selection at the bottom of the set no longer scrolls the browser to the top of the set
- CollapsibleSummaryTextOpen &
CollapsibleSummaryTextClosed
: fix text overflow issue for SummaryText component - CollapsibleSummary:
rich
variant now includes text wrapping when there is text overflow.
Deprecated
- Collapsible: deprecated
skin
prop, which has been a no-op for some time - Tabs: deprecated
fullWidthHeader
prop, which has been a no-op for some time
v2.1.0
Published on 14 June 2023
Added
- Dialog: add
onlyRenderWhenOpen
prop to only render the dialog's contents in the DOM when the dialog is open
Updated
- Dropdown: height on small screens changed to 50px to match other form elements
- Spinner: layout "horizontal" no longer has a max width
- TextInput and
TextArea
: border colors changed slightly, and corners on TextArea are now rounded - Removed old MS Edge polyfill for "input with floating label" from core js
- IconTileSet: added spacing between the tiles on extra small screens
Fixed
- Dialog: adjusted max width of dialog so listbox popovers are not cut off
- Spinner: layout "horizontal" with long text no longer deforms the spinner
v2.0.1
Published on 25 May 2023
Fixed
- ModalDialog: Loading CSS polyfill in VanillaJS implementation
v2.0
Published on 24 May 2023
New
- Polyfills: SwanProvider now supports polyfill loading within the library. Currently this is limited to a polyfill for the native dialog element, which ModalDialog has been rewritten to use.
- StandardForm: when a form is submitted either by pressing a submit button or hitting enter in a text field, submission will be stopped with preventDefault(). Supply
form
,action
oronSubmit
to override the behavior. - SWAN version is now logged in a custom meta tag on the page. It is added on the server using the SwanHead component, if included, or in the browser when the SwanProvider component is loaded on the page
Breaking
@vp/swan/tokens/*
imports refactoring:
Concern | Old | New |
---|---|---|
TS / JS | @vp/swan/tokens/tokens | @vp/swan |
SCSS | @vp/swan/tokens/tokens | @vp/swan/scss/design-tokens (preferred) or @vp/swan/design-tokens/scss |
LESS | @vp/swan/tokens/tokens | @vp/swan/design-tokens/less |
CSS | @vp/swan/tokens/tokens | @vp/swan/design-tokens/css |
Stylus | @vp/swan/tokens/tokens | @vp/swan/design-tokens/styl |
-
Carousel: Under the hood dependency changed from
@ant-design/react-slick
toreact-slick
-
Combobox: Combobox has been rewritten to support React 18. The
value
prop on ComboboxOption has been renamed tokey
.- Combobox now requires the
popover
andlistbox
style keys in addition to thecombobox
key. onSelect
has been renamed toonSelectionChange
ComboboxOption
s that contain jsx must also include atextValue
prop for Accessibility.ComboboxOptionText
component has been removed. Use thetextValue
prop onComboboxOption
instead.value
,defaultValue
, andonChange
are no longer allowed onComboboxInput
. They have been replaced byinputValue
,defaultInputValue
, andonInputChange
on the rootCombobox
component.
- Combobox now requires the
-
Listbox: Listbox has been rewritten to support React 18. The
value
prop on ListboxOption has been renamed tokey
.- Listbox now requires the
popover
style key in addition to thelistbox
key. ListboxOption
s that contain jsx must also include atextValue
prop for Accessibility.ListboxOptionText
component has been removed. Use thetextValue
prop onListboxOption
instead.ListboxButtonWithLabel
has been removed. Use thelabelPrefix
prop on theListboxButton
component.
- Listbox now requires the
-
ModalDialog: has been rewritten to support React 18. It now uses the native dialog, and provides a polyfill in SwanProvider for older browsers.
- The vanilla dialog API has been rewritten and simplified to use the native dialog. Use the native dialog API function
showModal()
andclose()
to open or close the dialog element. - For dialogs created after the vanilla script has been loaded on the page, register the modal with
window.registerVanillaSwanDialog
- The vanilla dialog API has been rewritten and simplified to use the native dialog. Use the native dialog API function
-
Popover: Popover has been rewritten to consolidate behavior with Listbox and Combobox.
eventContainerRef
prop has been removed.- Only the first child of
PopoverLauncher
will be treated as the trigger element for the popover
-
Range: CSS custom properties for Range colors were renamed to accurately reflect the parts they style, instead of using the non-webkit names that Firefox uses. The empty part of the track is now colored with
--swan-range-track-color
, and the filled part with--swan-range-track-fill-color
.Old token New token --swan-range-track-color --swan-range-track-fill-color --swan-range-track-progress-color --swan-range-track-color -
SSR: When rendering with SSR/SSG, your application should be wrapped in
<SwanSSRProvider />
to avoid hydration issues.
Removed
- Select: The Select component has been removed. Replace it with either Dropdown or Listbox
- Font scale: Removing all the font scale related dependencies and classes as it is useless since we introduced a new scale x in 1.23
- Removed
SwanFontScaleEnum
- Removed
fontScale
from the typeuseRootClassNamesArg
- Removed
fontScale
fromSwanProvider
prop types - Removed
scopedFontNew
andscopedFontLegacy
from te constantROOT_CLASSNAMES
- Removed
SWAN_BASE_URL_MAP
&SWAN_BASE_URL_LIST
: Removed all "next", "promotique" and "brandStore" related entries as they are decommissioned and no longer in use.- Removed codemod script. We will provide a separate package for that.
- Removed IE-specific meta tag
Deprecated
- Combobox: The former Reach-UI-based Listbox was renamed to
LegacyListbox
, but continues to exist for users who cannot easily upgrade to the newListbox
. There's no guarantee it will work with React 18 - Listbox: The former Reach-UI-based Listbox was renamed to
LegacyListbox
, but continues to exist for users who cannot easily upgrade to the newListbox
. There's no guarantee it will work with React 18 - ModalDialog: The former Reach-UI-based ModalDialog was renamed to
LegacyModalDialog
, but continues to exist for users who cannot upgrade to the newModalDialog
. There's no guarantee it will work with React 18 - Popover: The former Popover component was renamed to
LegacyPopover
, but continues to exist for users who cannot upgrade to the newPopover
.
Fixed
- AlertBox: "warning" skin close button now has correct color contrast
- Treeshaking: Fixed an issue where icons weren't being tree-shaken on a page
v1.14.0
Fixed
- Accordion: focus state no longer clipped for nested accordions
- Button: Clear Selections buttons now line-wrap on smaller screens, to prevent a Chrome bug
- Carousel: "fraction" variant's focus state for arrow buttons no longer overlaps the content
- Checkbox and
RadioButton
: disabled versions have correct visuals
v1.13.0
Added
- Checkbox now has a prop
instant
, which causes animation (e.g. for the "favorite" checkbox) to occur instantly - Range: the new
unfilled
option makes the track unfilled to the left of the thumb
Updated
- ColorSwatches: visible label is now horizontally centered when above/below the swatch
- focus state styling updated globally, and across all SWAN components
- RatingsStars: yellow stars updated to use the yellow from the Vista palette
- SelectionSet: labels with really long words can now break them onto two lines as needed
- SelectionSet: tiles-mini skin now has a minimum width for the image, and no minimum width for the label
- useBrowserHistoryState: remove the duplication of history state on back button
Fixed
- Carousel: using "fraction" variant in dark mode, text and buttons are now legible
- ModalDialog:
panel-top
andpanel-bottom
variants usingbodyWidth="capped"
no longer get awkward drop shadows around their buttons - SelectionSet: clickable elements inside a selected selection can be clicked
- useId: fixed useLayoutEffect warning during SSR
v1.12.0
Added
- SelectionSet: new options for the tiles-mini skin:
imageWidth
,imageVerticalAlignment
,tileContentsPadding
,tileImagePadding
- useBrowserHistoryState: new optional parameter
{replace:true}
to handle the history replace on close
Updated
- Buttonbar: visual redesign
- Link: hover color darkened to improve color contrast against light grey backgrounds
Fixed
- StandardHeroText: Spacing around Hero text for larger screen
- TextInputWithButtonInsetProps: fix the styling issue for
skin:searchbar
. - StandardTile: "covering" CTA links will now cover the whole tile
- Compiled CSS: Invalid properties and values used.
- useId: use
useLayoutEffect
instead ofuseEffect
for slightly better performance - DropdownWithFloatingLabel: stop passing
fullWidth
prop as attribute to div
v1.11.0
Added
- DropdownWithFloatingLabel: now supports
fullWidth
prop - Typescript: added children props explicitly to align with react 18 types
Fixed
- Accordion: Invalid CSS expression for collapsible content
- List: bullets are now vertically centered regardless of font size
- StandardTile: Invalid SASS interpolation for links
- Tabs: sticky headers now have a background color when in dark mode
v1.10.0
Added
- Checkbox: new "favorite" skin creates a heart-shaped checkbox for when the user is selecting a favorite design from a gallery of choices
- ColorSwatch: support linear and radial gradients for two-tone swatches
- DropdownWithFloatingLabel: new component that works like TextInputWithFloatingLabel, but for Dropdowns
- StepIndicator: the new
showAllSteps
feature will show all steps always, even on mobile screens.
Updated
- TextInput,
Dropdown
,Listbox
: new visual styling, including standardized component heights and colors
Fixed
- Button: Unstyled skin button in disabled state
- ColorSwatches: The
labelPosition
feature introduced in v1.6 included context wrapping around the wrapperColorSwatches
. For some of the users who were individually using theColorSwatch
component (although not recommended), this became a breaking change. This is fixed and now a non-breaking change. - ModalDialog: using the
panel-bottom
variant, the dialog title no longer has extra indentation. - Pagination: visual support for steps that are
<button>
tags - Typescript: revert Typescript changes for React 18 support due to downstream error
v1.9.0
No-op Release
v1.8.0
Added
- Experimentation: Added experiment for button
Updated
- Typescript: added children props explicitly to align with react 18 types
v1.7.2
Fixed
- Combobox: Popover remaining open even when a selection is done
v1.7.1
Fixed
- SelectionSet: layout shift when switching between options
v1.7.0
Added
- Spinner: new component for loading spinner
Updated
- Combobox: When used inside ModalDialog, fixed the ListBox popover overlay getting hidden behind the ModalDialog overlay
- Preloader is now deprecated in favor of
Spinner
Fixed
- ListboxOption: When used inside darkMode, the color of the selected state changes to white if hovered off
- RatingsStars: Add role="img" to div element so that aria-label is valid for A11Y
v1.6.1
Fixed
- Combobox: Missing hover effect on the options
- ToggleSwitch: While fixing the issue mentioned in v1.6.0, introduced a new issue where on toggling the switch, alters the width of the entire component.
v1.6.0
Added
- ColorSwatches: Now provides the option to position the label in 4 different positions
- Skeleton Text: new component
Updated
- Background color "loading shimmer": updated visuals
- Popover:
PopoverLauncher
settingaria-expanded
to it's first child rather than the wrapping element
Fixed
- Listbox: Only selected option being read by screen reader when navigating through all the available listbox options.
- StandardBanner:
- Image not visible when using <picture> tag
- For the layout "side-by-side", "center" alignment not working in either direction
- ToggleSwitch: Toggling the state alters the position of the component
v1.5.0
Updated
- Listbox: Updated state for focus, hover, active and selected states for ListboxOption
Fixed
- Button: Fix focus indicator visibility on Safari. Also fixes
SelectionSet
andListbox
- Button with
Icon
: skin tone not being respected - TextInputWithFloatingLabel: Label not associated with the input element
v1.4.0
Added
- Exposed
SWAN_BASE_CDN_URL
constant just for the CDN - Choosing SWAN base URL is now simplified
<SwanProvider>
&<SwanHead>
exposes props swanTenant and swanLocale to determine the base URL.- Exposed a utility method called
getSwanBaseUrl
which acceptstenant
andlocale
and returns the corresponding baseUrl, in case user is not using SwanProvider above. - the supported tenant and locales are based on the live site as on Dec 13.
- When a given tenant and locales are not found, it would fallback to the SWAN CDN.
Fixed
- Carousel:
- gridGutters prop spacing on SSR
- minute visual accessibility improvements
- Link: skin cta's arrow icon vertical alignment fix
- ModalDialog fullBleed: ModalDialogNav being invisible and issues with Firefox.
- Pagination: Pagination buttons invisible on Safari browser.
- Thumbnail Hero: Thumbnail Slides are now defaulting to use
span
. - Less Tokens: Escaped media query tokens for less.
- Types:
ref
attributed from ComponentProps has been omitted for others to extend.
v1.3.2
Added
- New values for core prop
bgc
viz. gray-400, gray-500, gray-600(darkMode), gray-900(darkMode)
Updated
- ThumbnailsHero: using "under" skin, height of the component is based on the text content, not the image
Fixed
- Carousel:
- Slide rendering partially on initial load
accessibleTextForDots
prop being mandatory even for the cases where there are no dots
Carousel & ThumbnailsHero
: "currentSlide" prop not working- Count: Blank container when rendering a variable with value 0
- LeftHandNavigation: Divider color when used within a container having darkMode
- Less Tokens: wrapping values with
~"<value>"
when it starts withmin
to escape less parser treating it as a less function
v1.3.1
Added
- Icon: Added support for new prop
objectFit
Fixed
- Carousel: Any child CTA links ending up on new line
- Button with custom
Icon
: Icon positioning and color fixes - Listbox: When Listbox with inner label is passed with empty value, it shows the Reach UI's dropdown arrow
v1.3
Fixed
- AlertBox: Fixed hook usage rule violation
- Carousel:
- using the
full
option now haveoverflow:hidden
on them if they're not inside Bounded Content, to prevent the Carousel from creating horizontal scrollbars - Jitter effect when an
<a>
tag is rendered inside<CarouselSlide>
- using the
- Hooks exported for the components:
Buttonbar
,Collapsible
,Select
,ModalDialog
andTabs
. - Link: When
to
prop is provided and none of the local attributesas
/component
/render
or the SwanProvider's propglobalLinkComponent
is set, the href's computed value will be(href || to)
- Listbox:
useListboxContext
hook which was incorrectly exported in v1.2 - Selection Set: missing
role
attribute restored
Added
- Typography: New values
xm2
,xm1
,x
,x1
,x2
,x3
,x4
,x5
,x6
for fontSize prop(also includes new CSS tokens), corresponding to the new scale. Should not be used externally.
v1.2.3
Removed
- Typography textSize's prop usage warning
Fixed
- Carousel: "full" skin's prev and next arrows now have correct placement
- Standard Tile: Responsive Images within links will now show with correct dimensions
Added
- Codemod script
npx jscodeshift -- -t ./node_modules/@vp/swan/codemod-scripts/font-size-rollback-v1.2.2.ts ./src/**/*.(j|t)sx --parser=tsx
v1.2
Added
- Combobox: Exported reach-ui's contexts
useComboboxContext
anduseComboboxOptionContext
- Listbox: Exported reach-ui's context
useListboxContext
Updated
- Buttonbar: new variant
toolbar
to support Buttonbars ofButton
s or of mixed types - Color: new visuals for
loading-shimmer
background - Link: new
width
prop, which accepts valuefull-width
to make the link full-width - Modal Dialog: component no longer transitions if the user has "prefers reduced motion" on
- Thumbnails Hero: max-height set to 75vh
Fixed
- Aspect Ratio and Responsive Image: underlying tag is now
span
instead ofdiv
, so that it creates proper HTML when used inside abutton
etc. - Background color: semantic holiday colors are now available in the marketing arrays
- Button:
width
prop with a value offull-width
now works onunstyled
Buttons - Buttonbar: component outputs now correct
role
attribute, based on thevariant
prop - Color Swatches: crossout stroke colors are now correct in both light and dark mode
- Standard Tile: for "product" and "gallery" skins, the name, price, and links are now visible when in dark mode
v1.1.1
Fixed
- Buttonbar,
PopoverCloser
,PopoverContent
,PopoverLauncher
,TabContent
: necessary accessibility attributes not being applied.
v1.1
Added
- Background color: new colors added for holiday support:
holiday-beige-1
,holiday-green-1
,holiday-green-2
,holiday-red-1
,holiday-red-2
- Core prop
fontFamily
- New font family addition for holiday:
Tiempos
- Button
- Added
link
skin
- Added
- Card
- skin
link
for shadow effect when using with covering link
- skin
- Carousel
Carousel
component accepts accessible text props for the previous, next and dot buttons viz.accessibleTextForPrevious
,accessibleTextForNext
andaccessibleTextForDots
respectively.- Disabled arrow buttons are now better styled
- Finite Carousel: This is a design change. When you are at an end slide, the arrow (prev/next) buttons will now be always visible, but in a disabled state. This is to keep keyboard focus in place when the user reaches the first or last slide.
- Color Swatches:
- accessible text is now visible on hover and focus
- Color swatch: updated border color from grey-300 to grey-600 in light mode
- Promo Bar
- skin
inverse
for white text on black background.
- skin
- Standard Tile:
- new
StandardTileSeparatelyClickableContents
sub-component added, to allow a second Link to go to somewhere other than the target of the tile's "covering" Link
- new
- ThumbnailsHero component accepts accessible text props for the dot buttons viz.
accessibleTextForDots
.
Updated
- Button:
- Updated the
ClearAllButton
focus state to provide better color contrast. - Updated
Button
focus state behavior. - Updated types to use
button
only (removeda
andinput
). For using it as a link, userender
prop instead.
- Updated the
- Callout:
skin
'holiday' color to semantic-holiday-red-2variant
'inverse' default background set to black
- Carousel:
- Active dot look and feel enhanced, so users can identify it not just by color, but by size as well
- Focused dot look and feel enhanced
- Combobox:
ComboboxOption
highlighted state
- Listbox:
- Accessibility improvements:
- Incorrect ARIA attributes and roles for the components
- Accessing the option via keyboard will scroll the container accordingly, to keep the focused option in view
- Tabbing an open listbox will close the listbox and set the focus to the listbox button
- Selected option will be in view and focus when listbox is opened
- Listbox option focus, hover and selected behavior design
- Accessibility improvements:
- Promo Bar
skin
'holiday' color to semantic-holiday-red-2
- Selection Set:
- focus behavior
- Range: Updated visuals to distinctly show progress area.
- Card,
IconTileSet
,StandardHero
,StandardTile
,Button
,SecondaryTile
- Types to include the base element only. Additional types for link (
a
tag) has been removed from types. - For using props like
href
withas="a"
, types will give errors. - For better SEO, use
Link
within heading of these component withcovering
props. (others:removeLinkStyles
)
- Types to include the base element only. Additional types for link (
Fixed
- Core prop
fontSize
not respecting string values - Breadcrumbs: hyperlinks for the current page don't get text underline; focus indicator is no longer clipped top/bottom
- RatingsStars: when using "monochromatic" skin, placing darkMode directly on the RatingsStars now uses correct colors
- Carousel:
- Inactive slides will not receive focus when tabbing, compared to previous and hence avoid burdening with extra TAB stops and keyboard users can identify their position better on the page.
skin
promo-bar having focusable border and shadow around the entire wrapper
- Listbox:
- Incorrect ARIA attributes and roles for the components
- TextInput :
size
mini for the input variants floating label and button beside - ThumbnailsHero's CarouselSlide(thumbnail) is now keyboard accessible
Removed
- Typography component adding class
swan-font-weight-normal
by default
v1.0.2
Added
- Entire dist-pkg artifacts exported in the package. The reason for doing so is to expose tokenized SCSS tokens of all kinds (literal, semantic, component level, etc.) to the users. This way users can import the SCSS tokens specific to a namespace and also won't directly refer to the literal value (which is the case when they import tokens/tokens.scss).
v1.0.1
Fixed
- Link
skin
cta: Arrow icons size and alignment
What's new in 1.0?
1. Design Changes
For the initial SWAN release, visual changes from Visage are (deliberately) very minor. During the transition, we don't want end users to easily notice which pages are on Visage and which have upgraded to SWAN, so the two design systems are 99% visually the same. This will give teams time to make the transition and not feel that they have to make a quick, rushed update in order to keep their pages from looking outdated.
Vista has plans to do brand updating in the future, but those will be part of a future SWAN release, not part of SWAN 1.0.
Notable exceptions are:
1.1 Screen sizes
To support user experiences for large monitors, which are increasingly common, we've added a new screen size to our responsive system. In addition to the Large screen size (1440+), there is also now an Extra-Large size at 1920+. This also means that page content will no longer max out at 1440 pixels wide.
If your page contains something that's specific to Large screens (such as a Lg
grid column width, or a media query inside your page's stylesheet that targets Large screen), you are likely going to want to apply that same something to Extra-Large screens as well. For instance, if your page is using the Grid to create a zone that's 3 grid columns wide on Large screens, specifying spanLg={3}
, then you are likely going to want to change that so that it's spanLg={3} spanXl={3}
instead.
1.2 Bounded content & page width
In keeping with the screen size changes (above), the Bounded Content component that wraps most page content now has a maximum width of 1920px instead of 1440px.
1.3 Font weights
Vista has been undergoing a brand change with typography; the new vista.com website uses only two font weights, whereas Visage had three.
Accordingly, SWAN has only two weights. The larger headings and text sizes in Visage used a hefty font-weight; in SWAN, these headings and text sizes will still be bold, but not as heavy as they were in Visage. This change is deliberate.
1.4 Updated primary text color
Previously in Visage, we used pure black color for the text. In SWAN, we have updated primary text color to a little lighter tone(black at 90% opacity). This is in consideration of pure black text being an eye strain for readers.
1.5 Introducing new core colors
Replaced semantic/descriptive names with number value names.
2. Features new to SWAN
2.1 Convenience components
Convenience elements provide a wrapper component for many commonly used HTML tags (like p
, h1-h6
, img
, section
, select
and span
), outputting the appropriate SWAN component. These convenience components follow SWAN standards and were built for extensibility for future standards. This helps avoids an increasing number of components, and at the same time provides a core component which can be configured to provide the functionality we want.
For example, if you want to render an image as a progressive or a responsive image, you don't need to use the specific component ProgressiveImage
or ResponsiveImage
. Instead, you can simply use Img
with a variant
prop that indicates either progressive or responsive.
2.2 Icon
component
We have introduced a new Icon
component which provides more flexibility, and usability and has a greater stock of icons, which has been a long pending request from devs since Visage provided a very small set of icons. We have also deprecated ControlIcon
in favour of this.
2.3 Core prop updates
- BaseProps type renamed to
SwanStyleProps
- swanStyle prop added
- textAlign prop added
- textAllCaps prop added
- textColor prop added
- fontWeight prop added
- fontSize prop added
- display prop added
- lightMode prop added
- bgc alias added corresponding to
backgroundColor
and both of them now support responsive styling - bgShort alias added corresponding to
backgroundShort
and both of them now support responsive styling - srOnly alias added corresponding to
visuallyHidden
and both of them now support responsive styling
We have introduced a lot of new core props that are very commonly used across each component and added some aliases to the existing props having a long name or the terms which are very frequently used in web technologies.
The most noticeable prop above is fontSize
, which uses a new typography scale and we encourage using this over Typography's textSize
prop. Do refer to the Typography's Size section before using this.
Details of all the core props can be found under Utilities page
2.4 Gatsby Head API compatibility
From v4.19.0, Gatsby has added support for the Head API, which includes a built-in Head
export that allows you to add elements to the document head of your pages. SWAN can be used with both less than 4.19.0 and >=4.19.0.
2.5 Strict type checks
SWAN 1.0 adds strict and runtime type checking for components and their props so that things are handled beforehand.
2.7 Refactored and reduced CSS tokens and class names
One of the big priorities for SWAN was to make it interoperable with any of the other libraries or design systems that a Vista property might be using. Therefore, we needed to defensively namespace all our CSS classes, to ensure unique names for the SWAN components.
- All our class names have a
swan-
prefix - All the CSS tokens are prefixed with a
--swan-
prefix - CSS tokens follow particular naming criteria: [system-name]-[component-name]-[property-name]-[state-name]-[breakpoint-name]
- CSS tokens in SWAN have been drastically reduced compared to its predecessor Visage, which will make things easier and provide a performance upscale (though very small) as well.