playbook_ui 10.26.0.pre.rc1 → 10.27.0.pre.lazysizes1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/_playbook.scss +1 -0
  3. data/app/pb_kits/playbook/pb_background/{_background.jsx → _background.tsx} +20 -13
  4. data/app/pb_kits/playbook/pb_body/_body.tsx +1 -1
  5. data/app/pb_kits/playbook/pb_button/docs/_button_default.html.erb +1 -0
  6. data/app/pb_kits/playbook/pb_card/{_card.jsx → _card.tsx} +24 -22
  7. data/app/pb_kits/playbook/pb_card/docs/_card_background.jsx +1 -1
  8. data/app/pb_kits/playbook/pb_card/docs/_card_border_none.jsx +1 -1
  9. data/app/pb_kits/playbook/pb_card/docs/_card_border_radius.jsx +1 -1
  10. data/app/pb_kits/playbook/pb_card/docs/_card_light.jsx +1 -1
  11. data/app/pb_kits/playbook/pb_card/docs/_card_selected.jsx +1 -1
  12. data/app/pb_kits/playbook/pb_flex/{_flex.jsx → _flex.tsx} +5 -5
  13. data/app/pb_kits/playbook/pb_highlight/_highlight.tsx +1 -1
  14. data/app/pb_kits/playbook/pb_image/_image.scss +9 -4
  15. data/app/pb_kits/playbook/pb_image/_image.tsx +14 -10
  16. data/app/pb_kits/playbook/pb_user/{_user.jsx → _user.tsx} +20 -24
  17. data/app/pb_kits/playbook/playbook-rails.js +1 -0
  18. data/app/pb_kits/playbook/tokens/_colors.scss +2 -1
  19. data/app/pb_kits/playbook/utilities/_align_content.scss +10 -29
  20. data/app/pb_kits/playbook/utilities/_align_items.scss +11 -35
  21. data/app/pb_kits/playbook/utilities/_align_self.scss +10 -29
  22. data/app/pb_kits/playbook/utilities/_flex.scss +19 -14
  23. data/app/pb_kits/playbook/utilities/_flex_direction.scss +7 -18
  24. data/app/pb_kits/playbook/utilities/_flex_grow.scss +5 -8
  25. data/app/pb_kits/playbook/utilities/_flex_shrink.scss +5 -8
  26. data/app/pb_kits/playbook/utilities/_flex_wrap.scss +6 -13
  27. data/app/pb_kits/playbook/utilities/_justify_content.scss +10 -23
  28. data/app/pb_kits/playbook/utilities/_justify_self.scss +9 -19
  29. data/app/pb_kits/playbook/utilities/_mixins.scss +26 -0
  30. data/app/pb_kits/playbook/utilities/_order.scss +17 -55
  31. data/app/pb_kits/playbook/utilities/globalProps.ts +125 -111
  32. data/app/pb_kits/playbook/utilities/test/globalProps/alignContent.test.js +37 -0
  33. data/app/pb_kits/playbook/utilities/test/globalProps/alignItems.test.js +36 -0
  34. data/app/pb_kits/playbook/utilities/test/globalProps/alignSelf.test.js +37 -0
  35. data/app/pb_kits/playbook/utilities/test/globalProps/display.test.js +38 -0
  36. data/app/pb_kits/playbook/utilities/test/globalProps/flex.test.js +64 -0
  37. data/app/pb_kits/playbook/utilities/test/globalProps/flexDirection.test.js +37 -0
  38. data/app/pb_kits/playbook/utilities/test/globalProps/flexGrow.test.js +35 -0
  39. data/app/pb_kits/playbook/utilities/test/globalProps/flexShrink.test.js +35 -0
  40. data/app/pb_kits/playbook/utilities/test/globalProps/flexWrap.test.js +37 -0
  41. data/app/pb_kits/playbook/utilities/test/globalProps/justifyContent.test.js +37 -0
  42. data/app/pb_kits/playbook/utilities/test/globalProps/justifySelf.test.js +37 -0
  43. data/app/pb_kits/playbook/utilities/test/globalProps/order.test.js +35 -0
  44. data/app/pb_kits/playbook/utilities/test-utils.js +2 -0
  45. data/app/pb_kits/playbook/utilities/text.ts +22 -0
  46. data/lib/playbook/align_content.rb +11 -3
  47. data/lib/playbook/align_items.rb +10 -2
  48. data/lib/playbook/align_self.rb +9 -1
  49. data/lib/playbook/display.rb +1 -3
  50. data/lib/playbook/flex.rb +9 -1
  51. data/lib/playbook/flex_direction.rb +10 -2
  52. data/lib/playbook/flex_grow.rb +9 -1
  53. data/lib/playbook/flex_shrink.rb +9 -1
  54. data/lib/playbook/flex_wrap.rb +10 -2
  55. data/lib/playbook/justify_content.rb +10 -2
  56. data/lib/playbook/justify_self.rb +9 -1
  57. data/lib/playbook/order.rb +10 -2
  58. data/lib/playbook/pb_kit_helper.rb +6 -1
  59. data/lib/playbook/version.rb +2 -2
  60. metadata +22 -9
  61. data/app/pb_kits/playbook/utilities/text.js +0 -15
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '048acddb29dd15f68b34839ca45ccd4df1d42336d4820e47de25dbe3ebc0249c'
4
- data.tar.gz: 34eebfcebf6b68b56463789a1e38c1fb5984f3a84359b18e2443155cbe3ac8c8
3
+ metadata.gz: 17b5223ce5053256ecdeca31b0cba4aa944be3e036c5a7f87e618ac210743c70
4
+ data.tar.gz: 249659c9162fc5866c95f4e7ca93526242cac418d643805106a30024a8f68387
5
5
  SHA512:
6
- metadata.gz: 9c9c0665cee4d841bb9b4b404727e5a0912218f6e1f285996cb8c3de268380e7b5936a63f0befd150a0f5c9bfd6db55551da65a29d59269d3add7710f95d9c73
7
- data.tar.gz: 3507fad3d27741a06660b2f50c8068e0a2736b80b9f07edb753a539c31f43cfa34b36e1d0e0251547c6262570ff7d02859b0ee69fa0377a0f63068b82f49b1a7
6
+ metadata.gz: 5795693f1395e8770cac42d3883e784a21249937f31da3608e04c9109e6e07e765a6650f958108fb826a2bc76d99ed4bd8d14395dcf485c3beebd1cb6c0b5239
7
+ data.tar.gz: b784cac79800c6c20578e8d5b411f665bcbc75ece551eaa577b9026c2ed8de31abf0f785007861b23d27f249579435378cae0ed9f5b4ae9e4df141ac237fae3c
@@ -92,6 +92,7 @@
92
92
  @import 'pb_time_stacked/time_stacked';
93
93
  @import 'pb_walkthrough/walkthrough';
94
94
  @import 'pb_weekday_stacked/weekday_stacked';
95
+ @import './utilities/mixins';
95
96
  @import './utilities/spacing';
96
97
  @import './utilities/cursor';
97
98
  @import './utilities/max_width';
@@ -1,26 +1,24 @@
1
- /* @flow */
2
-
3
1
  import React from 'react'
4
2
  import classnames from 'classnames'
5
3
  import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
6
- import { globalProps } from '../utilities/globalProps'
4
+ import { GlobalProps, globalProps } from '../utilities/globalProps'
7
5
 
8
6
  type BackgroundProps = {
9
7
  alt?: string,
10
- aria?: object,
8
+ aria?: {[key: string]: string},
11
9
  backgroundColor?: 'gradient' | 'dark' | 'light' | 'white' | 'success' | 'warning' | 'error' | 'info' | 'neutral' | 'primary' | 'category_1' | 'category_2' | 'category_3' | 'category_4' | 'category_5' | 'category_6' | 'category_7' | 'category_8' | 'category_9' | 'category_10' | 'category_11' | 'category_12' | 'category_13' | 'category_14' | 'category_15' | 'category_16' | 'category_17' | 'category_18' | 'category_19' | 'category_20' | 'category_21',
12
10
  backgroundRepeat?: 'repeat' | 'repeat-x' | 'repeat-y' | 'no-repeat' | 'space' | 'round' | 'initial' | 'inherit',
13
11
  backgroundSize?: 'auto' | 'cover' | 'contain',
14
- children?: array<React.ReactNode> | React.ReactNode,
12
+ children?: React.ReactChild[] | React.ReactNode,
15
13
  className?: string,
16
14
  customColor?: string,
17
- data?: object,
15
+ data?: {[key: string]: string},
18
16
  id?: string,
19
17
  imageUrl?: string,
20
18
  padding?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl',
21
19
  tag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span' | 'div',
22
20
  transition?: 'fade' | 'blur' | 'scale',
23
- }
21
+ } & GlobalProps
24
22
 
25
23
  const Background = (props: BackgroundProps) => {
26
24
  const {
@@ -49,11 +47,13 @@ const Background = (props: BackgroundProps) => {
49
47
  }
50
48
  const getBackgroundColor = customColor ? 'pb_background_custom_color' : `pb_background_color_${backgroundColor}`
51
49
  const classes = classnames(buildCss('pb_background_kit'), 'lazyload', backgroundStyle, transition, globalProps(props), getBackgroundColor, className)
52
- const Tag = `${tag}`
53
50
 
54
- return (
55
- <>
56
- <If condition={imageUrl}>
51
+
52
+ const Tag: React.ReactElement | any = `${tag}`
53
+
54
+ const displayReturn = () => {
55
+ if (imageUrl)
56
+ return (
57
57
  <Tag
58
58
  alt={alt}
59
59
  style={backgroundStyle}
@@ -64,7 +64,9 @@ const Background = (props: BackgroundProps) => {
64
64
  >
65
65
  { children }
66
66
  </Tag>
67
- <Else />
67
+ )
68
+ else
69
+ return (
68
70
  <Tag
69
71
  {...ariaProps}
70
72
  {...dataProps}
@@ -74,7 +76,12 @@ const Background = (props: BackgroundProps) => {
74
76
  >
75
77
  { children }
76
78
  </Tag>
77
- </If>
79
+ )
80
+ }
81
+
82
+ return (
83
+ <>
84
+ { displayReturn() }
78
85
  </>
79
86
  )
80
87
  }
@@ -9,7 +9,7 @@ import Highlight from '../pb_highlight/_highlight'
9
9
  type BodyProps = {
10
10
  aria?: {[key: string]: string},
11
11
  className?: string,
12
- children?: React.ReactChild[],
12
+ children?: React.ReactChild[] | React.ReactChild,
13
13
  color?: 'default' | 'light' | 'lighter' | 'link',
14
14
  dark?: boolean,
15
15
  data?: {[key: string]: string},
@@ -2,3 +2,4 @@
2
2
  <%= pb_rails("button", props: { text: "Button Secondary", variant: "secondary" }) %>
3
3
  <%= pb_rails("button", props: { text: "Button Link", variant: "link" }) %>
4
4
  <%= pb_rails("button", props: { text: "Button Disabled", disabled: true }) %>
5
+
@@ -1,42 +1,43 @@
1
- /* @flow */
1
+ /* eslint-disable react/no-multi-comp */
2
2
 
3
3
  import React from 'react'
4
4
  import { get } from 'lodash'
5
5
  import classnames from 'classnames'
6
6
 
7
7
  import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
8
- import { globalProps } from '../utilities/globalProps'
9
- import { ProductColors, CategoryColors, BackgroundColors } from '../types'
8
+ import { GlobalProps, globalProps } from '../utilities/globalProps'
9
+ import type { ProductColors, CategoryColors, BackgroundColors } from '../types'
10
10
 
11
11
  type CardPropTypes = {
12
- aria?: object,
12
+ aria?: {[key: string]: string},
13
13
  background?: BackgroundColors | ProductColors | "none",
14
14
  borderNone?: boolean,
15
15
  borderRadius?: "xs" | "sm" | "md" | "lg" | "xl" | "none" | "rounded",
16
- children: array<React.ReactNode> | React.ReactNode,
16
+ children: React.ReactChild[] | React.ReactChild | number,
17
17
  className?: string,
18
- data?: object,
18
+ data?: {[key: string]: string},
19
19
  highlight?: {
20
20
  position?: "side" | "top",
21
21
  color?: string,
22
22
  },
23
+ length?: number,
23
24
  padding?: string,
24
25
  selected?: boolean,
25
26
  tag?: "div" | "section" | "footer" | "header" | "article" | "aside" | "main" | "nav",
26
- }
27
+ } & GlobalProps
27
28
 
28
29
  type CardHeaderProps = {
29
30
  headerColor?: BackgroundColors | ProductColors | CategoryColors | "none",
30
- children: array<React.ReactNode> | React.ReactNode,
31
+ children: React.ReactChild[] | React.ReactChild,
31
32
  className?: string,
32
33
  padding?: string,
33
- }
34
+ } & GlobalProps
34
35
 
35
36
  type CardBodyProps = {
36
- children: array<React.ReactNode> | React.ReactNode | string,
37
+ children: React.ReactChild[] | React.ReactChild | string,
37
38
  className?: string,
38
39
  padding?: string,
39
- }
40
+ } & GlobalProps
40
41
 
41
42
  // Header component
42
43
  const Header = (props: CardHeaderProps) => {
@@ -82,26 +83,27 @@ const Card = (props: CardPropTypes) => {
82
83
  const borderCSS = borderNone == true ? 'border_none' : ''
83
84
  const selectedCSS = selected == true ? 'selected' : 'deselected'
84
85
  const backgroundCSS = background == 'none' ? '' : `background_${background}`
85
- const cardCss = buildCss('pb_card_kit', selectedCSS, borderCSS, `border_radius_${borderRadius}`, backgroundCSS, {
86
- [`highlight_${highlight.position}`]: highlight.position,
87
- [`highlight_${highlight.color}`]: highlight.color,
88
- })
89
- const ariaProps = buildAriaProps(aria)
90
- const dataProps = buildDataProps(data)
86
+ const cardCss = buildCss('pb_card_kit', selectedCSS, borderCSS, `border_radius_${borderRadius}`, backgroundCSS,
87
+ `highlight_${highlight.position}`,
88
+ `highlight_${highlight.color}`,
89
+ )
90
+ const ariaProps: {[key: string]: string} = buildAriaProps(aria)
91
+ const dataProps: {[key: string]: string} = buildDataProps(data)
91
92
 
92
93
  // coerce to array
93
- const cardChildren =
94
- typeof children === 'object' && children.length ? children : [children]
94
+ const cardChildren = React.Children.toArray(children)
95
95
 
96
- const subComponentTags = (tagName) => {
97
- return cardChildren.filter((c) => (
96
+ const subComponentTags = (tagName: string) => {
97
+ return cardChildren.filter((c: string) => (
98
98
  get(c, 'type.displayName') === tagName
99
99
  )).map((child, i) => {
100
+ if(React.isValidElement(child)) {
100
101
  return React.cloneElement(child, { key: `${tagName.toLowerCase()}-${i}` })
102
+ }
101
103
  })
102
104
  }
103
105
 
104
- const nonHeaderChildren = cardChildren.filter((child) => (get(child, 'type.displayName') !== 'Header'))
106
+ const nonHeaderChildren = cardChildren.filter((child: Node) => (get(child, 'type.displayName') !== 'Header'))
105
107
 
106
108
  const tagOptions = ['div', 'section', 'footer', 'header', 'article', 'aside', 'main', 'nav']
107
109
  const Tag = tagOptions.includes(tag) ? tag : 'div'
@@ -1,7 +1,7 @@
1
1
  import React from 'react'
2
2
  import Title from '../../pb_title/_title'
3
3
  import { Body } from '../../'
4
- import Card from '../_card.jsx'
4
+ import Card from '../_card'
5
5
 
6
6
  const CardBackground = (props) => {
7
7
  return (
@@ -1,5 +1,5 @@
1
1
  import React from 'react'
2
- import Card from '../_card.jsx'
2
+ import Card from '../_card'
3
3
 
4
4
  const CardBorderNone = (props) => {
5
5
  return (
@@ -1,5 +1,5 @@
1
1
  import React from 'react'
2
- import Card from '../_card.jsx'
2
+ import Card from '../_card'
3
3
 
4
4
  const CardLight = (props) => {
5
5
  return (
@@ -1,5 +1,5 @@
1
1
  import React from 'react'
2
- import Card from '../_card.jsx'
2
+ import Card from '../_card'
3
3
 
4
4
  const CardLight = (props) => {
5
5
  return (
@@ -1,5 +1,5 @@
1
1
  import React from 'react'
2
- import Card from '../_card.jsx'
2
+ import Card from '../_card'
3
3
 
4
4
  const CardSelected = (props) => {
5
5
  return (
@@ -1,11 +1,10 @@
1
- /* @flow */
2
-
3
1
  import React from 'react'
4
2
  import classnames from 'classnames'
5
3
  import { buildCss, buildDataProps } from '../utilities/props'
6
- import { globalProps } from '../utilities/globalProps'
4
+ import { GlobalProps, globalProps } from '../utilities/globalProps'
5
+
7
6
  type FlexProps = {
8
- children: array<React.ReactNode> | React.ReactNode,
7
+ children: React.ReactChild[] | React.ReactNode,
9
8
  className?: string,
10
9
  data?: object,
11
10
  horizontal?: "left" | "center" | "right" | "stretch" | "none",
@@ -22,7 +21,7 @@ type FlexProps = {
22
21
  columnGap?: "xs" | "sm" | "md" | "lg" | "xl" | "none",
23
22
  wrap?: boolean,
24
23
  alignSelf?: "start" | "end" | "center" | "stretch" | "none"
25
- }
24
+ } & GlobalProps
26
25
 
27
26
  const Flex = (props: FlexProps) => {
28
27
  const {
@@ -43,6 +42,7 @@ const Flex = (props: FlexProps) => {
43
42
  wrap = false,
44
43
  alignSelf = 'none',
45
44
  } = props
45
+
46
46
  const orientationClass =
47
47
  orientation !== undefined ? `orientation_${orientation}` : ''
48
48
  const justifyClass =
@@ -8,7 +8,7 @@ type HighlightProps = {
8
8
  className?: string,
9
9
  data?: {[key: string]: string},
10
10
  id?: string,
11
- children?: React.ReactChild[] | string,
11
+ children?: React.ReactChild[] | React.ReactChild | string,
12
12
  text?: string,
13
13
  highlightedText?: string[],
14
14
  } & GlobalProps
@@ -11,9 +11,9 @@ $image-sizes: (
11
11
 
12
12
  [class^=pb_image_kit] {
13
13
  position: relative;
14
- object-fit: cover;
15
14
 
16
15
  @each $name, $size in $image-sizes {
16
+ &.ls-blur-up-img,
17
17
  &[class*=size_#{$name}] {
18
18
  width: $size;
19
19
  height: $size;
@@ -22,13 +22,16 @@ $image-sizes: (
22
22
  flex-shrink: 0;
23
23
  flex-grow: 0;
24
24
  flex-basis: $size;
25
+ font-family: "blur-up: auto", "object-fit: cover";
26
+ object-fit: cover;
25
27
  }
26
28
 
27
29
  &[class*= rounded] {
28
30
  border-radius: $border-rad-heaviest;
29
31
  }
30
32
 
31
- &.fade {
33
+ &.ls-blur-up-img,
34
+ &.fade:not(.ls-is-cached) {
32
35
  opacity: 0;
33
36
  &.lazyloaded {
34
37
  opacity: 1;
@@ -36,7 +39,8 @@ $image-sizes: (
36
39
  }
37
40
  }
38
41
 
39
- &.blur {
42
+ &.ls-blur-up-img,
43
+ &.blur:not(.ls-is-cached) {
40
44
  filter: blur(5px);
41
45
  &.lazyloaded {
42
46
  -webkit-filter: blur(0);
@@ -45,7 +49,8 @@ $image-sizes: (
45
49
  }
46
50
  }
47
51
 
48
- &.scale {
52
+ &.ls-blur-up-img,
53
+ &.scale:not(.ls-is-cached) {
49
54
  opacity: 0;
50
55
  transform: scale(0.9);
51
56
  &.lazyloaded {
@@ -2,6 +2,8 @@ import React from 'react'
2
2
  import classnames from 'classnames'
3
3
  import { GlobalProps, globalProps } from '../utilities/globalProps'
4
4
  import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
5
+ import 'lazysizes';
6
+ import 'lazysizes/plugins/blur-up/ls.blur-up';
5
7
 
6
8
  type ImageType = {
7
9
  alt?: string,
@@ -42,16 +44,18 @@ const Image = (props: ImageType): React.ReactElement => {
42
44
  const dataProps = buildDataProps(data)
43
45
 
44
46
  return (
45
- <img
46
- {...ariaProps}
47
- {...dataProps}
48
- alt={alt}
49
- className={classes}
50
- data-src={url}
51
- id={id}
52
- onError={onError}
53
- src={url}
54
- />
47
+ <>
48
+ <img
49
+ {...ariaProps}
50
+ {...dataProps}
51
+ alt={alt}
52
+ className={classes}
53
+ data-src={url}
54
+ id={id}
55
+ onError={onError}
56
+ src={url}
57
+ />
58
+ </>
55
59
  )
56
60
  }
57
61
 
@@ -1,10 +1,9 @@
1
- /* @flow */
2
1
 
3
2
  import React from 'react'
4
3
  import classnames from 'classnames'
5
4
 
6
5
  import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
7
- import { globalProps } from '../utilities/globalProps'
6
+ import { GlobalProps, globalProps } from '../utilities/globalProps'
8
7
 
9
8
  import Avatar from '../pb_avatar/_avatar'
10
9
  import Body from '../pb_body/_body'
@@ -12,19 +11,19 @@ import Title from '../pb_title/_title'
12
11
 
13
12
  type UserProps = {
14
13
  align?: "left" | "center" | "right",
15
- aria?: object,
16
- avatar?: Boolean,
17
- avatarUrl?: String,
18
- className?: String,
14
+ aria?: {[key: string]: string},
15
+ avatar?: boolean,
16
+ avatarUrl?: string,
17
+ className?: string,
19
18
  dark?: boolean,
20
- data?: object,
21
- id?: String,
22
- name?: String,
19
+ data?: {[key: string]: string},
20
+ id?: string,
21
+ name?: string,
23
22
  orientation?: "horiztonal" | "vertical",
24
23
  size?: "sm" | "md" | "lg",
25
- territory?: String,
26
- title?: String,
27
- }
24
+ territory?: string,
25
+ title?: string,
26
+ } & GlobalProps
28
27
 
29
28
  const User = (props: UserProps) => {
30
29
  const {
@@ -43,14 +42,8 @@ const User = (props: UserProps) => {
43
42
  title = '',
44
43
  } = props
45
44
 
46
- const avatarSizeMap = {
47
- lg: 'xl',
48
- md: 'md',
49
- sm: 'sm',
50
- }
51
-
52
- const ariaProps = buildAriaProps(aria)
53
- const dataProps = buildDataProps(data)
45
+ const dataProps: {[key: string]: string} = buildDataProps(data)
46
+ const ariaProps: {[key: string]: string} = buildAriaProps(aria)
54
47
 
55
48
  const classes = classnames(
56
49
  buildCss('pb_user_kit', align, orientation, size),
@@ -58,6 +51,8 @@ const User = (props: UserProps) => {
58
51
  className,
59
52
  )
60
53
 
54
+ const avatarPresent = avatar || avatarUrl
55
+
61
56
  return (
62
57
  <div
63
58
  {...ariaProps}
@@ -65,14 +60,14 @@ const User = (props: UserProps) => {
65
60
  className={classes}
66
61
  id={id}
67
62
  >
68
- <If condition={avatar || avatarUrl}>
63
+ { avatarPresent &&
69
64
  <Avatar
70
65
  imageUrl={avatarUrl}
71
66
  name={name}
72
- size={avatarSizeMap[size]}
67
+ size={size}
68
+ status={null}
73
69
  />
74
- </If>
75
-
70
+ }
76
71
  <div className="content_wrapper">
77
72
  <Title
78
73
  dark={dark}
@@ -82,6 +77,7 @@ const User = (props: UserProps) => {
82
77
  <Body
83
78
  color="light"
84
79
  dark={dark}
80
+ variant={null}
85
81
  >
86
82
  {territory === '' ? title : `${territory} • ${title}`}
87
83
  </Body>
@@ -11,6 +11,7 @@ window.datePickerHelper = datePickerHelper
11
11
 
12
12
  // Lazy image loading
13
13
  import 'lazysizes'
14
+ import 'lazysizes/plugins/blur-up/ls.blur-up'
14
15
 
15
16
  import PbCollapsible from './pb_collapsible'
16
17
  PbCollapsible.start()
@@ -9,6 +9,7 @@ $royal: #0056CF;
9
9
  $purple: #9E64E9;
10
10
  $teal: #00C4D7;
11
11
  $red: #FF2229;
12
+ $red_dark: #ff4a50;
12
13
  $yellow: #F9BB00;
13
14
  $green: #00CA74;
14
15
  $orange: #FD804C;
@@ -154,7 +155,7 @@ $data_colors: (
154
155
  $success: $green;
155
156
  $warning: $yellow;
156
157
  $error: $red;
157
- $error_dark: lighten($error, 5%);
158
+ $error_dark: $red_dark;
158
159
  $error_dark_body: lighten($error_dark, 2%);
159
160
  $info: $teal;
160
161
  $neutral: $slate;
@@ -1,29 +1,10 @@
1
- .align_content_start {
2
- display: flex;
3
- align-content: start !important;
4
- }
5
-
6
- .align_content_end {
7
- display: flex;
8
- align-content: end !important;
9
- }
10
-
11
- .align_content_center {
12
- display: flex;
13
- align-content: center !important;
14
- }
15
-
16
- .align_content_space_between {
17
- display: flex;
18
- align-content: space-between !important;
19
- }
20
-
21
- .align_content_space_around {
22
- display: flex;
23
- align-content: space-around !important;
24
- }
25
-
26
- .align_content_space_evenly {
27
- display: flex;
28
- align-content: space-evenly !important;
29
- }
1
+ $align_content_values: (
2
+ start: start,
3
+ end: end,
4
+ center: center,
5
+ space_between: space-between,
6
+ space_around: space-around,
7
+ space_evenly: space-evenly
8
+ );
9
+
10
+ @include global_props_responsive_css($align_content_values, 'align_content', 'align-content');
@@ -1,35 +1,11 @@
1
- .align_items_flex_start {
2
- display: flex;
3
- align-items: flex-start !important;
4
- }
5
-
6
- .align_items_flex_end {
7
- display: flex;
8
- align-items: flex-end !important;
9
- }
10
-
11
- .align_items_start {
12
- display: flex;
13
- align-items: start !important;
14
- }
15
-
16
- .align_items_end {
17
- display: flex;
18
- align-items: end !important;
19
- }
20
-
21
-
22
- .align_items_center {
23
- display: flex;
24
- align-items: center !important;
25
- }
26
-
27
- .align_items_baseline {
28
- display: flex;
29
- align-items: baseline !important;
30
- }
31
-
32
- .align_items_stretch {
33
- display: flex;
34
- align-items: stretch !important;
35
- }
1
+ $align_items_values: (
2
+ flex_start: flex-start,
3
+ flex_end: flex-end,
4
+ start: start,
5
+ center: center,
6
+ end: end,
7
+ baseline: baseline,
8
+ stretch: stretch,
9
+ );
10
+
11
+ @include global_props_responsive_css($align_items_values, 'align_items', 'align-items');
@@ -1,29 +1,10 @@
1
- .align_self_start {
2
- display: flex;
3
- align-self: start !important;
4
- }
5
-
6
- .align_self_end {
7
- display: flex;
8
- align-self: end !important;
9
- }
10
-
11
- .align_self_auto {
12
- display: flex;
13
- align-self: auto !important;
14
- }
15
-
16
- .align_self_center {
17
- display: flex;
18
- align-self: center !important;
19
- }
20
-
21
- .align_self_stretch {
22
- display: flex;
23
- align-self: stretch !important;
24
- }
25
-
26
- .align_self_baseline {
27
- display: flex;
28
- align-self: baseline !important;
29
- }
1
+ $align_self_values: (
2
+ auto: auto,
3
+ start: start,
4
+ center: center,
5
+ end: end,
6
+ baseline: baseline,
7
+ stretch: stretch,
8
+ );
9
+
10
+ @include global_props_responsive_css($align_self_values, 'align_self', 'align-self');
@@ -1,15 +1,20 @@
1
- .flex_auto {
2
- flex: auto !important;
3
- }
1
+ $flex_values: (
2
+ auto: auto,
3
+ initial: initial,
4
+ none: none,
5
+ 0: 0,
6
+ 1: 1,
7
+ 2: 2,
8
+ 3: 3,
9
+ 4: 4,
10
+ 5: 5,
11
+ 6: 6,
12
+ 7: 7,
13
+ 8: 8,
14
+ 9: 9,
15
+ 10: 10,
16
+ 11: 11,
17
+ 12: 12,
18
+ );
4
19
 
5
- .flex_initial {
6
- flex: initial !important;
7
- }
8
-
9
- .flex_none {
10
- flex: none !important;
11
- }
12
-
13
- .flex_1 {
14
- flex: 1 !important;
15
- }
20
+ @include global_props_responsive_css($flex_values, 'flex', 'flex');