playbook_ui 6.0.1.pre.alpha5 → 6.1.0.pre.alpha3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (176) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/_playbook.scss +3 -1
  3. data/app/pb_kits/playbook/data/menu.yml +4 -2
  4. data/app/pb_kits/playbook/index.js +2 -0
  5. data/app/pb_kits/playbook/packs/examples.js +5 -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_button_toolbar/_button_toolbar.html.erb +7 -0
  19. data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.jsx +52 -0
  20. data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.scss +101 -0
  21. data/app/pb_kits/playbook/pb_button_toolbar/button_toolbar.rb +29 -0
  22. data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_default.html.erb +7 -0
  23. data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_default.jsx +29 -0
  24. data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_secondary.html.erb +7 -0
  25. data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_secondary.jsx +34 -0
  26. data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_vertical.html.erb +11 -0
  27. data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_vertical.jsx +29 -0
  28. data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_vertical_secondary.html.erb +11 -0
  29. data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_vertical_secondary.jsx +34 -0
  30. data/app/pb_kits/playbook/pb_button_toolbar/docs/_description.md +1 -0
  31. data/app/pb_kits/playbook/pb_button_toolbar/docs/example.yml +15 -0
  32. data/app/pb_kits/playbook/pb_button_toolbar/docs/index.js +4 -0
  33. data/app/pb_kits/playbook/pb_caption/_caption.jsx +3 -7
  34. data/app/pb_kits/playbook/pb_caption/_caption.scss +0 -4
  35. data/app/pb_kits/playbook/pb_caption/caption.rb +1 -8
  36. data/app/pb_kits/playbook/pb_card/_card.jsx +17 -14
  37. data/app/pb_kits/playbook/pb_card/_card.scss +4 -1
  38. data/app/pb_kits/playbook/pb_card/card.rb +2 -9
  39. data/app/pb_kits/playbook/pb_card/docs/_card_dark.html.erb +1 -1
  40. data/app/pb_kits/playbook/pb_checkbox/_checkbox.html.erb +1 -1
  41. data/app/pb_kits/playbook/pb_checkbox/_checkbox.jsx +2 -2
  42. data/app/pb_kits/playbook/pb_checkbox/checkbox.rb +3 -8
  43. data/app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.jsx +2 -2
  44. data/app/pb_kits/playbook/pb_circle_icon_button/circle_icon_button.rb +0 -2
  45. data/app/pb_kits/playbook/pb_contact/_contact.jsx +2 -2
  46. data/app/pb_kits/playbook/pb_currency/_currency.jsx +2 -2
  47. data/app/pb_kits/playbook/pb_dashboard/pbChartsLightTheme.js +26 -0
  48. data/app/pb_kits/playbook/pb_dashboard_value/_dashboard_value.jsx +2 -2
  49. data/app/pb_kits/playbook/pb_date/_date.jsx +4 -4
  50. data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.jsx +2 -2
  51. data/app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.jsx +2 -2
  52. data/app/pb_kits/playbook/pb_date_stacked/_date_stacked.jsx +2 -2
  53. data/app/pb_kits/playbook/pb_date_time_stacked/_date_time_stacked.jsx +2 -2
  54. data/app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx +2 -2
  55. data/app/pb_kits/playbook/pb_distribution_bar/_distribution_bar.jsx +2 -2
  56. data/app/pb_kits/playbook/pb_file_upload/_file_upload.jsx +2 -2
  57. data/app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx +2 -2
  58. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx +2 -2
  59. data/app/pb_kits/playbook/pb_flex/_flex.jsx +2 -2
  60. data/app/pb_kits/playbook/pb_flex/_flex_item.jsx +2 -2
  61. data/app/pb_kits/playbook/pb_form/form_builder/checkbox_field.rb +4 -0
  62. data/app/pb_kits/playbook/pb_form_pill/_form_pill.jsx +2 -2
  63. data/app/pb_kits/playbook/pb_gauge/_gauge.html.erb +12 -0
  64. data/app/pb_kits/playbook/pb_gauge/_gauge.jsx +110 -0
  65. data/app/pb_kits/playbook/pb_gauge/_gauge.scss +11 -0
  66. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_default.html.erb +11 -0
  67. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_default.jsx +17 -0
  68. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_disable_animation.html.erb +12 -0
  69. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_disable_animation.jsx +18 -0
  70. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_full_circle.html.erb +14 -0
  71. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_full_circle.jsx +20 -0
  72. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_height.html.erb +15 -0
  73. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_height.jsx +23 -0
  74. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_live_data.jsx +40 -0
  75. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_min_max.html.erb +15 -0
  76. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_min_max.jsx +21 -0
  77. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_min_max.md +1 -0
  78. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_sizing.html.erb +26 -0
  79. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_sizing.jsx +37 -0
  80. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_sizing.md +1 -0
  81. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_title.html.erb +14 -0
  82. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_title.jsx +20 -0
  83. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_units.html.erb +29 -0
  84. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_units.jsx +29 -0
  85. data/app/pb_kits/playbook/pb_gauge/docs/example.yml +24 -0
  86. data/app/pb_kits/playbook/pb_gauge/docs/index.js +9 -0
  87. data/app/pb_kits/playbook/pb_gauge/gauge.rb +57 -0
  88. data/app/pb_kits/playbook/pb_hashtag/_hashtag.jsx +2 -2
  89. data/app/pb_kits/playbook/pb_highlight/_highlight.jsx +2 -2
  90. data/app/pb_kits/playbook/pb_home_address_street/_home_address_street.jsx +2 -2
  91. data/app/pb_kits/playbook/pb_icon/_icon.jsx +2 -2
  92. data/app/pb_kits/playbook/pb_icon_circle/_icon_circle.jsx +2 -2
  93. data/app/pb_kits/playbook/pb_icon_value/_icon_value.jsx +2 -2
  94. data/app/pb_kits/playbook/pb_image/_image.jsx +2 -2
  95. data/app/pb_kits/playbook/pb_kit/dateTime.js +5 -1
  96. data/app/pb_kits/playbook/pb_label_pill/_label_pill.jsx +2 -2
  97. data/app/pb_kits/playbook/pb_label_value/_label_value.jsx +2 -2
  98. data/app/pb_kits/playbook/pb_layout/_layout.jsx +6 -6
  99. data/app/pb_kits/playbook/pb_legend/_legend.jsx +2 -2
  100. data/app/pb_kits/playbook/pb_line_graph/_line_graph.jsx +2 -2
  101. data/app/pb_kits/playbook/pb_list/_list.jsx +2 -2
  102. data/app/pb_kits/playbook/pb_list/_list_item.jsx +2 -2
  103. data/app/pb_kits/playbook/pb_loading_inline/_loading_inline.jsx +2 -2
  104. data/app/pb_kits/playbook/pb_logistic/_logistic.jsx +111 -0
  105. data/app/pb_kits/playbook/pb_message/_message.jsx +2 -2
  106. data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.jsx +2 -2
  107. data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.jsx +2 -2
  108. data/app/pb_kits/playbook/pb_nav/_nav.jsx +2 -2
  109. data/app/pb_kits/playbook/pb_online_status/_online_status.jsx +2 -2
  110. data/app/pb_kits/playbook/pb_person/_person.jsx +2 -2
  111. data/app/pb_kits/playbook/pb_person_contact/_person_contact.jsx +2 -2
  112. data/app/pb_kits/playbook/pb_pill/_pill.jsx +2 -2
  113. data/app/pb_kits/playbook/pb_popover/_popover.jsx +2 -2
  114. data/app/pb_kits/playbook/pb_popover/docs/_popover_list.jsx +5 -5
  115. data/app/pb_kits/playbook/pb_progress_pills/_progress_pills.jsx +2 -2
  116. data/app/pb_kits/playbook/pb_progress_simple/_progress_simple.jsx +2 -2
  117. data/app/pb_kits/playbook/pb_progress_step/_progress_step.jsx +2 -2
  118. data/app/pb_kits/playbook/pb_radio/_radio.jsx +2 -2
  119. data/app/pb_kits/playbook/pb_section_separator/_section_separator.jsx +2 -2
  120. data/app/pb_kits/playbook/pb_select/_select.jsx +2 -2
  121. data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.jsx +12 -16
  122. data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.scss +1 -1
  123. data/app/pb_kits/playbook/pb_selectable_card/selectable_card.rb +1 -7
  124. data/app/pb_kits/playbook/pb_selectable_card_icon/_selectable_card_icon.jsx +26 -26
  125. data/app/pb_kits/playbook/pb_selectable_card_icon/_selectable_card_icon.scss +1 -1
  126. data/app/pb_kits/playbook/pb_selectable_card_icon/selectable_card_icon.rb +1 -8
  127. data/app/pb_kits/playbook/pb_selectable_icon/_selectable_icon.jsx +8 -10
  128. data/app/pb_kits/playbook/pb_selectable_icon/_selectable_icon.scss +1 -1
  129. data/app/pb_kits/playbook/pb_selectable_icon/selectable_icon.rb +1 -7
  130. data/app/pb_kits/playbook/pb_stat_change/_stat_change.jsx +2 -2
  131. data/app/pb_kits/playbook/pb_stat_value/_stat_value.jsx +2 -2
  132. data/app/pb_kits/playbook/pb_table/_table.jsx +2 -2
  133. data/app/pb_kits/playbook/pb_table/_table_row.jsx +2 -2
  134. data/app/pb_kits/playbook/pb_text_input/_text_input.jsx +2 -2
  135. data/app/pb_kits/playbook/pb_textarea/_textarea.html.erb +1 -1
  136. data/app/pb_kits/playbook/pb_textarea/_textarea.jsx +2 -2
  137. data/app/pb_kits/playbook/pb_textarea/_textarea.scss +2 -1
  138. data/app/pb_kits/playbook/pb_time/_time.jsx +57 -14
  139. data/app/pb_kits/playbook/pb_time/_time.scss +17 -0
  140. data/app/pb_kits/playbook/pb_time/docs/_time_align.jsx +27 -0
  141. data/app/pb_kits/playbook/pb_time/docs/_time_dark.jsx +28 -0
  142. data/app/pb_kits/playbook/pb_time/docs/_time_default.jsx +28 -0
  143. data/app/pb_kits/playbook/pb_time/docs/_time_timestamp.jsx +32 -0
  144. data/app/pb_kits/playbook/pb_time/docs/example.yml +4 -0
  145. data/app/pb_kits/playbook/pb_time/docs/index.js +4 -0
  146. data/app/pb_kits/playbook/pb_time_range_inline/_time_range_inline.jsx +2 -2
  147. data/app/pb_kits/playbook/pb_time_stacked/_time_stacked.jsx +2 -2
  148. data/app/pb_kits/playbook/pb_timestamp/_timestamp.jsx +2 -2
  149. data/app/pb_kits/playbook/pb_title/_title.jsx +3 -6
  150. data/app/pb_kits/playbook/pb_title/_title.scss +1 -1
  151. data/app/pb_kits/playbook/pb_title/title.rb +1 -9
  152. data/app/pb_kits/playbook/pb_title_count/_title_count.jsx +2 -2
  153. data/app/pb_kits/playbook/pb_title_detail/_title_detail.jsx +2 -2
  154. data/app/pb_kits/playbook/pb_toggle/_toggle.jsx +39 -31
  155. data/app/pb_kits/playbook/pb_toggle/docs/_toggle_custom.jsx +31 -0
  156. data/app/pb_kits/playbook/pb_toggle/docs/_toggle_custom_radio.html.erb +6 -6
  157. data/app/pb_kits/playbook/pb_toggle/docs/_toggle_custom_radio.jsx +72 -0
  158. data/app/pb_kits/playbook/pb_toggle/docs/_toggle_default.html.erb +1 -3
  159. data/app/pb_kits/playbook/pb_toggle/docs/_toggle_default.jsx +6 -19
  160. data/app/pb_kits/playbook/pb_toggle/docs/_toggle_name.jsx +57 -0
  161. data/app/pb_kits/playbook/pb_toggle/docs/{_toggle_checked.html.erb → _toggle_size.html.erb} +2 -2
  162. data/app/pb_kits/playbook/pb_toggle/docs/_toggle_size.jsx +44 -0
  163. data/app/pb_kits/playbook/pb_toggle/docs/example.yml +8 -5
  164. data/app/pb_kits/playbook/pb_toggle/docs/index.js +4 -2
  165. data/app/pb_kits/playbook/pb_user/_user.jsx +2 -2
  166. data/app/pb_kits/playbook/pb_user_badge/_user_badge.jsx +2 -2
  167. data/app/pb_kits/playbook/pb_weekday_stacked/_weekday_stacked.jsx +2 -2
  168. data/app/pb_kits/playbook/plugins/pb_chart.js +74 -0
  169. data/app/pb_kits/playbook/props.rb +6 -0
  170. data/app/pb_kits/playbook/utilities/{spacing.js → globalProps.js} +14 -1
  171. data/app/pb_kits/playbook/utilities/props.js +1 -0
  172. data/lib/generators/kit/templates/kit_jsx.erb.tt +2 -2
  173. data/lib/playbook/version.rb +1 -1
  174. metadata +53 -6
  175. data/app/pb_kits/playbook/pb_toggle/docs/_toggle_accessibility.jsx +0 -12
  176. data/app/pb_kits/playbook/pb_toggle/docs/_toggle_data.jsx +0 -15
@@ -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 = () => {
@@ -35,11 +35,11 @@ const PopoverWithButton = () => {
35
35
  show={showPopover}
36
36
  >
37
37
  <List xpadding>
38
- <ListItem>{'Popularity'}</ListItem>
39
- <ListItem>{'Title'}</ListItem>
40
- <ListItem>{'Duration'}</ListItem>
41
- <ListItem>{'Date Started'}</ListItem>
42
- <ListItem>{'Date Ended'}</ListItem>
38
+ <ListItem><a>{'Popularity'}</a></ListItem>
39
+ <ListItem><a>{'Title'}</a></ListItem>
40
+ <ListItem><a>{'Duration'}</a></ListItem>
41
+ <ListItem><a>{'Date Started'}</a></ListItem>
42
+ <ListItem><a>{'Date Ended'}</a></ListItem>
43
43
  </List>
44
44
  </PbReactPopover>
45
45
  )
@@ -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
@@ -2,7 +2,7 @@
2
2
  import React from 'react'
3
3
  import classnames from 'classnames'
4
4
  import { buildCss } from '../utilities/props'
5
- import { spacing } from '../utilities/spacing.js'
5
+ import { globalProps } from '../utilities/globalProps.js'
6
6
 
7
7
  type ProgressSimpleProps = {
8
8
  align?: "left" | "center" | "right",
@@ -43,7 +43,7 @@ const ProgressSimple = (props: ProgressSimpleProps) => {
43
43
  const wrapperClass = classnames(
44
44
  className,
45
45
  buildCss('pb_progress_simple_wrapper', align, { dark: dark }),
46
- spacing(props)
46
+ globalProps(props)
47
47
  )
48
48
 
49
49
  const kitClass = classnames(
@@ -3,7 +3,7 @@
3
3
  import React from 'react'
4
4
  import classnames from 'classnames'
5
5
  import { buildCss } from '../utilities/props'
6
- import { spacing } from '../utilities/spacing.js'
6
+ import { globalProps } from '../utilities/globalProps.js'
7
7
 
8
8
  type ProgressStepProps = {
9
9
  className?: String,
@@ -33,7 +33,7 @@ const ProgressStep = (props: ProgressStepProps) => {
33
33
  )
34
34
 
35
35
  return (
36
- <div className={classnames(progressStepCss, className, spacing(props))}>
36
+ <div className={classnames(progressStepCss, className, globalProps(props))}>
37
37
  {children}
38
38
  </div>
39
39
  )
@@ -4,7 +4,7 @@
4
4
  import React from 'react'
5
5
  import Body from '../pb_body/_body.jsx'
6
6
  import classnames from 'classnames'
7
- import { spacing } from '../utilities/spacing.js'
7
+ import { globalProps } from '../utilities/globalProps.js'
8
8
 
9
9
  type RadioProps = {
10
10
  className?: String,
@@ -40,7 +40,7 @@ const Radio = ({
40
40
 
41
41
  return (
42
42
  <label
43
- className={classnames('pb_radio_kit' + (dark === true ? '_dark ' : ' ') + errorClass + ' ' + className, spacing(props))}
43
+ className={classnames('pb_radio_kit' + (dark === true ? '_dark ' : ' ') + errorClass + ' ' + className, globalProps(props))}
44
44
  htmlFor={id}
45
45
  >
46
46
  <If condition={children}>
@@ -3,7 +3,7 @@ import React from 'react'
3
3
  import classnames from 'classnames'
4
4
  import { Caption } from '../'
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 SectionSeparatorProps = {
9
9
  aria: object,
@@ -30,7 +30,7 @@ const SectionSeparator = (props: SectionSeparatorProps) => {
30
30
  const themeStyle = dark === true ? '_dark' : ''
31
31
  const ariaProps = buildAriaProps(aria)
32
32
  const dataProps = buildDataProps(data)
33
- const classes = classnames(buildCss('pb_section_separator_kit', variant, orientation, themeStyle), className, spacing(props))
33
+ const classes = classnames(buildCss('pb_section_separator_kit', variant, orientation, themeStyle), className, globalProps(props))
34
34
 
35
35
  return (
36
36
 
@@ -14,7 +14,7 @@ import {
14
14
  buildDataProps,
15
15
  } from '../utilities/props'
16
16
 
17
- import { spacing } from '../utilities/spacing.js'
17
+ import { globalProps } from '../utilities/globalProps.js'
18
18
 
19
19
  import type { InputCallback } from '../types'
20
20
 
@@ -72,7 +72,7 @@ const Select = ({
72
72
  ...props
73
73
  }: SelectProps) => {
74
74
  const errorClass = error ? ' error' : ''
75
- const css = classnames(buildCss('pb_select', { dark }) + errorClass, spacing(props))
75
+ const css = classnames(buildCss('pb_select', { dark }) + errorClass, globalProps(props))
76
76
  const ariaProps = buildAriaProps(aria)
77
77
  const dataProps = buildDataProps(data)
78
78
  const optionsList = createOptions(options)
@@ -13,15 +13,14 @@ import {
13
13
  noop,
14
14
  } from '../utilities/props'
15
15
 
16
- import { spacing } from '../utilities/spacing.js'
16
+ import { globalProps } from '../utilities/globalProps.js'
17
17
 
18
- type Props = {
19
- aria: Object,
18
+ type SelectableCardProps = {
19
+ aria?: object,
20
20
  checked: Boolean,
21
21
  children?: Array<React.ReactChild>,
22
22
  className?: String,
23
- dark?: Boolean,
24
- data: Object,
23
+ data: object,
25
24
  disabled?: Boolean,
26
25
  icon?: Boolean,
27
26
  id?: String,
@@ -38,7 +37,6 @@ const SelectableCard = ({
38
37
  checked = false,
39
38
  children,
40
39
  className,
41
- dark = false,
42
40
  data = {},
43
41
  disabled = false,
44
42
  icon = false,
@@ -49,17 +47,15 @@ const SelectableCard = ({
49
47
  text,
50
48
  value,
51
49
  ...props
52
- }: Props) => {
50
+ }: SelectableCardProps) => {
53
51
  const ariaProps = buildAriaProps(aria)
54
52
  const dataProps = buildDataProps(data)
55
53
 
56
- const css = buildCss({
57
- 'pb_selectable_card_kit': true,
58
- checked: checked,
59
- dark: dark,
60
- disabled: disabled,
61
- enabled: !disabled,
62
- })
54
+ const classes = classnames(buildCss('pb_selectable_card_kit',
55
+ { 'checked': checked,
56
+ 'disabled': disabled,
57
+ 'enabled': !disabled },
58
+ className), globalProps(props))
63
59
 
64
60
  const displayIcon = () => {
65
61
  if (icon === true) {
@@ -82,7 +78,7 @@ const SelectableCard = ({
82
78
  <div
83
79
  {...ariaProps}
84
80
  {...dataProps}
85
- className={classnames(css, className)}
81
+ className={classes}
86
82
  >
87
83
  <input
88
84
  {...props}
@@ -95,7 +91,7 @@ const SelectableCard = ({
95
91
  value={value}
96
92
  />
97
93
  <label
98
- className={spacing(props)}
94
+ className={globalProps(props)}
99
95
  htmlFor={inputIdPresent}
100
96
  >
101
97
  {text || children}