playbook_ui_docs 13.22.0 → 13.23.0.pre.alpha.PLAY1284investigation2657

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_collapsible_trail.jsx +1 -1
  3. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_default.jsx +1 -1
  4. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_expanded_control.jsx +6 -1
  5. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_expanded_control.md +2 -0
  6. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_loading.jsx +1 -1
  7. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort.jsx +1 -1
  8. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort_control.jsx +1 -1
  9. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_subrow_headers.jsx +1 -1
  10. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_options.jsx +1 -1
  11. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.jsx +1 -1
  12. data/app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_mock_data.json +278 -0
  13. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +1 -1
  14. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.html.erb +26 -0
  15. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.jsx +36 -0
  16. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.md +3 -0
  17. data/app/pb_kits/playbook/pb_bar_graph/docs/example.yml +2 -0
  18. data/app/pb_kits/playbook/pb_bar_graph/docs/index.js +1 -0
  19. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_default_date.html.erb +0 -7
  20. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_default_date.jsx +0 -7
  21. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range.html.erb +7 -0
  22. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range.jsx +7 -0
  23. data/app/pb_kits/playbook/pb_date_picker/docs/example.yml +2 -2
  24. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_compound_components.html.erb +2 -0
  25. data/app/pb_kits/playbook/pb_form_group/docs/_form_group_select.html.erb +17 -1
  26. data/app/pb_kits/playbook/pb_form_group/docs/_form_group_select.jsx +18 -2
  27. data/app/pb_kits/playbook/pb_icon_circle/docs/_icon_circle_sizes.html.erb +5 -0
  28. data/app/pb_kits/playbook/pb_icon_circle/docs/_icon_circle_sizes.jsx +6 -0
  29. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_selected_ids.md +2 -2
  30. data/app/pb_kits/playbook/pb_multi_level_select/docs/{_multi_level_select_selected_ids.jsx → _multi_level_select_selected_ids_react.jsx} +2 -2
  31. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_selected_ids_react.md +5 -0
  32. data/app/pb_kits/playbook/pb_multi_level_select/docs/example.yml +1 -1
  33. data/app/pb_kits/playbook/pb_multi_level_select/docs/index.js +1 -1
  34. data/app/pb_kits/playbook/pb_online_status/docs/_online_status_default.html.erb +6 -9
  35. data/app/pb_kits/playbook/pb_online_status/docs/_online_status_default.jsx +18 -7
  36. data/app/pb_kits/playbook/pb_pagination/docs/_pagination_default.html.erb +2 -1
  37. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_validation.html.erb +2 -2
  38. data/app/pb_kits/playbook/pb_toggle/docs/_toggle_disabled.html.erb +11 -0
  39. data/app/pb_kits/playbook/pb_toggle/docs/_toggle_disabled.jsx +21 -0
  40. data/app/pb_kits/playbook/pb_toggle/docs/example.yml +3 -1
  41. data/app/pb_kits/playbook/pb_toggle/docs/index.js +1 -0
  42. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_custom_menu_list.jsx +51 -0
  43. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_highlight.jsx +1 -1
  44. data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +1 -0
  45. data/app/pb_kits/playbook/pb_typeahead/docs/index.js +1 -0
  46. data/dist/menu.yml +4 -0
  47. data/dist/playbook-doc.js +10 -10
  48. metadata +14 -7
  49. data/app/pb_kits/playbook/pb_advanced_table/docs/_mock_data.js +0 -278
@@ -1,3 +1,8 @@
1
+ <%= pb_rails("icon_circle", props: {
2
+ icon: "rocket",
3
+ size: "xxs"
4
+ }) %>
5
+ <br />
1
6
  <%= pb_rails("icon_circle", props: {
2
7
  icon: "rocket",
3
8
  size: "xs"
@@ -4,6 +4,12 @@ import { IconCircle } from '../..'
4
4
  const IconCircleSizes = (props) => {
5
5
  return (
6
6
  <div>
7
+ <IconCircle
8
+ icon="rocket"
9
+ size="xxs"
10
+ {...props}
11
+ />
12
+ <br />
7
13
  <IconCircle
8
14
  icon="rocket"
9
15
  size="xs"
@@ -1,5 +1,5 @@
1
- `selected_ids` (Rails) / `selectedIds` (React) is an optional prop that accepts an array of ids that, if present, will mark the corresponding nodes on the treeData as checked on page load.
1
+ `selected_ids` is an optional prop that accepts an array of ids that, if present, will mark the corresponding nodes on the treeData as checked on page load.
2
2
 
3
3
  Items that include `checked:true` on the treeData itself will also be selected on page load, even without being passed to `selectedIds`.
4
4
 
5
- When an item is marked as checked on page load by any means, the dropdown will expand to show the checked items for easier accessibility.
5
+ When an item is marked as checked on page load by any means, the dropdown will expand to show the checked items for easier accessibility.
@@ -68,7 +68,7 @@ const treeData = [
68
68
  },
69
69
  ];
70
70
 
71
- const MultiLevelSelectSelectedIds = (props) => {
71
+ const MultiLevelSelectSelectedIdsReact = (props) => {
72
72
  return (
73
73
  <div>
74
74
  <MultiLevelSelect
@@ -85,4 +85,4 @@ const MultiLevelSelectSelectedIds = (props) => {
85
85
  );
86
86
  };
87
87
 
88
- export default MultiLevelSelectSelectedIds;
88
+ export default MultiLevelSelectSelectedIdsReact;
@@ -0,0 +1,5 @@
1
+ `selected_ids` is an optional prop that accepts an array of ids and controls the selected state of the tree nodes that match the values passed. When used within react-hook-form, this prop can be used to manage the selected state of any ids passed to it.
2
+
3
+ Items that include `checked:true` on the treeData itself will also be selected on page load, even without being passed to `selectedIds`.
4
+
5
+ When an item is marked as checked on page load by any means, the dropdown will expand to show the checked items for easier accessibility.
@@ -12,4 +12,4 @@ examples:
12
12
  - multi_level_select_single: Single Select
13
13
  - multi_level_select_single_children_only: Single Select w/ Hidden Radios
14
14
  - multi_level_select_return_all_selected: Return All Selected
15
- - multi_level_select_selected_ids: Selected Ids
15
+ - multi_level_select_selected_ids_react: Selected Ids
@@ -2,4 +2,4 @@ export { default as MultiLevelSelectDefault } from './_multi_level_select_defaul
2
2
  export { default as MultiLevelSelectSingle } from './_multi_level_select_single.jsx'
3
3
  export { default as MultiLevelSelectSingleChildrenOnly } from './_multi_level_select_single_children_only.jsx'
4
4
  export { default as MultiLevelSelectReturnAllSelected } from './_multi_level_select_return_all_selected.jsx'
5
- export { default as MultiLevelSelectSelectedIds } from "./_multi_level_select_selected_ids.jsx"
5
+ export { default as MultiLevelSelectSelectedIdsReact } from "./_multi_level_select_selected_ids_react.jsx"
@@ -1,9 +1,6 @@
1
- <%= pb_rails("online_status", props: { status: "offline" }) %>
2
-
3
- <br>
4
-
5
- <%= pb_rails("online_status", props: { status: "online" }) %>
6
-
7
- <br>
8
-
9
- <%= pb_rails("online_status", props: { status: "away" }) %>
1
+ <%= pb_rails("online_status", props: { status: "offline", margin_y: "xs" }) %>
2
+ <%= pb_rails("online_status", props: { status: "online", margin_y: "xs" }) %>
3
+ <%= pb_rails("online_status", props: { status: "away", margin_y: "xs" }) %>
4
+ <%= pb_rails("online_status", props: { status: "error", margin_y: "xs" }) %>
5
+ <%= pb_rails("online_status", props: { status: "info", margin_y: "xs" }) %>
6
+ <%= pb_rails("online_status", props: { status: "primary", margin_y: "xs" }) %>
@@ -5,24 +5,35 @@ import OnlineStatus from '../_online_status'
5
5
  const OnlineStatusDefault = (props) => (
6
6
  <>
7
7
  <OnlineStatus
8
+ marginY="xs"
8
9
  status="offline"
9
10
  {...props}
10
11
  />
11
-
12
- <br />
13
-
14
12
  <OnlineStatus
13
+ marginY="xs"
15
14
  status="online"
16
15
  {...props}
17
16
  />
18
-
19
- <br />
20
-
21
17
  <OnlineStatus
18
+ marginY="xs"
22
19
  status="away"
23
20
  {...props}
24
21
  />
25
-
22
+ <OnlineStatus
23
+ marginY="xs"
24
+ status="error"
25
+ {...props}
26
+ />
27
+ <OnlineStatus
28
+ marginY="xs"
29
+ status="info"
30
+ {...props}
31
+ />
32
+ <OnlineStatus
33
+ marginY="xs"
34
+ status="primary"
35
+ {...props}
36
+ />
26
37
  </>
27
38
  )
28
39
 
@@ -1 +1,2 @@
1
- <%= pb_rails("pagination", props: { model: @users, view: self}) %>
1
+ <%= pb_rails("pagination", props: { model: @users, view: self}) %>
2
+
@@ -1,5 +1,5 @@
1
1
  <form id="example-form-validation" action="" method="get">
2
- <%= pb_rails("phone_number_input", props: { error: "Missing phone number.", id: "validation", initial_country: "af", value: "", required: true }) %>
2
+ <%= pb_rails("phone_number_input", props: { error: "Missing phone number", id: "validation", initial_country: "af", value: "", required: true }) %>
3
3
  <%= pb_rails("button", props: {html_type: "submit", text: "Save Phone Number"}) %>
4
4
  </form>
5
5
 
@@ -9,4 +9,4 @@
9
9
  if (e.target.querySelectorAll('[error]:not([error=""])').length > 0) e.preventDefault();
10
10
  })
11
11
  })
12
- <% end %>
12
+ <% end %>
@@ -0,0 +1,11 @@
1
+ <%= pb_rails("toggle", props: {
2
+ checked: true,
3
+ disabled: true
4
+ }) %>
5
+
6
+ <br>
7
+
8
+ <%= pb_rails("toggle", props: {
9
+ checked: false,
10
+ disabled: true
11
+ }) %>
@@ -0,0 +1,21 @@
1
+ // @flow
2
+
3
+ import React from 'react'
4
+ import { Toggle } from '../..'
5
+
6
+ const ToggleDisabled= () => {
7
+ return (
8
+ <>
9
+ <Toggle
10
+ checked
11
+ disabled
12
+ />
13
+
14
+ <br />
15
+
16
+ <Toggle disabled />
17
+ </>
18
+ )
19
+ }
20
+
21
+ export default ToggleDisabled
@@ -2,6 +2,7 @@ examples:
2
2
 
3
3
  rails:
4
4
  - toggle_default: Default State
5
+ - toggle_disabled: Disabled
5
6
  - toggle_name: Name and Value
6
7
  - toggle_custom: Custom checkbox input
7
8
  - toggle_custom_radio: Custom radio inputs
@@ -9,6 +10,7 @@ examples:
9
10
 
10
11
  react:
11
12
  - toggle_default: Default State
13
+ - toggle_disabled: Disabled
12
14
  - toggle_name: Name and Value
13
15
  - toggle_custom: Custom checkbox input
14
16
  - toggle_custom_radio: Custom radio inputs
@@ -16,4 +18,4 @@ examples:
16
18
  swift:
17
19
  - toggle_default_swift: Default State
18
20
  - toggle_name_swift: Name and Value
19
- - toggle_props_swift: ""
21
+ - toggle_props_swift: ""
@@ -1,4 +1,5 @@
1
1
  export { default as ToggleDefault } from './_toggle_default'
2
+ export { default as ToggleDisabled } from './_toggle_disabled'
2
3
  export { default as ToggleCustom } from './_toggle_custom'
3
4
  export { default as ToggleName } from './_toggle_name'
4
5
  export { default as ToggleCustomRadio } from './_toggle_custom_radio'
@@ -0,0 +1,51 @@
1
+ import React, { useState } from 'react'
2
+
3
+ import {
4
+ Button,
5
+ } from '../..'
6
+
7
+ import Typeahead from '../_typeahead'
8
+
9
+ const options = [
10
+ { label: 'Orange', value: '#FFA500' },
11
+ { label: 'Red', value: '#FF0000' },
12
+ { label: 'Green', value: '#00FF00' },
13
+ { label: 'Blue', value: '#0000FF' },
14
+ { label: 'Amaranth', value: '#9F2B68' },
15
+ { label: 'Key Lime', value: '#DAF7A6' },
16
+ { label: 'Turquois', value: '#00FFD0' },
17
+ ]
18
+
19
+ const TypeaheadCustomMenuList = (props) => {
20
+ const defaultColorOptions = options.slice(0, 3)
21
+ const [colorOptions, setColorOptions] = useState(defaultColorOptions)
22
+
23
+ const moreToLoad = colorOptions.length == defaultColorOptions.length
24
+ const loadColors = moreToLoad ? () => setColorOptions(options) : () => setColorOptions(defaultColorOptions)
25
+
26
+ const menuListProps = {
27
+ footer: (<Button
28
+ margin="sm"
29
+ onClick={loadColors}
30
+ text={`Load ${moreToLoad ? "More" : "Less"}`}
31
+ />)
32
+ }
33
+
34
+ const MenuList = (props) => (
35
+ <Typeahead.MenuList
36
+ {...menuListProps}
37
+ {...props}
38
+ />
39
+ )
40
+
41
+ return (
42
+ <Typeahead
43
+ components={{ MenuList }}
44
+ label="Colors"
45
+ options={colorOptions}
46
+ {...props}
47
+ />
48
+ )
49
+ }
50
+
51
+ export default TypeaheadCustomMenuList
@@ -46,7 +46,7 @@ const TypeaheadWithHighlight = (props) => {
46
46
  if (!inputValue.length) return text
47
47
  return text.replace(
48
48
  new RegExp(inputValue, 'gi'),
49
- highlighted => `<mark>${highlighted}</mark>`
49
+ (highlighted) => `<mark>${highlighted}</mark>`
50
50
  )
51
51
  }
52
52
  return (
@@ -22,3 +22,4 @@ examples:
22
22
  - typeahead_createable: Createable
23
23
  - typeahead_async_createable: Createable (+ Async Data)
24
24
  - typeahead_error_state: Error State
25
+ - typeahead_custom_menu_list: Custom MenuList
@@ -9,3 +9,4 @@ export { default as TypeaheadMultiKit } from './_typeahead_multi_kit.jsx'
9
9
  export { default as TypeaheadCreateable } from './_typeahead_createable.jsx'
10
10
  export { default as TypeaheadAsyncCreateable } from './_typeahead_async_createable.jsx'
11
11
  export { default as TypeaheadErrorState } from './_typeahead_error_state.jsx'
12
+ export { default as TypeaheadCustomMenuList } from './_typeahead_custom_menu_list.jsx'
data/dist/menu.yml CHANGED
@@ -407,6 +407,10 @@ kits:
407
407
  platforms: *web
408
408
  description: Badges can be used for notification, tags, and status. They are used for count and numbers.
409
409
  status: "stable"
410
+ - name: "online_status"
411
+ platforms: *web
412
+ description: Online Status is a small indicator that lets the user know the status of a person or item.
413
+ status: "stable"
410
414
  - name: "pill"
411
415
  platforms: *all
412
416
  description: A pill uses both a keyword and a specific color to categorize an item.