playbook_ui 14.13.0.pre.alpha.play1834depupdatesass6024 → 14.13.0.pre.rc.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/_playbook.scss +0 -1
  3. data/app/pb_kits/playbook/pb_advanced_table/Components/CustomCell.tsx +1 -1
  4. data/app/pb_kits/playbook/pb_advanced_table/Components/TableHeaderCell.tsx +4 -11
  5. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +10 -71
  6. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +21 -37
  7. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.jsx +0 -1
  8. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_react.md +1 -3
  9. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +0 -1
  10. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +1 -2
  11. data/app/pb_kits/playbook/pb_advanced_table/index.js +6 -9
  12. data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +5 -8
  13. data/app/pb_kits/playbook/pb_avatar/_avatar.scss +0 -9
  14. data/app/pb_kits/playbook/pb_avatar/_avatar.tsx +7 -11
  15. data/app/pb_kits/playbook/pb_avatar/avatar.html.erb +7 -6
  16. data/app/pb_kits/playbook/pb_avatar/docs/_avatar_badge_component_overlay.jsx +3 -9
  17. data/app/pb_kits/playbook/pb_avatar/docs/_avatar_circle_icon_component_overlay.jsx +2 -6
  18. data/app/pb_kits/playbook/pb_button/button.rb +1 -1
  19. data/app/pb_kits/playbook/pb_date/_date.tsx +4 -14
  20. data/app/pb_kits/playbook/pb_date/docs/_date_default.jsx +1 -2
  21. data/app/pb_kits/playbook/pb_date/docs/_date_unstyled.jsx +5 -13
  22. data/app/pb_kits/playbook/pb_draggable/docs/example.yml +5 -2
  23. data/app/pb_kits/playbook/pb_draggable/draggable_container.html.erb +2 -2
  24. data/app/pb_kits/playbook/pb_draggable/draggable_container.rb +0 -5
  25. data/app/pb_kits/playbook/pb_draggable/draggable_item.html.erb +1 -1
  26. data/app/pb_kits/playbook/pb_draggable/draggable_item.rb +0 -4
  27. data/app/pb_kits/playbook/pb_draggable/index.js +15 -151
  28. data/app/pb_kits/playbook/pb_file_upload/file_upload.html.erb +6 -1
  29. data/app/pb_kits/playbook/pb_filter/filter.html.erb +5 -1
  30. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/example.yml +0 -1
  31. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/index.js +5 -7
  32. data/app/pb_kits/playbook/pb_form_group/form_group.html.erb +6 -1
  33. data/app/pb_kits/playbook/pb_form_pill/form_pill.html.erb +1 -1
  34. data/app/pb_kits/playbook/pb_home_address_street/_home_address_street.tsx +7 -11
  35. data/app/pb_kits/playbook/pb_home_address_street/docs/example.yml +0 -2
  36. data/app/pb_kits/playbook/pb_home_address_street/docs/index.js +0 -1
  37. data/app/pb_kits/playbook/pb_home_address_street/home_address_street.rb +2 -13
  38. data/app/pb_kits/playbook/pb_icon/icon.html.erb +6 -2
  39. data/app/pb_kits/playbook/pb_layout/body.html.erb +5 -1
  40. data/app/pb_kits/playbook/pb_layout/footer.html.erb +5 -1
  41. data/app/pb_kits/playbook/pb_layout/header.html.erb +5 -1
  42. data/app/pb_kits/playbook/pb_layout/item.html.erb +5 -1
  43. data/app/pb_kits/playbook/pb_layout/layout.html.erb +5 -1
  44. data/app/pb_kits/playbook/pb_layout/sidebar.html.erb +5 -1
  45. data/app/pb_kits/playbook/pb_legend/legend.html.erb +6 -1
  46. data/app/pb_kits/playbook/pb_lightbox/lightbox.scss +6 -7
  47. data/app/pb_kits/playbook/pb_link/_link.tsx +0 -18
  48. data/app/pb_kits/playbook/pb_link/docs/example.yml +3 -5
  49. data/app/pb_kits/playbook/pb_link/docs/index.js +1 -2
  50. data/app/pb_kits/playbook/pb_link/link.html.erb +1 -1
  51. data/app/pb_kits/playbook/pb_link/link.rb +0 -6
  52. data/app/pb_kits/playbook/pb_link/link.test.jsx +0 -30
  53. data/app/pb_kits/playbook/pb_message/message.html.erb +6 -1
  54. data/app/pb_kits/playbook/pb_message/message_mention.html.erb +6 -1
  55. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tooltip.html.erb +6 -6
  56. data/app/pb_kits/playbook/pb_table/docs/_table_with_background_kit.html.erb +9 -6
  57. data/app/pb_kits/playbook/pb_table/docs/_table_with_background_kit.jsx +9 -6
  58. data/app/pb_kits/playbook/pb_table/styles/_desktop_collapse.scss +0 -26
  59. data/app/pb_kits/playbook/pb_table/styles/_mobile.scss +1 -0
  60. data/app/pb_kits/playbook/pb_table/styles/_mobile_collapse.scss +0 -25
  61. data/app/pb_kits/playbook/pb_table/styles/_tablet_collapse.scss +0 -25
  62. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_mask.html.erb +1 -1
  63. data/app/pb_kits/playbook/pb_text_input/index.js +83 -52
  64. data/app/pb_kits/playbook/pb_tooltip/_tooltip.tsx +1 -3
  65. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_default.html.erb +1 -1
  66. data/app/pb_kits/playbook/pb_tooltip/index.js +27 -45
  67. data/app/pb_kits/playbook/pb_tooltip/tooltip.rb +1 -5
  68. data/app/pb_kits/playbook/pb_user/_user.tsx +0 -3
  69. data/app/pb_kits/playbook/pb_user/docs/example.yml +0 -2
  70. data/app/pb_kits/playbook/pb_user/docs/index.js +0 -1
  71. data/app/pb_kits/playbook/pb_user/user.html.erb +1 -1
  72. data/app/pb_kits/playbook/pb_user/user.rb +0 -1
  73. data/app/pb_kits/playbook/pb_user/user.test.js +0 -14
  74. data/dist/chunks/_typeahead-BWwaAo_0.js +36 -0
  75. data/dist/chunks/_weekday_stacked-zyBCd1s8.js +45 -0
  76. data/dist/chunks/{lib-WQEeEj3t.js → lib-kMuhBuU7.js} +2 -2
  77. data/dist/chunks/{pb_form_validation-Cq64l4zn.js → pb_form_validation-DBJ0wZuS.js} +1 -1
  78. data/dist/chunks/vendor.js +1 -1
  79. data/dist/menu.yml +0 -6
  80. data/dist/playbook-doc.js +1 -1
  81. data/dist/playbook-rails-react-bindings.js +1 -1
  82. data/dist/playbook-rails.js +1 -1
  83. data/dist/playbook.css +1 -1
  84. data/lib/playbook/version.rb +2 -2
  85. metadata +7 -38
  86. data/app/pb_kits/playbook/pb_advanced_table/Utilities/ActionBarAnimationHelper.ts +0 -26
  87. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header.jsx +0 -55
  88. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_react.md +0 -3
  89. data/app/pb_kits/playbook/pb_copy_button/_copy_button.scss +0 -4
  90. data/app/pb_kits/playbook/pb_copy_button/_copy_button.tsx +0 -92
  91. data/app/pb_kits/playbook/pb_copy_button/copy_button.html.erb +0 -15
  92. data/app/pb_kits/playbook/pb_copy_button/copy_button.rb +0 -28
  93. data/app/pb_kits/playbook/pb_copy_button/copy_button.test.jsx +0 -64
  94. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_default.html.erb +0 -2
  95. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_default.jsx +0 -21
  96. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.html.erb +0 -5
  97. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.jsx +0 -45
  98. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.md +0 -1
  99. data/app/pb_kits/playbook/pb_copy_button/docs/example.yml +0 -8
  100. data/app/pb_kits/playbook/pb_copy_button/docs/index.js +0 -2
  101. data/app/pb_kits/playbook/pb_copy_button/index.js +0 -47
  102. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers_rails.html.erb +0 -99
  103. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers_rails.md +0 -1
  104. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table.html.erb +0 -61
  105. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table.md +0 -1
  106. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_auto_close.html.erb +0 -58
  107. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_auto_close_rails.md +0 -3
  108. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting.html.erb +0 -11
  109. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting.jsx +0 -22
  110. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting_rails.md +0 -1
  111. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting_react.md +0 -1
  112. data/app/pb_kits/playbook/pb_link/docs/_link_target.html.erb +0 -15
  113. data/app/pb_kits/playbook/pb_link/docs/_link_target.jsx +0 -29
  114. data/app/pb_kits/playbook/pb_user/docs/_user_light_weight.html.erb +0 -42
  115. data/app/pb_kits/playbook/pb_user/docs/_user_light_weight.jsx +0 -59
  116. data/app/pb_kits/playbook/pb_user/docs/_user_light_weight.md +0 -2
  117. data/dist/chunks/_typeahead-DQTwAd_2.js +0 -36
  118. data/dist/chunks/_weekday_stacked-CnPEqV7l.js +0 -45
  119. /data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/{_fixed_confirmation_toast_auto_close_react.md → _fixed_confirmation_toast_auto_close.md} +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eaae4c0710eed5f130a25be20f2b53abeb9c0e8411e98a2fea634d1d36ab4441
4
- data.tar.gz: fcd82b79aec1f5f402e1818c53d747e91e488ec3ee7b41cb35708ccf7a6a82de
3
+ metadata.gz: fcf251161270426f1872fe6a3344fa2b30027ebf0e8de2438a1425b76227a846
4
+ data.tar.gz: 7c0f7ef946114d87099cdf24562e8731f1686498dcef593092d0fd8a7c9f4091
5
5
  SHA512:
6
- metadata.gz: f1b38fee7ad7e12b3d352caf206eb0bfa06d70f61b4822c87065910e4afa8aa0b449d34057115af2ad36fb49041f95ed5e4fc929078ac0f65f696e51076e6fc2
7
- data.tar.gz: 8c92d4019299e686dbeb55e880f75907ceca98eb5e285ab441e29a9984de5528f46dd0b525c61e580ed3e9605b085017a1be8aedc198800e4004fa76f3b1d133
6
+ metadata.gz: f1d66fe512c67ece02687f200a99c4daf2fd581b83e45857bac0214a6ea62160eee6f9152833b35ee6a9b618a212f360e721604ebfc913fdfb5871c4464e24ae
7
+ data.tar.gz: fd937db687917267ff67e23f04344d63dda613ee7c56c17870892c8a2894f2a9d5c2c06916a607711c9d70dbd028acad003480d9585c4ab05f6481b7b96b1ff6
@@ -15,7 +15,6 @@
15
15
  @import 'pb_circle_chart/circle_chart';
16
16
  @import 'pb_circle_icon_button/circle_icon_button';
17
17
  @import 'pb_collapsible/collapsible';
18
- @import 'pb_copy_button/copy_button';
19
18
  @import 'pb_contact/contact';
20
19
  @import 'pb_currency/currency';
21
20
  @import 'pb_dashboard_value/dashboard_value';
@@ -47,7 +47,7 @@ export const CustomCell = ({
47
47
  <Flex
48
48
  alignItems="center"
49
49
  columnGap="xs"
50
- justify={!hasAnySubRows && !inlineRowLoading ? "end" : "start"}
50
+ justify={!hasAnySubRows ? "end" : "start"}
51
51
  orientation="row"
52
52
  >
53
53
  {
@@ -39,15 +39,8 @@ export const TableHeaderCell = ({
39
39
  sortIcon,
40
40
  table
41
41
  }: TableHeaderCellProps) => {
42
- const {
43
- sortControl,
44
- responsive,
45
- selectableRows,
46
- hasAnySubRows,
47
- showActionsBar,
48
- inlineRowLoading,
49
- isActionBarVisible,
50
- } = useContext(AdvancedTableContext);
42
+ const { sortControl, responsive, selectableRows, hasAnySubRows, showActionsBar } =
43
+ useContext(AdvancedTableContext);
51
44
 
52
45
  type justifyTypes = "none" | "center" | "start" | "end" | "between" | "around" | "evenly"
53
46
 
@@ -72,7 +65,7 @@ export const TableHeaderCell = ({
72
65
 
73
66
  const cellClassName = classnames(
74
67
  "table-header-cells",
75
- `${showActionsBar && isActionBarVisible && "header-cells-with-actions"}`,
68
+ `${showActionsBar && "header-cells-with-actions"}`,
76
69
  `${isChrome() ? "chrome-styles" : ""}`,
77
70
  `${enableSorting ? "table-header-cells-active" : ""}`,
78
71
  { "pinned-left": responsive === "scroll" && isPinnedLeft },
@@ -98,7 +91,7 @@ const isToggleExpansionEnabled =
98
91
 
99
92
  let justifyHeader:justifyTypes;
100
93
 
101
- if (header?.index === 0 && hasAnySubRows || (header?.index === 0 && inlineRowLoading)) {
94
+ if (header?.index === 0 && hasAnySubRows) {
102
95
  justifyHeader = enableSorting ? "between" : "start";
103
96
  } else {
104
97
  justifyHeader = isLeafColumn ? "end" : "center";
@@ -31,12 +31,12 @@
31
31
  width: 100%;
32
32
  }
33
33
 
34
- .row-selection-actions-card {
35
- border-bottom-right-radius: 0px !important;
36
- border-bottom-left-radius: 0px !important;
37
- border-bottom-color: transparent;
38
- transition: height 300ms ease;
39
- }
34
+ .row-selection-actions-card {
35
+ border-bottom-right-radius: 0px !important;
36
+ border-bottom-left-radius: 0px !important;
37
+ border-bottom-color: transparent;
38
+ }
39
+
40
40
  .table-header-cells:first-child {
41
41
  min-width: 180px;
42
42
  }
@@ -89,47 +89,11 @@
89
89
  }
90
90
  }
91
91
 
92
+
92
93
  .table-header-cells-active:first-child {
93
94
  color: $primary !important;
94
95
  }
95
96
 
96
- // Sticky Header
97
- .sticky-header {
98
- thead {
99
- z-index: 3 !important;
100
- }
101
- }
102
-
103
- // Max height overflow - the below prevents expansion from overflowing container at full screen for responsive and nonresponsive tables
104
- &.advanced-table-max-height-xs {
105
- max-height: 320px;
106
- overflow-y: auto;
107
- }
108
- &.advanced-table-max-height-sm {
109
- max-height: 480px;
110
- overflow-y: auto;
111
- }
112
- &.advanced-table-max-height-md {
113
- max-height: 768px;
114
- overflow-y: auto;
115
- }
116
- &.advanced-table-max-height-lg {
117
- max-height: 1024px;
118
- overflow-y: auto;
119
- }
120
- &.advanced-table-max-height-xl {
121
- max-height: 1280px;
122
- overflow-y: auto;
123
- }
124
- &.advanced-table-max-height-xxl {
125
- max-height: 1440px;
126
- overflow-y: auto;
127
- }
128
- &.advanced-table-max-height-xxxl {
129
- max-height: 1920px;
130
- overflow-y: auto;
131
- }
132
-
133
97
  // Icons
134
98
  .button-icon {
135
99
  display: flex;
@@ -215,7 +179,7 @@
215
179
  }
216
180
 
217
181
  // Responsive Styles
218
- @media only screen and (max-width: $screen-xl-min) {
182
+ @media only screen and (max-width: $screen-xl-min) {
219
183
  &[class*="advanced-table-responsive-scroll"] {
220
184
  border-radius: 4px;
221
185
  box-shadow: 1px 0 0 0px $border_light,
@@ -251,24 +215,7 @@
251
215
  .bg-white td:first-child {
252
216
  background-color: $white;
253
217
  }
254
- .row-selection-actions-card {
255
- border-right-width: 0px;
256
- border-left-width: 0px;
257
- position: sticky;
258
- top: 0;
259
- left: 0;
260
- border-radius: unset;
261
- }
262
- .checkbox-cell {
263
- display: table-cell !important;
264
- }
265
- .sticky-header {
266
- thead {
267
- th:first-child {
268
- box-shadow: 1px 0 10px -2px $border_light !important;
269
- }
270
- }
271
- }
218
+
272
219
  }
273
220
  }
274
221
  @media only screen and (min-width: $screen-xl-min) {
@@ -356,15 +303,7 @@
356
303
  .bg-white td:first-child {
357
304
  background-color: $bg_dark_card;
358
305
  }
359
- .sticky-header {
360
- thead {
361
- th:first-child {
362
- background: $bg_dark;
363
- box-shadow: 1px 0 10px -2px $border_dark !important;
364
- }
365
- }
366
- }
367
306
  }
368
307
  }
369
308
  }
370
- }
309
+ }
@@ -1,4 +1,4 @@
1
- import React, { useState, useEffect, useCallback, useRef } from "react"
1
+ import React, { useState, useEffect, useCallback } from "react"
2
2
  import classnames from "classnames"
3
3
 
4
4
  import { GenericObject } from "../types"
@@ -27,7 +27,6 @@ import FlexItem from "../pb_flex/_flex_item"
27
27
  import AdvancedTableContext from "./Context/AdvancedTableContext"
28
28
 
29
29
  import { updateExpandAndCollapseState } from "./Utilities/ExpansionControlHelpers"
30
- import { showActionBar, hideActionBar } from "./Utilities/ActionBarAnimationHelper"
31
30
 
32
31
  import { CustomCell } from "./Components/CustomCell"
33
32
  import { TableHeader } from "./SubKits/TableHeader"
@@ -49,7 +48,6 @@ type AdvancedTableProps = {
49
48
  initialLoadingRowsCount?: number
50
49
  inlineRowLoading?: boolean
51
50
  loading?: boolean | string
52
- maxHeight?: "auto" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl"
53
51
  onRowToggleClick?: (arg: Row<GenericObject>) => void
54
52
  onToggleExpansionClick?: (arg: Row<GenericObject>) => void
55
53
  pagination?: boolean,
@@ -81,7 +79,6 @@ const AdvancedTable = (props: AdvancedTableProps) => {
81
79
  initialLoadingRowsCount = 10,
82
80
  inlineRowLoading = false,
83
81
  loading,
84
- maxHeight,
85
82
  onRowToggleClick,
86
83
  onToggleExpansionClick,
87
84
  pagination = false,
@@ -291,7 +288,6 @@ const AdvancedTable = (props: AdvancedTableProps) => {
291
288
  const classes = classnames(
292
289
  buildCss("pb_advanced_table"),
293
290
  `advanced-table-responsive-${responsive}`,
294
- maxHeight ? `advanced-table-max-height-${maxHeight}` : '', // max height as kit prop not global prop to control overflow-y
295
291
  globalProps(props),
296
292
  className
297
293
  )
@@ -299,20 +295,6 @@ const AdvancedTable = (props: AdvancedTableProps) => {
299
295
  const onPageChange = (page: number) => {
300
296
  table.setPageIndex(page - 1)
301
297
  }
302
- //When to show the actions bar as a whole
303
- const isActionBarVisible = selectableRows && showActionsBar && selectedRowsLength > 0
304
-
305
- //Ref and useEffect for animating the actions bar
306
- const cardRef = useRef(null);
307
- useEffect(() => {
308
- if (cardRef.current) {
309
- if (isActionBarVisible) {
310
- showActionBar(cardRef.current);
311
- } else {
312
- hideActionBar(cardRef.current);
313
- }
314
- }
315
- }, [isActionBarVisible]);
316
298
 
317
299
  return (
318
300
  <div {...ariaProps}
@@ -329,7 +311,6 @@ const AdvancedTable = (props: AdvancedTableProps) => {
329
311
  expandedControl,
330
312
  handleExpandOrCollapse,
331
313
  inlineRowLoading,
332
- isActionBarVisible,
333
314
  loading,
334
315
  responsive,
335
316
  setExpanded,
@@ -352,24 +333,27 @@ const AdvancedTable = (props: AdvancedTableProps) => {
352
333
  total={table.getPageCount()}
353
334
  />
354
335
  }
355
- <Card
356
- borderNone={!isActionBarVisible}
357
- className={`${isActionBarVisible && "show-action-card row-selection-actions-card"}`}
358
- htmlOptions={{ ref: cardRef as any }}
359
- padding={`${isActionBarVisible ? "xs" : "none"}`}
360
- >
361
- <Flex alignItems="center"
362
- justify="between"
363
- >
364
- <Caption color="light"
365
- paddingLeft="xs"
366
- size="xs"
336
+ {
337
+ selectableRows && showActionsBar && (
338
+ <Card className="row-selection-actions-card"
339
+ padding="xs"
367
340
  >
368
- {selectedRowsLength} Selected
369
- </Caption>
370
- <FlexItem>{actions}</FlexItem>
371
- </Flex>
372
- </Card>
341
+ <Flex alignItems="center"
342
+ justify="between"
343
+ >
344
+ <Caption color="light"
345
+ paddingLeft="xs"
346
+ size="xs"
347
+ >
348
+ {selectedRowsLength} Selected
349
+ </Caption>
350
+ <FlexItem>
351
+ {actions}
352
+ </FlexItem>
353
+ </Flex>
354
+ </Card>
355
+ )
356
+ }
373
357
  <Table
374
358
  className={`${loading ? "content-loading" : ""}`}
375
359
  dark={dark}
@@ -44,7 +44,6 @@ const AdvancedTableTableProps = (props) => {
44
44
  <div>
45
45
  <AdvancedTable
46
46
  columnDefinitions={columnDefinitions}
47
- responsive="none"
48
47
  tableData={MOCK_DATA}
49
48
  tableProps={tableProps}
50
49
  {...props}
@@ -1,3 +1 @@
1
- This kit uses the [Table kit](https://playbook.powerapp.cloud/kits/table/react) under the hood which comes with it's own set of props. If you want to apply certain Table props to that underlying kit, you can do so by using the optional `tableProps` prop. This prop must be an object that contains valid Table props. For a full list of Table props, see [here](https://playbook.powerapp.cloud/kits/table/react).
2
-
3
- This doc example showcases how to set a sticky header for a nonresponsive table. To achieve sticky header AND responsive functionality, see the ["Table Props Sticky Header"](https://playbook.powerapp.cloud/kits/advanced_table/react#table-props-sticky-header) doc example below.
1
+ This kit uses the [Table kit](https://playbook.powerapp.cloud/kits/table/react) under the hood which comes with it's own set of props. If you want to apply certain Table props to that underlying kit, you can do so by using the optional `tableProps` prop. This prop must be an object that contains valid Table props. For a full list of Table props, see [here](https://playbook.powerapp.cloud/kits/table/react).
@@ -22,7 +22,6 @@ examples:
22
22
  - advanced_table_collapsible_trail: Collapsible Trail
23
23
  - advanced_table_table_options: Table Options
24
24
  - advanced_table_table_props: Table Props
25
- - advanced_table_table_props_sticky_header: Table Props Sticky Header
26
25
  - advanced_table_inline_row_loading: Inline Row Loading
27
26
  - advanced_table_responsive: Responsive Tables
28
27
  - advanced_table_custom_cell: Custom Components for Cells
@@ -18,5 +18,4 @@ export { default as AdvancedTableSelectableRows } from './_advanced_table_select
18
18
  export { default as AdvancedTableSelectableRowsNoSubrows } from './_advanced_table_selectable_rows_no_subrows.jsx'
19
19
  export { default as AdvancedTableNoSubrows } from './_advanced_table_no_subrows.jsx'
20
20
  export { default as AdvancedTableSelectableRowsHeader } from './_advanced_table_selectable_rows_header.jsx'
21
- export { default as AdvancedTableSelectableRowsActions } from './_advanced_table_selectable_rows_actions.jsx'
22
- export { default as AdvancedTableTablePropsStickyHeader } from './_advanced_table_table_props_sticky_header.jsx'
21
+ export { default as AdvancedTableSelectableRowsActions } from './_advanced_table_selectable_rows_actions.jsx'
@@ -133,18 +133,15 @@ export default class PbAdvancedTable extends PbEnhancedElement {
133
133
  if (!elements.length) return;
134
134
 
135
135
  const isVisible = elements[0].classList.contains("is-visible");
136
-
137
- isVisible ? this.hideElement(elements) : this.showElement(elements);
138
- isVisible ? this.displayDownArrow() : this.displayUpArrow();
139
-
140
- const row = this.element.closest("tr");
141
- if (row) {
142
- row.classList.toggle("bg-silver", !isVisible);
143
- row.classList.toggle("bg-white", isVisible);
136
+ if (isVisible) {
137
+ this.hideElement(elements);
138
+ this.displayDownArrow();
139
+ } else {
140
+ this.showElement(elements);
141
+ this.displayUpArrow();
144
142
  }
145
143
  }
146
144
 
147
-
148
145
  displayDownArrow() {
149
146
  this.element.querySelector(DOWN_ARROW_SELECTOR).style.display =
150
147
  "inline-block";
@@ -14,13 +14,10 @@
14
14
  <div style="padding-left: <%= depth * 1.25 %>em">
15
15
  <%= pb_rails("flex", props:{align: "center", column_gap: "xs"}) do %>
16
16
  <% if index.zero? && object.row[:children].present? %>
17
- <button
18
- id="<%= "#{object.id}_#{object.row.object_id}" %>"
19
- class="gray-icon expand-toggle-icon"
20
- data-advanced-table="true">
21
- <%= pb_rails("icon", props: { id: "advanced-table_open_icon", icon: "circle-play", cursor: "pointer" }) %>
22
- <%= pb_rails("icon", props: { id: "advanced-table_close_icon", display: "none", icon: "circle-play", cursor: "pointer", rotation: 90 }) %>
23
- </button>
17
+ <button id="<%= "#{object.id}_#{object.row.object_id}" %>" class="gray-icon expand-toggle-icon" data-advanced-table="true" >
18
+ <%= pb_rails("icon", props: { id: "advanced-table_open_icon", icon: "circle-play", cursor: "pointer" }) %>
19
+ <%= pb_rails("icon", props: { id: "advanced-table_close_icon", display: "none", icon: "circle-play", cursor: "pointer", rotation: 90 }) %>
20
+ </button>
24
21
  <% end %>
25
22
  <%= pb_rails("flex/flex_item", props:{padding_left: index.zero? && object.row[:children].present? ? "none" : "xs"}) do %>
26
23
  <% if column[:custom_renderer].present? %>
@@ -45,4 +42,4 @@
45
42
  <% end %>
46
43
  <% end %>
47
44
  <% end %>
48
- <% end %>
45
+ <% end %>
@@ -27,9 +27,6 @@ $avatar-sizes: (
27
27
  flex-basis: $size;
28
28
 
29
29
  & > [class^=pb_flex_kit] {
30
- [class^=pb_card_kit] {
31
- padding: 2px;
32
- }
33
30
  [class^=pb_card_kit].overlay_bottom_center,
34
31
  [class^=pb_card_kit].overlay_top_center {
35
32
  left: 50%;
@@ -55,10 +52,6 @@ $avatar-sizes: (
55
52
  flex-grow: 0;
56
53
  flex-basis: $size;
57
54
 
58
- .dark & {
59
- background: $text_dk_light;
60
- }
61
-
62
55
  &::before {
63
56
  content: attr(data-initials);
64
57
  width: 100%;
@@ -85,11 +78,9 @@ $avatar-sizes: (
85
78
  }
86
79
  }
87
80
  }
88
-
89
81
  &.dark {
90
82
  [class^=pb_card_kit] {
91
83
  position: absolute;
92
- padding: 2px;
93
84
  }
94
85
  }
95
86
  }
@@ -23,8 +23,8 @@ export type AvatarProps = {
23
23
  variant?: string,
24
24
  icon?: string
25
25
  },
26
- dark?: boolean,
27
26
  data?: {[key: string]: string},
27
+ dark?: boolean,
28
28
  htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
29
29
  id?: string,
30
30
  imageAlt?: string,
@@ -71,13 +71,13 @@ const Avatar = (props: AvatarProps): React.ReactElement => {
71
71
 
72
72
  const canShowImage = imageUrl && !error
73
73
 
74
- const onlineStatusSize =
74
+ const onlineStatusSize =
75
75
  ['xxs', 'xs'].includes(size) ? 'sm' :
76
76
  ['sm', 'md'].includes(size) ? 'md' :
77
77
  ['lg', 'xl'].includes(size) ? 'lg' :
78
78
  'sm';
79
79
 
80
- const onlineStatusPositionProps = (["xxs", "xs", "sm"].includes(size)) ?
80
+ const onlineStatusPositionProps = (["xxs", "xs", "sm"].includes(size)) ?
81
81
  {
82
82
  top: { inset: true, value: "0" },
83
83
  right: { inset: false, value: "xxs" }
@@ -96,10 +96,10 @@ const Avatar = (props: AvatarProps): React.ReactElement => {
96
96
  id={id}
97
97
  >
98
98
  {componentOverlay ? (
99
- <Flex display="display_inline_block"
99
+ <Flex display="display_inline_block"
100
100
  position="relative"
101
101
  >
102
- <div className="avatar_wrapper"
102
+ <div className="avatar_wrapper"
103
103
  data-initials={initials}
104
104
  >
105
105
  {canShowImage && (
@@ -115,14 +115,12 @@ const Avatar = (props: AvatarProps): React.ReactElement => {
115
115
  <Card
116
116
  borderNone
117
117
  borderRadius="rounded"
118
- dark={dark}
119
118
  padding="none"
120
119
  position="absolute"
121
120
  {...getPlacementProps(componentOverlay.placement, size)}
122
121
  >
123
-
122
+
124
123
  <Badge
125
- dark={dark}
126
124
  rounded
127
125
  text={componentOverlay.text}
128
126
  variant={componentOverlay.variant as "error" | "info" | "neutral" | "primary" | "success" | "warning" | "notification"}
@@ -133,13 +131,11 @@ const Avatar = (props: AvatarProps): React.ReactElement => {
133
131
  <Card
134
132
  borderNone
135
133
  borderRadius="rounded"
136
- dark={dark}
137
134
  htmlOptions={{style: {padding:"2px"}}}
138
135
  position="absolute"
139
136
  {...getPlacementProps(componentOverlay.placement, size)}
140
137
  >
141
138
  <IconCircle
142
- dark={dark}
143
139
  icon={componentOverlay.icon}
144
140
  size="xxs"
145
141
  variant={componentOverlay.variant as "default" | "royal" | "blue" | "purple" | "teal" | "red" | "yellow" | "orange" | "green"}
@@ -149,7 +145,7 @@ const Avatar = (props: AvatarProps): React.ReactElement => {
149
145
  </Flex>
150
146
  ) : (
151
147
  <>
152
- <div className="avatar_wrapper"
148
+ <div className="avatar_wrapper"
153
149
  data-initials={initials}
154
150
  >
155
151
  {canShowImage && (
@@ -1,22 +1,22 @@
1
1
 
2
2
  <%= object.pb_content_tag(:div, data: object.data.merge(initials: object.initials)) do %>
3
3
  <% if object.component_overlay && object.component_overlay[:component] == "icon_circle" %>
4
- <%= pb_rails("flex", props: { display: "display_inline_block", position: "relative" }) do %>
4
+ <%= pb_rails("flex", props: {display: "display_inline_block", position: "relative" }) do %>
5
5
  <%= content_tag(:div, data: { initials: object.initials }, class: "avatar_wrapper") do %>
6
6
  <%= pb_rails("image", props: { alt: object.alt_text, url: object.image_url, on_error: object.handle_img_error }) if object.image_url.present? %>
7
7
  <% end %>
8
- <%= pb_rails("card", props: { border_none: true, border_radius: "rounded", dark: object.dark, position: "absolute" }.merge(specific_placement_style)) do %>
8
+ <%= pb_rails("card", props: { border_none: true, border_radius: "rounded", html_options: { style: "padding: 2px" }, position: "absolute" }.merge(specific_placement_style)) do %>
9
9
 
10
- <%= pb_rails("icon_circle", props: { dark: object.dark, size: "xxs", icon: object.component_overlay[:icon], variant: object.component_overlay[:variant] }) %>
10
+ <%= pb_rails("icon_circle", props: { size: "xxs", icon: object.component_overlay[:icon], variant: object.component_overlay[:variant] }) %>
11
11
  <% end %>
12
12
  <% end %>
13
13
  <% elsif object.component_overlay && object.component_overlay[:component] == "badge" %>
14
- <%= pb_rails("flex", props: { display: "display_inline_block", position: "relative" }) do %>
14
+ <%= pb_rails("flex", props: {display: "display_inline_block", position: "relative" }) do %>
15
15
  <%= content_tag(:div, data: { initials: object.initials }, class: "avatar_wrapper") do %>
16
16
  <%= pb_rails("image", props: { alt: object.alt_text, url: object.image_url, on_error: object.handle_img_error }) if object.image_url.present? %>
17
17
  <% end %>
18
- <%= pb_rails("card", props: { border_none: true, border_radius: "rounded", dark: object.dark, padding: "none", position: "absolute" }.merge(specific_placement_style)) do %>
19
- <%= pb_rails("badge", props: { dark: object.dark, rounded: true, text: object.component_overlay[:text], variant: object.component_overlay[:variant] }) %>
18
+ <%= pb_rails("card", props: { border_none: true, border_radius: "rounded", padding: "none", position: "absolute" }.merge(specific_placement_style)) do %>
19
+ <%= pb_rails("badge", props: { rounded: true, text: object.component_overlay[:text], variant: object.component_overlay[:variant] }) %>
20
20
  <% end %>
21
21
  <% end %>
22
22
  <% else %>
@@ -26,3 +26,4 @@
26
26
  <%= pb_rails("online_status", props: object.online_status_props) if object.status %>
27
27
  <% end %>
28
28
  <% end %>
29
+
@@ -1,19 +1,18 @@
1
1
  import React from "react";
2
2
  import { Avatar } from 'playbook-ui'
3
3
 
4
- const AvatarBadgeComponentOverlay = (props) => {
4
+ const AvatarBadgeComponentOverlay = () => {
5
5
  return (
6
6
  <div>
7
7
  <Avatar
8
8
  componentOverlay={{
9
9
  component: "badge",
10
10
  placement: "bottom-right",
11
- text: "12",
11
+ text: "12"
12
12
  }}
13
13
  imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
14
14
  marginBottom="sm"
15
15
  size="sm"
16
- {...props}
17
16
  />
18
17
 
19
18
  <Avatar
@@ -25,8 +24,6 @@ const AvatarBadgeComponentOverlay = (props) => {
25
24
  imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
26
25
  marginBottom="sm"
27
26
  size="md"
28
- {...props}
29
-
30
27
  />
31
28
 
32
29
  <Avatar
@@ -39,8 +36,6 @@ const AvatarBadgeComponentOverlay = (props) => {
39
36
  imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
40
37
  marginBottom="sm"
41
38
  size="lg"
42
- {...props}
43
-
44
39
  />
45
40
 
46
41
  <Avatar
@@ -53,8 +48,7 @@ const AvatarBadgeComponentOverlay = (props) => {
53
48
  imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
54
49
  marginBottom="sm"
55
50
  size="xl"
56
- {...props}
57
- />
51
+ />
58
52
  </div>
59
53
  )
60
54
  }
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import { Avatar } from 'playbook-ui'
3
3
 
4
- const AvatarCircleIconComponentOverlay = (props) => {
4
+ const AvatarCircleIconComponentOverlay = () => {
5
5
  return (
6
6
  <div>
7
7
  <Avatar
@@ -14,7 +14,6 @@ const AvatarCircleIconComponentOverlay = (props) => {
14
14
  imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
15
15
  marginBottom="sm"
16
16
  size="sm"
17
- {...props}
18
17
  />
19
18
 
20
19
  <Avatar
@@ -27,7 +26,6 @@ const AvatarCircleIconComponentOverlay = (props) => {
27
26
  imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
28
27
  marginBottom="sm"
29
28
  size="md"
30
- {...props}
31
29
  />
32
30
 
33
31
  <Avatar
@@ -40,7 +38,6 @@ const AvatarCircleIconComponentOverlay = (props) => {
40
38
  imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
41
39
  marginBottom="sm"
42
40
  size="lg"
43
- {...props}
44
41
  />
45
42
 
46
43
  <Avatar
@@ -53,8 +50,7 @@ const AvatarCircleIconComponentOverlay = (props) => {
53
50
  imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
54
51
  marginBottom="sm"
55
52
  size="xl"
56
- {...props}
57
- />
53
+ />
58
54
  </div>
59
55
  )
60
56
  }
@@ -65,7 +65,7 @@ module Playbook
65
65
  end
66
66
 
67
67
  def tag
68
- link && !disabled ? "a" : "button"
68
+ link ? "a" : "button"
69
69
  end
70
70
 
71
71
  def valid_emoji(icon)