Skip to content

Commit f2d9efe

Browse files
committed
feat(tab-bar): update to use new transition tokens
1 parent e373d50 commit f2d9efe

5 files changed

Lines changed: 19 additions & 9 deletions

File tree

core/package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
"fs-extra": "^9.0.1",
6969
"jest": "^29.7.0",
7070
"jest-cli": "^29.7.0",
71-
"outsystems-design-tokens": "^1.3.7",
71+
"outsystems-design-tokens": "^1.3.8",
7272
"playwright-core": "^1.58.2",
7373
"prettier": "^2.8.8",
7474
"rollup": "^2.26.4",

core/src/components/tab-bar/tab-bar.ionic.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,13 @@
9494
// --------------------------------------------------
9595

9696
:host(.tab-bar-hide-on-scroll) {
97-
transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
97+
transition: transform globals.$ion-transition-time-200 globals.$ion-transition-curve-spring;
9898
}
9999

100100
:host(.tab-bar-scroll-hidden) {
101101
transform: translateY(calc(100% + var(--ion-safe-area-bottom, 0) + globals.$ion-space-1000)) translateX(calc(-50%));
102102

103-
transition: transform 0.35s cubic-bezier(0.3, 1, 0.1, 1);
103+
transition: transform globals.$ion-transition-time-350 globals.$ion-transition-curve-base;
104104
}
105105

106106
:host([slot="top"].tab-bar-scroll-hidden) {

core/src/components/tab-bar/test/hide-on-scroll/index.html

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
<ion-tabs>
2020
<div class="ion-page">
2121
<ion-content>
22-
<div class="spacer">
22+
<div class="spacer"></div>
23+
<div class="info">
2324
<p>Scroll down to hide the tab bar, scroll up to show it.</p>
2425
<p><strong>Requirements:</strong></p>
2526
<ul>
@@ -64,7 +65,14 @@
6465
background: linear-gradient(to bottom, #e0f7fa, #80deea, #26c6da, #00acc1, #00838f);
6566
}
6667

67-
.spacer p {
68+
.info {
69+
position: fixed;
70+
top: 30px;
71+
left: 30px;
72+
right: 30px;
73+
}
74+
75+
.info p {
6876
margin-bottom: 12px;
6977
font-size: 16px;
7078
color: #333;

core/src/foundations/ionic.vars.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -937,6 +937,7 @@ $ion-elevation-4: var(--token-elevation-4, 0px 3px 12px 0px rgba(0, 0, 0, 0.12),
937937
// Transition
938938
$ion-transition-curve-linear: var(--token-transition-curve-linear, linear);
939939
$ion-transition-curve-quick: var(--token-transition-curve-quick, cubic-bezier(0, 0, 0.2, 1));
940+
$ion-transition-curve-spring: var(--token-transition-curve-spring, cubic-bezier(0.16, 1, 0.3, 1));
940941
$ion-transition-curve-base: var(--token-transition-curve-base, cubic-bezier(0.4, 0, 1, 1));
941942
$ion-transition-curve-expressive: var(--token-transition-curve-expressive, cubic-bezier(0.4, 0, 0.2, 1));
942943
$ion-transition-curve-bounce: var(--token-transition-curve-bounce, cubic-bezier(0.47, 0, 0.23, 1.38));
@@ -945,6 +946,7 @@ $ion-transition-time-100: var(--token-transition-time-100, 100ms);
945946
$ion-transition-time-150: var(--token-transition-time-150, 150ms);
946947
$ion-transition-time-200: var(--token-transition-time-200, 200ms);
947948
$ion-transition-time-300: var(--token-transition-time-300, 300ms);
949+
$ion-transition-time-350: var(--token-transition-time-350, 350ms);
948950
$ion-transition-time-500: var(--token-transition-time-500, 500ms);
949951
$ion-transition-time-1000: var(--token-transition-time-1000, 1000ms);
950952
$ion-transition-time-1500: var(--token-transition-time-1500, 1500ms);

0 commit comments

Comments
 (0)