playbook_ui 15.5.0.pre.rc.2 → 15.5.0.pre.rc.4

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 (97) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling.jsx +2 -1
  3. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_column_headers.jsx +1 -1
  4. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_fullscreen.jsx +3 -1
  5. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_infinite_scroll.jsx +1 -1
  6. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_inline_editing.jsx +3 -1
  7. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_row_styling.jsx +2 -1
  8. data/app/pb_kits/playbook/pb_copy_button/_copy_button.tsx +21 -8
  9. data/app/pb_kits/playbook/pb_copy_button/copy_button.html.erb +6 -2
  10. data/app/pb_kits/playbook/pb_copy_button/copy_button.rb +3 -0
  11. data/app/pb_kits/playbook/pb_copy_button/copy_button.test.jsx +24 -0
  12. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_button_variant.html.erb +9 -0
  13. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_button_variant.jsx +24 -0
  14. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_button_variant_rails.md +1 -0
  15. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_button_variant_react.md +1 -0
  16. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_default.html.erb +2 -2
  17. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_default.jsx +1 -2
  18. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.html.erb +2 -2
  19. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.jsx +2 -0
  20. data/app/pb_kits/playbook/pb_copy_button/docs/example.yml +2 -0
  21. data/app/pb_kits/playbook/pb_copy_button/docs/index.js +1 -0
  22. data/app/pb_kits/playbook/pb_dropdown/index.js +31 -13
  23. data/app/pb_kits/playbook/pb_empty_state/docs/_empty_state_alignment.jsx +2 -1
  24. data/app/pb_kits/playbook/pb_empty_state/docs/_empty_state_default.jsx +2 -1
  25. data/app/pb_kits/playbook/pb_empty_state/docs/_empty_state_orientation.jsx +2 -1
  26. data/app/pb_kits/playbook/pb_empty_state/docs/_empty_state_size.jsx +2 -1
  27. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_wrapped.jsx +4 -1
  28. data/app/pb_kits/playbook/pb_loading_inline/docs/_loading_inline_variant.jsx +1 -1
  29. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_colors.jsx +1 -1
  30. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_default.jsx +1 -1
  31. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_height.jsx +1 -1
  32. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_horizontal.jsx +1 -1
  33. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend.jsx +1 -1
  34. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend_non_clickable.jsx +1 -2
  35. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend_position.jsx +1 -1
  36. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_negative_numbers.jsx +1 -1
  37. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_secondary_y_axis.jsx +1 -1
  38. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_spline.jsx +1 -2
  39. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_stacked.jsx +1 -2
  40. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_block_content.jsx +2 -1
  41. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_color_overrides.jsx +2 -1
  42. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_custom_tooltip.jsx +1 -1
  43. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_data_legend_position.jsx +2 -1
  44. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_data_with_labels.jsx +1 -1
  45. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_data_with_legend.jsx +1 -1
  46. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_default.jsx +1 -1
  47. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_inner_sizes.jsx +1 -1
  48. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_live_data.jsx +2 -1
  49. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_rounded.jsx +1 -1
  50. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_with_title.jsx +1 -1
  51. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_color.jsx +1 -1
  52. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_complex.jsx +2 -1
  53. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_full_circle.jsx +2 -1
  54. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_height.jsx +2 -1
  55. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_min_max.jsx +2 -1
  56. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_units.jsx +2 -1
  57. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_colors.jsx +1 -1
  58. data/app/pb_kits/playbook/pb_popover/docs/_popover_append_to.jsx +4 -1
  59. data/app/pb_kits/playbook/pb_progress_step/_progress_step.scss +384 -262
  60. data/app/pb_kits/playbook/pb_progress_step/docs/_description.md +1 -5
  61. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_color.html.erb +14 -0
  62. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_color.jsx +29 -0
  63. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_color.md +3 -0
  64. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_custom_icon.jsx +31 -0
  65. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_custom_icon.md +1 -0
  66. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_default.html.erb +4 -1
  67. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_default.jsx +14 -3
  68. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_default.md +3 -0
  69. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tracker.md +3 -0
  70. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_vertical.html.erb +1 -7
  71. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_vertical.md +1 -0
  72. data/app/pb_kits/playbook/pb_progress_step/docs/example.yml +3 -0
  73. data/app/pb_kits/playbook/pb_progress_step/docs/index.js +2 -0
  74. data/app/pb_kits/playbook/pb_progress_step/progress_step.test.js +41 -0
  75. data/app/pb_kits/playbook/pb_radio/docs/_radio_react_hook.jsx +3 -1
  76. data/app/pb_kits/playbook/pb_select/docs/_select_react_hook.jsx +3 -1
  77. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_sizing.jsx +4 -1
  78. data/app/pb_kits/playbook/pb_typeahead/_typeahead.scss +4 -0
  79. data/app/pb_kits/playbook/pb_typeahead/components/MultiValue.tsx +1 -0
  80. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_react_hook.jsx +2 -1
  81. data/app/pb_kits/playbook/pb_user/docs/_user_font_options.jsx +1 -1
  82. data/app/pb_kits/playbook/utilities/_truncate.scss +2 -0
  83. data/dist/chunks/_typeahead-Cd3O38ts.js +6 -0
  84. data/dist/chunks/lib-CgpqUb6l.js +29 -0
  85. data/dist/chunks/vendor.js +37 -1
  86. data/dist/playbook-rails-react-bindings.js +1 -1
  87. data/dist/playbook-rails.js +1 -1
  88. data/dist/playbook.css +1 -1
  89. data/lib/playbook/version.rb +1 -1
  90. metadata +16 -9
  91. data/dist/chunks/_line_graph-BuucBJlH.js +0 -1
  92. data/dist/chunks/_typeahead-VFd5WMRg.js +0 -6
  93. data/dist/chunks/_weekday_stacked-B4_b9xef.js +0 -37
  94. data/dist/chunks/componentRegistry-DzmmLR2x.js +0 -1
  95. data/dist/chunks/lib-COXg9aPA.js +0 -29
  96. data/dist/chunks/pb_form_validation-DR765aoq.js +0 -1
  97. data/dist/playbook-doc.js +0 -19
@@ -0,0 +1,29 @@
1
+ import React from 'react'
2
+
3
+ import ProgressStep from '../_progress_step.tsx'
4
+ import ProgressStepItem from '../_progress_step_item.tsx'
5
+ import Caption from '../../pb_caption/_caption'
6
+
7
+ const ProgressStepColor = (props) => (
8
+ <div>
9
+ <br />
10
+ <ProgressStep
11
+ color="info"
12
+ icon
13
+ variant="tracker"
14
+ {...props}
15
+ >
16
+ <ProgressStepItem status="complete">
17
+ <Caption>{'Ordered'}</Caption>
18
+ </ProgressStepItem>
19
+ <ProgressStepItem status="active">
20
+ <Caption>{'Shipped'}</Caption>
21
+ </ProgressStepItem>
22
+ <ProgressStepItem status="inactive">
23
+ <Caption>{'Delivered'}</Caption>
24
+ </ProgressStepItem>
25
+ </ProgressStep>
26
+ </div>
27
+ )
28
+
29
+ export default ProgressStepColor
@@ -0,0 +1,3 @@
1
+ The `color` prop can also be used to set color for the tracker variant. Options for color are `primary` and `info` with default being set to `primary`.
2
+
3
+ **NOTE**: The `color` prop is only available with the `tracker` variant.
@@ -0,0 +1,31 @@
1
+ import React from 'react'
2
+
3
+ import ProgressStep from '../_progress_step.tsx'
4
+ import ProgressStepItem from '../_progress_step_item.tsx'
5
+ import Caption from '../../pb_caption/_caption'
6
+
7
+ const ProgressStepCustomIcon = (props) => (
8
+ <div>
9
+ <br />
10
+ <ProgressStep
11
+ icon
12
+ variant="tracker"
13
+ {...props}
14
+ >
15
+ <ProgressStepItem status="complete">
16
+ <Caption>{'Ordered'}</Caption>
17
+ </ProgressStepItem>
18
+ <ProgressStepItem
19
+ icon="exclamation-triangle"
20
+ status="active"
21
+ >
22
+ <Caption>{'Shipped'}</Caption>
23
+ </ProgressStepItem>
24
+ <ProgressStepItem status="inactive">
25
+ <Caption>{'Delivered'}</Caption>
26
+ </ProgressStepItem>
27
+ </ProgressStep>
28
+ </div>
29
+ )
30
+
31
+ export default ProgressStepCustomIcon
@@ -0,0 +1 @@
1
+ Custom icons can also be set for individual steps. Simply use the `icon` prop for the relevant `ProgressStepItem`/`progress_step_item` as shown here.
@@ -39,7 +39,10 @@
39
39
  <%= pb_rails("progress_step/progress_step_item", props: {status: "complete"}) do %>
40
40
  step 2
41
41
  <% end %>
42
- <%= pb_rails("progress_step/progress_step_item", props: {status: "complete"}) do %>
42
+ <%= pb_rails("progress_step/progress_step_item", props: {status: "active"}) do %>
43
43
  step 3
44
+ <% end %>
45
+ <%= pb_rails("progress_step/progress_step_item", props: {status: "inactive"}) do %>
46
+ step 4
44
47
  <% end %>
45
48
  <% end %>
@@ -6,7 +6,6 @@ import ProgressStepItem from '../_progress_step_item.tsx'
6
6
  const ProgressStepDefault = (props) => (
7
7
  <div>
8
8
  <ProgressStep
9
- icon
10
9
  {...props}
11
10
  >
12
11
  <ProgressStepItem status="complete" />
@@ -19,12 +18,24 @@ const ProgressStepDefault = (props) => (
19
18
 
20
19
  <ProgressStep {...props}>
21
20
  <ProgressStepItem status="complete">{'Step 1'}</ProgressStepItem>
22
- <ProgressStepItem status="active">{'Step 2'}</ProgressStepItem>
23
- <ProgressStepItem status="inactive">{'Step 3'}</ProgressStepItem>
21
+ <ProgressStepItem status="complete">{'Step 2'}</ProgressStepItem>
22
+ <ProgressStepItem status="active">{'Step 3'}</ProgressStepItem>
23
+ <ProgressStepItem status="inactive">{'Step 4'}</ProgressStepItem>
24
+ <ProgressStepItem status="inactive">{'Step 5'}</ProgressStepItem>
24
25
  </ProgressStep>
25
26
 
26
27
  <br />
27
28
  <br />
29
+
30
+ <ProgressStep
31
+ icon
32
+ {...props}
33
+ >
34
+ <ProgressStepItem status="complete">{'Step 1'}</ProgressStepItem>
35
+ <ProgressStepItem status="complete">{'Step 2'}</ProgressStepItem>
36
+ <ProgressStepItem status="active">{'Step 3'}</ProgressStepItem>
37
+ <ProgressStepItem status="inactive">{'Step 4'}</ProgressStepItem>
38
+ </ProgressStep>
28
39
  </div>
29
40
  )
30
41
 
@@ -0,0 +1,3 @@
1
+ The default Progress Step kit sets orientation to horizontal and can be used with completed, active, and inactive steps as shown here.
2
+
3
+ `icon` is a boolean prop that can also be set to true to render icons within the steps indicator. `icon` is false by default.
@@ -0,0 +1,3 @@
1
+ The `variant` prop can be set to `tracker` to achieve this UI. Tracker is only available with the horizontal orientation and it is also recommended that you set the `icon` prop to true for this variant.
2
+
3
+ This variant takes children just like the default progress step, however, it is best to use the caption kit for children in this variant.
@@ -25,13 +25,7 @@
25
25
  Child
26
26
  <% end %>
27
27
  <%= pb_rails("progress_step/progress_step_item", props: {status: "active"}) do %>
28
- <%= pb_rails("card", props: {highlight: {position: "side", color:"windows"}}) do %>
29
- Card content
30
- <% end %>
31
- <br>
32
- <%= pb_rails("card", props: {highlight: {position: "side", color:"windows"}}) do %>
33
- Card content
34
- <% end %>
28
+ Child
35
29
  <% end %>
36
30
  <%= pb_rails("progress_step/progress_step_item", props: {status: "inactive"}) do %>
37
31
  Child
@@ -0,0 +1 @@
1
+ `orientation` can also be set to `vertical` as shown here. By default, this is set to `horizontal`.
@@ -3,6 +3,7 @@ examples:
3
3
  - progress_step_default: Default
4
4
  - progress_step_vertical: Vertical
5
5
  - progress_step_tracker: Tracker
6
+ - progress_step_color: Color
6
7
  - progress_step_custom_icon: Custom Icon
7
8
  - progress_step_tooltip: Tooltip
8
9
 
@@ -10,4 +11,6 @@ examples:
10
11
  - progress_step_default: Default
11
12
  - progress_step_vertical: Vertical
12
13
  - progress_step_tracker: Tracker
14
+ - progress_step_color: Color
15
+ - progress_step_custom_icon: Custom Icon
13
16
  - progress_step_tracker_click_events: Using State
@@ -2,3 +2,5 @@ export { default as ProgressStepDefault } from './_progress_step_default.jsx'
2
2
  export { default as ProgressStepVertical } from './_progress_step_vertical.jsx'
3
3
  export { default as ProgressStepTracker } from './_progress_step_tracker.jsx'
4
4
  export { default as ProgressStepTrackerClickEvents } from './_progress_step_tracker_click_events.jsx'
5
+ export { default as ProgressStepColor } from './_progress_step_color.jsx'
6
+ export { default as ProgressStepCustomIcon } from './_progress_step_custom_icon.jsx'
@@ -107,3 +107,44 @@ test('should render the children elements', () => {
107
107
  expect(step2Kit).toHaveClass('pb_progress_step_item_active')
108
108
  expect(step3Kit).toHaveClass('pb_progress_step_item_inactive')
109
109
  })
110
+
111
+ test('should render info color', () => {
112
+ render(
113
+ <ProgressStep
114
+ aria={{ label: testId }}
115
+ color="info"
116
+ data={{ testid: testId }}
117
+ variant="tracker"
118
+ >
119
+ <ProgressStepItem status="complete">{'Step 1'}</ProgressStepItem>
120
+ <ProgressStepItem status="active">{'Step 2'}</ProgressStepItem>
121
+ <ProgressStepItem status="inactive">{'Step 3'}</ProgressStepItem>
122
+ </ProgressStep>
123
+ )
124
+
125
+ const kit = screen.getByTestId(testId)
126
+ expect(kit).toHaveClass('pb_progress_step_kit_horizontal_tracker_info')
127
+ })
128
+
129
+ test('should render custom icon', () => {
130
+ render(
131
+ <ProgressStep
132
+ aria={{ label: testId }}
133
+ data={{ testid: testId }}
134
+ variant="tracker"
135
+ >
136
+ <ProgressStepItem icon="exclamation-triangle"
137
+ status="complete"
138
+ >
139
+ {'Step 1'}
140
+ </ProgressStepItem>
141
+ <ProgressStepItem status="active">{'Step 2'}</ProgressStepItem>
142
+ <ProgressStepItem status="inactive">{'Step 3'}</ProgressStepItem>
143
+ </ProgressStep>
144
+ )
145
+
146
+ const kit = screen.getByTestId(testId)
147
+ expect(kit).toHaveClass('pb_progress_step_kit_horizontal_tracker')
148
+ const icon = kit.getAttribute('aria-label', "exclamation-triangle-icon")
149
+ expect(icon).toBeDefined()
150
+ })
@@ -1,6 +1,8 @@
1
1
  import React from "react"
2
2
  import { useForm } from "react-hook-form"
3
- import { Radio, Flex, Body } from "playbook-ui"
3
+ import Radio from "../_radio"
4
+ import Body from "../../pb_body/_body"
5
+ import Flex from "../../pb_flex/_flex"
4
6
 
5
7
  const RadioReactHook = () => {
6
8
  const { register, watch } = useForm({
@@ -1,6 +1,8 @@
1
1
  import React, { useState } from "react"
2
2
  import { useForm } from "react-hook-form"
3
- import { Button, Body, Select } from "playbook-ui"
3
+ import Select from "../_select"
4
+ import Body from "../../pb_body/_body"
5
+ import Button from "../../pb_button/_button"
4
6
 
5
7
  const SelectReactHook = (props) => {
6
8
  const { register, handleSubmit, formState: { errors } } = useForm({
@@ -1,5 +1,8 @@
1
1
  import React from 'react'
2
- import { Button, Tooltip, Flex, FlexItem } from 'playbook-ui';
2
+ import Tooltip from '../_tooltip'
3
+ import Button from '../../pb_button/_button'
4
+ import Flex from '../../pb_flex/_flex'
5
+ import FlexItem from '../../pb_flex/_flex_item'
3
6
 
4
7
  const TooltipSizing = (props) => {
5
8
 
@@ -161,6 +161,10 @@
161
161
  .typeahead-plus-icon {
162
162
  color: $text_lt_lighter;
163
163
  }
164
+ .pb_badge_kit_primary {
165
+ margin-bottom: 2px;
166
+ margin-top: 2px;
167
+ }
164
168
  .pb_badge_kit_primary span {
165
169
  line-height: 16.5px;
166
170
  letter-spacing: normal;
@@ -62,6 +62,7 @@ const MultiValue = (props: Props) => {
62
62
  className={pillClassName}
63
63
  closeProps={removeProps}
64
64
  htmlOptions={{onKeyDown:handleKeyDown}}
65
+ marginRight="xs"
65
66
  removeIcon
66
67
  tabIndex={0}
67
68
  text={label}
@@ -1,6 +1,7 @@
1
1
  import React from 'react'
2
2
 
3
- import { Typeahead, Title } from 'playbook-ui'
3
+ import Typeahead from '../_typeahead'
4
+ import Title from '../../pb_title/_title'
4
5
  import { useForm } from 'react-hook-form'
5
6
 
6
7
  const languages = [
@@ -1,5 +1,5 @@
1
1
  import React from 'react'
2
- import { User } from 'playbook-ui'
2
+ import User from '../../pb_user/_user'
3
3
 
4
4
  const UserFontOptions = (props) => {
5
5
  return (
@@ -11,6 +11,8 @@ $truncate-styles: (
11
11
  display: -webkit-box;
12
12
  -webkit-line-clamp: $number;
13
13
  -webkit-box-orient: vertical;
14
+ overflow-wrap: anywhere;
15
+ word-break: break-all;
14
16
  }
15
17
 
16
18
  @each $class, $number in $truncate-styles {