playbook_ui 7.0.1.pre.alpha15 → 7.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (140) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/data/menu.yml +3 -4
  3. data/app/pb_kits/playbook/pb_bar_graph/bar_graph.rb +1 -0
  4. data/app/pb_kits/playbook/pb_body/body.rb +1 -1
  5. data/app/pb_kits/playbook/pb_button/_button_mixins.scss +0 -1
  6. data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.jsx +3 -3
  7. data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.scss +90 -82
  8. data/app/pb_kits/playbook/pb_button_toolbar/button_toolbar.rb +2 -4
  9. data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_default.html.erb +7 -17
  10. data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_default.jsx +9 -32
  11. data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_secondary.html.erb +7 -18
  12. data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_secondary.jsx +9 -37
  13. data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_vertical.html.erb +11 -0
  14. data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_vertical.jsx +29 -0
  15. data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_vertical_secondary.html.erb +11 -0
  16. data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_vertical_secondary.jsx +34 -0
  17. data/app/pb_kits/playbook/pb_button_toolbar/docs/example.yml +7 -3
  18. data/app/pb_kits/playbook/pb_button_toolbar/docs/index.js +2 -0
  19. data/app/pb_kits/playbook/pb_caption/_caption.html.erb +5 -7
  20. data/app/pb_kits/playbook/pb_caption/docs/example.yml +0 -2
  21. data/app/pb_kits/playbook/pb_caption/docs/index.js +0 -1
  22. data/app/pb_kits/playbook/pb_date_picker/_date_picker.html.erb +2 -1
  23. data/app/pb_kits/playbook/pb_date_picker/_date_picker.jsx +3 -1
  24. data/app/pb_kits/playbook/pb_date_picker/date_picker.rb +2 -3
  25. data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.js +32 -34
  26. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_allow_input.html.erb +4 -0
  27. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_allow_input.jsx +13 -0
  28. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_allow_input.md +1 -0
  29. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_dark.html.erb +4 -0
  30. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_dark.jsx +13 -0
  31. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_default_date.html.erb +2 -1
  32. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_default_date.jsx +2 -1
  33. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_format.html.erb +0 -4
  34. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_format.jsx +0 -4
  35. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_input.html.erb +9 -9
  36. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_input.jsx +8 -8
  37. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_input.md +1 -3
  38. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range.html.erb +0 -1
  39. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range.jsx +0 -1
  40. data/app/pb_kits/playbook/pb_date_picker/docs/example.yml +4 -0
  41. data/app/pb_kits/playbook/pb_date_picker/docs/index.js +2 -0
  42. data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.html.erb +14 -8
  43. data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.jsx +39 -122
  44. data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.scss +2 -33
  45. data/app/pb_kits/playbook/pb_date_range_inline/date_range_inline.rb +9 -44
  46. data/app/pb_kits/playbook/pb_date_range_inline/docs/_date_range_inline_default.html.erb +1 -14
  47. data/app/pb_kits/playbook/pb_date_range_inline/docs/_date_range_inline_default.jsx +1 -45
  48. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.html.erb +2 -3
  49. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx +15 -29
  50. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.scss +0 -10
  51. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_default.html.erb +1 -2
  52. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_default.jsx +2 -1
  53. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb +1 -1
  54. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.jsx +1 -1
  55. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line_dark.html.erb +1 -1
  56. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line_dark.jsx +1 -1
  57. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/example.yml +0 -2
  58. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/index.js +0 -1
  59. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb +1 -7
  60. data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +1 -1
  61. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +1 -1
  62. data/app/pb_kits/playbook/pb_form/docs/_form_simple_form.html.erb +3 -3
  63. data/app/pb_kits/playbook/pb_form/docs/_form_simple_form_validate.html.erb +3 -3
  64. data/app/pb_kits/playbook/pb_form/form_builder/date_picker_field.rb +0 -1
  65. data/app/pb_kits/playbook/pb_line_graph/line_graph.rb +1 -0
  66. data/app/pb_kits/playbook/pb_popover/_popover.scss +4 -6
  67. data/app/pb_kits/playbook/pb_popover/index.js +1 -3
  68. data/app/pb_kits/playbook/pb_progress_step/_progress_step.jsx +0 -3
  69. data/app/pb_kits/playbook/pb_progress_step/_progress_step.scss +33 -168
  70. data/app/pb_kits/playbook/pb_progress_step/_progress_step_item.html.erb +1 -3
  71. data/app/pb_kits/playbook/pb_progress_step/_progress_step_item.jsx +8 -10
  72. data/app/pb_kits/playbook/pb_progress_step/docs/_description.md +1 -1
  73. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_default.html.erb +16 -14
  74. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_default.jsx +3 -6
  75. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tracker.html.erb +1 -17
  76. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tracker.jsx +1 -17
  77. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_vertical.jsx +3 -10
  78. data/app/pb_kits/playbook/pb_progress_step/progress_step.rb +1 -11
  79. data/app/pb_kits/playbook/pb_progress_step/progress_step_item.rb +1 -1
  80. data/app/pb_kits/playbook/pb_table/docs/example.yml +0 -12
  81. data/app/pb_kits/playbook/pb_table/docs/index.js +0 -6
  82. data/app/pb_kits/playbook/pb_time/_time.html.erb +20 -17
  83. data/app/pb_kits/playbook/pb_time/_time.jsx +27 -40
  84. data/app/pb_kits/playbook/pb_time/_time.scss +24 -4
  85. data/app/pb_kits/playbook/pb_time/docs/_time_align.jsx +1 -4
  86. data/app/pb_kits/playbook/pb_time/docs/_time_default.html.erb +11 -11
  87. data/app/pb_kits/playbook/pb_time/docs/_time_default.jsx +1 -13
  88. data/app/pb_kits/playbook/pb_time/docs/_time_sizes.jsx +1 -4
  89. data/app/pb_kits/playbook/pb_time/docs/_time_timestamp.jsx +1 -3
  90. data/app/pb_kits/playbook/pb_time/docs/_time_timezone.jsx +2 -7
  91. data/app/pb_kits/playbook/pb_time_range_inline/_time_range_inline.scss +5 -5
  92. data/app/pb_kits/playbook/pb_toggle/docs/example.yml +0 -1
  93. data/app/pb_kits/playbook/pb_toggle/toggle.rb +1 -4
  94. data/app/pb_kits/playbook/pb_typeahead/_typeahead.html.erb +20 -24
  95. data/app/pb_kits/playbook/pb_typeahead/_typeahead.jsx +1 -19
  96. data/app/pb_kits/playbook/pb_typeahead/components/MultiValue.jsx +1 -8
  97. data/app/pb_kits/playbook/pb_typeahead/components/Option.jsx +13 -21
  98. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_default.html.erb +1 -1
  99. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_context_dark.html.erb +1 -1
  100. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.jsx +3 -0
  101. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async_summary.jsx +45 -0
  102. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async_users.jsx +3 -0
  103. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_summary.jsx +27 -0
  104. data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +0 -3
  105. data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +1 -24
  106. data/app/pb_kits/playbook/react_rails_kits.js +0 -1
  107. data/app/pb_kits/playbook/vendor.js +0 -3
  108. data/lib/playbook/version.rb +1 -1
  109. metadata +15 -35
  110. data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar_dark.scss +0 -57
  111. data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar_mixins.scss +0 -27
  112. data/app/pb_kits/playbook/pb_caption/docs/_caption_block.html.erb +0 -11
  113. data/app/pb_kits/playbook/pb_caption/docs/_caption_block.jsx +0 -28
  114. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_default_date.md +0 -1
  115. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_close.html.erb +0 -21
  116. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_close.jsx +0 -38
  117. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/index.js +0 -18
  118. data/app/pb_kits/playbook/pb_table/docs/_table_action_middle.html.erb +0 -34
  119. data/app/pb_kits/playbook/pb_table/docs/_table_action_middle.jsx +0 -68
  120. data/app/pb_kits/playbook/pb_table/docs/_table_action_middle.md +0 -2
  121. data/app/pb_kits/playbook/pb_table/docs/_table_icon_buttons.html.erb +0 -61
  122. data/app/pb_kits/playbook/pb_table/docs/_table_icon_buttons.jsx +0 -89
  123. data/app/pb_kits/playbook/pb_table/docs/_table_icon_buttons.md +0 -1
  124. data/app/pb_kits/playbook/pb_table/docs/_table_one_action.html.erb +0 -34
  125. data/app/pb_kits/playbook/pb_table/docs/_table_one_action.jsx +0 -68
  126. data/app/pb_kits/playbook/pb_table/docs/_table_one_action.md +0 -2
  127. data/app/pb_kits/playbook/pb_table/docs/_table_two_actions.html.erb +0 -43
  128. data/app/pb_kits/playbook/pb_table/docs/_table_two_actions.jsx +0 -80
  129. data/app/pb_kits/playbook/pb_table/docs/_table_two_actions.md +0 -1
  130. data/app/pb_kits/playbook/pb_table/docs/_table_two_plus_actions.html.erb +0 -34
  131. data/app/pb_kits/playbook/pb_table/docs/_table_two_plus_actions.jsx +0 -63
  132. data/app/pb_kits/playbook/pb_table/docs/_table_two_plus_actions.md +0 -1
  133. data/app/pb_kits/playbook/pb_toggle/docs/_toggle_options.html.erb +0 -10
  134. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.html.erb +0 -25
  135. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.md +0 -8
  136. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async.html.erb +0 -30
  137. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async.md +0 -11
  138. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async_users.html.erb +0 -25
  139. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async_users.md +0 -1
  140. data/lib/tasks/changelog.rake +0 -14
@@ -1,27 +0,0 @@
1
- @import "../tokens/spacing";
2
- @import "../tokens/colors";
3
- @import "../tokens/opacity";
4
-
5
- $primary_border: rgba($white, $opacity_1);
6
- $secondary_border: rgba($white, $opacity_10);
7
- $primary_dark: rgba($bg_dark, $opacity_2);
8
- $secondary_dark: rgba($bg_dark, $opacity_2);
9
-
10
- @mixin toolbar_border($horizontal: true, $color: $color) {
11
- @if $horizontal == true {
12
- height: 2px;
13
- width: calc(100% + #{$space_md} + #{$space_md});
14
- top: calc(-#{$space_xs} - 1px);
15
- left: -$space_md;
16
- } @else {
17
- width: 2px;
18
- height: $space_md;
19
- top: 0;
20
- right: calc(#{$space_lg} + 2px);
21
- }
22
- background-color: $color;
23
- content: '';
24
- position: relative;
25
- bottom: 0;
26
- display: block;
27
- }
@@ -1,11 +0,0 @@
1
- <%= pb_rails("caption") do %>
2
- Block
3
- <% end %>
4
-
5
- <%= pb_rails("caption", props: { size: 'lg' }) do %>
6
- Large Block
7
- <% end %>
8
-
9
- <%= pb_rails("caption", props: { size: 'xs' }) do %>
10
- Subcaption Block
11
- <% end %>
@@ -1,28 +0,0 @@
1
- import React from 'react'
2
- import { Caption } from '../../'
3
-
4
- const CaptionBlock = (props) => {
5
- return (
6
- <div>
7
- <Caption {...props}>
8
- {'Block'}
9
- </Caption>
10
-
11
- <Caption
12
- {...props}
13
- size="lg"
14
- >
15
- {'Large Block'}
16
- </Caption>
17
-
18
- <Caption
19
- {...props}
20
- size="xs"
21
- >
22
- {'Subcaption Block'}
23
- </Caption>
24
- </div>
25
- )
26
- }
27
-
28
- export default CaptionBlock
@@ -1 +0,0 @@
1
- The `defaultDate`/`default_date` prop has a null or empty string value by default. You can pass a string or date object if you want a default value on page load.
@@ -1,21 +0,0 @@
1
- <%= pb_rails("fixed_confirmation_toast", props: {
2
- text: "Error Message",
3
- status: "error",
4
- closeable: true
5
- })%>
6
-
7
- <br><br>
8
-
9
- <%= pb_rails("fixed_confirmation_toast", props: {
10
- text: "Items Successfully Moved",
11
- status: "success",
12
- closeable: true
13
- })%>
14
-
15
- <br><br>
16
-
17
- <%= pb_rails("fixed_confirmation_toast", props: {
18
- text: "Scan to Assign Selected Items",
19
- status: "neutral",
20
- closeable: true
21
- })%>
@@ -1,38 +0,0 @@
1
- import React from 'react'
2
- import { FixedConfirmationToast } from '../../'
3
-
4
- const FixedConfirmationToastClose = () => {
5
- return (
6
- <div>
7
- <div>
8
- <FixedConfirmationToast
9
- closeable
10
- status="error"
11
- text="Error Message"
12
- />
13
- </div>
14
-
15
- <br />
16
-
17
- <div>
18
- <FixedConfirmationToast
19
- closeable
20
- status="success"
21
- text="Items Successfully Moved"
22
- />
23
- </div>
24
-
25
- <br />
26
-
27
- <div>
28
- <FixedConfirmationToast
29
- closeable
30
- status="neutral"
31
- text="Scan to Assign Selected Items"
32
- />
33
- </div>
34
- </div>
35
- )
36
- }
37
-
38
- export default FixedConfirmationToastClose
@@ -1,18 +0,0 @@
1
- import PbEnhancedElement from '../pb_enhanced_element'
2
-
3
- export default class PbFixedConfirmationToast extends PbEnhancedElement {
4
- static get selector() {
5
- return '.remove_toast'
6
- }
7
-
8
- connect() {
9
- this.self = this.element
10
- this.self.addEventListener('click', () => {
11
- this.removeToast(this.self)
12
- })
13
- }
14
-
15
- removeToast(elem) {
16
- elem.parentNode.removeChild(elem)
17
- }
18
- }
@@ -1,34 +0,0 @@
1
- <%= pb_rails("table", props: { size: "sm" }) do %>
2
- <thead>
3
- <tr>
4
- <th>Column 1</th>
5
- <th>Column 2</th>
6
- <th>Column 3</th>
7
- <th>Column 4</th>
8
- <th>Column 5</th>
9
- </tr>
10
- </thead>
11
- <tbody>
12
- <tr>
13
- <td>Value 1</td>
14
- <td>Value 2</td>
15
- <td><%= pb_rails("button", props: { text: "Action", variant: "link", padding_left: "none" }) %></td>
16
- <td>Value 4</td>
17
- <td>Value 5</td>
18
- </tr>
19
- <tr>
20
- <td>Value 1</td>
21
- <td>Value 2</td>
22
- <td><%= pb_rails("button", props: { text: "Action", variant: "link", padding_left: "none" }) %></td>
23
- <td>Value 4</td>
24
- <td>Value 5</td>
25
- </tr>
26
- <tr>
27
- <td>Value 1</td>
28
- <td>Value 2</td>
29
- <td><%= pb_rails("button", props: { text: "Action", variant: "link", padding_left: "none" }) %></td>
30
- <td>Value 4</td>
31
- <td>Value 5</td>
32
- </tr>
33
- </tbody>
34
- <% end %>
@@ -1,68 +0,0 @@
1
- import React from 'react'
2
- import { Table } from '../../'
3
- import { Button } from '../../'
4
-
5
- const TableActionMiddle = () => {
6
- return (
7
- <Table size="sm">
8
- <thead>
9
- <tr>
10
- <th>{'Column 1'}</th>
11
- <th>{'Column 2'}</th>
12
- <th>{'Column 3'}</th>
13
- <th>{'Column 4'}</th>
14
- <th>{'Column 5'}</th>
15
- </tr>
16
- </thead>
17
- <tbody>
18
- <tr>
19
- <td>{'Value 1'}</td>
20
- <td>{'Value 2'}</td>
21
- <td>
22
- {' '}
23
- <Button
24
- onClick={() => alert('button clicked!')}
25
- paddingLeft="none"
26
- text="Action"
27
- variant="link"
28
- />
29
- </td>
30
- <td>{'Value 4'}</td>
31
- <td>{'Value 5'}</td>
32
- </tr>
33
- <tr>
34
- <td>{'Value 1'}</td>
35
- <td>{'Value 2'}</td>
36
- <td>
37
- {' '}
38
- <Button
39
- onClick={() => alert('button clicked!')}
40
- paddingLeft="none"
41
- text="Action"
42
- variant="link"
43
- />
44
- </td>
45
- <td>{'Value 4'}</td>
46
- <td>{'Value 5'}</td>
47
- </tr>
48
- <tr>
49
- <td>{'Value 1'}</td>
50
- <td>{'Value 2'}</td>
51
- <td>
52
- {' '}
53
- <Button
54
- onClick={() => alert('button clicked!')}
55
- paddingLeft="none"
56
- text="Action"
57
- variant="link"
58
- />
59
- </td>
60
- <td>{'Value 4'}</td>
61
- <td>{'Value 5'}</td>
62
- </tr>
63
- </tbody>
64
- </Table>
65
- )
66
- }
67
-
68
- export default TableActionMiddle
@@ -1,2 +0,0 @@
1
- If the button is towards the middle of the table, it should likely use button variant `link`
2
-
@@ -1,61 +0,0 @@
1
- <%= pb_rails("table", props: { size: "sm" }) do %>
2
- <thead>
3
- <tr>
4
- <th>Column 1</th>
5
- <th>Column 2</th>
6
- <th>Column 3</th>
7
- <th>Column 4</th>
8
- <th></th>
9
- </tr>
10
- </thead>
11
- <tbody>
12
- <tr>
13
- <td>Value 1</td>
14
- <td>Value 2</td>
15
- <td>Value 3</td>
16
- <td>Value 4</td>
17
- <td>
18
- <%= pb_rails("flex") do %>
19
- <%= pb_rails("body", props: {classname: "flex-item"}) do %>
20
- <%= pb_rails("circle_icon_button", props: { variant: "link", icon: "pencil" }) %>
21
- <% end %>
22
- <%= pb_rails("body", props: {classname: "flex-item"}) do %>
23
- <%= pb_rails("circle_icon_button", props: { variant: "secondary", icon: "trash-alt" }) %>
24
- <% end %>
25
- <% end %>
26
- </td>
27
- </tr>
28
- <tr>
29
- <td>Value 1</td>
30
- <td>Value 2</td>
31
- <td>Value 3</td>
32
- <td>Value 4</td>
33
- <td>
34
- <%= pb_rails("flex") do %>
35
- <%= pb_rails("body", props: {classname: "flex-item"}) do %>
36
- <%= pb_rails("circle_icon_button", props: { variant: "link", icon: "pencil" }) %>
37
- <% end %>
38
- <%= pb_rails("body", props: {classname: "flex-item"}) do %>
39
- <%= pb_rails("circle_icon_button", props: { variant: "secondary", icon: "trash-alt" }) %>
40
- <% end %>
41
- <% end %>
42
- </td>
43
- </tr>
44
- <tr>
45
- <td>Value 1</td>
46
- <td>Value 2</td>
47
- <td>Value 3</td>
48
- <td>Value 4</td>
49
- <td>
50
- <%= pb_rails("flex") do %>
51
- <%= pb_rails("body", props: {classname: "flex-item"}) do %>
52
- <%= pb_rails("circle_icon_button", props: { variant: "link", icon: "pencil" }) %>
53
- <% end %>
54
- <%= pb_rails("body", props: {classname: "flex-item"}) do %>
55
- <%= pb_rails("circle_icon_button", props: { variant: "secondary", icon: "trash-alt" }) %>
56
- <% end %>
57
- <% end %>
58
- </td>
59
- </tr>
60
- </tbody>
61
- <% end %>
@@ -1,89 +0,0 @@
1
- import React from 'react'
2
- import { Table } from '../..'
3
- import { CircleIconButton, Flex, FlexItem } from '../../'
4
-
5
- const TableIconButtons = () => {
6
- return (
7
- <Table size="sm">
8
- <thead>
9
- <tr>
10
- <th>{'Column 1'}</th>
11
- <th>{'Column 2'}</th>
12
- <th>{'Column 3'}</th>
13
- <th>{'Column 4'}</th>
14
- <th>{''}</th>
15
- </tr>
16
- </thead>
17
- <tbody>
18
- <tr>
19
- <td>{'Value 1'}</td>
20
- <td>{'Value 2'}</td>
21
- <td>{'Value 3'}</td>
22
- <td>{'Value 4'}</td>
23
- <td>
24
- <Flex orientation="row">
25
- <FlexItem>
26
- <CircleIconButton
27
- icon="trash-alt"
28
- variant="link"
29
- />
30
- </FlexItem>
31
- <FlexItem>
32
- <CircleIconButton
33
- icon="pencil"
34
- variant="secondary"
35
- />
36
- </FlexItem>
37
- </Flex>
38
- </td>
39
- </tr>
40
- <tr>
41
- <td>{'Value 1'}</td>
42
- <td>{'Value 2'}</td>
43
- <td>{'Value 3'}</td>
44
- <td>{'Value 4'}</td>
45
- <td>
46
- <Flex orientation="row">
47
- <FlexItem>
48
- <CircleIconButton
49
- icon="trash-alt"
50
- variant="link"
51
- />
52
- </FlexItem>
53
- <FlexItem>
54
- <CircleIconButton
55
- icon="pencil"
56
- variant="secondary"
57
- />
58
- </FlexItem>
59
- </Flex>
60
- </td>
61
- </tr>
62
- <tr>
63
- <td>{'Value 1'}</td>
64
- <td>{'Value 2'}</td>
65
- <td>{'Value 3'}</td>
66
- <td>{'Value 4'}</td>
67
- <td>
68
- <Flex orientation="row">
69
- <FlexItem>
70
- <CircleIconButton
71
- icon="trash-alt"
72
- variant="link"
73
- />
74
- </FlexItem>
75
- <FlexItem>
76
- <CircleIconButton
77
- icon="pencil"
78
- variant="secondary"
79
- />
80
- </FlexItem>
81
- </Flex>
82
- </td>
83
- </tr>
84
- </tbody>
85
- </Table>
86
- )
87
- }
88
-
89
- export default TableIconButtons
@@ -1 +0,0 @@
1
- Icon buttons are great to use if space is limited. If the icon isn’t VERY self explanatory (for example pencil/pen for edit, trashcan for delete) then it should use a tooltip explaining what the action does. The tooltip shouldn’t be longer than a few words and essentially serves as a replacement for what the button would say if it weren’t an icon
@@ -1,34 +0,0 @@
1
- <%= pb_rails("table", props: { size: "sm" }) do %>
2
- <thead>
3
- <tr>
4
- <th>Column 1</th>
5
- <th>Column 2</th>
6
- <th>Column 3</th>
7
- <th>Column 4</th>
8
- <th></th>
9
- </tr>
10
- </thead>
11
- <tbody>
12
- <tr>
13
- <td>Value 1</td>
14
- <td>Value 2</td>
15
- <td>Value 3</td>
16
- <td>Value 4</td>
17
- <td><%= pb_rails("button", props: { text: "Action", variant: "secondary" }) %></td>
18
- </tr>
19
- <tr>
20
- <td>Value 1</td>
21
- <td>Value 2</td>
22
- <td>Value 3</td>
23
- <td>Value 4</td>
24
- <td><%= pb_rails("button", props: { text: "Action", variant: "secondary" }) %></td>
25
- </tr>
26
- <tr>
27
- <td>Value 1</td>
28
- <td>Value 2</td>
29
- <td>Value 3</td>
30
- <td>Value 4</td>
31
- <td><%= pb_rails("button", props: { text: "Action", variant: "secondary" }) %></td>
32
- </tr>
33
- </tbody>
34
- <% end %>