From 7e0963431930457d9184afa922e39b82729c78b3 Mon Sep 17 00:00:00 2001 From: Ben Griffin Date: Wed, 20 Apr 2022 11:53:33 -0700 Subject: [PATCH 1/9] chore(component-variables): deprecate CdrBanner component variable BREAKING CHANGE: CdrBanner component variable is no longer exported from Cedar --- build/component-variables-transfer.js | 1 - 1 file changed, 1 deletion(-) diff --git a/build/component-variables-transfer.js b/build/component-variables-transfer.js index 03cd77226..6d1af08e9 100644 --- a/build/component-variables-transfer.js +++ b/build/component-variables-transfer.js @@ -8,7 +8,6 @@ const SUPPORTED_COMPONENTS = [ /* global vars */ 'options.vars.scss', /* component vars */ - 'CdrBanner.vars.scss', 'CdrButton.vars.scss', 'CdrCard.vars.scss', 'CdrChip.vars.scss', From 106158f566d3a7c5c69f5e59606815acb36d24a5 Mon Sep 17 00:00:00 2001 From: Ben Griffin Date: Wed, 20 Apr 2022 12:12:04 -0700 Subject: [PATCH 2/9] chore(breadcrumb): remove scoped slots functionality --- src/components/breadcrumb/CdrBreadcrumb.jsx | 21 +++++++------------ .../__tests__/CdrBreadcrumb.spec.js | 19 ----------------- .../breadcrumb/examples/Breadcrumb.vue | 16 -------------- 3 files changed, 7 insertions(+), 49 deletions(-) diff --git a/src/components/breadcrumb/CdrBreadcrumb.jsx b/src/components/breadcrumb/CdrBreadcrumb.jsx index e0858b3d7..6bdfeb020 100644 --- a/src/components/breadcrumb/CdrBreadcrumb.jsx +++ b/src/components/breadcrumb/CdrBreadcrumb.jsx @@ -93,20 +93,13 @@ export default { key={breadcrumb.item.id || breadcrumb.item.name.replace(/ /g, '-').toLowerCase()} v-show={!this.truncate || (index >= this.items.length - 2)} > - {this.$scopedSlots.link - ? this.$scopedSlots.link({ - class: this.style['cdr-breadcrumb__link'], - href: breadcrumb.item.url, - content: breadcrumb.item.name, - }) - : ( this.$emit('navigate', breadcrumb, e)} - > - { breadcrumb.item.name } - ) - } + this.$emit('navigate', breadcrumb, e)} + > + { breadcrumb.item.name } + {delimiter} ); }); diff --git a/src/components/breadcrumb/__tests__/CdrBreadcrumb.spec.js b/src/components/breadcrumb/__tests__/CdrBreadcrumb.spec.js index 842af7c6f..fed7507fb 100644 --- a/src/components/breadcrumb/__tests__/CdrBreadcrumb.spec.js +++ b/src/components/breadcrumb/__tests__/CdrBreadcrumb.spec.js @@ -114,25 +114,6 @@ describe('CdrBreadcrumb', () => { expect(wrapper.vm.truncate).toBe(true); }); - it('breadcrumb link can be overridden with link scopedSlot', () => { - const wrapper = shallowMount(CdrBreadcrumb, { - propsData: { - items: [ - { - item: { - url: 'http://rei.com', - name: 'Scoped', - }, - }, - ], - }, - scopedSlots: { - link: '

{{link.href}} TEST {{link.content}} {{link.class}}

' - } - }); - expect(wrapper.text()).toBe('http://rei.com TEST Scoped cdr-breadcrumb__link'); - }); - it('applies focus to first breadcrumb on ellipsis click', async (done) => { const elem = document.createElement('div') if (document.body) { diff --git a/src/components/breadcrumb/examples/Breadcrumb.vue b/src/components/breadcrumb/examples/Breadcrumb.vue index 2ad09a545..d0c8dd0e5 100644 --- a/src/components/breadcrumb/examples/Breadcrumb.vue +++ b/src/components/breadcrumb/examples/Breadcrumb.vue @@ -38,22 +38,6 @@ data-backstop="breadcrumbs-default" @navigate="handleClick" /> -

- Scoped Slot -

- - - From bab4f53699ebe985914ffbba08be6af7062cc630 Mon Sep 17 00:00:00 2001 From: Ben Griffin Date: Wed, 20 Apr 2022 12:14:33 -0700 Subject: [PATCH 3/9] chore(pagination): remove scope slot support --- src/components/pagination/CdrPagination.jsx | 49 ++-- .../__tests__/CdrPagination.spec.js | 211 ------------------ 2 files changed, 16 insertions(+), 244 deletions(-) diff --git a/src/components/pagination/CdrPagination.jsx b/src/components/pagination/CdrPagination.jsx index fdd677361..3c506fa0c 100644 --- a/src/components/pagination/CdrPagination.jsx +++ b/src/components/pagination/CdrPagination.jsx @@ -184,20 +184,17 @@ export default { const LinkTag = this.linkTag; return this.innerValue > this.pages[0].page ? (
  • - {this.$scopedSlots.prevLink - ? this.$scopedSlots.prevLink(this.prevElAttrs) - : ( - - {this.prevElAttrs.content} - ) - } + + + {this.prevElAttrs.content} +
  • ) : (
  • - {this.$scopedSlots.nextLink - ? this.$scopedSlots.nextLink(this.nextElAttrs) - : ( - ) - } - +
  • ) : (