playbook_ui_docs 14.11.0.pre.rc.16 → 14.11.1.pre.alpha.PBNTR440enableglobalpropspbformwith5624

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 (72) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_no_subrows.jsx +50 -0
  3. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination.jsx +1 -0
  4. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.jsx +1 -0
  5. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows.jsx +60 -0
  6. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows.md +5 -0
  7. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_actions.jsx +78 -0
  8. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_actions.md +1 -0
  9. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_header.jsx +53 -0
  10. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_header.md +1 -0
  11. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows.jsx +52 -0
  12. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows.md +1 -0
  13. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort_control.md +2 -2
  14. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.html.erb +33 -0
  15. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_rails.md +1 -0
  16. data/app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_mock_data_no_subrows.json +42 -0
  17. data/app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_mock_data_with_id.json +299 -0
  18. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +6 -0
  19. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +6 -1
  20. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_default_date.md +1 -1
  21. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_turbo_frames.html.erb +13 -0
  22. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_turbo_frames_rails.md +3 -0
  23. data/app/pb_kits/playbook/pb_date_picker/docs/example.yml +1 -0
  24. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list_rails.html.erb +3 -9
  25. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list_rails.md +5 -0
  26. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list_rails.html.erb +38 -0
  27. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list_rails.md +3 -0
  28. data/app/pb_kits/playbook/pb_draggable/docs/example.yml +1 -0
  29. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_behavior.jsx +38 -0
  30. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_borders.jsx +3 -45
  31. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_breakpoints.jsx +0 -1
  32. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_default.jsx +9 -16
  33. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_menu.jsx +44 -19
  34. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_menu.md +21 -3
  35. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_overlay.jsx +16 -21
  36. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_sizes.jsx +2 -19
  37. data/app/pb_kits/playbook/pb_drawer/docs/example.yml +2 -1
  38. data/app/pb_kits/playbook/pb_drawer/docs/index.js +1 -0
  39. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subtle_variant.md +1 -1
  40. data/app/pb_kits/playbook/pb_icon_button/docs/_icon_button_default.html.erb +3 -0
  41. data/app/pb_kits/playbook/pb_icon_button/docs/example.yml +7 -0
  42. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_format.html.erb +15 -0
  43. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_format.jsx +24 -0
  44. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_format.md +1 -0
  45. data/app/pb_kits/playbook/pb_phone_number_input/docs/example.yml +3 -1
  46. data/app/pb_kits/playbook/pb_phone_number_input/docs/index.js +1 -0
  47. data/app/pb_kits/playbook/pb_radio/docs/_radio_custom_children.jsx +8 -3
  48. data/app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx +4 -1
  49. data/app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_single_select.jsx +4 -1
  50. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_columns.html.erb +74 -0
  51. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_columns_rails.md +3 -0
  52. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns_rails.md +2 -2
  53. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_right_columns.html.erb +74 -0
  54. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_right_columns_rails.md +3 -0
  55. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible.html.erb +47 -0
  56. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_rails.md +2 -0
  57. data/app/pb_kits/playbook/pb_table/docs/example.yml +3 -0
  58. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_mask.html.erb +46 -0
  59. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_mask_rails.md +3 -0
  60. data/app/pb_kits/playbook/pb_text_input/docs/example.yml +2 -1
  61. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_custom_menu_list.jsx +2 -0
  62. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_truncated_text.html.erb +19 -0
  63. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_truncated_text.jsx +27 -0
  64. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_truncated_text.md +1 -0
  65. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async.jsx +4 -2
  66. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async_custom_options.jsx +5 -5
  67. data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +2 -0
  68. data/app/pb_kits/playbook/pb_typeahead/docs/index.js +1 -0
  69. data/dist/playbook-doc.js +1 -1
  70. metadata +42 -7
  71. /data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_table_props.md → _advanced_table_table_props_react.md} +0 -0
  72. /data/app/pb_kits/playbook/pb_table/docs/{_table_with_collapsible.md → _table_with_collapsible_react.md} +0 -0
@@ -0,0 +1,2 @@
1
+ The `collapsible` prop can be used on any Table Row to add a collapsible area. Use the additional `collapsible_content` prop to add any content to the collapsible Row.
2
+ Please be aware that you will need to pass in an `id` to any table rows you want to be collapsible. Make sure every `id` is unique if you are using multipe collapsibles.
@@ -5,6 +5,8 @@ examples:
5
5
  - table_lg: Large
6
6
  - table_sticky: Sticky Header
7
7
  - table_sticky_left_columns: Sticky Left Column
8
+ - table_sticky_right_columns: Sticky Right Column
9
+ - table_sticky_columns: Sticky Left and Right Columns
8
10
  - table_header: Table Header
9
11
  - table_alignment_row_rails: Row Alignment
10
12
  - table_alignment_column_rails: Cell Alignment
@@ -28,6 +30,7 @@ examples:
28
30
  - table_with_subcomponents_rails: Table with Sub Components (Table Elements)
29
31
  - table_with_subcomponents_as_divs: Table with Sub Components (Divs)
30
32
  - table_outer_padding: Outer Padding
33
+ - table_with_collapsible: Table with Collapsible
31
34
 
32
35
  react:
33
36
  - table_sm: Small
@@ -0,0 +1,46 @@
1
+ <%= pb_rails("text_input", props: {
2
+ label: "Currency",
3
+ mask: "currency",
4
+ margin_bottom: "md",
5
+ name: "currency_name",
6
+ placeholder:"$0.00"
7
+ }) %>
8
+
9
+ <%= pb_rails("text_input", props: {
10
+ label: "ZIP Code",
11
+ mask: "zip_code",
12
+ margin_bottom: "md",
13
+ placeholder: "12345"
14
+ }) %>
15
+
16
+ <%= pb_rails("text_input", props: {
17
+ label: "Postal Code",
18
+ mask: "postal_code",
19
+ placeholder: "12345-6789",
20
+ margin_bottom: "md",
21
+ }) %>
22
+
23
+ <%= pb_rails("text_input", props: {
24
+ label: "SSN",
25
+ mask: "ssn",
26
+ margin_bottom: "md",
27
+ placeholder: "123-45-6789"
28
+ }) %>
29
+
30
+ <%= pb_rails("title" , props: {
31
+ text: "Hidden Input Under The Hood",
32
+ padding_bottom: "sm"
33
+ })%>
34
+
35
+ <%= pb_rails("text_input", props: {
36
+ label: "Currency",
37
+ mask: "currency",
38
+ margin_bottom: "md",
39
+ name: "currency_name",
40
+ id: "example-currency",
41
+ placeholder: "$0.00",
42
+ }) %>
43
+
44
+ <style>
45
+ #example-currency-sanitized {display: flex !important;}
46
+ </style>
@@ -0,0 +1,3 @@
1
+ The mask prop lets you style your inputs while maintaining the value that the user typed in.
2
+
3
+ It uses a hidden input field to submit the unformatted value as it will have the proper `name` attribute. It will also copy the id field with a `"#{your-id-sanitized}"`
@@ -8,6 +8,7 @@ examples:
8
8
  - text_input_inline: Inline
9
9
  - text_input_no_label: No Label
10
10
  - text_input_options: Input Options
11
+ - text_input_mask: Mask
11
12
  react:
12
13
  - text_input_default: Default
13
14
  - text_input_error: With Error
@@ -23,4 +24,4 @@ examples:
23
24
  - text_input_error_swift: With Error
24
25
  - text_input_disabled_swift: Disabled
25
26
  - text_input_add_on_swift: Add On
26
- - text_input_props_swift: ""
27
+ - text_input_props_swift: ""
@@ -1,3 +1,5 @@
1
+ /* eslint-disable react/no-multi-comp */
2
+
1
3
  import React, { useState } from 'react'
2
4
 
3
5
  import {
@@ -0,0 +1,19 @@
1
+ <%
2
+ names = [
3
+ { label: 'Alexander Nathaniel Montgomery', value: 'Alexander Nathaniel Montgomery' },
4
+ { label: 'Isabella Anastasia Wellington', value: 'Isabella Anastasia Wellington' },
5
+ { label: 'Christopher Maximilian Harrington', value: 'Christopher Maximilian Harrington' },
6
+ { label: 'Elizabeth Seraphina Kensington', value: 'Elizabeth Seraphina Kensington' },
7
+ { label: 'Theodore Jonathan Abernathy', value: 'Theodore Jonathan Abernathy' },
8
+ ]
9
+ %>
10
+
11
+ <%= pb_rails("typeahead", props: {
12
+ html_options: { style: { maxWidth: "240px" }},
13
+ id: "typeahead-form-pill",
14
+ is_multi: true,
15
+ options: names,
16
+ label: "Truncation Within Typeahead",
17
+ pills: true,
18
+ truncate: 1,
19
+ }) %>
@@ -0,0 +1,27 @@
1
+ import React from 'react'
2
+ import { Typeahead } from 'playbook-ui'
3
+
4
+ const names = [
5
+ { label: 'Alexander Nathaniel Montgomery', value: 'Alexander Nathaniel Montgomery' },
6
+ { label: 'Isabella Anastasia Wellington', value: 'Isabella Anastasia Wellington' },
7
+ { label: 'Christopher Maximilian Harrington', value: 'Christopher Maximilian Harrington' },
8
+ { label: 'Elizabeth Seraphina Kensington', value: 'Elizabeth Seraphina Kensington' },
9
+ { label: 'Theodore Jonathan Abernathy', value: 'Theodore Jonathan Abernathy' },
10
+ ]
11
+
12
+ const TypeaheadTruncatedText = (props) => {
13
+ return (
14
+ <>
15
+ <Typeahead
16
+ htmlOptions={{ style: { maxWidth: "240px" }}}
17
+ isMulti
18
+ label="Truncation Within Typeahead"
19
+ options={names}
20
+ truncate={1}
21
+ {...props}
22
+ />
23
+ </>
24
+ )
25
+ }
26
+
27
+ export default TypeaheadTruncatedText
@@ -0,0 +1 @@
1
+ For Form Pills with longer text, the `truncate` global prop can be used to truncate the label within each Form Pill. Hover over the truncated Form Pill and a Tooltip containing the text or tag section of the Form Pill will appear. See [here](https://playbook.powerapp.cloud/visual_guidelines/truncate) for more information on the truncate global prop.
@@ -45,8 +45,7 @@ const promiseOptions = (inputValue) =>
45
45
 
46
46
  const TypeaheadWithPillsAsync = (props) => {
47
47
  const [users, setUsers] = useState([])
48
- const handleOnChange = (value) => setUsers(formatUsers(value))
49
- const formatValue = (users) => formatUsers(users)
48
+
50
49
  const formatUsers = (users) => {
51
50
  const results = () => (users.map((user) => {
52
51
  if (Object.keys(user)[0] === 'name' || Object.keys(user)[1] === 'id'){
@@ -58,6 +57,9 @@ const TypeaheadWithPillsAsync = (props) => {
58
57
  return results()
59
58
  }
60
59
 
60
+ const handleOnChange = (value) => setUsers(formatUsers(value))
61
+ const formatValue = (users) => formatUsers(users)
62
+
61
63
  return (
62
64
  <>
63
65
  {users && users.length > 0 && (
@@ -83,13 +83,13 @@ const TypeaheadWithPillsAsyncCustomOptions = (props) => {
83
83
  onChange={handleOnChange}
84
84
  onMultiValueClick={handleOnMultiValueClick}
85
85
  placeholder="type the name of a Github user"
86
- valueComponent={(props) => (
86
+ valueComponent={({imageUrl, label, territory, type}) => (
87
87
  <User
88
88
  avatar
89
- avatarUrl={props.imageUrl}
90
- name={props.label}
91
- territory={props.territory}
92
- title={props.type}
89
+ avatarUrl={imageUrl}
90
+ name={label}
91
+ territory={territory}
92
+ title={type}
93
93
  />
94
94
  )}
95
95
  {...props}
@@ -11,6 +11,7 @@ examples:
11
11
  - typeahead_error_state: Error State
12
12
  - typeahead_margin_bottom: Margin Bottom
13
13
  - typeahead_with_pills_color: With Pills (Custom Color)
14
+ - typeahead_truncated_text: Truncated Text
14
15
 
15
16
  react:
16
17
  - typeahead_default: Default
@@ -27,3 +28,4 @@ examples:
27
28
  - typeahead_custom_menu_list: Custom MenuList
28
29
  - typeahead_margin_bottom: Margin Bottom
29
30
  - typeahead_with_pills_color: With Pills (Custom Color)
31
+ - typeahead_truncated_text: Truncated Text
@@ -12,3 +12,4 @@ export { default as TypeaheadErrorState } from './_typeahead_error_state.jsx'
12
12
  export { default as TypeaheadCustomMenuList } from './_typeahead_custom_menu_list.jsx'
13
13
  export { default as TypeaheadMarginBottom } from './_typeahead_margin_bottom.jsx'
14
14
  export { default as TypeaheadWithPillsColor } from './_typeahead_with_pills_color.jsx'
15
+ export { default as TypeaheadTruncatedText } from './_typeahead_truncated_text.jsx'