playbook_ui 10.26.0.pre.rc1 → 10.26.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) 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_user/{_user.jsx → _user.tsx} +20 -24
  15. data/app/pb_kits/playbook/tokens/_colors.scss +2 -1
  16. data/app/pb_kits/playbook/utilities/_align_content.scss +10 -29
  17. data/app/pb_kits/playbook/utilities/_align_items.scss +11 -35
  18. data/app/pb_kits/playbook/utilities/_align_self.scss +10 -29
  19. data/app/pb_kits/playbook/utilities/_flex.scss +19 -14
  20. data/app/pb_kits/playbook/utilities/_flex_direction.scss +7 -18
  21. data/app/pb_kits/playbook/utilities/_flex_grow.scss +5 -8
  22. data/app/pb_kits/playbook/utilities/_flex_shrink.scss +5 -8
  23. data/app/pb_kits/playbook/utilities/_flex_wrap.scss +6 -13
  24. data/app/pb_kits/playbook/utilities/_justify_content.scss +10 -23
  25. data/app/pb_kits/playbook/utilities/_justify_self.scss +9 -19
  26. data/app/pb_kits/playbook/utilities/_mixins.scss +26 -0
  27. data/app/pb_kits/playbook/utilities/_order.scss +17 -55
  28. data/app/pb_kits/playbook/utilities/globalProps.ts +125 -111
  29. data/app/pb_kits/playbook/utilities/test/globalProps/alignContent.test.js +37 -0
  30. data/app/pb_kits/playbook/utilities/test/globalProps/alignItems.test.js +36 -0
  31. data/app/pb_kits/playbook/utilities/test/globalProps/alignSelf.test.js +37 -0
  32. data/app/pb_kits/playbook/utilities/test/globalProps/display.test.js +38 -0
  33. data/app/pb_kits/playbook/utilities/test/globalProps/flex.test.js +64 -0
  34. data/app/pb_kits/playbook/utilities/test/globalProps/flexDirection.test.js +37 -0
  35. data/app/pb_kits/playbook/utilities/test/globalProps/flexGrow.test.js +35 -0
  36. data/app/pb_kits/playbook/utilities/test/globalProps/flexShrink.test.js +35 -0
  37. data/app/pb_kits/playbook/utilities/test/globalProps/flexWrap.test.js +37 -0
  38. data/app/pb_kits/playbook/utilities/test/globalProps/justifyContent.test.js +37 -0
  39. data/app/pb_kits/playbook/utilities/test/globalProps/justifySelf.test.js +37 -0
  40. data/app/pb_kits/playbook/utilities/test/globalProps/order.test.js +35 -0
  41. data/app/pb_kits/playbook/utilities/test-utils.js +2 -0
  42. data/app/pb_kits/playbook/utilities/text.ts +22 -0
  43. data/dist/reset.css +1 -60
  44. data/lib/playbook/align_content.rb +11 -3
  45. data/lib/playbook/align_items.rb +10 -2
  46. data/lib/playbook/align_self.rb +9 -1
  47. data/lib/playbook/display.rb +1 -3
  48. data/lib/playbook/flex.rb +9 -1
  49. data/lib/playbook/flex_direction.rb +10 -2
  50. data/lib/playbook/flex_grow.rb +9 -1
  51. data/lib/playbook/flex_shrink.rb +9 -1
  52. data/lib/playbook/flex_wrap.rb +10 -2
  53. data/lib/playbook/justify_content.rb +10 -2
  54. data/lib/playbook/justify_self.rb +9 -1
  55. data/lib/playbook/order.rb +10 -2
  56. data/lib/playbook/version.rb +1 -1
  57. metadata +22 -9
  58. 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: 8ed156e9b15608fb8116a723d8dca86eb5b4295d88698532dc4bf8242bcd3ef6
4
+ data.tar.gz: d5a5f5e68f1aeeafdd80dc066ee4be2271e7c4f8c666ef1ccf6ff205a98645ef
5
5
  SHA512:
6
- metadata.gz: 9c9c0665cee4d841bb9b4b404727e5a0912218f6e1f285996cb8c3de268380e7b5936a63f0befd150a0f5c9bfd6db55551da65a29d59269d3add7710f95d9c73
7
- data.tar.gz: 3507fad3d27741a06660b2f50c8068e0a2736b80b9f07edb753a539c31f43cfa34b36e1d0e0251547c6262570ff7d02859b0ee69fa0377a0f63068b82f49b1a7
6
+ metadata.gz: 2e8aef1428a28b4c32bde81b9d61f76a4cdf02c6f5a08bb226ec4af88b86a83060f1322ed8e5033ba9a212c11fcef9e364d633505c42139beb7a9a167d0084ac
7
+ data.tar.gz: f58619e5f506e3d5c8dfbcab0605e65566c0a8e22dfdf73ac561a5391da2b02893aa95d2ec252ebc018b9ff8bcfcc9097086d2374c5c33fb53b01cb0d6578de2
@@ -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
@@ -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>
@@ -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');
@@ -1,19 +1,8 @@
1
- .flex_direction_row {
2
- display: flex;
3
- flex-direction: row !important;
4
- }
1
+ $flex_direction_values: (
2
+ row: row,
3
+ column: column,
4
+ row_reverse: row-reverse,
5
+ column_reverse: column-reverse
6
+ );
5
7
 
6
- .flex_direction_column {
7
- display: flex;
8
- flex-direction: column !important;
9
- }
10
-
11
- .flex_direction_row_reverse {
12
- display: flex;
13
- flex-direction: row-reverse !important;
14
- }
15
-
16
- .flex_direction_column_reverse {
17
- display: flex;
18
- flex-direction: column-reverse !important;
19
- }
8
+ @include global_props_responsive_css($flex_direction_values, 'flex_direction', 'flex-direction');
@@ -1,9 +1,6 @@
1
- .flex_grow_1 {
2
- display: flex;
3
- flex-grow: 1 !important;
4
- }
1
+ $flex_grow_values: (
2
+ 0: 0,
3
+ 1: 1,
4
+ );
5
5
 
6
- .flex_grow_0 {
7
- display: flex;
8
- flex-grow: 0 !important;
9
- }
6
+ @include global_props_responsive_css($flex_grow_values, 'flex_grow', 'flex-grow');
@@ -1,9 +1,6 @@
1
- .flex_shrink_1 {
2
- display: flex;
3
- flex-shrink: 1 !important;
4
- }
1
+ $flex_shrink_values: (
2
+ 0: 0,
3
+ 1: 1,
4
+ );
5
5
 
6
- .flex_shrink_0 {
7
- display: flex;
8
- flex-shrink: 0 !important;
9
- }
6
+ @include global_props_responsive_css($flex_shrink_values, 'flex_shrink', 'flex-shrink');
@@ -1,14 +1,7 @@
1
- .flex_wrap_wrap {
2
- display: flex;
3
- flex-wrap: wrap !important;
4
- }
1
+ $flex_wrap_values: (
2
+ wrap: wrap,
3
+ nowrap: nowrap,
4
+ wrap_reverse: wrap-reverse,
5
+ );
5
6
 
6
- .flex_wrap_nowrap {
7
- display: flex;
8
- flex-wrap: nowrap !important;
9
- }
10
-
11
- .flex_wrap_wrap_reverse {
12
- display: flex;
13
- flex-wrap: wrap-reverse !important;
14
- }
7
+ @include global_props_responsive_css($flex_wrap_values, 'flex_wrap', 'flex-wrap');