playbook_ui 4.17.0.pre.alpha1 → 4.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (145) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +0 -6
  3. data/app/pb_kits/playbook/_playbook.scss +3 -0
  4. data/app/pb_kits/playbook/data/menu.yml +1 -0
  5. data/app/pb_kits/playbook/index.js +1 -4
  6. data/app/pb_kits/playbook/packs/examples.js +2 -0
  7. data/app/pb_kits/playbook/packs/site_styles/docs/_markdown.scss +1 -1
  8. data/app/pb_kits/playbook/pb_avatar/_avatar.jsx +24 -15
  9. data/app/pb_kits/playbook/pb_avatar/docs/_avatar_status.jsx +45 -0
  10. data/app/pb_kits/playbook/pb_avatar/docs/example.yml +6 -5
  11. data/app/pb_kits/playbook/pb_avatar/docs/index.js +1 -0
  12. data/app/pb_kits/playbook/pb_avatar_action_button/_avatar_action_button.html.erb +32 -0
  13. data/app/pb_kits/playbook/pb_avatar_action_button/_avatar_action_button.jsx +78 -0
  14. data/app/pb_kits/playbook/pb_avatar_action_button/_avatar_action_button.scss +63 -0
  15. data/app/pb_kits/playbook/pb_avatar_action_button/avatar_action_button.rb +44 -0
  16. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_actions.html.erb +15 -0
  17. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_actions.jsx +19 -0
  18. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_default.html.erb +8 -0
  19. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_default.jsx +13 -0
  20. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_on_click.jsx +15 -0
  21. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_onclick.html.erb +14 -0
  22. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_placement.html.erb +27 -0
  23. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_placement.jsx +29 -0
  24. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_tooltip.html.erb +11 -0
  25. data/app/pb_kits/playbook/pb_avatar_action_button/docs/example.yml +16 -0
  26. data/app/pb_kits/playbook/pb_avatar_action_button/docs/index.js +4 -0
  27. data/app/pb_kits/playbook/pb_badge/_badge.jsx +20 -14
  28. data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.jsx +3 -2
  29. data/app/pb_kits/playbook/pb_body/_body.jsx +2 -1
  30. data/app/pb_kits/playbook/pb_body/docs/_body_light.jsx +4 -0
  31. data/app/pb_kits/playbook/pb_button/_button.jsx +2 -1
  32. data/app/pb_kits/playbook/pb_button/docs/_button_default.jsx +6 -0
  33. data/app/pb_kits/playbook/pb_caption/_caption.jsx +19 -17
  34. data/app/pb_kits/playbook/pb_card/_card.html.erb +1 -1
  35. data/app/pb_kits/playbook/pb_card/_card.jsx +35 -38
  36. data/app/pb_kits/playbook/pb_card/_card.scss +0 -10
  37. data/app/pb_kits/playbook/pb_card/card.rb +9 -3
  38. data/app/pb_kits/playbook/pb_card/card_body.rb +1 -5
  39. data/app/pb_kits/playbook/pb_card/card_header.rb +0 -3
  40. data/app/pb_kits/playbook/pb_card/docs/_card_light.html.erb +2 -1
  41. data/app/pb_kits/playbook/pb_checkbox/_checkbox.jsx +17 -18
  42. data/app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.jsx +4 -1
  43. data/app/pb_kits/playbook/pb_contact/_contact.html.erb +16 -3
  44. data/app/pb_kits/playbook/pb_contact/_contact.jsx +58 -34
  45. data/app/pb_kits/playbook/pb_contact/docs/_contact_default.html.erb +1 -1
  46. data/app/pb_kits/playbook/pb_contact/docs/_contact_default.jsx +1 -0
  47. data/app/pb_kits/playbook/pb_currency/_currency.html.erb +1 -0
  48. data/app/pb_kits/playbook/pb_currency/_currency.jsx +37 -21
  49. data/app/pb_kits/playbook/pb_currency/docs/_currency_dark.html.erb +3 -3
  50. data/app/pb_kits/playbook/pb_currency/docs/_currency_dark.jsx +2 -3
  51. data/app/pb_kits/playbook/pb_currency/docs/_currency_large.jsx +2 -3
  52. data/app/pb_kits/playbook/pb_currency/docs/_currency_medium.jsx +2 -2
  53. data/app/pb_kits/playbook/pb_currency/docs/_currency_small.html.erb +1 -1
  54. data/app/pb_kits/playbook/pb_currency/docs/_currency_small.jsx +5 -2
  55. data/app/pb_kits/playbook/pb_dashboard_value/_dashboard_value.jsx +2 -2
  56. data/app/pb_kits/playbook/pb_date/_date.jsx +39 -15
  57. data/app/pb_kits/playbook/pb_date/docs/_date_default.jsx +3 -1
  58. data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.jsx +43 -37
  59. data/app/pb_kits/playbook/pb_date_range_inline/docs/_date_range_inline_default.jsx +2 -2
  60. data/app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.jsx +6 -16
  61. data/app/pb_kits/playbook/pb_date_stacked/_date_stacked.jsx +21 -18
  62. data/app/pb_kits/playbook/pb_date_time_stacked/_date_time_stacked.jsx +30 -33
  63. data/app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx +10 -15
  64. data/app/pb_kits/playbook/pb_distribution_bar/_distribution_bar.jsx +8 -8
  65. data/app/pb_kits/playbook/pb_file_upload/_file_upload.jsx +13 -23
  66. data/app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx +16 -14
  67. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx +13 -12
  68. data/app/pb_kits/playbook/pb_flex/_flex.jsx +35 -20
  69. data/app/pb_kits/playbook/pb_flex/_flex_item.jsx +6 -9
  70. data/app/pb_kits/playbook/pb_form_pill/_form_pill.jsx +14 -19
  71. data/app/pb_kits/playbook/pb_hashtag/_hashtag.jsx +26 -22
  72. data/app/pb_kits/playbook/pb_highlight/_highlight.jsx +13 -12
  73. data/app/pb_kits/playbook/pb_home_address_street/_home_address_street.jsx +85 -80
  74. data/app/pb_kits/playbook/pb_icon/_icon.jsx +54 -33
  75. data/app/pb_kits/playbook/pb_icon_circle/_icon_circle.jsx +13 -9
  76. data/app/pb_kits/playbook/pb_icon_value/_icon_value.jsx +16 -20
  77. data/app/pb_kits/playbook/pb_image/_image.jsx +12 -10
  78. data/app/pb_kits/playbook/pb_label_pill/_label_pill.jsx +15 -25
  79. data/app/pb_kits/playbook/pb_label_value/_label_value.jsx +10 -17
  80. data/app/pb_kits/playbook/pb_layout/_layout.jsx +49 -45
  81. data/app/pb_kits/playbook/pb_layout/_layout.scss +76 -57
  82. data/app/pb_kits/playbook/pb_layout/docs/_layout_collection.html.erb +54 -0
  83. data/app/pb_kits/playbook/pb_layout/docs/_layout_collection.jsx +27 -0
  84. data/app/pb_kits/playbook/pb_layout/docs/example.yml +2 -0
  85. data/app/pb_kits/playbook/pb_layout/docs/index.js +1 -0
  86. data/app/pb_kits/playbook/pb_layout/layout.rb +10 -2
  87. data/app/pb_kits/playbook/pb_legend/_legend.jsx +17 -15
  88. data/app/pb_kits/playbook/pb_line_graph/_line_graph.jsx +3 -2
  89. data/app/pb_kits/playbook/pb_list/_list.jsx +24 -21
  90. data/app/pb_kits/playbook/pb_list/docs/_description.md +7 -1
  91. data/app/pb_kits/playbook/pb_list/docs/_list_layout_left.html.erb +8 -0
  92. data/app/pb_kits/playbook/pb_list/docs/_list_layout_right.html.erb +8 -0
  93. data/app/pb_kits/playbook/pb_list/docs/example.yml +2 -0
  94. data/app/pb_kits/playbook/pb_loading_inline/_loading_inline.jsx +21 -19
  95. data/app/pb_kits/playbook/pb_logistic/_logistic.jsx +4 -11
  96. data/app/pb_kits/playbook/pb_message/_message.jsx +15 -11
  97. data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.jsx +10 -10
  98. data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.jsx +7 -19
  99. data/app/pb_kits/playbook/pb_nav/_nav.jsx +17 -14
  100. data/app/pb_kits/playbook/pb_online_status/_online_status.jsx +5 -13
  101. data/app/pb_kits/playbook/pb_person/_person.jsx +5 -11
  102. data/app/pb_kits/playbook/pb_person_contact/_person_contact.jsx +20 -20
  103. data/app/pb_kits/playbook/pb_pill/_pill.jsx +5 -10
  104. data/app/pb_kits/playbook/pb_popover/_popover.jsx +52 -41
  105. data/app/pb_kits/playbook/pb_progress_pills/_progress_pills.jsx +16 -12
  106. data/app/pb_kits/playbook/pb_progress_simple/_progress_simple.jsx +15 -12
  107. data/app/pb_kits/playbook/pb_progress_step/_progress_step.jsx +17 -10
  108. data/app/pb_kits/playbook/pb_radio/_radio.jsx +3 -1
  109. data/app/pb_kits/playbook/pb_section_separator/_section_separator.jsx +19 -13
  110. data/app/pb_kits/playbook/pb_select/_select.jsx +4 -2
  111. data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.jsx +12 -7
  112. data/app/pb_kits/playbook/pb_stat_change/_stat_change.jsx +14 -13
  113. data/app/pb_kits/playbook/pb_stat_value/_stat_value.jsx +2 -1
  114. data/app/pb_kits/playbook/pb_table/_table.jsx +29 -28
  115. data/app/pb_kits/playbook/pb_table/_table.scss +1 -1
  116. data/app/pb_kits/playbook/pb_table/_table_row.jsx +6 -7
  117. data/app/pb_kits/playbook/pb_table/docs/_table_side_highlight.html.erb +52 -8
  118. data/app/pb_kits/playbook/pb_table/docs/_table_side_highlight.jsx +52 -8
  119. data/app/pb_kits/playbook/pb_table/docs/_table_side_highlight.md +3 -1
  120. data/app/pb_kits/playbook/pb_text_input/_text_input.jsx +3 -5
  121. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_default.jsx +1 -1
  122. data/app/pb_kits/playbook/pb_textarea/_textarea.jsx +2 -1
  123. data/app/pb_kits/playbook/pb_time_range_inline/_time_range_inline.jsx +38 -18
  124. data/app/pb_kits/playbook/pb_time_stacked/_time_stacked.jsx +12 -11
  125. data/app/pb_kits/playbook/pb_timestamp/_timestamp.jsx +7 -14
  126. data/app/pb_kits/playbook/pb_title/_title.jsx +12 -13
  127. data/app/pb_kits/playbook/pb_title/docs/_title_light.html.erb +1 -1
  128. data/app/pb_kits/playbook/pb_title_count/_title_count.jsx +49 -28
  129. data/app/pb_kits/playbook/pb_title_count/docs/_title_count_align.jsx +31 -0
  130. data/app/pb_kits/playbook/pb_title_count/docs/_title_count_default.jsx +13 -2
  131. data/app/pb_kits/playbook/pb_title_count/docs/example.yml +4 -5
  132. data/app/pb_kits/playbook/pb_title_count/docs/index.js +1 -0
  133. data/app/pb_kits/playbook/pb_title_detail/_title_detail.jsx +7 -18
  134. data/app/pb_kits/playbook/pb_toggle/_toggle.jsx +9 -11
  135. data/app/pb_kits/playbook/pb_user/_user.jsx +37 -37
  136. data/app/pb_kits/playbook/pb_user_badge/_user_badge.jsx +7 -7
  137. data/app/pb_kits/playbook/pb_weekday_stacked/_weekday_stacked.jsx +32 -30
  138. data/app/pb_kits/playbook/props.rb +48 -0
  139. data/app/pb_kits/playbook/tokens/_spacing.scss +1 -0
  140. data/app/pb_kits/playbook/utilities/_spacing.scss +42 -0
  141. data/app/pb_kits/playbook/utilities/spacing.js +33 -0
  142. data/app/views/playbook/samples/dashboards/index.html.erb +3 -1
  143. data/lib/playbook/version.rb +1 -1
  144. data/lib/tasks/pb_release.rake +0 -2
  145. metadata +28 -6
@@ -1,21 +1,23 @@
1
1
  /* @flow */
2
2
 
3
3
  import React from 'react'
4
+ import classnames from 'classnames'
5
+ import { spacing } from '../utilities/spacing.js'
4
6
 
5
7
  type ImageProps = {
6
8
  url: string,
7
9
  alt?: string,
8
10
  }
9
11
 
10
- const Image = ({
11
- alt = '',
12
- url = '',
13
- }: ImageProps) => (
14
- <img
15
- alt={alt}
16
- className="pb_image lazyload blur_up"
17
- data-src={url}
18
- />
19
- )
12
+ const Image = (props: ImageProps) => {
13
+ const { alt = '', url = '' } = props
14
+ return (
15
+ <img
16
+ alt={alt}
17
+ className={classnames('pb_image lazyload blur_up', spacing(props))}
18
+ data-src={url}
19
+ />
20
+ )
21
+ }
20
22
 
21
23
  export default Image
@@ -2,16 +2,11 @@
2
2
 
3
3
  import React from 'react'
4
4
  import classnames from 'classnames'
5
+ import { spacing } from '../utilities/spacing.js'
5
6
 
6
- import {
7
- buildAriaProps,
8
- buildDataProps,
9
- } from '../utilities/props'
7
+ import { buildAriaProps, buildDataProps } from '../utilities/props'
10
8
 
11
- import {
12
- Caption,
13
- Pill,
14
- } from '../'
9
+ import { Caption, Pill } from '../'
15
10
 
16
11
  type LabelPillProps = {
17
12
  aria?: object,
@@ -20,34 +15,30 @@ type LabelPillProps = {
20
15
  id?: String,
21
16
  label?: String,
22
17
  pillValue?: String,
23
- variant: 'error' | 'info' | 'neutral' | 'primary' | 'success' | 'warning',
18
+ variant: "error" | "info" | "neutral" | "primary" | "success" | "warning",
24
19
  }
25
20
 
26
- const LabelPill = ({
27
- aria = {},
28
- className,
29
- data = {},
30
- id,
31
- label,
32
- pillValue,
33
- variant = 'neutral',
34
- }: LabelPillProps) => {
21
+ const LabelPill = (props: LabelPillProps) => {
22
+ const {
23
+ aria = {},
24
+ className,
25
+ data = {},
26
+ id,
27
+ label,
28
+ pillValue,
29
+ variant = 'neutral',
30
+ } = props
35
31
  const ariaProps = buildAriaProps(aria)
36
32
  const dataProps = buildDataProps(data)
37
- const css = classnames([
38
- 'pb_label_pill_kit',
39
- className,
40
- ])
33
+ const css = classnames(['pb_label_pill_kit', className], spacing(props))
41
34
 
42
35
  return (
43
-
44
36
  <div
45
37
  {...ariaProps}
46
38
  {...dataProps}
47
39
  className={css}
48
40
  id={id}
49
41
  >
50
-
51
42
  <Caption
52
43
  className="pb_label_pill_label"
53
44
  text={label}
@@ -58,7 +49,6 @@ const LabelPill = ({
58
49
  text={pillValue}
59
50
  variant={variant}
60
51
  />
61
-
62
52
  </div>
63
53
  )
64
54
  }
@@ -3,34 +3,27 @@
3
3
  import React from 'react'
4
4
  import classnames from 'classnames'
5
5
  import { Body, Caption } from '../'
6
+ import { spacing } from '../utilities/spacing.js'
6
7
 
7
8
  type LabelValueProps = {
8
9
  className?: String,
9
10
  label: String,
10
11
  value: String,
11
- dark?: Boolean
12
+ dark?: Boolean,
12
13
  }
13
14
 
14
- const LabelValue = ({
15
- className,
16
- label,
17
- value,
18
- dark = false,
19
- }: LabelValueProps) => {
15
+ const LabelValue = (props: LabelValueProps) => {
16
+ const { className, label, value, dark = false } = props
20
17
  const themeStyle = dark === true ? '_dark' : ''
21
- const css = classnames([
22
- 'pb_label_value_kit' + themeStyle,
23
- className,
24
- ])
18
+ const css = classnames(
19
+ ['pb_label_value_kit' + themeStyle, className],
20
+ spacing(props)
21
+ )
25
22
 
26
23
  return (
27
24
  <div className={css}>
28
- <Caption
29
- text={label}
30
- />
31
- <Body
32
- text={value}
33
- />
25
+ <Caption text={label} />
26
+ <Body text={value} />
34
27
  </div>
35
28
  )
36
29
  }
@@ -2,24 +2,24 @@
2
2
 
3
3
  import React from 'react'
4
4
  import classnames from 'classnames'
5
- import {
6
- buildAriaProps,
7
- buildCss,
8
- buildDataProps,
9
- } from '../utilities/props'
5
+ import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
6
+
7
+ import { spacing } from '../utilities/spacing.js'
10
8
 
11
9
  type LayoutPropTypes = {
12
10
  aria?: object,
13
11
  children?: Array<React.ReactNode> | React.ReactNode,
14
12
  className?: String,
15
- collapse?: 'xs' | 'sm' | 'md' | 'lg' | 'xl',
13
+ collapse?: "xs" | "sm" | "md" | "lg" | "xl",
16
14
  dark?: Boolean,
17
15
  data?: object,
18
16
  full?: Boolean,
19
17
  position?: 'left' | 'right',
20
18
  size?: 'xs' | 'sm' | 'md' | 'base' | 'lg' | 'xl',
21
19
  variant?: 'light' | 'dark' | 'gradient',
22
- transparent?: Boolean
20
+ transparent?: Boolean,
21
+ layout?: 'sidebar' | 'collection',
22
+
23
23
  }
24
24
 
25
25
  type LayoutSideProps = {
@@ -33,69 +33,73 @@ type LayoutBodyProps = {
33
33
  }
34
34
 
35
35
  // Side component
36
- const Side = ({
37
- children,
38
- className,
39
- }: LayoutSideProps) => {
36
+ const Side = ({ children, className }: LayoutSideProps) => {
40
37
  return (
41
- <div className={classnames('layout_sidebar', className)}>
42
- {children}
43
- </div>
38
+ <div className={classnames('layout_sidebar', className)}>{children}</div>
44
39
  )
45
40
  }
46
41
 
47
42
  // Body component
48
- const Body = ({
49
- children,
50
- className,
51
- }: LayoutBodyProps) => {
52
- return (
53
- <div className={classnames('layout_body', className)}>
54
- {children}
55
- </div>
56
- )
43
+ const Body = ({ children, className }: LayoutBodyProps) => {
44
+ return <div className={classnames('layout_body', className)}>{children}</div>
57
45
  }
58
46
 
59
47
  // Main componenet
60
- const Layout = ({
61
- aria = {},
62
- children,
63
- className,
64
- collapse = 'md',
65
- dark = false,
66
- data = {},
67
- full = false,
68
- position = 'left',
69
- size = 'md',
70
- variant = 'light',
71
- transparent = false,
72
- }: LayoutPropTypes) => {
48
+
49
+ const Layout = (props: LayoutPropTypes) => {
50
+ const {
51
+ aria = {},
52
+ children,
53
+ className,
54
+ collapse = 'md',
55
+ dark = false,
56
+ data = {},
57
+ full = false,
58
+ position = 'left',
59
+ size = 'md',
60
+ layout = 'sidebar',
61
+ variant = 'light',
62
+ transparent = false,
63
+ } = props
73
64
  const ariaProps = buildAriaProps(aria)
74
65
  const dataProps = buildDataProps(data)
75
- const layoutCss = buildCss('pb_layout_kit', `size_${size}`, position, variant, {
66
+ const layoutCss = buildCss(`pb_layout_kit_${layout}`, `size_${size}`, position, variant, {
76
67
  'dark': dark,
77
68
  'transparent': transparent,
78
69
  'full': full,
79
70
  })
71
+
80
72
  const layoutCollapseCss = buildCss('layout', position, 'collapse', collapse)
81
73
 
82
- const layoutChildren = typeof(children) === 'object' && children.length ? children : [children]
74
+ const layoutChildren =
75
+ typeof children === 'object' && children.length ? children : [children]
83
76
 
84
77
  const subComponentTags = (tagName) => {
85
- return layoutChildren.filter((c) => {
86
- return c.type && c.type.displayName === tagName
87
- }).map((child, i) => {
88
- return React.cloneElement(child, { key: `${tagName.toLowerCase()}-${i}` })
89
- })
78
+ return layoutChildren
79
+ .filter((c) => {
80
+ return c.type && c.type.displayName === tagName
81
+ })
82
+ .map((child, i) => {
83
+ return React.cloneElement(child, {
84
+ key: `${tagName.toLowerCase()}-${i}`,
85
+ })
86
+ })
90
87
  }
91
88
 
92
- const nonSideChildren = layoutChildren.filter((child) => !child.type || child.type.displayName !== 'Side')
89
+ const nonSideChildren = layoutChildren.filter(
90
+ (child) => !child.type || child.type.displayName !== 'Side'
91
+ )
93
92
 
94
93
  return (
95
94
  <div
96
95
  {...ariaProps}
97
96
  {...dataProps}
98
- className={classnames(layoutCss, layoutCollapseCss, className)}
97
+ className={classnames(
98
+ layoutCss,
99
+ layoutCollapseCss,
100
+ className,
101
+ spacing(props)
102
+ )}
99
103
  >
100
104
  {subComponentTags('Side')}
101
105
  {nonSideChildren}
@@ -4,80 +4,99 @@
4
4
  @import "./layout_mixin";
5
5
 
6
6
  [class^=pb_layout_kit] {
7
- $layout_sizes: (
8
- "xs": 64px,
9
- "sm": 200px,
10
- "md": 250px,
11
- "lg": 300px,
12
- "xl": 365px,
13
- );
14
- $positions: (
15
- "left",
16
- "right",
17
- );
18
- $colors: (
19
- "light",
20
- "dark",
21
- "gradient",
22
- "transparent",
23
- );
24
7
 
25
- // Sections
26
- &[class*=_section] {
27
- padding: $space_sm $space_xl;
28
- &[class*=_border] {
8
+ &[class*=_collection]{
9
+ div.layout_body{
10
+ display: grid;
11
+ grid-template-rows: 1fr;
12
+ grid-column-gap: $space_sm;
13
+ grid-row-gap: $space_sm;
14
+ grid-template-columns: repeat(4, 1fr);
15
+
16
+ @media screen and (max-width: $screen-md-min) {
17
+ grid-template-columns: repeat(2, 1fr);
18
+ }
19
+ @media screen and (max-width: $screen-xs-min) {
20
+ grid-template-columns: repeat(1, 1fr);
21
+ }
22
+ }
23
+
24
+ }
25
+ &[class*=_sidebar]{
26
+ $layout_sizes: (
27
+ "xs": 64px,
28
+ "sm": 200px,
29
+ "md": 250px,
30
+ "lg": 300px,
31
+ "xl": 365px,
32
+ );
33
+ $positions: (
34
+ "left",
35
+ "right",
36
+ );
37
+ $colors: (
38
+ "light",
39
+ "dark",
40
+ "gradient",
41
+ "transparent",
42
+ );
43
+
44
+ // Sections
45
+ &[class*=_section] {
29
46
  padding: $space_sm $space_xl;
30
- border-bottom: 1px solid $border_light;
31
- &[class*=_margin] {
32
- margin: $space_sm $space_xl;
47
+ &[class*=_border] {
48
+ padding: $space_sm $space_xl;
33
49
  border-bottom: 1px solid $border_light;
50
+ &[class*=_margin] {
51
+ margin: $space_sm $space_xl;
52
+ border-bottom: 1px solid $border_light;
53
+ }
34
54
  }
35
55
  }
36
- }
37
56
 
38
- // sidebar and Body
39
- @each $name, $size in $layout_sizes {
40
- &[class*=_size_#{$name}] {
41
- @each $position in $positions {
42
- &[class*=_#{$position}] {
43
- @each $color in $colors {
44
- &[class*=_#{$color}] {
45
- @include layout_settings($size, $position, $color, "#{&}");
57
+ // sidebar and Body
58
+ @each $name, $size in $layout_sizes {
59
+ &[class*=_size_#{$name}] {
60
+ @each $position in $positions {
61
+ &[class*=_#{$position}] {
62
+ @each $color in $colors {
63
+ &[class*=_#{$color}] {
64
+ @include layout_settings($size, $position, $color, "#{&}");
65
+ }
46
66
  }
47
67
  }
48
68
  }
49
69
  }
50
70
  }
51
- }
52
71
 
53
72
 
54
- // Collapse Settings
55
- @each $position in $positions {
56
- @each $breakpoint_name, $breakpoint in $breakpoints {
57
- &_#{$position}_collapse_#{$breakpoint_name} {
58
- @include break_at($breakpoint) {
59
- @if $position == 'left' {
60
- grid-template-areas: "layout_collapsed_#{$breakpoint_name}_sidebar" "layout_collapsed_#{$breakpoint_name}_body";
61
- grid-template-rows: auto 1fr;
73
+ // Collapse Settings
74
+ @each $position in $positions {
75
+ @each $breakpoint_name, $breakpoint in $breakpoints {
76
+ &_#{$position}_collapse_#{$breakpoint_name} {
77
+ @include break_at($breakpoint) {
78
+ @if $position == 'left' {
79
+ grid-template-areas: "layout_collapsed_#{$breakpoint_name}_sidebar" "layout_collapsed_#{$breakpoint_name}_body";
80
+ grid-template-rows: auto 1fr;
62
81
 
63
- } @else {
64
- grid-template-areas: "layout_collapsed_#{$breakpoint_name}_body" "layout_collapsed_#{$breakpoint_name}_sidebar";
65
- grid-template-rows: 1fr auto;
66
- }
67
- grid-template-columns: 1fr;
68
- &.full {
69
- min-height: auto !important;
70
- }
71
- .layout_sidebar {
72
- grid-area: "layout_collapsed_#{$breakpoint_name}_sidebar";
73
- border-width: 0 0 1px 0;
74
- }
75
- .layout_body {
76
- grid-area: "layout_collapsed_#{$breakpoint_name}_body";
82
+ } @else {
83
+ grid-template-areas: "layout_collapsed_#{$breakpoint_name}_body" "layout_collapsed_#{$breakpoint_name}_sidebar";
84
+ grid-template-rows: 1fr auto;
85
+ }
86
+ grid-template-columns: 1fr;
87
+ &.full {
88
+ min-height: auto !important;
89
+ }
90
+ .layout_sidebar {
91
+ grid-area: "layout_collapsed_#{$breakpoint_name}_sidebar";
92
+ border-width: 0 0 1px 0;
93
+ }
94
+ .layout_body {
95
+ grid-area: "layout_collapsed_#{$breakpoint_name}_body";
96
+ }
77
97
  }
78
98
  }
79
99
  }
80
100
  }
81
101
  }
82
-
83
102
  }