Skip to content

Commit

Permalink
Update badge component to use new spacing grid (Skyscanner#2298)
Browse files Browse the repository at this point in the history
Co-authored-by: Ana Belciug <[email protected]>
  • Loading branch information
anambl and Ana Belciug authored Nov 25, 2021
1 parent 101fff1 commit b2af634
Show file tree
Hide file tree
Showing 38 changed files with 47 additions and 40 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 6 additions & 1 deletion UNRELEASED.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
**Breaking:**

- bpk-component-badge:
- Updated badge component to use the new spacing grid. This component will now appear larger in height so should be checked this does not alter layout.

**Added:**
- bpk-component-datepicker:
- Added new (OPTIONAL) `inputComponent` property to allow for custom and multiple input fields to be provided for the calendar component when using ranges.
- The previous input will continue to work as expected if you do not supply your own input.

- bpk-component-datepicker
- bpk-component-scrollable-calendar
- Export `CALENDAR_SELECTION_TYPE` so it can be imported from `bpk-component-datepicker` and `bpk-component-scrollable-calendar` instead of `bpk-component-calendar`
- Export `CALENDAR_SELECTION_TYPE` so it can be imported from `bpk-component-datepicker` and `bpk-component-scrollable-calendar` instead of `bpk-component-calendar`
2 changes: 1 addition & 1 deletion packages/bpk-animate-height/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"react": "^16.3.0"
},
"devDependencies": {
"@skyscanner/bpk-foundations-web": "^4.0.0",
"@skyscanner/bpk-foundations-web": "^4.1.1",
"bpk-component-button": "^5.0.14"
}
}
2 changes: 1 addition & 1 deletion packages/bpk-component-accordion/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"react": "^16.3.0"
},
"devDependencies": {
"@skyscanner/bpk-foundations-web": "^4.0.0",
"@skyscanner/bpk-foundations-web": "^4.1.1",
"bpk-component-checkbox": "^3.0.17"
}
}
2 changes: 1 addition & 1 deletion packages/bpk-component-badge/BpkBadgeLayout.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@keyframes bpk-keyframe-spin{100%{transform:rotate(1turn)}}.bpk-badge-layout__container{position:relative;display:flex;min-height:2.625rem;padding:1.5rem}.bpk-badge-layout__container--light{background-color:#f1f2f8;border-radius:.25rem}
@keyframes bpk-keyframe-spin{100%{transform:rotate(1turn)}}.bpk-badge-layout__container{position:relative;display:flex;min-height:2.5rem;padding:1.5rem}.bpk-badge-layout__container--light{background-color:#f1f2f8;border-radius:.25rem}
6 changes: 4 additions & 2 deletions packages/bpk-component-badge/BpkBadgeLayout.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@

@import '~bpk-mixins/index';

$bpk-spacing-v2: true;

.bpk-badge-layout {
&__container {
position: relative;
display: flex;
min-height: $bpk-spacing-xxl;
padding: $bpk-spacing-base;
min-height: bpk-spacing-xxl();
padding: bpk-spacing-lg();

&--light {
background-color: $bpk-color-sky-gray-tint-07;
Expand Down
2 changes: 1 addition & 1 deletion packages/bpk-component-badge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"react": "^16.3.0"
},
"devDependencies": {
"@skyscanner/bpk-foundations-web": "^4.0.0",
"@skyscanner/bpk-foundations-web": "^4.1.1",
"bpk-component-icon": "^9.1.1",
"bpk-storybook-utils": "^1.0.15"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/bpk-component-badge/src/BpkBadge.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@keyframes bpk-keyframe-spin{100%{transform:rotate(1turn)}}.bpk-badge{display:inline-flex;padding:0 .375rem;align-items:center;color:#111236;background-color:#ffb54d;background-color:var(--bpk-badge-background-color, #ffb54d);border-radius:.25rem;margin:0;font-size:.75rem;line-height:1rem;font-weight:400;font-weight:700}.bpk-badge>svg{width:1rem !important;height:1rem !important;margin-top:.125rem;margin-bottom:.125rem}.bpk-badge--centered{vertical-align:text-bottom}.bpk-badge--docked-right{position:absolute;top:0;right:0;border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:0}html[dir='rtl'] .bpk-badge--docked-right{right:inherit;left:0;border-bottom-left-radius:0;border-bottom-right-radius:.25rem}.bpk-badge--docked-left{position:absolute;top:0;left:0;border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:0}html[dir='rtl'] .bpk-badge--docked-left{right:0;left:inherit;border-bottom-left-radius:.25rem;border-bottom-right-radius:0}.bpk-badge--success{background-color:#73cec6;background-color:var(--bpk-badge-success-background-color, #73cec6)}.bpk-badge--destructive{color:#fff;fill:#fff;background-color:#d1435b;background-color:var(--bpk-badge-destructive-background-color, #d1435b)}.bpk-badge--light{background-color:#f1f2f8;fill:#111236}.bpk-badge--inverse{background-color:#fff;fill:#111236}.bpk-badge--outline{background-color:transparent;color:#fff;box-shadow:inset 0 0 0 1px #fff;fill:#fff}
@keyframes bpk-keyframe-spin{100%{transform:rotate(1turn)}}.bpk-badge{display:inline-flex;padding:.25rem .5rem;align-items:center;color:#111236;background-color:#ffb54d;background-color:var(--bpk-badge-background-color, #ffb54d);border-radius:.25rem;margin:0;font-size:.75rem;line-height:1rem;font-weight:400;font-weight:700}.bpk-badge>svg{width:1rem !important;height:1rem !important;margin-top:.125rem;margin-bottom:.125rem}.bpk-badge--centered{vertical-align:text-bottom}.bpk-badge--docked-right{position:absolute;top:0;right:0;border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:0}html[dir='rtl'] .bpk-badge--docked-right{right:inherit;left:0;border-bottom-left-radius:0;border-bottom-right-radius:.25rem}.bpk-badge--docked-left{position:absolute;top:0;left:0;border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:0}html[dir='rtl'] .bpk-badge--docked-left{right:0;left:inherit;border-bottom-left-radius:.25rem;border-bottom-right-radius:0}.bpk-badge--success{background-color:#73cec6;background-color:var(--bpk-badge-success-background-color, #73cec6)}.bpk-badge--destructive{color:#fff;fill:#fff;background-color:#d1435b;background-color:var(--bpk-badge-destructive-background-color, #d1435b)}.bpk-badge--light{background-color:#f1f2f8;fill:#111236}.bpk-badge--inverse{background-color:#fff;fill:#111236}.bpk-badge--outline{background-color:transparent;color:#fff;box-shadow:inset 0 0 0 1px #fff;fill:#fff}
2 changes: 1 addition & 1 deletion packages/bpk-component-banner-alert/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"gitHead": "4e4ec9add28e1db54d6a38a10c331bbd163f2926",
"dependencies": {
"@skyscanner/bpk-foundations-web": "^4.0.0",
"@skyscanner/bpk-foundations-web": "^4.1.1",
"bpk-animate-height": "^4.0.15",
"bpk-component-close-button": "^3.0.17",
"bpk-component-icon": "^9.1.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/bpk-component-barchart/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"gitHead": "f9f94f86d7cfc75e43bc6ad5eb01b23e62a89cc8",
"dependencies": {
"@skyscanner/bpk-foundations-web": "^4.0.0",
"@skyscanner/bpk-foundations-web": "^4.1.1",
"bpk-component-mobile-scroll-container": "^3.0.16",
"bpk-mixins": "^24.0.3",
"bpk-react-utils": "^4.0.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/bpk-component-breakpoint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
"react": "^16.3.0"
},
"devDependencies": {
"@skyscanner/bpk-foundations-web": "^4.0.0"
"@skyscanner/bpk-foundations-web": "^4.1.1"
}
}
2 changes: 1 addition & 1 deletion packages/bpk-component-calendar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"gitHead": "4e4ec9add28e1db54d6a38a10c331bbd163f2926",
"dependencies": {
"@skyscanner/bpk-foundations-web": "^4.0.0",
"@skyscanner/bpk-foundations-web": "^4.1.1",
"bpk-component-aria-live": "^2.0.28",
"bpk-component-icon": "^9.1.1",
"bpk-component-select": "^5.0.11",
Expand Down
2 changes: 1 addition & 1 deletion packages/bpk-component-checkbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"react": "^16.3.0"
},
"devDependencies": {
"@skyscanner/bpk-foundations-web": "^4.0.0",
"@skyscanner/bpk-foundations-web": "^4.1.1",
"bpk-storybook-utils": "^1.0.15"
}
}
2 changes: 1 addition & 1 deletion packages/bpk-component-datatable/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@
"react": "^16.3.0"
},
"devDependencies": {
"@skyscanner/bpk-foundations-web": "^4.0.0"
"@skyscanner/bpk-foundations-web": "^4.1.1"
}
}
2 changes: 1 addition & 1 deletion packages/bpk-component-datepicker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"react": "^16.3.0"
},
"devDependencies": {
"@skyscanner/bpk-foundations-web": "^4.0.0",
"@skyscanner/bpk-foundations-web": "^4.1.1",
"bpk-storybook-utils": "^1.0.15"
}
}
2 changes: 1 addition & 1 deletion packages/bpk-component-drawer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"gitHead": "f9f94f86d7cfc75e43bc6ad5eb01b23e62a89cc8",
"dependencies": {
"@skyscanner/bpk-foundations-web": "^4.0.0",
"@skyscanner/bpk-foundations-web": "^4.1.1",
"bpk-component-close-button": "^3.0.17",
"bpk-component-icon": "^9.1.1",
"bpk-component-link": "^3.0.15",
Expand Down
2 changes: 1 addition & 1 deletion packages/bpk-component-form-validation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"react": "^16.3.0"
},
"devDependencies": {
"@skyscanner/bpk-foundations-web": "^4.0.0",
"@skyscanner/bpk-foundations-web": "^4.1.1",
"bpk-component-button": "^5.0.14",
"bpk-component-checkbox": "^3.0.17",
"bpk-component-icon": "^9.1.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/bpk-component-horizontal-nav/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"react": "^16.3.0"
},
"devDependencies": {
"@skyscanner/bpk-foundations-web": "^4.0.0",
"@skyscanner/bpk-foundations-web": "^4.1.1",
"bpk-component-text": "^4.0.17",
"bpk-storybook-utils": "^1.0.15"
}
Expand Down
4 changes: 2 additions & 2 deletions packages/bpk-component-icon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
},
"gitHead": "f9f94f86d7cfc75e43bc6ad5eb01b23e62a89cc8",
"dependencies": {
"@skyscanner/bpk-foundations-web": "^4.0.0",
"@skyscanner/bpk-svgs": "^14.0.10",
"@skyscanner/bpk-foundations-web": "^4.1.1",
"@skyscanner/bpk-svgs": "^14.0.12",
"bpk-mixins": "^24.0.3",
"bpk-react-utils": "^4.0.1",
"prop-types": "^15.7.2"
Expand Down
2 changes: 1 addition & 1 deletion packages/bpk-component-image/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"react": "^16.3.0"
},
"devDependencies": {
"@skyscanner/bpk-foundations-web": "^4.0.0",
"@skyscanner/bpk-foundations-web": "^4.1.1",
"bpk-component-mobile-scroll-container": "^3.0.16",
"bpk-component-text": "^4.0.17"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/bpk-component-link/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"react": "^16.3.0"
},
"devDependencies": {
"@skyscanner/bpk-foundations-web": "^4.0.0",
"@skyscanner/bpk-foundations-web": "^4.1.1",
"bpk-storybook-utils": "^1.0.15"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
"react": "^16.3.0"
},
"devDependencies": {
"@skyscanner/bpk-foundations-web": "^4.0.0"
"@skyscanner/bpk-foundations-web": "^4.1.1"
}
}
2 changes: 1 addition & 1 deletion packages/bpk-component-navigation-bar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"react": "^16.3.0"
},
"devDependencies": {
"@skyscanner/bpk-foundations-web": "^4.0.0",
"@skyscanner/bpk-foundations-web": "^4.1.1",
"bpk-component-icon": "^9.1.1",
"bpk-storybook-utils": "^1.0.15"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/bpk-component-navigation-stack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"gitHead": "f9f94f86d7cfc75e43bc6ad5eb01b23e62a89cc8",
"dependencies": {
"@skyscanner/bpk-foundations-web": "^4.0.0",
"@skyscanner/bpk-foundations-web": "^4.1.1",
"bpk-mixins": "^24.0.3",
"bpk-react-utils": "^4.0.1",
"prop-types": "^15.7.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/bpk-component-nudger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"gitHead": "f9f94f86d7cfc75e43bc6ad5eb01b23e62a89cc8",
"dependencies": {
"@skyscanner/bpk-foundations-web": "^4.0.0",
"@skyscanner/bpk-foundations-web": "^4.1.1",
"bpk-component-button": "^5.0.14",
"bpk-component-icon": "^9.1.1",
"bpk-mixins": "^24.0.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/bpk-component-phone-input/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"gitHead": "f9f94f86d7cfc75e43bc6ad5eb01b23e62a89cc8",
"dependencies": {
"@skyscanner/bpk-foundations-web": "^4.0.0",
"@skyscanner/bpk-foundations-web": "^4.1.1",
"bpk-component-input": "^6.0.27",
"bpk-component-label": "^5.0.15",
"bpk-component-select": "^5.0.11",
Expand Down
2 changes: 1 addition & 1 deletion packages/bpk-component-progress/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"gitHead": "5c156b97cb0ba5e75851d3c763334578714c895e",
"dependencies": {
"@skyscanner/bpk-foundations-web": "^4.0.0",
"@skyscanner/bpk-foundations-web": "^4.1.1",
"bpk-mixins": "^24.0.3",
"bpk-react-utils": "^4.0.1",
"lodash.clamp": "^4.0.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/bpk-component-radio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"react": "^16.3.0"
},
"devDependencies": {
"@skyscanner/bpk-foundations-web": "^4.0.0",
"@skyscanner/bpk-foundations-web": "^4.1.1",
"bpk-storybook-utils": "^1.0.15"
}
}
2 changes: 1 addition & 1 deletion packages/bpk-component-rating/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"react": "^16.3.0"
},
"devDependencies": {
"@skyscanner/bpk-foundations-web": "^4.0.0",
"@skyscanner/bpk-foundations-web": "^4.1.1",
"bpk-component-text": "^4.0.17"
}
}
2 changes: 1 addition & 1 deletion packages/bpk-component-scrollable-calendar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"gitHead": "4e4ec9add28e1db54d6a38a10c331bbd163f2926",
"dependencies": {
"@skyscanner/bpk-foundations-web": "^4.0.0",
"@skyscanner/bpk-foundations-web": "^4.1.1",
"bpk-component-calendar": "^10.0.1",
"bpk-component-text": "^4.0.17",
"bpk-mixins": "^24.0.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/bpk-component-section-list/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"gitHead": "f9f94f86d7cfc75e43bc6ad5eb01b23e62a89cc8",
"dependencies": {
"@skyscanner/bpk-foundations-web": "^4.0.0",
"@skyscanner/bpk-foundations-web": "^4.1.1",
"bpk-component-icon": "^9.1.1",
"bpk-component-text": "^4.0.17",
"bpk-mixins": "^24.0.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/bpk-component-slider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"gitHead": "5c156b97cb0ba5e75851d3c763334578714c895e",
"dependencies": {
"@skyscanner/bpk-foundations-web": "^4.0.0",
"@skyscanner/bpk-foundations-web": "^4.1.1",
"bpk-mixins": "^24.0.3",
"bpk-react-utils": "^4.0.1",
"prop-types": "^15.7.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/bpk-component-spinner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"gitHead": "5c156b97cb0ba5e75851d3c763334578714c895e",
"dependencies": {
"@skyscanner/bpk-svgs": "^14.0.8",
"@skyscanner/bpk-svgs": "^14.0.12",
"bpk-mixins": "^24.0.3",
"bpk-react-utils": "^4.0.1",
"prop-types": "^15.7.2"
Expand Down
2 changes: 1 addition & 1 deletion packages/bpk-component-theme-toggle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"gitHead": "5c156b97cb0ba5e75851d3c763334578714c895e",
"dependencies": {
"@skyscanner/bpk-foundations-web": "^4.0.0",
"@skyscanner/bpk-foundations-web": "^4.1.1",
"bpk-component-label": "^5.0.15",
"bpk-component-select": "^5.0.11",
"bpk-mixins": "^24.0.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/bpk-component-tooltip/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"react": "^16.3.0"
},
"devDependencies": {
"@skyscanner/bpk-foundations-web": "^4.0.0",
"@skyscanner/bpk-foundations-web": "^4.1.1",
"bpk-component-text": "^4.0.17"
}
}
4 changes: 2 additions & 2 deletions packages/bpk-mixins/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
},
"gitHead": "5c156b97cb0ba5e75851d3c763334578714c895e",
"dependencies": {
"@skyscanner/bpk-foundations-web": "^4.0.0",
"@skyscanner/bpk-svgs": "^14.0.8"
"@skyscanner/bpk-foundations-web": "^4.1.1",
"@skyscanner/bpk-svgs": "^14.0.12"
},
"peerDependencies": {
"node-sass": "^4.12.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/bpk-stylesheets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
"gitHead": "5c156b97cb0ba5e75851d3c763334578714c895e",
"dependencies": {
"@skyscanner/bpk-foundations-web": "^4.0.0",
"@skyscanner/bpk-foundations-web": "^4.1.1",
"bpk-mixins": "^24.0.3",
"normalize.css": "4.2.0"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/bpk-theming/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"gitHead": "c2217d61875a1f3aa2bb9ed9583c50e3f1523501",
"dependencies": {
"@skyscanner/bpk-foundations-web": "^4.0.0",
"@skyscanner/bpk-foundations-web": "^4.1.1",
"prop-types": "^15.7.2"
},
"peerDependencies": {
Expand Down

0 comments on commit b2af634

Please sign in to comment.