playbook_ui 13.30.0 → 13.31.0.pre.alpha.PBNTR342navtabbing3230

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_sort.html.erb +59 -0
  3. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_sort.md +6 -0
  4. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +3 -2
  5. data/app/pb_kits/playbook/pb_advanced_table/table_header.html.erb +4 -4
  6. data/app/pb_kits/playbook/pb_button/_button.scss +3 -3
  7. data/app/pb_kits/playbook/pb_button/_button_mixins.scss +3 -2
  8. data/app/pb_kits/playbook/pb_caption/_caption_mixin.scss +1 -1
  9. data/app/pb_kits/playbook/pb_card/_card.tsx +4 -3
  10. data/app/pb_kits/playbook/pb_collapsible/index.js +6 -1
  11. data/app/pb_kits/playbook/pb_dashboard/commonSettings.js +1 -1
  12. data/app/pb_kits/playbook/pb_dashboard/pbChartsDarkTheme.ts +1 -1
  13. data/app/pb_kits/playbook/pb_dashboard/pbChartsLightTheme.ts +1 -1
  14. data/app/pb_kits/playbook/pb_date_time_stacked/docs/_date_time_stacked_default_swift.md +33 -0
  15. data/app/pb_kits/playbook/pb_date_time_stacked/docs/_date_time_stacked_props_swift.md +18 -0
  16. data/app/pb_kits/playbook/pb_date_time_stacked/docs/example.yml +6 -1
  17. data/app/pb_kits/playbook/pb_date_year_stacked/docs/_date_year_stacked_default.jsx +4 -1
  18. data/app/pb_kits/playbook/pb_draggable/_draggable.scss +2 -4
  19. data/app/pb_kits/playbook/pb_draggable/context/index.tsx +84 -50
  20. data/app/pb_kits/playbook/pb_draggable/context/types.ts +31 -0
  21. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_default.jsx +15 -19
  22. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_default.md +5 -3
  23. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers.jsx +5 -1
  24. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards.jsx +11 -4
  25. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards.md +8 -2
  26. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list.jsx +2 -2
  27. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list.md +5 -1
  28. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list.jsx +6 -4
  29. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list.md +5 -0
  30. data/app/pb_kits/playbook/pb_draggable/draggable.test.jsx +142 -15
  31. data/app/pb_kits/playbook/pb_draggable/subcomponents/DraggableItem.tsx +6 -5
  32. data/app/pb_kits/playbook/pb_dropdown/_dropdown.scss +18 -0
  33. data/app/pb_kits/playbook/pb_dropdown/_dropdown.tsx +228 -218
  34. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_error.html.erb +9 -0
  35. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_error.jsx +34 -0
  36. data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +2 -0
  37. data/app/pb_kits/playbook/pb_dropdown/docs/index.js +2 -1
  38. data/app/pb_kits/playbook/pb_dropdown/dropdown.html.erb +16 -12
  39. data/app/pb_kits/playbook/pb_dropdown/dropdown.rb +9 -0
  40. data/app/pb_kits/playbook/pb_dropdown/dropdown.test.jsx +17 -2
  41. data/app/pb_kits/playbook/pb_dropdown/index.js +33 -4
  42. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.tsx +9 -3
  43. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_custom_icon.html.erb +32 -0
  44. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_custom_icon.jsx +48 -0
  45. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/example.yml +2 -0
  46. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/index.js +1 -0
  47. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb +16 -11
  48. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.test.js +72 -0
  49. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +9 -0
  50. data/app/pb_kits/playbook/pb_form_pill/_form_pill.scss +1 -1
  51. data/app/pb_kits/playbook/pb_icon/_icon.tsx +37 -6
  52. data/app/pb_kits/playbook/pb_icon/docs/_icon_default.html.erb +1 -1
  53. data/app/pb_kits/playbook/pb_icon/docs/_icon_default.jsx +2 -3
  54. data/app/pb_kits/playbook/pb_icon/icon.rb +21 -1
  55. data/app/pb_kits/playbook/pb_icon/icon_aliases.json +39 -0
  56. data/app/pb_kits/playbook/pb_list/_list.tsx +4 -4
  57. data/app/pb_kits/playbook/pb_list/_list_item.tsx +7 -3
  58. data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav.html.erb +1 -1
  59. data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav.jsx +1 -0
  60. data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav.md +3 -1
  61. data/app/pb_kits/playbook/pb_nav/docs/_tab_nav.html.erb +12 -0
  62. data/app/pb_kits/playbook/pb_nav/docs/_tab_nav.html.md +0 -0
  63. data/app/pb_kits/playbook/pb_nav/docs/example.yml +1 -0
  64. data/app/pb_kits/playbook/pb_nav/index.js +43 -0
  65. data/app/pb_kits/playbook/pb_nav/item.html.erb +1 -1
  66. data/app/pb_kits/playbook/pb_nav/item.rb +1 -0
  67. data/app/pb_kits/playbook/pb_nav/nav.rb +9 -0
  68. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_default.html.erb +24 -0
  69. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_default.md +4 -4
  70. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_multi_directional.html.erb +11 -0
  71. data/app/pb_kits/playbook/pb_overlay/docs/example.yml +4 -0
  72. data/app/pb_kits/playbook/pb_overlay/overlay.html.erb +27 -0
  73. data/app/pb_kits/playbook/pb_overlay/overlay.rb +110 -0
  74. data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.tsx +8 -23
  75. data/app/pb_kits/playbook/pb_selectable_list/_item.tsx +7 -3
  76. data/app/pb_kits/playbook/pb_selectable_list/_selectable_list.tsx +3 -3
  77. data/app/pb_kits/playbook/pb_table/table_header.html.erb +16 -2
  78. data/app/pb_kits/playbook/pb_timeline/_item.tsx +11 -10
  79. data/app/pb_kits/playbook/pb_timeline/_timeline.tsx +8 -6
  80. data/app/pb_kits/playbook/playbook-rails.js +3 -0
  81. data/app/pb_kits/playbook/tokens/_titles.scss +4 -4
  82. data/app/pb_kits/playbook/tokens/_typography.scss +10 -10
  83. data/app/pb_kits/playbook/utilities/globalProps.ts +1 -0
  84. data/dist/menu.yml +566 -472
  85. data/dist/playbook-rails.js +7 -7
  86. data/dist/reset.css +1 -1
  87. data/lib/playbook/version.rb +2 -2
  88. metadata +24 -5
@@ -0,0 +1,12 @@
1
+ <%= pb_rails("nav", props: { orientation: "horizontal", variant: "subtle", tabbing: true }) do %>
2
+ <%= pb_rails("nav/item", props: { text: "About", active: true, data: { pb_nav_item_tab: "about" }, cursor: "pointer" }) %>
3
+ <%= pb_rails("nav/item", props: { text: "Case Studies", data: { pb_nav_item_tab: "case_studies" }, cursor: "pointer" }) %>
4
+ <% end %>
5
+
6
+ <div id="about">
7
+ This is about!
8
+ </div>
9
+
10
+ <div id="case_studies">
11
+ This is case studies!
12
+ </div>
File without changes
@@ -19,6 +19,7 @@ examples:
19
19
  - block_nav: Block
20
20
  - block_no_title_nav: Without Title
21
21
  - new_tab: Open in a New Tab
22
+ - tab_nav: Tab Nav
22
23
 
23
24
  react:
24
25
  - default_nav: Default
@@ -0,0 +1,43 @@
1
+ import PbEnhancedElement from '../pb_enhanced_element'
2
+
3
+ const NAV_SELECTOR = '[data-pb-nav-tab]'
4
+ const NAV_ITEM_SELECTOR = '[data-pb-nav-item-tab]'
5
+
6
+ export default class PbNav extends PbEnhancedElement {
7
+ static get selector() {
8
+ return NAV_SELECTOR
9
+ }
10
+
11
+ connect() {
12
+ this.hideAndAddEventListeners()
13
+ }
14
+
15
+ hideAndAddEventListeners() {
16
+ const navItems = this.element.querySelectorAll(NAV_ITEM_SELECTOR)
17
+ navItems.forEach((navItem) => {
18
+ if (!navItem.className.includes('active')) {
19
+ this.changeContentDisplay(navItem.dataset.pbNavItemTab, 'none')
20
+ }
21
+
22
+ navItem.addEventListener('click', event => this.handleNavItemClick(event))
23
+ })
24
+ }
25
+
26
+ handleNavItemClick(event) {
27
+ event.preventDefault()
28
+ const navItem = event.target.closest(NAV_ITEM_SELECTOR)
29
+ this.changeContentDisplay(navItem.dataset.pbNavItemTab, 'block')
30
+
31
+ const navItems = this.element.querySelectorAll(NAV_ITEM_SELECTOR)
32
+ navItems.forEach((navItemSelected) => {
33
+ if (navItem !== navItemSelected) {
34
+ this.changeContentDisplay(navItemSelected.dataset.pbNavItemTab, 'none')
35
+ }
36
+ })
37
+ }
38
+
39
+ changeContentDisplay(contentId, display) {
40
+ const content = document.getElementById(contentId)
41
+ content.style.display = display
42
+ }
43
+ }
@@ -22,7 +22,7 @@
22
22
  </span>
23
23
  <% end %>
24
24
  <% end %>
25
- <%= pb_rails("collapsible/collapsible_content") do %>
25
+ <%= pb_rails("collapsible/collapsible_content", props: {collapsed: object.collapsed}) do %>
26
26
  <%= content.presence %>
27
27
  <% end %>
28
28
  <% end %>
@@ -12,6 +12,7 @@ module Playbook
12
12
  default: "regular"
13
13
  prop :highlighted_border, type: Playbook::Props::Boolean, default: true
14
14
  prop :collapsible, type: Playbook::Props::Boolean, default: false
15
+ prop :collapsed, type: Playbook::Props::Boolean, default: true
15
16
  prop :link
16
17
  prop :text
17
18
  prop :collapsible_trail, type: Playbook::Props::Boolean, default: false
@@ -13,11 +13,20 @@ module Playbook
13
13
  default: "normal"
14
14
  prop :highlight, type: Playbook::Props::Boolean, default: true
15
15
  prop :borderless, type: Playbook::Props::Boolean, default: false
16
+ prop :tabbing, type: Playbook::Props::Boolean, default: false
16
17
 
17
18
  def classname
18
19
  generate_classname("pb_nav_list", variant, orientation, highlight_class, borderless_class)
19
20
  end
20
21
 
22
+ def data
23
+ if tabbing
24
+ Hash(prop(:data)).merge(pb_nav_tab: true)
25
+ else
26
+ prop(:data)
27
+ end
28
+ end
29
+
21
30
  def highlight_class
22
31
  highlight ? "highlight" : nil
23
32
  end
@@ -0,0 +1,24 @@
1
+ <%= pb_rails("overlay") do %>
2
+ <%= pb_rails("table", props: { size: "sm" }) do %>
3
+ <thead>
4
+ <tr>
5
+ <th>Column 1</th>
6
+ <th>Column 2</th>
7
+ <th>Column 3</th>
8
+ <th>Column 4</th>
9
+ <th>Column 5</th>
10
+ </tr>
11
+ </thead>
12
+ <tbody>
13
+ <% 7.times do %>
14
+ <tr>
15
+ <td>Value 1</td>
16
+ <td>Value 2</td>
17
+ <td>Value 3</td>
18
+ <td>Value 4</td>
19
+ <td>Value 5</td>
20
+ </tr>
21
+ <% end %>
22
+ </tbody>
23
+ <% end %>
24
+ <% end %>
@@ -1,7 +1,7 @@
1
- Overlays require a `color`, which sets the "start" (opaque) color of a gradient mask. Because this overlay is intended to reveal underlying content, the "end" color is fixed to transparent.
1
+ Overlays optionally accept a `color`, which sets the "start" (opaque) color of a gradient mask. Because this overlay is intended to reveal underlying content, the "end" color is fixed to transparent.
2
2
 
3
- The optional `layout` prop accepts a `position` and a `size` as a key:value pair object.
3
+ The optional `layout` prop accepts the `position` and `size` of the overlay as a key:value pair.
4
4
 
5
- The `position` key accepts `top`, `bottom`, `y` (for both top and bottom) `right`, `left`, or `x` (for both left and right), which sets the side(s) where the `color` overlay starts. The direction of the overlay is always toward the opposite side of the position. For example, the default position of `bottom` starts the overlay on the bottom edge of your container and extends it toward the opposite side: the top.
5
+ The `position` key accepts `bottom` (default), `top`, `y` (for both top and bottom) `right`, `left`, or `x` (for both left and right), which sets the side(s) where the `color` overlay starts. The direction of the overlay is always toward the opposite side of the position. For example, the default position of `bottom` starts the overlay on the bottom edge of your container and extends it toward the opposite side: the top.
6
6
 
7
- The `size` value accepts our [spacing tokens](https://playbook.powerapp.cloud/visual_guidelines/spacing) or a percentage value as a string, and literally translates to how much of the container is covered by the overlay. By default, `size` is set to `full` (100%) so that your overlay covers the entire container with a smooth fade from `color` at its starting edge, fading to transparent and ending at the containers opposite edge.
7
+ The `size` value is `full` (100%) by default, but accepts our [spacing tokens](https://playbook.powerapp.cloud/visual_guidelines/spacing) or a percentage value as a string, and literally translates to how much of the container is covered by the overlay(s).
@@ -0,0 +1,11 @@
1
+ <%= pb_rails("overlay", props: { layout: { "x": "xl" }, color: "card_light" }) do %>
2
+ <%= pb_rails("flex", props: { column_gap: "lg", orientation: "row", overflow_x: "auto" }) do %>
3
+ <% 15.times do %>
4
+ <%= pb_rails("flex/flex_item") do %>
5
+ <%= pb_rails("card") do %>
6
+ Card content
7
+ <% end %>
8
+ <% end %>
9
+ <% end %>
10
+ <% end %>
11
+ <% end %>
@@ -2,3 +2,7 @@ examples:
2
2
  react:
3
3
  - overlay_default: Default
4
4
  - overlay_multi_directional: Multi-directional
5
+
6
+ rails:
7
+ - overlay_default: Default
8
+ - overlay_multi_directional: Multi-directional
@@ -0,0 +1,27 @@
1
+ <%= pb_content_tag(:div,
2
+ aria: object.aria,
3
+ class: object.classname,
4
+ data: object.data,
5
+ id: object.id,
6
+ **combined_html_options) do %>
7
+ <% if is_size_percentage %>
8
+ <div class="overlay_linear_gradient"
9
+ style="background: <%= previous_overlay %>"></div>
10
+
11
+ <%= content.presence %>
12
+
13
+ <% if has_subsequent_overlay %>
14
+ <div class="overlay_linear_gradient"
15
+ style="background: <%= subsequent_overlay %>"></div>
16
+ <% end %>
17
+
18
+ <% else %>
19
+ <div class="<%= previous_overlay_class_name %>"></div>
20
+
21
+ <%= content.presence %>
22
+
23
+ <% if has_subsequent_overlay %>
24
+ <div class="<%= subsequent_overlay_class_name %>"></div>
25
+ <% end %>
26
+ <% end %>
27
+ <% end %>
@@ -0,0 +1,110 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Playbook
4
+ module PbOverlay
5
+ class Overlay < Playbook::KitBase
6
+ prop :color, type: Playbook::Props::Enum,
7
+ values: %w[card_light bg_light card_dark bg_dark],
8
+ default: "card_light"
9
+ prop :layout, type: Playbook::Props::HashProp,
10
+ default: { "bottom": "full" }
11
+
12
+ def classname
13
+ generate_classname("pb_overlay")
14
+ end
15
+
16
+ def position
17
+ layout.keys[0]
18
+ end
19
+
20
+ def size
21
+ layout.values[0]
22
+ end
23
+
24
+ def is_size_percentage
25
+ size.include?("%")
26
+ end
27
+
28
+ def previous_overlay
29
+ "linear-gradient(#{previous_overlay_direction}, #{color_map[color.to_sym]} 0%, transparent #{size})"
30
+ end
31
+
32
+ def subsequent_overlay
33
+ "linear-gradient(#{subsequent_overlay_direction}, #{color_map[color.to_sym]} 0%, transparent #{size})"
34
+ end
35
+
36
+ def previous_overlay_class_name
37
+ "overlay_#{color}_#{previous_overlay_direction_token}_#{size}"
38
+ end
39
+
40
+ def subsequent_overlay_class_name
41
+ "overlay_#{color}_#{subsequent_overlay_direction_token}_#{size}"
42
+ end
43
+
44
+ def previous_overlay_direction
45
+ previous_overlay_direction_map[position.to_sym]
46
+ end
47
+
48
+ def subsequent_overlay_direction
49
+ subsequent_overlay_direction_map[position.to_sym]
50
+ end
51
+
52
+ def previous_overlay_direction_token
53
+ has_subsequent_overlay ? previous_overlay_direction_map_token[position.to_sym] : position
54
+ end
55
+
56
+ def subsequent_overlay_direction_token
57
+ has_subsequent_overlay ? subsequent_overlay_direction_map_token[position.to_sym] : position
58
+ end
59
+
60
+ def previous_overlay_direction_map
61
+ {
62
+ "bottom": "to top",
63
+ "top": "to bottom",
64
+ "left": "to right",
65
+ "right": "to left",
66
+ "x": "to right",
67
+ "y": "to top",
68
+ }
69
+ end
70
+
71
+ def subsequent_overlay_direction_map
72
+ {
73
+ "bottom": "to top",
74
+ "top": "to bottom",
75
+ "left": "to right",
76
+ "right": "to left",
77
+ "x": "to left",
78
+ "y": "to bottom",
79
+ }
80
+ end
81
+
82
+ def previous_overlay_direction_map_token
83
+ {
84
+ "x": "left",
85
+ "y": "top",
86
+ }
87
+ end
88
+
89
+ def subsequent_overlay_direction_map_token
90
+ {
91
+ "x": "right",
92
+ "y": "bottom",
93
+ }
94
+ end
95
+
96
+ def has_subsequent_overlay
97
+ position == "x".to_sym || position == "y".to_sym
98
+ end
99
+
100
+ def color_map
101
+ {
102
+ "card_light": "#fff",
103
+ "bg_light": "#F3F7FB",
104
+ "card_dark": "#231E3D",
105
+ "bg_dark": "#0a0527",
106
+ }
107
+ end
108
+ end
109
+ end
110
+ end
@@ -86,33 +86,18 @@ const RichTextEditor = (props: RichTextEditorProps): React.ReactElement => {
86
86
  const toolbarElement = element.parentElement.querySelector('trix-toolbar') as HTMLElement,
87
87
  blockCodeButton = toolbarElement.querySelector('[data-trix-attribute=code]') as HTMLElement
88
88
 
89
+ // replace default trix "block code" button with "inline code" button
89
90
  let inlineCodeButton = toolbarElement.querySelector('[data-trix-attribute=inlineCode]') as HTMLElement
90
- if (!inlineCodeButton) inlineCodeButton = blockCodeButton.cloneNode(true) as HTMLElement
91
-
92
- // set button attributes
93
- inlineCodeButton.dataset.trixAttribute = 'inlineCode'
94
- blockCodeButton.insertAdjacentElement('afterend', inlineCodeButton)
91
+ if (!inlineCodeButton) {
92
+ inlineCodeButton = blockCodeButton.cloneNode(true) as HTMLElement
93
+ blockCodeButton.hidden = true
94
+ // set button attributes
95
+ inlineCodeButton.dataset.trixAttribute = 'inlineCode'
96
+ blockCodeButton.insertAdjacentElement('afterend', inlineCodeButton)
97
+ }
95
98
 
96
99
  if (toolbarBottom) editor.element.after(toolbarElement)
97
100
 
98
- const getCodeFormattingType = (): string => {
99
- if (editor.attributeIsActive('code')) return 'block'
100
- if (editor.attributeIsActive('inlineCode')) return 'inline'
101
-
102
- const range = editor.getSelectedRange()
103
- if (range[0] == range[1]) return 'block'
104
-
105
- const text = editor.getSelectedDocument().toString().trim()
106
- return /\n/.test(text) ? 'block' : 'inline'
107
- }
108
-
109
- // DOM event listeners
110
- element.addEventListener('trix-selection-change', () => {
111
- const type = getCodeFormattingType()
112
- blockCodeButton.hidden = type == 'inline'
113
- inlineCodeButton.hidden = type == 'block'
114
- })
115
-
116
101
  focus
117
102
  ? (document.addEventListener('trix-focus', useFocus),
118
103
  document.addEventListener('trix-blur', useFocus),
@@ -2,7 +2,7 @@ import React, { useState } from "react";
2
2
  import classnames from "classnames";
3
3
 
4
4
  import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from "../utilities/props";
5
- import { globalProps } from "../utilities/globalProps";
5
+ import { globalProps, domSafeProps } from "../utilities/globalProps";
6
6
 
7
7
  import Checkbox from "../pb_checkbox/_checkbox";
8
8
  import ListItem from "../pb_list/_list_item";
@@ -16,6 +16,7 @@ export type SelectableListItemProps = {
16
16
  className?: string;
17
17
  data?: GenericObject;
18
18
  defaultChecked?: boolean;
19
+ dragId?: string;
19
20
  dragHandle?: boolean;
20
21
  htmlOptions?: { [key: string]: string | number | boolean | (() => void) };
21
22
  id?: string;
@@ -33,6 +34,7 @@ const SelectableListItem = ({
33
34
  children,
34
35
  className,
35
36
  data = {},
37
+ dragId,
36
38
  dragHandle = true,
37
39
  defaultChecked,
38
40
  htmlOptions = {},
@@ -67,7 +69,7 @@ const SelectableListItem = ({
67
69
  {...props}
68
70
  className={classnames(checkedState ? "checked_item" : "", className)}
69
71
  dragHandle={dragHandle}
70
- id={id}
72
+ dragId={dragId}
71
73
  >
72
74
  <div
73
75
  {...ariaProps}
@@ -106,7 +108,9 @@ const SelectableListItem = ({
106
108
  text={label}
107
109
  type="radio"
108
110
  value={value}
109
- {...props}
111
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
112
+ //@ts-ignore
113
+ {...domSafeProps(props)}
110
114
  />
111
115
  {children}
112
116
  </>
@@ -14,7 +14,7 @@ type SelectableListProps = {
14
14
  children?: React.ReactElement[],
15
15
  className?: string,
16
16
  data?: GenericObject,
17
- draggable?: boolean,
17
+ enableDrag?: boolean,
18
18
  htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
19
19
  id?: string,
20
20
  variant?: 'checkbox' | 'radio',
@@ -26,7 +26,7 @@ const SelectableList = (props: SelectableListProps) => {
26
26
  children,
27
27
  className,
28
28
  data = {},
29
- draggable = false,
29
+ enableDrag = false,
30
30
  htmlOptions = {},
31
31
  id,
32
32
  } = props
@@ -68,7 +68,7 @@ const SelectableList = (props: SelectableListProps) => {
68
68
  className={classes}
69
69
  id={id}
70
70
  >
71
- <List draggable={draggable}
71
+ <List enableDrag={enableDrag}
72
72
  variant={props.variant}
73
73
  >
74
74
  {selectableListItems}
@@ -52,6 +52,20 @@
52
52
  data: object.data,
53
53
  id: object.id,
54
54
  **combined_html_options) do %>
55
- <%= content.presence || object.text %>
55
+ <% unless sorting_style? %>
56
+ <%= content.presence || object.text %>
57
+ <% else %>
58
+ <%= link_to next_link, style: link_style do %>
59
+ <%= pb_rails("flex", props:{ align: object.align_content, justify: object.justify_sort_icon, classname: "pb_th_link" }) do %>
60
+ <%= content.presence || object.text %>
61
+ <% if sorting_style? %>
62
+ <%= pb_rails("icon", props: { icon: object.sort_icon(active_item[:direction], active_item[:active]),
63
+ fixed_width: true,
64
+ classname: active_item.any? ? "pb_th_active" : "",
65
+ padding_left: "xs" }) %>
66
+ <% end %>
67
+ <% end %>
68
+ <% end %>
69
+ <% end %>
70
+ <% end %>
56
71
  <% end %>
57
- <% end %>
@@ -2,6 +2,7 @@ import React from 'react'
2
2
  import classnames from 'classnames'
3
3
 
4
4
  import { buildCss, buildHtmlProps } from '../utilities/props'
5
+ import { globalProps, GlobalProps } from "../utilities/globalProps";
5
6
 
6
7
  import DateStacked from '../pb_date_stacked/_date_stacked'
7
8
  import IconCircle from '../pb_icon_circle/_icon_circle'
@@ -14,7 +15,7 @@ type ItemProps = {
14
15
  icon?: string,
15
16
  iconColor?: 'default' | 'royal' | 'blue' | 'purple' | 'teal' | 'red' | 'yellow' | 'green',
16
17
  lineStyle?: 'solid' | 'dotted',
17
- }
18
+ } & GlobalProps
18
19
 
19
20
  const TimelineItem = ({
20
21
  className,
@@ -24,7 +25,7 @@ const TimelineItem = ({
24
25
  icon = 'user',
25
26
  iconColor = 'default',
26
27
  lineStyle = 'solid',
27
-
28
+ ...props
28
29
  }: ItemProps) => {
29
30
  const timelineItemCss = buildCss('pb_timeline_item_kit', lineStyle)
30
31
 
@@ -32,23 +33,23 @@ const TimelineItem = ({
32
33
 
33
34
  return (
34
35
  <div
35
- {...htmlProps}
36
- className={classnames(timelineItemCss, className)}
36
+ {...htmlProps}
37
+ className={classnames(timelineItemCss, globalProps(props), className)}
37
38
  >
38
39
  <div className="pb_timeline_item_left_block">
39
40
  {date &&
40
41
  <DateStacked
41
- align="center"
42
- date={date}
43
- size="sm"
42
+ align="center"
43
+ date={date}
44
+ size="sm"
44
45
  />
45
46
  }
46
47
  </div>
47
48
  <div className="pb_timeline_item_step">
48
49
  <IconCircle
49
- icon={icon}
50
- size="xs"
51
- variant={iconColor}
50
+ icon={icon}
51
+ size="xs"
52
+ variant={iconColor}
52
53
  />
53
54
  <div className="pb_timeline_item_connector" />
54
55
  </div>
@@ -2,6 +2,7 @@ import React from 'react'
2
2
  import classnames from 'classnames'
3
3
 
4
4
  import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
5
+ import { GlobalProps, globalProps } from '../utilities/globalProps'
5
6
 
6
7
  import TimelineItem from './_item'
7
8
 
@@ -14,7 +15,7 @@ type TimelineProps = {
14
15
  id?: string,
15
16
  orientation?: string,
16
17
  showDate?: boolean,
17
- }
18
+ } & GlobalProps
18
19
 
19
20
  const Timeline = ({
20
21
  aria = {},
@@ -25,6 +26,7 @@ const Timeline = ({
25
26
  id,
26
27
  orientation = 'horizontal',
27
28
  showDate = false,
29
+ ...props
28
30
  }: TimelineProps) => {
29
31
  const ariaProps = buildAriaProps(aria)
30
32
  const dataProps = buildDataProps(data)
@@ -33,11 +35,11 @@ const Timeline = ({
33
35
  const timelineCss = buildCss('pb_timeline_kit', `_${orientation}`, dateStyle)
34
36
  return (
35
37
  <div
36
- {...ariaProps}
37
- {...dataProps}
38
- {...htmlProps}
39
- className={classnames(timelineCss, className)}
40
- id={id}
38
+ {...ariaProps}
39
+ {...dataProps}
40
+ {...htmlProps}
41
+ className={classnames(timelineCss, globalProps(props), className)}
42
+ id={id}
41
43
  >
42
44
  {children}
43
45
  </div>
@@ -39,6 +39,9 @@ PbDropdown.start()
39
39
  import PbAdvancedTable from './pb_advanced_table'
40
40
  PbAdvancedTable.start()
41
41
 
42
+ import PbNav from './pb_nav'
43
+ PbNav.start()
44
+
42
45
  import 'flatpickr'
43
46
 
44
47
  // React-Rendered Rails Kits =====
@@ -5,10 +5,11 @@
5
5
  @mixin pb_title(
6
6
  $fontSize: $heading_1,
7
7
  $fontWeight: $lighter,
8
- $lineHeight: $lh_tighter
8
+ $lineHeight: $lh_tighter,
9
+ $letterSpacing: $lspace_tight
9
10
  ){
10
11
  font-size: $fontSize;
11
- letter-spacing: $lspace_tight;
12
+ letter-spacing: $letterSpacing;
12
13
  font-weight: $fontWeight;
13
14
  color: $text_lt_default;
14
15
  margin: 0;
@@ -29,8 +30,7 @@
29
30
  }
30
31
 
31
32
  @mixin pb_title_4 {
32
- @include pb_title($heading_4, $bolder);
33
- letter-spacing: -0.03em;
33
+ @include pb_title($heading_4, $bolder, $letterSpacing: $lspace_normal);
34
34
  }
35
35
 
36
36
  @mixin pb_title_dark {
@@ -1,11 +1,11 @@
1
- $font_family_base: "Proxima Nova", "Helvetica Neue", Helvetica, Arial, sans_serif !default;
1
+ $font_family_base: "Power Centra", "Helvetica Neue", Helvetica, Arial, sans_serif !default;
2
2
 
3
3
  /* CLEAN UP AND REMOVE */
4
4
  $font_jumbo: 36px !default;
5
5
  $font_largest: 32px !default;
6
- $font_larger: 28px !default;
6
+ $font_larger: 27px !default;
7
7
  $font_large: 20px !default;
8
- $font_base: 16px !default;
8
+ $font_base: 15.5px !default;
9
9
  $font_default: $font_base !default;
10
10
  $font_normal: $font_base !default;
11
11
  $font_medium: $font_base !default;
@@ -26,8 +26,8 @@ $text_smaller: $font_smaller !default;
26
26
  $text_smallest: $font_smallest !default;
27
27
 
28
28
  /* Headings */
29
- $heading_1: 46px !default;
30
- $heading_2: 34px !default;
29
+ $heading_1: 44px !default;
30
+ $heading_2: 32px !default;
31
31
  $heading_3: $font_larger !default;
32
32
  $heading_4: $font_base !default;
33
33
 
@@ -35,19 +35,19 @@ $heading_4: $font_base !default;
35
35
  $lspace_tightest: -.1em !default;
36
36
  $lspace_tighter: -.07em !default;
37
37
  $lspace_tight: -.01em !default;
38
- $lspace_normal: 0 !default;
38
+ $lspace_normal: .003em !default;
39
39
  $lspace_loose: .03em !default;
40
40
  $lspace_looser: .07em !default;
41
41
  $lspace_loosest: .1em !default;
42
42
  $lspace_super_loosest: .2em !default;
43
43
 
44
44
  /* Standard Font Weights */
45
- $bold: 600 !default;
45
+ $bold: 700 !default;
46
46
  $regular: 400 !default;
47
47
 
48
48
  /* Non_Standard Font Weights */
49
- $extrabold: 900 !default;
50
- $boldest: 800 !default;
49
+ $extrabold: 700 !default;
50
+ $boldest: 700 !default;
51
51
  $bolder: 700 !default;
52
52
  $light: 300 !default;
53
- $lighter: 100 !default;
53
+ $lighter: 300 !default;
@@ -520,6 +520,7 @@ export const domSafeProps = (props: {[key: string]: string}): {[key: string]: st
520
520
  'paddingY',
521
521
  'padding',
522
522
  'dark',
523
+ 'enableDrag',
523
524
  ]
524
525
  return omit(props, notSafeProps)
525
526
  }