playbook_ui 13.21.0.pre.alpha.PBNTR243globalpositioningpropinset2504 → 13.21.0.pre.alpha.PLAY12582514

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/table_body.rb +1 -1
  3. data/app/pb_kits/playbook/pb_avatar/avatar.rb +1 -1
  4. data/app/pb_kits/playbook/pb_bar_graph/bar_graph.rb +9 -9
  5. data/app/pb_kits/playbook/pb_button/button.rb +5 -5
  6. data/app/pb_kits/playbook/pb_circle_chart/circle_chart.rb +10 -10
  7. data/app/pb_kits/playbook/pb_currency/currency.rb +4 -4
  8. data/app/pb_kits/playbook/pb_date_picker/date_picker.rb +6 -6
  9. data/app/pb_kits/playbook/pb_distribution_bar/distribution_bar.rb +3 -3
  10. data/app/pb_kits/playbook/pb_docs/kit_example.rb +1 -1
  11. data/app/pb_kits/playbook/pb_form/form.rb +4 -4
  12. data/app/pb_kits/playbook/pb_gauge/gauge.rb +9 -9
  13. data/app/pb_kits/playbook/pb_home_address_street/home_address_street.rb +17 -17
  14. data/app/pb_kits/playbook/pb_icon_stat_value/icon_stat_value.rb +0 -2
  15. data/app/pb_kits/playbook/pb_line_graph/line_graph.rb +9 -9
  16. data/app/pb_kits/playbook/pb_list/list.rb +0 -2
  17. data/app/pb_kits/playbook/pb_multi_level_select/multi_level_select.rb +4 -4
  18. data/app/pb_kits/playbook/pb_passphrase/passphrase.rb +6 -6
  19. data/app/pb_kits/playbook/pb_phone_number_input/phone_number_input.rb +8 -8
  20. data/app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor.rb +8 -8
  21. data/app/pb_kits/playbook/pb_select/select.rb +6 -6
  22. data/app/pb_kits/playbook/pb_selectable_card/selectable_card.rb +1 -1
  23. data/app/pb_kits/playbook/pb_selectable_icon/selectable_icon.rb +1 -1
  24. data/app/pb_kits/playbook/pb_stat_value/stat_value.rb +1 -1
  25. data/app/pb_kits/playbook/pb_text_input/text_input.rb +7 -7
  26. data/app/pb_kits/playbook/pb_treemap_chart/treemap_chart.rb +6 -6
  27. data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +8 -8
  28. data/app/pb_kits/playbook/utilities/_positioning.scss +10 -23
  29. data/app/pb_kits/playbook/utilities/globalProps.ts +9 -52
  30. data/dist/playbook-rails.js +1 -1
  31. data/lib/playbook/bottom.rb +3 -6
  32. data/lib/playbook/forms/builder/action_area.rb +2 -2
  33. data/lib/playbook/forms/builder/checkbox_field.rb +2 -2
  34. data/lib/playbook/forms/builder/collection_select_field.rb +1 -1
  35. data/lib/playbook/forms/builder/date_picker_field.rb +1 -1
  36. data/lib/playbook/forms/builder/form_field_builder.rb +1 -1
  37. data/lib/playbook/forms/builder/intl_telephone_field.rb +1 -1
  38. data/lib/playbook/forms/builder/multi_level_select_field.rb +1 -1
  39. data/lib/playbook/forms/builder/select_field.rb +1 -1
  40. data/lib/playbook/forms/builder/typeahead_field.rb +1 -1
  41. data/lib/playbook/kit_base.rb +2 -2
  42. data/lib/playbook/left.rb +3 -6
  43. data/lib/playbook/pb_doc_helper.rb +5 -5
  44. data/lib/playbook/pb_forms_helper.rb +1 -1
  45. data/lib/playbook/props/percentage.rb +2 -2
  46. data/lib/playbook/props.rb +1 -1
  47. data/lib/playbook/right.rb +3 -6
  48. data/lib/playbook/top.rb +3 -6
  49. data/lib/playbook/version.rb +1 -1
  50. metadata +15 -43
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 862f27be95870b310dd89d38cd466bca0175ffa286df0b80b62c581e604e9db4
4
- data.tar.gz: 31c27ba009fba844f070688d282d59631f86091635854517ea3714c7fae6ad8c
3
+ metadata.gz: b0dd38dd97e8c632b8821888bfd3e15a2d357c941f76cb1e7672ad60450903f7
4
+ data.tar.gz: b8d9ead67a51d3d96dd50c71ee8a5f5e33f4be1112df425ca1ea9e7a1a3307c8
5
5
  SHA512:
6
- metadata.gz: 67145d68c85367df0bf1c7bf5d409955e27a5e9c0a170dfa0139a215471cbd4b93ccf53b94a7f2d4448f0da4adcee9a3fa02a7ea6636df8b540bef34a19a027d
7
- data.tar.gz: 819ba714430f9efd7109f822dbb20e01d7e00d004557522fe51a6290d024af97d23ba401365398192bce5f4f2f132db4526433093664e58091d9e27f749f7bf1
6
+ metadata.gz: 654314ebddb64ce6547c51c51c434296381b9f70f3101610b5f8fd70712c2ecf1236c37e528d3a52828c2de237413106b039570ec051ce4fc115e5a4b6d12f60
7
+ data.tar.gz: 846774c0f9715ff7fbdad5a017e0308a921b62256db62e06fe6213cee136431b3cbab70fccb8ac99b283c064776b2ece40c0c1f1b8683a9243e56fde9053cb1d
@@ -11,7 +11,7 @@ module Playbook
11
11
  def render_row_and_children(row, column_definitions, current_depth = 0)
12
12
  output = ActiveSupport::SafeBuffer.new
13
13
 
14
- output << pb_rails("advanced_table/table_row", props: { row: row, column_definitions: column_definitions, depth: current_depth })
14
+ output << pb_rails("advanced_table/table_row", props: { row:, column_definitions:, depth: current_depth })
15
15
 
16
16
  if row[:children].present?
17
17
  row[:children].each do |child_row|
@@ -22,7 +22,7 @@ module Playbook
22
22
  end
23
23
 
24
24
  def online_status_props
25
- { status: status, classname: "size_#{size}" }
25
+ { status:, classname: "size_#{size}" }
26
26
  end
27
27
 
28
28
  def alt_text
@@ -42,27 +42,27 @@ module Playbook
42
42
 
43
43
  def standard_options
44
44
  {
45
- align: align,
46
- id: id,
45
+ align:,
46
+ id:,
47
47
  className: classname,
48
48
  chartData: chart_data,
49
49
  dark: dark ? "dark" : "",
50
50
  type: chart_type,
51
- title: title,
51
+ title:,
52
52
  subTitle: subtitle,
53
53
  axisTitle: axis_title,
54
54
  pointStart: point_start,
55
55
  xAxisCategories: x_axis_categories,
56
56
  yAxisMin: y_axis_min,
57
57
  yAxisMax: y_axis_max,
58
- legend: legend,
58
+ legend:,
59
59
  toggleLegendClick: toggle_legend_click,
60
- height: height,
61
- colors: colors,
62
- layout: layout,
60
+ height:,
61
+ colors:,
62
+ layout:,
63
63
  verticalAlign: vertical_align,
64
- x: x,
65
- y: y,
64
+ x:,
65
+ y:,
66
66
  }
67
67
  end
68
68
 
@@ -36,13 +36,13 @@ module Playbook
36
36
  def options
37
37
  options = {
38
38
  class: classname,
39
- disabled: disabled,
40
- id: id,
39
+ disabled:,
40
+ id:,
41
41
  role: "button",
42
42
  tabindex: 0,
43
- type: type,
44
- value: value,
45
- form: form,
43
+ type:,
44
+ value:,
45
+ form:,
46
46
  }.compact
47
47
  combined_html_options.merge!(options) if combined_html_options.present?
48
48
  end
@@ -42,15 +42,15 @@ module Playbook
42
42
 
43
43
  def chart_options
44
44
  {
45
- align: align,
46
- id: id,
47
- colors: colors,
45
+ align:,
46
+ id:,
47
+ colors:,
48
48
  chartData: chart_data,
49
49
  dark: dark ? "dark" : "",
50
- title: title,
51
- height: height,
50
+ title:,
51
+ height:,
52
52
  type: style,
53
- legend: legend,
53
+ legend:,
54
54
  dataLabelHtml: data_label_html,
55
55
  dataLabels: data_labels,
56
56
  tooltipHtml: tooltip_html,
@@ -60,11 +60,11 @@ module Playbook
60
60
  innerSize: inner_size,
61
61
  zMin: z_min,
62
62
  startAngle: start_angle,
63
- rounded: rounded,
64
- layout: layout,
63
+ rounded:,
64
+ layout:,
65
65
  verticalAlign: vertical_align,
66
- x: x,
67
- y: y,
66
+ x:,
67
+ y:,
68
68
  }
69
69
  end
70
70
 
@@ -51,14 +51,14 @@ module Playbook
51
51
  {
52
52
  classname: "dollar_sign",
53
53
  color: "light",
54
- dark: dark,
54
+ dark:,
55
55
  }
56
56
  end
57
57
 
58
58
  def caption_props
59
59
  {
60
60
  text: label,
61
- dark: dark,
61
+ dark:,
62
62
  }
63
63
  end
64
64
 
@@ -67,7 +67,7 @@ module Playbook
67
67
  size: size_value,
68
68
  text: abbreviate ? abbreviated_value : whole_value,
69
69
  classname: "pb_currency_value",
70
- dark: dark,
70
+ dark:,
71
71
  }
72
72
  end
73
73
 
@@ -76,7 +76,7 @@ module Playbook
76
76
  text: units_element,
77
77
  color: "light",
78
78
  classname: "unit",
79
- dark: dark,
79
+ dark:,
80
80
  }
81
81
  end
82
82
 
@@ -88,17 +88,17 @@ module Playbook
88
88
  disableRange: disable_range,
89
89
  disableWeekdays: disable_weekdays,
90
90
  enableTime: enable_time,
91
- format: format,
91
+ format:,
92
92
  hideIcon: hide_icon,
93
- inline: inline,
93
+ inline:,
94
94
  maxDate: max_date,
95
95
  minDate: min_date,
96
- mode: mode,
96
+ mode:,
97
97
  pickerId: picker_id,
98
- plugins: plugins,
99
- position: position,
98
+ plugins:,
99
+ position:,
100
100
  positionElement: position_element,
101
- required: required,
101
+ required:,
102
102
  selectionType: selection_type,
103
103
  showTimezone: show_timezone,
104
104
  staticPosition: static_position,
@@ -23,9 +23,9 @@ module Playbook
23
23
 
24
24
  def chart_options
25
25
  {
26
- size: size,
27
- widths: widths,
28
- colors: colors,
26
+ size:,
27
+ widths:,
28
+ colors:,
29
29
  }
30
30
  end
31
31
  end
@@ -16,7 +16,7 @@ module Playbook
16
16
  if type == "rails"
17
17
  render inline: source
18
18
  elsif type == "react"
19
- react_component example_key.camelize, { dark: dark }
19
+ react_component example_key.camelize, { dark: }
20
20
  elsif type == "swift"
21
21
  ## render the markdown file
22
22
  render inline: source
@@ -18,11 +18,11 @@ module Playbook
18
18
 
19
19
  def form_options
20
20
  {
21
- id: id,
22
- aria: aria,
21
+ id:,
22
+ aria:,
23
23
  class: classname,
24
- data: data,
25
- validate: validate,
24
+ data:,
25
+ validate:,
26
26
  }.merge(prop(:options) || prop(:form_system_options) || {})
27
27
  end
28
28
  end
@@ -24,22 +24,22 @@ module Playbook
24
24
 
25
25
  def chart_options
26
26
  {
27
- id: id,
27
+ id:,
28
28
  chartData: chart_data,
29
29
  circumference: full_circle ? [0, 360] : [-100, 100],
30
30
  dark: dark ? "dark" : "",
31
31
  disableAnimation: disable_animation,
32
- height: height,
33
- min: min,
34
- max: max,
35
- title: title,
36
- suffix: suffix,
37
- prefix: prefix,
32
+ height:,
33
+ min:,
34
+ max:,
35
+ title:,
36
+ suffix:,
37
+ prefix:,
38
38
  showLabels: show_labels,
39
- style: style,
39
+ style:,
40
40
  tooltipHtml: tooltip_html,
41
41
  type: style,
42
- colors: colors,
42
+ colors:,
43
43
  }
44
44
  end
45
45
 
@@ -49,28 +49,28 @@ module Playbook
49
49
 
50
50
  def city_emphasis_props
51
51
  {
52
- address_house_style: address_house_style,
53
- address_house_style2: address_house_style2,
54
- city_state: city_state,
55
- dark: dark,
56
- home_id: home_id,
57
- home_url: home_url,
58
- new_window: new_window,
59
- territory: territory,
60
- zip: zip,
52
+ address_house_style:,
53
+ address_house_style2:,
54
+ city_state:,
55
+ dark:,
56
+ home_id:,
57
+ home_url:,
58
+ new_window:,
59
+ territory:,
60
+ zip:,
61
61
  }
62
62
  end
63
63
 
64
64
  def street_emphasis_props
65
65
  {
66
- address_house_style: address_house_style,
67
- address_house_style2: address_house_style2,
68
- city_state_zip: city_state_zip,
69
- dark: dark,
70
- home_id: home_id,
71
- home_url: home_url,
72
- new_window: new_window,
73
- territory: territory,
66
+ address_house_style:,
67
+ address_house_style2:,
68
+ city_state_zip:,
69
+ dark:,
70
+ home_id:,
71
+ home_url:,
72
+ new_window:,
73
+ territory:,
74
74
  }
75
75
  end
76
76
 
@@ -33,7 +33,6 @@ module Playbook
33
33
  end
34
34
 
35
35
  def title_size
36
- # rubocop:disable Style/CaseLikeIf
37
36
  if size == "lg"
38
37
  1
39
38
  elsif size == "md"
@@ -41,7 +40,6 @@ module Playbook
41
40
  else
42
41
  3
43
42
  end
44
- # rubocop:enable Style/CaseLikeIf
45
43
  end
46
44
  end
47
45
  end
@@ -40,27 +40,27 @@ module Playbook
40
40
 
41
41
  def chart_options
42
42
  {
43
- align: align,
44
- id: id,
43
+ align:,
44
+ id:,
45
45
  className: classname,
46
46
  chartData: chart_data,
47
47
  dark: dark ? "dark" : "",
48
48
  type: chart_type,
49
- title: title,
49
+ title:,
50
50
  subTitle: subtitle,
51
51
  axisTitle: axis_title,
52
52
  pointStart: point_start,
53
53
  xAxisCategories: x_axis_categories,
54
54
  yAxisMin: y_axis_min,
55
55
  yAxisMax: y_axis_max,
56
- legend: legend,
56
+ legend:,
57
57
  toggleLegendClick: toggle_legend_click,
58
- height: height,
59
- colors: colors,
60
- layout: layout,
58
+ height:,
59
+ colors:,
60
+ layout:,
61
61
  verticalAlign: vertical_align,
62
- x: x,
63
- y: y,
62
+ x:,
63
+ y:,
64
64
  }
65
65
  end
66
66
 
@@ -41,7 +41,6 @@ module Playbook
41
41
  dark ? "dark" : nil
42
42
  end
43
43
 
44
- # rubocop:disable Style/CaseLikeIf
45
44
  def layout_class
46
45
  if layout == "right"
47
46
  "layout_right"
@@ -51,7 +50,6 @@ module Playbook
51
50
  ""
52
51
  end
53
52
  end
54
- # rubocop:enable Style/CaseLikeIf
55
53
 
56
54
  def size_class
57
55
  size ? "large" : nil
@@ -26,14 +26,14 @@ module Playbook
26
26
 
27
27
  def multi_level_select_options
28
28
  {
29
- id: id,
29
+ id:,
30
30
  inputDisplay: input_display,
31
- name: name,
31
+ name:,
32
32
  treeData: tree_data,
33
33
  returnAllSelected: return_all_selected,
34
34
  selectedIds: selected_ids,
35
- input_name: input_name,
36
- variant: variant,
35
+ input_name:,
36
+ variant:,
37
37
  }
38
38
  end
39
39
  end
@@ -18,15 +18,15 @@ module Playbook
18
18
 
19
19
  def passphrase_options
20
20
  {
21
- dark: dark,
22
- id: id,
23
- confirmation: confirmation,
21
+ dark:,
22
+ id:,
23
+ confirmation:,
24
24
  inputProps: input_props,
25
- label: label,
25
+ label:,
26
26
  showTipsBelow: show_tips_below,
27
- tips: tips,
27
+ tips:,
28
28
  uncontrolled: true,
29
- value: value,
29
+ value:,
30
30
  }.compact
31
31
  end
32
32
  end
@@ -28,17 +28,17 @@ module Playbook
28
28
 
29
29
  def phone_number_input_options
30
30
  {
31
- id: id,
32
- dark: dark,
33
- disabled: disabled,
34
- error: error,
31
+ id:,
32
+ dark:,
33
+ disabled:,
34
+ error:,
35
35
  initialCountry: initial_country,
36
- label: label,
37
- name: name,
36
+ label:,
37
+ name:,
38
38
  onlyCountries: only_countries,
39
39
  preferredCountries: preferred_countries,
40
- required: required,
41
- value: value,
40
+ required:,
41
+ value:,
42
42
  }
43
43
  end
44
44
  end
@@ -39,16 +39,16 @@ module Playbook
39
39
 
40
40
  def rich_text_options
41
41
  {
42
- id: id,
43
- inline: inline,
42
+ id:,
43
+ inline:,
44
44
  className: classname,
45
- focus: focus,
46
- simple: simple,
47
- sticky: sticky,
45
+ focus:,
46
+ simple:,
47
+ sticky:,
48
48
  toolbarBottom: toolbar_bottom,
49
- value: value,
50
- template: template,
51
- placeholder: placeholder,
49
+ value:,
50
+ template:,
51
+ placeholder:,
52
52
  }
53
53
  end
54
54
  end
@@ -28,13 +28,13 @@ module Playbook
28
28
 
29
29
  def all_attributes
30
30
  {
31
- id: id,
31
+ id:,
32
32
  prompt: blank_selection,
33
- disabled: disabled,
34
- required: required,
35
- multiple: multiple,
36
- onchange: onchange,
37
- include_blank: include_blank,
33
+ disabled:,
34
+ required:,
35
+ multiple:,
36
+ onchange:,
37
+ include_blank:,
38
38
  }.merge(attributes)
39
39
  end
40
40
 
@@ -42,7 +42,7 @@ module Playbook
42
42
  def additional_input_options
43
43
  input_options.merge(
44
44
  id: input_id_present,
45
- disabled: disabled
45
+ disabled:
46
46
  )
47
47
  end
48
48
 
@@ -39,7 +39,7 @@ module Playbook
39
39
  def additional_input_options
40
40
  input_options.merge(
41
41
  id: input_id_present,
42
- disabled: disabled
42
+ disabled:
43
43
  )
44
44
  end
45
45
 
@@ -11,7 +11,7 @@ module Playbook
11
11
  if precision.nil?
12
12
  number_with_delimiter(value, delimiter: ",", separator: ".")
13
13
  else
14
- number_with_precision(value, precision: precision, delimiter: ",", separator: ".")
14
+ number_with_precision(value, precision:, delimiter: ",", separator: ".")
15
15
  end
16
16
  end
17
17
 
@@ -43,7 +43,7 @@ module Playbook
43
43
  end
44
44
 
45
45
  def add_on_props
46
- { dark: dark }.merge(add_on || {})
46
+ { dark: }.merge(add_on || {})
47
47
  end
48
48
 
49
49
  private
@@ -53,14 +53,14 @@ module Playbook
53
53
  autocomplete: autocomplete ? nil : "off",
54
54
  class: "text_input #{input_options.dig(:classname) || ''}",
55
55
  data: validation_data,
56
- disabled: disabled,
56
+ disabled:,
57
57
  id: input_options.dig(:id) || id,
58
- name: name,
58
+ name:,
59
59
  pattern: validation_pattern,
60
- placeholder: placeholder,
61
- required: required,
62
- type: type,
63
- value: value,
60
+ placeholder:,
61
+ required:,
62
+ type:,
63
+ value:,
64
64
  }.merge(input_options)
65
65
  end
66
66
 
@@ -23,13 +23,13 @@ module Playbook
23
23
  {
24
24
  chartData: chart_data,
25
25
  className: classname,
26
- colors: colors,
26
+ colors:,
27
27
  dark: dark ? "dark" : "",
28
- drillable: drillable,
29
- grouped: grouped,
30
- height: height,
31
- id: id,
32
- title: title,
28
+ drillable:,
29
+ grouped:,
30
+ height:,
31
+ id:,
32
+ title:,
33
33
  tooltipHtml: tooltip_html,
34
34
  type: chart_type,
35
35
  }
@@ -57,17 +57,17 @@ module Playbook
57
57
 
58
58
  def typeahead_react_options
59
59
  base_options = {
60
- dark: dark,
60
+ dark:,
61
61
  defaultValue: default_options,
62
- error: error,
63
- id: id,
64
- inline: inline,
62
+ error:,
63
+ id:,
64
+ inline:,
65
65
  isMulti: is_multi,
66
- label: label,
66
+ label:,
67
67
  multiKit: multi_kit,
68
- name: name,
69
- options: options,
70
- placeholder: placeholder,
68
+ name:,
69
+ options:,
70
+ placeholder:,
71
71
  plusIcon: plus_icon,
72
72
  }
73
73
 
@@ -88,31 +88,18 @@ $space_classes: (
88
88
 
89
89
  $positions: "top", "right", "bottom", "left";
90
90
 
91
-
92
- @mixin position-property($position, $space_name, $space, $is_inset: false) {
93
- @if $space_name == "0" {
94
- #{$position}: 0 !important;
95
- }
96
- @else if $space_name == "auto" or $space_name == "initial" or $space_name == "inherit" {
97
- #{$position}: #{$space} !important;
98
- }
99
- @else {
100
- @if $is_inset {
101
- #{$position}: #{$space} !important;
102
- } @else {
103
- #{$position}: #{-$space} !important;
104
- }
105
- }
106
- }
107
-
108
91
  @each $position in $positions {
109
92
  @each $space_name, $space in $space_classes {
110
- $space_name_str: "#{ $space_name }";
111
- .#{$position}_#{$space_name_str} {
112
- @include position-property($position, $space_name_str, $space)
113
- }
114
- .#{$position}_#{$space_name_str}_inset {
115
- @include position-property($position, $space_name_str, $space, true)
93
+ .#{$position}_#{$space_name} {
94
+ @if $space_name == "0" {
95
+ #{$position}: 0 !important;
96
+ }
97
+ @else if $space_name == "auto" or $space_name == "initial" or $space_name == "inherit" {
98
+ #{$position}: #{$space} !important;
99
+ }
100
+ @else {
101
+ #{$position}: #{-$space} !important;
102
+ }
116
103
  }
117
104
  }
118
105
  }