playbook_ui 14.10.0.pre.alpha.PBNTR775formmatingmaskdefaultvalue5137 → 14.10.0.pre.alpha.play1465attempt25272

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/Components/TableHeaderCell.tsx +32 -19
  3. data/app/pb_kits/playbook/pb_advanced_table/SubKits/TableBody.tsx +3 -1
  4. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +35 -3
  5. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +32 -18
  6. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.html.erb +1 -1
  7. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.rb +8 -1
  8. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_sort.html.erb +1 -3
  9. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers.html.erb +43 -0
  10. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers.jsx +60 -0
  11. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers.md +1 -0
  12. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_multiple.html.erb +58 -0
  13. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_multiple.jsx +74 -0
  14. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_multiple.md +1 -0
  15. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +6 -1
  16. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +2 -0
  17. data/app/pb_kits/playbook/pb_advanced_table/index.js +143 -95
  18. data/app/pb_kits/playbook/pb_advanced_table/table_body.html.erb +1 -1
  19. data/app/pb_kits/playbook/pb_advanced_table/table_body.rb +50 -8
  20. data/app/pb_kits/playbook/pb_advanced_table/table_header.html.erb +17 -14
  21. data/app/pb_kits/playbook/pb_advanced_table/table_header.rb +78 -0
  22. data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +4 -3
  23. data/app/pb_kits/playbook/pb_advanced_table/table_row.rb +7 -2
  24. data/app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb +2 -6
  25. data/app/pb_kits/playbook/pb_card/_card.scss +21 -3
  26. data/app/pb_kits/playbook/pb_card/docs/_card_header.html.erb +18 -0
  27. data/app/pb_kits/playbook/pb_card/docs/_card_header.jsx +40 -0
  28. data/app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.tsx +3 -0
  29. data/app/pb_kits/playbook/pb_circle_icon_button/circle_icon_button.html.erb +1 -1
  30. data/app/pb_kits/playbook/pb_circle_icon_button/circle_icon_button.rb +1 -0
  31. data/app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_link.html.erb +8 -0
  32. data/app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_link.jsx +9 -0
  33. data/app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_link.md +1 -0
  34. data/app/pb_kits/playbook/pb_icon_circle/_icon_circle.scss +1 -13
  35. data/app/pb_kits/playbook/pb_section_separator/_section_separator.scss +64 -1
  36. data/app/pb_kits/playbook/pb_section_separator/_section_separator.tsx +3 -1
  37. data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_color.html.erb +10 -0
  38. data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_color.jsx +42 -0
  39. data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_color.md +3 -0
  40. data/app/pb_kits/playbook/pb_section_separator/docs/example.yml +2 -0
  41. data/app/pb_kits/playbook/pb_section_separator/docs/index.js +1 -0
  42. data/app/pb_kits/playbook/pb_section_separator/section_separator.rb +4 -1
  43. data/app/pb_kits/playbook/pb_skeleton_loading/_skeleton_loading.scss +2 -2
  44. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_description.md +3 -0
  45. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_border_radius.html.erb +9 -0
  46. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_border_radius_rails.md +1 -0
  47. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_color.html.erb +7 -0
  48. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_default.html.erb +1 -1
  49. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_filter.html.erb +119 -0
  50. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_filter.jsx +10 -2
  51. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_height_width.html.erb +15 -0
  52. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_height_width.jsx +6 -2
  53. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_height_width_rails.md +3 -0
  54. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_layout.html.erb +3 -0
  55. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_user.html.erb +63 -0
  56. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_user.jsx +11 -3
  57. data/app/pb_kits/playbook/pb_skeleton_loading/docs/example.yml +7 -2
  58. data/app/pb_kits/playbook/pb_skeleton_loading/skeleton_loading.html.erb +8 -12
  59. data/app/pb_kits/playbook/pb_skeleton_loading/skeleton_loading.rb +48 -1
  60. data/app/pb_kits/playbook/pb_table/_table.tsx +67 -18
  61. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_columns.jsx +88 -0
  62. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_columns_react.md +3 -0
  63. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns.jsx +1 -1
  64. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns_rails.md +2 -0
  65. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns_react.md +4 -1
  66. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_right_columns.jsx +87 -0
  67. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_right_columns_react.md +5 -0
  68. data/app/pb_kits/playbook/pb_table/index.ts +17 -17
  69. data/app/pb_kits/playbook/pb_table/styles/_scroll.scss +38 -2
  70. data/app/pb_kits/playbook/pb_table/styles/_sticky_columns.scss +17 -3
  71. data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +3 -2
  72. data/app/pb_kits/playbook/pb_typeahead/components/ClearIndicator.tsx +12 -4
  73. data/app/pb_kits/playbook/pb_typeahead/components/Control.tsx +5 -1
  74. data/app/pb_kits/playbook/pb_typeahead/components/IndicatorsContainer.tsx +8 -3
  75. data/app/pb_kits/playbook/pb_typeahead/components/MenuList.tsx +6 -1
  76. data/app/pb_kits/playbook/pb_typeahead/components/Option.tsx +21 -6
  77. data/app/pb_kits/playbook/pb_typeahead/components/Placeholder.tsx +13 -6
  78. data/app/pb_kits/playbook/pb_typeahead/components/ValueContainer.tsx +7 -3
  79. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_custom_menu_list.jsx +2 -0
  80. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async.jsx +4 -2
  81. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async_custom_options.jsx +5 -5
  82. data/dist/chunks/{_typeahead-CoIYBETL.js → _typeahead-BhT5aXCY.js} +3 -3
  83. data/dist/chunks/_weekday_stacked-DJOTNDSY.js +45 -0
  84. data/dist/chunks/{lib-sMFo2JZy.js → lib-B7sgJtGS.js} +1 -1
  85. data/dist/chunks/{pb_form_validation-CgvjWbOK.js → pb_form_validation-C5Cc0-1v.js} +1 -1
  86. data/dist/chunks/vendor.js +1 -1
  87. data/dist/menu.yml +1 -1
  88. data/dist/playbook-doc.js +1 -1
  89. data/dist/playbook-rails-react-bindings.js +1 -1
  90. data/dist/playbook-rails.js +1 -1
  91. data/dist/playbook.css +1 -1
  92. data/lib/playbook/version.rb +1 -1
  93. metadata +31 -8
  94. data/dist/chunks/_weekday_stacked-Qj3GFYzA.js +0 -45
  95. /data/app/pb_kits/playbook/pb_skeleton_loading/docs/{_skeleton_loading_border_radius.md → _skeleton_loading_border_radius_react.md} +0 -0
  96. /data/app/pb_kits/playbook/pb_skeleton_loading/docs/{_skeleton_loading_height_width.md → _skeleton_loading_height_width_react.md} +0 -0
@@ -1,16 +1,24 @@
1
1
  import React, { useEffect } from 'react'
2
2
  import { components } from 'react-select'
3
3
 
4
- const ClearContainer = (props: any) => {
4
+ type ClearContainerProps = {
5
+ children: React.ReactNode,
6
+ selectProps?: {
7
+ id: string,
8
+ },
9
+ clearValue: () => void,
10
+ }
11
+
12
+ const ClearContainer = (props: ClearContainerProps): React.ReactElement => {
5
13
  const { selectProps, clearValue } = props
6
14
  useEffect(() => {
7
15
  document.addEventListener(`pb-typeahead-kit-${selectProps.id}:clear`, clearValue)
8
- }, [true])
16
+ }, [clearValue, selectProps.id])
9
17
 
10
18
  return (
11
19
  <components.ClearIndicator
12
- className="clear_indicator"
13
- {...props}
20
+ className="clear_indicator"
21
+ {...props}
14
22
  />
15
23
  )
16
24
  }
@@ -5,7 +5,11 @@ import Flex from '../../pb_flex/_flex'
5
5
  import TextInput from '../../pb_text_input/_text_input'
6
6
 
7
7
  type Props = {
8
- selectProps: any,
8
+ selectProps: {
9
+ dark?: boolean,
10
+ label: string,
11
+ error?: string,
12
+ },
9
13
  }
10
14
 
11
15
  const TypeaheadControl = (props: Props) => (
@@ -1,10 +1,15 @@
1
1
  import React from 'react'
2
2
  import { components } from 'react-select'
3
3
 
4
- const IndicatorsContainer = (props: any) => (
4
+ type IndicatorsContainerProps = {
5
+ children: React.ReactNode,
6
+ }
7
+
8
+
9
+ const IndicatorsContainer = (props: IndicatorsContainerProps): React.ReactElement => (
5
10
  <components.IndicatorsContainer
6
- className="text_input_indicators"
7
- {...props}
11
+ className="text_input_indicators"
12
+ {...props}
8
13
  />
9
14
  )
10
15
 
@@ -1,7 +1,12 @@
1
1
  import React from 'react'
2
2
  import { components } from 'react-select'
3
3
 
4
- const MenuList = (props: any) => {
4
+ type MenuListProps = {
5
+ children: React.ReactNode,
6
+ footer: React.ReactNode,
7
+ }
8
+
9
+ const MenuList = (props: MenuListProps): React.ReactElement => {
5
10
  return (
6
11
  <components.MenuList {...props}>
7
12
  {props.children}
@@ -3,7 +3,22 @@ import { components } from 'react-select'
3
3
 
4
4
  import User from '../../pb_user/_user'
5
5
 
6
- const Option = (props: any) => {
6
+ type OptionProps = {
7
+ children: React.ReactNode,
8
+ label?: string,
9
+ data: {
10
+ imageUrl?: string,
11
+ },
12
+ selectProps: {
13
+ dark?: boolean,
14
+ valueComponent?: (data: {
15
+ imageUrl?: string,
16
+ }) => React.ReactNode,
17
+ },
18
+ }
19
+
20
+
21
+ const Option = (props: OptionProps): React.ReactElement => {
7
22
  const {
8
23
  imageUrl,
9
24
  } = props.data
@@ -14,11 +29,11 @@ const Option = (props: any) => {
14
29
  <>
15
30
  {!valueComponent && imageUrl &&
16
31
  <User
17
- align="left"
18
- avatarUrl={imageUrl}
19
- dark={props.selectProps.dark}
20
- name={props.label}
21
- orientation="horizontal"
32
+ align="left"
33
+ avatarUrl={imageUrl}
34
+ dark={props.selectProps.dark}
35
+ name={props.label}
36
+ orientation="horizontal"
22
37
  />
23
38
  }
24
39
 
@@ -4,19 +4,26 @@ import { components } from 'react-select'
4
4
  import Flex from '../../pb_flex/_flex'
5
5
  import Icon from '../../pb_icon/_icon'
6
6
 
7
- const Placeholder = (props: any) => (
7
+ type PlaceholderProps = {
8
+ children: React.ReactNode,
9
+ selectProps: {
10
+ plusIcon?: boolean,
11
+ },
12
+ }
13
+
14
+ const Placeholder = (props: PlaceholderProps): React.ReactElement => (
8
15
  <>
9
16
  <Flex
10
- align="center"
11
- className="placeholder"
17
+ align="center"
18
+ className="placeholder"
12
19
  >
13
20
  <components.IndicatorsContainer
14
- {...props}
21
+ {...props}
15
22
  />
16
23
  {props.selectProps.plusIcon &&
17
24
  <Icon
18
- className="typeahead-plus-icon"
19
- icon="plus"
25
+ className="typeahead-plus-icon"
26
+ icon="plus"
20
27
  />
21
28
  }
22
29
  </Flex>
@@ -1,10 +1,14 @@
1
1
  import React from 'react'
2
2
  import { components } from 'react-select'
3
3
 
4
- const ValueContainer = (props: any) => (
4
+ type ValueContainerProps = {
5
+ children: React.ReactNode,
6
+ }
7
+
8
+ const ValueContainer = (props: ValueContainerProps): React.ReactElement => (
5
9
  <components.ValueContainer
6
- className="text_input_value_container"
7
- {...props}
10
+ className="text_input_value_container"
11
+ {...props}
8
12
  />
9
13
  )
10
14
 
@@ -1,3 +1,5 @@
1
+ /* eslint-disable react/no-multi-comp */
2
+
1
3
  import React, { useState } from 'react'
2
4
 
3
5
  import {
@@ -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}