package name | version |
---|---|
@rei/cedar | ^13.x.x |
@rei/cdr-tokens | ^11.x.x |
@rei/cdr-component-variables | ^8.x.x |
If your project depends on any shared component packages, you will want to update those packages to the new version of Cedar before updating your microsite.
Adds type="date"
to CdrInput to support browser-native date-picking functionality. See the CdrInput article for more information.
Resolved an issue where CdrTabs was not emitting a tab-change
event.
CdrSkeleton is now available. Skeletons are used to visually communicate when content is in the process of loading. See the CdrSkeleton article for more information.
Polyfills for older, unsupported browsers have been removed. This has reduced the package size by about 50 Kb and should result in better application performance. View Cedar's browser targets (opens new window).
CdrChip's design has been tweaked to improve visual contrast between selected and unselected states.
The Cedar component library is now less vocal about transitions and when they end.
v13.2.0 changelogNew icons have been added to the library.
v13.1.0 changelogCdrModal has been updated to address an issue with the display of the close button when hiding the modal's title.
v13.0.2 changelogCdrAccordion has been updated to address an issue where the caret icon wasn't animating on accordion open/close.
v13.0.1 changelogWe've migrated to Vue 3! While the components and their API's remain largely the same, we have adopted Vue 3's Composition API and rewritten the entire library from the ground-up as Vue SFC's (Single File Components). We have also adopted Vite, allowing us to significantly reduce the complexity of our build system.
Going forward, our Vue 3 library will be the only one we support with features and functionality. We will continue to support our Vue 2 library with basic maintenance and bug fixes until Spring 2023.
Check out the repo on Github .
Note: Shortly after launch, the Vue 3 repo will be renamed to rei-cedar
and our Vue 2 library will be republished under @rei/cedar-vue-2
.
While the API for most components remains unchanged, some changes were necessary to accommodate breaking changes between Vue 2 and Vue 3.
In Vue 2, class
and style
attributes were excluded from the $attrs
object.
In Vue 3, The $attrs
object now contains all attributes passed to a component, including class
and style
.
By default, attributes applied to a component are "passed through" to its parent element. For certain Cedar components, we make use of Vue's inheritAttrs
property to bind attributes to a deeper element in the component. This allows us to pass attributes like loading="lazy"
to the <img>
element within CdrImg, even when it's being used with a wrapping ratio container
We have identified two components where this deeper class binding was causing style issues with the inclusion of class
and style
in the $attrs
object. Rather than hack around Vue 3's new behavior, we have introduced new props that allow a custom class to be bound to the parent element
CdrImg: A new containerClass
prop has been added to allow passing a custom class to the cdr-img-ratio
container div
CdrInput: A new labelClass
prop has been added to allow passing a custom class to the cdr-label-standalone
container div
Please reach out to us if you identify other situations where this attribute changes is causing issues.
Vue migration guide: $attrs (opens new window)
slot
syntaxThe syntax for using a named slot on a template
element has changed. Slots will not function correctly in Vue 3 using the old syntax.
Old
<template slot="title">...</template>
New
<template #title>...</template>
v-html
directiveVue 3 has limited the use (opens new window) of the v-html
directive and it no longer functions on custom components (e.g. CdrText). If your application relied on this pattern, our current recommendation is to replace any custom components with standard HTML elements and style them using tokens and/or component variables.
Old
<cdr-text
v-html="htmlContent"
class="my-custom-class"
/>
<style lang="scss">
@import '@rei/cdr-tokens/dist/scss/cdr-tokens.scss';
.my-custom-class {
@cdr-text-subheading-sans-500;
}
</style>
New
<p
v-html="htmlContent"
class="my-custom-class"
/>
<style lang="scss">
@import '@rei/cdr-tokens/dist/scss/cdr-tokens.scss';
.my-custom-class {
@cdr-text-subheading-sans-500;
}
</style>
v-model
Multiple Cedar components utilize the Vue's v-model
directive. Depending on your implementation, you may have to refactor your applications for the updates to v-model
in Vue 3.
Cedar components using v-model
:
Vue migration guide: v-model (opens new window)
The reset.css
asset is now consumed at the root level of the /dist/
Old
import '@rei/cedar/dist/style/reset.css';
New
import '@rei/cedar/dist/reset.css';
CdrSwitch: We have introduced a new UI switch control intended for switching between binary states (e.g. on/off, true/false, etc.)
CdrToggleButton: We have introduced a new UI toggle control intended for toggling between distinct options (e.g. metric/imperial)
Note: These components are only available in our Vue 3 library
aria-describedby
when in an error staterole="radiogroup"
for the CdrChipGroup when using Chip in a "single select" configurationThe JavaScript variable tokens are now exported as an ECMA module to work better with Vite applications.
A keen observer may notice our documentation site is still utilizing Vue 2. We're currently in the process of rebuilding our documentation site from the ground up and hope to have it released in early 2023.
While it's not ideal to document a Vue 3 component library in a Vue 2 site, we have introduced a handful of changes to support our Vue 3 library in the interim: