@shoutem/ui 5.0.1 → 5.1.0

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/theme.js CHANGED
@@ -14,6 +14,7 @@ import {
14
14
  NAVIGATION_HEADER_HEIGHT,
15
15
  } from './const';
16
16
  import { Device } from './helpers';
17
+ import { resolveVariable } from './services';
17
18
 
18
19
  const window = Dimensions.get('window');
19
20
 
@@ -252,2705 +253,2767 @@ export const defaultThemeVariables = {
252
253
  galleryDotSize: 8,
253
254
  };
254
255
 
255
- export default (variables = defaultThemeVariables) => ({
256
- //
257
- // Common
258
- //
259
- guttersPadding: {
260
- ...createVariations(
261
- '.sm-gutter',
262
- sizeVariants,
263
- 'padding',
264
- variables.smallGutter,
265
- ),
266
- ...createVariations(
267
- '.md-gutter',
268
- sizeVariants,
269
- 'padding',
270
- variables.mediumGutter,
271
- ),
272
- ...createVariations(
273
- '.lg-gutter',
274
- sizeVariants,
275
- 'padding',
276
- variables.largeGutter,
277
- ),
278
- ...createVariations(
279
- '.xl-gutter',
280
- sizeVariants,
281
- 'padding',
282
- variables.extraLargeGutter,
283
- ),
284
- },
285
-
286
- guttersMargin: {
287
- ...createVariations(
288
- '.sm-gutter',
289
- sizeVariants,
290
- 'margin',
291
- variables.smallGutter,
292
- ),
293
- ...createVariations(
294
- '.md-gutter',
295
- sizeVariants,
296
- 'margin',
297
- variables.mediumGutter,
298
- ),
299
- ...createVariations(
300
- '.lg-gutter',
301
- sizeVariants,
302
- 'margin',
303
- variables.largeGutter,
304
- ),
305
- ...createVariations(
306
- '.xl-gutter',
307
- sizeVariants,
308
- 'margin',
309
- variables.extraLargeGutter,
310
- ),
311
- },
312
-
313
- commonVariants: {
314
- '.rounded-corners': {
315
- borderRadius: 2,
316
- borderWidth: 0,
317
- borderColor: 'transparent',
318
- },
319
-
320
- '.flexible': {
321
- flex: 1,
322
- },
323
-
324
- '.inflexible': {
325
- flex: 0,
326
- },
327
-
328
- '.collapsible': {
329
- flex: -1,
330
- },
331
-
332
- '.stretch': {
333
- alignSelf: 'stretch',
334
- },
335
-
336
- '.space-between': {
337
- justifyContent: 'space-between',
256
+ export default () => {
257
+ return {
258
+ //
259
+ // Common
260
+ //
261
+ guttersPadding: {
262
+ ...createVariations(
263
+ '.sm-gutter',
264
+ sizeVariants,
265
+ 'padding',
266
+ resolveVariable('smallGutter'),
267
+ ),
268
+ ...createVariations(
269
+ '.md-gutter',
270
+ sizeVariants,
271
+ 'padding',
272
+ resolveVariable('mediumGutter'),
273
+ ),
274
+ ...createVariations(
275
+ '.lg-gutter',
276
+ sizeVariants,
277
+ 'padding',
278
+ resolveVariable('largeGutter'),
279
+ ),
280
+ ...createVariations(
281
+ '.xl-gutter',
282
+ sizeVariants,
283
+ 'padding',
284
+ resolveVariable('extraLargeGutter'),
285
+ ),
338
286
  },
339
287
 
340
- '.space-around': {
341
- justifyContent: 'space-around',
342
- },
343
- },
344
- alignmentVariants: {
345
- flexDirection: 'column',
346
- '.topLeft': {
347
- justifyContent: 'flex-start',
348
- alignItems: 'flex-start',
349
- },
350
- '.topCenter': {
351
- justifyContent: 'flex-start',
352
- alignItems: 'center',
353
- },
354
- '.topRight': {
355
- justifyContent: 'flex-start',
356
- alignItems: 'flex-end',
357
- },
358
- '.middleLeft': {
359
- justifyContent: 'center',
360
- alignItems: 'flex-start',
361
- },
362
- '.middleCenter': {
363
- justifyContent: 'center',
364
- alignItems: 'center',
365
- },
366
- '.middleRight': {
367
- justifyContent: 'center',
368
- alignItems: 'flex-end',
369
- },
370
- '.bottomLeft': {
371
- justifyContent: 'flex-end',
372
- alignItems: 'flex-start',
373
- },
374
- '.bottomCenter': {
375
- justifyContent: 'flex-end',
376
- alignItems: 'center',
377
- },
378
- '.bottomRight': {
379
- justifyContent: 'flex-end',
380
- alignItems: 'flex-end',
381
- },
382
- '.top': {
383
- justifyContent: 'flex-start',
384
- },
385
- '.middle': {
386
- justifyContent: 'center',
387
- },
388
- '.bottom': {
389
- justifyContent: 'flex-end',
288
+ guttersMargin: {
289
+ ...createVariations(
290
+ '.sm-gutter',
291
+ sizeVariants,
292
+ 'margin',
293
+ resolveVariable('smallGutter'),
294
+ ),
295
+ ...createVariations(
296
+ '.md-gutter',
297
+ sizeVariants,
298
+ 'margin',
299
+ resolveVariable('mediumGutter'),
300
+ ),
301
+ ...createVariations(
302
+ '.lg-gutter',
303
+ sizeVariants,
304
+ 'margin',
305
+ resolveVariable('largeGutter'),
306
+ ),
307
+ ...createVariations(
308
+ '.xl-gutter',
309
+ sizeVariants,
310
+ 'margin',
311
+ resolveVariable('extraLargeGutter'),
312
+ ),
390
313
  },
391
- },
392
314
 
393
- fillParent: {
394
- position: 'absolute',
395
- top: 0,
396
- left: 0,
397
- right: 0,
398
- bottom: 0,
399
- },
400
- 'fill-parent': {
401
- '.fill-parent': {
402
- [INCLUDE]: ['fillParent'],
403
- },
404
- },
315
+ commonVariants: {
316
+ '.rounded-corners': {
317
+ borderRadius: 2,
318
+ borderWidth: 0,
319
+ borderColor: 'transparent',
320
+ },
405
321
 
406
- dimmedFeaturedBackground: {
407
- backgroundColor: inverseColorBrightnessForAmount(
408
- variables.featuredColor,
409
- 5,
410
- ),
411
- },
322
+ '.flexible': {
323
+ flex: 1,
324
+ },
412
325
 
413
- featuredBackground: {
414
- backgroundColor: variables.featuredColor,
415
- },
326
+ '.inflexible': {
327
+ flex: 0,
328
+ },
416
329
 
417
- imageOverlayText: {
418
- ...createSharedStyle(textComponents, {
419
- color: variables.imageOverlayTextColor,
420
- }),
330
+ '.collapsible': {
331
+ flex: -1,
332
+ },
421
333
 
422
- 'shoutem.ui.Icon': {
423
- '.indicator': {
424
- color: variables.imageOverlayTextColor,
334
+ '.stretch': {
335
+ alignSelf: 'stretch',
425
336
  },
426
337
 
427
- '.scroll-indicator': {
428
- color: variables.imageOverlayTextColor,
338
+ '.space-between': {
339
+ justifyContent: 'space-between',
429
340
  },
430
341
 
431
- color: variables.imageOverlayTextColor,
342
+ '.space-around': {
343
+ justifyContent: 'space-around',
344
+ },
345
+ },
346
+ alignmentVariants: {
347
+ flexDirection: 'column',
348
+ '.topLeft': {
349
+ justifyContent: 'flex-start',
350
+ alignItems: 'flex-start',
351
+ },
352
+ '.topCenter': {
353
+ justifyContent: 'flex-start',
354
+ alignItems: 'center',
355
+ },
356
+ '.topRight': {
357
+ justifyContent: 'flex-start',
358
+ alignItems: 'flex-end',
359
+ },
360
+ '.middleLeft': {
361
+ justifyContent: 'center',
362
+ alignItems: 'flex-start',
363
+ },
364
+ '.middleCenter': {
365
+ justifyContent: 'center',
366
+ alignItems: 'center',
367
+ },
368
+ '.middleRight': {
369
+ justifyContent: 'center',
370
+ alignItems: 'flex-end',
371
+ },
372
+ '.bottomLeft': {
373
+ justifyContent: 'flex-end',
374
+ alignItems: 'flex-start',
375
+ },
376
+ '.bottomCenter': {
377
+ justifyContent: 'flex-end',
378
+ alignItems: 'center',
379
+ },
380
+ '.bottomRight': {
381
+ justifyContent: 'flex-end',
382
+ alignItems: 'flex-end',
383
+ },
384
+ '.top': {
385
+ justifyContent: 'flex-start',
386
+ },
387
+ '.middle': {
388
+ justifyContent: 'center',
389
+ },
390
+ '.bottom': {
391
+ justifyContent: 'flex-end',
392
+ },
432
393
  },
433
- },
434
-
435
- boldTextStyle: {
436
- fontWeight: resolveFontWeight('500'),
437
- },
438
-
439
- italicTextStyle: {
440
- fontStyle: resolveFontStyle('italic'),
441
- },
442
394
 
443
- codeTextStyle: {
444
- fontFamily: 'Menlo',
445
- },
395
+ fillParent: {
396
+ position: 'absolute',
397
+ top: 0,
398
+ left: 0,
399
+ right: 0,
400
+ bottom: 0,
401
+ },
402
+ 'fill-parent': {
403
+ '.fill-parent': {
404
+ [INCLUDE]: ['fillParent'],
405
+ },
406
+ },
446
407
 
447
- multilineTextStyle: {
448
- '.v-center': {
449
- // Compensate for lineHeight, because
450
- // textAlignVertical is not supported on iOS
451
- marginTop: -4,
452
- marginBottom: 4,
408
+ dimmedFeaturedBackground: {
409
+ backgroundColor: inverseColorBrightnessForAmount(
410
+ resolveVariable('featuredColor'),
411
+ 5,
412
+ ),
453
413
  },
454
414
 
455
- lineHeight: 26,
456
- },
415
+ featuredBackground: {
416
+ backgroundColor: resolveVariable('featuredColor'),
417
+ },
457
418
 
458
- text: {
459
- [INCLUDE]: ['commonVariants', 'guttersMargin'],
419
+ imageOverlayText: {
420
+ ...createSharedStyle(textComponents, {
421
+ color: resolveVariable('imageOverlayTextColor'),
422
+ }),
460
423
 
461
- '.line-through': {
462
- textDecorationLine: 'line-through',
463
- },
424
+ 'shoutem.ui.Icon': {
425
+ '.indicator': {
426
+ color: resolveVariable('imageOverlayTextColor'),
427
+ },
464
428
 
465
- '.h-left': {
466
- textAlign: 'left',
467
- },
429
+ '.scroll-indicator': {
430
+ color: resolveVariable('imageOverlayTextColor'),
431
+ },
468
432
 
469
- '.h-right': {
470
- textAlign: 'right',
433
+ color: resolveVariable('imageOverlayTextColor'),
434
+ },
471
435
  },
472
436
 
473
- '.h-center': {
474
- textAlign: 'center',
437
+ boldTextStyle: {
438
+ fontWeight: resolveFontWeight('500'),
475
439
  },
476
440
 
477
- '.bold': {
478
- [INCLUDE]: ['boldTextStyle'],
441
+ italicTextStyle: {
442
+ fontStyle: resolveFontStyle('italic'),
479
443
  },
480
444
 
481
- '.multiline': {
482
- [INCLUDE]: ['multilineTextStyle'],
445
+ codeTextStyle: {
446
+ fontFamily: 'Menlo',
483
447
  },
484
448
 
485
- '.muted': {
486
- opacity: 0.5,
487
- },
449
+ multilineTextStyle: {
450
+ '.v-center': {
451
+ // Compensate for lineHeight, because
452
+ // textAlignVertical is not supported on iOS
453
+ marginTop: -4,
454
+ marginBottom: 4,
455
+ },
488
456
 
489
- '.link': {
490
- ...variables.links,
457
+ lineHeight: 26,
491
458
  },
492
459
 
493
- backgroundColor: 'transparent',
494
- },
495
-
496
- 'shoutem.ui.Heading': {
497
- [INCLUDE]: ['text'],
498
-
499
- lineHeight: calculateLineHeight(variables.heading.fontSize),
500
- ...variables.heading,
501
- fontFamily: resolveFontFamily(
502
- variables.heading.fontFamily,
503
- variables.heading.fontWeight,
504
- variables.heading.fontStyle,
505
- ),
506
- fontWeight: resolveFontWeight(variables.heading.fontWeight),
507
- fontStyle: resolveFontStyle(variables.heading.fontStyle),
508
- },
460
+ text: {
461
+ [INCLUDE]: ['commonVariants', 'guttersMargin'],
509
462
 
510
- 'shoutem.ui.Title': {
511
- [INCLUDE]: ['text'],
512
-
513
- lineHeight: calculateLineHeight(variables.title.fontSize),
514
- ...variables.title,
515
- fontFamily: resolveFontFamily(
516
- variables.title.fontFamily,
517
- variables.title.fontWeight,
518
- variables.title.fontStyle,
519
- ),
520
- fontWeight: resolveFontWeight(variables.title.fontWeight),
521
- fontStyle: resolveFontStyle(variables.title.fontStyle),
522
- },
463
+ '.line-through': {
464
+ textDecorationLine: 'line-through',
465
+ },
523
466
 
524
- 'shoutem.ui.Subtitle': {
525
- [INCLUDE]: ['text'],
526
-
527
- lineHeight: calculateLineHeight(variables.subtitle.fontSize),
528
- ...variables.subtitle,
529
- fontFamily: resolveFontFamily(
530
- variables.subtitle.fontFamily,
531
- variables.subtitle.fontWeight,
532
- variables.subtitle.fontStyle,
533
- ),
534
- fontWeight: resolveFontWeight(variables.subtitle.fontWeight),
535
- fontStyle: resolveFontStyle(variables.subtitle.fontStyle),
536
- },
467
+ '.h-left': {
468
+ textAlign: 'left',
469
+ },
537
470
 
538
- 'shoutem.ui.Caption': {
539
- [INCLUDE]: ['text'],
540
-
541
- lineHeight: calculateLineHeight(variables.caption.fontSize),
542
- letterSpacing: 0.5,
543
- ...variables.caption,
544
- fontFamily: resolveFontFamily(
545
- variables.caption.fontFamily,
546
- variables.caption.fontWeight,
547
- variables.caption.fontStyle,
548
- ),
549
- fontWeight: resolveFontWeight(variables.caption.fontWeight),
550
- fontStyle: resolveFontStyle(variables.caption.fontStyle),
551
-
552
- '.form-error': {
553
- color: variables.errorText.color,
554
- fontFamily: resolveFontFamily(
555
- variables.errorText.fontFamily,
556
- variables.errorText.fontWeight,
557
- variables.errorText.fontStyle,
558
- ),
559
- fontSize: variables.errorText.fontSize,
560
- fontStyle: resolveFontStyle(variables.errorText.fontStyle),
561
- fontWeight: resolveFontWeight(variables.errorText.fontWeight),
562
- lineHeight: calculateLineHeight(variables.errorText.fontSize),
563
- },
564
- },
471
+ '.h-right': {
472
+ textAlign: 'right',
473
+ },
565
474
 
566
- 'shoutem.ui.Text': {
567
- [INCLUDE]: ['text'],
568
-
569
- ...variables.text,
570
- fontFamily: resolveFontFamily(
571
- variables.text.fontFamily,
572
- variables.text.fontWeight,
573
- variables.text.fontStyle,
574
- ),
575
- fontWeight: resolveFontWeight(variables.text.fontWeight),
576
- fontStyle: resolveFontStyle(variables.text.fontStyle),
577
- },
475
+ '.h-center': {
476
+ textAlign: 'center',
477
+ },
578
478
 
579
- //
580
- // Indicators
581
- //
582
- indicator: {
583
- color: variables.text.color,
584
- },
479
+ '.bold': {
480
+ [INCLUDE]: ['boldTextStyle'],
481
+ },
585
482
 
586
- //
587
- // Images
588
- //
589
- imageSizes: {
590
- // NOTE: '-avatar' styles do not work with ImageBackground
591
- '.small-avatar': {
592
- width: dimensionRelativeToIphone(25),
593
- height: dimensionRelativeToIphone(25),
594
- borderRadius: 12.5,
595
- borderWidth: 0,
596
- },
483
+ '.multiline': {
484
+ [INCLUDE]: ['multilineTextStyle'],
485
+ },
597
486
 
598
- '.small': {
599
- width: dimensionRelativeToIphone(65),
600
- height: dimensionRelativeToIphone(65),
601
- },
487
+ '.muted': {
488
+ opacity: 0.5,
489
+ },
602
490
 
603
- '.medium-avatar': {
604
- width: dimensionRelativeToIphone(145),
605
- height: dimensionRelativeToIphone(145),
606
- borderRadius: dimensionRelativeToIphone(72.5),
607
- borderWidth: 0,
608
- },
491
+ '.link': {
492
+ ...resolveVariable('links'),
493
+ },
609
494
 
610
- '.medium': {
611
- width: dimensionRelativeToIphone(145),
612
- height: dimensionRelativeToIphone(92),
495
+ backgroundColor: 'transparent',
613
496
  },
614
497
 
615
- '.medium-wide': {
616
- width: dimensionRelativeToIphone(180),
617
- height: dimensionRelativeToIphone(85),
618
- },
498
+ 'shoutem.ui.Heading': {
499
+ [INCLUDE]: ['text'],
619
500
 
620
- '.medium-portrait': {
621
- width: dimensionRelativeToIphone(209),
622
- height: dimensionRelativeToIphone(139),
501
+ lineHeight: calculateLineHeight(resolveVariable('heading.fontSize')),
502
+ ...resolveVariable('heading'),
503
+ fontFamily: resolveFontFamily(
504
+ resolveVariable('heading.fontFamily'),
505
+ resolveVariable('heading.fontWeight'),
506
+ resolveVariable('heading.fontStyle'),
507
+ ),
508
+ fontWeight: resolveFontWeight(resolveVariable('heading.fontWeight')),
509
+ fontStyle: resolveFontStyle(resolveVariable('heading.fontStyle')),
623
510
  },
624
511
 
625
- '.medium-square': {
626
- width: dimensionRelativeToIphone(145),
627
- height: dimensionRelativeToIphone(145),
628
- },
512
+ 'shoutem.ui.Title': {
513
+ [INCLUDE]: ['text'],
629
514
 
630
- // NOTE: Image resizing doesn't work correctly if both
631
- // dimensions are not explicitly defined, so we can't
632
- // use flex: 1, or alignSelf: 'stretch' here...
633
- '.featured': {
634
- width: dimensionRelativeToIphone(365),
635
- height: dimensionRelativeToIphone(345),
515
+ lineHeight: calculateLineHeight(resolveVariable('title.fontSize')),
516
+ ...resolveVariable('title'),
517
+ fontFamily: resolveFontFamily(
518
+ resolveVariable('title.fontFamily'),
519
+ resolveVariable('title.fontWeight'),
520
+ resolveVariable('title.fontStyle'),
521
+ ),
522
+ fontWeight: resolveFontWeight(resolveVariable('title.fontWeight')),
523
+ fontStyle: resolveFontStyle(resolveVariable('title.fontStyle')),
636
524
  },
637
525
 
638
- '.large': {
639
- width: window.width,
640
- height: dimensionRelativeToIphone(280),
641
- },
526
+ 'shoutem.ui.Subtitle': {
527
+ [INCLUDE]: ['text'],
642
528
 
643
- '.large-portrait': {
644
- width: window.width,
645
- height: dimensionRelativeToIphone(518),
529
+ lineHeight: calculateLineHeight(resolveVariable('subtitle.fontSize')),
530
+ ...resolveVariable('subtitle'),
531
+ fontFamily: resolveFontFamily(
532
+ resolveVariable('subtitle.fontFamily'),
533
+ resolveVariable('subtitle.fontWeight'),
534
+ resolveVariable('subtitle.fontStyle'),
535
+ ),
536
+ fontWeight: resolveFontWeight(resolveVariable('subtitle.fontWeight')),
537
+ fontStyle: resolveFontStyle(resolveVariable('subtitle.fontStyle')),
646
538
  },
647
539
 
648
- '.large-banner': {
649
- width: window.width,
650
- height: dimensionRelativeToIphone(200),
651
- },
540
+ 'shoutem.ui.Caption': {
541
+ [INCLUDE]: ['text'],
652
542
 
653
- '.large-square': {
654
- width: window.width,
655
- height: window.width,
656
- },
543
+ lineHeight: calculateLineHeight(resolveVariable('caption.fontSize')),
544
+ letterSpacing: 0.5,
545
+ ...resolveVariable('caption'),
546
+ fontFamily: resolveFontFamily(
547
+ resolveVariable('caption.fontFamily'),
548
+ resolveVariable('caption.fontWeight'),
549
+ resolveVariable('caption.fontStyle'),
550
+ ),
551
+ fontWeight: resolveFontWeight(resolveVariable('caption.fontWeight')),
552
+ fontStyle: resolveFontStyle(resolveVariable('caption.fontStyle')),
657
553
 
658
- '.large-wide': {
659
- width: window.width,
660
- height: dimensionRelativeToIphone(238),
554
+ '.form-error': {
555
+ color: resolveVariable('errorText.color'),
556
+ fontFamily: resolveFontFamily(
557
+ resolveVariable('errorText.fontFamily'),
558
+ resolveVariable('errorText.fontWeight'),
559
+ resolveVariable('errorText.fontStyle'),
560
+ ),
561
+ fontSize: resolveVariable('errorText.fontSize'),
562
+ fontStyle: resolveFontStyle(resolveVariable('errorText.fontStyle')),
563
+ fontWeight: resolveFontWeight(resolveVariable('errorText.fontWeight')),
564
+ lineHeight: calculateLineHeight(resolveVariable('errorText.fontSize')),
565
+ },
661
566
  },
662
567
 
663
- '.large-ultra-wide': {
664
- width: window.width,
665
- height: dimensionRelativeToIphone(130),
666
- },
667
- },
668
- 'shoutem.ui.Image': {
669
- [INCLUDE]: ['commonVariants', 'imageSizes', 'fill-parent', 'guttersMargin'],
568
+ 'shoutem.ui.Text': {
569
+ [INCLUDE]: ['text'],
670
570
 
671
- '.placeholder': {
672
- backgroundColor: inverseColorBrightnessForAmount(
673
- variables.paperColor,
674
- 10,
571
+ ...resolveVariable('text'),
572
+ fontFamily: resolveFontFamily(
573
+ resolveVariable('text.fontFamily'),
574
+ resolveVariable('text.fontWeight'),
575
+ resolveVariable('text.fontStyle'),
675
576
  ),
577
+ fontWeight: resolveFontWeight(resolveVariable('text.fontWeight')),
578
+ fontStyle: resolveFontStyle(resolveVariable('text.fontStyle')),
676
579
  },
677
580
 
678
- heroAnimation(driver, { layout }) {
679
- return {
680
- transform: [
681
- {
682
- scale: driver.interpolate({
683
- inputRange: [-0.9 * layout.height, 0],
684
- outputRange: [3, 1],
685
- extrapolateRight: 'clamp',
686
- useNativeDriver: true,
687
- }),
688
- },
689
- {
690
- translateY: driver.interpolate({
691
- inputRange: [-100, 100],
692
- outputRange: [-50, 50],
693
- extrapolateLeft: 'clamp',
694
- useNativeDriver: true,
695
- }),
696
- },
697
- ],
698
- };
581
+ //
582
+ // Indicators
583
+ //
584
+ indicator: {
585
+ color: resolveVariable('text.color'),
699
586
  },
700
- },
701
- 'shoutem.ui.ImageBackground': {
702
- [INCLUDE]: ['commonVariants', 'imageSizes', 'fill-parent', 'guttersMargin'],
703
587
 
704
- '.overflow-hidden': {
705
- overflow: 'hidden',
706
- },
588
+ //
589
+ // Images
590
+ //
591
+ imageSizes: {
592
+ // NOTE: '-avatar' styles do not work with ImageBackground
593
+ '.small-avatar': {
594
+ width: dimensionRelativeToIphone(25),
595
+ height: dimensionRelativeToIphone(25),
596
+ borderRadius: 12.5,
597
+ borderWidth: 0,
598
+ },
707
599
 
708
- '.placeholder': {
709
- backgroundColor: inverseColorBrightnessForAmount(
710
- variables.paperColor,
711
- 10,
712
- ),
600
+ '.small': {
601
+ width: dimensionRelativeToIphone(65),
602
+ height: dimensionRelativeToIphone(65),
603
+ },
713
604
 
714
- 'shoutem.ui.Icon': {
715
- color: inverseColorBrightnessForAmount(variables.paperColor, 30),
605
+ '.medium-avatar': {
606
+ width: dimensionRelativeToIphone(145),
607
+ height: dimensionRelativeToIphone(145),
608
+ borderRadius: dimensionRelativeToIphone(72.5),
609
+ borderWidth: 0,
716
610
  },
717
- },
718
611
 
719
- 'shoutem.ui.Tile': {
720
- [INCLUDE]: ['textCentricTile', 'fillParent', 'imageOverlayText'],
612
+ '.medium': {
613
+ width: dimensionRelativeToIphone(145),
614
+ height: dimensionRelativeToIphone(92),
615
+ },
721
616
 
722
- 'shoutem.ui.Button': {
723
- '.clear': {
724
- [INCLUDE]: ['imageOverlayText'],
725
- },
617
+ '.medium-wide': {
618
+ width: dimensionRelativeToIphone(180),
619
+ height: dimensionRelativeToIphone(85),
726
620
  },
727
621
 
728
- backgroundColor: variables.imageOverlayColor,
729
- },
622
+ '.medium-portrait': {
623
+ width: dimensionRelativeToIphone(209),
624
+ height: dimensionRelativeToIphone(139),
625
+ },
730
626
 
731
- heroAnimation(driver, { layout }) {
732
- return {
733
- transform: [
734
- {
735
- scale: driver.interpolate({
736
- inputRange: [-0.9 * layout.height, 0],
737
- outputRange: [3, 1],
738
- extrapolateRight: 'clamp',
739
- useNativeDriver: true,
740
- }),
741
- },
742
- {
743
- translateY: driver.interpolate({
744
- inputRange: [-100, 100],
745
- outputRange: [-50, 50],
746
- extrapolateLeft: 'clamp',
747
- useNativeDriver: true,
748
- }),
749
- },
750
- ],
751
- };
752
- },
627
+ '.medium-square': {
628
+ width: dimensionRelativeToIphone(145),
629
+ height: dimensionRelativeToIphone(145),
630
+ },
753
631
 
754
- flexDirection: 'column',
755
- alignItems: 'center',
756
- justifyContent: 'center',
757
- },
632
+ // NOTE: Image resizing doesn't work correctly if both
633
+ // dimensions are not explicitly defined, so we can't
634
+ // use flex: 1, or alignSelf: 'stretch' here...
635
+ '.featured': {
636
+ width: dimensionRelativeToIphone(365),
637
+ height: dimensionRelativeToIphone(345),
638
+ },
758
639
 
759
- //
760
- // Containers
761
- //
762
- verticalFlexAlignment: {
763
- '.h-center': {
764
- alignItems: 'center',
765
- },
640
+ '.large': {
641
+ width: window.width,
642
+ height: dimensionRelativeToIphone(280),
643
+ },
766
644
 
767
- '.h-start': {
768
- alignItems: 'flex-start',
769
- },
645
+ '.large-portrait': {
646
+ width: window.width,
647
+ height: dimensionRelativeToIphone(518),
648
+ },
770
649
 
771
- '.h-end': {
772
- alignItems: 'flex-end',
773
- },
650
+ '.large-banner': {
651
+ width: window.width,
652
+ height: dimensionRelativeToIphone(200),
653
+ },
774
654
 
775
- '.v-center': {
776
- justifyContent: 'center',
777
- },
655
+ '.large-square': {
656
+ width: window.width,
657
+ height: window.width,
658
+ },
778
659
 
779
- '.v-start': {
780
- justifyContent: 'flex-start',
781
- },
660
+ '.large-wide': {
661
+ width: window.width,
662
+ height: dimensionRelativeToIphone(238),
663
+ },
782
664
 
783
- '.v-end': {
784
- justifyContent: 'flex-end',
785
- },
786
- },
787
- horizontalFlexAlignment: {
788
- '.h-center': {
789
- justifyContent: 'center',
665
+ '.large-ultra-wide': {
666
+ width: window.width,
667
+ height: dimensionRelativeToIphone(130),
668
+ },
790
669
  },
670
+ 'shoutem.ui.Image': {
671
+ [INCLUDE]: [
672
+ 'commonVariants',
673
+ 'imageSizes',
674
+ 'fill-parent',
675
+ 'guttersMargin',
676
+ ],
677
+
678
+ '.placeholder': {
679
+ backgroundColor: inverseColorBrightnessForAmount(
680
+ resolveVariable('paperColor'),
681
+ 10,
682
+ ),
683
+ },
791
684
 
792
- '.h-start': {
793
- justifyContent: 'flex-start',
685
+ heroAnimation(driver, { layout }) {
686
+ return {
687
+ transform: [
688
+ {
689
+ scale: driver.interpolate({
690
+ inputRange: [-0.9 * layout.height, 0],
691
+ outputRange: [3, 1],
692
+ extrapolateRight: 'clamp',
693
+ useNativeDriver: true,
694
+ }),
695
+ },
696
+ {
697
+ translateY: driver.interpolate({
698
+ inputRange: [-100, 100],
699
+ outputRange: [-50, 50],
700
+ extrapolateLeft: 'clamp',
701
+ useNativeDriver: true,
702
+ }),
703
+ },
704
+ ],
705
+ };
706
+ },
794
707
  },
708
+ 'shoutem.ui.ImageBackground': {
709
+ [INCLUDE]: [
710
+ 'commonVariants',
711
+ 'imageSizes',
712
+ 'fill-parent',
713
+ 'guttersMargin',
714
+ ],
795
715
 
796
- '.h-end': {
797
- justifyContent: 'flex-end',
798
- },
716
+ '.overflow-hidden': {
717
+ overflow: 'hidden',
718
+ },
799
719
 
800
- '.v-center': {
801
- alignItems: 'center',
802
- },
720
+ '.placeholder': {
721
+ backgroundColor: inverseColorBrightnessForAmount(
722
+ resolveVariable('paperColor'),
723
+ 10,
724
+ ),
803
725
 
804
- '.v-start': {
805
- alignItems: 'flex-start',
806
- },
726
+ 'shoutem.ui.Icon': {
727
+ color: inverseColorBrightnessForAmount(
728
+ resolveVariable('paperColor'),
729
+ 30,
730
+ ),
731
+ },
732
+ },
807
733
 
808
- '.v-end': {
809
- alignItems: 'flex-end',
810
- },
811
- },
812
- 'shoutem.ui.View': {
813
- [INCLUDE]: ['commonVariants', 'guttersPadding'],
734
+ 'shoutem.ui.Tile': {
735
+ [INCLUDE]: ['textCentricTile', 'fillParent', 'imageOverlayText'],
814
736
 
815
- '.horizontal': {
816
- [INCLUDE]: ['horizontalFlexAlignment'],
817
- flexDirection: 'row',
818
- alignItems: 'flex-end',
819
- },
737
+ 'shoutem.ui.Button': {
738
+ '.clear': {
739
+ [INCLUDE]: ['imageOverlayText'],
740
+ },
741
+ },
820
742
 
821
- '.vertical': {
822
- [INCLUDE]: ['verticalFlexAlignment'],
823
- flexDirection: 'column',
824
- },
743
+ backgroundColor: resolveVariable('imageOverlayColor'),
744
+ },
825
745
 
826
- '.fill-parent': {
827
- [INCLUDE]: ['fillParent'],
828
- },
746
+ heroAnimation(driver, { layout }) {
747
+ return {
748
+ transform: [
749
+ {
750
+ scale: driver.interpolate({
751
+ inputRange: [-0.9 * layout.height, 0],
752
+ outputRange: [3, 1],
753
+ extrapolateRight: 'clamp',
754
+ useNativeDriver: true,
755
+ }),
756
+ },
757
+ {
758
+ translateY: driver.interpolate({
759
+ inputRange: [-100, 100],
760
+ outputRange: [-50, 50],
761
+ extrapolateLeft: 'clamp',
762
+ useNativeDriver: true,
763
+ }),
764
+ },
765
+ ],
766
+ };
767
+ },
829
768
 
830
- '.overlay': {
831
- backgroundColor: variables.imageOverlayColor,
769
+ flexDirection: 'column',
770
+ alignItems: 'center',
771
+ justifyContent: 'center',
832
772
  },
833
773
 
834
- '.overlay-bottom': {
835
- height: 25,
836
- bottom: 0,
837
- left: 0,
838
- position: 'absolute',
839
- right: 0,
840
- },
774
+ //
775
+ // Containers
776
+ //
777
+ verticalFlexAlignment: {
778
+ '.h-center': {
779
+ alignItems: 'center',
780
+ },
841
781
 
842
- // Should deprecate in the future and use the paper
843
- // styleName instead to keep it consistent
844
- '.solid': {
845
- backgroundColor: variables.paperColor,
846
- },
782
+ '.h-start': {
783
+ alignItems: 'flex-start',
784
+ },
847
785
 
848
- '.paper': {
849
- backgroundColor: variables.paperColor,
850
- },
786
+ '.h-end': {
787
+ alignItems: 'flex-end',
788
+ },
851
789
 
852
- '.wrap': {
853
- flexWrap: 'wrap',
854
- },
790
+ '.v-center': {
791
+ justifyContent: 'center',
792
+ },
855
793
 
856
- '.dimmed': {
857
- '.featured': {
858
- [INCLUDE]: ['dimmedFeaturedBackground'],
794
+ '.v-start': {
795
+ justifyContent: 'flex-start',
859
796
  },
860
- },
861
797
 
862
- '.muted': {
863
- opacity: 0.3,
798
+ '.v-end': {
799
+ justifyContent: 'flex-end',
800
+ },
864
801
  },
802
+ horizontalFlexAlignment: {
803
+ '.h-center': {
804
+ justifyContent: 'center',
805
+ },
865
806
 
866
- '.featured': {
867
- [INCLUDE]: ['featuredBackground'],
868
- },
807
+ '.h-start': {
808
+ justifyContent: 'flex-start',
809
+ },
869
810
 
870
- '.center': {
871
- alignSelf: 'center',
872
- },
811
+ '.h-end': {
812
+ justifyContent: 'flex-end',
813
+ },
873
814
 
874
- '.badge': {
875
- alignItems: 'center',
876
- backgroundColor: variables.navBarIconsColor,
877
- borderColor: variables.navBarBackground,
878
- borderRadius: 8,
879
- borderWidth: 2,
880
- height: 16,
881
- justifyContent: 'center',
882
- position: 'absolute',
883
- width: 16,
815
+ '.v-center': {
816
+ alignItems: 'center',
817
+ },
884
818
 
885
- 'shoutem.ui.Text': {
886
- color: variables.navBarBackground,
887
- fontSize: 9,
888
- fontWeight: 'bold',
889
- textAlign: 'center',
819
+ '.v-start': {
820
+ alignItems: 'flex-start',
890
821
  },
891
- },
892
822
 
893
- '.oval-highlight': {
894
- alignItems: 'center',
895
- backgroundColor: changeColorAlpha('#030303', 0.1),
896
- borderRadius: 31,
897
- height: 62,
898
- justifyContent: 'center',
899
- width: 62,
823
+ '.v-end': {
824
+ alignItems: 'flex-end',
825
+ },
900
826
  },
901
- },
827
+ 'shoutem.ui.View': {
828
+ [INCLUDE]: ['commonVariants', 'guttersPadding'],
902
829
 
903
- 'shoutem.ui.Screen': {
904
- [INCLUDE]: ['commonVariants', 'guttersPadding'],
830
+ '.horizontal': {
831
+ [INCLUDE]: ['horizontalFlexAlignment'],
832
+ flexDirection: 'row',
833
+ alignItems: 'flex-end',
834
+ },
905
835
 
906
- '.full-screen': {
907
- marginTop: -(NAVIGATION_BAR_HEIGHT + StyleSheet.hairlineWidth),
908
- },
836
+ '.vertical': {
837
+ [INCLUDE]: ['verticalFlexAlignment'],
838
+ flexDirection: 'column',
839
+ },
909
840
 
910
- '.paper': {
911
- backgroundColor: variables.paperColor,
912
- },
841
+ '.fill-parent': {
842
+ [INCLUDE]: ['fillParent'],
843
+ },
913
844
 
914
- '.with-notch-padding': {
915
- paddingBottom: Device.select({
916
- iPhoneX: IPHONE_X_HOME_INDICATOR_PADDING,
917
- iPhoneXR: IPHONE_X_HOME_INDICATOR_PADDING,
918
- default: 0,
919
- }),
920
- },
845
+ '.overlay': {
846
+ backgroundColor: resolveVariable('imageOverlayColor'),
847
+ },
921
848
 
922
- 'shoutem.ui.ListView': {
923
- listContent: {
924
- paddingBottom: Device.select({
925
- iPhoneX: IPHONE_X_HOME_INDICATOR_PADDING,
926
- iPhoneXR: IPHONE_X_HOME_INDICATOR_PADDING,
927
- default: 0,
928
- }),
849
+ '.overlay-bottom': {
850
+ height: 25,
851
+ bottom: 0,
852
+ left: 0,
853
+ position: 'absolute',
854
+ right: 0,
929
855
  },
930
- },
931
856
 
932
- backgroundColor: variables.backgroundColor,
933
- flex: 1,
934
- },
857
+ // Should deprecate in the future and use the paper
858
+ // styleName instead to keep it consistent
859
+ '.solid': {
860
+ backgroundColor: resolveVariable('paperColor'),
861
+ },
935
862
 
936
- 'shoutem.ui.Row': {
937
- ...createSharedStyle(textComponents, { flex: 1 }),
863
+ '.paper': {
864
+ backgroundColor: resolveVariable('paperColor'),
865
+ },
938
866
 
939
- 'shoutem.ui.Image': {
940
- marginRight: variables.mediumGutter,
941
- },
867
+ '.wrap': {
868
+ flexWrap: 'wrap',
869
+ },
942
870
 
943
- 'shoutem.ui.Icon': {
944
- '.disclosure': {
945
- opacity: 0.5,
946
- marginRight: -7,
947
- marginLeft: 4,
871
+ '.dimmed': {
872
+ '.featured': {
873
+ [INCLUDE]: ['dimmedFeaturedBackground'],
874
+ },
948
875
  },
949
876
 
950
- marginRight: variables.mediumGutter,
951
- },
877
+ '.muted': {
878
+ opacity: 0.3,
879
+ },
952
880
 
953
- 'shoutem.ui.Button': {
954
- '.right-icon': {
955
- [INCLUDE]: ['tightButton', 'clearButton'],
956
- marginLeft: variables.mediumGutter,
881
+ '.featured': {
882
+ [INCLUDE]: ['featuredBackground'],
957
883
  },
958
- },
959
884
 
960
- 'shoutem.ui.View': {
961
- '.notification-dot': {
885
+ '.center': {
962
886
  alignSelf: 'center',
963
- flex: 0,
964
- width: 6,
965
- height: 6,
966
- borderRadius: 3,
967
- borderColor: variables.indicatorColor,
968
- backgroundColor: variables.indicatorColor,
969
- marginLeft: -10,
970
- marginRight: 4,
971
887
  },
972
888
 
973
- '.vertical': {
974
- '*': {
975
- // Add a small gutter below each view
976
- marginBottom: variables.smallGutter,
889
+ '.badge': {
890
+ alignItems: 'center',
891
+ backgroundColor: resolveVariable('navBarIconsColor'),
892
+ borderColor: resolveVariable('navBarBackground'),
893
+ borderRadius: 8,
894
+ borderWidth: 2,
895
+ height: 16,
896
+ justifyContent: 'center',
897
+ position: 'absolute',
898
+ width: 16,
899
+
900
+ 'shoutem.ui.Text': {
901
+ color: resolveVariable('navBarBackground'),
902
+ fontSize: 9,
903
+ fontWeight: 'bold',
904
+ textAlign: 'center',
977
905
  },
906
+ },
907
+
908
+ '.oval-highlight': {
909
+ alignItems: 'center',
910
+ backgroundColor: changeColorAlpha('#030303', 0.1),
911
+ borderRadius: 31,
912
+ height: 62,
913
+ justifyContent: 'center',
914
+ width: 62,
915
+ },
916
+ },
917
+
918
+ 'shoutem.ui.Screen': {
919
+ [INCLUDE]: ['commonVariants', 'guttersPadding'],
920
+
921
+ '.full-screen': {
922
+ marginTop: -(NAVIGATION_BAR_HEIGHT + StyleSheet.hairlineWidth),
923
+ },
924
+
925
+ '.paper': {
926
+ backgroundColor: resolveVariable('paperColor'),
927
+ },
978
928
 
979
- // Compensate for the last view
980
- marginBottom: -variables.smallGutter,
929
+ '.with-notch-padding': {
930
+ paddingBottom: Device.select({
931
+ iPhoneX: IPHONE_X_HOME_INDICATOR_PADDING,
932
+ iPhoneXR: IPHONE_X_HOME_INDICATOR_PADDING,
933
+ default: 0,
934
+ }),
935
+ },
936
+
937
+ 'shoutem.ui.ListView': {
938
+ listContent: {
939
+ paddingBottom: Device.select({
940
+ iPhoneX: IPHONE_X_HOME_INDICATOR_PADDING,
941
+ iPhoneXR: IPHONE_X_HOME_INDICATOR_PADDING,
942
+ default: 0,
943
+ }),
944
+ },
981
945
  },
982
946
 
947
+ backgroundColor: resolveVariable('backgroundColor'),
983
948
  flex: 1,
984
949
  },
985
950
 
986
- '*.top': {
987
- alignSelf: 'flex-start',
988
- },
951
+ 'shoutem.ui.Row': {
952
+ ...createSharedStyle(textComponents, { flex: 1 }),
989
953
 
990
- '.small': {
991
- height: 65,
992
- paddingVertical: 0,
993
- },
954
+ 'shoutem.ui.Image': {
955
+ marginRight: resolveVariable('mediumGutter'),
956
+ },
994
957
 
995
- flexGrow: 1,
996
- flexShrink: 0,
997
- flexDirection: 'row',
998
- justifyContent: 'flex-start',
999
- alignItems: 'center',
1000
- backgroundColor: variables.paperColor,
1001
- paddingHorizontal: variables.mediumGutter,
1002
- paddingVertical: variables.mediumGutter,
1003
- },
958
+ 'shoutem.ui.Icon': {
959
+ '.disclosure': {
960
+ opacity: 0.5,
961
+ marginRight: -7,
962
+ marginLeft: 4,
963
+ },
1004
964
 
1005
- textCentricTile: {
1006
- 'shoutem.ui.View': {
1007
- '.actions': {
1008
- position: 'absolute',
1009
- top: variables.mediumGutter,
1010
- right: variables.mediumGutter,
965
+ marginRight: resolveVariable('mediumGutter'),
1011
966
  },
1012
- },
1013
967
 
1014
- '*': {
1015
- marginBottom: variables.smallGutter,
1016
- },
968
+ 'shoutem.ui.Button': {
969
+ '.right-icon': {
970
+ [INCLUDE]: ['tightButton', 'clearButton'],
971
+ marginLeft: resolveVariable('mediumGutter'),
972
+ },
973
+ },
1017
974
 
1018
- ...createSharedStyle(textComponents, {
1019
- textAlign: 'center',
1020
- alignSelf: 'stretch',
1021
- }),
1022
-
1023
- flex: 1,
1024
- alignSelf: 'stretch',
1025
- flexDirection: 'column',
1026
- alignItems: 'center',
1027
- justifyContent: 'center',
1028
- paddingHorizontal: 25,
1029
- paddingTop: variables.extraLargeGutter,
1030
- paddingBottom: variables.extraLargeGutter - variables.smallGutter,
1031
- },
975
+ 'shoutem.ui.View': {
976
+ '.notification-dot': {
977
+ alignSelf: 'center',
978
+ flex: 0,
979
+ width: 6,
980
+ height: 6,
981
+ borderRadius: 3,
982
+ borderColor: resolveVariable('indicatorColor'),
983
+ backgroundColor: resolveVariable('indicatorColor'),
984
+ marginLeft: -10,
985
+ marginRight: 4,
986
+ },
1032
987
 
1033
- 'shoutem.ui.Tile': {
1034
- [INCLUDE]: ['commonVariants', 'guttersPadding'],
988
+ '.vertical': {
989
+ '*': {
990
+ // Add a small gutter below each view
991
+ marginBottom: resolveVariable('smallGutter'),
992
+ },
1035
993
 
1036
- 'shoutem.ui.View': {
1037
- '.content': {
1038
- '*': {
1039
- marginBottom: variables.mediumGutter - variables.smallGutter,
994
+ // Compensate for the last view
995
+ marginBottom: -resolveVariable('smallGutter'),
1040
996
  },
1041
997
 
1042
- alignSelf: 'stretch',
1043
- paddingTop: variables.mediumGutter,
1044
- paddingBottom: variables.smallGutter,
1045
- paddingHorizontal: variables.mediumGutter,
998
+ flex: 1,
999
+ },
1000
+
1001
+ '*.top': {
1002
+ alignSelf: 'flex-start',
1003
+ },
1004
+
1005
+ '.small': {
1006
+ height: 65,
1007
+ paddingVertical: 0,
1046
1008
  },
1009
+
1010
+ flexGrow: 1,
1011
+ flexShrink: 0,
1012
+ flexDirection: 'row',
1013
+ justifyContent: 'flex-start',
1014
+ alignItems: 'center',
1015
+ backgroundColor: resolveVariable('paperColor'),
1016
+ paddingHorizontal: resolveVariable('mediumGutter'),
1017
+ paddingVertical: resolveVariable('mediumGutter'),
1047
1018
  },
1048
1019
 
1049
- '.clear': {
1050
- backgroundColor: 'transparent',
1020
+ textCentricTile: {
1021
+ 'shoutem.ui.View': {
1022
+ '.actions': {
1023
+ position: 'absolute',
1024
+ top: resolveVariable('mediumGutter'),
1025
+ right: resolveVariable('mediumGutter'),
1026
+ },
1027
+ },
1028
+
1029
+ '*': {
1030
+ marginBottom: resolveVariable('smallGutter'),
1031
+ },
1032
+
1033
+ ...createSharedStyle(textComponents, {
1034
+ textAlign: 'center',
1035
+ alignSelf: 'stretch',
1036
+ }),
1037
+
1038
+ flex: 1,
1039
+ alignSelf: 'stretch',
1040
+ flexDirection: 'column',
1041
+ alignItems: 'center',
1042
+ justifyContent: 'center',
1043
+ paddingHorizontal: 25,
1044
+ paddingTop: resolveVariable('extraLargeGutter'),
1045
+ paddingBottom:
1046
+ resolveVariable('extraLargeGutter') - resolveVariable('smallGutter'),
1051
1047
  },
1052
1048
 
1053
- '.small': {
1049
+ 'shoutem.ui.Tile': {
1050
+ [INCLUDE]: ['commonVariants', 'guttersPadding'],
1051
+
1054
1052
  'shoutem.ui.View': {
1055
1053
  '.content': {
1056
1054
  '*': {
1057
- marginBottom: variables.smallGutter,
1055
+ marginBottom:
1056
+ resolveVariable('mediumGutter') - resolveVariable('smallGutter'),
1058
1057
  },
1059
1058
 
1060
1059
  alignSelf: 'stretch',
1061
- paddingTop: variables.mediumGutter,
1062
- paddingBottom: 0,
1063
- paddingHorizontal: 0,
1064
- marginBottom: -variables.smallGutter,
1060
+ paddingTop: resolveVariable('mediumGutter'),
1061
+ paddingBottom: resolveVariable('smallGutter'),
1062
+ paddingHorizontal: resolveVariable('mediumGutter'),
1065
1063
  },
1066
1064
  },
1067
1065
 
1068
- width: 145,
1069
- },
1066
+ '.clear': {
1067
+ backgroundColor: 'transparent',
1068
+ },
1070
1069
 
1071
- '.text-centric': {
1072
- [INCLUDE]: ['textCentricTile'],
1073
- },
1070
+ '.small': {
1071
+ 'shoutem.ui.View': {
1072
+ '.content': {
1073
+ '*': {
1074
+ marginBottom: resolveVariable('smallGutter'),
1075
+ },
1074
1076
 
1075
- heroAnimation(driver, { layout }) {
1076
- return {
1077
- opacity: driver.interpolate({
1078
- inputRange: [-0.2 * layout.height, 0, layout.height],
1079
- outputRange: [0, 1, 0],
1080
- useNativeDriver: true,
1081
- }),
1082
- transform: [
1083
- {
1084
- translateY: driver.interpolate({
1085
- inputRange: [-100, 100],
1086
- outputRange: [20, -20],
1087
- useNativeDriver: true,
1088
- }),
1077
+ alignSelf: 'stretch',
1078
+ paddingTop: resolveVariable('mediumGutter'),
1079
+ paddingBottom: 0,
1080
+ paddingHorizontal: 0,
1081
+ marginBottom: -resolveVariable('smallGutter'),
1089
1082
  },
1090
- ],
1091
- };
1092
- },
1083
+ },
1093
1084
 
1094
- flex: -1,
1095
- flexDirection: 'column',
1096
- alignItems: 'flex-start',
1097
- backgroundColor: variables.paperColor,
1098
- },
1085
+ width: 145,
1086
+ },
1099
1087
 
1100
- 'shoutem.ui.Card': {
1101
- [INCLUDE]: ['commonVariants'],
1088
+ '.text-centric': {
1089
+ [INCLUDE]: ['textCentricTile'],
1090
+ },
1102
1091
 
1103
- 'shoutem.ui.View': {
1104
- '.content': {
1105
- 'shoutem.ui.Subtitle': {
1106
- marginBottom: 10,
1107
- },
1092
+ heroAnimation(driver, { layout }) {
1093
+ return {
1094
+ opacity: driver.interpolate({
1095
+ inputRange: [-0.2 * layout.height, 0, layout.height],
1096
+ outputRange: [0, 1, 0],
1097
+ useNativeDriver: true,
1098
+ }),
1099
+ transform: [
1100
+ {
1101
+ translateY: driver.interpolate({
1102
+ inputRange: [-100, 100],
1103
+ outputRange: [20, -20],
1104
+ useNativeDriver: true,
1105
+ }),
1106
+ },
1107
+ ],
1108
+ };
1108
1109
  },
1109
1110
 
1110
- flex: 1,
1111
- alignSelf: 'stretch',
1112
- padding: 10,
1113
- backgroundColor: variables.paperColor,
1111
+ flex: -1,
1112
+ flexDirection: 'column',
1113
+ alignItems: 'flex-start',
1114
+ backgroundColor: resolveVariable('paperColor'),
1114
1115
  },
1115
1116
 
1116
- width: dimensionRelativeToIphone(180),
1117
- flexDirection: 'column',
1118
- justifyContent: 'center',
1119
- alignItems: 'flex-start',
1120
- backgroundColor: variables.paperColor,
1121
- borderRadius: 2,
1122
- shadowColor: variables.shadowColor,
1123
- shadowOpacity: 0.1,
1124
- shadowOffset: { width: 1, height: 1 },
1117
+ 'shoutem.ui.Card': {
1118
+ [INCLUDE]: ['commonVariants'],
1125
1119
 
1126
- '.horizontal': {
1127
1120
  'shoutem.ui.View': {
1128
- '.pull-left': {
1129
- marginVertical: variables.mediumGutter,
1130
- marginLeft: -dimensionRelativeToIphone(72),
1121
+ '.content': {
1122
+ 'shoutem.ui.Subtitle': {
1123
+ marginBottom: 10,
1124
+ },
1131
1125
  },
1126
+
1127
+ flex: 1,
1128
+ alignSelf: 'stretch',
1129
+ padding: 10,
1130
+ backgroundColor: resolveVariable('paperColor'),
1132
1131
  },
1133
1132
 
1134
- // width needs to be reset so alignSelf stretch could be applied
1135
- width: null,
1136
- flexDirection: 'row',
1137
- justifyContent: 'flex-start',
1138
- margin: 10,
1139
- marginTop: variables.smallGutter,
1140
- marginBottom: variables.smallGutter,
1141
- },
1142
- },
1133
+ width: dimensionRelativeToIphone(180),
1134
+ flexDirection: 'column',
1135
+ justifyContent: 'center',
1136
+ alignItems: 'flex-start',
1137
+ backgroundColor: resolveVariable('paperColor'),
1138
+ borderRadius: 2,
1139
+ shadowColor: resolveVariable('shadowColor'),
1140
+ shadowOpacity: 0.1,
1141
+ shadowOffset: { width: 1, height: 1 },
1142
+
1143
+ '.horizontal': {
1144
+ 'shoutem.ui.View': {
1145
+ '.pull-left': {
1146
+ marginVertical: resolveVariable('mediumGutter'),
1147
+ marginLeft: -dimensionRelativeToIphone(72),
1148
+ },
1149
+ },
1143
1150
 
1144
- 'shoutem.ui.Overlay': {
1145
- [INCLUDE]: ['guttersPadding'],
1151
+ // width needs to be reset so alignSelf stretch could be applied
1152
+ width: null,
1153
+ flexDirection: 'row',
1154
+ justifyContent: 'flex-start',
1155
+ margin: 10,
1156
+ marginTop: resolveVariable('smallGutter'),
1157
+ marginBottom: resolveVariable('smallGutter'),
1158
+ },
1159
+ },
1146
1160
 
1147
- ...createSharedStyle([...textComponents, 'shoutem.ui.Icon'], {
1148
- textAlign: 'center',
1149
- color: variables.tagOverlayTextColor,
1150
- }),
1161
+ 'shoutem.ui.Overlay': {
1162
+ [INCLUDE]: ['guttersPadding'],
1151
1163
 
1152
- ...createSharedStyle(viewComponents, {
1153
1164
  ...createSharedStyle([...textComponents, 'shoutem.ui.Icon'], {
1154
1165
  textAlign: 'center',
1155
- color: variables.tagOverlayTextColor,
1166
+ color: resolveVariable('tagOverlayTextColor'),
1156
1167
  }),
1157
- }),
1158
1168
 
1159
- '.image-overlay': {
1160
- ...createSharedStyle([...textComponents, 'shoutem.ui.Icon'], {
1161
- color: variables.imageOverlayTextColor,
1169
+ ...createSharedStyle(viewComponents, {
1170
+ ...createSharedStyle([...textComponents, 'shoutem.ui.Icon'], {
1171
+ textAlign: 'center',
1172
+ color: resolveVariable('tagOverlayTextColor'),
1173
+ }),
1162
1174
  }),
1163
1175
 
1164
- backgroundColor: changeColorAlpha(variables.imageOverlayColor, 0.5),
1165
- },
1176
+ '.image-overlay': {
1177
+ ...createSharedStyle([...textComponents, 'shoutem.ui.Icon'], {
1178
+ color: resolveVariable('imageOverlayTextColor'),
1179
+ }),
1166
1180
 
1167
- '.rounded-small': {
1168
- width: 38,
1169
- height: 38,
1170
- borderRadius: 19,
1171
- padding: 0,
1172
- },
1173
-
1174
- '.fill-parent': {
1175
- [INCLUDE]: ['fillParent'],
1176
- },
1181
+ backgroundColor: changeColorAlpha(
1182
+ resolveVariable('imageOverlayColor'),
1183
+ 0.5,
1184
+ ),
1185
+ },
1177
1186
 
1178
- alignItems: 'center',
1179
- justifyContent: 'center',
1180
- paddingTop: 2 * variables.smallGutter,
1181
- paddingBottom: 2 * variables.smallGutter,
1182
- paddingHorizontal: variables.mediumGutter,
1183
- backgroundColor: variables.tagOverlayColor,
1184
- },
1187
+ '.rounded-small': {
1188
+ width: 38,
1189
+ height: 38,
1190
+ borderRadius: 19,
1191
+ padding: 0,
1192
+ },
1185
1193
 
1186
- //
1187
- // Buttons
1188
- //
1189
- 'shoutem.ui.TouchableOpacity': {
1190
- [INCLUDE]: [
1191
- 'commonVariants',
1192
- 'guttersPadding',
1193
- 'horizontalFlexAlignment',
1194
- 'verticalFlexAlignment',
1195
- ],
1196
-
1197
- activeOpacity: 0.8,
1198
- },
1194
+ '.fill-parent': {
1195
+ [INCLUDE]: ['fillParent'],
1196
+ },
1199
1197
 
1200
- 'shoutem.ui.TouchableNativeFeedback': {
1201
- [INCLUDE]: ['commonVariants'],
1202
- },
1198
+ alignItems: 'center',
1199
+ justifyContent: 'center',
1200
+ paddingTop: 2 * resolveVariable('smallGutter'),
1201
+ paddingBottom: 2 * resolveVariable('smallGutter'),
1202
+ paddingHorizontal: resolveVariable('mediumGutter'),
1203
+ backgroundColor: resolveVariable('tagOverlayColor'),
1204
+ },
1203
1205
 
1204
- 'shoutem.ui.Touchable': {},
1206
+ //
1207
+ // Buttons
1208
+ //
1209
+ 'shoutem.ui.TouchableOpacity': {
1210
+ [INCLUDE]: [
1211
+ 'commonVariants',
1212
+ 'guttersPadding',
1213
+ 'horizontalFlexAlignment',
1214
+ 'verticalFlexAlignment',
1215
+ ],
1205
1216
 
1206
- tightButton: {
1207
- 'shoutem.ui.Icon': {
1208
- marginRight: 0,
1217
+ activeOpacity: 0.8,
1209
1218
  },
1210
1219
 
1211
- 'shoutem.ui.Text': {
1212
- marginRight: 0,
1220
+ 'shoutem.ui.TouchableNativeFeedback': {
1221
+ [INCLUDE]: ['commonVariants'],
1213
1222
  },
1214
1223
 
1215
- 'shoutem.ui.View': {
1216
- '.badge': {
1217
- top: -4,
1218
- right: -4,
1224
+ 'shoutem.ui.Touchable': {},
1225
+
1226
+ tightButton: {
1227
+ 'shoutem.ui.Icon': {
1228
+ marginRight: 0,
1219
1229
  },
1220
- },
1221
1230
 
1222
- paddingLeft: 0,
1223
- paddingRight: 0,
1224
- },
1231
+ 'shoutem.ui.Text': {
1232
+ marginRight: 0,
1233
+ },
1225
1234
 
1226
- clearButton: {
1227
- backgroundColor: 'transparent',
1228
- borderWidth: 0,
1229
- borderRadius: 0,
1230
- },
1235
+ 'shoutem.ui.View': {
1236
+ '.badge': {
1237
+ top: -4,
1238
+ right: -4,
1239
+ },
1240
+ },
1231
1241
 
1232
- textualButton: {
1233
- 'shoutem.ui.Text': {
1234
- // Inherit color
1235
- ...variables.text,
1236
- fontFamily: resolveFontFamily(
1237
- variables.text.fontFamily,
1238
- variables.text.fontWeight,
1239
- variables.text.fontStyle,
1240
- ),
1241
- fontWeight: resolveFontWeight(variables.text.fontWeight),
1242
- fontStyle: resolveFontStyle(variables.text.fontStyle),
1242
+ paddingLeft: 0,
1243
+ paddingRight: 0,
1243
1244
  },
1244
1245
 
1245
- 'shoutem.ui.Icon': {
1246
- color: variables.text.color,
1246
+ clearButton: {
1247
+ backgroundColor: 'transparent',
1248
+ borderWidth: 0,
1249
+ borderRadius: 0,
1247
1250
  },
1248
- },
1249
1251
 
1250
- 'shoutem.ui.Button': {
1251
- [INCLUDE]: ['commonVariants', 'guttersMargin'],
1252
+ textualButton: {
1253
+ 'shoutem.ui.Text': {
1254
+ // Inherit color
1255
+ ...resolveVariable('text'),
1256
+ fontFamily: resolveFontFamily(
1257
+ resolveVariable('text.fontFamily'),
1258
+ resolveVariable('text.fontWeight'),
1259
+ resolveVariable('text.fontStyle'),
1260
+ ),
1261
+ fontWeight: resolveFontWeight(resolveVariable('text.fontWeight')),
1262
+ fontStyle: resolveFontStyle(resolveVariable('text.fontStyle')),
1263
+ },
1252
1264
 
1253
- '.tight': {
1254
- [INCLUDE]: ['tightButton'],
1265
+ 'shoutem.ui.Icon': {
1266
+ color: resolveVariable('text.color'),
1267
+ },
1255
1268
  },
1256
1269
 
1257
- '.clear': {
1258
- [INCLUDE]: ['clearButton'],
1259
- },
1270
+ 'shoutem.ui.Button': {
1271
+ [INCLUDE]: ['commonVariants', 'guttersMargin'],
1260
1272
 
1261
- '.textual': {
1262
- // Use default text as button text style
1263
- // Text like button, without background color and margins
1264
- [INCLUDE]: ['textualButton', 'clearButton', 'tightButton'],
1265
- },
1273
+ '.tight': {
1274
+ [INCLUDE]: ['tightButton'],
1275
+ },
1266
1276
 
1267
- '.secondary': {
1268
- 'shoutem.ui.Icon': {
1269
- color: variables.secondaryButtonTextColor,
1277
+ '.clear': {
1278
+ [INCLUDE]: ['clearButton'],
1270
1279
  },
1271
1280
 
1272
- 'shoutem.ui.Text': {
1273
- color: variables.secondaryButtonTextColor,
1281
+ '.textual': {
1282
+ // Use default text as button text style
1283
+ // Text like button, without background color and margins
1284
+ [INCLUDE]: ['textualButton', 'clearButton', 'tightButton'],
1274
1285
  },
1275
1286
 
1276
- backgroundColor: variables.secondaryButtonBackgroundColor,
1277
- borderColor: variables.secondaryButtonBorderColor,
1278
- },
1287
+ '.secondary': {
1288
+ 'shoutem.ui.Icon': {
1289
+ color: resolveVariable('secondaryButtonTextColor'),
1290
+ },
1279
1291
 
1280
- '.muted': {
1281
- 'shoutem.ui.Icon': {
1282
- opacity: 0.5,
1292
+ 'shoutem.ui.Text': {
1293
+ color: resolveVariable('secondaryButtonTextColor'),
1294
+ },
1295
+
1296
+ backgroundColor: resolveVariable('secondaryButtonBackgroundColor'),
1297
+ borderColor: resolveVariable('secondaryButtonBorderColor'),
1283
1298
  },
1284
1299
 
1285
- 'shoutem.ui.Text': {
1286
- opacity: 0.5,
1300
+ '.muted': {
1301
+ 'shoutem.ui.Icon': {
1302
+ opacity: 0.5,
1303
+ },
1304
+
1305
+ 'shoutem.ui.Text': {
1306
+ opacity: 0.5,
1307
+ },
1287
1308
  },
1288
- },
1289
1309
 
1290
- // Buttons at the bottom of dialogs, widgets, etc.,
1291
- // usually Cancel/Confirm, No/Yes, etc.
1292
- '.confirmation': {
1293
- 'shoutem.ui.Text': {
1294
- [INCLUDE]: ['boldTextStyle'],
1310
+ // Buttons at the bottom of dialogs, widgets, etc.,
1311
+ // usually Cancel/Confirm, No/Yes, etc.
1312
+ '.confirmation': {
1313
+ 'shoutem.ui.Text': {
1314
+ [INCLUDE]: ['boldTextStyle'],
1315
+ },
1316
+
1317
+ // Medium gutter on both sides, 25 between buttons
1318
+ flex: 1,
1319
+ marginHorizontal: resolveVariable('mediumGutter'),
1295
1320
  },
1296
1321
 
1297
- // Medium gutter on both sides, 25 between buttons
1298
- flex: 1,
1299
- marginHorizontal: variables.mediumGutter,
1300
- },
1322
+ '.full-width': {
1323
+ 'shoutem.ui.Icon': {
1324
+ width: 16,
1325
+ height: 16,
1326
+ },
1301
1327
 
1302
- '.full-width': {
1303
- 'shoutem.ui.Icon': {
1304
- width: 16,
1305
- height: 16,
1328
+ flex: 1,
1329
+ alignSelf: 'stretch',
1330
+ borderRadius: 0,
1331
+ borderWidth: 0,
1332
+ height: 55,
1306
1333
  },
1307
1334
 
1308
- flex: 1,
1309
- alignSelf: 'stretch',
1310
- borderRadius: 0,
1311
- borderWidth: 0,
1312
- height: 55,
1313
- },
1335
+ // Vertically stacked icon and text
1336
+ '.stacked': {
1337
+ 'shoutem.ui.Icon': {
1338
+ marginVertical: resolveVariable('mediumGutter'),
1339
+ marginRight: 0,
1340
+ },
1314
1341
 
1315
- // Vertically stacked icon and text
1316
- '.stacked': {
1317
- 'shoutem.ui.Icon': {
1318
- marginVertical: variables.mediumGutter,
1319
- marginRight: 0,
1342
+ 'shoutem.ui.Text': {
1343
+ [INCLUDE]: ['boldTextStyle'],
1344
+ textAlign: 'center',
1345
+ marginVertical: 0,
1346
+ marginRight: 0,
1347
+ fontFamily: 'Rubik-Medium',
1348
+ },
1349
+
1350
+ width: dimensionRelativeToIphone(120),
1351
+ height: 82,
1352
+ flexDirection: 'column',
1320
1353
  },
1321
1354
 
1322
1355
  'shoutem.ui.Text': {
1323
- [INCLUDE]: ['boldTextStyle'],
1324
- textAlign: 'center',
1325
- marginVertical: 0,
1326
- marginRight: 0,
1327
- fontFamily: 'Rubik-Medium',
1356
+ ...resolveVariable('primaryButtonText'),
1357
+ fontFamily: resolveFontFamily(
1358
+ resolveVariable('primaryButtonText.fontFamily'),
1359
+ resolveVariable('primaryButtonText.fontWeight'),
1360
+ resolveVariable('primaryButtonText.fontStyle'),
1361
+ ),
1362
+ fontWeight: resolveFontWeight(
1363
+ resolveVariable('primaryButtonText.fontWeight'),
1364
+ ),
1365
+ fontStyle: resolveFontStyle(
1366
+ resolveVariable('primaryButtonText.fontStyle'),
1367
+ ),
1368
+ letterSpacing: 1,
1369
+ marginVertical: 12,
1370
+ marginRight: 10,
1328
1371
  },
1329
1372
 
1330
- width: dimensionRelativeToIphone(120),
1331
- height: 82,
1332
- flexDirection: 'column',
1333
- },
1373
+ 'shoutem.ui.Icon': {
1374
+ color: resolveVariable('primaryButtonText.color'),
1375
+ width: 24,
1376
+ height: 24,
1377
+ marginRight: 10,
1378
+ },
1334
1379
 
1335
- 'shoutem.ui.Text': {
1336
- ...variables.primaryButtonText,
1337
- fontFamily: resolveFontFamily(
1338
- variables.primaryButtonText.fontFamily,
1339
- variables.primaryButtonText.fontWeight,
1340
- variables.primaryButtonText.fontStyle,
1380
+ 'shoutem.ui.View': {
1381
+ // Positions badge to top right of button icon
1382
+ '.badge': {
1383
+ top: -4,
1384
+ right: 11,
1385
+ },
1386
+ },
1387
+
1388
+ underlayColor: changeColorAlpha(
1389
+ resolveVariable('primaryButtonBackgroundColor'),
1390
+ 0.5,
1341
1391
  ),
1342
- fontWeight: resolveFontWeight(variables.primaryButtonText.fontWeight),
1343
- fontStyle: resolveFontStyle(variables.primaryButtonText.fontStyle),
1344
- letterSpacing: 1,
1345
- marginVertical: 12,
1346
- marginRight: 10,
1347
- },
1348
1392
 
1349
- 'shoutem.ui.Icon': {
1350
- color: variables.primaryButtonText.color,
1351
- width: 24,
1352
- height: 24,
1353
- marginRight: 10,
1393
+ backgroundColor: resolveVariable('primaryButtonBackgroundColor'),
1394
+ flexDirection: 'row',
1395
+ alignItems: 'center',
1396
+ justifyContent: 'center',
1397
+ borderRadius: 2,
1398
+ borderWidth: 1,
1399
+ borderColor: resolveVariable('primaryButtonBorderColor'),
1400
+ paddingLeft: resolveVariable('mediumGutter'),
1401
+ paddingRight: resolveVariable('smallGutter'),
1354
1402
  },
1355
1403
 
1356
- 'shoutem.ui.View': {
1357
- // Positions badge to top right of button icon
1358
- '.badge': {
1359
- top: -4,
1360
- right: 11,
1404
+ //
1405
+ // Media
1406
+ //
1407
+ 'shoutem.ui.Icon': {
1408
+ '.indicator': {
1409
+ [INCLUDE]: ['indicator'],
1361
1410
  },
1362
- },
1363
-
1364
- underlayColor: changeColorAlpha(
1365
- variables.primaryButtonBackgroundColor,
1366
- 0.5,
1367
- ),
1368
1411
 
1369
- backgroundColor: variables.primaryButtonBackgroundColor,
1370
- flexDirection: 'row',
1371
- alignItems: 'center',
1372
- justifyContent: 'center',
1373
- borderRadius: 2,
1374
- borderWidth: 1,
1375
- borderColor: variables.primaryButtonBorderColor,
1376
- paddingLeft: variables.mediumGutter,
1377
- paddingRight: variables.smallGutter,
1378
- },
1412
+ '.scroll-indicator': {
1413
+ [INCLUDE]: ['indicator'],
1414
+ position: 'absolute',
1415
+ left: 0,
1416
+ right: 0,
1417
+ bottom: resolveVariable('mediumGutter'),
1418
+ },
1379
1419
 
1380
- //
1381
- // Media
1382
- //
1383
- 'shoutem.ui.Icon': {
1384
- '.indicator': {
1385
- [INCLUDE]: ['indicator'],
1420
+ backgroundColor: 'transparent',
1421
+ color: resolveVariable('primaryButtonText.color'),
1422
+ width: 24,
1423
+ height: 24,
1386
1424
  },
1387
1425
 
1388
- '.scroll-indicator': {
1389
- [INCLUDE]: ['indicator'],
1390
- position: 'absolute',
1391
- left: 0,
1392
- right: 0,
1393
- bottom: variables.mediumGutter,
1426
+ 'shoutem.ui.Spinner': {
1427
+ [INCLUDE]: ['guttersMargin'],
1428
+ color: changeColorAlpha(resolveVariable('text.color'), 0.5),
1394
1429
  },
1395
1430
 
1396
- backgroundColor: 'transparent',
1397
- color: variables.primaryButtonText.color,
1398
- width: 24,
1399
- height: 24,
1400
- },
1431
+ 'shoutem.ui.EmptyListImage': {
1432
+ image: {
1433
+ resizeMode: 'contain',
1434
+ marginTop: 45,
1435
+ marginBottom: 30,
1436
+ },
1437
+ title: {
1438
+ maxWidth: 250,
1439
+ marginBottom: 20,
1440
+ textAlign: 'center',
1441
+ },
1442
+ message: {
1443
+ textAlign: 'center',
1444
+ maxWidth: 250,
1445
+ },
1446
+ },
1401
1447
 
1402
- 'shoutem.ui.Spinner': {
1403
- [INCLUDE]: ['guttersMargin'],
1404
- color: changeColorAlpha(variables.text.color, 0.5),
1405
- },
1448
+ //
1449
+ // Collections
1450
+ //
1451
+ 'shoutem.ui.ListView': {
1452
+ 'shoutem.ui.Divider': {
1453
+ [INCLUDE]: ['sectionHeaderDivider'],
1406
1454
 
1407
- 'shoutem.ui.EmptyListImage': {
1408
- image: {
1409
- resizeMode: 'contain',
1410
- marginTop: 45,
1411
- marginBottom: 30,
1412
- },
1413
- title: {
1414
- maxWidth: 250,
1415
- marginBottom: 20,
1416
- textAlign: 'center',
1417
- },
1418
- message: {
1419
- textAlign: 'center',
1420
- maxWidth: 250,
1421
- },
1422
- },
1455
+ borderTopWidth: 0,
1456
+ },
1423
1457
 
1424
- //
1425
- // Collections
1426
- //
1427
- 'shoutem.ui.ListView': {
1428
- 'shoutem.ui.Divider': {
1429
- [INCLUDE]: ['sectionHeaderDivider'],
1458
+ listContent: {
1459
+ paddingBottom: 0,
1460
+ backgroundColor: resolveVariable('backgroundColor'),
1461
+ },
1430
1462
 
1431
- borderTopWidth: 0,
1432
- },
1463
+ refreshControl: {
1464
+ tintColor: changeColorAlpha(resolveVariable('text.color'), 0.5),
1465
+ },
1433
1466
 
1434
- listContent: {
1435
- paddingBottom: 0,
1436
- backgroundColor: variables.backgroundColor,
1467
+ loadMoreSpinner: {
1468
+ paddingVertical: 25,
1469
+ },
1437
1470
  },
1438
1471
 
1439
- refreshControl: {
1440
- tintColor: changeColorAlpha(variables.text.color, 0.5),
1441
- },
1472
+ 'shoutem.ui.GridRow': {
1473
+ '*': {
1474
+ flex: 1,
1475
+ alignSelf: 'stretch',
1476
+ marginLeft: resolveVariable('smallGutter'),
1477
+ marginRight: 0,
1478
+ marginTop: 0,
1479
+ marginBottom: 0,
1480
+ },
1442
1481
 
1443
- loadMoreSpinner: {
1444
- paddingVertical: 25,
1445
- },
1446
- },
1482
+ '.no-padding': {
1483
+ padding: 0,
1484
+ },
1447
1485
 
1448
- 'shoutem.ui.GridRow': {
1449
- '*': {
1450
1486
  flex: 1,
1451
- alignSelf: 'stretch',
1452
- marginLeft: variables.smallGutter,
1453
- marginRight: 0,
1454
- marginTop: 0,
1455
- marginBottom: 0,
1487
+ flexDirection: 'row',
1488
+ alignItems: 'flex-start',
1489
+ justifyContent: 'space-between',
1490
+ paddingRight: resolveVariable('smallGutter'),
1491
+ paddingTop: resolveVariable('smallGutter'),
1456
1492
  },
1457
1493
 
1458
- '.no-padding': {
1459
- padding: 0,
1460
- },
1494
+ //
1495
+ // Other
1496
+ //
1497
+ // Deprecated on ShoutEm platform ( not used for navigationBar elements )
1498
+ navigationBar: {
1499
+ '.featured': {
1500
+ 'shoutem.ui.Button': {
1501
+ 'shoutem.ui.Icon': {
1502
+ color: resolveVariable('featuredNavBarIconsColor'),
1503
+ },
1504
+ 'shoutem.ui.Text': {
1505
+ color: resolveVariable('featuredNavBarIconsColor'),
1506
+ },
1461
1507
 
1462
- flex: 1,
1463
- flexDirection: 'row',
1464
- alignItems: 'flex-start',
1465
- justifyContent: 'space-between',
1466
- paddingRight: variables.smallGutter,
1467
- paddingTop: variables.smallGutter,
1468
- },
1508
+ 'shoutem.ui.View': {
1509
+ '.badge': {
1510
+ backgroundColor: resolveVariable('featuredNavBarIconsColor'),
1511
+ borderColor: resolveVariable('featuredColor'),
1469
1512
 
1470
- //
1471
- // Other
1472
- //
1473
- navigationBar: {
1474
- '.featured': {
1475
- 'shoutem.ui.Button': {
1476
- 'shoutem.ui.Icon': {
1477
- color: variables.featuredNavBarIconsColor,
1478
- },
1479
- 'shoutem.ui.Text': {
1480
- color: variables.featuredNavBarIconsColor,
1513
+ 'shoutem.ui.Text': {
1514
+ color: resolveVariable('featuredColor'),
1515
+ },
1516
+ },
1517
+ },
1481
1518
  },
1482
1519
 
1483
- 'shoutem.ui.View': {
1484
- '.badge': {
1485
- backgroundColor: variables.featuredNavBarIconsColor,
1486
- borderColor: variables.featuredColor,
1487
-
1520
+ 'shoutem.ui.DropDownMenu': {
1521
+ selectedOption: {
1522
+ 'shoutem.ui.Icon': {
1523
+ color: resolveVariable('featuredNavBarIconsColor'),
1524
+ },
1488
1525
  'shoutem.ui.Text': {
1489
- color: variables.featuredColor,
1526
+ color: resolveVariable('featuredNavBarIconsColor'),
1490
1527
  },
1491
1528
  },
1492
1529
  },
1493
- },
1494
1530
 
1495
- 'shoutem.ui.DropDownMenu': {
1496
- selectedOption: {
1497
- 'shoutem.ui.Icon': {
1498
- color: variables.featuredNavBarIconsColor,
1499
- },
1500
- 'shoutem.ui.Text': {
1501
- color: variables.featuredNavBarIconsColor,
1531
+ ...createSharedStyle(
1532
+ ['shoutem.ui.Title', 'shoutem.ui.Icon', 'shoutem.ui.Text'],
1533
+ {
1534
+ fontFamily: resolveFontFamily(
1535
+ resolveVariable('title.fontFamily'),
1536
+ resolveVariable('title.fontWeight'),
1537
+ resolveVariable('title.fontStyle'),
1538
+ ),
1539
+ fontWeight: resolveFontWeight(resolveVariable('title.fontWeight')),
1540
+ fontStyle: resolveFontStyle(resolveVariable('title.fontStyle')),
1541
+ color: resolveVariable('featuredNavBarTitleColor'),
1502
1542
  },
1503
- },
1504
- },
1543
+ ),
1505
1544
 
1506
- ...createSharedStyle(
1507
- ['shoutem.ui.Title', 'shoutem.ui.Icon', 'shoutem.ui.Text'],
1508
- {
1509
- fontFamily: resolveFontFamily(
1510
- variables.title.fontFamily,
1511
- variables.title.fontWeight,
1512
- variables.title.fontStyle,
1513
- ),
1514
- fontWeight: resolveFontWeight(variables.title.fontWeight),
1515
- fontStyle: resolveFontStyle(variables.title.fontStyle),
1516
- color: variables.featuredNavBarTitleColor,
1545
+ container: {
1546
+ [INCLUDE]: ['featuredBackground'],
1547
+ borderBottomWidth: 0,
1517
1548
  },
1518
- ),
1549
+ },
1519
1550
 
1520
- container: {
1521
- [INCLUDE]: ['featuredBackground'],
1522
- borderBottomWidth: 0,
1551
+ 'shoutem.ui.Icon': {
1552
+ color: resolveVariable('navBarIconsColor'),
1553
+ width: 24,
1554
+ height: 24,
1555
+ paddingHorizontal: 9,
1523
1556
  },
1524
- },
1525
1557
 
1526
- 'shoutem.ui.Icon': {
1527
- color: variables.navBarIconsColor,
1528
- width: 24,
1529
- height: 24,
1530
- paddingHorizontal: 9,
1531
- },
1558
+ 'shoutem.ui.Text': {
1559
+ ...resolveVariable('navBarText'),
1560
+ fontFamily: resolveFontFamily(
1561
+ resolveVariable('navBarText.fontFamily'),
1562
+ resolveVariable('navBarText.fontWeight'),
1563
+ resolveVariable('navBarText.fontStyle'),
1564
+ ),
1565
+ fontWeight: resolveFontWeight(resolveVariable('navBarText.fontWeight')),
1566
+ fontStyle: resolveFontStyle(resolveVariable('navBarText.fontStyle')),
1567
+ paddingHorizontal: 9,
1568
+ },
1532
1569
 
1533
- 'shoutem.ui.Text': {
1534
- ...variables.navBarText,
1535
- fontFamily: resolveFontFamily(
1536
- variables.navBarText.fontFamily,
1537
- variables.navBarText.fontWeight,
1538
- variables.navBarText.fontStyle,
1539
- ),
1540
- fontWeight: resolveFontWeight(variables.navBarText.fontWeight),
1541
- fontStyle: resolveFontStyle(variables.navBarText.fontStyle),
1542
- paddingHorizontal: 9,
1543
- },
1570
+ 'shoutem.ui.ShareButton': {
1571
+ '.clear': {
1572
+ 'shoutem.ui.Button': {
1573
+ [INCLUDE]: ['clearButton'],
1574
+ },
1575
+ },
1576
+ },
1544
1577
 
1545
- 'shoutem.ui.ShareButton': {
1546
- '.clear': {
1547
- 'shoutem.ui.Button': {
1548
- [INCLUDE]: ['clearButton'],
1578
+ 'shoutem.ui.Button': {
1579
+ [INCLUDE]: ['clearButton', 'tightButton'],
1580
+ 'shoutem.ui.Icon': {
1581
+ color: resolveVariable('navBarIconsColor'),
1582
+ marginVertical: 9,
1583
+ },
1584
+ 'shoutem.ui.Text': {
1585
+ ...resolveVariable('navBarText'),
1586
+ fontFamily: resolveFontFamily(
1587
+ resolveVariable('navBarText.fontFamily'),
1588
+ 'normal',
1589
+ resolveVariable('navBarText.fontStyle'),
1590
+ ),
1591
+ fontWeight: resolveFontWeight('normal'),
1592
+ fontStyle: resolveFontStyle(resolveVariable('navBarText.fontStyle')),
1593
+ color: resolveVariable('navBarIconsColor'),
1594
+ letterSpacing: 0,
1595
+ },
1596
+ 'shoutem.ui.View': {
1597
+ '.badge': {
1598
+ top: 5,
1599
+ right: 5,
1600
+ },
1549
1601
  },
1602
+ paddingHorizontal: 9,
1550
1603
  },
1551
1604
  },
1552
1605
 
1553
- 'shoutem.ui.Button': {
1554
- [INCLUDE]: ['clearButton', 'tightButton'],
1555
- 'shoutem.ui.Icon': {
1556
- color: variables.navBarIconsColor,
1557
- marginVertical: 9,
1558
- },
1559
- 'shoutem.ui.Text': {
1560
- ...variables.navBarText,
1606
+ 'shoutem.ui.NavigationBar': {
1607
+ title: {
1608
+ color: resolveVariable('navBarText.color'),
1609
+ lineHeight: calculateLineHeight(resolveVariable('navBarText.fontSize')),
1610
+ ...resolveVariable('navBarText'),
1561
1611
  fontFamily: resolveFontFamily(
1562
- variables.navBarText.fontFamily,
1563
- 'normal',
1564
- variables.navBarText.fontStyle,
1612
+ resolveVariable('navBarText.fontFamily'),
1613
+ resolveVariable('navBarText.fontWeight'),
1614
+ resolveVariable('navBarText.fontStyle'),
1565
1615
  ),
1566
- fontWeight: resolveFontWeight('normal'),
1567
- fontStyle: resolveFontStyle(variables.navBarText.fontStyle),
1568
- color: variables.navBarIconsColor,
1569
- letterSpacing: 0,
1570
- },
1571
- 'shoutem.ui.View': {
1572
- '.badge': {
1573
- top: 5,
1574
- right: 5,
1575
- },
1576
- },
1577
- paddingHorizontal: 9,
1578
- },
1579
- },
1580
-
1581
- 'shoutem.ui.NavigationBar': {
1582
- title: {
1583
- color: variables.navBarText.color,
1584
- lineHeight: calculateLineHeight(variables.navBarText.fontSize),
1585
- ...variables.navBarText,
1586
- fontFamily: resolveFontFamily(
1587
- variables.navBarText.fontFamily,
1588
- variables.navBarText.fontWeight,
1589
- variables.navBarText.fontStyle,
1590
- ),
1591
- fontWeight: resolveFontWeight(variables.navBarText.fontWeight),
1592
- fontStyle: resolveFontStyle(variables.navBarText.fontStyle),
1593
- },
1594
- icon: {
1595
- color: variables.navBarIconsColor,
1596
- },
1597
- statusBar: {
1598
- backgroundColor: variables.statusBarColor,
1599
- statusBarStyle: variables.statusBarStyle,
1600
- },
1601
- container: {
1602
- backgroundColor: variables.navBarBackground,
1603
- borderBottomColor: variables.navBarBorderColor,
1604
- borderBottomWidth: StyleSheet.hairlineWidth,
1605
- },
1606
- leftContainer: {
1607
- paddingLeft: variables.mediumGutter,
1608
- },
1609
- rightContainer: {
1610
- paddingRight: variables.mediumGutter,
1611
- },
1612
-
1613
- '.clear': {
1614
- container: {
1615
- backgroundColor: 'transparent',
1616
- borderBottomColor: 'transparent',
1617
- },
1618
- },
1619
-
1620
- '.featured': {
1621
- title: {
1622
- color: variables.featuredNavBarTitleColor,
1616
+ fontWeight: resolveFontWeight(resolveVariable('navBarText.fontWeight')),
1617
+ fontStyle: resolveFontStyle(resolveVariable('navBarText.fontStyle')),
1623
1618
  },
1624
1619
  icon: {
1625
- color: variables.featuredNavBarIconsColor,
1620
+ color: resolveVariable('navBarIconsColor'),
1626
1621
  },
1627
-
1628
- container: {
1629
- backgroundColor: variables.featuredColor,
1630
- borderBottomWidth: 0,
1631
- shadowOpacity: 0,
1622
+ statusBar: {
1623
+ backgroundColor: resolveVariable('statusBarColor'),
1624
+ statusBarStyle: resolveVariable('statusBarStyle'),
1632
1625
  },
1633
- },
1634
-
1635
- '.no-border': {
1636
1626
  container: {
1637
- borderBottomWidth: 0,
1638
- shadowOpacity: 0,
1627
+ backgroundColor: resolveVariable('navBarBackground'),
1628
+ borderBottomColor: resolveVariable('navBarBorderColor'),
1629
+ borderBottomWidth: StyleSheet.hairlineWidth,
1630
+ },
1631
+ leftContainer: {
1632
+ paddingLeft: resolveVariable('mediumGutter'),
1633
+ },
1634
+ rightContainer: {
1635
+ paddingRight: resolveVariable('mediumGutter'),
1639
1636
  },
1640
- },
1641
1637
 
1642
- boxingAnimation(driver) {
1643
- return {
1638
+ '.clear': {
1644
1639
  container: {
1645
- borderBottomColor: driver.interpolate({
1646
- // Animate to approx title top offset
1647
- inputRange: [0, 45],
1648
- outputRange: ['transparent', variables.navBarBorderColor],
1649
- extrapolate: 'clamp',
1650
- }),
1651
- borderBottomWidth: 1,
1640
+ backgroundColor: 'transparent',
1641
+ borderBottomColor: 'transparent',
1652
1642
  },
1643
+ },
1644
+
1645
+ '.featured': {
1653
1646
  title: {
1654
- opacity: driver.interpolate({
1655
- inputRange: [250, 300],
1656
- outputRange: [0, 1],
1657
- extrapolate: 'clamp',
1658
- }),
1647
+ color: resolveVariable('featuredNavBarTitleColor'),
1659
1648
  },
1660
- };
1661
- },
1662
-
1663
- solidifyAnimation(driver) {
1664
- return {
1665
1649
  icon: {
1666
- opacity: driver.interpolate({
1667
- inputRange: [250, 300],
1668
- outputRange: [0, 1],
1669
- extrapolate: 'clamp',
1670
- }),
1671
- },
1672
- title: {
1673
- color: driver.interpolate({
1674
- inputRange: [250, 300],
1675
- outputRange: ['transparent', variables.navBarText.color],
1676
- extrapolate: 'clamp',
1677
- }),
1650
+ color: resolveVariable('featuredNavBarIconsColor'),
1678
1651
  },
1652
+
1679
1653
  container: {
1680
- backgroundColor: driver.interpolate({
1681
- inputRange: [250, 300],
1682
- outputRange: ['transparent', variables.navBarBackground],
1683
- extrapolate: 'clamp',
1684
- }),
1685
- borderBottomColor: driver.interpolate({
1686
- inputRange: [250, 300],
1687
- outputRange: ['transparent', variables.navBarBorderColor],
1688
- extrapolate: 'clamp',
1689
- }),
1690
- opacity: driver.interpolate({
1691
- inputRange: [250, 300],
1692
- outputRange: [0, 1],
1693
- extrapolate: 'clamp',
1694
- }),
1654
+ backgroundColor: resolveVariable('featuredColor'),
1655
+ borderBottomWidth: 0,
1656
+ shadowOpacity: 0,
1695
1657
  },
1696
- };
1697
- },
1658
+ },
1698
1659
 
1699
- fadeAnimation(driver) {
1700
- return {
1660
+ '.no-border': {
1701
1661
  container: {
1702
- gradient: {
1703
- colors: ['transparent', 'rgba(0, 0, 0, 0.5)', 'transparent'],
1704
- locations: [0.0, 0.25, 1.0],
1662
+ borderBottomWidth: 0,
1663
+ shadowOpacity: 0,
1664
+ },
1665
+ },
1666
+
1667
+ boxingAnimation(driver) {
1668
+ return {
1669
+ container: {
1670
+ borderBottomColor: driver.interpolate({
1671
+ // Animate to approx title top offset
1672
+ inputRange: [0, 45],
1673
+ outputRange: [
1674
+ 'transparent',
1675
+ resolveVariable('navBarBorderColor'),
1676
+ ],
1677
+ extrapolate: 'clamp',
1678
+ }),
1679
+ borderBottomWidth: 1,
1680
+ },
1681
+ title: {
1705
1682
  opacity: driver.interpolate({
1706
1683
  inputRange: [250, 300],
1707
- outputRange: [1, 0],
1684
+ outputRange: [0, 1],
1685
+ extrapolate: 'clamp',
1708
1686
  }),
1709
1687
  },
1710
- },
1711
- };
1712
- },
1713
- },
1714
- 'shoutem.ui.navigation.NavigationBar': {
1715
- [INCLUDE]: ['navigationBar'],
1688
+ };
1689
+ },
1716
1690
 
1717
- '.fade': {
1718
- // Clear navigation bar is currently disabled on Android
1719
- // due to overflow issues.
1720
- gradient: {
1721
- [INCLUDE]: ['fillParent'],
1722
- colors: ['transparent', 'rgba(0, 0, 0, 0.15)', 'transparent'],
1723
- locations: [0.0, 0.25, 1.0],
1724
- solidifyAnimation(driver) {
1725
- return {
1691
+ solidifyAnimation(driver) {
1692
+ return {
1693
+ icon: {
1726
1694
  opacity: driver.interpolate({
1727
1695
  inputRange: [250, 300],
1728
- outputRange: [1, 0],
1696
+ outputRange: [0, 1],
1697
+ extrapolate: 'clamp',
1729
1698
  }),
1730
- };
1731
- },
1699
+ },
1700
+ title: {
1701
+ color: driver.interpolate({
1702
+ inputRange: [250, 300],
1703
+ outputRange: ['transparent', resolveVariable('navBarText.color')],
1704
+ extrapolate: 'clamp',
1705
+ }),
1706
+ },
1707
+ container: {
1708
+ backgroundColor: driver.interpolate({
1709
+ inputRange: [250, 300],
1710
+ outputRange: ['transparent', resolveVariable('navBarBackground')],
1711
+ extrapolate: 'clamp',
1712
+ }),
1713
+ borderBottomColor: driver.interpolate({
1714
+ inputRange: [250, 300],
1715
+ outputRange: [
1716
+ 'transparent',
1717
+ resolveVariable('navBarBorderColor'),
1718
+ ],
1719
+ extrapolate: 'clamp',
1720
+ }),
1721
+ opacity: driver.interpolate({
1722
+ inputRange: [250, 300],
1723
+ outputRange: [0, 1],
1724
+ extrapolate: 'clamp',
1725
+ }),
1726
+ },
1727
+ };
1732
1728
  },
1733
- },
1734
1729
 
1735
- container: {
1736
- paddingTop: NAVIGATION_BAR_HEIGHT,
1737
- backgroundColor: variables.navBarBackground,
1738
- borderBottomColor: variables.navBarBorderColor,
1739
- borderBottomWidth: StyleSheet.hairlineWidth,
1740
- },
1741
- navigationHeader: {
1742
- position: 'absolute',
1743
- top: Device.select({
1744
- iPhoneX: 6,
1745
- iPhoneXR: 8,
1746
- default: Platform.OS === 'android' ? 0 : -4,
1747
- }),
1748
- left: 0,
1749
- right: 0,
1750
- height: NAVIGATION_BAR_HEIGHT,
1751
- },
1752
- statusBar: {
1753
- backgroundColor: variables.statusBarColor,
1754
- statusBarStyle: variables.statusBarStyle,
1755
- height: StatusBar.currentHeight,
1756
- },
1757
- screenBackground: variables.backgroundColor,
1758
- navigationBarImage: {
1759
- marginTop: Device.select({
1760
- iPhoneX: IPHONE_X_NOTCH_PADDING,
1761
- iPhoneXR: IPHONE_XR_NOTCH_PADDING,
1762
- notchedAndroid: StatusBar.currentHeight,
1763
- default: 0,
1764
- }),
1765
- flex: 1,
1766
- flexGrow: 1,
1767
- height: NAVIGATION_HEADER_HEIGHT,
1768
- left: 0,
1769
- solidifyAnimation(driver) {
1730
+ fadeAnimation(driver) {
1770
1731
  return {
1771
- opacity: driver.interpolate({
1772
- inputRange: [250, 300],
1773
- outputRange: [0, 1],
1774
- extrapolate: 'clamp',
1775
- }),
1732
+ container: {
1733
+ gradient: {
1734
+ colors: ['transparent', 'rgba(0, 0, 0, 0.5)', 'transparent'],
1735
+ locations: [0.0, 0.25, 1.0],
1736
+ opacity: driver.interpolate({
1737
+ inputRange: [250, 300],
1738
+ outputRange: [1, 0],
1739
+ }),
1740
+ },
1741
+ },
1776
1742
  };
1777
1743
  },
1778
- boxingAnimation() {
1779
- return {};
1780
- },
1781
- position: 'absolute',
1782
- right: 0,
1783
- top: 0,
1784
- width: window.width,
1785
1744
  },
1786
- },
1787
1745
 
1788
- sectionHeaderDivider: {
1789
- 'shoutem.ui.Caption': {
1790
- marginTop: -1,
1791
- marginBottom: variables.smallGutter,
1792
- marginHorizontal: variables.mediumGutter,
1793
- },
1746
+ // Deprecated on ShoutEm platform ( not used for navigationBar elements )
1747
+ 'shoutem.ui.navigation.NavigationBar': {
1748
+ [INCLUDE]: ['navigationBar'],
1794
1749
 
1795
- paddingTop: 23,
1796
- backgroundColor: variables.sectionHeaderBackgroundColor,
1797
- borderBottomWidth: StyleSheet.hairlineWidth,
1798
- borderTopWidth: StyleSheet.hairlineWidth,
1799
- borderColor: variables.lineColor,
1800
- },
1801
- 'shoutem.ui.Divider': {
1802
- [INCLUDE]: ['guttersMargin'],
1750
+ '.fade': {
1751
+ // Clear navigation bar is currently disabled on Android
1752
+ // due to overflow issues.
1753
+ gradient: {
1754
+ [INCLUDE]: ['fillParent'],
1755
+ colors: ['transparent', 'rgba(0, 0, 0, 0.15)', 'transparent'],
1756
+ locations: [0.0, 0.25, 1.0],
1757
+ solidifyAnimation(driver) {
1758
+ return {
1759
+ opacity: driver.interpolate({
1760
+ inputRange: [250, 300],
1761
+ outputRange: [1, 0],
1762
+ }),
1763
+ };
1764
+ },
1765
+ },
1766
+ },
1803
1767
 
1804
- '.line': {
1805
- '.small': {
1806
- width: 55,
1768
+ container: {
1769
+ paddingTop: NAVIGATION_BAR_HEIGHT,
1770
+ backgroundColor: resolveVariable('navBarBackground'),
1771
+ borderBottomColor: resolveVariable('navBarBorderColor'),
1772
+ borderBottomWidth: StyleSheet.hairlineWidth,
1807
1773
  },
1808
- '.center': {
1809
- alignSelf: 'center',
1774
+ navigationHeader: {
1775
+ position: 'absolute',
1776
+ top: Device.select({
1777
+ iPhoneX: 6,
1778
+ iPhoneXR: 8,
1779
+ default: Platform.OS === 'android' ? 0 : -4,
1780
+ }),
1781
+ left: 0,
1782
+ right: 0,
1783
+ height: NAVIGATION_BAR_HEIGHT,
1784
+ },
1785
+ statusBar: {
1786
+ backgroundColor: resolveVariable('statusBarColor'),
1787
+ statusBarStyle: resolveVariable('statusBarStyle'),
1788
+ height: Device.select({
1789
+ iPhoneX: IPHONE_X_NOTCH_PADDING,
1790
+ iPhoneXR: IPHONE_XR_NOTCH_PADDING,
1791
+ default: 0,
1792
+ }),
1793
+ },
1794
+ screenBackground: resolveVariable('backgroundColor'),
1795
+ navigationBarImage: {
1796
+ marginTop: Device.select({
1797
+ iPhoneX: IPHONE_X_NOTCH_PADDING,
1798
+ iPhoneXR: IPHONE_XR_NOTCH_PADDING,
1799
+ default: 0,
1800
+ }),
1801
+ flex: 1,
1802
+ flexGrow: 1,
1803
+ height: NAVIGATION_HEADER_HEIGHT,
1804
+ left: 0,
1805
+ solidifyAnimation(driver) {
1806
+ return {
1807
+ opacity: driver.interpolate({
1808
+ inputRange: [250, 300],
1809
+ outputRange: [0, 1],
1810
+ extrapolate: 'clamp',
1811
+ }),
1812
+ };
1813
+ },
1814
+ boxingAnimation() {
1815
+ return {};
1816
+ },
1817
+ position: 'absolute',
1818
+ right: 0,
1819
+ top: 0,
1820
+ width: window.width,
1810
1821
  },
1811
- paddingTop: 0,
1812
- borderBottomWidth: StyleSheet.hairlineWidth,
1813
- borderColor: variables.lineColor,
1814
1822
  },
1815
1823
 
1816
- '.section-header': {
1817
- [INCLUDE]: ['sectionHeaderDivider'],
1818
- },
1824
+ sectionHeaderDivider: {
1825
+ 'shoutem.ui.Caption': {
1826
+ marginTop: -1,
1827
+ marginBottom: resolveVariable('smallGutter'),
1828
+ marginHorizontal: resolveVariable('mediumGutter'),
1829
+ },
1819
1830
 
1820
- alignSelf: 'stretch',
1821
- paddingTop: 25,
1822
- flexDirection: 'row',
1823
- justifyContent: 'space-between',
1824
- },
1831
+ paddingTop: 23,
1832
+ backgroundColor: resolveVariable(
1833
+ 'shoutem.cms',
1834
+ 'sectionHeaderBackgroundColor',
1835
+ ),
1836
+ borderBottomWidth: StyleSheet.hairlineWidth,
1837
+ borderTopWidth: StyleSheet.hairlineWidth,
1838
+ borderColor: resolveVariable('lineColor'),
1839
+ },
1840
+ 'shoutem.ui.Divider': {
1841
+ [INCLUDE]: ['guttersMargin'],
1825
1842
 
1826
- //
1827
- // Form components
1828
- //
1829
- 'shoutem.ui.FormGroup': {
1830
- 'shoutem.ui.View': {
1831
- 'shoutem.ui.Caption': {
1832
- backgroundColor: variables.paperColor,
1833
- paddingHorizontal: variables.mediumGutter,
1834
- color: changeColorAlpha(variables.caption.color, 0.5),
1835
- paddingTop: 10,
1843
+ '.line': {
1844
+ '.small': {
1845
+ width: 55,
1846
+ },
1847
+ '.center': {
1848
+ alignSelf: 'center',
1849
+ },
1850
+ paddingTop: 0,
1851
+ borderBottomWidth: StyleSheet.hairlineWidth,
1852
+ borderColor: resolveVariable('lineColor'),
1836
1853
  },
1837
1854
 
1838
- 'shoutem.ui.TextInput': {
1839
- height: 39,
1840
- paddingVertical: 9,
1855
+ '.section-header': {
1856
+ [INCLUDE]: ['sectionHeaderDivider'],
1841
1857
  },
1842
1858
 
1843
- 'shoutem.ui.DropDownMenu': {
1844
- horizontalContainer: {
1845
- alignItems: 'flex-start',
1846
- backgroundColor: variables.paperColor,
1859
+ alignSelf: 'stretch',
1860
+ paddingTop: 25,
1861
+ flexDirection: 'row',
1862
+ justifyContent: 'space-between',
1863
+ },
1864
+
1865
+ //
1866
+ // Form components
1867
+ //
1868
+ 'shoutem.ui.FormGroup': {
1869
+ 'shoutem.ui.View': {
1870
+ 'shoutem.ui.Caption': {
1871
+ backgroundColor: resolveVariable('paperColor'),
1872
+ paddingHorizontal: resolveVariable('mediumGutter'),
1873
+ color: changeColorAlpha(resolveVariable('caption.color'), 0.5),
1874
+ paddingTop: 10,
1875
+ },
1876
+
1877
+ 'shoutem.ui.TextInput': {
1847
1878
  height: 39,
1848
- paddingHorizontal: variables.mediumGutter,
1849
1879
  paddingVertical: 9,
1850
1880
  },
1851
1881
 
1852
- selectedOption: {
1853
- 'shoutem.ui.Icon': {
1854
- color: variables.paperColor,
1855
- },
1856
-
1857
- 'shoutem.ui.Text': {
1858
- margin: 0,
1882
+ 'shoutem.ui.DropDownMenu': {
1883
+ horizontalContainer: {
1884
+ alignItems: 'flex-start',
1885
+ backgroundColor: resolveVariable('paperColor'),
1886
+ height: 39,
1887
+ paddingHorizontal: resolveVariable('mediumGutter'),
1888
+ paddingVertical: 9,
1859
1889
  },
1860
1890
 
1861
- flex: 1,
1862
- alignSelf: 'stretch',
1863
- justifyContent: 'flex-start',
1864
- padding: 0,
1865
- },
1866
-
1867
- '.empty': {
1868
1891
  selectedOption: {
1892
+ 'shoutem.ui.Icon': {
1893
+ color: resolveVariable('paperColor'),
1894
+ },
1895
+
1869
1896
  'shoutem.ui.Text': {
1870
- color: changeColorAlpha(variables.text.color, 0.5),
1897
+ margin: 0,
1898
+ },
1899
+
1900
+ flex: 1,
1901
+ alignSelf: 'stretch',
1902
+ justifyContent: 'flex-start',
1903
+ padding: 0,
1904
+ },
1905
+
1906
+ '.empty': {
1907
+ selectedOption: {
1908
+ 'shoutem.ui.Text': {
1909
+ color: changeColorAlpha(resolveVariable('text.color'), 0.5),
1910
+ },
1871
1911
  },
1872
1912
  },
1873
1913
  },
1874
1914
  },
1875
1915
  },
1876
- },
1877
1916
 
1878
- 'shoutem.ui.TextInput': {
1879
- [INCLUDE]: ['commonVariants', 'guttersMargin'],
1917
+ 'shoutem.ui.TextInput': {
1918
+ [INCLUDE]: ['commonVariants', 'guttersMargin'],
1880
1919
 
1881
- selectionColor: variables.text.color,
1882
- placeholderTextColor: changeColorAlpha(variables.text.color, 0.5),
1883
- backgroundColor: variables.paperColor,
1884
- borderColor: variables.text.color,
1885
- height: 55,
1886
- paddingHorizontal: variables.mediumGutter,
1887
- paddingVertical: 18,
1888
- underlineColorAndroid: 'transparent',
1889
- ...variables.text,
1890
- fontFamily: resolveFontFamily(
1891
- variables.text.fontFamily,
1892
- variables.text.fontWeight,
1893
- variables.text.fontStyle,
1894
- ),
1895
- fontWeight: resolveFontWeight(variables.text.fontWeight),
1896
- fontStyle: resolveFontStyle(variables.text.fontStyle),
1920
+ selectionColor: resolveVariable('text.color'),
1921
+ placeholderTextColor: changeColorAlpha(
1922
+ resolveVariable('text.color'),
1923
+ 0.5,
1924
+ ),
1925
+ backgroundColor: resolveVariable('paperColor'),
1926
+ borderColor: resolveVariable('text.color'),
1927
+ height: 55,
1928
+ paddingHorizontal: resolveVariable('mediumGutter'),
1929
+ paddingVertical: 18,
1930
+ underlineColorAndroid: 'transparent',
1931
+ ...resolveVariable('text'),
1932
+ fontFamily: resolveFontFamily(
1933
+ resolveVariable('text.fontFamily'),
1934
+ resolveVariable('text.fontWeight'),
1935
+ resolveVariable('text.fontStyle'),
1936
+ ),
1937
+ fontWeight: resolveFontWeight(resolveVariable('text.fontWeight')),
1938
+ fontStyle: resolveFontStyle(resolveVariable('text.fontStyle')),
1897
1939
 
1898
- errorBorderColor: {
1899
- borderColor: variables.errorText.color,
1900
- },
1940
+ errorBorderColor: {
1941
+ borderColor: resolveVariable('errorText.color'),
1942
+ },
1901
1943
 
1902
- wiggleAnimation: {
1903
- interpolateConfig: {
1904
- inputRange: [0, 0.5, 1, 1.5, 2, 2.5, 3],
1905
- outputRange: [0, -5, 0, 5, 0, -5, 0],
1944
+ wiggleAnimation: {
1945
+ interpolateConfig: {
1946
+ inputRange: [0, 0.5, 1, 1.5, 2, 2.5, 3],
1947
+ outputRange: [0, -5, 0, 5, 0, -5, 0],
1948
+ },
1949
+ timingConfig: {
1950
+ duration: 400,
1951
+ },
1952
+ paddingHorizontal: 5,
1906
1953
  },
1907
- timingConfig: {
1908
- duration: 400,
1954
+
1955
+ withBorder: {
1956
+ borderWidth: 1,
1909
1957
  },
1910
- paddingHorizontal: 5,
1911
- },
1912
1958
 
1913
- withBorder: {
1914
- borderWidth: 1,
1915
- },
1959
+ withoutBorder: {
1960
+ borderWidth: 0,
1961
+ },
1916
1962
 
1917
- withoutBorder: {
1918
- borderWidth: 0,
1963
+ '.small': {
1964
+ paddingVertical: 6,
1965
+ height: 42,
1966
+ },
1919
1967
  },
1920
1968
 
1921
- '.small': {
1922
- paddingVertical: 6,
1923
- height: 42,
1924
- },
1925
- },
1969
+ 'shoutem.ui.NumberInput': {
1970
+ button: {
1971
+ borderWidth: 0,
1972
+ height: 40,
1973
+ width: 40,
1974
+ padding: 8,
1975
+ },
1926
1976
 
1927
- 'shoutem.ui.NumberInput': {
1928
- button: {
1929
- borderWidth: 0,
1930
- height: 40,
1931
- width: 40,
1932
- padding: 8,
1933
- },
1977
+ icon: {
1978
+ marginRight: 0,
1979
+ },
1934
1980
 
1935
- icon: {
1936
- marginRight: 0,
1937
- },
1981
+ inputContainer: {
1982
+ borderBottomWidth: 1,
1983
+ borderColor: 'rgba(0, 0, 0, 0.2)',
1984
+ borderTopWidth: 1,
1985
+ },
1938
1986
 
1939
- inputContainer: {
1940
- borderBottomWidth: 1,
1941
- borderColor: 'rgba(0, 0, 0, 0.2)',
1942
- borderTopWidth: 1,
1987
+ input: {
1988
+ height: 38,
1989
+ paddingVertical: 10,
1990
+ textAlign: 'center',
1991
+ width: 94,
1992
+ },
1943
1993
  },
1944
1994
 
1945
- input: {
1946
- height: 38,
1947
- paddingVertical: 10,
1948
- textAlign: 'center',
1949
- width: 94,
1950
- },
1951
- },
1995
+ // TODO: Search is defined with fixed colors at the moment but we will revisit it soon
1996
+ 'shoutem.ui.SearchField': {
1997
+ clearButton: {
1998
+ position: 'absolute',
1999
+ right: 5,
2000
+ top: 3,
2001
+ },
1952
2002
 
1953
- // TODO: Search is defined with fixed colors at the moment but we will revisit it soon
1954
- 'shoutem.ui.SearchField': {
1955
- clearButton: {
1956
- position: 'absolute',
1957
- right: 5,
1958
- top: 3,
1959
- },
2003
+ clearIcon: {
2004
+ color: '#2c2c2c',
2005
+ opacity: 0.5,
2006
+ },
1960
2007
 
1961
- clearIcon: {
1962
- color: '#2c2c2c',
1963
- opacity: 0.5,
1964
- },
2008
+ container: {
2009
+ backgroundColor: '#f0f0f0',
2010
+ borderRadius: 5,
2011
+ flex: 1,
2012
+ height: 30,
2013
+ },
1965
2014
 
1966
- container: {
1967
- backgroundColor: '#f0f0f0',
1968
- borderRadius: 5,
1969
- flex: 1,
1970
- height: 30,
1971
- },
2015
+ searchIcon: {
2016
+ color: '#888888',
2017
+ width: 16,
2018
+ height: 16,
2019
+ },
1972
2020
 
1973
- searchIcon: {
1974
- color: '#888888',
1975
- width: 16,
1976
- height: 16,
2021
+ input: {
2022
+ backgroundColor: '#f0f0f0',
2023
+ color: '#888888',
2024
+ minWidth: 230,
2025
+ fontSize: 15,
2026
+ height: 30,
2027
+ paddingVertical: 6,
2028
+ placeholderTextColor: '#888888',
2029
+ selectionColor: '#888888',
2030
+ },
1977
2031
  },
1978
2032
 
1979
- input: {
1980
- backgroundColor: '#f0f0f0',
1981
- color: '#888888',
1982
- minWidth: 230,
1983
- fontSize: 15,
1984
- height: 30,
1985
- paddingVertical: 6,
1986
- placeholderTextColor: '#888888',
1987
- selectionColor: '#888888',
1988
- },
1989
- },
2033
+ 'shoutem.ui.Switch': {
2034
+ container: {
2035
+ borderRadius: 15,
2036
+ height: 18,
2037
+ marginVertical: 7,
2038
+ paddingHorizontal: 2,
2039
+ paddingVertical: 2,
2040
+ width: 32,
2041
+
2042
+ muteAnimation(driver) {
2043
+ return {
2044
+ backgroundColor: driver.interpolate({
2045
+ inputRange: [0, 1],
2046
+ outputRange: [
2047
+ inverseColorBrightnessForAmount(
2048
+ resolveVariable('paperColor'),
2049
+ 15,
2050
+ ),
2051
+ changeColorAlpha(
2052
+ resolveVariable('secondaryButtonBackgroundColor'),
2053
+ 1,
2054
+ ),
2055
+ ],
2056
+ }),
2057
+ };
2058
+ },
2059
+ },
1990
2060
 
1991
- 'shoutem.ui.Switch': {
1992
- container: {
1993
- borderRadius: 15,
1994
- height: 18,
1995
- marginVertical: 7,
1996
- paddingHorizontal: 2,
1997
- paddingVertical: 2,
1998
- width: 32,
2061
+ thumb: {
2062
+ backgroundColor: resolveVariable('paperColor'),
2063
+ borderRadius: 7,
2064
+ height: 14,
2065
+ width: 14,
1999
2066
 
2000
- muteAnimation(driver) {
2001
- return {
2002
- backgroundColor: driver.interpolate({
2003
- inputRange: [0, 1],
2004
- outputRange: [
2005
- inverseColorBrightnessForAmount(variables.paperColor, 15),
2006
- changeColorAlpha(variables.secondaryButtonBackgroundColor, 1),
2067
+ turnAnimation(driver, { layout, animationOptions }) {
2068
+ const { x, width } = layout;
2069
+ return {
2070
+ transform: [
2071
+ {
2072
+ translateX: driver.interpolate({
2073
+ inputRange: [0, 1],
2074
+ outputRange: [
2075
+ 0,
2076
+ animationOptions.containerWidth - width - 2 * x,
2077
+ ],
2078
+ }),
2079
+ },
2007
2080
  ],
2008
- }),
2009
- };
2081
+ };
2082
+ },
2010
2083
  },
2011
2084
  },
2012
2085
 
2013
- thumb: {
2014
- backgroundColor: variables.paperColor,
2015
- borderRadius: 7,
2016
- height: 14,
2017
- width: 14,
2018
-
2019
- turnAnimation(driver, { layout, animationOptions }) {
2020
- const { x, width } = layout;
2021
- return {
2022
- transform: [
2023
- {
2024
- translateX: driver.interpolate({
2025
- inputRange: [0, 1],
2026
- outputRange: [
2027
- 0,
2028
- animationOptions.containerWidth - width - 2 * x,
2029
- ],
2030
- }),
2031
- },
2032
- ],
2033
- };
2034
- },
2035
- },
2036
- },
2037
-
2038
- 'shoutem.ui.DropDownMenu': {
2039
- '.horizontal': {
2040
- horizontalContainer: {
2041
- minHeight: 40,
2042
- maxHeight: 200,
2043
- justifyContent: 'center',
2044
- backgroundColor:
2045
- variables.categoryDropdownBackgroundColor ||
2046
- inverseColorBrightnessForAmount(variables.paperColor, 5),
2047
- width: window.width,
2048
- marginTop: 0,
2049
- borderBottomWidth: StyleSheet.hairlineWidth,
2050
- borderColor: variables.navBarBorderColor,
2051
- },
2052
- selectedOption: {
2053
- 'shoutem.ui.Icon': {
2054
- color: variables.categoryDropdownTextColor || variables.text.color,
2055
- },
2056
- 'shoutem.ui.Text': {
2057
- ...variables.navBarText,
2058
- fontFamily: resolveFontFamily(
2059
- variables.navBarText.fontFamily,
2060
- 'normal',
2061
- variables.navBarText.fontStyle,
2062
- ),
2063
- color: variables.categoryDropdownTextColor || variables.text.color,
2064
- fontWeight: resolveFontWeight('normal'),
2065
- fontStyle: resolveFontStyle(variables.navBarText.fontStyle),
2066
- textAlign: 'center',
2067
- },
2068
- },
2069
- },
2070
-
2071
- '.featured': {
2086
+ 'shoutem.ui.DropDownMenu': {
2072
2087
  '.horizontal': {
2073
2088
  horizontalContainer: {
2074
- [INCLUDE]: ['dimmedFeaturedBackground'],
2075
- borderBottomWidth: 0,
2089
+ minHeight: 40,
2090
+ maxHeight: 200,
2091
+ justifyContent: 'center',
2092
+ backgroundColor:
2093
+ resolveVariable('categoryDropdownBackgroundColor') ||
2094
+ inverseColorBrightnessForAmount(resolveVariable('paperColor'), 5),
2095
+ width: window.width,
2096
+ marginTop: 0,
2097
+ borderBottomWidth: StyleSheet.hairlineWidth,
2098
+ borderColor: resolveVariable('navBarBorderColor'),
2076
2099
  },
2077
2100
  selectedOption: {
2078
2101
  'shoutem.ui.Icon': {
2079
- color: variables.featuredNavBarTitleColor,
2102
+ color:
2103
+ resolveVariable('categoryDropdownTextColor') ||
2104
+ resolveVariable('text.color'),
2080
2105
  },
2081
2106
  'shoutem.ui.Text': {
2082
- color: variables.featuredNavBarTitleColor,
2107
+ ...resolveVariable('navBarText'),
2108
+ fontFamily: resolveFontFamily(
2109
+ resolveVariable('navBarText.fontFamily'),
2110
+ 'normal',
2111
+ resolveVariable('navBarText.fontStyle'),
2112
+ ),
2113
+ color:
2114
+ resolveVariable('categoryDropdownTextColor') ||
2115
+ resolveVariable('text.color'),
2116
+ fontWeight: resolveFontWeight('normal'),
2117
+ fontStyle: resolveFontStyle(
2118
+ resolveVariable('navBarText.fontStyle'),
2119
+ ),
2120
+ textAlign: 'center',
2083
2121
  },
2084
2122
  },
2085
2123
  },
2086
- },
2087
2124
 
2088
- '.navBar': {
2089
- selectedOption: {
2090
- 'shoutem.ui.Icon': {
2091
- color: variables.navBarIconsColor,
2092
- },
2093
- 'shoutem.ui.Text': {
2094
- ...variables.navBarText,
2095
- fontFamily: resolveFontFamily(
2096
- variables.navBarText.fontFamily,
2097
- 'normal',
2098
- variables.navBarText.fontStyle,
2099
- ),
2100
- fontWeight: resolveFontWeight('normal'),
2101
- fontStyle: resolveFontStyle(variables.navBarText.fontStyle),
2102
- color: variables.navBarIconsColor,
2125
+ '.featured': {
2126
+ '.horizontal': {
2127
+ horizontalContainer: {
2128
+ [INCLUDE]: ['dimmedFeaturedBackground'],
2129
+ borderBottomWidth: 0,
2130
+ },
2131
+ selectedOption: {
2132
+ 'shoutem.ui.Icon': {
2133
+ color: resolveVariable('featuredNavBarTitleColor'),
2134
+ },
2135
+ 'shoutem.ui.Text': {
2136
+ color: resolveVariable('featuredNavBarTitleColor'),
2137
+ },
2138
+ },
2103
2139
  },
2104
2140
  },
2105
- },
2106
-
2107
- '.large': {
2108
- horizontalContainer: {
2109
- alignItems: 'flex-end',
2110
- borderColor: variables.shadowColor,
2111
- borderWidth: 1,
2112
- borderRightWidth: 0,
2113
- height: 40,
2114
- width: 175,
2115
- },
2116
2141
 
2117
- selectedOption: {
2118
- 'shoutem.ui.Text': {
2119
- flex: 1,
2120
- textAlign: 'center',
2121
- margin: 0,
2142
+ '.navBar': {
2143
+ selectedOption: {
2144
+ 'shoutem.ui.Icon': {
2145
+ color: resolveVariable('navBarIconsColor'),
2146
+ },
2147
+ 'shoutem.ui.Text': {
2148
+ ...resolveVariable('navBarText'),
2149
+ fontFamily: resolveFontFamily(
2150
+ resolveVariable('navBarText.fontFamily'),
2151
+ 'normal',
2152
+ resolveVariable('navBarText.fontStyle'),
2153
+ ),
2154
+ fontWeight: resolveFontWeight('normal'),
2155
+ fontStyle: resolveFontStyle(
2156
+ resolveVariable('navBarText.fontStyle'),
2157
+ ),
2158
+ color: resolveVariable('navBarIconsColor'),
2159
+ },
2122
2160
  },
2161
+ },
2123
2162
 
2124
- 'shoutem.ui.Icon': {
2125
- backgroundColor: variables.secondaryButtonBackgroundColor,
2126
- borderColor: variables.secondaryButtonBorderColor,
2127
- borderRadius: 2,
2163
+ '.large': {
2164
+ horizontalContainer: {
2165
+ alignItems: 'flex-end',
2166
+ borderColor: resolveVariable('shadowColor'),
2128
2167
  borderWidth: 1,
2129
- color: variables.secondaryButtonTextColor,
2168
+ borderRightWidth: 0,
2130
2169
  height: 40,
2131
- paddingVertical: 8,
2132
- width: 40,
2170
+ width: 175,
2133
2171
  },
2134
2172
 
2135
- padding: 0,
2136
- // Compensate to cover the top border
2137
- marginTop: -1,
2138
- },
2139
- },
2173
+ selectedOption: {
2174
+ 'shoutem.ui.Text': {
2175
+ flex: 1,
2176
+ textAlign: 'center',
2177
+ margin: 0,
2178
+ },
2140
2179
 
2141
- selectedOption: {
2142
- // Button
2143
- [INCLUDE]: ['clearButton', 'textualButton'],
2180
+ 'shoutem.ui.Icon': {
2181
+ backgroundColor: resolveVariable('secondaryButtonBackgroundColor'),
2182
+ borderColor: resolveVariable('secondaryButtonBorderColor'),
2183
+ borderRadius: 2,
2184
+ borderWidth: 1,
2185
+ color: resolveVariable('secondaryButtonTextColor'),
2186
+ height: 40,
2187
+ paddingVertical: 8,
2188
+ width: 40,
2189
+ },
2144
2190
 
2145
- 'shoutem.ui.Icon': {
2146
- marginRight: 0,
2191
+ padding: 0,
2192
+ // Compensate to cover the top border
2193
+ marginTop: -1,
2194
+ },
2147
2195
  },
2148
2196
 
2149
- 'shoutem.ui.Text': {
2150
- marginRight: 0,
2151
- },
2152
- },
2153
- },
2197
+ selectedOption: {
2198
+ // Button
2199
+ [INCLUDE]: ['clearButton', 'textualButton'],
2154
2200
 
2155
- 'shoutem.ui.DropDownModal': {
2156
- modal: {
2157
- 'shoutem.ui.Button.close': {
2158
2201
  'shoutem.ui.Icon': {
2159
- color: changeColorAlpha(variables.subtitle.color, 0.5),
2160
- width: 24,
2161
- height: 24,
2202
+ marginRight: 0,
2162
2203
  },
2163
2204
 
2164
- position: 'absolute',
2165
- bottom: 25,
2166
- left: 0,
2167
- right: 0,
2205
+ 'shoutem.ui.Text': {
2206
+ marginRight: 0,
2207
+ },
2168
2208
  },
2169
-
2170
- flex: 1,
2171
- justifyContent: 'center',
2172
- alignItems: 'center',
2173
- paddingVertical: 20,
2174
- backgroundColor: changeColorAlpha(variables.backgroundColor, 0.97),
2175
2209
  },
2176
2210
 
2177
- modalItem: {
2178
- 'shoutem.ui.Text': {
2179
- textAlign: 'center',
2180
- flex: 1,
2181
- width: window.width,
2182
- paddingHorizontal: 20,
2183
- paddingVertical: 23,
2184
- alignSelf: 'stretch',
2185
- ...variables.subtitle,
2186
- fontFamily: resolveFontFamily(
2187
- variables.subtitle.fontFamily,
2188
- variables.subtitle.fontWeight,
2189
- variables.subtitle.fontStyle,
2190
- ),
2191
- fontWeight: resolveFontWeight(variables.subtitle.fontWeight),
2192
- fontStyle: resolveFontStyle(variables.subtitle.fontStyle),
2193
- },
2194
- },
2195
- selectedModalItem: {
2196
- 'shoutem.ui.Text': {
2197
- textAlign: 'center',
2211
+ 'shoutem.ui.DropDownModal': {
2212
+ modal: {
2213
+ 'shoutem.ui.Button.close': {
2214
+ 'shoutem.ui.Icon': {
2215
+ color: changeColorAlpha(resolveVariable('subtitle.color'), 0.5),
2216
+ width: 24,
2217
+ height: 24,
2218
+ },
2219
+
2220
+ position: 'absolute',
2221
+ bottom: 25,
2222
+ left: 0,
2223
+ right: 0,
2224
+ },
2225
+
2198
2226
  flex: 1,
2199
- width: window.width,
2200
- paddingHorizontal: 20,
2201
- paddingVertical: 23,
2202
- alignSelf: 'stretch',
2203
- ...variables.subtitle,
2204
- fontFamily: resolveFontFamily(
2205
- variables.subtitle.fontFamily,
2206
- '500',
2207
- variables.subtitle.fontStyle,
2227
+ justifyContent: 'center',
2228
+ alignItems: 'center',
2229
+ paddingVertical: 20,
2230
+ backgroundColor: changeColorAlpha(
2231
+ resolveVariable('backgroundColor'),
2232
+ 0.97,
2208
2233
  ),
2209
- fontWeight: resolveFontWeight('500'),
2210
- fontStyle: resolveFontStyle(variables.subtitle.fontStyle),
2211
2234
  },
2212
- },
2213
-
2214
- visibleOptions: 8,
2215
- },
2216
2235
 
2217
- //
2218
- // Html
2219
- //
2220
- textBlock: {
2221
- // Inline element
2222
- container: {
2223
- '.wrapper': {
2224
- marginBottom: 0,
2236
+ modalItem: {
2237
+ 'shoutem.ui.Text': {
2238
+ textAlign: 'center',
2239
+ flex: 1,
2240
+ width: window.width,
2241
+ paddingHorizontal: 20,
2242
+ paddingVertical: 23,
2243
+ alignSelf: 'stretch',
2244
+ ...resolveVariable('subtitle'),
2245
+ fontFamily: resolveFontFamily(
2246
+ resolveVariable('subtitle.fontFamily'),
2247
+ resolveVariable('subtitle.fontWeight'),
2248
+ resolveVariable('subtitle.fontStyle'),
2249
+ ),
2250
+ fontWeight: resolveFontWeight(resolveVariable('subtitle.fontWeight')),
2251
+ fontStyle: resolveFontStyle(resolveVariable('subtitle.fontStyle')),
2252
+ },
2225
2253
  },
2226
- '.block': {
2227
- marginBottom: 20,
2254
+ selectedModalItem: {
2255
+ 'shoutem.ui.Text': {
2256
+ textAlign: 'center',
2257
+ flex: 1,
2258
+ width: window.width,
2259
+ paddingHorizontal: 20,
2260
+ paddingVertical: 23,
2261
+ alignSelf: 'stretch',
2262
+ ...resolveVariable('subtitle'),
2263
+ fontFamily: resolveFontFamily(
2264
+ resolveVariable('subtitle.fontFamily'),
2265
+ '500',
2266
+ resolveVariable('subtitle.fontStyle'),
2267
+ ),
2268
+ fontWeight: resolveFontWeight('500'),
2269
+ fontStyle: resolveFontStyle(resolveVariable('subtitle.fontStyle')),
2270
+ },
2228
2271
  },
2272
+
2273
+ visibleOptions: 8,
2229
2274
  },
2230
- text: {},
2231
- },
2232
- 'shoutem.ui.SimpleHtml': {
2233
- container: {
2234
- padding: variables.mediumGutter,
2235
- },
2236
- video: {
2237
- // 16:9 ratio covers majority of YouTube videos
2238
- width: dimensionRelativeToIphone(345),
2239
- height: dimensionRelativeToIphone(194),
2240
- paddingBottom: variables.smallGutter,
2241
- },
2242
- fallback: {
2243
- width: window.width,
2244
- height: 40,
2245
- },
2246
- },
2247
- 'shoutem.ui.Html': {
2248
- container: {
2249
- backgroundColor: variables.paperColor,
2250
- padding: variables.mediumGutter,
2251
- },
2252
- // HTML Inline elements
2253
- b: {
2254
- [INCLUDE]: ['textBlock'],
2255
- text: {
2256
- [INCLUDE]: ['boldTextStyle'],
2275
+
2276
+ //
2277
+ // Html
2278
+ //
2279
+ textBlock: {
2280
+ // Inline element
2281
+ container: {
2282
+ '.wrapper': {
2283
+ marginBottom: 0,
2284
+ },
2285
+ '.block': {
2286
+ marginBottom: 20,
2287
+ },
2257
2288
  },
2289
+ text: {},
2258
2290
  },
2259
- strong: {
2260
- [INCLUDE]: ['textBlock'],
2261
- container: {},
2262
- text: {
2263
- [INCLUDE]: ['boldTextStyle'],
2291
+ 'shoutem.ui.SimpleHtml': {
2292
+ container: {
2293
+ padding: resolveVariable('mediumGutter'),
2264
2294
  },
2265
- },
2266
- i: {
2267
- [INCLUDE]: ['textBlock'],
2268
- text: {
2269
- [INCLUDE]: ['italicTextStyle'],
2295
+ video: {
2296
+ // 16:9 ratio covers majority of YouTube videos
2297
+ width: dimensionRelativeToIphone(345),
2298
+ height: dimensionRelativeToIphone(194),
2299
+ paddingBottom: resolveVariable('smallGutter'),
2270
2300
  },
2271
- },
2272
- em: {
2273
- [INCLUDE]: ['textBlock'],
2274
- text: {
2275
- [INCLUDE]: ['italicTextStyle'],
2301
+ fallback: {
2302
+ width: window.width,
2303
+ height: 40,
2276
2304
  },
2277
2305
  },
2278
- pre: {
2279
- [INCLUDE]: ['textBlock'],
2280
- text: {
2281
- [INCLUDE]: ['codeTextStyle'],
2306
+ 'shoutem.ui.Html': {
2307
+ container: {
2308
+ backgroundColor: resolveVariable('paperColor'),
2309
+ padding: resolveVariable('mediumGutter'),
2310
+ },
2311
+ // HTML Inline elements
2312
+ b: {
2313
+ [INCLUDE]: ['textBlock'],
2314
+ text: {
2315
+ [INCLUDE]: ['boldTextStyle'],
2316
+ },
2282
2317
  },
2283
- },
2284
- code: {
2285
- [INCLUDE]: ['textBlock'],
2286
- text: {
2287
- [INCLUDE]: ['codeTextStyle'],
2318
+ strong: {
2319
+ [INCLUDE]: ['textBlock'],
2320
+ container: {},
2321
+ text: {
2322
+ [INCLUDE]: ['boldTextStyle'],
2323
+ },
2324
+ },
2325
+ i: {
2326
+ [INCLUDE]: ['textBlock'],
2327
+ text: {
2328
+ [INCLUDE]: ['italicTextStyle'],
2329
+ },
2330
+ },
2331
+ em: {
2332
+ [INCLUDE]: ['textBlock'],
2333
+ text: {
2334
+ [INCLUDE]: ['italicTextStyle'],
2335
+ },
2336
+ },
2337
+ pre: {
2338
+ [INCLUDE]: ['textBlock'],
2339
+ text: {
2340
+ [INCLUDE]: ['codeTextStyle'],
2341
+ },
2342
+ },
2343
+ code: {
2344
+ [INCLUDE]: ['textBlock'],
2345
+ text: {
2346
+ [INCLUDE]: ['codeTextStyle'],
2347
+ },
2348
+ },
2349
+ a: {
2350
+ [INCLUDE]: ['textBlock'],
2351
+ text: {},
2288
2352
  },
2289
- },
2290
- a: {
2291
- [INCLUDE]: ['textBlock'],
2292
- text: {},
2293
- },
2294
2353
 
2295
- // TextBlock elements
2296
- h1: {
2297
- [INCLUDE]: ['textBlock'],
2298
- container: {},
2299
- text: {
2300
- color: '#000',
2301
- fontSize: 28,
2354
+ // TextBlock elements
2355
+ h1: {
2356
+ [INCLUDE]: ['textBlock'],
2357
+ container: {},
2358
+ text: {
2359
+ color: '#000',
2360
+ fontSize: 28,
2361
+ },
2302
2362
  },
2303
- },
2304
- h2: {
2305
- [INCLUDE]: ['textBlock'],
2306
- container: {},
2307
- text: {
2308
- color: '#000',
2309
- fontSize: 24,
2363
+ h2: {
2364
+ [INCLUDE]: ['textBlock'],
2365
+ container: {},
2366
+ text: {
2367
+ color: '#000',
2368
+ fontSize: 24,
2369
+ },
2310
2370
  },
2311
- },
2312
- h3: {
2313
- [INCLUDE]: ['textBlock'],
2314
- container: {},
2315
- text: {
2316
- fontWeight: '900',
2317
- color: '#000',
2318
- fontSize: 18,
2371
+ h3: {
2372
+ [INCLUDE]: ['textBlock'],
2373
+ container: {},
2374
+ text: {
2375
+ fontWeight: '900',
2376
+ color: '#000',
2377
+ fontSize: 18,
2378
+ },
2319
2379
  },
2320
- },
2321
- h4: {
2322
- [INCLUDE]: ['textBlock'],
2323
- container: {},
2324
- text: {
2325
- fontWeight: '700',
2326
- color: '#000',
2327
- fontSize: 16,
2380
+ h4: {
2381
+ [INCLUDE]: ['textBlock'],
2382
+ container: {},
2383
+ text: {
2384
+ fontWeight: '700',
2385
+ color: '#000',
2386
+ fontSize: 16,
2387
+ },
2328
2388
  },
2329
- },
2330
- h5: {
2331
- [INCLUDE]: ['textBlock'],
2332
- container: {},
2333
- text: {
2334
- fontWeight: '500',
2335
- color: '#000',
2336
- fontSize: 14,
2389
+ h5: {
2390
+ [INCLUDE]: ['textBlock'],
2391
+ container: {},
2392
+ text: {
2393
+ fontWeight: '500',
2394
+ color: '#000',
2395
+ fontSize: 14,
2396
+ },
2337
2397
  },
2338
- },
2339
- h6: {
2340
- [INCLUDE]: ['textBlock'],
2341
- container: {},
2342
- text: {
2343
- fontWeight: '500',
2344
- color: '#000',
2345
- fontSize: 14,
2398
+ h6: {
2399
+ [INCLUDE]: ['textBlock'],
2400
+ container: {},
2401
+ text: {
2402
+ fontWeight: '500',
2403
+ color: '#000',
2404
+ fontSize: 14,
2405
+ },
2346
2406
  },
2347
- },
2348
- p: {
2349
- [INCLUDE]: ['textBlock'],
2350
- container: {},
2351
- text: {
2352
- [INCLUDE]: ['shoutem.ui.Text', 'multilineTextStyle'],
2407
+ p: {
2408
+ [INCLUDE]: ['textBlock'],
2409
+ container: {},
2410
+ text: {
2411
+ [INCLUDE]: ['shoutem.ui.Text', 'multilineTextStyle'],
2412
+ },
2413
+ },
2414
+ div: {
2415
+ [INCLUDE]: ['textBlock'],
2353
2416
  },
2354
- },
2355
- div: {
2356
- [INCLUDE]: ['textBlock'],
2357
- },
2358
2417
 
2359
- // HTML lists
2360
- ul: {
2361
- container: {},
2362
- },
2363
- ol: {
2364
- container: {},
2365
- },
2366
- number: {
2367
- // Font should be monospace so that item content has same offset
2368
- // Can not apply width to the Text for some reason
2369
- fontFamily: Platform.OS === 'ios' ? 'Menlo-Regular' : 'monospace',
2370
- fontSize: 12,
2371
- },
2372
- bullet: {},
2373
- li: {
2374
- // Inline element
2375
- [INCLUDE]: ['textBlock'],
2376
- container: {
2377
- '.block': {
2378
- marginBottom: 10,
2418
+ // HTML lists
2419
+ ul: {
2420
+ container: {},
2421
+ },
2422
+ ol: {
2423
+ container: {},
2424
+ },
2425
+ number: {
2426
+ // Font should be monospace so that item content has same offset
2427
+ // Can not apply width to the Text for some reason
2428
+ fontFamily: Platform.OS === 'ios' ? 'Menlo-Regular' : 'monospace',
2429
+ fontSize: 12,
2430
+ },
2431
+ bullet: {},
2432
+ li: {
2433
+ // Inline element
2434
+ [INCLUDE]: ['textBlock'],
2435
+ container: {
2436
+ '.block': {
2437
+ marginBottom: 10,
2438
+ },
2379
2439
  },
2380
2440
  },
2381
- },
2382
2441
 
2383
- // HTML containers
2384
- section: {},
2385
- header: {},
2386
- content: {},
2387
- article: {},
2388
- footer: {},
2442
+ // HTML containers
2443
+ section: {},
2444
+ header: {},
2445
+ content: {},
2446
+ article: {},
2447
+ footer: {},
2389
2448
 
2390
- // HTML functional
2391
- video: {
2392
- container: {
2393
- // html/components/Image
2394
- // Used to keep video ratio by thumbnail.
2395
- // Must have width.
2396
- width: 300,
2449
+ // HTML functional
2450
+ video: {
2451
+ container: {
2452
+ // html/components/Image
2453
+ // Used to keep video ratio by thumbnail.
2454
+ // Must have width.
2455
+ width: 300,
2456
+ alignSelf: 'center',
2457
+ marginBottom: 20,
2458
+ },
2459
+ },
2460
+ img: {
2397
2461
  alignSelf: 'center',
2398
2462
  marginBottom: 20,
2463
+ // Image height is calculated to respect
2464
+ // image ratio depending on width.
2465
+ // If both width and height are defined
2466
+ // image dimensions are fixed.
2467
+ // If image width is smaller then style width
2468
+ // it will not rescale.
2469
+ width: 300,
2399
2470
  },
2400
2471
  },
2401
- img: {
2402
- alignSelf: 'center',
2403
- marginBottom: 20,
2404
- // Image height is calculated to respect
2405
- // image ratio depending on width.
2406
- // If both width and height are defined
2407
- // image dimensions are fixed.
2408
- // If image width is smaller then style width
2409
- // it will not rescale.
2410
- width: 300,
2411
- },
2412
- },
2413
2472
 
2414
- 'shoutem.ui.Video': {
2415
- container: {
2416
- backgroundColor: variables.paperColor,
2417
- flex: 1,
2418
- height: 240,
2473
+ 'shoutem.ui.Video': {
2474
+ container: {
2475
+ backgroundColor: resolveVariable('paperColor'),
2476
+ flex: 1,
2477
+ height: 240,
2478
+ },
2419
2479
  },
2420
- },
2421
2480
 
2422
- //
2423
- // HorizontalPager
2424
- //
2481
+ //
2482
+ // HorizontalPager
2483
+ //
2425
2484
 
2426
- 'shoutem.ui.HorizontalPager': {
2427
- container: {
2428
- flexGrow: 1,
2429
- },
2430
- scrollView: {
2431
- flexGrow: 1,
2432
- backgroundColor: 'transparent',
2433
- overflow: 'scroll',
2434
- },
2435
- page: {
2436
- flexGrow: 1,
2437
- backgroundColor: 'transparent',
2485
+ 'shoutem.ui.HorizontalPager': {
2486
+ container: {
2487
+ flexGrow: 1,
2488
+ },
2489
+ scrollView: {
2490
+ flexGrow: 1,
2491
+ backgroundColor: 'transparent',
2492
+ overflow: 'scroll',
2493
+ },
2494
+ page: {
2495
+ flexGrow: 1,
2496
+ backgroundColor: 'transparent',
2497
+ },
2498
+ nextPageInsetSize: 20,
2438
2499
  },
2439
- nextPageInsetSize: 20,
2440
- },
2441
2500
 
2442
- //
2443
- // PageIndicators
2444
- //
2501
+ //
2502
+ // PageIndicators
2503
+ //
2445
2504
 
2446
- 'shoutem.ui.PageIndicators': {
2447
- '.overlay-bottom': {
2448
- container: {
2449
- backgroundGradient: {
2450
- colors: ['rgba(0, 0, 0, 0.0)', 'rgba(0, 0, 0, 0.25)'],
2505
+ 'shoutem.ui.PageIndicators': {
2506
+ '.overlay-bottom': {
2507
+ container: {
2508
+ backgroundGradient: {
2509
+ colors: ['rgba(0, 0, 0, 0.0)', 'rgba(0, 0, 0, 0.25)'],
2510
+ },
2511
+ paddingVertical: 8,
2512
+ position: 'absolute',
2513
+ bottom: 0,
2514
+ left: 0,
2515
+ right: 0,
2451
2516
  },
2452
- paddingVertical: 8,
2453
- position: 'absolute',
2454
- bottom: 0,
2455
- left: 0,
2456
- right: 0,
2457
- },
2458
2517
 
2459
- indicatorContainer: {
2460
- 'shoutem.ui.View': {
2461
- backgroundColor: '#ffffff',
2518
+ indicatorContainer: {
2519
+ 'shoutem.ui.View': {
2520
+ backgroundColor: '#ffffff',
2462
2521
 
2463
- '.selected': {
2464
- backgroundColor: changeColorAlpha('#ffffff', 0.7),
2522
+ '.selected': {
2523
+ backgroundColor: changeColorAlpha('#ffffff', 0.7),
2524
+ },
2465
2525
  },
2466
2526
  },
2467
2527
  },
2468
- },
2469
2528
 
2470
- '.relative': {
2529
+ '.relative': {
2530
+ container: {
2531
+ flexDirection: 'row',
2532
+ alignItems: 'center',
2533
+ justifyContent: 'center',
2534
+ position: 'relative',
2535
+ bottom: 0,
2536
+ paddingVertical: 16,
2537
+ },
2538
+ },
2539
+
2471
2540
  container: {
2472
2541
  flexDirection: 'row',
2473
2542
  alignItems: 'center',
2474
2543
  justifyContent: 'center',
2475
- position: 'relative',
2476
- bottom: 0,
2477
- paddingVertical: 16,
2478
- },
2544
+ position: 'absolute',
2545
+ left: 0,
2546
+ right: 0,
2547
+ bottom: 10,
2548
+ },
2549
+ indicatorContainer: {
2550
+ alignItems: 'center',
2551
+ 'shoutem.ui.View': {
2552
+ width: resolveVariable('galleryDotSize'),
2553
+ height: resolveVariable('galleryDotSize'),
2554
+ borderRadius: resolveVariable('galleryDotSize') / 2,
2555
+ // TODO - confirm opacity
2556
+ backgroundColor: changeColorAlpha(
2557
+ resolveVariable('indicatorColor'),
2558
+ 0.7,
2559
+ ),
2560
+ marginLeft: resolveVariable('galleryDotSize') / 2,
2561
+ marginRight: resolveVariable('galleryDotSize') / 2,
2562
+ '.selected': {
2563
+ backgroundColor: resolveVariable('indicatorColor'),
2564
+ },
2565
+ },
2566
+ },
2479
2567
  },
2480
2568
 
2481
- container: {
2482
- flexDirection: 'row',
2483
- alignItems: 'center',
2484
- justifyContent: 'center',
2485
- position: 'absolute',
2486
- left: 0,
2487
- right: 0,
2488
- bottom: 10,
2489
- },
2490
- indicatorContainer: {
2491
- alignItems: 'center',
2492
- 'shoutem.ui.View': {
2493
- width: variables.galleryDotSize,
2494
- height: variables.galleryDotSize,
2495
- borderRadius: variables.galleryDotSize / 2,
2496
- // TODO - confirm opacity
2497
- backgroundColor: changeColorAlpha(variables.indicatorColor, 0.7),
2498
- marginLeft: variables.galleryDotSize / 2,
2499
- marginRight: variables.galleryDotSize / 2,
2500
- '.selected': {
2501
- backgroundColor: variables.indicatorColor,
2569
+ //
2570
+ // InlineGallery
2571
+ //
2572
+ 'shoutem.ui.InlineGallery': {
2573
+ '.large-ultra-wide': {
2574
+ container: {
2575
+ height: dimensionRelativeToIphone(130),
2502
2576
  },
2503
2577
  },
2504
- },
2505
- },
2506
2578
 
2507
- //
2508
- // InlineGallery
2509
- //
2510
- 'shoutem.ui.InlineGallery': {
2511
- '.large-ultra-wide': {
2512
- container: {
2513
- height: dimensionRelativeToIphone(130),
2579
+ '.large-banner': {
2580
+ container: {
2581
+ height: dimensionRelativeToIphone(200),
2582
+ },
2514
2583
  },
2515
- },
2516
2584
 
2517
- '.large-banner': {
2518
- container: {
2519
- height: dimensionRelativeToIphone(200),
2585
+ '.large-wide': {
2586
+ container: {
2587
+ height: dimensionRelativeToIphone(238),
2588
+ },
2520
2589
  },
2521
- },
2522
2590
 
2523
- '.large-wide': {
2524
- container: {
2525
- height: dimensionRelativeToIphone(238),
2591
+ '.large-square': {
2592
+ container: {
2593
+ height: dimensionRelativeToIphone(375),
2594
+ },
2526
2595
  },
2527
- },
2528
2596
 
2529
- '.large-square': {
2530
2597
  container: {
2531
- height: dimensionRelativeToIphone(375),
2598
+ height: dimensionRelativeToIphone(345),
2532
2599
  },
2533
- },
2534
-
2535
- container: {
2536
- height: dimensionRelativeToIphone(345),
2537
- },
2538
2600
 
2539
- imageContainer: {},
2601
+ imageContainer: {},
2540
2602
 
2541
- image: {},
2542
-
2543
- pager: {
2544
- pageMargin: 20,
2545
- },
2546
- },
2603
+ image: {},
2547
2604
 
2548
- //
2549
- // ImageGallery
2550
- //
2551
- 'shoutem.ui.ImageGallery': {
2552
- [INCLUDE]: ['guttersPadding'],
2553
- pageMargin: 20,
2554
- container: {
2555
- flexGrow: 1,
2556
- backgroundColor: '#000000',
2557
- lightsOffAnimation(driver) {
2558
- return {
2559
- backgroundColor: driver.interpolate({
2560
- inputRange: [0, 1],
2561
- outputRange: [variables.paperColor, '#000000'],
2562
- }),
2563
- };
2605
+ pager: {
2606
+ pageMargin: 20,
2564
2607
  },
2565
2608
  },
2566
- page: {
2567
- flexGrow: 1,
2568
- justifyContent: 'center',
2569
- overflow: 'hidden',
2570
- },
2571
- },
2572
2609
 
2573
- 'shoutem.ui.ImageGalleryOverlay': {
2574
- '.full-screen': {
2575
- title: {
2576
- container: {
2577
- // We want the title background gradient to be
2578
- // visible underneath the navigation bar, but the
2579
- // title text should be rendered below the
2580
- // navigation bar.
2581
- paddingTop: NAVIGATION_BAR_HEIGHT + variables.mediumGutter,
2610
+ //
2611
+ // ImageGallery
2612
+ //
2613
+ 'shoutem.ui.ImageGallery': {
2614
+ [INCLUDE]: ['guttersPadding'],
2615
+ pageMargin: 20,
2616
+ container: {
2617
+ flexGrow: 1,
2618
+ backgroundColor: '#000000',
2619
+ lightsOffAnimation(driver) {
2620
+ return {
2621
+ backgroundColor: driver.interpolate({
2622
+ inputRange: [0, 1],
2623
+ outputRange: [resolveVariable('paperColor'), '#000000'],
2624
+ }),
2625
+ };
2582
2626
  },
2583
2627
  },
2628
+ page: {
2629
+ flexGrow: 1,
2630
+ justifyContent: 'center',
2631
+ overflow: 'hidden',
2632
+ },
2584
2633
  },
2585
2634
 
2586
- container: {
2587
- [INCLUDE]: ['fillParent'],
2588
- },
2589
- title: {
2590
- container: {
2591
- position: 'absolute',
2592
- top: 0,
2593
- left: 0,
2594
- right: 0,
2595
- paddingTop: variables.mediumGutter,
2596
- paddingHorizontal: variables.mediumGutter,
2597
-
2598
- backgroundGradient: {
2599
- colors: ['rgba(0, 0, 0, 0.6)', 'rgba(0, 0, 0, 0.0)'],
2600
- locations: [0.17, 1.0],
2635
+ 'shoutem.ui.ImageGalleryOverlay': {
2636
+ '.full-screen': {
2637
+ title: {
2638
+ container: {
2639
+ // We want the title background gradient to be
2640
+ // visible underneath the navigation bar, but the
2641
+ // title text should be rendered below the
2642
+ // navigation bar.
2643
+ paddingTop: NAVIGATION_BAR_HEIGHT + resolveVariable('mediumGutter'),
2644
+ },
2601
2645
  },
2602
2646
  },
2603
- text: {
2604
- color: variables.imageOverlayTextColor,
2605
- textAlign: 'center',
2606
- },
2607
- },
2608
- description: {
2647
+
2609
2648
  container: {
2610
- '.expanded': {
2611
- paddingTop: variables.extraLargeGutter,
2649
+ [INCLUDE]: ['fillParent'],
2650
+ },
2651
+ title: {
2652
+ container: {
2653
+ position: 'absolute',
2654
+ top: 0,
2655
+ left: 0,
2656
+ right: 0,
2657
+ paddingTop: resolveVariable('mediumGutter'),
2658
+ paddingHorizontal: resolveVariable('mediumGutter'),
2612
2659
 
2613
2660
  backgroundGradient: {
2614
- colors: ['rgba(0, 0, 0, 0.0)', 'rgba(0, 0, 0, 0.8)'],
2615
- locations: [0.36, 1.0],
2661
+ colors: ['rgba(0, 0, 0, 0.6)', 'rgba(0, 0, 0, 0.0)'],
2662
+ locations: [0.17, 1.0],
2616
2663
  },
2617
2664
  },
2618
- '.collapsed': {
2619
- paddingTop: variables.mediumGutter,
2665
+ text: {
2666
+ color: resolveVariable('imageOverlayTextColor'),
2667
+ textAlign: 'center',
2668
+ },
2669
+ },
2670
+ description: {
2671
+ container: {
2672
+ '.expanded': {
2673
+ paddingTop: resolveVariable('extraLargeGutter'),
2620
2674
 
2621
- backgroundGradient: {
2622
- colors: ['rgba(0, 0, 0, 0.0)', 'rgba(0, 0, 0, 0.6)'],
2623
- locations: [0.02, 1.0],
2675
+ backgroundGradient: {
2676
+ colors: ['rgba(0, 0, 0, 0.0)', 'rgba(0, 0, 0, 0.8)'],
2677
+ locations: [0.36, 1.0],
2678
+ },
2679
+ },
2680
+ '.collapsed': {
2681
+ paddingTop: resolveVariable('mediumGutter'),
2682
+
2683
+ backgroundGradient: {
2684
+ colors: ['rgba(0, 0, 0, 0.0)', 'rgba(0, 0, 0, 0.6)'],
2685
+ locations: [0.02, 1.0],
2686
+ },
2624
2687
  },
2688
+
2689
+ position: 'absolute',
2690
+ bottom: 0,
2691
+ left: 0,
2692
+ right: 0,
2693
+ },
2694
+
2695
+ scroll: {
2696
+ maxHeight: 200,
2697
+ padding: resolveVariable('mediumGutter'),
2625
2698
  },
2699
+ text: {
2700
+ color: resolveVariable('imageOverlayTextColor'),
2701
+ textAlign: 'center',
2702
+ },
2703
+ },
2704
+ },
2705
+
2706
+ // Action Sheet
2626
2707
 
2708
+ 'shoutem.ui.ActionSheet': {
2709
+ container: {
2627
2710
  position: 'absolute',
2711
+ top: 0,
2628
2712
  bottom: 0,
2629
2713
  left: 0,
2630
2714
  right: 0,
2715
+ flexDirection: 'column',
2716
+ justifyContent: 'flex-end',
2717
+ },
2718
+ contentContainer: {
2719
+ marginHorizontal: 8,
2720
+ paddingBottom: 34,
2721
+ backgroundColor: 'transparent',
2722
+ },
2723
+ segmentContainer: {
2724
+ overflow: 'hidden',
2725
+ backgroundColor: '#FFFFFF',
2726
+ borderRadius: 13,
2631
2727
  },
2728
+ },
2632
2729
 
2633
- scroll: {
2634
- maxHeight: 200,
2635
- padding: variables.mediumGutter,
2730
+ 'shoutem.ui.ActionSheetOption': {
2731
+ container: {
2732
+ paddingHorizontal: 20,
2733
+ paddingVertical: 16,
2734
+ borderBottomWidth: 1,
2735
+ borderColor: 'rgba(130, 130, 130, 0.1)',
2636
2736
  },
2637
2737
  text: {
2638
- color: variables.imageOverlayTextColor,
2738
+ fontSize: 15,
2739
+ letterSpacing: 0.38,
2740
+ color: '#000000',
2741
+ lineHeight: 24,
2742
+ },
2743
+ cancelText: {
2639
2744
  textAlign: 'center',
2745
+ fontWeight: resolveFontWeight('700'),
2640
2746
  },
2641
2747
  },
2642
- },
2643
-
2644
- // Action Sheet
2645
2748
 
2646
- 'shoutem.ui.ActionSheet': {
2647
- container: {
2648
- position: 'absolute',
2649
- top: 0,
2650
- bottom: 0,
2651
- left: 0,
2652
- right: 0,
2653
- flexDirection: 'column',
2654
- justifyContent: 'flex-end',
2655
- },
2656
- contentContainer: {
2657
- marginHorizontal: 8,
2658
- paddingBottom: 34,
2659
- backgroundColor: 'transparent',
2660
- },
2661
- segmentContainer: {
2662
- overflow: 'hidden',
2663
- backgroundColor: '#FFFFFF',
2664
- borderRadius: 13,
2665
- },
2666
- },
2667
-
2668
- 'shoutem.ui.ActionSheetOption': {
2669
- container: {
2670
- paddingHorizontal: 20,
2671
- paddingVertical: 16,
2672
- borderBottomWidth: 1,
2673
- borderColor: 'rgba(130, 130, 130, 0.1)',
2674
- },
2675
- text: {
2676
- fontSize: 15,
2677
- letterSpacing: 0.38,
2678
- color: '#000000',
2679
- lineHeight: 24,
2680
- },
2681
- cancelText: {
2682
- textAlign: 'center',
2683
- fontWeight: resolveFontWeight('700'),
2749
+ //
2750
+ // Other
2751
+ //
2752
+ 'shoutem.ui.ImagePreview': {
2753
+ container: {
2754
+ flex: 1,
2755
+ backgroundColor: 'transparent',
2756
+ },
2757
+ fullScreenContainer: {
2758
+ flex: 1,
2759
+ backgroundColor: 'black',
2760
+ },
2761
+ image: {
2762
+ flex: 1,
2763
+ },
2764
+ thumbnail: {},
2765
+ header: {
2766
+ position: 'absolute',
2767
+ top: STATUS_BAR_OFFSET,
2768
+ left: 0,
2769
+ backgroundColor: 'transparent',
2770
+ },
2771
+ closeIcon: {
2772
+ color: 'white',
2773
+ marginLeft: 15,
2774
+ marginTop: -STATUS_BAR_OFFSET + 20,
2775
+ height: 25,
2776
+ width: 25,
2777
+ },
2684
2778
  },
2685
- },
2686
2779
 
2687
- //
2688
- // Other
2689
- //
2690
- 'shoutem.ui.ImagePreview': {
2691
- container: {
2692
- flex: 1,
2693
- backgroundColor: 'transparent',
2694
- },
2695
- fullScreenContainer: {
2696
- flex: 1,
2697
- backgroundColor: 'black',
2698
- },
2699
- image: {
2780
+ 'shoutem.ui.MapView': {
2700
2781
  flex: 1,
2701
2782
  },
2702
- thumbnail: {},
2703
- header: {
2704
- position: 'absolute',
2705
- top: STATUS_BAR_OFFSET,
2706
- left: 0,
2707
- backgroundColor: 'transparent',
2708
- },
2709
- closeIcon: {
2710
- color: 'white',
2711
- marginLeft: 15,
2712
- marginTop: -STATUS_BAR_OFFSET + 20,
2713
- height: 25,
2714
- width: 25,
2715
- },
2716
- },
2717
2783
 
2718
- 'shoutem.ui.MapView': {
2719
- flex: 1,
2720
- },
2721
-
2722
- 'shoutem.ui.InlineMap': {
2723
- // TODO: why do we need all image sizes and styles here?
2724
- [INCLUDE]: ['imageSizes'],
2725
- '.top-aligned': {
2726
- justifyContent: 'flex-start',
2727
- },
2784
+ 'shoutem.ui.InlineMap': {
2785
+ // TODO: why do we need all image sizes and styles here?
2786
+ [INCLUDE]: ['imageSizes'],
2787
+ '.top-aligned': {
2788
+ justifyContent: 'flex-start',
2789
+ },
2728
2790
 
2729
- '.bottom-aligned': {
2730
- justifyContent: 'flex-end',
2731
- },
2791
+ '.bottom-aligned': {
2792
+ justifyContent: 'flex-end',
2793
+ },
2732
2794
 
2733
- '.medium-tall': {
2734
- height: 160,
2735
- },
2795
+ '.medium-tall': {
2796
+ height: 160,
2797
+ },
2736
2798
 
2737
- 'shoutem.ui.View': {
2738
2799
  'shoutem.ui.View': {
2739
2800
  'shoutem.ui.View': {
2740
- backgroundColor: variables.imageOverlayColor,
2741
- 'shoutem.ui.Heading': {
2742
- color: variables.imageOverlayTextColor,
2743
- marginVertical: 8,
2744
- },
2801
+ 'shoutem.ui.View': {
2802
+ backgroundColor: resolveVariable('imageOverlayColor'),
2803
+ 'shoutem.ui.Heading': {
2804
+ color: resolveVariable('imageOverlayTextColor'),
2805
+ marginVertical: 8,
2806
+ },
2745
2807
 
2746
- 'shoutem.ui.Title': {
2747
- color: variables.imageOverlayTextColor,
2748
- marginVertical: 12,
2749
- },
2808
+ 'shoutem.ui.Title': {
2809
+ color: resolveVariable('imageOverlayTextColor'),
2810
+ marginVertical: 12,
2811
+ },
2750
2812
 
2751
- 'shoutem.ui.Subtitle': {
2752
- color: variables.imageOverlayTextColor,
2753
- marginTop: 80,
2754
- },
2813
+ 'shoutem.ui.Subtitle': {
2814
+ color: resolveVariable('imageOverlayTextColor'),
2815
+ marginTop: 80,
2816
+ },
2755
2817
 
2756
- 'shoutem.ui.Caption': {
2757
- color: variables.imageOverlayTextColor,
2758
- marginTop: 5,
2759
- },
2818
+ 'shoutem.ui.Caption': {
2819
+ color: resolveVariable('imageOverlayTextColor'),
2820
+ marginTop: 5,
2821
+ },
2760
2822
 
2761
- 'shoutem.ui.Text': {
2762
- color: variables.imageOverlayTextColor,
2823
+ 'shoutem.ui.Text': {
2824
+ color: resolveVariable('imageOverlayTextColor'),
2825
+ },
2763
2826
  },
2764
- },
2765
2827
 
2766
- [INCLUDE]: ['fillParent'],
2828
+ [INCLUDE]: ['fillParent'],
2829
+ },
2767
2830
  },
2768
- },
2769
-
2770
- [INCLUDE]: ['commonVariants'],
2771
- flex: 0,
2772
- },
2773
2831
 
2774
- 'shoutem.ui.LinearGradient': {
2775
- '.fill-parent': {
2776
- [INCLUDE]: ['fillParent'],
2832
+ [INCLUDE]: ['commonVariants'],
2833
+ flex: 0,
2777
2834
  },
2778
- },
2779
2835
 
2780
- 'shoutem.ui.Lightbox': {
2781
- '.container': {
2782
- flex: 1,
2783
- resizeMode: 'contain',
2836
+ 'shoutem.ui.LinearGradient': {
2837
+ '.fill-parent': {
2838
+ [INCLUDE]: ['fillParent'],
2839
+ },
2784
2840
  },
2785
- 'shoutem.ui.Image': {
2786
- '.preview': {
2841
+
2842
+ 'shoutem.ui.Lightbox': {
2843
+ '.container': {
2787
2844
  flex: 1,
2845
+ resizeMode: 'contain',
2846
+ },
2847
+ 'shoutem.ui.Image': {
2848
+ '.preview': {
2849
+ flex: 1,
2850
+ },
2788
2851
  },
2789
2852
  },
2790
- },
2791
2853
 
2792
- 'shoutem.ui.InlineDropDownMenu': {
2793
- container: {
2794
- paddingTop: 12,
2795
- paddingHorizontal: variables.mediumGutter,
2796
- paddingBottom: 4,
2797
- backgroundColor: variables.paperColor,
2798
- },
2799
- icon: {
2800
- color: variables.text.color,
2854
+ 'shoutem.ui.InlineDropDownMenu': {
2855
+ container: {
2856
+ paddingTop: 12,
2857
+ paddingHorizontal: resolveVariable('mediumGutter'),
2858
+ paddingBottom: 4,
2859
+ backgroundColor: resolveVariable('paperColor'),
2860
+ },
2861
+ icon: {
2862
+ color: resolveVariable('text.color'),
2863
+ },
2801
2864
  },
2802
- },
2803
2865
 
2804
- 'shoutem.ui.InlineDropDownMenuItem': {
2805
- container: {
2806
- paddingTop: 10,
2807
- paddingHorizontal: variables.mediumGutter,
2808
- paddingBottom: 4,
2809
- backgroundColor: variables.paperColor,
2810
- borderTopWidth: 1,
2811
- borderTopColor: variables.backgroundColor,
2866
+ 'shoutem.ui.InlineDropDownMenuItem': {
2867
+ container: {
2868
+ paddingTop: 10,
2869
+ paddingHorizontal: resolveVariable('mediumGutter'),
2870
+ paddingBottom: 4,
2871
+ backgroundColor: resolveVariable('paperColor'),
2872
+ borderTopWidth: 1,
2873
+ borderTopColor: resolveVariable('backgroundColor'),
2874
+ },
2812
2875
  },
2813
- },
2814
2876
 
2815
- 'shoutem.ui.TabMenu': {
2816
- container: {
2817
- paddingHorizontal: variables.smallGutter,
2818
- backgroundColor: variables.backgroundColor,
2819
- },
2820
- list: {
2821
- flexGrow: 0,
2822
- flexShrink: 0,
2877
+ 'shoutem.ui.TabMenu': {
2878
+ container: {
2879
+ paddingHorizontal: resolveVariable('smallGutter'),
2880
+ backgroundColor: resolveVariable('backgroundColor'),
2881
+ },
2882
+ list: {
2883
+ flexGrow: 0,
2884
+ flexShrink: 0,
2885
+ },
2823
2886
  },
2824
- },
2825
2887
 
2826
- 'shoutem.ui.TabMenuItem': {
2827
- tabulator: {
2828
- backgroundColor: variables.text.color,
2829
- height: 1,
2830
- borderRadius: 1,
2831
- flexDirection: 'row',
2832
- marginBottom: 8,
2833
- marginLeft: 8,
2834
- },
2835
- text: {
2836
- marginTop: 12,
2837
- marginHorizontal: 8,
2838
- marginBottom: 12,
2839
- opacity: 0.3,
2840
- },
2841
- selectedText: {
2842
- marginBottom: 4,
2843
- opacity: 1,
2888
+ 'shoutem.ui.TabMenuItem': {
2889
+ tabulator: {
2890
+ backgroundColor: resolveVariable('text.color'),
2891
+ height: 1,
2892
+ borderRadius: 1,
2893
+ flexDirection: 'row',
2894
+ marginBottom: 8,
2895
+ marginLeft: 8,
2896
+ },
2897
+ text: {
2898
+ marginTop: 12,
2899
+ marginHorizontal: 8,
2900
+ marginBottom: 12,
2901
+ opacity: 0.3,
2902
+ },
2903
+ selectedText: {
2904
+ marginBottom: 4,
2905
+ opacity: 1,
2906
+ },
2844
2907
  },
2845
- },
2846
2908
 
2847
- 'shoutem.ui.YearRangePickerButton': {
2848
- container: {
2849
- flexDirection: 'row',
2850
- alignItems: 'center',
2851
- backgroundColor: '#F9F9F9',
2852
- borderWidth: 1,
2853
- borderRadius: 8,
2854
- borderColor: 'rgba(130, 130, 130, 0.1)',
2855
- paddingLeft: 15,
2856
- paddingVertical: 8,
2857
- paddingRight: 8,
2858
- marginRight: 8,
2859
- },
2860
- icon: {
2861
- color: variables.text.color,
2909
+ 'shoutem.ui.YearRangePickerButton': {
2910
+ container: {
2911
+ flexDirection: 'row',
2912
+ alignItems: 'center',
2913
+ backgroundColor: '#F9F9F9',
2914
+ borderWidth: 1,
2915
+ borderRadius: 8,
2916
+ borderColor: 'rgba(130, 130, 130, 0.1)',
2917
+ paddingLeft: 15,
2918
+ paddingVertical: 8,
2919
+ paddingRight: 8,
2920
+ marginRight: 8,
2921
+ },
2922
+ icon: {
2923
+ color: resolveVariable('text.color'),
2924
+ },
2862
2925
  },
2863
- },
2864
2926
 
2865
- 'shoutem.ui.YearRangePickerModal': {
2866
- outerContainer: {
2867
- flex: 1,
2868
- },
2869
- container: {
2870
- height: 360,
2871
- padding: 8,
2872
- backgroundColor: '#F9F9F9',
2873
- borderWidth: 1,
2874
- borderRadius: 8,
2875
- borderColor: 'rgba(130, 130, 130, 0.1)',
2876
- marginHorizontal: 15,
2877
- },
2878
- tooltipContainer: {
2879
- flexDirection: 'row',
2880
- flex: 1,
2881
- justifyContent: 'space-between',
2882
- alignItems: 'center',
2883
- padding: 8,
2884
- height: 56,
2885
- },
2886
- yearRow: {
2887
- flexDirection: 'row',
2888
- flex: 1,
2889
- },
2890
- buttonContainer: {
2891
- flexDirection: 'row',
2892
- padding: 8,
2893
- height: 56,
2894
- },
2895
- yearContainer: {
2896
- flex: 1,
2897
- alignSelf: 'stretch',
2898
- flexDirection: 'row',
2899
- marginBottom: 5,
2900
- justifyContent: 'center',
2901
- alignItems: 'center',
2902
- },
2903
- year: {
2904
- position: 'absolute',
2905
- top: 0,
2906
- bottom: 0,
2907
- left: 0,
2908
- right: 0,
2909
- justifyContent: 'center',
2910
- alignItems: 'center',
2911
- },
2912
- yearSelected: {
2913
- backgroundColor: variables.featuredColor,
2914
- },
2915
- yearFirst: {
2916
- left: 5,
2917
- borderTopLeftRadius: 8,
2918
- borderBottomLeftRadius: 8,
2919
- },
2920
- yearLast: {
2921
- right: 5,
2922
- borderTopRightRadius: 8,
2923
- borderBottomRightRadius: 8,
2924
- },
2925
- icon: {
2926
- color: variables.text.color,
2927
- opacity: 1,
2928
- },
2929
- iconDisabled: {
2930
- opacity: 0.3,
2927
+ 'shoutem.ui.YearRangePickerModal': {
2928
+ outerContainer: {
2929
+ flex: 1,
2930
+ },
2931
+ container: {
2932
+ height: 360,
2933
+ padding: 8,
2934
+ backgroundColor: '#F9F9F9',
2935
+ borderWidth: 1,
2936
+ borderRadius: 8,
2937
+ borderColor: 'rgba(130, 130, 130, 0.1)',
2938
+ marginHorizontal: 15,
2939
+ },
2940
+ tooltipContainer: {
2941
+ flexDirection: 'row',
2942
+ flex: 1,
2943
+ justifyContent: 'space-between',
2944
+ alignItems: 'center',
2945
+ padding: 8,
2946
+ height: 56,
2947
+ },
2948
+ yearRow: {
2949
+ flexDirection: 'row',
2950
+ flex: 1,
2951
+ },
2952
+ buttonContainer: {
2953
+ flexDirection: 'row',
2954
+ padding: 8,
2955
+ height: 56,
2956
+ },
2957
+ yearContainer: {
2958
+ flex: 1,
2959
+ alignSelf: 'stretch',
2960
+ flexDirection: 'row',
2961
+ marginBottom: 5,
2962
+ justifyContent: 'center',
2963
+ alignItems: 'center',
2964
+ },
2965
+ year: {
2966
+ position: 'absolute',
2967
+ top: 0,
2968
+ bottom: 0,
2969
+ left: 0,
2970
+ right: 0,
2971
+ justifyContent: 'center',
2972
+ alignItems: 'center',
2973
+ },
2974
+ yearSelected: {
2975
+ backgroundColor: resolveVariable('featuredColor'),
2976
+ },
2977
+ yearFirst: {
2978
+ left: 5,
2979
+ borderTopLeftRadius: 8,
2980
+ borderBottomLeftRadius: 8,
2981
+ },
2982
+ yearLast: {
2983
+ right: 5,
2984
+ borderTopRightRadius: 8,
2985
+ borderBottomRightRadius: 8,
2986
+ },
2987
+ icon: {
2988
+ color: resolveVariable('text.color'),
2989
+ opacity: 1,
2990
+ },
2991
+ iconDisabled: {
2992
+ opacity: 0.3,
2993
+ },
2931
2994
  },
2932
- },
2933
2995
 
2934
- 'shoutem.ui.DateTimePicker': {
2935
- buttonContainer: {
2936
- width: 50,
2937
- height: 50,
2938
- backgroundColor: '#222222',
2939
- },
2940
- icon: { color: '#FFFFFF', height: 30, width: 30 },
2941
- modalButton: { width: 100, margin: 'auto' },
2942
- modalButtonContainer: { height: 80 },
2943
- modalContainer: { backgroundColor: '#FFFFFF' },
2944
- textContainer: {
2945
- borderColor: '#C2C2C2',
2946
- borderWidth: 1,
2996
+ 'shoutem.ui.DateTimePicker': {
2997
+ buttonContainer: {
2998
+ width: 50,
2999
+ height: 50,
3000
+ backgroundColor: '#222222',
3001
+ },
3002
+ icon: { color: '#FFFFFF', height: 30, width: 30 },
3003
+ modalButton: { width: 100, margin: 'auto' },
3004
+ modalButtonContainer: { height: 80 },
3005
+ modalContainer: { backgroundColor: '#FFFFFF' },
3006
+ textContainer: {
3007
+ borderColor: '#C2C2C2',
3008
+ borderWidth: 1,
3009
+ },
2947
3010
  },
2948
- },
2949
3011
 
2950
- 'shoutem.ui.LoadingContainer': {
2951
- container: {
2952
- alignItems: 'center',
2953
- justifyContent: 'center',
3012
+ 'shoutem.ui.LoadingContainer': {
3013
+ container: {
3014
+ alignItems: 'center',
3015
+ justifyContent: 'center',
3016
+ },
2954
3017
  },
2955
- },
2956
- });
3018
+ };
3019
+ };