@deriv-web-design/ui 0.1.9 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/block-registry.json +12 -3
- package/components.manifest.json +6 -0
- package/dist/index.css +53 -36
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +8 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/block-registry.json
CHANGED
|
@@ -2836,7 +2836,8 @@
|
|
|
2836
2836
|
"deriv",
|
|
2837
2837
|
"dark",
|
|
2838
2838
|
"search",
|
|
2839
|
-
"help-centre"
|
|
2839
|
+
"help-centre",
|
|
2840
|
+
"navbar"
|
|
2840
2841
|
],
|
|
2841
2842
|
"sectionType": "header",
|
|
2842
2843
|
"global": false,
|
|
@@ -2851,7 +2852,8 @@
|
|
|
2851
2852
|
"secondaryButton",
|
|
2852
2853
|
"leftVisual",
|
|
2853
2854
|
"rightVisual",
|
|
2854
|
-
"search"
|
|
2855
|
+
"search",
|
|
2856
|
+
"underNavbar"
|
|
2855
2857
|
],
|
|
2856
2858
|
"variants": [
|
|
2857
2859
|
"visuals",
|
|
@@ -2878,7 +2880,8 @@
|
|
|
2878
2880
|
"secondaryButton": true,
|
|
2879
2881
|
"eyebrow": true,
|
|
2880
2882
|
"parallax": true,
|
|
2881
|
-
"search": true
|
|
2883
|
+
"search": true,
|
|
2884
|
+
"navbarClearance": true
|
|
2882
2885
|
},
|
|
2883
2886
|
"imageRoles": [
|
|
2884
2887
|
"left-visual",
|
|
@@ -2960,6 +2963,12 @@
|
|
|
2960
2963
|
"required": true,
|
|
2961
2964
|
"maxLength": 80
|
|
2962
2965
|
},
|
|
2966
|
+
"underNavbar": {
|
|
2967
|
+
"type": "boolean",
|
|
2968
|
+
"required": false,
|
|
2969
|
+
"description": "Set true when the fixed Navbar sits above this header (header is the first section on the page). Reserves top clearance equal to the navbar's footprint so the centred title does not slide under the fixed pill. Defaults to false.",
|
|
2970
|
+
"default": false
|
|
2971
|
+
},
|
|
2963
2972
|
"variant": {
|
|
2964
2973
|
"type": "string",
|
|
2965
2974
|
"required": true,
|
package/components.manifest.json
CHANGED
|
@@ -2014,6 +2014,12 @@
|
|
|
2014
2014
|
"required": true,
|
|
2015
2015
|
"description": "Main heading"
|
|
2016
2016
|
},
|
|
2017
|
+
"underNavbar": {
|
|
2018
|
+
"type": "boolean",
|
|
2019
|
+
"required": false,
|
|
2020
|
+
"description": "Set to `true` when the fixed `Navbar` is rendered above this header (it is the first section on the page). Reserves top clearance equal to the navbar's footprint so the vertically-centred title never slides under the fixed pill. Defaults to `false` — leave it off when there is no navbar above the header.",
|
|
2021
|
+
"default": false
|
|
2022
|
+
},
|
|
2017
2023
|
"variant": {
|
|
2018
2024
|
"type": "HeaderVariant",
|
|
2019
2025
|
"required": true,
|
package/dist/index.css
CHANGED
|
@@ -2834,7 +2834,8 @@
|
|
|
2834
2834
|
--hero-body-lh: var(--typography-body-md-line-height);
|
|
2835
2835
|
--hero-split-padding-top-mobile: var(--spacing-80);
|
|
2836
2836
|
--hero-split-padding-top-tablet: var(--spacing-96);
|
|
2837
|
-
--hero-split-
|
|
2837
|
+
--hero-split-radius: 1.5rem;
|
|
2838
|
+
--hero-split-min-height: 35.25rem;
|
|
2838
2839
|
--hero-shrink-radius: 3.5rem;
|
|
2839
2840
|
--hero-padding-top-mobile: var(--spacing-80);
|
|
2840
2841
|
--hero-padding-top-tablet: var(--spacing-96);
|
|
@@ -2909,19 +2910,18 @@
|
|
|
2909
2910
|
gap: var(--spacing-24);
|
|
2910
2911
|
}
|
|
2911
2912
|
.hero--split {
|
|
2913
|
+
background-position: left center;
|
|
2914
|
+
border-bottom-left-radius: var(--hero-split-radius);
|
|
2915
|
+
border-bottom-right-radius: var(--hero-split-radius);
|
|
2912
2916
|
animation: hero-split-shrink linear both;
|
|
2913
2917
|
animation-timeline: view();
|
|
2914
2918
|
animation-range: exit 0% exit 40%;
|
|
2915
2919
|
}
|
|
2916
2920
|
@keyframes hero-split-shrink {
|
|
2917
2921
|
0% {
|
|
2918
|
-
border-bottom-left-radius: 0px;
|
|
2919
|
-
border-bottom-right-radius: 0px;
|
|
2920
2922
|
scale: 1;
|
|
2921
2923
|
}
|
|
2922
2924
|
100% {
|
|
2923
|
-
border-bottom-left-radius: var(--hero-shrink-radius);
|
|
2924
|
-
border-bottom-right-radius: var(--hero-shrink-radius);
|
|
2925
2925
|
scale: 0.94;
|
|
2926
2926
|
}
|
|
2927
2927
|
}
|
|
@@ -2978,9 +2978,17 @@
|
|
|
2978
2978
|
height: 100%;
|
|
2979
2979
|
display: block;
|
|
2980
2980
|
}
|
|
2981
|
+
.hero--split .hero__text {
|
|
2982
|
+
gap: 0;
|
|
2983
|
+
}
|
|
2981
2984
|
.hero--split .hero__subtitle {
|
|
2982
|
-
font-size: var(--typography-
|
|
2983
|
-
line-height: var(--typography-
|
|
2985
|
+
font-size: var(--typography-h5-font-size);
|
|
2986
|
+
line-height: var(--typography-h5-line-height);
|
|
2987
|
+
font-weight: var(--typography-h5-font-weight);
|
|
2988
|
+
}
|
|
2989
|
+
.hero--split .hero__description {
|
|
2990
|
+
margin-top: var(--spacing-16);
|
|
2991
|
+
opacity: 1;
|
|
2984
2992
|
}
|
|
2985
2993
|
.hero--split .hero__buttons {
|
|
2986
2994
|
align-items: stretch;
|
|
@@ -3204,53 +3212,50 @@
|
|
|
3204
3212
|
.hero__inner {
|
|
3205
3213
|
padding: var(--spacing-48) var(--spacing-32);
|
|
3206
3214
|
}
|
|
3215
|
+
.hero--split {
|
|
3216
|
+
--hero-split-radius: 4rem;
|
|
3217
|
+
}
|
|
3207
3218
|
.hero--split .hero__inner {
|
|
3208
3219
|
max-width: var(--content-width-1280);
|
|
3209
|
-
padding-top:
|
|
3210
|
-
padding-bottom:
|
|
3220
|
+
padding-top: 0;
|
|
3221
|
+
padding-bottom: 0;
|
|
3211
3222
|
padding-left: var(--spacing-32);
|
|
3212
3223
|
padding-right: var(--spacing-32);
|
|
3213
3224
|
height: 100vh;
|
|
3225
|
+
min-height: var(--hero-split-min-height);
|
|
3214
3226
|
justify-content: center;
|
|
3215
3227
|
align-items: flex-start;
|
|
3216
3228
|
}
|
|
3217
3229
|
.hero--split .hero__content {
|
|
3218
3230
|
flex-direction: column;
|
|
3219
|
-
gap: var(--spacing-
|
|
3231
|
+
gap: var(--spacing-24);
|
|
3220
3232
|
max-width: 600px;
|
|
3221
3233
|
}
|
|
3222
3234
|
.hero--split .hero__left {
|
|
3223
3235
|
width: 100%;
|
|
3224
3236
|
}
|
|
3225
3237
|
.hero--split .hero__body {
|
|
3226
|
-
gap: var(--spacing-
|
|
3227
|
-
}
|
|
3228
|
-
.hero--split .hero__subtitle {
|
|
3229
|
-
line-height: var(--typography-h5-line-height);
|
|
3238
|
+
gap: var(--spacing-24);
|
|
3230
3239
|
}
|
|
3231
3240
|
.hero--split .hero__image-slot {
|
|
3232
3241
|
position: absolute;
|
|
3233
|
-
|
|
3234
|
-
right: auto;
|
|
3235
|
-
left: 50%;
|
|
3242
|
+
inset: auto -4% -14% auto;
|
|
3236
3243
|
transform: none;
|
|
3237
|
-
z-index:
|
|
3244
|
+
z-index: 1;
|
|
3238
3245
|
width: 50%;
|
|
3239
|
-
height:
|
|
3240
|
-
display:
|
|
3241
|
-
align-items: center;
|
|
3242
|
-
justify-content: center;
|
|
3246
|
+
height: 100%;
|
|
3247
|
+
display: block;
|
|
3243
3248
|
overflow: visible;
|
|
3244
3249
|
pointer-events: none;
|
|
3245
3250
|
max-width: none;
|
|
3246
3251
|
}
|
|
3247
3252
|
.hero--split .hero__image-slot img {
|
|
3248
3253
|
height: 100%;
|
|
3249
|
-
width:
|
|
3254
|
+
width: 100%;
|
|
3250
3255
|
max-height: none;
|
|
3251
3256
|
max-width: none;
|
|
3252
3257
|
object-fit: contain;
|
|
3253
|
-
object-position:
|
|
3258
|
+
object-position: 40% 100%;
|
|
3254
3259
|
}
|
|
3255
3260
|
.hero--split .hero__buttons {
|
|
3256
3261
|
flex-direction: row;
|
|
@@ -3261,10 +3266,14 @@
|
|
|
3261
3266
|
.hero--split .hero__overlay {
|
|
3262
3267
|
background:
|
|
3263
3268
|
linear-gradient(
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3269
|
+
180deg,
|
|
3270
|
+
rgba(0, 0, 0, 0.4) 0%,
|
|
3271
|
+
rgba(255, 255, 255, 0) 12%),
|
|
3272
|
+
linear-gradient(
|
|
3273
|
+
84.29deg,
|
|
3274
|
+
rgba(0, 0, 0, 0.2) 22%,
|
|
3275
|
+
rgba(143, 143, 143, 0.04) 84%,
|
|
3276
|
+
rgba(0, 0, 0, 0) 100%);
|
|
3268
3277
|
}
|
|
3269
3278
|
.hero--centered .hero__inner {
|
|
3270
3279
|
padding-top: var(--hero-padding-top-desktop);
|
|
@@ -3318,6 +3327,8 @@
|
|
|
3318
3327
|
--header-text-light: var(--color-slate-50);
|
|
3319
3328
|
--header-dark-min-height: 420px;
|
|
3320
3329
|
--header-dark-min-height-desktop: 460px;
|
|
3330
|
+
--header-navbar-clearance: 0px;
|
|
3331
|
+
--header-light-min-height: 540px;
|
|
3321
3332
|
--header-subtitle-size: var(--typography-body-md-font-size);
|
|
3322
3333
|
--header-subtitle-lh: var(--typography-body-md-line-height);
|
|
3323
3334
|
--header-subtitle-weight: var(--font-weight-semi-bold);
|
|
@@ -3333,10 +3344,13 @@
|
|
|
3333
3344
|
box-sizing: border-box;
|
|
3334
3345
|
overflow: hidden;
|
|
3335
3346
|
background-color: var(--header-light-bg);
|
|
3336
|
-
min-height:
|
|
3347
|
+
min-height: calc(var(--header-light-min-height) + var(--header-navbar-clearance));
|
|
3337
3348
|
display: flex;
|
|
3338
3349
|
align-items: center;
|
|
3339
3350
|
}
|
|
3351
|
+
.header--under-navbar {
|
|
3352
|
+
--header-navbar-clearance: var(--navbar-height, 4rem);
|
|
3353
|
+
}
|
|
3340
3354
|
.header__grid {
|
|
3341
3355
|
position: absolute;
|
|
3342
3356
|
inset: 0;
|
|
@@ -3372,12 +3386,12 @@
|
|
|
3372
3386
|
max-width: var(--content-width-1280);
|
|
3373
3387
|
margin: 0 auto;
|
|
3374
3388
|
box-sizing: border-box;
|
|
3375
|
-
padding: var(--spacing-24) var(--spacing-16);
|
|
3389
|
+
padding: calc(var(--spacing-24) + var(--header-navbar-clearance)) var(--spacing-16) var(--spacing-24);
|
|
3376
3390
|
display: flex;
|
|
3377
3391
|
flex-direction: column;
|
|
3378
3392
|
align-items: flex-start;
|
|
3379
3393
|
justify-content: center;
|
|
3380
|
-
min-height:
|
|
3394
|
+
min-height: calc(var(--header-light-min-height) + var(--header-navbar-clearance));
|
|
3381
3395
|
}
|
|
3382
3396
|
.header__content {
|
|
3383
3397
|
display: flex;
|
|
@@ -3463,11 +3477,11 @@
|
|
|
3463
3477
|
.header--dark,
|
|
3464
3478
|
.header--dark-search {
|
|
3465
3479
|
background-color: var(--header-dark-bg);
|
|
3466
|
-
min-height: var(--header-dark-min-height);
|
|
3480
|
+
min-height: calc(var(--header-dark-min-height) + var(--header-navbar-clearance));
|
|
3467
3481
|
}
|
|
3468
3482
|
.header--dark .header__inner,
|
|
3469
3483
|
.header--dark-search .header__inner {
|
|
3470
|
-
min-height: var(--header-dark-min-height);
|
|
3484
|
+
min-height: calc(var(--header-dark-min-height) + var(--header-navbar-clearance));
|
|
3471
3485
|
}
|
|
3472
3486
|
.header--dark .header__grid,
|
|
3473
3487
|
.header--dark-search .header__grid {
|
|
@@ -3521,7 +3535,7 @@
|
|
|
3521
3535
|
}
|
|
3522
3536
|
@media (min-width: 768px) {
|
|
3523
3537
|
.header__inner {
|
|
3524
|
-
padding: var(--spacing-40) var(--spacing-24);
|
|
3538
|
+
padding: calc(var(--spacing-40) + var(--header-navbar-clearance)) var(--spacing-24) var(--spacing-40);
|
|
3525
3539
|
align-items: center;
|
|
3526
3540
|
}
|
|
3527
3541
|
.header__content {
|
|
@@ -3539,8 +3553,11 @@
|
|
|
3539
3553
|
}
|
|
3540
3554
|
}
|
|
3541
3555
|
@media (min-width: 992px) {
|
|
3556
|
+
.header--under-navbar {
|
|
3557
|
+
--header-navbar-clearance: calc(var(--navbar-height, 4rem) + var(--spacing-16) * 2);
|
|
3558
|
+
}
|
|
3542
3559
|
.header__inner {
|
|
3543
|
-
padding: var(--spacing-48) var(--spacing-32);
|
|
3560
|
+
padding: calc(var(--spacing-48) + var(--header-navbar-clearance)) var(--spacing-32) var(--spacing-48);
|
|
3544
3561
|
position: relative;
|
|
3545
3562
|
}
|
|
3546
3563
|
.header__content {
|
|
@@ -3551,7 +3568,7 @@
|
|
|
3551
3568
|
.header--dark-search,
|
|
3552
3569
|
.header--dark .header__inner,
|
|
3553
3570
|
.header--dark-search .header__inner {
|
|
3554
|
-
min-height: var(--header-dark-min-height-desktop);
|
|
3571
|
+
min-height: calc(var(--header-dark-min-height-desktop) + var(--header-navbar-clearance));
|
|
3555
3572
|
}
|
|
3556
3573
|
.header__buttons {
|
|
3557
3574
|
flex-direction: row;
|