playbook_ui 14.9.0.pre.alpha.play17004992 → 14.9.0.pre.rc.0

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 (152) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/_playbook.scss +0 -2
  3. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +17 -61
  4. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta.html.erb +1 -1
  5. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_sort.html.erb +1 -1
  6. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +0 -3
  7. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +0 -2
  8. data/app/pb_kits/playbook/pb_advanced_table/table_header.html.erb +3 -5
  9. data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +1 -3
  10. data/app/pb_kits/playbook/pb_advanced_table/table_row.rb +0 -15
  11. data/app/pb_kits/playbook/pb_avatar/_avatar.scss +2 -0
  12. data/app/pb_kits/playbook/pb_background/_background.tsx +2 -8
  13. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom.jsx +49 -53
  14. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom_rails.html.erb +36 -29
  15. data/app/pb_kits/playbook/pb_body/_body.scss +13 -14
  16. data/app/pb_kits/playbook/pb_body/_body_mixins.scss +16 -22
  17. data/app/pb_kits/playbook/pb_bread_crumbs/docs/_bread_crumbs_default.jsx +0 -6
  18. data/app/pb_kits/playbook/pb_button/_button.scss +0 -6
  19. data/app/pb_kits/playbook/pb_button/_button.tsx +3 -1
  20. data/app/pb_kits/playbook/pb_button/_button_mixins.scss +0 -15
  21. data/app/pb_kits/playbook/pb_button/button.rb +1 -1
  22. data/app/pb_kits/playbook/pb_button/docs/_button_default.html.erb +0 -1
  23. data/app/pb_kits/playbook/pb_button/docs/_button_default.jsx +0 -8
  24. data/app/pb_kits/playbook/pb_button/docs/_button_default.md +1 -1
  25. data/app/pb_kits/playbook/pb_caption/_caption_mixin.scss +1 -2
  26. data/app/pb_kits/playbook/pb_card/_card_mixin.scss +1 -1
  27. data/app/pb_kits/playbook/pb_checkbox/checkbox.html.erb +2 -2
  28. data/app/pb_kits/playbook/pb_checkbox/checkbox.rb +4 -0
  29. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_indeterminate.html.erb +7 -84
  30. data/app/pb_kits/playbook/pb_collapsible/_collapsible.tsx +4 -11
  31. data/app/pb_kits/playbook/pb_collapsible/child_kits/CollapsibleContent.tsx +2 -2
  32. data/app/pb_kits/playbook/pb_collapsible/child_kits/CollapsibleMain.tsx +2 -2
  33. data/app/pb_kits/playbook/pb_currency/_currency.tsx +3 -7
  34. data/app/pb_kits/playbook/pb_currency/currency.html.erb +2 -2
  35. data/app/pb_kits/playbook/pb_currency/currency.rb +1 -17
  36. data/app/pb_kits/playbook/pb_currency/currency.test.js +3 -40
  37. data/app/pb_kits/playbook/pb_currency/docs/example.yml +0 -2
  38. data/app/pb_kits/playbook/pb_currency/docs/index.js +0 -1
  39. data/app/pb_kits/playbook/pb_drawer/_drawer.scss +0 -1
  40. data/app/pb_kits/playbook/pb_drawer/_drawer.tsx +45 -159
  41. data/app/pb_kits/playbook/pb_drawer/docs/example.yml +1 -1
  42. data/app/pb_kits/playbook/pb_drawer/docs/index.js +0 -1
  43. data/app/pb_kits/playbook/pb_dropdown/_dropdown.scss +0 -1
  44. data/app/pb_kits/playbook/pb_dropdown/dropdown_container.html.erb +1 -0
  45. data/app/pb_kits/playbook/pb_dropdown/dropdown_container.rb +4 -0
  46. data/app/pb_kits/playbook/pb_dropdown/utilities/subComponentHelper.tsx +2 -13
  47. data/app/pb_kits/playbook/pb_file_upload/_file_upload.scss +0 -5
  48. data/app/pb_kits/playbook/pb_file_upload/_file_upload.tsx +2 -7
  49. data/app/pb_kits/playbook/pb_file_upload/file_upload.html.erb +2 -8
  50. data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +2 -2
  51. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_loading.html.erb +1 -1
  52. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +12 -63
  53. data/app/pb_kits/playbook/pb_image/_image.tsx +1 -3
  54. data/app/pb_kits/playbook/pb_layout/_layout.tsx +3 -6
  55. data/app/pb_kits/playbook/pb_link/_link.scss +3 -3
  56. data/app/pb_kits/playbook/pb_nav/_bold_mixin.scss +1 -11
  57. data/app/pb_kits/playbook/pb_nav/_collapsible_nav.scss +2 -16
  58. data/app/pb_kits/playbook/pb_nav/_vertical_nav.scss +1 -1
  59. data/app/pb_kits/playbook/pb_overlay/_overlay.tsx +1 -3
  60. data/app/pb_kits/playbook/pb_pagination/_pagination.tsx +2 -2
  61. data/app/pb_kits/playbook/pb_progress_simple/_progress_simple.tsx +3 -5
  62. data/app/pb_kits/playbook/pb_progress_simple/progress_simple.html.erb +2 -3
  63. data/app/pb_kits/playbook/pb_progress_simple/progress_simple.rb +0 -5
  64. data/app/pb_kits/playbook/pb_section_separator/_section_separator.scss +1 -4
  65. data/app/pb_kits/playbook/pb_section_separator/_section_separator.tsx +1 -3
  66. data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.scss +4 -4
  67. data/app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_default.html.erb +1 -2
  68. data/app/pb_kits/playbook/pb_selectable_card/selectable_card.html.erb +1 -1
  69. data/app/pb_kits/playbook/pb_stat_change/_stat_change.tsx +36 -44
  70. data/app/pb_kits/playbook/pb_stat_change/stat_change.html.erb +4 -4
  71. data/app/pb_kits/playbook/pb_table/_table.tsx +25 -109
  72. data/app/pb_kits/playbook/pb_table/docs/example.yml +0 -5
  73. data/app/pb_kits/playbook/pb_table/docs/index.js +0 -6
  74. data/app/pb_kits/playbook/pb_table/index.ts +26 -100
  75. data/app/pb_kits/playbook/pb_table/styles/_all.scss +0 -3
  76. data/app/pb_kits/playbook/pb_table/subcomponents/_table_row.tsx +1 -106
  77. data/app/pb_kits/playbook/pb_table/table.html.erb +1 -1
  78. data/app/pb_kits/playbook/pb_table/table.rb +2 -17
  79. data/app/pb_kits/playbook/pb_text_input/_text_input.tsx +3 -35
  80. data/app/pb_kits/playbook/pb_text_input/docs/example.yml +0 -1
  81. data/app/pb_kits/playbook/pb_text_input/docs/index.js +0 -1
  82. data/app/pb_kits/playbook/pb_text_input/text_input.test.js +2 -139
  83. data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.html.erb +0 -47
  84. data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.jsx +0 -59
  85. data/app/pb_kits/playbook/pb_title/_title.scss +5 -6
  86. data/app/pb_kits/playbook/pb_title/_title_mixin.scss +0 -13
  87. data/app/pb_kits/playbook/pb_typeahead/_typeahead.scss +0 -3
  88. data/app/pb_kits/playbook/pb_typeahead/index.ts +3 -29
  89. data/app/pb_kits/playbook/pb_typeahead/typeahead.html.erb +2 -5
  90. data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +0 -4
  91. data/app/pb_kits/playbook/tokens/_titles.scss +8 -0
  92. data/app/pb_kits/playbook/utilities/_hover.scss +2 -11
  93. data/app/pb_kits/playbook/utilities/_max_width.scss +9 -29
  94. data/app/pb_kits/playbook/utilities/_min_width.scss +2 -6
  95. data/app/pb_kits/playbook/utilities/globalPropNames.mjs +1 -1
  96. data/app/pb_kits/playbook/utilities/globalProps.ts +4 -39
  97. data/app/pb_kits/playbook/utilities/test/globalProps/hover.test.js +0 -15
  98. data/dist/chunks/_typeahead-D0PihN_3.js +22 -0
  99. data/dist/chunks/_weekday_stacked-uMIX8f-A.js +45 -0
  100. data/dist/chunks/{lib-CuCy3_xO.js → lib-BC6ESsxG.js} +3 -3
  101. data/dist/chunks/{pb_form_validation-D37k10a0.js → pb_form_validation-B_Z9rEbg.js} +1 -1
  102. data/dist/chunks/vendor.js +1 -1
  103. data/dist/menu.yml +1 -322
  104. data/dist/playbook-doc.js +1 -1
  105. data/dist/playbook-rails-react-bindings.js +1 -1
  106. data/dist/playbook-rails.js +1 -1
  107. data/dist/playbook.css +1 -1
  108. data/lib/playbook/classnames.rb +0 -4
  109. data/lib/playbook/forms/builder/typeahead_field.rb +0 -13
  110. data/lib/playbook/hover.rb +1 -7
  111. data/lib/playbook/kit_base.rb +1 -16
  112. data/lib/playbook/spacing.rb +0 -21
  113. data/lib/playbook/version.rb +2 -2
  114. metadata +6 -42
  115. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_custom_cell_rails.html.erb +0 -53
  116. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_custom_cell_rails.md +0 -5
  117. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination.jsx +0 -50
  118. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination.md +0 -1
  119. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.jsx +0 -57
  120. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.md +0 -5
  121. data/app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_pagination_mock_data.json +0 -5600
  122. data/app/pb_kits/playbook/pb_currency/docs/_currency_negative.html.erb +0 -4
  123. data/app/pb_kits/playbook/pb_currency/docs/_currency_negative.jsx +0 -16
  124. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_menu.jsx +0 -31
  125. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_menu.md +0 -6
  126. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns.html.erb +0 -95
  127. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns.jsx +0 -87
  128. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns_react.md +0 -2
  129. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible.jsx +0 -75
  130. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible.md +0 -1
  131. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_click.jsx +0 -108
  132. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_click.md +0 -2
  133. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_content.jsx +0 -94
  134. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_content.md +0 -0
  135. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_rows.jsx +0 -83
  136. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_rows.md +0 -3
  137. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table.jsx +0 -120
  138. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table.md +0 -1
  139. data/app/pb_kits/playbook/pb_table/styles/_collapsible.scss +0 -35
  140. data/app/pb_kits/playbook/pb_table/styles/_scroll.scss +0 -4
  141. data/app/pb_kits/playbook/pb_table/styles/_sticky_columns.scss +0 -18
  142. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_mask.jsx +0 -88
  143. data/app/pb_kits/playbook/pb_text_input/inputMask.ts +0 -64
  144. data/app/pb_kits/playbook/tokens/_height.scss +0 -19
  145. data/app/pb_kits/playbook/tokens/exports/_height.module.scss +0 -37
  146. data/app/pb_kits/playbook/utilities/_height.scss +0 -33
  147. data/app/pb_kits/playbook/utilities/_width.scss +0 -45
  148. data/dist/chunks/_typeahead-l1kq1p9m.js +0 -22
  149. data/dist/chunks/_weekday_stacked-B28kYXl9.js +0 -45
  150. data/lib/playbook/height.rb +0 -29
  151. data/lib/playbook/max_height.rb +0 -29
  152. data/lib/playbook/min_height.rb +0 -29
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 585093eef9e79407e25a130a2a77f097c248bc2884116fc21bc9946c53b4cfe0
4
- data.tar.gz: 82327cf34bd6c8b448e67549d84243c17622d2382ee07efa8730e13544c36be1
3
+ metadata.gz: 47520ce9398f8aa52de58407b61451e364bb6ea6c79ef2f69b0489568423ba48
4
+ data.tar.gz: eef14ed7518ad125404d5e12def9432bf114f68d6aebf28441b3bb0be0289e9b
5
5
  SHA512:
6
- metadata.gz: e62d590332efe256a1464c1a2dfb104cb6078ddae7003114d656b016921f4252537ce52c78265b8ab27c4bca5e1dd0c93344d32080bfc2183e75cad551d1ace0
7
- data.tar.gz: 6935b07d0cadec5f1156367e0488ce352aaf2cacbe7d9310b10b064db8428e4801e4ba7805c66a53dc68a313c5ea2be87219684465c0a4f09712c5fcc057c1a3
6
+ metadata.gz: 3152f44d47e293ce8b18149179592c917a13d4053512cc035155444b7a4f3d9548393cdda692bd79578a4bf41a8d54361d287e36a0e05a4e960025ab00cb7875
7
+ data.tar.gz: bb56a8669a4faa58aa4749294711c92b28facf23439af23f628d13720d01484f2e7fc9bcf399d266b9a7d50377b04f87cd0b9be026bd0b9de7928d76d3c8bbc1
@@ -111,7 +111,6 @@
111
111
  @import 'utilities/mixins';
112
112
  @import 'utilities/spacing';
113
113
  @import 'utilities/cursor';
114
- @import 'utilities/width';
115
114
  @import 'utilities/min_width';
116
115
  @import 'utilities/max_width';
117
116
  @import 'utilities/positioning';
@@ -127,4 +126,3 @@
127
126
  @import 'utilities/overflow';
128
127
  @import 'utilities/truncate';
129
128
  @import 'utilities/vertical_align';
130
- @import 'utilities/height';
@@ -7,7 +7,6 @@ import {
7
7
  createColumnHelper,
8
8
  getCoreRowModel,
9
9
  getExpandedRowModel,
10
- getPaginationRowModel,
11
10
  getSortedRowModel,
12
11
  Row,
13
12
  useReactTable,
@@ -26,7 +25,6 @@ import { updateExpandAndCollapseState } from "./Utilities/ExpansionControlHelper
26
25
  import { CustomCell } from "./Components/CustomCell"
27
26
  import { TableHeader } from "./SubKits/TableHeader"
28
27
  import { TableBody } from "./SubKits/TableBody"
29
- import Pagination from "../pb_pagination/_pagination"
30
28
 
31
29
  type AdvancedTableProps = {
32
30
  aria?: { [key: string]: string }
@@ -44,8 +42,6 @@ type AdvancedTableProps = {
44
42
  loading?: boolean | string
45
43
  onRowToggleClick?: (arg: Row<GenericObject>) => void
46
44
  onToggleExpansionClick?: (arg: Row<GenericObject>) => void
47
- pagination?: boolean,
48
- paginationProps?: GenericObject
49
45
  responsive?: "scroll" | "none",
50
46
  sortControl?: GenericObject
51
47
  tableData: GenericObject[]
@@ -71,8 +67,6 @@ const AdvancedTable = (props: AdvancedTableProps) => {
71
67
  loading,
72
68
  onRowToggleClick,
73
69
  onToggleExpansionClick,
74
- pagination = false,
75
- paginationProps,
76
70
  responsive = "scroll",
77
71
  sortControl,
78
72
  tableData,
@@ -183,17 +177,6 @@ const AdvancedTable = (props: AdvancedTableProps) => {
183
177
  }
184
178
  }
185
179
 
186
- const paginationInitializer = pagination ? {
187
- getPaginationRowModel: getPaginationRowModel(),
188
- paginateExpandedRows: false,
189
- initialState: {
190
- pagination: {
191
- pageIndex: paginationProps?.pageIndex ?? 0,
192
- pageSize: paginationProps?.pageSize ?? 20,
193
- },
194
- },
195
- } : {}
196
-
197
180
  //initialize table
198
181
  const table = useReactTable({
199
182
  data: loading ? Array(loadingStateRowCount).fill({}) : tableData,
@@ -206,7 +189,6 @@ const AdvancedTable = (props: AdvancedTableProps) => {
206
189
  enableSortingRemoval: false,
207
190
  sortDescFirst: true,
208
191
  ...expandAndSortState(),
209
- ... paginationInitializer,
210
192
  ...tableOptions,
211
193
  })
212
194
 
@@ -245,10 +227,6 @@ const AdvancedTable = (props: AdvancedTableProps) => {
245
227
  className
246
228
  )
247
229
 
248
- const onPageChange = (page: number) => {
249
- table.setPageIndex(page - 1)
250
- }
251
-
252
230
  return (
253
231
  <div {...ariaProps}
254
232
  {...dataProps}
@@ -272,45 +250,23 @@ const AdvancedTable = (props: AdvancedTableProps) => {
272
250
  toggleExpansionIcon,
273
251
  }}
274
252
  >
275
- <>
276
- {pagination &&
277
- <Pagination
278
- current={table.getState().pagination.pageIndex + 1}
279
- key={`pagination-top-${table.getState().pagination.pageIndex + 1}`}
280
- marginBottom="xs"
281
- onChange={onPageChange}
282
- range={paginationProps?.range ? paginationProps?.range : 5}
283
- total={table.getPageCount()}
284
- />
285
- }
286
- <Table
287
- className={`${loading ? "content-loading" : ""}`}
288
- dark={dark}
289
- dataTable
290
- numberSpacing="tabular"
291
- responsive="none"
292
- {...tableProps}
293
- >
294
- {children ? (
295
- children
296
- ) : (
297
- <>
298
- <TableHeader />
299
- <TableBody />
300
- </>
301
- )}
302
- </Table>
303
- {pagination &&
304
- <Pagination
305
- current={table.getState().pagination.pageIndex + 1}
306
- key={`pagination-bottom-${table.getState().pagination.pageIndex + 1}`}
307
- marginTop="xs"
308
- onChange={onPageChange}
309
- range={paginationProps?.range ? paginationProps?.range : 5}
310
- total={table.getPageCount()}
311
- />
312
- }
313
- </>
253
+ <Table
254
+ className={`${loading ? "content-loading" : ""}`}
255
+ dark={dark}
256
+ dataTable
257
+ numberSpacing="tabular"
258
+ responsive="none"
259
+ {...tableProps}
260
+ >
261
+ {children ? (
262
+ children
263
+ ) : (
264
+ <>
265
+ <TableHeader />
266
+ <TableBody />
267
+ </>
268
+ )}
269
+ </Table>
314
270
  </AdvancedTableContext.Provider>
315
271
  </div>
316
272
  )
@@ -30,4 +30,4 @@
30
30
  }
31
31
  ] %>
32
32
 
33
- <%= pb_rails("advanced_table", props: { id: "beta_table", table_data: @table_data, column_definitions: column_definitions }) %>
33
+ <%= pb_rails("advanced_table", props: {table_data: @table_data, column_definitions: column_definitions}) %>
@@ -55,5 +55,5 @@
55
55
 
56
56
  <%= pb_rails("advanced_table", props: { table_data: @table_data, column_definitions: column_definitions }) do %>
57
57
  <%= pb_rails("advanced_table/table_header", props: { column_definitions: column_definitions }) %>
58
- <%= pb_rails("advanced_table/table_body", props: { id: "beta_sort", table_data: @table_data, column_definitions: column_definitions, subrow_headers: subrow_headers, enable_toggle_expansion: "all" }) %>
58
+ <%= pb_rails("advanced_table/table_body", props: { id: "subrow_headers", table_data: @table_data, column_definitions: column_definitions, subrow_headers: subrow_headers, enable_toggle_expansion: "all" }) %>
59
59
  <% end %>
@@ -3,7 +3,6 @@ examples:
3
3
  - advanced_table_beta: Default (Required Props)
4
4
  - advanced_table_beta_subrow_headers: SubRow Headers
5
5
  - advanced_table_beta_sort: Enable Sorting
6
- - advanced_table_custom_cell_rails: Custom Components for Cells
7
6
 
8
7
  react:
9
8
  - advanced_table_default: Default (Required Props)
@@ -18,5 +17,3 @@ examples:
18
17
  - advanced_table_inline_row_loading: Inline Row Loading
19
18
  - advanced_table_responsive: Responsive Tables
20
19
  - advanced_table_custom_cell: Custom Components for Cells
21
- - advanced_table_pagination: Pagination
22
- - advanced_table_pagination_with_props: Pagination Props
@@ -10,5 +10,3 @@ export { default as AdvancedTableTableProps } from './_advanced_table_table_prop
10
10
  export { default as AdvancedTableInlineRowLoading } from './_advanced_table_inline_row_loading.jsx'
11
11
  export { default as AdvancedTableResponsive } from './_advanced_table_responsive.jsx'
12
12
  export { default as AdvancedTableCustomCell } from './_advanced_table_custom_cell.jsx'
13
- export { default as AdvancedTablePagination } from './_advanced_table_pagination.jsx'
14
- export { default as AdvancedTablePaginationWithProps } from './_advanced_table_pagination_with_props.jsx'
@@ -4,10 +4,8 @@
4
4
  <%= pb_rails("table/table_header", props: { tag: "div", id: item[:accessor], classname: object.th_classname, sort_menu: item[:sort_menu] }) do %>
5
5
  <%= pb_rails("flex", props:{ align: "center", justify: index.zero? ? "start" : "end", text_align: "end" }) do %>
6
6
  <% if index.zero? && (object.enable_toggle_expansion == "header" || object.enable_toggle_expansion == "all") %>
7
- <button
8
- class="gray-icon toggle-all-icon"
9
- onclick="expandAllRows(this); event.preventDefault();">
10
- <%= pb_rails("icon", props: { icon: "arrows-from-line", cursor: "pointer", fixed_width: true, padding_right: "xs" }) %>
7
+ <button class="gray-icon toggle-all-icon" onclick="expandAllRows(this)">
8
+ <%= pb_rails("icon", props: { icon: "arrows-from-line", cursor: "pointer", fixed_width: true, padding_right: "xs" }) %>
11
9
  </button>
12
10
  <% end %>
13
11
  <%= item[:label] %>
@@ -15,4 +13,4 @@
15
13
  <% end %>
16
14
  <% end %>
17
15
  <% end %>
18
- <% end %>
16
+ <% end %>
@@ -11,9 +11,7 @@
11
11
  </button>
12
12
  <% end %>
13
13
  <%= pb_rails("flex/flex_item", props:{padding_left: index.zero? && object.row[:children].present? ? "none" : "xs"}) do %>
14
- <% if column[:custom_renderer].present? %>
15
- <%= raw(column[:custom_renderer].call(object.row, custom_renderer_value(column, index))) %>
16
- <% elsif index.zero? %>
14
+ <% if index.zero? %>
17
15
  <% if object.depth.zero? %>
18
16
  <%= object.row[column[:accessor].to_sym] %>
19
17
  <% else %>
@@ -26,21 +26,6 @@ module Playbook
26
26
 
27
27
  private
28
28
 
29
- def custom_renderer_value(column, index)
30
- if index.zero?
31
- if depth.zero?
32
- row[column[:accessor].to_sym]
33
- else
34
- depth_accessors.each_with_index do |item, accessor_index|
35
- key = item.to_sym
36
- return row[key] if depth - 1 == accessor_index
37
- end
38
- end
39
- else
40
- row[column[:accessor].to_sym]
41
- end
42
- end
43
-
44
29
  def subrow_depth_classname
45
30
  depth.positive? ? "depth-sub-row-#{depth}" : ""
46
31
  end
@@ -31,12 +31,14 @@ $avatar-sizes: (
31
31
  [class^=pb_card_kit].overlay_top_center {
32
32
  left: 50%;
33
33
  transform: translateX(-50%);
34
+ padding: 2px !important;
34
35
  }
35
36
 
36
37
  [class^=pb_card_kit].overlay_left_center,
37
38
  [class^=pb_card_kit].overlay_right_center {
38
39
  top: 50%;
39
40
  transform: translateY(-50%);
41
+ padding: 2px !important;
40
42
  }
41
43
  }
42
44
 
@@ -1,7 +1,7 @@
1
1
  import React, { useEffect, useState } from 'react'
2
2
  import classnames from 'classnames'
3
3
  import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
4
- import { GlobalProps, globalProps, globalInlineProps } from '../utilities/globalProps'
4
+ import { GlobalProps, globalProps } from '../utilities/globalProps'
5
5
 
6
6
  type BackgroundColors = 'gradient' |
7
7
  'dark' |'light' | 'white' | 'success' | 'warning' | 'error' | 'info' | 'neutral' | 'primary' | 'shadow' |
@@ -145,12 +145,6 @@ const Background = (props: BackgroundProps): React.ReactElement => {
145
145
  } : {})
146
146
  };
147
147
 
148
- const dynamicInlineProps = globalInlineProps(props);
149
- const combinedStyles = {
150
- ...backgroundStyle,
151
- ...dynamicInlineProps
152
- };
153
-
154
148
  const Tag: React.ReactElement | any = `${tag}`;
155
149
  const ariaProps = buildAriaProps(aria);
156
150
  const dataProps = buildDataProps(data);
@@ -164,7 +158,7 @@ const Background = (props: BackgroundProps): React.ReactElement => {
164
158
  alt={alt}
165
159
  className={classes}
166
160
  id={id}
167
- style={combinedStyles}
161
+ style={backgroundStyle}
168
162
  >
169
163
  {children}
170
164
  </Tag>
@@ -1,70 +1,66 @@
1
1
  import React from 'react'
2
- import ReactDOMServer from 'react-dom/server'
3
- import BarGraph from '../_bar_graph'
4
- import Icon from '../../pb_icon/_icon'
5
2
 
6
- const chartData = [
7
- {
8
- name: 'Role',
9
- data: [0, 200, 300, 654, 656],
10
- },
11
- {
12
- name: 'Company',
13
- data: [150, 524, 320, 440, 500],
14
- },
15
- ]
3
+ import BarGraph from '../_bar_graph'
16
4
 
17
- const renderIcon = (iconName, color) => {
18
- return ReactDOMServer.renderToStaticMarkup(
19
- <Icon
20
- color={color}
21
- icon={iconName}
22
- />)
23
- };
5
+ const chartData = [{
6
+ name: 'Installation',
7
+ data: [1475, 200, 3000, 654, 656],
8
+ }, {
9
+ name: 'Manufacturing',
10
+ data: [4434, 524, 2320, 440, 500],
11
+ }, {
12
+ name: 'Sales & Distribution',
13
+ data: [3387, 743, 1344, 434, 440],
14
+ }, {
15
+ name: 'Project Development',
16
+ data: [3227, 878, 999, 780, 1000],
17
+ }, {
18
+ name: 'Other',
19
+ data: [1111, 677, 3245, 500, 200],
20
+ }]
24
21
 
25
22
  const barGraphOptions = {
26
- yAxis: {
27
- tickInterval: 5,
23
+ subtitle: {
24
+ text: "Overwritten subtitle",
25
+ style: {
26
+ color: "red"
27
+ }
28
28
  },
29
29
  xAxis: {
30
- categories: ['1', '2', '3', '4', '5'],
31
- labels: {
32
- useHTML: true,
33
- formatter: function () {
34
- switch (this.value) {
35
- case '1':
36
- return `${renderIcon('frown', 'error')}`;
37
- case '2':
38
- return `${renderIcon('frown', 'warning')}`;
39
- case '3':
40
- return `${renderIcon('frown-open', 'neutral')}`;
41
- case '4':
42
- return `${renderIcon('smile', 'category_7')}`;
43
- case '5':
44
- return `${renderIcon('smile-beam', 'success')}`;
45
- default:
46
- return ''
47
- }
48
- },
49
- style: {
50
- fontSize: '1.4em',
51
- },
52
- y: 42,
53
- },
54
- },
55
- legend: {
56
- itemMarginTop: 62,
57
- },
30
+ labels: {
31
+ useHTML: true,
32
+ formatter: function() {
33
+ switch (this.value) {
34
+ case 'Jan':
35
+ return `<i class="far fa-apple-whole"></i> ${this.value}`
36
+ case 'Feb':
37
+ return `<i class="far fa-strawberry"></i> ${this.value}`
38
+ case 'Mar':
39
+ return `<i class="far fa-lemon"></i> ${this.value}`
40
+ case 'Apr':
41
+ return `<i class="far fa-pear"></i> ${this.value}`
42
+ case 'May':
43
+ return `<i class="far fa-peach"></i> ${this.value}`
44
+ default:
45
+ return ''
46
+ }
47
+ }
48
+ }
49
+ }
58
50
  }
59
51
 
60
- const BarGraphCustom = () => (
52
+ const BarGraphCustom = (props) => (
61
53
  <div>
62
54
  <BarGraph
55
+ axisTitle="Number of Employees"
63
56
  chartData={chartData}
64
57
  customOptions={barGraphOptions}
65
- id="happiness-dashboard"
66
- legend
58
+ id="bar-custom"
59
+ subTitle="Subtitle to replace"
67
60
  title="Bar Graph with Custom Overrides"
61
+ xAxisCategories={['Jan', 'Feb', 'Mar', 'Apr', 'May']}
62
+ yAxisMin={0}
63
+ {...props}
68
64
  />
69
65
  </div>
70
66
  )
@@ -1,42 +1,49 @@
1
1
  <% data = [{
2
- name: 'Role',
3
- data: [0, 200, 300, 654, 656],
2
+ name: 'Installation',
3
+ data: [1475,200,3000,654,656]
4
4
  }, {
5
- name: 'Company',
6
- data: [150, 524, 320, 440, 500],
5
+ name: 'Manufacturing',
6
+ data: [4434,524,2320,440,500]
7
+ }, {
8
+ name: 'Sales & Distribution',
9
+ data: [3387,743,1344,434,440,]
10
+ }, {
11
+ name: 'Project Development',
12
+ data: [3227,878,999,780,1000]
13
+ }, {
14
+ name: 'Other',
15
+ data: [1111,677,3245,500,200]
7
16
  }] %>
8
17
 
9
18
  <% bar_graph_options = {
10
- customOptions: {
11
- yAxis: {
12
- tickInterval: 5,
13
- },
14
- xAxis: {
15
- categories: [
16
- raw(pb_rails("icon", props: { icon: "frown", color: "error", size: "2x" })),
17
- raw(pb_rails("icon", props: { icon: "frown", color: "warning", size: "2x" })),
18
- raw(pb_rails("icon", props: { icon: "frown-open", color: "neutral", size: "2x" })),
19
- raw(pb_rails("icon", props: { icon: "smile", color: "category_7", size: "2x" })),
20
- raw(pb_rails("icon", props: { icon: "smile-beam", color: "success", size: "2x" }))
21
- ],
22
- labels: {
23
- useHTML: true,
24
- sytle: {
25
- fontSize: '1.4em',
19
+ customOptions: {
20
+ subtitle: {
21
+ text: "Overwritten subtitle",
22
+ style: {
23
+ color: "red"
24
+ }
26
25
  },
27
- y: 42,
28
- },
29
- },
30
- legend: {
31
- itemMarginTop: 62,
32
- },
33
- }
26
+ xAxis: {
27
+ categories: [
28
+ '<i class="far fa-apple-whole"></i> Jan',
29
+ '<i class="far fa-strawberry"></i> Feb',
30
+ '<i class="far fa-lemon"></i> Mar',
31
+ '<i class="far fa-pear"></i> Apr',
32
+ '<i class="far fa-peach"></i> May'
33
+ ],
34
+ labels: {
35
+ useHTML: true,
36
+ }
37
+ }
38
+ }
34
39
  } %>
35
40
 
36
41
  <%= pb_rails("bar_graph", props: {
42
+ axis_title: 'Number of Employees',
37
43
  chart_data: data,
38
44
  id: "bar-default",
39
- legend: true,
45
+ y_axis_min: 0,
46
+ subtitle: 'Subtitle to replace',
40
47
  title: 'Bar Graph with Custom Overrides',
41
48
  custom_options: bar_graph_options
42
- }) %>
49
+ }) %>
@@ -1,25 +1,24 @@
1
1
  @import "./body_mixins";
2
2
  @import "../tokens/titles";
3
3
 
4
- [class^="pb_body_kit"] {
4
+ [class^=pb_body_kit]{
5
5
  @include pb_body($text_lt_default);
6
6
  @each $color_name, $color_value in $pb_body_colors {
7
7
  &[class*=_#{"" + $color_name}] {
8
8
  @include pb_body($color_value);
9
9
  }
10
10
  @each $status_name, $status_value in $pb_body_status {
11
- &[class*="_default_#{$status_name}"] {
11
+ &[class*=_default_#{$status_name}] {
12
12
  @include pb_body($status_value);
13
13
  }
14
14
  }
15
15
  }
16
- @each $dark_color_name, $dark_color_value in $pb_dark_body_colors {
17
- &[class*="_#{$dark_color_name}"][class*="dark"] {
16
+ @each $dark_color_name, $dark_color_value in $pb_dark_body_colors{
17
+ &[class*=_#{$dark_color_name}][class*=dark]{
18
18
  @include pb_body($dark_color_value);
19
19
  }
20
20
  }
21
- b,
22
- strong {
21
+ b, strong {
23
22
  font-weight: $bold;
24
23
  }
25
24
 
@@ -30,8 +29,7 @@
30
29
  }
31
30
  }
32
31
 
33
- em,
34
- i {
32
+ em, i {
35
33
  font-style: italic;
36
34
  }
37
35
 
@@ -41,25 +39,26 @@
41
39
  }
42
40
 
43
41
  @each $status_name, $status_value in $pb_body_status {
44
- &[class*="#{$status_name}"] {
42
+ &[class*=#{$status_name}] {
45
43
  @include pb_body($status_value);
46
44
  }
47
45
  }
48
46
 
49
- &[class*="dark"] {
47
+ &[class*=dark] {
50
48
  a {
51
49
  color: $active_dark;
52
50
  }
53
51
  @include pb_body_dark();
54
- @each $dark_color_name, $dark_color_value in $pb_dark_body_colors {
55
- &[class*="_#{$dark_color_name}"][class*="dark"] {
52
+ @each $dark_color_name, $dark_color_value in $pb_dark_body_colors{
53
+ &[class*=_#{$dark_color_name}][class*=dark]{
56
54
  @include pb_body($dark_color_value);
57
55
  }
58
56
  }
59
- @each $status_name, $status_value in $pb_dark_body_status {
60
- &[class*="_#{$status_name}"] {
57
+ @each $status_name, $status_value in $pb_body_status {
58
+ &[class*=_#{$status_name}] {
61
59
  @include pb_body($status_value);
62
60
  }
63
61
  }
64
62
  }
63
+
65
64
  }
@@ -3,35 +3,29 @@
3
3
  @import "../tokens/typography";
4
4
 
5
5
  $pb_body_colors: (
6
- default: $text_lt_default,
7
- light: $text_lt_light,
8
- lighter: $text_lt_lighter,
9
- link: $primary,
10
- error: $error,
11
- success: $text_lt_success_sm,
6
+ default: $text_lt_default,
7
+ light: $text_lt_light,
8
+ lighter: $text_lt_lighter,
9
+ link: $primary,
10
+ error: $error,
11
+ success: $text_lt_success_sm,
12
12
  );
13
13
 
14
14
  $pb_dark_body_colors: (
15
- default: $text_dk_default,
16
- light: $text_dk_light,
17
- lighter: $text_dk_lighter,
18
- link: $active_dark,
19
- error: $error,
20
- success: $text_dk_success_sm,
15
+ default: $text_dk_default,
16
+ light: $text_dk_light,
17
+ lighter: $text_dk_lighter,
18
+ link: $active_dark,
19
+ error: $error,
20
+ success: $text_dk_success_sm,
21
21
  );
22
22
 
23
23
  // Order is important here!
24
24
  $pb_body_status: (
25
- default: $text_lt_default,
26
- negative: $error,
27
- dark_error: $error_dark_body,
28
- positive: $text_lt_success_sm,
29
- );
30
-
31
- $pb_dark_body_status: (
32
- default: $text_dk_default,
33
- negative: $error_dark,
34
- positive: $text_dk_success_sm,
25
+ default: $text_lt_default,
26
+ negative: $error,
27
+ dark_error: $error_dark_body,
28
+ positive: $text_lt_success_sm,
35
29
  );
36
30
 
37
31
  @mixin pb_body($color: $text_lt_default) {
@@ -13,7 +13,6 @@ const BreadCrumbsDefault = (props) => {
13
13
  <Icon
14
14
  icon="home"
15
15
  size="1x"
16
- {...props}
17
16
  />
18
17
  <BreadCrumbItem
19
18
  {...props}
@@ -23,13 +22,11 @@ const BreadCrumbsDefault = (props) => {
23
22
  size="4"
24
23
  tag="span"
25
24
  text="Home"
26
- {...props}
27
25
  />
28
26
  </BreadCrumbItem>
29
27
  <Icon
30
28
  icon="users"
31
29
  size="1x"
32
- {...props}
33
30
  />
34
31
  <Link
35
32
  {...props}
@@ -39,20 +36,17 @@ const BreadCrumbsDefault = (props) => {
39
36
  size="4"
40
37
  tag="span"
41
38
  text="Users"
42
- {...props}
43
39
  />
44
40
  </Link>
45
41
  <Icon
46
42
  icon="user"
47
43
  size="1x"
48
- {...props}
49
44
  />
50
45
  <Link {...props}>
51
46
  <Title
52
47
  size="4"
53
48
  tag="span"
54
49
  text="User"
55
- {...props}
56
50
  />
57
51
  </Link>
58
52
  </BreadCrumbs>