playbook_ui 14.16.0.pre.alpha.play1957inlinedatepickericonbugfix6872 → 14.16.0.pre.alpha.play1958formgrouperrorborder6922
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.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +86 -84
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination.jsx +0 -1
- data/app/pb_kits/playbook/pb_button/_button.scss +5 -5
- data/app/pb_kits/playbook/pb_filter/Filter/CurrentFilters.tsx +3 -4
- data/app/pb_kits/playbook/pb_filter/Filter/SortMenu.tsx +2 -3
- data/app/pb_kits/playbook/pb_form/pb_form_validation.js +1 -1
- data/app/pb_kits/playbook/pb_form_group/_form_group.scss +5 -0
- data/app/pb_kits/playbook/pb_lightbox/hooks/useVisibility.js +1 -1
- data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +2 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.tsx +29 -11
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_default.html.erb +1 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor.html.erb +4 -4
- data/app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor.rb +2 -0
- data/app/pb_kits/playbook/pb_table/_table.tsx +4 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless.jsx +50 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless_react.md +1 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating.jsx +59 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating_react.md +1 -0
- data/app/pb_kits/playbook/pb_table/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_table/docs/index.js +2 -0
- data/app/pb_kits/playbook/pb_table/styles/_headers.scss +76 -0
- data/app/pb_kits/playbook/pb_table/subcomponents/_table_head.tsx +11 -1
- data/app/pb_kits/playbook/pb_table/subcomponents/_table_header.tsx +11 -1
- data/app/pb_kits/playbook/pb_table/subcomponents/_table_row.tsx +5 -0
- data/app/pb_kits/playbook/pb_table/table.test.js +17 -0
- data/app/pb_kits/playbook/pb_tooltip/index.js +183 -56
- data/app/pb_kits/playbook/pb_typeahead/index.ts +2 -2
- data/app/pb_kits/playbook/utilities/globalProps.ts +1 -1
- data/app/pb_kits/playbook/utilities/object.test.js +149 -1
- data/app/pb_kits/playbook/utilities/object.ts +124 -42
- data/dist/chunks/_typeahead-Djo6qCne.js +22 -0
- data/dist/chunks/_weekday_stacked-DIIHW0OV.js +45 -0
- data/dist/chunks/lib-BGzBzFZX.js +29 -0
- data/dist/chunks/{pb_form_validation-EUv1tqtI.js → pb_form_validation-BvNy9Bd6.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- data/dist/playbook-doc.js +1 -1
- data/dist/playbook-rails-react-bindings.js +1 -1
- data/dist/playbook-rails.js +1 -1
- data/dist/playbook.css +1 -1
- data/lib/playbook/version.rb +1 -1
- metadata +10 -7
- data/app/pb_kits/playbook/pb_tooltip/floating_ui.js +0 -282
- data/dist/chunks/_typeahead-BniHPQq8.js +0 -22
- data/dist/chunks/_weekday_stacked-CuaFaMk8.js +0 -45
- data/dist/chunks/lib-UIelzz2O.js +0 -29
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4b47c802a9bb1f70a4794412e6b2fe30f91231e2da558d259747e21a219c5c87
|
4
|
+
data.tar.gz: 8e8fdf9336266e58cfb9690a8463047522bfc2d0d97e2dac03ab50f398abce60
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 073ada67d971bf4666d2aaf56cc0a578fb34489efe0f6e7e42a6b542b6ce9f89c64fef64f0d488371f0a4e57b23dfcf2cbbbe608f24ec9264471c3508508167c
|
7
|
+
data.tar.gz: 4f37c81d357b9816ba68af52530c658be85a06f2fa84077297963311ff2045614baae55d66cb54587f4d55da3eb4ea5e5356d37ddca0b1f67db1057497399b18
|
@@ -167,93 +167,95 @@ const AdvancedTable = (props: AdvancedTableProps) => {
|
|
167
167
|
const isActionBarVisible = selectableRows && showActionsBar && selectedRowsLength > 0;
|
168
168
|
|
169
169
|
return (
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
loading={loading}
|
197
|
-
responsive={responsive}
|
198
|
-
selectableRows={selectableRows}
|
199
|
-
setExpanded={setExpanded}
|
200
|
-
showActionsBar={showActionsBar}
|
201
|
-
sortControl={sortControl}
|
202
|
-
subRowHeaders={tableOptions?.subRowHeaders}
|
203
|
-
table={table}
|
204
|
-
tableContainerRef={tableWrapperRef}
|
205
|
-
toggleExpansionIcon={toggleExpansionIcon}
|
206
|
-
virtualizedRows={virtualizedRows}
|
170
|
+
<>
|
171
|
+
{/* Top Pagination */}
|
172
|
+
{pagination && (
|
173
|
+
<TablePagination
|
174
|
+
onChange={onPageChange}
|
175
|
+
position="top"
|
176
|
+
range={paginationProps?.range}
|
177
|
+
table={table}
|
178
|
+
/>
|
179
|
+
)}
|
180
|
+
|
181
|
+
<div
|
182
|
+
{...ariaProps}
|
183
|
+
{...dataProps}
|
184
|
+
{...htmlProps}
|
185
|
+
className={classes}
|
186
|
+
id={id}
|
187
|
+
onScroll={virtualizedRows ? e => fetchMoreOnBottomReached(
|
188
|
+
e.currentTarget,
|
189
|
+
fetchNextPage,
|
190
|
+
isFetching,
|
191
|
+
totalFetched,
|
192
|
+
fullData.length
|
193
|
+
) : undefined}
|
194
|
+
ref={tableWrapperRef}
|
195
|
+
style={tableWrapperStyle as React.CSSProperties}
|
207
196
|
>
|
208
|
-
<
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
197
|
+
<AdvancedTableProvider
|
198
|
+
columnDefinitions={columnDefinitions}
|
199
|
+
enableToggleExpansion={enableToggleExpansion}
|
200
|
+
enableVirtualization={virtualizedRows}
|
201
|
+
expanded={expanded}
|
202
|
+
expandedControl={expandedControl}
|
203
|
+
handleExpandOrCollapse={handleExpandOrCollapse}
|
204
|
+
hasAnySubRows={hasAnySubRows}
|
205
|
+
inlineRowLoading={inlineRowLoading}
|
206
|
+
isActionBarVisible={isActionBarVisible}
|
207
|
+
loading={loading}
|
208
|
+
responsive={responsive}
|
209
|
+
selectableRows={selectableRows}
|
210
|
+
setExpanded={setExpanded}
|
211
|
+
showActionsBar={showActionsBar}
|
212
|
+
sortControl={sortControl}
|
213
|
+
subRowHeaders={tableOptions?.subRowHeaders}
|
214
|
+
table={table}
|
215
|
+
tableContainerRef={tableWrapperRef}
|
216
|
+
toggleExpansionIcon={toggleExpansionIcon}
|
217
|
+
virtualizedRows={virtualizedRows}
|
218
|
+
>
|
219
|
+
<React.Fragment>
|
220
|
+
{/* Selection Action Bar */}
|
221
|
+
<TableActionBar
|
222
|
+
actions={actions}
|
223
|
+
isVisible={isActionBarVisible}
|
224
|
+
selectedCount={selectedRowsLength}
|
216
225
|
/>
|
217
|
-
)}
|
218
|
-
|
219
|
-
{/* Selection Action Bar */}
|
220
|
-
<TableActionBar
|
221
|
-
actions={actions}
|
222
|
-
isVisible={isActionBarVisible}
|
223
|
-
selectedCount={selectedRowsLength}
|
224
|
-
/>
|
225
226
|
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
227
|
+
{/* Main Table */}
|
228
|
+
<Table
|
229
|
+
className={`${loading ? "content-loading" : ""}`}
|
230
|
+
dark={dark}
|
231
|
+
dataTable
|
232
|
+
numberSpacing="tabular"
|
233
|
+
responsive="none"
|
234
|
+
{...tableProps}
|
235
|
+
>
|
236
|
+
{children ? (
|
237
|
+
children
|
238
|
+
) : (
|
239
|
+
<>
|
240
|
+
<TableHeader />
|
241
|
+
<TableBody />
|
242
|
+
</>
|
243
|
+
)}
|
244
|
+
</Table>
|
245
|
+
</React.Fragment>
|
246
|
+
</AdvancedTableProvider>
|
247
|
+
|
248
|
+
</div>
|
249
|
+
{/* Bottom Pagination */}
|
250
|
+
{pagination && (
|
251
|
+
<TablePagination
|
252
|
+
onChange={onPageChange}
|
253
|
+
position="bottom"
|
254
|
+
range={paginationProps?.range}
|
255
|
+
table={table}
|
256
|
+
/>
|
257
|
+
)}
|
258
|
+
</>
|
257
259
|
);
|
258
260
|
};
|
259
261
|
|
@@ -63,11 +63,6 @@ $pb_button_sizes: (
|
|
63
63
|
color: $text_lt_lighter;
|
64
64
|
}
|
65
65
|
|
66
|
-
// Disabled =================
|
67
|
-
&[class*=_disabled] {
|
68
|
-
@include pb_button_disabled;
|
69
|
-
}
|
70
|
-
|
71
66
|
// Block ====================
|
72
67
|
&[class*=_block] {
|
73
68
|
@include pb_button_block;
|
@@ -83,6 +78,11 @@ $pb_button_sizes: (
|
|
83
78
|
@include pb_button_danger;
|
84
79
|
}
|
85
80
|
|
81
|
+
// Disabled =================
|
82
|
+
&[class*=_disabled] {
|
83
|
+
@include pb_button_disabled;
|
84
|
+
}
|
85
|
+
|
86
86
|
// Dark Variants =============
|
87
87
|
&.dark {
|
88
88
|
&[class*=_primary] {
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import React from 'react'
|
2
|
-
import { map } from '
|
3
|
-
import { isEmpty, omitBy } from '../../utilities/object'
|
2
|
+
import { isEmpty, omitBy, map } from '../../utilities/object'
|
4
3
|
|
5
4
|
import Body from '../../pb_body/_body'
|
6
5
|
import Caption from '../../pb_caption/_caption'
|
@@ -46,12 +45,12 @@ const CurrentFilters = ({ dark, filters }: CurrentFiltersProps): React.ReactElem
|
|
46
45
|
dark={dark}
|
47
46
|
size={4}
|
48
47
|
tag="h4"
|
49
|
-
text={name}
|
48
|
+
text={`${name}`}
|
50
49
|
/> :
|
51
50
|
<div>
|
52
51
|
<Caption
|
53
52
|
dark={dark}
|
54
|
-
text={name}
|
53
|
+
text={`${name}`}
|
55
54
|
/>
|
56
55
|
<Title
|
57
56
|
dark={dark}
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import React, { useState } from 'react'
|
2
|
-
import { map } from
|
3
|
-
import { find, partial } from '../../utilities/object'
|
2
|
+
import { find, partial, map } from '../../utilities/object'
|
4
3
|
|
5
4
|
import Button from '../../pb_button/_button'
|
6
5
|
import Icon from '../../pb_icon/_icon'
|
@@ -27,7 +26,7 @@ const directionIcon = (dir: Direction) => (
|
|
27
26
|
|
28
27
|
const renderOptions = (options: SortOptions, value: SortValue[], handleChange: (arg0: SortValue) => void) => (
|
29
28
|
map(options, (label, name) => {
|
30
|
-
const next = nextValue(value, name)
|
29
|
+
const next = nextValue(value, String(name))
|
31
30
|
return (
|
32
31
|
<ListItem key={`option-${next.name}-${next.dir}`}>
|
33
32
|
<Button
|
@@ -7,11 +7,12 @@ import {
|
|
7
7
|
buildDataProps,
|
8
8
|
buildHtmlProps,
|
9
9
|
} from "../utilities/props";
|
10
|
+
import { cloneDeep } from "../utilities/object";
|
11
|
+
|
10
12
|
import Icon from "../pb_icon/_icon";
|
11
13
|
import FormPill from "../pb_form_pill/_form_pill";
|
12
14
|
import Body from "../pb_body/_body";
|
13
15
|
import Caption from "../pb_caption/_caption";
|
14
|
-
import { cloneDeep } from "lodash";
|
15
16
|
import MultiLevelSelectOptions from "./multi_level_select_options";
|
16
17
|
import MultiLevelSelectContext from "./context";
|
17
18
|
|
@@ -32,11 +32,12 @@ type RichTextEditorProps = {
|
|
32
32
|
advancedEditor?: any,
|
33
33
|
advancedEditorToolbar?: boolean,
|
34
34
|
toolbarBottom?: boolean,
|
35
|
-
children?: React.ReactNode | React.ReactNode[]
|
35
|
+
children?: React.ReactNode | React.ReactNode[],
|
36
36
|
className?: string,
|
37
37
|
data?: { [key: string]: string },
|
38
38
|
focus?: boolean,
|
39
|
-
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
39
|
+
htmlOptions?: { [key: string]: string | number | boolean | (() => void) },
|
40
|
+
inputOptions?: { [key: string]: string | number | boolean | (() => void) },
|
40
41
|
id?: string,
|
41
42
|
inline?: boolean,
|
42
43
|
extensions?: { [key: string]: string }[],
|
@@ -61,6 +62,7 @@ const RichTextEditor = (props: RichTextEditorProps): React.ReactElement => {
|
|
61
62
|
data = {},
|
62
63
|
focus = false,
|
63
64
|
htmlOptions = {},
|
65
|
+
inputOptions = {},
|
64
66
|
inline = false,
|
65
67
|
extensions,
|
66
68
|
name,
|
@@ -70,7 +72,7 @@ const RichTextEditor = (props: RichTextEditorProps): React.ReactElement => {
|
|
70
72
|
sticky = false,
|
71
73
|
template = '',
|
72
74
|
value = '',
|
73
|
-
maxWidth="md"
|
75
|
+
maxWidth = "md"
|
74
76
|
} = props
|
75
77
|
|
76
78
|
const ariaProps = buildAriaProps(aria),
|
@@ -79,12 +81,28 @@ const RichTextEditor = (props: RichTextEditorProps): React.ReactElement => {
|
|
79
81
|
|
80
82
|
const htmlProps = buildHtmlProps(htmlOptions)
|
81
83
|
|
82
|
-
const handleOnEditorReady = (editorInstance: Editor) =>
|
83
|
-
|
84
|
+
const handleOnEditorReady = (editorInstance: Editor) => {
|
85
|
+
setEditor(editorInstance)
|
86
|
+
setTimeout(() => {
|
87
|
+
const oldId = editorInstance.element.getAttribute('input')
|
88
|
+
if (oldId) {
|
89
|
+
const hiddenInput = document.getElementById(oldId)
|
90
|
+
if (hiddenInput) {
|
91
|
+
const newId = (inputOptions.id as string) || oldId
|
92
|
+
hiddenInput.id = newId
|
93
|
+
editorInstance.element.setAttribute('input', newId)
|
94
|
+
|
95
|
+
if (inputOptions.name) {
|
96
|
+
hiddenInput.setAttribute('name', inputOptions.name as string)
|
97
|
+
}
|
98
|
+
}
|
99
|
+
}
|
100
|
+
})
|
101
|
+
}
|
84
102
|
|
85
103
|
// DOM manipulation must wait for editor to be ready
|
86
|
-
if (editor) {
|
87
|
-
const toolbarElement = element.parentElement.querySelector('trix-toolbar') as HTMLElement,
|
104
|
+
if (editor && editor.element) {
|
105
|
+
const toolbarElement = editor.element.parentElement.querySelector('trix-toolbar') as HTMLElement,
|
88
106
|
blockCodeButton = toolbarElement.querySelector('[data-trix-attribute=code]') as HTMLElement
|
89
107
|
|
90
108
|
// replace default trix "block code" button with "inline code" button
|
@@ -118,8 +136,8 @@ const RichTextEditor = (props: RichTextEditorProps): React.ReactElement => {
|
|
118
136
|
}, [editor, template])
|
119
137
|
|
120
138
|
useEffect(() => {
|
121
|
-
if (!element) return
|
122
|
-
element.addEventListener('click', ({ target }: Event) => {
|
139
|
+
if (!editor?.element) return
|
140
|
+
editor.element.addEventListener('click', ({ target }: Event) => {
|
123
141
|
const trixEditorContainer = (target as Element).closest('.pb_rich_text_editor_kit')
|
124
142
|
if (!trixEditorContainer) return
|
125
143
|
|
@@ -128,7 +146,7 @@ const RichTextEditor = (props: RichTextEditorProps): React.ReactElement => {
|
|
128
146
|
|
129
147
|
if (anchorElement.hasAttribute('href')) window.open(anchorElement.href)
|
130
148
|
})
|
131
|
-
}, [
|
149
|
+
}, [editor])
|
132
150
|
|
133
151
|
const richTextEditorClass = 'pb_rich_text_editor_kit',
|
134
152
|
simpleClass = simple ? 'simple' : '',
|
@@ -137,7 +155,7 @@ const RichTextEditor = (props: RichTextEditorProps): React.ReactElement => {
|
|
137
155
|
inlineClass = inline ? 'inline' : '',
|
138
156
|
toolbarBottomClass = toolbarBottom ? 'toolbar-bottom' : ''
|
139
157
|
|
140
|
-
let css = classnames(globalProps(props, {maxWidth}), className)
|
158
|
+
let css = classnames(globalProps(props, { maxWidth }), className)
|
141
159
|
css = classnames(
|
142
160
|
richTextEditorClass,
|
143
161
|
simpleClass,
|
@@ -1 +1 @@
|
|
1
|
-
<%= pb_rails("rich_text_editor", props: {id: "
|
1
|
+
<%= pb_rails("rich_text_editor", props: {input_options: { id: 'hidden_input_id', name: "hidden_input_name" }, value: "Add your text here. You can format your text, add links, quotes, and bullets."}) %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<%= react_component('RichTextEditor',
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
) %>
|
2
|
+
object.rich_text_options,
|
3
|
+
aria: object.aria,
|
4
|
+
data: object.data
|
5
|
+
) %>
|
@@ -20,6 +20,7 @@ module Playbook
|
|
20
20
|
prop :value
|
21
21
|
prop :template
|
22
22
|
prop :placeholder
|
23
|
+
prop :input_options
|
23
24
|
|
24
25
|
def classname
|
25
26
|
generate_classname("pb_rich_text_editor_kit", simple_class, focus_class, sticky_class, separator: " ")
|
@@ -49,6 +50,7 @@ module Playbook
|
|
49
50
|
value: value,
|
50
51
|
template: template,
|
51
52
|
placeholder: placeholder,
|
53
|
+
inputOptions: input_options,
|
52
54
|
}
|
53
55
|
end
|
54
56
|
end
|
@@ -21,6 +21,7 @@ type TableProps = {
|
|
21
21
|
data?: { [key: string]: string },
|
22
22
|
dataTable: boolean,
|
23
23
|
disableHover?: boolean,
|
24
|
+
headerStyle?: "default" | "borderless" | "floating"
|
24
25
|
htmlOptions?: { [key: string]: string | number | boolean | (() => void) },
|
25
26
|
id?: string,
|
26
27
|
outerPadding?: "none" | "xxs" | "xs" | "sm" | "md" | "lg" | "xl",
|
@@ -46,6 +47,7 @@ const Table = (props: TableProps): React.ReactElement => {
|
|
46
47
|
data = {},
|
47
48
|
dataTable = false,
|
48
49
|
disableHover = false,
|
50
|
+
headerStyle = "default",
|
49
51
|
htmlOptions = {},
|
50
52
|
id,
|
51
53
|
outerPadding = '',
|
@@ -85,6 +87,8 @@ const Table = (props: TableProps): React.ReactElement => {
|
|
85
87
|
'sticky-left-column': stickyLeftColumn,
|
86
88
|
'sticky-right-column': stickyRightColumn,
|
87
89
|
'striped': striped,
|
90
|
+
'header-borderless': headerStyle === 'borderless',
|
91
|
+
'header-floating': headerStyle === 'floating',
|
88
92
|
[outerPaddingCss]: outerPadding !== '',
|
89
93
|
},
|
90
94
|
globalProps(props),
|
@@ -0,0 +1,50 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
|
3
|
+
import Table from '../../pb_table/_table'
|
4
|
+
|
5
|
+
const TableWithHeaderStyleBorderless = (props) => {
|
6
|
+
return (
|
7
|
+
<>
|
8
|
+
<Table
|
9
|
+
headerStyle="borderless"
|
10
|
+
size="sm"
|
11
|
+
{...props}
|
12
|
+
>
|
13
|
+
<thead>
|
14
|
+
<tr>
|
15
|
+
<th>{'Column 1'}</th>
|
16
|
+
<th>{'Column 2'}</th>
|
17
|
+
<th>{'Column 3'}</th>
|
18
|
+
<th>{'Column 4'}</th>
|
19
|
+
<th>{'Column 5'}</th>
|
20
|
+
</tr>
|
21
|
+
</thead>
|
22
|
+
<tbody>
|
23
|
+
<tr>
|
24
|
+
<td>{'Value 1'}</td>
|
25
|
+
<td>{'Value 2'}</td>
|
26
|
+
<td>{'Value 3'}</td>
|
27
|
+
<td>{'Value 4'}</td>
|
28
|
+
<td>{'Value 5'}</td>
|
29
|
+
</tr>
|
30
|
+
<tr>
|
31
|
+
<td>{'Value 1'}</td>
|
32
|
+
<td>{'Value 2'}</td>
|
33
|
+
<td>{'Value 3'}</td>
|
34
|
+
<td>{'Value 4'}</td>
|
35
|
+
<td>{'Value 5'}</td>
|
36
|
+
</tr>
|
37
|
+
<tr>
|
38
|
+
<td>{'Value 1'}</td>
|
39
|
+
<td>{'Value 2'}</td>
|
40
|
+
<td>{'Value 3'}</td>
|
41
|
+
<td>{'Value 4'}</td>
|
42
|
+
<td>{'Value 5'}</td>
|
43
|
+
</tr>
|
44
|
+
</tbody>
|
45
|
+
</Table>
|
46
|
+
</>
|
47
|
+
)
|
48
|
+
}
|
49
|
+
|
50
|
+
export default TableWithHeaderStyleBorderless
|
@@ -0,0 +1 @@
|
|
1
|
+
Customize your header by removing the header borders with the `headerStyle="borderless"` prop.
|
@@ -0,0 +1,59 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
|
3
|
+
import Background from '../../pb_background/_background'
|
4
|
+
import Card from '../../pb_card/_card'
|
5
|
+
import Table from '../../pb_table/_table'
|
6
|
+
|
7
|
+
const TableWithHeaderStyleFloating = (props) => {
|
8
|
+
return (
|
9
|
+
<>
|
10
|
+
<Card background="light"
|
11
|
+
{...props}
|
12
|
+
>
|
13
|
+
<Table
|
14
|
+
headerStyle="floating"
|
15
|
+
size="sm"
|
16
|
+
{...props}
|
17
|
+
>
|
18
|
+
<Table.Head>
|
19
|
+
<Background backgroundColor="light"
|
20
|
+
tag="tr"
|
21
|
+
{...props}
|
22
|
+
>
|
23
|
+
<Table.Header>{'Column 1'}</Table.Header>
|
24
|
+
<Table.Header>{'Column 2'}</Table.Header>
|
25
|
+
<Table.Header>{'Column 3'}</Table.Header>
|
26
|
+
<Table.Header>{'Column 4'}</Table.Header>
|
27
|
+
<Table.Header>{'Column 5'}</Table.Header>
|
28
|
+
</Background>
|
29
|
+
</Table.Head>
|
30
|
+
<Table.Body>
|
31
|
+
<Table.Row>
|
32
|
+
<Table.Cell>{'Value 1'}</Table.Cell>
|
33
|
+
<Table.Cell>{'Value 2'}</Table.Cell>
|
34
|
+
<Table.Cell>{'Value 3'}</Table.Cell>
|
35
|
+
<Table.Cell>{'Value 4'}</Table.Cell>
|
36
|
+
<Table.Cell>{'Value 5'}</Table.Cell>
|
37
|
+
</Table.Row>
|
38
|
+
<Table.Row>
|
39
|
+
<Table.Cell>{'Value 1'}</Table.Cell>
|
40
|
+
<Table.Cell>{'Value 2'}</Table.Cell>
|
41
|
+
<Table.Cell>{'Value 3'}</Table.Cell>
|
42
|
+
<Table.Cell>{'Value 4'}</Table.Cell>
|
43
|
+
<Table.Cell>{'Value 5'}</Table.Cell>
|
44
|
+
</Table.Row>
|
45
|
+
<Table.Row>
|
46
|
+
<Table.Cell>{'Value 1'}</Table.Cell>
|
47
|
+
<Table.Cell>{'Value 2'}</Table.Cell>
|
48
|
+
<Table.Cell>{'Value 3'}</Table.Cell>
|
49
|
+
<Table.Cell>{'Value 4'}</Table.Cell>
|
50
|
+
<Table.Cell>{'Value 5'}</Table.Cell>
|
51
|
+
</Table.Row>
|
52
|
+
</Table.Body>
|
53
|
+
</Table>
|
54
|
+
</Card>
|
55
|
+
</>
|
56
|
+
)
|
57
|
+
}
|
58
|
+
|
59
|
+
export default TableWithHeaderStyleFloating
|
@@ -0,0 +1 @@
|
|
1
|
+
Further customize your header by using the [table with background kit](https://playbook.powerapp.cloud/kits/table/react#table-with-background-kit) logic to give your table header a custom background color. Use the `headerStyle="floating"` prop to visually nest the borderless table within a card or collapsible with a matching background color (the `backgroundColor` passed to Background kit should match the `backgroundColor` for the element in which it is nested).
|
@@ -75,3 +75,5 @@ examples:
|
|
75
75
|
- table_with_collapsible_with_nested_table: Table with Collapsible with Nested Table
|
76
76
|
- table_with_clickable_rows: Table with Clickable Rows
|
77
77
|
- table_with_selectable_rows: Table with Selectable Rows
|
78
|
+
- table_with_header_style_borderless: Header Style Borderless
|
79
|
+
- table_with_header_style_floating: Header Style Floating
|
@@ -35,3 +35,5 @@ export { default as TableWithCollapsibleWithNestedRows } from './_table_with_col
|
|
35
35
|
export { default as TableWithCollapsibleWithCustomClick } from './_table_with_collapsible_with_custom_click.jsx'
|
36
36
|
export { default as TableWithSelectableRows } from './_table_with_selectable_rows.jsx'
|
37
37
|
export { default as TableWithClickableRows } from './_table_with_clickable_rows.jsx'
|
38
|
+
export { default as TableWithHeaderStyleBorderless } from './_table_with_header_style_borderless.jsx'
|
39
|
+
export { default as TableWithHeaderStyleFloating } from './_table_with_header_style_floating.jsx'
|