playbook_ui 6.0.1.pre.alpha3 → 6.1.0.pre.alpha1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (180) 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.jsx +2 -2
  41. data/app/pb_kits/playbook/pb_checkbox/checkbox.rb +1 -8
  42. data/app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.jsx +2 -2
  43. data/app/pb_kits/playbook/pb_circle_icon_button/circle_icon_button.rb +0 -2
  44. data/app/pb_kits/playbook/pb_contact/_contact.jsx +2 -2
  45. data/app/pb_kits/playbook/pb_currency/_currency.jsx +2 -2
  46. data/app/pb_kits/playbook/pb_dashboard/pbChartsLightTheme.js +26 -0
  47. data/app/pb_kits/playbook/pb_dashboard_value/_dashboard_value.jsx +2 -2
  48. data/app/pb_kits/playbook/pb_date/_date.jsx +4 -4
  49. data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.jsx +2 -2
  50. data/app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.jsx +2 -2
  51. data/app/pb_kits/playbook/pb_date_stacked/_date_stacked.jsx +2 -2
  52. data/app/pb_kits/playbook/pb_date_time_stacked/_date_time_stacked.jsx +2 -2
  53. data/app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx +2 -2
  54. data/app/pb_kits/playbook/pb_distribution_bar/_distribution_bar.jsx +2 -2
  55. data/app/pb_kits/playbook/pb_file_upload/_file_upload.jsx +2 -2
  56. data/app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx +2 -2
  57. data/app/pb_kits/playbook/pb_filter/docs/_filter_default.html.erb +1 -1
  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/docs/_form_form_with.html.erb +2 -2
  62. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +2 -2
  63. data/app/pb_kits/playbook/pb_form/docs/_form_simple_form.html.erb +1 -1
  64. data/app/pb_kits/playbook/pb_form/docs/_form_simple_form_validate.html.erb +1 -1
  65. data/app/pb_kits/playbook/pb_form/form_builder/date_picker_field.rb +8 -1
  66. data/app/pb_kits/playbook/pb_form_pill/_form_pill.jsx +2 -2
  67. data/app/pb_kits/playbook/pb_gauge/_gauge.html.erb +12 -0
  68. data/app/pb_kits/playbook/pb_gauge/_gauge.jsx +110 -0
  69. data/app/pb_kits/playbook/pb_gauge/_gauge.scss +11 -0
  70. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_default.html.erb +11 -0
  71. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_default.jsx +17 -0
  72. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_disable_animation.html.erb +12 -0
  73. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_disable_animation.jsx +18 -0
  74. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_full_circle.html.erb +14 -0
  75. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_full_circle.jsx +20 -0
  76. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_height.html.erb +15 -0
  77. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_height.jsx +23 -0
  78. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_live_data.jsx +40 -0
  79. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_min_max.html.erb +15 -0
  80. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_min_max.jsx +21 -0
  81. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_min_max.md +1 -0
  82. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_sizing.html.erb +26 -0
  83. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_sizing.jsx +37 -0
  84. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_sizing.md +1 -0
  85. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_title.html.erb +14 -0
  86. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_title.jsx +20 -0
  87. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_units.html.erb +29 -0
  88. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_units.jsx +29 -0
  89. data/app/pb_kits/playbook/pb_gauge/docs/example.yml +24 -0
  90. data/app/pb_kits/playbook/pb_gauge/docs/index.js +9 -0
  91. data/app/pb_kits/playbook/pb_gauge/gauge.rb +57 -0
  92. data/app/pb_kits/playbook/pb_hashtag/_hashtag.jsx +2 -2
  93. data/app/pb_kits/playbook/pb_highlight/_highlight.jsx +2 -2
  94. data/app/pb_kits/playbook/pb_home_address_street/_home_address_street.jsx +2 -2
  95. data/app/pb_kits/playbook/pb_icon/_icon.jsx +2 -2
  96. data/app/pb_kits/playbook/pb_icon_circle/_icon_circle.jsx +2 -2
  97. data/app/pb_kits/playbook/pb_icon_value/_icon_value.jsx +2 -2
  98. data/app/pb_kits/playbook/pb_image/_image.jsx +2 -2
  99. data/app/pb_kits/playbook/pb_kit/dateTime.js +5 -1
  100. data/app/pb_kits/playbook/pb_label_pill/_label_pill.jsx +2 -2
  101. data/app/pb_kits/playbook/pb_label_value/_label_value.jsx +2 -2
  102. data/app/pb_kits/playbook/pb_layout/_layout.jsx +6 -6
  103. data/app/pb_kits/playbook/pb_legend/_legend.jsx +2 -2
  104. data/app/pb_kits/playbook/pb_line_graph/_line_graph.jsx +2 -2
  105. data/app/pb_kits/playbook/pb_list/_list.jsx +2 -2
  106. data/app/pb_kits/playbook/pb_list/_list_item.jsx +2 -2
  107. data/app/pb_kits/playbook/pb_loading_inline/_loading_inline.jsx +2 -2
  108. data/app/pb_kits/playbook/pb_logistic/_logistic.jsx +111 -0
  109. data/app/pb_kits/playbook/pb_message/_message.jsx +2 -2
  110. data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.jsx +2 -2
  111. data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.jsx +2 -2
  112. data/app/pb_kits/playbook/pb_nav/_nav.jsx +2 -2
  113. data/app/pb_kits/playbook/pb_online_status/_online_status.jsx +2 -2
  114. data/app/pb_kits/playbook/pb_person/_person.jsx +2 -2
  115. data/app/pb_kits/playbook/pb_person_contact/_person_contact.jsx +2 -2
  116. data/app/pb_kits/playbook/pb_pill/_pill.jsx +2 -2
  117. data/app/pb_kits/playbook/pb_popover/_popover.jsx +2 -2
  118. data/app/pb_kits/playbook/pb_popover/docs/_popover_list.jsx +5 -5
  119. data/app/pb_kits/playbook/pb_progress_pills/_progress_pills.jsx +2 -2
  120. data/app/pb_kits/playbook/pb_progress_simple/_progress_simple.jsx +2 -2
  121. data/app/pb_kits/playbook/pb_progress_step/_progress_step.jsx +2 -2
  122. data/app/pb_kits/playbook/pb_radio/_radio.jsx +2 -2
  123. data/app/pb_kits/playbook/pb_section_separator/_section_separator.jsx +2 -2
  124. data/app/pb_kits/playbook/pb_select/_select.jsx +2 -2
  125. data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.jsx +12 -16
  126. data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.scss +1 -1
  127. data/app/pb_kits/playbook/pb_selectable_card/selectable_card.rb +1 -7
  128. data/app/pb_kits/playbook/pb_selectable_card_icon/_selectable_card_icon.jsx +26 -26
  129. data/app/pb_kits/playbook/pb_selectable_card_icon/_selectable_card_icon.scss +1 -1
  130. data/app/pb_kits/playbook/pb_selectable_card_icon/selectable_card_icon.rb +1 -8
  131. data/app/pb_kits/playbook/pb_selectable_icon/_selectable_icon.jsx +8 -10
  132. data/app/pb_kits/playbook/pb_selectable_icon/_selectable_icon.scss +1 -1
  133. data/app/pb_kits/playbook/pb_selectable_icon/selectable_icon.rb +1 -7
  134. data/app/pb_kits/playbook/pb_stat_change/_stat_change.jsx +2 -2
  135. data/app/pb_kits/playbook/pb_stat_value/_stat_value.jsx +2 -2
  136. data/app/pb_kits/playbook/pb_table/_table.jsx +2 -2
  137. data/app/pb_kits/playbook/pb_table/_table_row.jsx +2 -2
  138. data/app/pb_kits/playbook/pb_text_input/_text_input.jsx +2 -2
  139. data/app/pb_kits/playbook/pb_textarea/_textarea.html.erb +1 -1
  140. data/app/pb_kits/playbook/pb_textarea/_textarea.jsx +2 -2
  141. data/app/pb_kits/playbook/pb_textarea/_textarea.scss +2 -1
  142. data/app/pb_kits/playbook/pb_time/_time.jsx +57 -14
  143. data/app/pb_kits/playbook/pb_time/_time.scss +17 -0
  144. data/app/pb_kits/playbook/pb_time/docs/_time_align.jsx +27 -0
  145. data/app/pb_kits/playbook/pb_time/docs/_time_dark.jsx +28 -0
  146. data/app/pb_kits/playbook/pb_time/docs/_time_default.jsx +28 -0
  147. data/app/pb_kits/playbook/pb_time/docs/_time_timestamp.jsx +32 -0
  148. data/app/pb_kits/playbook/pb_time/docs/example.yml +4 -0
  149. data/app/pb_kits/playbook/pb_time/docs/index.js +4 -0
  150. data/app/pb_kits/playbook/pb_time_range_inline/_time_range_inline.jsx +2 -2
  151. data/app/pb_kits/playbook/pb_time_stacked/_time_stacked.jsx +2 -2
  152. data/app/pb_kits/playbook/pb_timestamp/_timestamp.jsx +2 -2
  153. data/app/pb_kits/playbook/pb_title/_title.jsx +3 -6
  154. data/app/pb_kits/playbook/pb_title/_title.scss +1 -1
  155. data/app/pb_kits/playbook/pb_title/title.rb +1 -9
  156. data/app/pb_kits/playbook/pb_title_count/_title_count.jsx +2 -2
  157. data/app/pb_kits/playbook/pb_title_detail/_title_detail.jsx +2 -2
  158. data/app/pb_kits/playbook/pb_toggle/_toggle.jsx +39 -31
  159. data/app/pb_kits/playbook/pb_toggle/docs/_toggle_custom.jsx +31 -0
  160. data/app/pb_kits/playbook/pb_toggle/docs/_toggle_custom_radio.html.erb +6 -6
  161. data/app/pb_kits/playbook/pb_toggle/docs/_toggle_custom_radio.jsx +72 -0
  162. data/app/pb_kits/playbook/pb_toggle/docs/_toggle_default.html.erb +1 -3
  163. data/app/pb_kits/playbook/pb_toggle/docs/_toggle_default.jsx +6 -19
  164. data/app/pb_kits/playbook/pb_toggle/docs/_toggle_name.jsx +57 -0
  165. data/app/pb_kits/playbook/pb_toggle/docs/{_toggle_checked.html.erb → _toggle_size.html.erb} +2 -2
  166. data/app/pb_kits/playbook/pb_toggle/docs/_toggle_size.jsx +44 -0
  167. data/app/pb_kits/playbook/pb_toggle/docs/example.yml +8 -5
  168. data/app/pb_kits/playbook/pb_toggle/docs/index.js +4 -2
  169. data/app/pb_kits/playbook/pb_user/_user.jsx +2 -2
  170. data/app/pb_kits/playbook/pb_user_badge/_user_badge.jsx +2 -2
  171. data/app/pb_kits/playbook/pb_weekday_stacked/_weekday_stacked.jsx +2 -2
  172. data/app/pb_kits/playbook/plugins/pb_chart.js +74 -0
  173. data/app/pb_kits/playbook/props.rb +6 -0
  174. data/app/pb_kits/playbook/utilities/{spacing.js → globalProps.js} +14 -1
  175. data/app/pb_kits/playbook/utilities/props.js +1 -0
  176. data/lib/generators/kit/templates/kit_jsx.erb.tt +2 -2
  177. data/lib/playbook/version.rb +1 -1
  178. metadata +53 -6
  179. data/app/pb_kits/playbook/pb_toggle/docs/_toggle_accessibility.jsx +0 -12
  180. data/app/pb_kits/playbook/pb_toggle/docs/_toggle_data.jsx +0 -15
@@ -1,3 +1,3 @@
1
1
  <%= pb_rails("card", props: { dark: true }) do %>
2
- Dark Card content
2
+ Card Content
3
3
  <% end %>
@@ -5,7 +5,7 @@ import Body from '../pb_body/_body.jsx'
5
5
  import Icon from '../pb_icon/_icon.jsx'
6
6
  import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
7
7
  import classnames from 'classnames'
8
- import { spacing } from '../utilities/spacing.js'
8
+ import { globalProps } from '../utilities/globalProps.js'
9
9
 
10
10
  type CheckboxProps = {
11
11
  aria?: object,
@@ -41,7 +41,7 @@ const Checkbox = (props: CheckboxProps) => {
41
41
  const dataProps = buildDataProps(data)
42
42
  const ariaProps = buildAriaProps(aria)
43
43
  const classes = classnames(buildCss('pb_checkbox_kit',
44
- { dark: dark, checked: checked, error: error }), className, spacing(props))
44
+ { checked: checked, error: error }), className, globalProps(props))
45
45
 
46
46
  return (
47
47
  <label
@@ -7,11 +7,8 @@ module Playbook
7
7
  include ActionView::Helpers::FormTagHelper
8
8
  include ActionView::Context
9
9
 
10
-
11
-
12
10
  partial "pb_checkbox/checkbox"
13
11
 
14
- prop :dark, type: Playbook::Props::Boolean, default: false
15
12
  prop :error, type: Playbook::Props::Boolean, default: false
16
13
  prop :checked, type: Playbook::Props::Boolean, default: false
17
14
  prop :text
@@ -23,7 +20,7 @@ module Playbook
23
20
  end
24
21
 
25
22
  def classname
26
- generate_classname("pb_checkbox_kit", dark_class, checked_class) + error_class
23
+ generate_classname("pb_checkbox_kit", checked_class) + error_class
27
24
  end
28
25
 
29
26
  def input
@@ -43,10 +40,6 @@ module Playbook
43
40
  def checked_class
44
41
  checked ? "on" : "off"
45
42
  end
46
-
47
- def dark_class
48
- dark ? "dark" : nil
49
- end
50
43
  end
51
44
  end
52
45
  end
@@ -11,7 +11,7 @@ import {
11
11
  noop,
12
12
  } from '../utilities/props'
13
13
 
14
- import { spacing } from '../utilities/spacing.js'
14
+ import { globalProps } from '../utilities/globalProps.js'
15
15
 
16
16
  type CircleIconButtonProps = {
17
17
  aria?: object,
@@ -46,7 +46,7 @@ const CircleIconButton = (props: CircleIconButtonProps) => {
46
46
 
47
47
  const ariaProps = buildAriaProps(aria)
48
48
  const dataProps = buildDataProps(data)
49
- const classes = classnames(buildCss('pb_circle_icon_button_kit'), className, spacing(props))
49
+ const classes = classnames(buildCss('pb_circle_icon_button_kit'), className, globalProps(props))
50
50
 
51
51
  return (
52
52
  <div
@@ -14,8 +14,6 @@ module Playbook
14
14
  prop :disabled, type: Playbook::Props::Boolean,
15
15
  default: false
16
16
  prop :icon, required: true
17
- prop :dark, type: Playbook::Props::Boolean,
18
- default: false
19
17
  prop :link
20
18
  prop :new_window, type: Playbook::Props::Boolean,
21
19
  default: false
@@ -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 { Body, Caption, Icon } from '../'
7
7
 
8
8
  import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
@@ -58,7 +58,7 @@ const Contact = (props: ContactProps) => {
58
58
  id } = props
59
59
  const ariaProps = buildAriaProps(aria)
60
60
  const dataProps = buildDataProps(data)
61
- const classes = classnames(buildCss('pb_contact_kit'), className, spacing(props))
61
+ const classes = classnames(buildCss('pb_contact_kit'), className, globalProps(props))
62
62
 
63
63
  return (
64
64
  <div
@@ -3,7 +3,7 @@
3
3
  import React from 'react'
4
4
  import classnames from 'classnames'
5
5
 
6
- import { spacing } from '../utilities/spacing.js'
6
+ import { globalProps } from '../utilities/globalProps.js'
7
7
  import { Body, Caption, Title } from '../'
8
8
  import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
9
9
 
@@ -45,7 +45,7 @@ const Currency = (props: CurrencyProps) => {
45
45
  const [whole, decimal = '00'] = amount.split('.')
46
46
  const ariaProps = buildAriaProps(aria)
47
47
  const dataProps = buildDataProps(data)
48
- const classes = classnames(buildCss('pb_currency_kit', align, size, { dark: dark }), className, spacing(props))
48
+ const classes = classnames(buildCss('pb_currency_kit', align, size, { dark: dark }), className, globalProps(props))
49
49
 
50
50
  return (
51
51
  <div
@@ -124,6 +124,13 @@ const highchartsTheme = {
124
124
  fontSize: typography.text_smaller,
125
125
  },
126
126
  },
127
+ // specific to gauge
128
+ // unfilled gauge color
129
+ pane: {
130
+ background: {
131
+ borderColor: colors.border_light,
132
+ },
133
+ },
127
134
 
128
135
  plotOptions: {
129
136
  series: {
@@ -144,6 +151,25 @@ const highchartsTheme = {
144
151
  threshold: null,
145
152
  },
146
153
 
154
+ // GAUGE STYLES
155
+ solidgauge: {
156
+ borderColor: colors.primary,
157
+ borderWidth: 20,
158
+ radius: 90,
159
+ innerRadius: '90%',
160
+ dataLabels: {
161
+ borderWidth: 0,
162
+ color: colors.text_lt_default,
163
+ enabled: true,
164
+ style: {
165
+ fontFamily: typography.font_family_base,
166
+ fontWeight: typography.regular,
167
+ fontSize: typography.heading_2,
168
+ },
169
+ y: -26,
170
+ },
171
+ },
172
+
147
173
  // PIE STYLES
148
174
  pie: {
149
175
  colors: [
@@ -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
  import {
8
8
  Body,
9
9
  StatChange,
@@ -41,7 +41,7 @@ const DashboardValue = (props: DashboardValueProps) => {
41
41
 
42
42
  const ariaProps = buildAriaProps(aria)
43
43
  const dataProps = buildDataProps(data)
44
- const classes = classnames(buildCss('pb_dashboard_value_kit', align), className, spacing(props))
44
+ const classes = classnames(buildCss('pb_dashboard_value_kit', align), className, globalProps(props))
45
45
 
46
46
  return (
47
47
  <div
@@ -4,7 +4,7 @@ import React from 'react'
4
4
  import DateTime from '../pb_kit/dateTime.js'
5
5
  import { Icon } from '../'
6
6
  import classnames from 'classnames'
7
- import { spacing } from '../utilities/spacing.js'
7
+ import { globalProps } from '../utilities/globalProps.js'
8
8
 
9
9
  const defaultDateString = (value: DateTime) => {
10
10
  const weekday = value.toWeekday().toUpperCase()
@@ -26,13 +26,13 @@ type DateSubcomponent = {
26
26
  }
27
27
 
28
28
  const ExtraSmallDate = ({ value, ...props }: DateSubcomponent) => (
29
- <h3 className={classnames('pb_title_kit_4', spacing(props))}>
29
+ <h3 className={classnames('pb_title_kit_4', globalProps(props))}>
30
30
  {defaultDateString(value)}
31
31
  </h3>
32
32
  )
33
33
 
34
34
  const SmallDate = ({ value, ...props }: DateSubcomponent) => (
35
- <h3 className={classnames('pb_title_kit_4', spacing(props))}>
35
+ <h3 className={classnames('pb_title_kit_4', globalProps(props))}>
36
36
  <Icon
37
37
  fixedWidth
38
38
  icon="calendar"
@@ -42,7 +42,7 @@ const SmallDate = ({ value, ...props }: DateSubcomponent) => (
42
42
  )
43
43
 
44
44
  const LargeDate = ({ value, ...props }: DateSubcomponent) => (
45
- <h3 className={classnames('pb_title_kit_3', spacing(props))}>
45
+ <h3 className={classnames('pb_title_kit_3', globalProps(props))}>
46
46
  {largeDateString(value)}
47
47
  </h3>
48
48
  )
@@ -4,7 +4,7 @@ import React from 'react'
4
4
  import DateTime from '../pb_kit/dateTime.js'
5
5
  import { Body, Icon } from '../'
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 DateRangeInlineProps = {
10
10
  className?: String,
@@ -27,7 +27,7 @@ const dateTimeIso = (dateValue) => {
27
27
  const DateRangeInline = (props: DateRangeInlineProps) => {
28
28
  const { endDate, startDate } = props
29
29
  return (
30
- <div className={classnames('pb_date_range_inline', spacing(props))}>
30
+ <div className={classnames('pb_date_range_inline', globalProps(props))}>
31
31
  <Body
32
32
  color="light"
33
33
  tag="span"
@@ -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
  import { Body, DateYearStacked, Flex, FlexItem, Icon } from '../'
9
9
 
@@ -18,7 +18,7 @@ type DateRangeStackedProps = {
18
18
 
19
19
  const DateRangeStacked = (props: DateRangeStackedProps) => {
20
20
  const { className, dark = false, endDate, startDate } = props
21
- const css = classnames(className, buildCss('pb_date_range_stacked'), spacing(props))
21
+ const css = classnames(className, buildCss('pb_date_range_stacked'), globalProps(props))
22
22
 
23
23
  return (
24
24
  <div className={css}>
@@ -5,7 +5,7 @@ import classnames from 'classnames'
5
5
  import DateTime from '../pb_kit/dateTime.js'
6
6
  import { buildCss } from '../utilities/props'
7
7
  import { Caption, Title } from '../'
8
- import { spacing } from '../utilities/spacing.js'
8
+ import { globalProps } from '../utilities/globalProps.js'
9
9
 
10
10
  type DateStackedProps = {
11
11
  align?: "left" | "center" | "right",
@@ -38,7 +38,7 @@ const DateStacked = (props: DateStackedProps) => {
38
38
  dark: dark,
39
39
  reverse: reverse,
40
40
  }),
41
- spacing(props)
41
+ globalProps(props)
42
42
  )
43
43
 
44
44
  const currentYear = new Date().getFullYear().toString()
@@ -2,7 +2,7 @@
2
2
 
3
3
  import React from 'react'
4
4
  import { DateStacked, Flex, FlexItem, TimeStacked } from '../'
5
- import { spacing } from '../utilities/spacing.js'
5
+ import { globalProps } from '../utilities/globalProps.js'
6
6
 
7
7
  type DateTimeStackedProps = {
8
8
  data?: String,
@@ -15,7 +15,7 @@ const DateTimeStacked = (props: DateTimeStackedProps) => {
15
15
  const { date, dark } = props
16
16
  return (
17
17
  <Flex
18
- className={spacing(props)}
18
+ className={globalProps(props)}
19
19
  orientation="row"
20
20
  vertical="center"
21
21
  >
@@ -4,7 +4,7 @@ import React from 'react'
4
4
  import classnames from 'classnames'
5
5
  import { buildCss } from '../utilities/props'
6
6
  import DateTime from '../pb_kit/dateTime.js'
7
- import { spacing } from '../utilities/spacing.js'
7
+ import { globalProps } from '../utilities/globalProps.js'
8
8
 
9
9
  import { Body, Title } from '../'
10
10
 
@@ -20,7 +20,7 @@ type DateYearStackedProps = {
20
20
  const DateYearStacked = (props: DateYearStackedProps) => {
21
21
  const { align = 'left', className, dark = false, date } = props
22
22
  const dateTimestamp = new DateTime({ value: date })
23
- const css = classnames(className, buildCss('pb_date_year_stacked', align), spacing(props))
23
+ const css = classnames(className, buildCss('pb_date_year_stacked', align), globalProps(props))
24
24
 
25
25
  return (
26
26
  <div className={css}>
@@ -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
  type DistributionBarProps = {
8
8
  className?: String,
@@ -37,7 +37,7 @@ const DistributionBar = (props: DistributionBarProps) => {
37
37
  const normalizedValues = normalizeCharacters(widths)
38
38
 
39
39
  return (
40
- <div className={classnames(`pb_distribution_bar_${size}`, spacing(props))}>
40
+ <div className={classnames(`pb_distribution_bar_${size}`, globalProps(props))}>
41
41
  {barValues(normalizedValues)}
42
42
  </div>
43
43
  )
@@ -4,7 +4,7 @@ import React, { useCallback } from 'react'
4
4
  import { useDropzone } from 'react-dropzone'
5
5
  import { buildCss, noop } from '../utilities/props'
6
6
  import classnames from 'classnames'
7
- import { spacing } from '../utilities/spacing.js'
7
+ import { globalProps } from '../utilities/globalProps.js'
8
8
 
9
9
  import type { Callback } from '../types.js'
10
10
 
@@ -33,7 +33,7 @@ const FileUpload = (props: FileUploadProps) => {
33
33
 
34
34
  return (
35
35
  <div
36
- className={classnames(buildCss('pb_file_upload_kit', className), spacing(props))}
36
+ className={classnames(buildCss('pb_file_upload_kit', className), globalProps(props))}
37
37
  {...getRootProps()}
38
38
  >
39
39
  <Card>
@@ -3,7 +3,7 @@
3
3
  import React, { Node } from 'react'
4
4
  import { Card } from '../../'
5
5
  import classnames from 'classnames'
6
- import { spacing } from '../../utilities/spacing.js'
6
+ import { globalProps } from '../../utilities/globalProps.js'
7
7
 
8
8
  type FilterBackgroundProps = {
9
9
  background: boolean,
@@ -14,7 +14,7 @@ const FilterBackground = (props: FilterBackgroundProps) => {
14
14
  const { background = true, className, children } = props
15
15
 
16
16
  return (
17
- <div className={classnames(`pb_filter_kit ${className}`, spacing(props))}>
17
+ <div className={classnames(`pb_filter_kit ${className}`, globalProps(props))}>
18
18
  <Choose>
19
19
  <When condition={background}>
20
20
  <Card padding="none">{children}</Card>
@@ -27,7 +27,7 @@
27
27
  OpenStruct.new(name: "Georgia", value: 10),
28
28
  ]
29
29
  %>
30
- <%= pb_rails("form", props: { form_system_options: { scope: :example, method: :get } }) do |form| %>
30
+ <%= pb_rails("form", props: { form_system_options: { scope: :blahblah, method: :get } }) do |form| %>
31
31
  <%= form.text_field :example_text_field, props: { label: true } %>
32
32
  <%= form.collection_select :example_collection_select, example_collection, :value, :name, props: { label: true } %>
33
33
  <%= form.date_picker :example_date_picker %>
@@ -3,7 +3,7 @@
3
3
  import React from 'react'
4
4
  import classnames from 'classnames'
5
5
  import { Icon, Title } from '../'
6
- import { spacing } from '../utilities/spacing.js'
6
+ import { globalProps } from '../utilities/globalProps.js'
7
7
 
8
8
  const iconMap = {
9
9
  success: 'check',
@@ -25,7 +25,7 @@ const FixedConfirmationToast = (props: FixedConfirmationToastProps) => {
25
25
  const css = classnames(
26
26
  className,
27
27
  `pb_fixed_confirmation_toast_kit_${status}`,
28
- spacing(props)
28
+ globalProps(props)
29
29
  )
30
30
  const icon = iconMap[status]
31
31
 
@@ -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 as spacingFunc } from '../utilities/spacing.js'
6
+ import { globalProps } from '../utilities/globalProps.js'
7
7
  type FlexProps = {
8
8
  children: Array<React.ReactNode> | React.ReactNode,
9
9
  className?: String,
@@ -52,7 +52,7 @@ const Flex = (props: FlexProps) => {
52
52
  wrapClass
53
53
  ),
54
54
  className,
55
- spacingFunc(props)
55
+ globalProps(props)
56
56
  )}
57
57
  >
58
58
  {children}
@@ -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
  type FlexItemPropTypes = {
7
7
  children: Array<React.ReactNode> | React.ReactNode,
8
8
  fixedSize: String,
@@ -18,7 +18,7 @@ const FlexItem = (props: FlexItemPropTypes) => {
18
18
 
19
19
  return (
20
20
  <div
21
- className={classnames(buildCss('pb_flex_item_kit', growClass), className, spacing(props))}
21
+ className={classnames(buildCss('pb_flex_item_kit', growClass), className, globalProps(props))}
22
22
  style={fixedStyle}
23
23
  >
24
24
  {children}
@@ -13,7 +13,7 @@
13
13
  ]
14
14
  %>
15
15
 
16
- <%= pb_rails("form", props: { form_system_options: { scope: :example, method: :get } }) do |form| %>
16
+ <%= pb_rails("form", props: { form_system_options: { scope: :scope, method: :get } }) do |form| %>
17
17
  <%= form.text_field :example_text_field, props: { label: true } %>
18
18
  <%= form.telephone_field :example_phone_field, props: { label: true } %>
19
19
  <%= form.email_field :example_email_field, props: { label: true } %>
@@ -24,7 +24,7 @@
24
24
  <%= form.text_area :example_text_area, props: { label: true } %>
25
25
  <%= form.select :example_select, [ ["Yes", 1], ["No", 2] ], props: { label: true } %>
26
26
  <%= form.collection_select :example_collection_select, example_collection, :value, :name, props: { label: true } %>
27
- <%= form.date_picker :example_date_picker, props: { default_date: 'blank', name: "example[example_date_picker]", picker_id: "example_example_date_picker1" } %>
27
+ <%= form.date_picker :example_date_picker1, props: { default_date: 'blank' } %>
28
28
 
29
29
  <%= form.actions do |action| %>
30
30
  <%= action.submit %>
@@ -14,7 +14,7 @@
14
14
  %>
15
15
 
16
16
  <%= pb_rails("form", props: {
17
- form_system_options: { scope: :example, method: :get },
17
+ form_system_options: { scope: :scope, method: :get },
18
18
  validate: true
19
19
  }) do |form| %>
20
20
  <%= form.text_field :example_text_field, props: { label: true, required: true } %>
@@ -27,7 +27,7 @@
27
27
  <%= form.text_area :example_text_area, props: { label: true, required: true } %>
28
28
  <%= form.select :example_select, [ ["Yes", 1], ["No", 2] ], props: { label: true, blank_selection: "Select One...", required: true } %>
29
29
  <%= form.collection_select :example_collection_select, example_collection, :value, :name, props: { label: true, blank_selection: "Select One...", required: true } %>
30
- <%= form.date_picker :example_date_picker, props: { default_date: 'blank', name: "example[example_date_picker]", picker_id: "example_example_date_picker2", required: true } %>
30
+ <%= form.date_picker :example_date_picker2, props: { default_date: 'blank' } %>
31
31
 
32
32
  <%= form.actions do |action| %>
33
33
  <%= action.submit %>