playbook_ui 11.9.0.pre.alpha.fileupload1 → 11.10.0.pre.alpha.pagination1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/_playbook.scss +2 -0
  3. data/app/pb_kits/playbook/data/menu.yml +1 -0
  4. data/app/pb_kits/playbook/pb_background/_background.tsx +1 -1
  5. data/app/pb_kits/playbook/pb_background/background.rb +5 -0
  6. data/app/pb_kits/playbook/pb_background/docs/_background_status.jsx +1 -1
  7. data/app/pb_kits/playbook/pb_background/docs/_background_status_subtle.html.erb +11 -0
  8. data/app/pb_kits/playbook/pb_background/docs/_background_status_subtle.jsx +44 -0
  9. data/app/pb_kits/playbook/pb_background/docs/_background_status_subtle.md +1 -0
  10. data/app/pb_kits/playbook/pb_background/docs/example.yml +2 -0
  11. data/app/pb_kits/playbook/pb_background/docs/index.js +1 -0
  12. data/app/pb_kits/playbook/pb_checkbox/_checkbox.scss +10 -0
  13. data/app/pb_kits/playbook/pb_checkbox/_checkbox.tsx +2 -2
  14. data/app/pb_kits/playbook/pb_collapsible/_collapsible.scss +5 -0
  15. data/app/pb_kits/playbook/pb_collapsible/_collapsible.tsx +8 -3
  16. data/app/pb_kits/playbook/pb_collapsible/child_kits/CollapsibleMain.tsx +41 -9
  17. data/app/pb_kits/playbook/pb_collapsible/collapsible.test.js +1 -1
  18. data/app/pb_kits/playbook/pb_collapsible/collapsible_main.html.erb +4 -2
  19. data/app/pb_kits/playbook/pb_collapsible/collapsible_main.rb +20 -0
  20. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_color.html.erb +60 -0
  21. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_color.jsx +98 -0
  22. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_color.md +4 -0
  23. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_default.html.erb +1 -1
  24. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_size.html.erb +40 -0
  25. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_size.jsx +68 -0
  26. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_size.md +4 -0
  27. data/app/pb_kits/playbook/pb_collapsible/docs/example.yml +6 -4
  28. data/app/pb_kits/playbook/pb_collapsible/docs/index.js +2 -0
  29. data/app/pb_kits/playbook/pb_file_upload/_file_upload.tsx +5 -28
  30. data/app/pb_kits/playbook/pb_file_upload/docs/example.yml +0 -1
  31. data/app/pb_kits/playbook/pb_file_upload/docs/index.js +0 -1
  32. data/app/pb_kits/playbook/pb_file_upload/fileupload.test.js +3 -3
  33. data/app/pb_kits/playbook/pb_filter/_filter.scss +0 -2
  34. data/app/pb_kits/playbook/pb_filter/docs/_description.md +5 -1
  35. data/app/pb_kits/playbook/pb_filter/docs/_filter_default.html.erb +6 -6
  36. data/app/pb_kits/playbook/pb_filter/docs/_filter_default.jsx +58 -45
  37. data/app/pb_kits/playbook/pb_filter/docs/{_filter_min_width.html.erb → _filter_max_width.html.erb} +3 -3
  38. data/app/pb_kits/playbook/pb_filter/docs/_filter_max_width.jsx +69 -0
  39. data/app/pb_kits/playbook/pb_filter/docs/{_filter_default.md → _filter_max_width.md} +1 -1
  40. data/app/pb_kits/playbook/pb_filter/docs/_filter_no_background.html.erb +4 -4
  41. data/app/pb_kits/playbook/pb_filter/docs/_filter_no_background.jsx +60 -47
  42. data/app/pb_kits/playbook/pb_filter/docs/_filter_no_sort.html.erb +2 -2
  43. data/app/pb_kits/playbook/pb_filter/docs/_filter_no_sort.jsx +31 -25
  44. data/app/pb_kits/playbook/pb_filter/docs/_filter_only.html.erb +2 -2
  45. data/app/pb_kits/playbook/pb_filter/docs/_filter_only.jsx +31 -24
  46. data/app/pb_kits/playbook/pb_filter/docs/_filter_placement.html.erb +2 -2
  47. data/app/pb_kits/playbook/pb_filter/docs/_filter_placement.jsx +30 -24
  48. data/app/pb_kits/playbook/pb_filter/docs/_filter_placement.md +1 -1
  49. data/app/pb_kits/playbook/pb_filter/docs/_filter_single.html.erb +2 -2
  50. data/app/pb_kits/playbook/pb_filter/docs/_filter_single.jsx +30 -25
  51. data/app/pb_kits/playbook/pb_filter/docs/example.yml +2 -3
  52. data/app/pb_kits/playbook/pb_filter/docs/index.js +1 -2
  53. data/app/pb_kits/playbook/pb_form_group/_form_group.scss +5 -0
  54. data/app/pb_kits/playbook/pb_home_address_street/_home_address_street.tsx +1 -0
  55. data/app/pb_kits/playbook/pb_legend/_legend.jsx +12 -2
  56. data/app/pb_kits/playbook/pb_legend/_legend.scss +7 -1
  57. data/app/pb_kits/playbook/pb_legend/docs/_legend_custom_colors.html.erb +3 -0
  58. data/app/pb_kits/playbook/pb_legend/docs/_legend_custom_colors.jsx +24 -0
  59. data/app/pb_kits/playbook/pb_legend/docs/_legend_custom_colors.md +1 -0
  60. data/app/pb_kits/playbook/pb_legend/docs/example.yml +2 -0
  61. data/app/pb_kits/playbook/pb_legend/docs/index.js +1 -0
  62. data/app/pb_kits/playbook/pb_legend/legend.html.erb +1 -1
  63. data/app/pb_kits/playbook/pb_legend/legend.rb +9 -1
  64. data/app/pb_kits/playbook/pb_nav/_vertical_nav.scss +1 -1
  65. data/app/pb_kits/playbook/pb_pagination/_pagination.scss +59 -0
  66. data/app/pb_kits/playbook/pb_pagination/docs/_pagination_default.html.erb +1 -0
  67. data/app/pb_kits/playbook/pb_pagination/docs/_pagination_default.md +1 -0
  68. data/app/pb_kits/playbook/pb_pagination/docs/example.yml +6 -0
  69. data/app/pb_kits/playbook/pb_pagination/pagination.html.erb +7 -0
  70. data/app/pb_kits/playbook/pb_pagination/pagination.rb +11 -0
  71. data/app/pb_kits/playbook/pb_radio/_radio.scss +1 -0
  72. data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.scss +6 -0
  73. data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.scss +0 -2
  74. data/app/pb_kits/playbook/pb_selectable_list/selectable_list_item.rb +1 -1
  75. data/app/pb_kits/playbook/pb_table/_table.jsx +5 -3
  76. data/app/pb_kits/playbook/pb_text_input/_text_input.tsx +4 -4
  77. data/app/pb_kits/playbook/pb_timeline/_timeline.scss +1 -2
  78. data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_date.html.erb +23 -0
  79. data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_date.jsx +47 -0
  80. data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_date.md +1 -0
  81. data/app/pb_kits/playbook/pb_typeahead/_typeahead.scss +37 -2
  82. data/app/pb_kits/playbook/tokens/_colors.scss +11 -1
  83. data/lib/playbook/version.rb +2 -2
  84. metadata +24 -7
  85. data/app/pb_kits/playbook/pb_file_upload/docs/_file_upload_max_size.jsx +0 -51
  86. data/app/pb_kits/playbook/pb_filter/docs/_filter_close_popover.jsx +0 -62
  87. data/app/pb_kits/playbook/pb_filter/docs/_filter_min_width.jsx +0 -57
@@ -7,7 +7,7 @@ const FilterNoBackground = (props) => {
7
7
  { value: 'Canada' },
8
8
  { value: 'Brazil' },
9
9
  { value: 'Philippines' },
10
- { value: 'A galaxy far far away, like really far away...' },
10
+ { value: 'A galaxy far far away...' },
11
11
  ]
12
12
  return (
13
13
  <>
@@ -17,7 +17,7 @@ const FilterNoBackground = (props) => {
17
17
  'Full Name': 'John Wick',
18
18
  'City': 'Las Vegas',
19
19
  }}
20
- minWidth="375px"
20
+ minWidth="360px"
21
21
  results={3}
22
22
  sortOptions={{
23
23
  popularity: 'Popularity',
@@ -29,33 +29,40 @@ const FilterNoBackground = (props) => {
29
29
  sortValue={[{ name: 'popularity', dir: 'desc' }]}
30
30
  {...props}
31
31
  >
32
- <TextInput
33
- label="Full Name"
34
- placeholder="Enter name"
35
- {...props}
36
- />
32
+ {({ closePopover }) => (
33
+ <form>
37
34
 
38
- <Select
39
- blankSelection="Select One..."
40
- label="Territory"
41
- name="location"
42
- options={options}
43
- {...props}
44
- />
45
- <Flex
46
- spacing="between"
47
- {...props}
48
- >
49
- <Button
50
- text="Apply"
35
+ <TextInput
36
+ label="Full Name"
37
+ placeholder="Enter name"
51
38
  {...props}
52
39
  />
53
- <Button
54
- text="Clear"
55
- variant="secondary"
40
+
41
+ <Select
42
+ blankSelection="Select One..."
43
+ label="Territory"
44
+ name="location"
45
+ options={options}
56
46
  {...props}
57
47
  />
58
- </Flex>
48
+ <Flex
49
+ spacing="between"
50
+ {...props}
51
+ >
52
+ <Button
53
+ onClick={closePopover}
54
+ text="Apply"
55
+ {...props}
56
+ />
57
+ <Button
58
+ text="Clear"
59
+ variant="secondary"
60
+ {...props}
61
+ />
62
+ </Flex>
63
+ </form>
64
+ )}
65
+
59
66
  </Filter>
60
67
 
61
68
  <Filter
@@ -65,7 +72,7 @@ const FilterNoBackground = (props) => {
65
72
  'Full Name': 'John Wick',
66
73
  'City': 'Las Vegas',
67
74
  }}
68
- minWidth="375px"
75
+ minWidth="360px"
69
76
  results={3}
70
77
  sortOptions={{
71
78
  popularity: 'Popularity',
@@ -77,33 +84,39 @@ const FilterNoBackground = (props) => {
77
84
  sortValue={[{ name: 'popularity', dir: 'desc' }]}
78
85
  {...props}
79
86
  >
80
- <TextInput
81
- label="Full Name"
82
- placeholder="Enter name"
83
- {...props}
84
- />
87
+ {({ closePopover }) => (
88
+ <form>
85
89
 
86
- <Select
87
- blankSelection="Select One..."
88
- label="Territory"
89
- name="location"
90
- options={options}
91
- {...props}
92
- />
93
- <Flex
94
- spacing="between"
95
- {...props}
96
- >
97
- <Button
98
- text="Apply"
90
+ <TextInput
91
+ label="Full Name"
92
+ placeholder="Enter name"
99
93
  {...props}
100
94
  />
101
- <Button
102
- text="Clear"
103
- variant="secondary"
95
+
96
+ <Select
97
+ blankSelection="Select One..."
98
+ label="Territory"
99
+ name="location"
100
+ options={options}
104
101
  {...props}
105
102
  />
106
- </Flex>
103
+ <Flex
104
+ spacing="between"
105
+ {...props}
106
+ >
107
+ <Button
108
+ onClick={closePopover}
109
+ text="Apply"
110
+ {...props}
111
+ />
112
+ <Button
113
+ text="Clear"
114
+ variant="secondary"
115
+ {...props}
116
+ />
117
+ </Flex>
118
+ </form>
119
+ )}
107
120
  </Filter>
108
121
  </>
109
122
  )
@@ -1,6 +1,6 @@
1
1
  <%=
2
2
  pb_rails("filter", props: {
3
- min_width: "375px",
3
+ min_width: "360px",
4
4
  id: "nosort",
5
5
  filters: [
6
6
  { name: "name", value: "John Wick" }
@@ -15,7 +15,7 @@
15
15
  OpenStruct.new(name: "Canada", value: 2),
16
16
  OpenStruct.new(name: "Brazil", value: 3),
17
17
  OpenStruct.new(name: "Philippines", value: 4),
18
- OpenStruct.new(name: "A galaxy far far away, like really far away...", value: 5)
18
+ OpenStruct.new(name: "A galaxy far far away...", value: 5)
19
19
  ]
20
20
  %>
21
21
 
@@ -7,45 +7,51 @@ const FilterNoSort = (props) => {
7
7
  { value: 'Canada' },
8
8
  { value: 'Brazil' },
9
9
  { value: 'Philippines' },
10
- { value: 'A galaxy far far away, like really far away...' },
10
+ { value: 'A galaxy far far away...' },
11
11
  ]
12
12
  return (
13
13
  <Filter
14
14
  filters={{
15
15
  'Full Name': 'John Wick',
16
16
  }}
17
- minWidth="375px"
17
+ minWidth="360px"
18
18
  results={546}
19
19
  sortValue={[{ name: 'popularity', dir: 'desc' }]}
20
20
  {...props}
21
21
  >
22
- <TextInput
23
- label="Full Name"
24
- placeholder="Enter name"
25
- {...props}
26
- />
27
-
28
- <Select
29
- blankSelection="Select One..."
30
- label="Territory"
31
- name="location"
32
- options={options}
33
- {...props}
34
- />
35
- <Flex
36
- spacing="between"
37
- {...props}
38
- >
39
- <Button
40
- text="Apply"
22
+ {({ closePopover }) => (
23
+ <form>
24
+ <TextInput
25
+ label="Full Name"
26
+ placeholder="Enter name"
41
27
  {...props}
42
28
  />
43
- <Button
44
- text="Clear"
45
- variant="secondary"
29
+
30
+ <Select
31
+ blankSelection="Select One..."
32
+ label="Territory"
33
+ name="location"
34
+ options={options}
46
35
  {...props}
47
36
  />
48
- </Flex>
37
+ <Flex
38
+ spacing="between"
39
+ {...props}
40
+ >
41
+ <Button
42
+ onClick={closePopover}
43
+ text="Apply"
44
+ {...props}
45
+ />
46
+ <Button
47
+ text="Clear"
48
+ variant="secondary"
49
+ {...props}
50
+ />
51
+ </Flex>
52
+ </form>
53
+ )}
54
+
49
55
  </Filter>
50
56
  )
51
57
  }
@@ -1,6 +1,6 @@
1
1
  <%=
2
2
  pb_rails("filter", props: {
3
- min_width: "375px",
3
+ min_width: "360px",
4
4
  id: "fo",
5
5
  filters: [
6
6
  { name: "name", value: "John Wick" }
@@ -14,7 +14,7 @@
14
14
  OpenStruct.new(name: "Canada", value: 2),
15
15
  OpenStruct.new(name: "Brazil", value: 3),
16
16
  OpenStruct.new(name: "Philippines", value: 4),
17
- OpenStruct.new(name: "A galaxy far far away, like really far away...", value: 5)
17
+ OpenStruct.new(name: "A galaxy far far away...", value: 5)
18
18
  ]
19
19
  %>
20
20
  <%= pb_rails("form", props: { form_system_options: { scope: :example, method: :get } }) do |form| %>
@@ -7,41 +7,48 @@ const FilterOnly = (props) => {
7
7
  { value: 'Canada' },
8
8
  { value: 'Brazil' },
9
9
  { value: 'Philippines' },
10
- { value: 'A galaxy far far away, like really far away...' },
10
+ { value: 'A galaxy far far away...' },
11
11
  ]
12
12
  return (
13
13
  <Filter
14
14
  filters={{ 'Full Name': 'John Wick' }}
15
- minWidth="375px"
15
+ minWidth="360px"
16
16
  {...props}
17
17
  >
18
- <TextInput
19
- label="Full Name"
20
- placeholder="Enter name"
21
- {...props}
22
- />
18
+ {({ closePopover }) => (
19
+ <form>
23
20
 
24
- <Select
25
- blankSelection="Select One..."
26
- label="Territory"
27
- name="location"
28
- options={options}
29
- {...props}
30
- />
31
- <Flex
32
- spacing="between"
33
- {...props}
34
- >
35
- <Button
36
- text="Apply"
21
+ <TextInput
22
+ label="Full Name"
23
+ placeholder="Enter name"
37
24
  {...props}
38
25
  />
39
- <Button
40
- text="Clear"
41
- variant="secondary"
26
+
27
+ <Select
28
+ blankSelection="Select One..."
29
+ label="Territory"
30
+ name="location"
31
+ options={options}
42
32
  {...props}
43
33
  />
44
- </Flex>
34
+ <Flex
35
+ spacing="between"
36
+ {...props}
37
+ >
38
+ <Button
39
+ onClick={closePopover}
40
+ text="Apply"
41
+ {...props}
42
+ />
43
+ <Button
44
+ text="Clear"
45
+ variant="secondary"
46
+ {...props}
47
+ />
48
+ </Flex>
49
+ </form>
50
+ )}
51
+
45
52
  </Filter>
46
53
  )
47
54
  }
@@ -1,6 +1,6 @@
1
1
  <%=
2
2
  pb_rails("filter", props: {
3
- min_width: "375px",
3
+ min_width: "360px",
4
4
  id: "pla",
5
5
  filters: [
6
6
  { name: "name", value: "John Wick" }
@@ -15,7 +15,7 @@
15
15
  OpenStruct.new(name: "Canada", value: 2),
16
16
  OpenStruct.new(name: "Brazil", value: 3),
17
17
  OpenStruct.new(name: "Philippines", value: 4),
18
- OpenStruct.new(name: "A galaxy far far away, like really far away...", value: 5)
18
+ OpenStruct.new(name: "A galaxy far far away...", value: 5)
19
19
  ]
20
20
  %>
21
21
  <%= pb_rails("form", props: { form_system_options: { scope: :example, method: :get } }) do |form| %>
@@ -11,14 +11,14 @@ const FilterPlacement = (props) => {
11
11
  { value: 'Canada' },
12
12
  { value: 'Brazil' },
13
13
  { value: 'Philippines' },
14
- { value: 'A galaxy far far away, like really far away...' },
14
+ { value: 'A galaxy far far away...' },
15
15
  ]
16
16
  return (
17
17
 
18
18
  <>
19
19
  <Filter
20
20
  double
21
- minWidth="375px"
21
+ minWidth="360px"
22
22
  onSortChange={SortingChangeCallback}
23
23
  placement={"right"}
24
24
  results={1}
@@ -32,33 +32,39 @@ const FilterPlacement = (props) => {
32
32
  sortValue={[{ name: 'popularity', dir: 'desc' }]}
33
33
  {...props}
34
34
  >
35
- <TextInput
36
- label="Example Text Field"
37
- placeholder="Enter Text"
38
- {...props}
39
- />
35
+ {({ closePopover }) => (
36
+ <form>
40
37
 
41
- <Select
42
- blankSelection="Select One..."
43
- label="Example Collection Select"
44
- name="Collection Select"
45
- options={options}
46
- {...props}
47
- />
48
- <Flex
49
- spacing="between"
50
- {...props}
51
- >
52
- <Button
53
- text="Apply"
38
+ <TextInput
39
+ label="Example Text Field"
40
+ placeholder="Enter Text"
54
41
  {...props}
55
42
  />
56
- <Button
57
- text="Clear"
58
- variant="secondary"
43
+
44
+ <Select
45
+ blankSelection="Select One..."
46
+ label="Example Collection Select"
47
+ name="Collection Select"
48
+ options={options}
59
49
  {...props}
60
50
  />
61
- </Flex>
51
+ <Flex
52
+ spacing="between"
53
+ {...props}
54
+ >
55
+ <Button
56
+ onClick={closePopover}
57
+ text="Apply"
58
+ {...props}
59
+ />
60
+ <Button
61
+ text="Clear"
62
+ variant="secondary"
63
+ {...props}
64
+ />
65
+ </Flex>
66
+ </form>
67
+ )}
62
68
  </Filter>
63
69
  </>
64
70
  )
@@ -1,4 +1,4 @@
1
- Click the filter buttom above to toggle the popover.
1
+ Click the filter button above to toggle the popover.
2
2
 
3
3
  To change the filter's popover position, use the `placement` prop with one of the positions:
4
4
  `"top" | "right" | "bottom" | "left" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end"`
@@ -1,6 +1,6 @@
1
1
  <%=
2
2
  pb_rails("filter", props: {
3
- min_width: "375px",
3
+ min_width: "360px",
4
4
  id: "2",
5
5
  filters: [
6
6
  { name: "name", value: "John Wick" }
@@ -20,7 +20,7 @@
20
20
  OpenStruct.new(name: "Canada", value: 2),
21
21
  OpenStruct.new(name: "Brazil", value: 3),
22
22
  OpenStruct.new(name: "Philippines", value: 4),
23
- OpenStruct.new(name: "A galaxy far far away, like really far away...", value: 5)
23
+ OpenStruct.new(name: "A galaxy far far away...", value: 5)
24
24
  ]
25
25
  %>
26
26
 
@@ -13,14 +13,14 @@ const FilterSingle = (props) => {
13
13
  { value: 'Canada' },
14
14
  { value: 'Brazil' },
15
15
  { value: 'Philippines' },
16
- { value: 'A galaxy far far away, like really far away...' },
16
+ { value: 'A galaxy far far away...' },
17
17
  ]
18
18
  return (
19
19
  <Filter
20
20
  filters={{
21
21
  'Full Name': 'John Wick',
22
22
  }}
23
- minWidth="375px"
23
+ minWidth="360px"
24
24
  results={546}
25
25
  sortOptions={{
26
26
  popularity: 'Popularity',
@@ -32,33 +32,38 @@ const FilterSingle = (props) => {
32
32
  sortValue={[{ name: 'popularity', dir: 'desc' }]}
33
33
  {...props}
34
34
  >
35
- <TextInput
36
- label="Full Name"
37
- placeholder="Enter name"
38
- {...props}
39
- />
40
-
41
- <Select
42
- blankSelection="Select One..."
43
- label="Territory"
44
- name="location"
45
- options={options}
46
- {...props}
47
- />
48
- <Flex
49
- spacing="between"
50
- {...props}
51
- >
52
- <Button
53
- text="Apply"
35
+ {({ closePopover }) => (
36
+ <form>
37
+ <TextInput
38
+ label="Full Name"
39
+ placeholder="Enter name"
54
40
  {...props}
55
41
  />
56
- <Button
57
- text="Clear"
58
- variant="secondary"
42
+
43
+ <Select
44
+ blankSelection="Select One..."
45
+ label="Territory"
46
+ name="location"
47
+ options={options}
59
48
  {...props}
60
49
  />
61
- </Flex>
50
+ <Flex
51
+ spacing="between"
52
+ {...props}
53
+ >
54
+ <Button
55
+ onClick={closePopover}
56
+ text="Apply"
57
+ {...props}
58
+ />
59
+ <Button
60
+ text="Clear"
61
+ variant="secondary"
62
+ {...props}
63
+ />
64
+ </Flex>
65
+ </form>
66
+ )}
62
67
  </Filter>
63
68
  )
64
69
  }
@@ -7,7 +7,7 @@ examples:
7
7
  - filter_no_sort: No Sort
8
8
  - filter_only: Filter Only
9
9
  - sort_only: Sort Only
10
- - filter_min_width: Min Width for Popover Inside of Filter
10
+ - filter_max_width: Max Width for Popover Inside of Filter
11
11
  - filter_placement: Filter Placement
12
12
 
13
13
  react:
@@ -17,6 +17,5 @@ examples:
17
17
  - filter_no_sort: No Sort
18
18
  - filter_only: Filter Only
19
19
  - sort_only: Sort Only
20
- - filter_min_width: Min Width for Popover Inside of Filter
21
- - filter_close_popover: Close Popover
20
+ - filter_max_width: Max Width for Popover Inside of Filter
22
21
  - filter_placement: Filter Placement
@@ -4,6 +4,5 @@ export { default as FilterNoSort } from './_filter_no_sort.jsx'
4
4
  export { default as FilterNoBackground } from './_filter_no_background.jsx'
5
5
  export { default as FilterOnly } from './_filter_only.jsx'
6
6
  export { default as SortOnly } from './_sort_only.jsx'
7
- export { default as FilterMinWidth } from './_filter_min_width.jsx'
8
- export { default as FilterClosePopover } from './_filter_close_popover.jsx'
7
+ export { default as FilterMaxWidth } from './_filter_max_width.jsx'
9
8
  export { default as FilterPlacement } from './_filter_placement.jsx'
@@ -27,6 +27,11 @@
27
27
  border-bottom-right-radius: 0;
28
28
  border-top-right-radius: 0;
29
29
  border-right-width: 0;
30
+
31
+ &:focus {
32
+ outline: $primary solid 1px;
33
+ outline-offset: -1px;
34
+ }
30
35
  }
31
36
  }
32
37
 
@@ -110,6 +110,7 @@ const HomeAddressStreet = (props: HomeAddressStreetProps) => {
110
110
  <Hashtag
111
111
  classname="home-hashtag"
112
112
  dark={dark}
113
+ marginRight="xxs"
113
114
  newWindow={newWindow}
114
115
  text={homeId}
115
116
  type="home"
@@ -34,8 +34,16 @@ const Legend = (props: LegendProps) => {
34
34
 
35
35
  const ariaProps = buildAriaProps(aria)
36
36
  const dataProps = buildDataProps(data)
37
+
38
+ const customColor = color.charAt(0) === '#' && color
39
+
40
+ const customColorStyle = {
41
+ background: customColor
42
+ }
43
+
44
+
37
45
  const bodyCss = classnames(
38
- buildCss('pb_legend_kit', color),
46
+ buildCss('pb_legend_kit', customColor ? "" : color),
39
47
  globalProps(props),
40
48
  className
41
49
  )
@@ -48,7 +56,9 @@ const Legend = (props: LegendProps) => {
48
56
  id={id}
49
57
  >
50
58
  <Body color={dark ? 'lighter' : 'light'}>
51
- <span className="pb_legend_indicator_circle" />
59
+ <span className={`${customColor ? "pb_legend_indicator_circle_custom" : "pb_legend_indicator_circle"}`}
60
+ style={customColorStyle}
61
+ />
52
62
  <If condition={prefixText}>
53
63
  <Title
54
64
  dark={dark}
@@ -23,6 +23,12 @@
23
23
  @include indicator-colors($data_colors);
24
24
  @include indicator-colors($status_colors);
25
25
  @include indicator-colors($product_colors);
26
- @include indicator-colors($category_colors)
26
+ @include indicator-colors($category_colors);
27
27
 
28
+ .pb_legend_indicator_circle_custom {
29
+ display: inline-block;
30
+ width: 10px;
31
+ height: 10px;
32
+ border-radius: 5px;
33
+ }
28
34
  }
@@ -0,0 +1,3 @@
1
+ <%= pb_rails("legend", props: { color: "#dc418a", text: "Windows" }) %>
2
+ <%= pb_rails("legend", props: { color: "#3ef0b8", text: "Windows" }) %>
3
+ <%= pb_rails("legend", props: { color: "#ab8b04", text: "Windows" }) %>
@@ -0,0 +1,24 @@
1
+ import React from 'react'
2
+ import { Legend } from '../..'
3
+
4
+ const LegendCustomColors = (props) => (
5
+ <div>
6
+ <Legend
7
+ color="#dc418a"
8
+ text="Windows"
9
+ {...props}
10
+ />
11
+ <Legend
12
+ color="#3ef0b8"
13
+ text="Windows"
14
+ {...props}
15
+ />
16
+ <Legend
17
+ color="#ab8b04"
18
+ text="Windows"
19
+ {...props}
20
+ />
21
+ </div>
22
+ )
23
+
24
+ export default LegendCustomColors
@@ -0,0 +1 @@
1
+ The color prop also allows for use of custom colors passed in as HEX codes.
@@ -4,8 +4,10 @@ examples:
4
4
  - legend_default: Default
5
5
  - legend_prefix: With Prefix Text
6
6
  - legend_colors: Colors
7
+ - legend_custom_colors: Custom Colors
7
8
 
8
9
  react:
9
10
  - legend_default: Default
10
11
  - legend_prefix: With Prefix Text
11
12
  - legend_colors: Colors
13
+ - legend_custom_colors: Custom Colors