playbook_ui 6.0.0 → 6.0.1.pre.alpha6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (131) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/_playbook.scss +2 -1
  3. data/app/pb_kits/playbook/data/menu.yml +3 -2
  4. data/app/pb_kits/playbook/index.js +1 -0
  5. data/app/pb_kits/playbook/packs/examples.js +2 -0
  6. data/app/pb_kits/playbook/pb_avatar/_avatar.jsx +2 -2
  7. data/app/pb_kits/playbook/pb_badge/_badge.jsx +2 -5
  8. data/app/pb_kits/playbook/pb_badge/_badge.scss +1 -1
  9. data/app/pb_kits/playbook/pb_badge/badge.rb +1 -6
  10. data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.jsx +2 -2
  11. data/app/pb_kits/playbook/pb_body/_body.jsx +3 -6
  12. data/app/pb_kits/playbook/pb_body/_body.scss +6 -0
  13. data/app/pb_kits/playbook/pb_body/body.rb +2 -8
  14. data/app/pb_kits/playbook/pb_button/_button.jsx +2 -5
  15. data/app/pb_kits/playbook/pb_button/_button.scss +1 -1
  16. data/app/pb_kits/playbook/pb_button/button.rb +1 -7
  17. data/app/pb_kits/playbook/pb_button/docs/_button_default.jsx +2 -0
  18. data/app/pb_kits/playbook/pb_caption/_caption.jsx +2 -2
  19. data/app/pb_kits/playbook/pb_card/_card.jsx +17 -14
  20. data/app/pb_kits/playbook/pb_card/_card.scss +4 -1
  21. data/app/pb_kits/playbook/pb_card/card.rb +2 -9
  22. data/app/pb_kits/playbook/pb_card/docs/_card_dark.html.erb +1 -1
  23. data/app/pb_kits/playbook/pb_checkbox/_checkbox.jsx +2 -2
  24. data/app/pb_kits/playbook/pb_checkbox/checkbox.rb +4 -8
  25. data/app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.jsx +2 -2
  26. data/app/pb_kits/playbook/pb_circle_icon_button/circle_icon_button.rb +0 -2
  27. data/app/pb_kits/playbook/pb_contact/_contact.jsx +2 -2
  28. data/app/pb_kits/playbook/pb_currency/_currency.jsx +2 -2
  29. data/app/pb_kits/playbook/pb_dashboard/pbChartsLightTheme.js +26 -0
  30. data/app/pb_kits/playbook/pb_dashboard_value/_dashboard_value.jsx +2 -2
  31. data/app/pb_kits/playbook/pb_date/_date.jsx +4 -4
  32. data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.jsx +2 -2
  33. data/app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.jsx +2 -2
  34. data/app/pb_kits/playbook/pb_date_stacked/_date_stacked.jsx +2 -2
  35. data/app/pb_kits/playbook/pb_date_time_stacked/_date_time_stacked.jsx +2 -2
  36. data/app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx +2 -2
  37. data/app/pb_kits/playbook/pb_distribution_bar/_distribution_bar.jsx +2 -2
  38. data/app/pb_kits/playbook/pb_file_upload/_file_upload.jsx +2 -2
  39. data/app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx +2 -2
  40. data/app/pb_kits/playbook/pb_filter/docs/_filter_default.html.erb +6 -2
  41. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx +2 -2
  42. data/app/pb_kits/playbook/pb_flex/_flex.jsx +2 -2
  43. data/app/pb_kits/playbook/pb_flex/_flex_item.jsx +2 -2
  44. data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +1 -0
  45. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +1 -0
  46. data/app/pb_kits/playbook/pb_form/docs/_form_simple_form.html.erb +3 -1
  47. data/app/pb_kits/playbook/pb_form/docs/_form_simple_form_validate.html.erb +3 -1
  48. data/app/pb_kits/playbook/pb_form/form_builder.rb +2 -0
  49. data/app/pb_kits/playbook/pb_form/form_builder/checkbox_field.rb +26 -0
  50. data/app/pb_kits/playbook/pb_form/form_builder/form_field_builder.rb +1 -0
  51. data/app/pb_kits/playbook/pb_form_pill/_form_pill.jsx +2 -2
  52. data/app/pb_kits/playbook/pb_gauge/_gauge.html.erb +12 -0
  53. data/app/pb_kits/playbook/pb_gauge/_gauge.jsx +110 -0
  54. data/app/pb_kits/playbook/pb_gauge/_gauge.scss +11 -0
  55. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_default.html.erb +11 -0
  56. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_default.jsx +17 -0
  57. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_disable_animation.html.erb +12 -0
  58. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_disable_animation.jsx +18 -0
  59. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_full_circle.html.erb +14 -0
  60. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_full_circle.jsx +20 -0
  61. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_height.html.erb +15 -0
  62. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_height.jsx +23 -0
  63. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_live_data.jsx +40 -0
  64. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_min_max.html.erb +15 -0
  65. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_min_max.jsx +21 -0
  66. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_min_max.md +1 -0
  67. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_sizing.html.erb +26 -0
  68. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_sizing.jsx +37 -0
  69. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_sizing.md +1 -0
  70. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_title.html.erb +14 -0
  71. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_title.jsx +20 -0
  72. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_units.html.erb +29 -0
  73. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_units.jsx +29 -0
  74. data/app/pb_kits/playbook/pb_gauge/docs/example.yml +24 -0
  75. data/app/pb_kits/playbook/pb_gauge/docs/index.js +9 -0
  76. data/app/pb_kits/playbook/pb_gauge/gauge.rb +57 -0
  77. data/app/pb_kits/playbook/pb_hashtag/_hashtag.jsx +2 -2
  78. data/app/pb_kits/playbook/pb_highlight/_highlight.jsx +2 -2
  79. data/app/pb_kits/playbook/pb_home_address_street/_home_address_street.jsx +2 -2
  80. data/app/pb_kits/playbook/pb_icon/_icon.jsx +2 -2
  81. data/app/pb_kits/playbook/pb_icon_circle/_icon_circle.jsx +2 -2
  82. data/app/pb_kits/playbook/pb_icon_value/_icon_value.jsx +2 -2
  83. data/app/pb_kits/playbook/pb_image/_image.jsx +2 -2
  84. data/app/pb_kits/playbook/pb_label_pill/_label_pill.jsx +2 -2
  85. data/app/pb_kits/playbook/pb_label_value/_label_value.jsx +2 -2
  86. data/app/pb_kits/playbook/pb_layout/_layout.jsx +6 -6
  87. data/app/pb_kits/playbook/pb_legend/_legend.jsx +2 -2
  88. data/app/pb_kits/playbook/pb_line_graph/_line_graph.jsx +2 -2
  89. data/app/pb_kits/playbook/pb_list/_list.jsx +2 -2
  90. data/app/pb_kits/playbook/pb_list/_list_item.jsx +2 -2
  91. data/app/pb_kits/playbook/pb_loading_inline/_loading_inline.jsx +2 -2
  92. data/app/pb_kits/playbook/pb_logistic/_logistic.jsx +111 -0
  93. data/app/pb_kits/playbook/pb_message/_message.jsx +2 -2
  94. data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.jsx +2 -2
  95. data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.jsx +2 -2
  96. data/app/pb_kits/playbook/pb_nav/_nav.jsx +2 -2
  97. data/app/pb_kits/playbook/pb_online_status/_online_status.jsx +2 -2
  98. data/app/pb_kits/playbook/pb_person/_person.jsx +2 -2
  99. data/app/pb_kits/playbook/pb_person_contact/_person_contact.jsx +2 -2
  100. data/app/pb_kits/playbook/pb_pill/_pill.jsx +2 -2
  101. data/app/pb_kits/playbook/pb_popover/_popover.jsx +2 -2
  102. data/app/pb_kits/playbook/pb_progress_pills/_progress_pills.jsx +2 -2
  103. data/app/pb_kits/playbook/pb_progress_simple/_progress_simple.jsx +2 -2
  104. data/app/pb_kits/playbook/pb_progress_step/_progress_step.jsx +2 -2
  105. data/app/pb_kits/playbook/pb_radio/_radio.jsx +2 -2
  106. data/app/pb_kits/playbook/pb_section_separator/_section_separator.jsx +2 -2
  107. data/app/pb_kits/playbook/pb_select/_select.jsx +2 -2
  108. data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.jsx +2 -2
  109. data/app/pb_kits/playbook/pb_stat_change/_stat_change.jsx +2 -2
  110. data/app/pb_kits/playbook/pb_stat_value/_stat_value.jsx +2 -2
  111. data/app/pb_kits/playbook/pb_table/_table.jsx +2 -2
  112. data/app/pb_kits/playbook/pb_table/_table_row.jsx +2 -2
  113. data/app/pb_kits/playbook/pb_text_input/_text_input.jsx +2 -2
  114. data/app/pb_kits/playbook/pb_textarea/_textarea.jsx +2 -2
  115. data/app/pb_kits/playbook/pb_time_range_inline/_time_range_inline.jsx +2 -2
  116. data/app/pb_kits/playbook/pb_time_stacked/_time_stacked.jsx +2 -2
  117. data/app/pb_kits/playbook/pb_timestamp/_timestamp.jsx +2 -2
  118. data/app/pb_kits/playbook/pb_title/_title.jsx +2 -2
  119. data/app/pb_kits/playbook/pb_title_count/_title_count.jsx +2 -2
  120. data/app/pb_kits/playbook/pb_title_detail/_title_detail.jsx +2 -2
  121. data/app/pb_kits/playbook/pb_toggle/_toggle.jsx +2 -2
  122. data/app/pb_kits/playbook/pb_user/_user.jsx +2 -2
  123. data/app/pb_kits/playbook/pb_user_badge/_user_badge.jsx +2 -2
  124. data/app/pb_kits/playbook/pb_weekday_stacked/_weekday_stacked.jsx +2 -2
  125. data/app/pb_kits/playbook/plugins/pb_chart.js +74 -0
  126. data/app/pb_kits/playbook/props.rb +6 -0
  127. data/app/pb_kits/playbook/utilities/{spacing.js → globalProps.js} +14 -1
  128. data/app/pb_kits/playbook/utilities/props.js +1 -0
  129. data/lib/generators/kit/templates/kit_jsx.erb.tt +2 -2
  130. data/lib/playbook/version.rb +1 -1
  131. metadata +34 -6
@@ -4,8 +4,8 @@ import React from 'react'
4
4
  import classnames from 'classnames'
5
5
  import DateTime from '../pb_kit/dateTime.js'
6
6
  import { buildAriaProps, buildDataProps } from '../utilities/props'
7
+ import { globalProps } from '../utilities/globalProps.js'
7
8
  import { Body, Caption, Flex, Icon, Title } from '../'
8
- import { spacing } from '../utilities/spacing.js'
9
9
 
10
10
  type LabelValueProps = {
11
11
  aria?: object,
@@ -53,7 +53,7 @@ const LabelValue = (props: LabelValueProps) => {
53
53
  const themeStyle = dark === true ? '_dark' : ''
54
54
  const css = classnames(
55
55
  ['pb_label_value_kit' + themeStyle, className],
56
- spacing(props)
56
+ globalProps(props)
57
57
  )
58
58
 
59
59
  return (
@@ -4,7 +4,7 @@ import React from 'react'
4
4
  import classnames from 'classnames'
5
5
  import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
6
6
 
7
- import { spacing } from '../utilities/spacing.js'
7
+ import { globalProps } from '../utilities/globalProps.js'
8
8
 
9
9
  type LayoutPropTypes = {
10
10
  aria?: object,
@@ -46,7 +46,7 @@ type LayoutFooterProps = {
46
46
  const Side = (props: LayoutSideProps) => {
47
47
  const { children, className } = props
48
48
  return (
49
- <div className={classnames('layout_sidebar', className, spacing(props))}>
49
+ <div className={classnames('layout_sidebar', className, globalProps(props))}>
50
50
  {children}
51
51
  </div>
52
52
  )
@@ -56,7 +56,7 @@ const Side = (props: LayoutSideProps) => {
56
56
  const Body = (props: LayoutBodyProps) => {
57
57
  const { children, className } = props
58
58
  return (
59
- <div className={classnames('layout_body', className, spacing(props))}>
59
+ <div className={classnames('layout_body', className, globalProps(props))}>
60
60
  {children}
61
61
  </div>
62
62
  )
@@ -66,7 +66,7 @@ const Body = (props: LayoutBodyProps) => {
66
66
  const Header = (props: LayoutHeaderProps) => {
67
67
  const { children, className } = props
68
68
  return (
69
- <div className={classnames('layout_header', className, spacing(props))}>
69
+ <div className={classnames('layout_header', className, globalProps(props))}>
70
70
  {children}
71
71
  </div>
72
72
  )
@@ -76,7 +76,7 @@ const Header = (props: LayoutHeaderProps) => {
76
76
  const Footer = (props: LayoutFooterProps) => {
77
77
  const { children, className } = props
78
78
  return (
79
- <div className={classnames('layout_footer', className, spacing(props))}>
79
+ <div className={classnames('layout_footer', className, globalProps(props))}>
80
80
  {children}
81
81
  </div>
82
82
  )
@@ -148,7 +148,7 @@ const Layout = (props: LayoutPropTypes) => {
148
148
  layoutCss,
149
149
  layoutCollapseCss,
150
150
  className,
151
- spacing(props)
151
+ globalProps(props)
152
152
  )}
153
153
  >
154
154
  {subComponentTags('Side')}
@@ -3,7 +3,7 @@
3
3
  import React from 'react'
4
4
  import classnames from 'classnames'
5
5
  import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
6
- import { spacing } from '../utilities/spacing.js'
6
+ import { globalProps } from '../utilities/globalProps.js'
7
7
 
8
8
  import { Body, Title } from '../'
9
9
 
@@ -41,7 +41,7 @@ const Legend = (props: LegendProps) => {
41
41
  const darkClass = dark ? 'dark' : 'light'
42
42
  const bodyCSS = classnames(
43
43
  buildCss('pb_legend_kit', color, darkClass), className,
44
- spacing(props)
44
+ globalProps(props)
45
45
  )
46
46
 
47
47
  return (
@@ -2,7 +2,7 @@
2
2
 
3
3
  import React from 'react'
4
4
  import classnames from 'classnames'
5
- import { spacing } from '../utilities/spacing.js'
5
+ import { globalProps } from '../utilities/globalProps.js'
6
6
  import { pbChart } from '../'
7
7
 
8
8
  type LineGraphProps = {
@@ -77,7 +77,7 @@ export default class LineGraph extends React.Component<LineGraphProps> {
77
77
 
78
78
  return (
79
79
  <div
80
- className={classnames(className, spacing(this.props))}
80
+ className={classnames(className, globalProps(this.props))}
81
81
  id={id}
82
82
  />
83
83
  )
@@ -3,7 +3,7 @@
3
3
  import React, { type Node } from 'react'
4
4
  import classnames from 'classnames'
5
5
  import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
6
- import { spacing } from '../utilities/spacing.js'
6
+ import { globalProps } from '../utilities/globalProps.js'
7
7
 
8
8
  type ListProps = {
9
9
  aria?: object,
@@ -53,7 +53,7 @@ const List = (props: ListProps) => {
53
53
  ordered: ordered,
54
54
  xpadding: xpadding,
55
55
  }), className,
56
- spacing(props)
56
+ globalProps(props)
57
57
  )
58
58
 
59
59
  return (
@@ -3,7 +3,7 @@
3
3
  import React, { type Node } from 'react'
4
4
  import classnames from 'classnames'
5
5
  import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
6
- import { spacing } from '../utilities/spacing.js'
6
+ import { globalProps } from '../utilities/globalProps.js'
7
7
 
8
8
  type ListItemProps = {
9
9
  aria?: object,
@@ -28,7 +28,7 @@ const ListItem = (props: ListItemProps) => {
28
28
  const dataProps = buildDataProps(data)
29
29
  const classes = classnames(
30
30
  buildCss('pb_item_kit'), className,
31
- spacing(props)
31
+ globalProps(props)
32
32
  )
33
33
 
34
34
  return (
@@ -4,7 +4,7 @@ import React from 'react'
4
4
  import classnames from 'classnames'
5
5
  import { Body, Icon } from '../'
6
6
 
7
- import { spacing } from '../utilities/spacing.js'
7
+ import { globalProps } from '../utilities/globalProps.js'
8
8
 
9
9
  type LoadingInlineProps = {
10
10
  align?: "left" | "center" | "right",
@@ -18,7 +18,7 @@ const LoadingInline = (props: LoadingInlineProps) => {
18
18
  const { align = 'left' } = props
19
19
  return (
20
20
  <div
21
- className={classnames(`pb_loading_inline_kit_${align}`, spacing(props))}
21
+ className={classnames(`pb_loading_inline_kit_${align}`, globalProps(props))}
22
22
  >
23
23
  <Body color="light">
24
24
  <Icon
@@ -0,0 +1,111 @@
1
+ /* @flow */
2
+
3
+ import React from 'react'
4
+ import classnames from 'classnames'
5
+ import DateTime from '../pb_kit/dateTime.js'
6
+ import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
7
+ import { Body, Caption, Icon, Title } from '../'
8
+ import { globalProps } from '../utilities/globalProps.js'
9
+
10
+ const dateString = (value: DateTime) => {
11
+ const month = value.toMonthNum()
12
+ const day = value.toDay()
13
+
14
+ return ` · ${month}/${day}`
15
+ }
16
+
17
+ type LogisticProps = {
18
+ aria?: object,
19
+ className?: String,
20
+ dark?: Boolean,
21
+ data?: object,
22
+ date: String,
23
+ id?: String,
24
+ link?: String,
25
+ projectName?: String,
26
+ projectNumber?: Number,
27
+ }
28
+
29
+ const Logistic = (props: LogisticProps) => {
30
+ const { aria = {},
31
+ className,
32
+ dark = false,
33
+ data = {},
34
+ date,
35
+ id,
36
+ link,
37
+ projectName,
38
+ projectNumber } = props
39
+
40
+ const ariaProps = buildAriaProps(aria)
41
+ const dataProps = buildDataProps(data)
42
+ const formattedDate = new DateTime({ value: date })
43
+ const classes = classnames(buildCss('pb_logistic_kit', { dark: dark }), className, globalProps(props))
44
+
45
+ return (
46
+ <div
47
+ {...ariaProps}
48
+ {...dataProps}
49
+ className={classes}
50
+ id={id}
51
+ >
52
+ <Body color="light">
53
+ <Caption text="Project" />
54
+ <Icon
55
+ fixedWidth
56
+ icon="home"
57
+ />
58
+
59
+ {` ${projectNumber}`}
60
+
61
+ <Choose>
62
+ <When condition={link}>
63
+ <a
64
+ className="pb_logistic_kit_links"
65
+ href={link}
66
+ >
67
+ <Choose>
68
+ <When condition={date}>
69
+ <Title
70
+ size={4}
71
+ tag="span"
72
+ text={' ' + projectName + dateString(formattedDate)}
73
+ />
74
+ </When>
75
+ <Otherwise>
76
+ <Title
77
+ size={4}
78
+ tag="span"
79
+ text={' ' + projectName}
80
+ />
81
+ </Otherwise>
82
+ </Choose>
83
+ </a>
84
+ </When>
85
+ <Otherwise>
86
+ <Choose>
87
+ <When condition={date}>
88
+ <Title
89
+ dark={dark}
90
+ size={4}
91
+ tag="span"
92
+ text={' ' + projectName + dateString(formattedDate)}
93
+ />
94
+ </When>
95
+ <Otherwise>
96
+ <Title
97
+ dark={dark}
98
+ size={4}
99
+ tag="span"
100
+ text={' ' + projectName}
101
+ />
102
+ </Otherwise>
103
+ </Choose>
104
+ </Otherwise>
105
+ </Choose>
106
+ </Body>
107
+ </div>
108
+ )
109
+ }
110
+
111
+ export default Logistic
@@ -4,7 +4,7 @@ import React from 'react'
4
4
  import { Avatar, Body, Caption } from '../'
5
5
  import classnames from 'classnames'
6
6
  import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
7
- import { spacing } from '../utilities/spacing.js'
7
+ import { globalProps } from '../utilities/globalProps.js'
8
8
 
9
9
  type MessageProps = {
10
10
  aria: object,
@@ -39,7 +39,7 @@ const Message = (props: MessageProps) => {
39
39
  ? 'pb_message_kit_avatar'
40
40
  : 'pb_message_kit'
41
41
 
42
- const classes = classnames(buildCss(baseClassName), className, spacing(props))
42
+ const classes = classnames(buildCss(baseClassName), className, globalProps(props))
43
43
 
44
44
  return (
45
45
  <div
@@ -4,7 +4,7 @@ import React from 'react'
4
4
  import classnames from 'classnames'
5
5
  import { buildCss } from '../utilities/props'
6
6
  import { Avatar } from '../'
7
- import { spacing } from '../utilities/spacing.js'
7
+ import { globalProps } from '../utilities/globalProps.js'
8
8
 
9
9
  type MultipleUsersProps = {
10
10
  className?: String,
@@ -25,7 +25,7 @@ const MultipleUsers = (props: MultipleUsersProps) => {
25
25
  className={classnames(
26
26
  className,
27
27
  buildCss('pb_multiple_users_kit', reverse && 'reverse'),
28
- spacing(props)
28
+ globalProps(props)
29
29
  )}
30
30
  id={id}
31
31
  >
@@ -3,7 +3,7 @@
3
3
 
4
4
  import React from 'react'
5
5
  import classnames from 'classnames'
6
- import { spacing } from '../utilities/spacing.js'
6
+ import { globalProps } from '../utilities/globalProps.js'
7
7
  import { Avatar, Badge } from '../'
8
8
 
9
9
  import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
@@ -75,7 +75,7 @@ const MultipleUsersStacked = (props: MultipleUsersStackedProps) => {
75
75
  <div
76
76
  {...ariaProps}
77
77
  {...dataProps}
78
- className={classnames(css, className, spacing(props))}
78
+ className={classnames(css, className, globalProps(props))}
79
79
  id={id}
80
80
  >
81
81
  {firstUser()}
@@ -4,7 +4,7 @@ import React from 'react'
4
4
  import classnames from 'classnames'
5
5
  import { Caption } from '../'
6
6
  import { buildCss } from '../utilities/props'
7
- import { spacing } from '../utilities/spacing.js'
7
+ import { globalProps } from '../utilities/globalProps.js'
8
8
 
9
9
  type NavProps = {
10
10
  title: String,
@@ -31,7 +31,7 @@ const Nav = (props: NavProps) => {
31
31
  highlight: highlight,
32
32
  })
33
33
  return (
34
- <div className={classnames(cardCss, spacing(props))}>
34
+ <div className={classnames(cardCss, globalProps(props))}>
35
35
  <If condition={title}>
36
36
  <div className="pb_nav_list_title">
37
37
  <a
@@ -2,7 +2,7 @@
2
2
 
3
3
  import React from 'react'
4
4
  import classnames from 'classnames'
5
- import { spacing } from '../utilities/spacing.js'
5
+ import { globalProps } from '../utilities/globalProps.js'
6
6
 
7
7
  import { buildDataProps } from '../utilities/props'
8
8
 
@@ -16,7 +16,7 @@ type OnlineStatusProps = {
16
16
  const OnlineStatus = (props: OnlineStatusProps) => {
17
17
  const { id, data = {}, className, status = 'offline' } = props
18
18
  const dataProps = buildDataProps(data)
19
- const css = classnames([`pb_online_status_kit_${status}`, className], spacing(props))
19
+ const css = classnames([`pb_online_status_kit_${status}`, className], globalProps(props))
20
20
 
21
21
  return (
22
22
  <div
@@ -2,7 +2,7 @@
2
2
 
3
3
  import React from 'react'
4
4
  import classnames from 'classnames'
5
- import { spacing } from '../utilities/spacing.js'
5
+ import { globalProps } from '../utilities/globalProps.js'
6
6
 
7
7
  import {
8
8
  buildAriaProps,
@@ -32,7 +32,7 @@ const Person = (props: PersonProps) => {
32
32
 
33
33
  const ariaProps = buildAriaProps(aria)
34
34
  const dataProps = buildDataProps(data)
35
- const classes = classnames(buildCss('pb_person_kit'), className, spacing(props))
35
+ const classes = classnames(buildCss('pb_person_kit'), className, globalProps(props))
36
36
 
37
37
  return (
38
38
  <div
@@ -9,7 +9,7 @@ import {
9
9
  buildDataProps,
10
10
  } from '../utilities/props'
11
11
 
12
- import { spacing } from '../utilities/spacing.js'
12
+ import { globalProps } from '../utilities/globalProps.js'
13
13
 
14
14
  import { Caption, Contact, Person } from '../'
15
15
 
@@ -43,7 +43,7 @@ const PersonContact = (props: PersonContactProps) => {
43
43
 
44
44
  const ariaProps = buildAriaProps(aria)
45
45
  const dataProps = buildDataProps(data)
46
- const classes = classnames(buildCss('pb_person_contact_kit'), className, spacing(props))
46
+ const classes = classnames(buildCss('pb_person_contact_kit'), className, globalProps(props))
47
47
 
48
48
  const wrongContacts = () => (
49
49
  contacts.filter((contactObject) => (
@@ -4,7 +4,7 @@ import React from 'react'
4
4
 
5
5
  import classnames from 'classnames'
6
6
  import Title from '../pb_title/_title.jsx'
7
- import { spacing } from '../utilities/spacing.js'
7
+ import { globalProps } from '../utilities/globalProps.js'
8
8
 
9
9
  type PillProps = {
10
10
  className?: String,
@@ -15,7 +15,7 @@ type PillProps = {
15
15
 
16
16
  const Pill = (props: PillProps) => {
17
17
  const { className, text, variant = 'neutral' } = props
18
- const css = classnames([`pb_pill_kit_${variant}`, className], spacing(props))
18
+ const css = classnames([`pb_pill_kit_${variant}`, className], globalProps(props))
19
19
 
20
20
  return (
21
21
  <div className={css}>
@@ -13,7 +13,7 @@ import {
13
13
  import { buildCss, noop } from '../utilities/props'
14
14
 
15
15
  import classnames from 'classnames'
16
- import { spacing } from '../utilities/spacing.js'
16
+ import { globalProps } from '../utilities/globalProps.js'
17
17
 
18
18
  type PbPopoverProps = {
19
19
  className?: String,
@@ -58,7 +58,7 @@ const Popover = (props: PbPopoverProps) => {
58
58
  minWidth,
59
59
  } = props
60
60
 
61
- const popoverSpacing = spacing(props) ? spacing(props) : 'p_sm'
61
+ const popoverSpacing = globalProps(props) ? globalProps(props) : 'p_sm'
62
62
  const overflowHandling = maxHeight || maxWidth ? 'overflow_handling' : ''
63
63
  const zIndexStyle = zIndex ? { zIndex: zIndex } : {}
64
64
  const widthHeightStyles = () => {
@@ -10,7 +10,7 @@ import {
10
10
  buildDataProps,
11
11
  } from '../utilities/props'
12
12
 
13
- import { spacing } from '../utilities/spacing.js'
13
+ import { globalProps } from '../utilities/globalProps.js'
14
14
 
15
15
  type ProgressPillsProps = {
16
16
  active?: Number,
@@ -59,7 +59,7 @@ const ProgressPills = (props: ProgressPillsProps) => {
59
59
 
60
60
  const ariaProps = buildAriaProps(aria)
61
61
  const dataProps = buildDataProps(data)
62
- const classes = classnames(buildCss('pb_progress_pills_kit', darkClass), className, spacing(props))
62
+ const classes = classnames(buildCss('pb_progress_pills_kit', darkClass), className, globalProps(props))
63
63
 
64
64
  return (
65
65
  <div